Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
8bc0ca92
Commit
8bc0ca92
authored
Apr 09, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/confucius
parents
300672b8
38246bc2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
423 additions
and
1 deletion
+423
-1
App.vue
src/App.vue
+1
-1
webkit.js
src/api/system/webkit.js
+24
-0
consult-form.vue
src/components/system/consult-form.vue
+175
-0
consultManage.vue
src/pages/system/consultManage.vue
+218
-0
routes.js
src/router/routes.js
+5
-0
No files found.
src/App.vue
View file @
8bc0ca92
...
...
@@ -12,7 +12,7 @@ export default {
<
style
>
@import
url('~assets/css/font.css')
;
@import
url('//at.alicdn.com/t/font_2077629_
dcgp2ptb1g
.css')
;
@import
url('//at.alicdn.com/t/font_2077629_
747pcje2wmh
.css')
;
html
,
body
,
...
...
src/api/system/webkit.js
View file @
8bc0ca92
...
...
@@ -295,3 +295,27 @@ export function RemoveWebTeacherStatus(data) {
data
})
}
/**
* 获取咨询管理分页
*
*/
export
function
GetWebAdvisoryPage
(
data
)
{
return
request
({
url
:
'/WebManager/GetWebAdvisoryPage'
,
method
:
'post'
,
data
})
}
/**
* 根据编号获取咨询详情
*
*/
export
function
GetWebAdvisory
(
data
)
{
return
request
({
url
:
'/WebManager/GetWebAdvisory'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/system/consult-form.vue
0 → 100644
View file @
8bc0ca92
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
Id
==
0
?
'新增网站菜单'
:
'修改网站菜单'
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
网站菜单信息
</div>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Name"
ref=
"Name"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"菜单名称"
:rules=
"[val => !!val || '请填写菜单名称']"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.MenuUrl"
ref=
"MenuUrl"
class=
"col-6 q-pb-lg"
label=
"菜单地址"
/>
<q-select
class=
"col-6 q-pr-lg q-pb-lg"
v-model=
"objOption.MenuLevel"
:options=
"MenuLevelOpts"
emit-value
map-options
label=
"菜单等级"
@
input=
"getFatherData(objOption.MenuLevel)"
/>
<q-select
class=
"col-6 q-pb-lg"
v-model=
"objOption.ParentId"
option-value=
"Id"
option-label=
"Name"
:options=
"FatherLevelOpts"
emit-value
map-options
label=
"父级Id"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.ClassName"
ref=
"ClassName"
class=
"col-6 q-pb-lg q-pr-lg"
label=
"样式"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
@
keyup
.
native=
"checkInteger(objOption,'SortNum')"
v-model=
"objOption.SortNum"
ref=
"SortNum"
class=
"col-6 q-pb-lg"
label=
"排序"
/>
<div
class=
"col-6 q-pb-lg q-pr-lg"
>
<q-uploader
:style=
"
{ backgroundImage: 'url(' + objOption.Icon + ')' }" style="width:auto;height:200px;background-repeat:no-repeat;background-size:cover;" flat
hide-upload-btn max-files="1" label="菜单图标" accept=".jpg, image/*" :factory="uploadFile" auto-upload>
</q-uploader>
</div>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"saveWebkitMenu"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
import
{
GetWebAdvisory
,
GetWebMenu
,
GetWebMenuList
}
from
'../../api/system/webkit'
import
{
UploadSelfFile
}
from
"../../api/common/common"
;
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
//菜单等级
MenuLevelOpts
:
[{
label
:
'全部'
,
value
:
-
1
},
{
label
:
'一级'
,
value
:
1
},
{
label
:
'二级'
,
value
:
2
},
{
label
:
'三级'
,
value
:
3
}
],
persistent
:
true
,
objOption
:
{
Id
:
0
,
Name
:
''
,
//菜单名称
MenuUrl
:
''
,
ParentId
:
0
,
MenuLevel
:
-
1
,
ClassName
:
''
,
Icon
:
''
,
SortNum
:
''
},
optionTitle
:
""
,
//菜单列表
MenuList
:
[],
FatherLevelOpts
:
[],
saveLoading
:
false
,
}
},
mounted
()
{
this
.
initObj
()
},
methods
:
{
//下拉切换父级数据
getFatherData
()
{
this
.
objOption
.
ParentId
=
0
;
this
.
FatherLevelOpts
=
[];
let
msg
=
{
MenuLevel
:
Number
(
this
.
objOption
.
MenuLevel
-
1
)
}
GetWebMenuList
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
FatherLevelOpts
=
res
.
Data
;
}
})
},
uploadFile
(
files
)
{
UploadSelfFile
(
"course"
,
files
[
0
],
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
objOption
.
Icon
=
res
.
FileUrl
;
}
});
},
//初始化表单
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
GetWebMenu
({
Id
:
this
.
saveObj
.
Id
}).
then
(
res
=>
{
this
.
objOption
.
MenuLevel
=
res
.
Data
.
MenuLevel
;
this
.
getFatherData
();
this
.
objOption
.
Id
=
res
.
Data
.
Id
;
this
.
objOption
.
Name
=
res
.
Data
.
Name
;
this
.
objOption
.
MenuUrl
=
res
.
Data
.
MenuUrl
;
this
.
objOption
.
ParentId
=
res
.
Data
.
ParentId
;
this
.
objOption
.
ClassName
=
res
.
Data
.
ClassName
;
this
.
objOption
.
Icon
=
res
.
Data
.
Icon
;
this
.
objOption
.
SortNum
=
res
.
Data
.
SortNum
;
})
this
.
optionTitle
=
"修改网站菜单信息"
}
else
{
this
.
optionTitle
=
"新增网站菜单信息"
this
.
objOption
.
Id
=
0
;
this
.
objOption
.
Name
=
''
;
this
.
objOption
.
MenuUrl
=
''
;
this
.
objOption
.
ParentId
=
0
;
this
.
objOption
.
MenuLevel
=
-
1
;
this
.
objOption
.
ClassName
=
''
;
this
.
objOption
.
Icon
=
''
;
this
.
objOption
.
SortNum
=
0
;
}
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
//保存菜单
saveWebkitMenu
()
{
this
.
$refs
.
Name
.
validate
();
if
(
!
this
.
$refs
.
Name
.
hasError
)
{
this
.
saveLoading
=
true
SetWebMenu
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
}
}
},
}
</
script
>
src/pages/system/consultManage.vue
0 → 100644
View file @
8bc0ca92
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
change=
"resetSearch"
clearable
standout=
"bg-primary text-white"
class=
"col-6 q-pr-lg q-pr-lg"
v-model=
"msg.Name"
label=
"菜单名称"
maxlength=
"20"
@
clear=
"resetSearch"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
standout=
"bg-primary text-white"
class=
"col-6 q-pr-lg q-pr-lg"
v-model=
"msg.Status"
:options=
"ShowOpts"
emit-value
map-options
label=
"状态"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
咨询信息
</div>
<!--
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
size=
"sm"
icon=
"add"
label=
"新增菜单"
@
click=
"EditMenu(null)"
/>
</div>
-->
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
v-if=
"props.row.DealStatus==0"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"处理"
@
click=
"EditMenu(props.row)"
/>
</q-td>
</
template
>
</q-table>
<consult-form
v-if=
"isShowMenuForm"
:save-obj=
"menuObjOption"
@
close=
"closeMenuSaveForm"
@
success=
"refreshPage"
>
</consult-form>
</div>
</div>
</template>
<
script
>
import
{
GetWebAdvisoryPage
,
RemoveWebMenuStatus
,
}
from
'../../api/system/webkit'
import
consultForm
from
'../../components/system/consult-form'
export
default
{
meta
:
{
title
:
"咨询管理"
},
components
:
{
consultForm
},
data
()
{
return
{
columns
:
[{
name
:
'LinkMan'
,
label
:
'客户'
,
field
:
'LinkMan'
,
align
:
'left'
},
{
name
:
'LinkTel'
,
label
:
'客户电话'
,
field
:
'LinkTel'
,
align
:
'left'
},
{
name
:
'Remark'
,
label
:
'咨询内容'
,
field
:
'Remark'
,
align
:
'left'
},
{
name
:
'DealStatusStr'
,
label
:
'处理状态'
,
field
:
'DealStatusStr'
,
align
:
'left'
},
{
name
:
'DealByName'
,
label
:
'处理人'
,
field
:
'DealByName'
,
align
:
'left'
},
{
name
:
'DealTimeStr'
,
label
:
'处理时间'
,
field
:
'DealTimeStr'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'MenuId'
}
],
data
:
[],
loading
:
true
,
ShowOpts
:
[{
label
:
'全部'
,
value
:
-
1
},
{
label
:
'正常'
,
value
:
0
},
{
label
:
'删除'
,
value
:
1
}
],
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
LinkMan
:
''
,
//联系人
DealStatus
:
0
,
//处理状态(0-待处理,1-已处理)
Status
:
-
1
},
pageCount
:
0
,
isShowMenuForm
:
false
,
menuObjOption
:
null
,
}
},
mounted
()
{
this
.
getList
()
},
methods
:
{
//修改菜单状态
DeleteMenu
(
obj
)
{
var
that
=
this
;
var
delMsg
=
{
Id
:
obj
.
Id
,
Status
:
obj
.
Status
};
var
tipMsg
=
""
;
if
(
delMsg
.
Status
==
0
)
{
tipMsg
=
"是否启用【"
+
obj
.
Name
+
"】?"
;
}
else
{
tipMsg
=
"是否禁用【"
+
obj
.
Name
+
"】?"
;
}
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
tipMsg
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
RemoveWebMenuStatus
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
that
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'操作成功'
,
position
:
'top'
})
that
.
getList
();
}
})
}).
onCancel
(()
=>
{
obj
.
Status
=
obj
.
Status
==
1
?
0
:
1
;
});
},
//重新查询
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
()
},
//获取菜单分页列表
getList
()
{
this
.
loading
=
true
;
GetWebAdvisoryPage
(
this
.
msg
).
then
(
res
=>
{
console
.
log
(
res
,
'咨询数据'
);
this
.
loading
=
false
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
//刷新页面
refreshPage
()
{
if
(
!
this
.
menuObjOption
)
{
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
Name
=
""
;
this
.
msg
.
Status
=
"-1"
;
}
this
.
getList
()
},
//新增修改菜单
EditMenu
(
obj
)
{
if
(
obj
)
{
this
.
menuObjOption
=
obj
}
else
{
this
.
menuObjOption
=
null
}
this
.
isShowMenuForm
=
true
},
//关闭弹窗
closeMenuSaveForm
()
{
this
.
isShowMenuForm
=
false
},
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/router/routes.js
View file @
8bc0ca92
...
...
@@ -122,6 +122,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/system/teacherManage.vue"
)
},
{
path
:
"/system/consultManage"
,
//咨询管理
component
:
()
=>
import
(
"pages/system/consultManage.vue"
)
},
{
path
:
"/course/catagory"
,
//课程分类
component
:
()
=>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment