Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Kwan的解忧杂货铺@新空间代码工作室
vue-kwan-admin
提交
225d5507
V
vue-kwan-admin
项目概览
Kwan的解忧杂货铺@新空间代码工作室
/
vue-kwan-admin
通知
39
Star
6
Fork
3
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-kwan-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
225d5507
编写于
9月 08, 2023
作者:
Kwan的解忧杂货铺@新空间代码工作室
🐭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加面试题
上级
1965c8ab
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
2235 addition
and
95 deletion
+2235
-95
dist/js/app.1ea9d376.js
dist/js/app.1ea9d376.js
+1554
-2
dist/js/app.1ea9d376.js.map
dist/js/app.1ea9d376.js.map
+344
-1
src/components/menus/MyChat.vue
src/components/menus/MyChat.vue
+89
-88
src/components/menus/MyInterview.vue
src/components/menus/MyInterview.vue
+234
-0
src/components/menus/MyPic.vue
src/components/menus/MyPic.vue
+1
-1
src/components/subcomponents/MyAside.vue
src/components/subcomponents/MyAside.vue
+7
-1
src/components/user/AddChatDetail.vue
src/components/user/AddChatDetail.vue
+1
-1
src/components/user/MyChatDetail.vue
src/components/user/MyChatDetail.vue
+1
-1
src/router/index.js
src/router/index.js
+4
-0
未找到文件。
dist/js/app.1ea9d376.js
浏览文件 @
225d5507
此差异已折叠。
点击以展开。
dist/js/app.1ea9d376.js.map
浏览文件 @
225d5507
此差异已折叠。
点击以展开。
src/components/menus/MyChat.vue
浏览文件 @
225d5507
...
...
@@ -39,97 +39,98 @@
<
script
>
import
axios
from
'
axios
'
export
default
{
name
:
'
MyChat
'
,
name
:
'
MyChat
'
,
data
()
{
return
{
// 用户列表数据
userlist
:
[],
loading
:
false
,
elementui_page_component_key
:
0
,
currentPage
:
Number
(
localStorage
.
getItem
(
'
lastPage
'
))
||
1
,
pageSize
:
9
,
total
:
0
,
formInline
:
{
question
:
''
,
},
}
},
watch
:
{
'
formInline.question
'
(
newVal
)
{
if
(
newVal
===
''
)
{
this
.
currentPage
=
1
localStorage
.
setItem
(
'
lastPage
'
,
this
.
currentPage
)
this
.
initCartList
()
}
},
},
created
()
{
this
.
$nextTick
(()
=>
{
const
foo
=
this
.
$route
.
query
.
back
const
add
=
this
.
$route
.
query
.
add
if
(
foo
===
'
back
'
&&
add
!=
'
add
'
)
{
this
.
currentPage
=
Number
(
localStorage
.
getItem
(
'
lastPage
'
))
||
1
this
.
formInline
.
question
=
localStorage
.
getItem
(
'
lastQuestion
'
)
||
''
}
else
{
localStorage
.
setItem
(
'
lastPage
'
,
1
)
localStorage
.
setItem
(
'
lastQuestion
'
,
''
)
this
.
currentPage
=
1
this
.
formInline
.
question
=
''
}
// 调用请求数据的方法
this
.
initCartList
()
})
},
mounted
()
{
this
.
currentPage
=
Number
(
localStorage
.
getItem
(
'
lastPage
'
))
||
1
this
.
formInline
.
question
=
localStorage
.
getItem
(
'
lastQuestion
'
)
this
.
elementui_page_component_key
++
},
methods
:
{
async
onDelete
(
id
)
{
this
.
loading
=
true
const
{
data
:
res
}
=
await
axios
.
get
(
'
http://120.79.36.53:8888
/chatbot/delete
'
,
{
params
:
{
id
:
id
,
},
})
this
.
initCartList
()
this
.
loading
=
false
},
refreshPage
()
{
location
.
reload
()
},
gotoDetail
(
id
)
{
this
.
$router
.
push
(
'
/home/chatinfo/
'
+
id
)
},
addChat
()
{
this
.
$router
.
push
(
'
/home/addChat/
'
)
},
data
()
{
return
{
// 用户列表数据
userlist
:
[],
loading
:
false
,
elementui_page_component_key
:
0
,
currentPage
:
Number
(
localStorage
.
getItem
(
'
lastPage
'
))
||
1
,
pageSize
:
9
,
total
:
0
,
formInline
:
{
question
:
''
,
},
}
},
watch
:
{
'
formInline.question
'
(
newVal
)
{
if
(
newVal
===
''
)
{
this
.
currentPage
=
1
localStorage
.
setItem
(
'
lastPage
'
,
this
.
currentPage
)
this
.
initCartList
()
}
},
},
created
()
{
this
.
$nextTick
(()
=>
{
const
foo
=
this
.
$route
.
query
.
back
const
add
=
this
.
$route
.
query
.
add
if
(
foo
===
'
back
'
&&
add
!=
'
add
'
)
{
this
.
currentPage
=
Number
(
localStorage
.
getItem
(
'
lastPage
'
))
||
1
this
.
formInline
.
question
=
localStorage
.
getItem
(
'
lastQuestion
'
)
||
''
}
else
{
localStorage
.
setItem
(
'
lastPage
'
,
1
)
localStorage
.
setItem
(
'
lastQuestion
'
,
''
)
this
.
currentPage
=
1
this
.
formInline
.
question
=
''
}
// 调用请求数据的方法
this
.
initCartList
()
})
},
mounted
()
{
this
.
currentPage
=
Number
(
localStorage
.
getItem
(
'
lastPage
'
))
||
1
this
.
formInline
.
question
=
localStorage
.
getItem
(
'
lastQuestion
'
)
this
.
elementui_page_component_key
++
},
methods
:
{
async
onDelete
(
id
)
{
this
.
loading
=
true
const
{
data
:
res
}
=
await
axios
.
get
(
'
http://localhost:8080
/chatbot/delete
'
,
{
params
:
{
id
:
id
,
},
})
this
.
initCartList
()
this
.
loading
=
false
},
refreshPage
()
{
location
.
reload
()
},
gotoDetail
(
id
)
{
this
.
$router
.
push
(
'
/home/chatinfo/
'
+
id
)
},
addChat
()
{
this
.
$router
.
push
(
'
/home/addChat/
'
)
},
async
initCartList
()
{
this
.
loading
=
true
const
{
data
:
res
}
=
await
axios
.
get
(
'
http://120.79.36.53:8888/chatbot/page
'
,
{
params
:
{
page
:
this
.
currentPage
,
pageSize
:
this
.
pageSize
,
question
:
this
.
formInline
.
question
,
},
})
if
(
res
.
code
===
200
)
{
this
.
userlist
=
res
.
result
.
records
this
.
total
=
res
.
result
.
total
localStorage
.
setItem
(
'
lastPage
'
,
this
.
currentPage
)
localStorage
.
setItem
(
'
lastQuestion
'
,
this
.
formInline
.
question
)
}
this
.
loading
=
false
},
async
initCartList
()
{
this
.
loading
=
true
const
{
data
:
res
}
=
await
axios
.
get
(
'
http://localhost:8080/chatbot/page
'
,
{
params
:
{
page
:
this
.
currentPage
,
pageSize
:
this
.
pageSize
,
question
:
this
.
formInline
.
question
,
},
})
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
this
.
userlist
=
res
.
result
.
content
this
.
total
=
res
.
result
.
total
localStorage
.
setItem
(
'
lastPage
'
,
this
.
currentPage
)
localStorage
.
setItem
(
'
lastQuestion
'
,
this
.
formInline
.
question
)
}
this
.
loading
=
false
},
handleCurrentChange
(
currentPage
)
{
this
.
currentPage
=
currentPage
this
.
initCartList
()
},
},
handleCurrentChange
(
currentPage
)
{
this
.
currentPage
=
currentPage
this
.
initCartList
()
},
},
}
</
script
>
...
...
src/components/menus/MyInterview.vue
0 → 100644
浏览文件 @
225d5507
<
template
>
<div>
<el-container>
<el-main>
<el-form
:inline=
"true"
:model=
"formInline"
class=
"demo-form-inline"
>
<el-form-item>
<el-input
clearable
v-model=
"formInline.question"
placeholder=
"请输入问题"
@
keydown.enter.native=
"initCartList"
></el-input>
</el-form-item>
<el-select
v-model=
"picType"
placeholder=
"请选择"
@
change=
"queryPic"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
<el-form-item>
<el-button
type=
"primary"
@
click=
"initCartList"
>
查询
</el-button>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click.prevent=
"addChat"
>
新增
</el-button>
</el-form-item>
</el-form>
<el-table
border
:data=
"userlist"
v-loading=
"loading"
>
<el-table-column
prop=
"id"
label=
"序号"
width=
"100"
sortable
></el-table-column>
<el-table-column
prop=
"question"
label=
"问题"
show-overflow-tooltip
></el-table-column>
<!--
<el-table-column
prop=
"response"
label=
"答案"
show-overflow-tooltip
></el-table-column>
-->
<el-table-column
label=
"创建时间"
width=
"170"
>
<template
slot-scope=
"props"
>
{{
props
.
row
.
createTime
|
dateFormat
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"详情"
label=
"详情"
width=
"180"
>
<
template
slot-scope=
"props"
>
<el-button
type=
"success"
@
click.prevent=
"gotoDetail(props.row.id)"
>
详情
</el-button>
<el-button
type=
"danger"
@
click=
"onDelete(props.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
class=
"pagination"
background
:key=
"elementui_page_component_key"
:current-page.sync=
"currentPage"
:page-size=
"pageSize"
:total=
"total"
@
current-change=
"handleCurrentChange"
></el-pagination>
</el-main>
<el-backtop
class=
"backtop"
></el-backtop>
</el-container>
</div>
</template>
<
script
>
import
axios
from
'
axios
'
export
default
{
name
:
'
MyInterview
'
,
data
()
{
return
{
// 用户列表数据
userlist
:
[],
loading
:
false
,
elementui_page_component_key
:
0
,
currentPage
:
Number
(
localStorage
.
getItem
(
'
lastPage
'
))
||
1
,
pageSize
:
9
,
total
:
0
,
formInline
:
{
question
:
''
,
},
options
:
[
{
value
:
0
,
label
:
'
全部
'
,
},
{
value
:
1
,
label
:
'
基础知识
'
,
},
{
value
:
2
,
label
:
'
集合
'
,
},
{
value
:
3
,
label
:
'
JVM
'
,
},
{
value
:
4
,
label
:
'
并发编程
'
,
},
{
value
:
5
,
label
:
'
MySql
'
,
},
{
value
:
6
,
label
:
'
Redis
'
,
},
{
value
:
7
,
label
:
'
中间件
'
,
},
{
value
:
8
,
label
:
'
Spring
'
,
},
{
value
:
9
,
label
:
'
微服务
'
,
},
{
value
:
10
,
label
:
'
分布式
'
,
},
{
value
:
11
,
label
:
'
项目
'
,
},
{
value
:
99
,
label
:
'
其他
'
,
},
],
picType
:
0
,
}
},
watch
:
{
'
formInline.question
'
(
newVal
)
{
if
(
newVal
===
''
)
{
this
.
currentPage
=
1
localStorage
.
setItem
(
'
lastPage
'
,
this
.
currentPage
)
this
.
initCartList
()
}
},
},
created
()
{
this
.
$nextTick
(()
=>
{
const
foo
=
this
.
$route
.
query
.
back
const
add
=
this
.
$route
.
query
.
add
if
(
foo
===
'
back
'
&&
add
!=
'
add
'
)
{
this
.
currentPage
=
Number
(
localStorage
.
getItem
(
'
lastPage
'
))
||
1
this
.
formInline
.
question
=
localStorage
.
getItem
(
'
lastQuestion
'
)
||
''
}
else
{
localStorage
.
setItem
(
'
lastPage
'
,
1
)
localStorage
.
setItem
(
'
lastQuestion
'
,
''
)
this
.
currentPage
=
1
this
.
formInline
.
question
=
''
}
// 调用请求数据的方法
this
.
initCartList
()
})
},
mounted
()
{
this
.
currentPage
=
Number
(
localStorage
.
getItem
(
'
lastPage
'
))
||
1
this
.
formInline
.
question
=
localStorage
.
getItem
(
'
lastQuestion
'
)
this
.
elementui_page_component_key
++
},
methods
:
{
async
onDelete
(
id
)
{
this
.
loading
=
true
const
{
data
:
res
}
=
await
axios
.
get
(
'
http://localhost:8080/interviewQuestion/delete
'
,
{
params
:
{
id
:
id
,
},
})
this
.
initCartList
()
this
.
loading
=
false
},
refreshPage
()
{
location
.
reload
()
},
gotoDetail
(
id
)
{
this
.
$router
.
push
(
'
/home/chatinfo/
'
+
id
)
},
addChat
()
{
this
.
$router
.
push
(
'
/home/addChat/
'
)
},
async
initCartList
()
{
this
.
loading
=
true
const
{
data
:
res
}
=
await
axios
.
get
(
'
http://localhost:8080/interviewQuestion/page
'
,
{
params
:
{
page
:
this
.
currentPage
,
pageSize
:
this
.
pageSize
,
question
:
this
.
formInline
.
question
,
type
:
this
.
picType
,
},
})
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
this
.
userlist
=
res
.
result
.
content
this
.
total
=
res
.
result
.
total
localStorage
.
setItem
(
'
lastPage
'
,
this
.
currentPage
)
localStorage
.
setItem
(
'
lastQuestion
'
,
this
.
formInline
.
question
)
}
this
.
loading
=
false
},
handleCurrentChange
(
currentPage
)
{
this
.
currentPage
=
currentPage
this
.
initCartList
()
},
},
}
</
script
>
<
style
lang=
"less"
scoped
>
.el-header {
background-color: #b3c0d1;
color: #333;
line-height: 60px;
}
.el-aside {
color: #333;
}
.pagination {
margin-top: 16px;
text-align: right;
}
.header-button-item {
margin-right: 15px;
font-size: 20px;
}
.backtop {
position: fixed;
bottom: 50px;
right: 50px;
height: 40px;
width: 40px;
line-height: 40px;
text-align: center;
border-radius: 20px;
background-color: #007aff;
color: #fff;
cursor: pointer;
z-index: 999;
}
.backtop:hover {
background-color: #0050a0;
}
</
style
>
\ No newline at end of file
src/components/menus/MyPic.vue
浏览文件 @
225d5507
...
...
@@ -106,7 +106,7 @@ export default {
},
async
queryPic
()
{
this
.
loading
=
true
const
{
data
:
res
}
=
await
axios
.
get
(
'
http://
120.79.36.53:8888
/picInfo/page
'
,
{
const
{
data
:
res
}
=
await
axios
.
get
(
'
http://
localhost:8080
/picInfo/page
'
,
{
params
:
{
page
:
this
.
currentPage
,
pageSize
:
this
.
pageSize
,
...
...
src/components/subcomponents/MyAside.vue
浏览文件 @
225d5507
<
template
>
<el-menu
default-active=
"$route.path"
class=
"layout-aside-container"
background-color=
"#fff"
text-color=
"#000"
active-text-color=
"#42b983"
>
<router-link
to=
"/home/interview"
>
<el-menu-item
index=
"/interview"
class=
"left-aside-item"
>
<i
class=
"el-icon-chat-line-square"
></i>
<span
slot=
"title"
>
面试题管理
</span>
</el-menu-item>
</router-link>
<router-link
to=
"/home/chat"
>
<el-menu-item
index=
"/chat"
class=
"left-aside-item"
>
<i
class=
"el-icon-chat-line-square"
></i>
<span
slot=
"title"
>
对话
管理
</span>
<span
slot=
"title"
>
CHAT
管理
</span>
</el-menu-item>
</router-link>
<router-link
to=
"/home/pic"
>
...
...
src/components/user/AddChatDetail.vue
浏览文件 @
225d5507
...
...
@@ -42,7 +42,7 @@ export default {
response
:
this
.
form
.
response
,
}
axios
.
post
(
'
http://
120.79.36.53:8888
/chatbot
'
,
data
)
.
post
(
'
http://
localhost:8080
/chatbot
'
,
data
)
.
then
((
response
)
=>
{
// 只要请求回来的数据,在页面渲染期间要用到,则必须转存到 data 中
if
(
response
.
data
.
code
===
200
)
{
...
...
src/components/user/MyChatDetail.vue
浏览文件 @
225d5507
...
...
@@ -66,7 +66,7 @@ export default {
// 封装请求列表数据的方法
async
initChatList
()
{
// 调用 axios 的 get 方法,请求列表数据
const
{
data
:
res
}
=
await
axios
.
get
(
'
http://
120.79.36.53:8888
/chatbot/
'
+
this
.
id
)
const
{
data
:
res
}
=
await
axios
.
get
(
'
http://
localhost:8080
/chatbot/
'
+
this
.
id
)
// 只要请求回来的数据,在页面渲染期间要用到,则必须转存到 data 中
if
(
res
.
code
===
200
)
{
this
.
list
=
[
...
...
src/router/index.js
浏览文件 @
225d5507
...
...
@@ -11,6 +11,7 @@ import Pic from '@/components/menus/MyPic.vue'
import
Goods
from
'
@/components/menus/MyGoods.vue
'
import
Orders
from
'
@/components/menus/MyOrders.vue
'
import
Chat
from
'
@/components/menus/MyChat.vue
'
import
Interview
from
'
@/components/menus/MyInterview.vue
'
import
Settings
from
'
@/components/menus/MySettings.vue
'
import
UserDetail
from
'
@/components/user/MyUserDetail.vue
'
import
MyChatDetail
from
'
@/components/user/MyChatDetail.vue
'
...
...
@@ -54,6 +55,9 @@ const router = new VueRouter({
},
{
path
:
'
chat
'
,
component
:
Chat
},
{
path
:
'
interview
'
,
component
:
Interview
},
{
path
:
'
settings
'
,
component
:
Settings
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录