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
dcf8f37d
Commit
dcf8f37d
authored
Dec 15, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
efa544ef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
203 additions
and
341 deletions
+203
-341
index.js
src/api/system/index.js
+36
-0
stage-form.vue
src/components/system/stage-form.vue
+95
-0
stage.vue
src/pages/system/stage.vue
+72
-341
No files found.
src/api/system/index.js
View file @
dcf8f37d
...
...
@@ -443,3 +443,39 @@ export function GetClassPlanStatistical(data) {
});
}
/**
* 获取客户阶段管理列表
*/
export
function
GetStageList
(
data
)
{
return
request
({
url
:
'/CustomerStudent/GetStageList'
,
method
:
'post'
,
data
});
}
/**
* 新增修改客户阶段
*/
export
function
SetStage
(
data
)
{
return
request
({
url
:
'/CustomerStudent/SetStage'
,
method
:
'post'
,
data
});
}
/**
* 删除客户阶段
*/
export
function
RemoveStage
(
data
)
{
return
request
({
url
:
'/CustomerStudent/RemoveStage'
,
method
:
'post'
,
data
});
}
src/components/system/stage-form.vue
0 → 100644
View file @
dcf8f37d
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 400px;max-width:400px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
optionTitle
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
maxlength=
"30"
:dense=
"false"
v-model=
"objOption.StageName"
ref=
"StageName"
class=
"col-12 q-pb-lg"
label=
"阶段名称"
:rules=
"[val => !!val || '请填写阶段名称']"
/>
</div>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"objOption.No"
ref=
"No"
class=
"col-12 q-pb-lg"
label=
"编号"
@
keyup
.
native=
"checkInteger(objOption,'No')"
/>
</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=
"saveStage"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
import
{
SetStage
}
from
'../../api/system/index'
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
persistent
:
true
,
saveLoading
:
false
,
objOption
:
{
Id
:
0
,
StageName
:
''
,
//阶段名称
No
:
1
//编号
},
optionTitle
:
""
,
}
},
mounted
()
{
this
.
initObj
();
},
methods
:
{
//初始化表单
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
this
.
objOption
.
Id
=
this
.
saveObj
.
Id
;
this
.
objOption
.
StageName
=
this
.
saveObj
.
StageName
;
this
.
objOption
.
No
=
this
.
saveObj
.
No
;
this
.
optionTitle
=
"修改客户阶段信息"
}
else
{
this
.
optionTitle
=
"新增客户阶段信息"
this
.
objOption
.
Id
=
0
;
this
.
objOption
.
StageName
=
''
;
this
.
objOption
.
No
=
1
;
}
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
},
//保存菜单
saveStage
()
{
this
.
$refs
.
StageName
.
validate
();
if
(
!
this
.
$refs
.
StageName
.
hasError
)
{
this
.
saveLoading
=
true
SetStage
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
;
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}
})
}
}
}
}
</
script
>
src/pages/system/stage.vue
View file @
dcf8f37d
<
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
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.AssistName"
label=
"助教名称"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.AssistTel"
label=
"助教电话"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
clearable
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"schoolTemp"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
/>
</div>
<div
class=
"col-3"
style=
"display:none;"
>
<q-select
@
input=
"resetSearch"
standout=
"bg-primary text-white"
v-model=
"msg.AuditStatus"
:options=
"AuditOpts"
emit-value
map-options
label=
"审核状态"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-
right-column-table sticky-column-table"
separator=
"none"
:data=
"data
"
:columns=
"columns"
class=
"sticky-
column-table no-bottom-table"
separator=
"none"
:data=
"dataList
"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
助教信息
</div>
<div
class=
"col-2 q-table__title"
>
客户阶段
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增
助教
"
@
click=
"addObj(null)"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增
阶段
"
@
click=
"addObj(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-AssistName=
"props"
>
<q-td
:props=
"props"
>
<q-avatar
rounded
size=
"sm"
v-if=
"props.row.AssistIcon"
>
<img
:src=
"props.row.AssistIcon"
/>
</q-avatar>
<q-avatar
rounded
size=
"sm"
color=
"teal-10"
text-color=
"white"
v-if=
"!props.row.AssistIcon"
>
{{
props
.
value
[
0
]
}}
</q-avatar>
<span
class=
"q-ml-md text-blue cursor-pointer"
>
{{
props
.
value
}}
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-AuditStatus=
"props"
>
<q-td
:props=
"props"
>
<q-badge
v-if=
"props.value==1"
color=
"dark"
label=
"审核中"
/>
<div
v-if=
"props.value==3"
>
<q-badge
color=
"warning"
class=
"cursor-pointer"
label=
"审核不通过"
/>
<q-popup-proxy>
<q-banner
class=
"bg-dark text-white"
>
{{
props
.
row
.
Remark
}}
</q-banner>
</q-popup-proxy>
</div>
<div
v-if=
"props.value==2"
>
<q-badge
v-if=
"props.value==2"
class=
"cursor-pointer"
color=
"primary"
label=
"审核通过"
/>
<q-popup-proxy>
<q-banner
class=
"bg-dark text-white"
>
{{
props
.
row
.
Remark
}}
</q-banner>
</q-popup-proxy>
</div>
</q-td>
</
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"
>
<
template
v-slot:body-cell-Group_Id=
"props"
>
<q-td
:props=
"props"
>
<div>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"addObj(props.row)"
/>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left:10px;"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"showExamine(props.row)"
v-if=
"props.row.AuditStatus==1"
style=
"display:none"
>
<q-item-section>
<q-item-label>
审核
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"resetPw(props.row.AId)"
v-if=
"props.row.AuditStatus==2"
>
<q-item-section>
<q-item-label>
重置密码
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"reApplyAssisst(props.row.AId)"
v-if=
"props.row.AuditStatus==3"
style=
"display:none"
>
<q-item-section>
<q-item-label>
重新申请
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
color=
"negative"
v-close-popup
@
click=
"deleteUser(props.row.AId)"
>
<q-item-section>
<q-item-label>
删除
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"deleteStage(props.row.Id)"
/>
</div>
</q-td>
</
template
>
</q-table>
<assistant-form
v-if=
"persistent"
:save-obj=
"objOption"
@
close=
"closeSaveForm"
@
success=
"addAfterQuery"
>
</assistant-form>
<assistant-shenhe
v-if=
"persistentExamine"
:show-obj=
"objOption"
@
close=
"closeSaveForm"
@
success=
"addAfterQuery"
>
</assistant-shenhe>
</div>
<stage-form
v-if=
"isShowStageForm"
:save-obj=
"stageObj"
@
close=
"closestageForm"
@
success=
"refreshPage"
>
</stage-form>
</div>
</template>
<
script
>
import
{
getAssistPage
,
getSchoolDropdown
,
deleteAssist
,
reApplyAssist
}
from
'../../api/school/index'
import
{
resetPassword
}
from
'../../api/users/user.js'
import
assistantForm
from
'../../components/school/assistant/assistant-form'
import
assistantShenhe
from
'../../components/school/assistant/assistant-shenhe'
GetStageList
,
RemoveStage
}
from
'../../api/system/index'
import
stageForm
from
'../../components/system/stage-form'
export
default
{
meta
:
{
title
:
"客户阶段管理"
},
components
:
{
assistantForm
,
assistantShenhe
stageForm
},
data
()
{
return
{
currentUrl
:
""
,
columns
:
[{
name
:
'AssistName'
,
required
:
true
,
label
:
'助教名称'
,
align
:
'left'
,
field
:
row
=>
row
.
AssistName
},
{
name
:
'AssistTel'
,
label
:
'助教电话'
,
field
:
'AssistTel'
,
name
:
'Id'
,
label
:
'Id'
,
field
:
row
=>
row
.
Id
,
align
:
'left'
},
{
name
:
'SName'
,
label
:
'所属校区'
,
field
:
'SName'
,
align
:
'left'
,
},
{
name
:
'DeptName'
,
label
:
'所属部门'
,
field
:
'DeptName'
,
align
:
'left'
,
},
{
name
:
'PostName'
,
label
:
'岗位名称'
,
field
:
'PostName'
,
align
:
'left'
,
},
// {
// name: 'AuditStatus',
// label: '审核状态',
// align: 'left',
// field: 'AuditStatus'
// },
{
name
:
'ClassCount'
,
label
:
'带班数量'
,
align
:
'left'
,
field
:
'ClassCount'
},
// {
// name: 'OnlineClassCount',
// label: '网课产品',
// align: 'left',
// field: 'OnlineClassCount'
// },
// {
// name: 'OnlineOrderCount',
// label: '网课订单',
// align: 'left',
// field: 'OnlineOrderCount'
// },
{
name
:
'CreateTimeStr'
,
label
:
'入职时间'
,
align
:
'left'
,
field
:
'CreateTimeStr'
},
{
name
:
'AssistAccount'
,
label
:
'账号'
,
},{
name
:
'No'
,
label
:
'编号'
,
field
:
'No'
,
align
:
'left'
},{
name
:
'StageName'
,
required
:
true
,
label
:
'阶段名称'
,
align
:
'left'
,
field
:
'AssistAccount'
},
{
name
:
'optioned'
,
field
:
row
=>
row
.
StageName
},{
name
:
'Group_Id'
,
label
:
'操作'
,
field
:
'AId'
}
],
data
:
[],
loading
:
true
,
AuditOpts
:
[{
label
:
'全部'
,
value
:
'-1'
},
{
label
:
'审核中'
,
value
:
'1'
},
{
label
:
'审核通过'
,
value
:
'2'
},
{
label
:
'审核不通过'
,
value
:
'3'
field
:
'Group_Id'
}
],
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
AssistName
:
""
,
AssistTel
:
""
,
AuditStatus
:
"-1"
,
School_Id
:
0
msg
:{
rowsPerPage
:
100
},
pageCount
:
0
,
persistent
:
false
,
objOption
:
null
,
schoolList
:
[],
schoolTemp
:
null
,
persistentExamine
:
false
,
resetLoading
:
false
dataList
:
[],
loading
:
true
,
isShowStageForm
:
false
,
stageObj
:
{}
}
},
mounted
()
{
this
.
currentUrl
=
this
.
$route
.
path
this
.
getSchool
()
this
.
getAssistant
()
this
.
getList
()
},
methods
:
{
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
this
.
loading
=
true
if
(
this
.
schoolTemp
)
{
this
.
msg
.
School_Id
=
this
.
schoolTemp
.
SId
}
else
{
this
.
msg
.
School_Id
=
0
}
this
.
getAssistant
()
},
resetPw
(
id
)
{
let
that
=
this
this
.
$q
.
dialog
({
title
:
"重置密码"
,
message
:
"你正在进行重置密码行为,是否确认执行"
,
persistent
:
true
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认重置"
,
flat
:
true
,
focus
:
true
}
}).
onOk
(()
=>
{
that
.
resetLoading
=
true
resetPassword
({
AccountType
:
3
,
AccountId
:
id
}).
then
(
res
=>
{
that
.
resetLoading
=
false
that
.
$q
.
dialog
({
title
:
"密码重置成功"
,
message
:
res
.
Message
,
persistent
:
true
,
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
})
}).
catch
(()
=>
{
that
.
resetLoading
=
false
});
});
},
deleteUser
(
id
)
{
let
that
=
this
deleteStage
(
Id
)
{
let
delMsg
=
{
Id
:
Id
};
this
.
$q
.
dialog
({
title
:
"删除助教"
,
message
:
"你正在进行删除助教行为,一旦执行无法找回,是否确认执行?"
,
title
:
'提示信息'
,
message
:
'是否确定该阶段?'
,
cancel
:
true
,
persistent
:
true
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
that
.
resetLoading
=
true
deleteAssist
({
AId
:
id
}).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据删除成功!'
,
position
:
'top'
})
this
.
getAssistant
()
RemoveStage
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getList
();
}
})
}).
onCancel
(()
=>
{
});
},
//助教重新申请
reApplyAssisst
(
id
)
{
reApplyAssist
({
AId
:
id
}).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'重新申请成功!'
,
position
:
'top'
})
this
.
getAssistant
()
})
},
changePage
(
val
)
{
this
.
msg
.
Status
=
this
.
StatusTemp
?
this
.
StatusTemp
.
value
:
'-1'
this
.
msg
.
pageIndex
=
val
;
this
.
loading
=
true
this
.
getAssistant
()
},
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
schoolList
=
res
.
Data
if
(
this
.
msg
.
School_Id
!=
0
)
{
this
.
schoolTemp
=
this
.
schoolList
.
filter
(
x
=>
{
if
(
this
.
objOption
.
School_Id
==
x
.
SId
)
{
return
x
}
})[
0
]
getList
()
{
this
.
loading
=
true
;
GetStageList
({}).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
Code
==
1
){
this
.
dataList
=
res
.
Data
;
}
})
},
getAssistant
()
{
getAssistPage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
data
=
res
.
Data
.
PageData
this
.
pageCount
=
res
.
Data
.
PageCount
}).
catch
(()
=>
{
this
.
loading
=
false
})
closestageForm
()
{
this
.
isShowStageForm
=
false
},
addAfterQuery
()
{
if
(
!
this
.
objOption
)
{
this
.
msg
=
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
TeacherName
:
""
,
TeacherTel
:
""
,
AuditStatus
:
"-1"
,
IsShow
:
"-1"
}
}
this
.
getAssistant
()
refreshPage
(){
this
.
getList
();
},
addObj
(
obj
)
{
addObj
(
obj
){
if
(
obj
)
{
this
.
objOption
=
obj
this
.
stageObj
=
obj
}
else
{
this
.
objOption
=
null
this
.
stageObj
=
null
}
this
.
persistent
=
true
},
showExamine
(
obj
)
{
this
.
objOption
=
obj
this
.
persistentExamine
=
true
},
closeSaveForm
()
{
this
.
persistent
=
false
this
.
persistentExamine
=
false
this
.
isShowStageForm
=
true
;
}
},
}
...
...
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