Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
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
new-sing
admin-base
Commits
7eac8ec7
Commit
7eac8ec7
authored
Aug 02, 2019
by
linking2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备监管记录
parent
679b5532
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
181 additions
and
230 deletions
+181
-230
teacherPeriodsConversionList.vue
...omponents/conversionList/teacherPeriodsConversionList.vue
+0
-1
staff.vue
src/components/system/staff.vue
+11
-3
staffDialog.vue
src/components/system/staffDialog.vue
+0
-226
staffRecord.vue
src/components/system/staffRecord.vue
+155
-0
api.js
src/service/api.js
+4
-0
menuList.js
src/util/menuList.js
+11
-0
No files found.
src/components/conversionList/teacherPeriodsConversionList.vue
View file @
7eac8ec7
...
...
@@ -255,7 +255,6 @@ export default {
];
}
},
propertyList
:
[],
spanArr
:
[],
contentSpanArr
:
[],
searchFrom
:
{
...
...
src/components/system/staff.vue
View file @
7eac8ec7
...
...
@@ -81,9 +81,7 @@
</el-table-column>
</el-table>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
<el-dialog
:title=
"dialog.title"
:visible
.
sync=
"dialog.show"
>
<el-dialog
:title=
"dialog.title"
:visible
.
sync=
"dialog.show"
width=
"500px"
>
<el-form
ref=
"dialogForm"
:rules=
"dialog.form.rules"
:model=
"dialog.form"
label-width=
"100px"
>
<el-form-item
label=
"真实姓名:"
prop=
"name"
>
...
...
@@ -323,6 +321,12 @@
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.el-form {
.el-form-item:last-child {
margin-bottom: 0;
}
}
.avatar {
width: 50px;
margin-right: 5px;
...
...
@@ -355,4 +359,8 @@
justify-content
:
flex-start
;
align-items
:
center
;
}
.page-div
{
padding-top
:
20px
;
}
</
style
>
src/components/system/staffDialog.vue
deleted
100644 → 0
View file @
679b5532
<
template
>
<el-dialog
title=
"添加员工"
center
append-to-body
:visible
.
sync=
"show"
width=
"800px"
>
<div
v-loading=
"loading"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
>
<el-row>
<el-col
:span=
"4"
><label>
Key
</label></el-col>
<el-col
:span=
"8"
>
<el-form-item
prop=
"key"
>
<el-input
v-model=
"form.key"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"4"
><label>
关键词
</label></el-col>
<el-col
:span=
"8"
>
<el-form-item
prop=
"value"
>
<el-input
v-model=
"form.value"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"4"
><label>
描述
</label></el-col>
<el-col
:span=
"8"
>
<el-form-item
prop=
"desc"
>
<el-input
v-model=
"form.desc"
type=
"textarea"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"save"
>
确 定
</el-button>
</span>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
updateConfigApi
,
saveConfigApi
}
from
"../../service/api"
;
import
{
TEACHERTYPE
}
from
"../../util/wordbook"
;
import
page
from
'../framework/page'
export
default
{
name
:
"dialogObj"
,
props
:[
'dialogObj'
],
data
(){
return
{
show
:
false
,
id
:
''
,
loading
:
true
,
form
:{
key
:
''
,
value
:
''
,
desc
:
''
},
mediaList
:
[],
rules
:{
value
:[
{
required
:
true
,
message
:
'请输入关键词'
,
trigger
:
'change'
}
],
desc
:[
{
required
:
true
,
message
:
'请输入描述'
,
trigger
:
'change'
}
],
key
:[
{
required
:
true
,
message
:
'请输入Key'
,
trigger
:
'change'
}
]
}
}
},
components
:{
page
},
methods
:{
save
(){
if
(
this
.
dialogObj
.
id
){
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
){
this
.
$confirm
(
'此操作将修改该配置?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
updateConfigApi
(
this
.
id
,
this
.
form
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
this
.
$emit
(
"reflash"
);
this
.
show
=
false
;
})
})
}
});
}
else
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
){
this
.
$confirm
(
'此操作将添加新配置?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
saveConfigApi
(
this
.
form
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'新增成功!'
});
this
.
$emit
(
"reflash"
);
this
.
show
=
false
;
})
})
}
});
}
},
initDialog
(){
this
.
show
=
this
.
dialogObj
.
show
;
if
(
this
.
dialogObj
.
id
)
{
this
.
id
=
this
.
dialogObj
.
id
;
}
this
.
form
.
key
=
this
.
dialogObj
.
key
;
this
.
form
.
value
=
this
.
dialogObj
.
value
;
this
.
form
.
desc
=
this
.
dialogObj
.
desc
;
this
.
loading
=
false
}
},
watch
:{
dialogObj
:{
handler
:
function
()
{
this
.
loading
=
true
;
this
.
initDialog
()
},
deep
:
true
},
show
(
value
){
this
.
$emit
(
"changeShow"
,
value
);
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
/*.el-col {*/
/*height: 50px;*/
/*text-align: center;*/
/*margin-bottom: 20px;*/
/*line-height: 40px;*/
/*.el-select{*/
/*width: 100%;*/
/*}*/
/*img{*/
/*width: 50px;*/
/*border-radius: 100px;*/
/*}*/
/*label{*/
/*color: #5982e6;*/
/*}*/
/*}*/
.dialog-footer{
display: block;
text-align: center;
margin-top: 30px;
}
.msg_sender_wrp {
display: flex;
flex-flow: row wrap;
justify-content: flex-start;
align-items: center;
/*position: absolute;*/
/*left: 100%;*/
/*top: 50%;*/
width: 500px;
/*z-index: 500;*/
/*-ms-transform: translateY(-50%);*/
/*transform: translateY(-50%);*/
/*background: #FFFFFF;*/
/*box-shadow: 0 1px 20px 0 #E4E8EB;*/
/*border-radius: 2px;*/
}
.el-icon-circle-plus-outline {
font-size: 28px;
}
.weui-desktop-msg-sender__tabs {
line-height: 38px;
background-color: #FFFFFF;
}
ul, ol {
padding-left: 0;
list-style-type: none;
}
.weui-desktop-msg-sender__tab {
padding: 0 15px;
float: left;
cursor: pointer;
}
.weui-desktop-msg-sender__tab_appmsg:before {
background: transparent url(https://mp.weixin.qq.com/mpres/en_US/htmledition/pages/modules/msg_sender/svg/default/sender_appmsg3f92fe.svg) no-repeat 0 0;
}
.weui-desktop-msg-sender__tab:before {
content: " ";
display: inline-block;
width: 22px;
height: 20px;
vertical-align: middle;
margin: -0.2em 5px 0 0;
}
.weui-desktop-msg-sender__tab_text:before {
background: transparent url(https://mp.weixin.qq.com/mpres/en_US/htmledition/pages/modules/msg_sender/svg/default/sender_text3f92fe.svg) no-repeat 0 0;
}
.weui-desktop-msg-sender__tab_img:before {
background: transparent url(https://mp.weixin.qq.com/mpres/en_US/htmledition/pages/modules/msg_sender/svg/default/sender_img3f92fe.svg) no-repeat 0 0;
}
.weui-desktop-msg-sender__tab_audio:before {
background: transparent url(https://mp.weixin.qq.com/mpres/en_US/htmledition/pages/modules/msg_sender/svg/default/sender_audio3f92fe.svg) no-repeat 0 0;
}
.weui-desktop-msg-sender__tab_video:before {
background: transparent url(https://mp.weixin.qq.com/mpres/en_US/htmledition/pages/modules/msg_sender/svg/default/sender_video3f92fe.svg) no-repeat 0 0;
}
</
style
>
src/components/system/staffRecord.vue
0 → 100644
View file @
7eac8ec7
<
template
>
<div
class=
"user"
v-loading=
"loading"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"80px"
inline
>
<el-form-item
label=
"设备名称"
>
<el-select
filterable
placeholder=
"请选择"
clearable
v-model=
"searchFrom.teacher_id"
@
change=
"getData"
:disabled=
"!teacherList.length"
>
<el-option
v-for=
"(data,index) in teacherList"
:key=
"index"
:label=
"data.name"
:value=
"data.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"顾问名称"
>
<el-select
filterable
placeholder=
"请选择"
clearable
v-model=
"searchFrom.staff_id"
@
change=
"getData"
:disabled=
"!staffList.length"
>
<el-option
v-for=
"(data,index) in staffList"
:key=
"index"
:label=
"data.name"
:value=
"data.id"
>
</el-option>
</el-select>
</el-form-item>
<!--
<el-form-item
label=
"入职日期"
>
<el-date-picker
v-model=
"startTime"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00','23:59:59']"
@
change=
"onSearch"
>
</el-date-picker>
</el-form-item>
-->
<el-form-item>
<el-button
@
click=
"getData"
type=
"primary"
plain
>
搜索
</el-button>
</el-form-item>
</el-form>
<el-tabs
v-model=
"searchFrom.type"
type=
"card"
style=
"background: white;padding-top: 10px"
@
tab-click=
"getData"
>
<el-tab-pane
label=
"全部使用记录"
name=
"-1"
></el-tab-pane>
<el-tab-pane
label=
"当前使用记录"
name=
"1"
></el-tab-pane>
<el-tab-pane
label=
"历史使用记录"
name=
"2"
></el-tab-pane>
</el-tabs>
<el-table
:data=
"tableData"
>
<el-table-column
prop=
"id"
label=
"ID"
></el-table-column>
<el-table-column
prop=
"teacher_name"
label=
"设备名称"
></el-table-column>
<el-table-column
prop=
"staff_name"
label=
"当前顾问"
></el-table-column>
<el-table-column
prop=
"start_at"
label=
"设备开始使用时间"
></el-table-column>
<el-table-column
label=
"设备使用结束时间"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
over_at
==
'0000-00-00 00:00:00'
?
'-'
:
scope
.
row
.
over_at
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"created_at"
label=
"创建时间"
></el-table-column>
</el-table>
<page
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</div>
</template>
<
script
>
import
{
getStaffRecordApi
,
getTeacherListApi
,
getStaffListApi
}
from
"../../service/api"
;
import
page
from
'../framework/page'
export
default
{
name
:
"index"
,
data
()
{
return
{
searchFrom
:
{
type
:
'-1'
,
teacher_id
:
''
,
staff_id
:
''
},
teacherList
:
[],
staffList
:
[],
tableData
:
[],
total
:
0
,
nowPage
:
1
,
limit
:
10
,
loading
:
false
}
},
components
:
{
page
},
mounted
()
{
this
.
getTeacherList
();
this
.
getStaffList
();
this
.
getData
()
},
methods
:
{
getTeacherList
()
{
let
json
=
{
page
:
1
,
limit
:
1000
};
getTeacherListApi
(
json
).
then
(
res
=>
{
this
.
teacherList
=
res
.
list
;
});
},
getStaffList
()
{
let
json
=
{
page
:
1
,
limit
:
1000
};
getStaffListApi
(
json
).
then
(
res
=>
{
this
.
staffList
=
res
.
list
;
});
},
getData
()
{
let
json
=
{
limit
:
this
.
limit
,
page
:
this
.
nowPage
,
};
this
.
searchFrom
.
teacher_id
?
json
.
teacher_id
=
this
.
searchFrom
.
teacher_id
:
''
;
this
.
searchFrom
.
staff_id
?
json
.
staff_id
=
this
.
searchFrom
.
staff_id
:
''
;
this
.
searchFrom
.
type
!=-
1
?
json
.
type
=
this
.
searchFrom
.
type
:
''
;
getStaffRecordApi
(
json
).
then
(
res
=>
{
this
.
tableData
=
res
.
list
;
this
.
total
=
res
.
total
});
},
onSearch
(){
this
.
getData
();
},
onPageChange
(
val
)
{
this
.
nowPage
=
val
this
.
getData
()
},
onSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
getData
()
},
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.user {
height: 100%;
overflow: auto;
padding: 20px 0;
.btn-content {
text-align: center;
}
.page-div {
padding-top: 20px;
}
}
</
style
>
src/service/api.js
View file @
7eac8ec7
...
...
@@ -1270,3 +1270,7 @@ export const postStaffListApi = function (json) {
export
const
putStaffListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
_baseUrl
}
api/admin/staff/edit/
${
json
.
id
}
`
,
json
)
};
// 设备监管记录
export
const
getStaffRecordApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/staff/relation/list`
,
json
)
};
src/util/menuList.js
View file @
7eac8ec7
...
...
@@ -619,6 +619,17 @@ export default [{
component
:
e
=>
require
([
'@/components/smsRecord'
],
e
),
}
},
{
value
:
'设备监管记录'
,
routerName
:
'staffRecord'
,
path
:
'/staffRecord'
,
cover
:
'10-7'
,
router
:
{
path
:
'/staffRecord'
,
name
:
'staffRecord'
,
component
:
e
=>
require
([
'@/components/system/staffRecord'
],
e
),
}
},
{
value
:
'员工管理'
,
routerName
:
'staff'
,
...
...
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