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
daf67bdb
Commit
daf67bdb
authored
Dec 15, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ea70034c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
276 additions
and
303 deletions
+276
-303
stulist.vue
src/components/school/student/stulist.vue
+276
-303
No files found.
src/components/school/student/stulist.vue
View file @
daf67bdb
<
style
lang=
"scss"
>
.stuList
.q-table__bottom
{
min-height
:
0
;
}
.stuList
.q-table__bottom
{
min-height
:
0
;
}
</
style
>
<
template
>
<div
class=
"stuList"
>
<q-table
:pagination=
"pageMsg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
selection=
"multiple"
:selected
.
sync=
"selection"
class=
"sticky-right-column-table sticky-tow-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"StuId"
hide-bottom
>
<q-table
:pagination=
"pageMsg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
selection=
"multiple"
:selected
.
sync=
"selection"
class=
"sticky-right-column-table sticky-tow-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"StuId"
hide-bottom
>
<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=
"swap_horiz"
label=
"转订单"
:disable=
"selection.length===0"
@
click=
"transferOrder"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
size=
"sm"
icon=
"add"
label=
"新增客户"
@
click=
"EditStudent(null)"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
size=
"sm"
icon=
"swap_horiz"
label=
"转订单"
:disable=
"selection.length===0"
@
click=
"transferOrder"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
size=
"sm"
icon=
"add"
label=
"新增客户"
@
click=
"EditStudent(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-StuIcon=
"props"
>
...
...
@@ -47,14 +22,8 @@
<q-avatar
size=
"md"
v-if=
"props.value"
>
<img
:src=
"props.value"
/>
</q-avatar>
<q-avatar
size=
"md"
color=
"teal-10"
text-color=
"white"
v-if=
"!props.value"
>
{{
props
.
row
.
StuName
.
substring
(
0
,
1
)
}}
</q-avatar
>
<q-avatar
size=
"md"
color=
"teal-10"
text-color=
"white"
v-if=
"!props.value"
>
{{
props
.
row
.
StuName
.
substring
(
0
,
1
)
}}
</q-avatar>
</q-td>
</
template
>
<
template
v-slot:body-cell-StuName=
"props"
>
...
...
@@ -66,301 +35,305 @@
</
template
>
<
template
v-slot:body-cell-StuSex=
"props"
>
<q-td
:props=
"props"
>
<q-badge
:color=
"props.value == 1 ? 'negative' : 'primary'"
:label=
"props.value == 1 ? '女' : '男'"
/>
<q-badge
:color=
"props.value == 1 ? 'negative' : 'primary'"
:label=
"props.value == 1 ? '女' : '男'"
/>
</q-td>
</
template
>
<
template
v-slot:body-cell-Status=
"props"
>
<q-td
:props=
"props"
>
<q-toggle
size=
"md"
color=
"primary"
:false-value=
"1"
:true-value=
"0"
v-model=
"props.row.Status"
title=
"注意:关闭后,学员将无法正常使用."
@
input=
"deleteStudentInfo(props.row)"
/>
<q-toggle
size=
"md"
color=
"primary"
:false-value=
"1"
:true-value=
"0"
v-model=
"props.row.Status"
title=
"注意:关闭后,学员将无法正常使用."
@
input=
"deleteStudentInfo(props.row)"
/>
</q-td>
</
template
>
</q-table>
<student-form
v-if=
"isShowStuForm"
:save-obj=
"stuOption"
@
close=
"closeStuForm"
@
success=
"refreshStuList"
>
<student-form
v-if=
"isShowStuForm"
:save-obj=
"stuOption"
@
close=
"closeStuForm"
@
success=
"refreshStuList"
>
</student-form>
<studentRight-form
v-if=
"isShowStuRight"
:save-obj=
"stuOption"
@
close=
"closeStuForm"
@
success=
"refreshStuList"
>
<studentRight-form
v-if=
"isShowStuRight"
:save-obj=
"stuOption"
@
close=
"closeStuForm"
@
success=
"refreshStuList"
>
</studentRight-form>
<studentAdd-form
v-if=
"isShowAdd"
:save-obj=
"stuOption"
@
close=
"closeStuForm"
@
success=
"refreshStuList"
>
<studentAdd-form
v-if=
"isShowAdd"
:save-obj=
"stuOption"
@
close=
"closeStuForm"
@
success=
"refreshStuList"
>
</studentAdd-form>
<transfer-order
v-if=
"isShowTransfer"
:select=
"selection"
@
close=
"closeStuForm"
@
success=
"refreshStuList"
>
<transfer-order
v-if=
"isShowTransfer"
:select=
"selection"
@
close=
"closeStuForm"
@
success=
"refreshStuList"
>
</transfer-order>
</div>
</template>
<
script
>
import
studentForm
from
"./student-form"
;
import
studentRightForm
from
"./studentRight-form"
;
import
studentAddForm
from
"./studentAdd-form"
;
import
transferOrder
from
"./transfer-order"
export
default
{
props
:
{
dataList
:
{
type
:
Array
,
default
:
null
}
},
components
:
{
studentForm
,
studentRightForm
,
studentAddForm
,
transferOrder
},
data
()
{
return
{
columns
:
[
{
name
:
"StuIcon"
,
label
:
""
,
field
:
"StuIcon"
,
align
:
"left"
},
{
name
:
"StuName"
,
required
:
true
,
label
:
"昵称"
,
align
:
"left"
,
field
:
row
=>
row
.
StuName
},
{
name
:
"StuSex"
,
label
:
"性别"
,
field
:
"StuSex"
,
align
:
"left"
},
{
name
:
"StuBirth"
,
label
:
"出生日期"
,
field
:
"StuBirth"
,
align
:
"left"
},
{
name
:
"StuTel"
,
label
:
"手机号码"
,
field
:
"StuTel"
,
align
:
"left"
},
{
name
:
"CreateTypeStr"
,
label
:
"客户来源"
,
field
:
"CreateTypeStr"
,
align
:
"left"
},
{
name
:
"StuStageName"
,
label
:
"客户阶段"
,
field
:
"StuStageName"
,
align
:
"left"
},
{
name
:
"CreateTimeStr"
,
label
:
"创建时间"
,
field
:
"CreateTimeStr"
,
align
:
"left"
import
studentForm
from
"./student-form"
;
import
studentRightForm
from
"./studentRight-form"
;
import
studentAddForm
from
"./studentAdd-form"
;
import
transferOrder
from
"./transfer-order"
export
default
{
props
:
{
dataList
:
{
type
:
Array
,
default
:
null
}
},
components
:
{
studentForm
,
studentRightForm
,
studentAddForm
,
transferOrder
},
data
()
{
return
{
columns
:
[{
name
:
"StuIcon"
,
label
:
""
,
field
:
"StuIcon"
,
align
:
"left"
},
{
name
:
"StuName"
,
required
:
true
,
label
:
"昵称"
,
align
:
"left"
,
field
:
row
=>
row
.
StuName
},
{
name
:
"StuSex"
,
label
:
"性别"
,
field
:
"StuSex"
,
align
:
"left"
},
{
name
:
"StuTel"
,
label
:
"电话"
,
field
:
"StuTel"
,
align
:
"left"
},
{
name
:
"StuStageName"
,
label
:
"客户阶段"
,
field
:
"StuStageName"
,
align
:
"left"
},
{
name
:
"StuProfession"
,
label
:
"职业"
,
field
:
"StuProfession"
,
align
:
"left"
},
{
name
:
"StuEducationName"
,
label
:
"学历"
,
field
:
"StuEducationName"
,
align
:
"left"
},
{
name
:
"StuPurposeName"
,
label
:
"目的"
,
field
:
"StuPurposeName"
,
align
:
"left"
},
{
name
:
"CreateByName"
,
label
:
"负责人"
,
align
:
"left"
,
field
:
"CreateByName"
},
{
name
:
"AssistList"
,
label
:
"协同人"
,
align
:
"left"
,
field
:
"AssistList"
},
{
name
:
"CreateTypeStr"
,
label
:
"获取渠道"
,
field
:
"CreateTypeStr"
,
align
:
"left"
},
{
name
:
"StuSourceIdName"
,
label
:
"关联人"
,
field
:
"StuSourceIdName"
,
align
:
"left"
},
{
name
:
"VisitCount"
,
label
:
"到访次数"
,
field
:
"VisitCount"
,
align
:
"left"
},
{
name
:
"TrialLessonCount"
,
label
:
"试听次数"
,
field
:
"TrialLessonCount"
,
align
:
"left"
},
{
name
:
"CreateTimeStr"
,
label
:
"创建时间"
,
field
:
"CreateTimeStr"
,
align
:
"left"
}
],
pageMsg
:
{
rowsPerPage
:
12
},
{
name
:
"CreateByName"
,
label
:
"负责人"
,
align
:
"left"
,
field
:
"CreateByName"
}
],
pageMsg
:
{
rowsPerPage
:
12
},
loading
:
false
,
isShowStuForm
:
false
,
resetLoading
:
false
,
isShowStuRight
:
false
,
stuOption
:
null
,
isShowAdd
:
false
,
selection
:
[],
isShowTransfer
:
false
,
loading
:
false
,
isShowStuForm
:
false
,
resetLoading
:
false
,
isShowStuRight
:
false
,
stuOption
:
null
,
isShowAdd
:
false
,
selection
:
[],
isShowTransfer
:
false
,
};
},
created
()
{
this
.
initAuth
();
},
mounted
()
{},
methods
:
{
//初始化权限
initAuth
()
{},
//创建账号
createAccount
(
id
)
{
let
that
=
this
;
createStudentAccount
({
StuId
:
id
}).
then
(
res
=>
{
that
.
$q
};
},
created
()
{
this
.
initAuth
();
},
mounted
()
{},
methods
:
{
//初始化权限
initAuth
()
{},
//创建账号
createAccount
(
id
)
{
let
that
=
this
;
createStudentAccount
({
StuId
:
id
}).
then
(
res
=>
{
that
.
$q
.
dialog
({
title
:
"创建账号"
,
message
:
res
.
Message
,
persistent
:
true
,
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
})
.
onOk
(()
=>
{
that
.
getStudent
();
})
.
onCancel
(()
=>
{
that
.
getStudent
();
});
});
},
resetPw
(
id
)
{
let
that
=
this
;
this
.
$q
.
dialog
({
title
:
"
创建账号
"
,
message
:
res
.
Message
,
title
:
"
重置密码
"
,
message
:
"你正在进行重置密码行为,是否确认执行"
,
persistent
:
true
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
label
:
"确认
重置
"
,
flat
:
true
,
focus
:
true
}
})
.
onOk
(()
=>
{
that
.
getStudent
();
})
.
onCancel
(()
=>
{
that
.
getStudent
();
that
.
resetLoading
=
true
;
resetPassword
({
AccountType
:
4
,
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
;
});
});
});
},
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
:
4
,
AccountId
:
id
},
//删除客户资料
deleteStudentInfo
(
obj
)
{
let
that
=
this
;
var
str
=
obj
.
Status
==
1
?
"【禁用】"
:
"【启用】"
;
this
.
$q
.
dialog
({
title
:
str
+
"学员"
,
message
:
"你正在进行"
+
str
+
"学员行为,一旦执行无法找回,是否确认执行?"
,
persistent
:
true
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
})
.
then
(
res
=>
{
that
.
resetLoading
=
false
;
that
.
$q
.
dialog
({
title
:
"密码重置成功"
,
message
:
res
.
Message
,
persistent
:
true
,
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
.
onOk
(()
=>
{
that
.
resetLoading
=
true
;
deleteStudent
({
StuId
:
obj
.
StuId
,
Status
:
obj
.
Status
}).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
"数据操作成功!"
,
position
:
"top"
});
})
.
catch
(()
=>
{
that
.
resetLoading
=
false
;
});
});
},
//删除客户资料
deleteStudentInfo
(
obj
)
{
let
that
=
this
;
var
str
=
obj
.
Status
==
1
?
"【禁用】"
:
"【启用】"
;
this
.
$q
.
dialog
({
title
:
str
+
"学员"
,
message
:
"你正在进行"
+
str
+
"学员行为,一旦执行无法找回,是否确认执行?"
,
persistent
:
true
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
})
.
onOk
(()
=>
{
that
.
resetLoading
=
true
;
deleteStudent
({
StuId
:
obj
.
StuId
,
Status
:
obj
.
Status
}).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
"数据操作成功!"
,
position
:
"top"
this
.
getStudent
();
});
this
.
getStudent
();
})
.
onCancel
(()
=>
{
obj
.
Status
=
obj
.
Status
==
1
?
0
:
1
;
});
},
refreshStuList
()
{
this
.
$emit
(
"success"
);
},
EditStudent
(
obj
)
{
if
(
obj
)
{
this
.
stuOption
=
obj
;
}
else
{
this
.
stuOption
=
null
;
}
this
.
isShowAdd
=
true
;
},
closeStuForm
()
{
this
.
isShowStuForm
=
false
;
this
.
isShowStuRight
=
false
;
this
.
isShowAdd
=
false
;
this
.
isShowTransfer
=
false
;
},
//点击学生姓名弹出
getStuRight
(
obj
)
{
if
(
obj
)
{
this
.
stuOption
=
obj
;
}
else
{
this
.
stuOption
=
null
;
}
this
.
isShowStuRight
=
true
;
},
transferOrder
()
{
const
firstId
=
this
.
selection
[
0
].
CustomerId
const
flag
=
this
.
selection
.
every
(
e
=>
{
return
e
.
CustomerId
==
firstId
})
.
onCancel
(()
=>
{
obj
.
Status
=
obj
.
Status
==
1
?
0
:
1
;
});
},
refreshStuList
()
{
this
.
$emit
(
"success"
);
},
EditStudent
(
obj
)
{
if
(
obj
)
{
this
.
stuOption
=
obj
;
}
else
{
this
.
stuOption
=
null
;
}
this
.
isShowAdd
=
true
;
},
closeStuForm
()
{
this
.
isShowStuForm
=
false
;
this
.
isShowStuRight
=
false
;
this
.
isShowAdd
=
false
;
this
.
isShowTransfer
=
false
;
},
//点击学生姓名弹出
getStuRight
(
obj
)
{
if
(
obj
)
{
this
.
stuOption
=
obj
;
}
else
{
this
.
stuOption
=
null
;
}
this
.
isShowStuRight
=
true
;
},
transferOrder
(){
const
firstId
=
this
.
selection
[
0
].
CustomerId
const
flag
=
this
.
selection
.
every
(
e
=>
{
return
e
.
CustomerId
==
firstId
})
if
(
!
flag
){
this
.
$q
.
notify
({
if
(
!
flag
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`负责人不一致,请重新选择`
})
return
}
this
.
isShowTransfer
=
true
}
this
.
isShowTransfer
=
true
}
}
};
</
script
>
};
</
script
>
\ No newline at end of file
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