|
81
|
staffTypeId: '',
|
|
82
|
// 员工类型列表
|
|
83
|
staffTypesList: [],
|
|
84
|
// 用户数据列表
|
|
85
|
userDataList: [],
|
|
86
|
// 当前页
|
|
87
|
page: 1,
|
|
88
|
// 当前页的数据个数
|
|
89
|
limit: 10,
|
|
90
|
// 数据总数
|
|
91
|
total: 100,
|
|
92
|
// 批量删除的设备id
|
|
93
|
deleteResourceToolId: [],
|
|
94
|
// 当前设备数据
|
|
95
|
currentDeviceData: {},
|
|
96
|
// 显示/隐藏新增设备对话框
|
|
97
|
addDeviceModal: false,
|
|
98
|
currentEditDevice: {}
|
|
99
|
}
|
|
100
|
},
|
|
101
|
created () {
|
|
102
|
this.getDeviceData()
|
|
103
|
this.getDeviceTypes()
|
|
104
|
},
|
|
105
|
methods: {
|
|
106
|
// 获取设备列表数据
|
|
107
|
async getDeviceData () {
|
|
108
|
|
|
109
|
},
|
|
110
|
// 向服务器发送请求获取设备类型列表数据
|
|
111
|
async getDeviceTypes () {
|
|
112
|
const res = await sysapi.getDeviceTypes()
|
|
113
|
if (res.status === 200) {
|
|
114
|
this.companyTypesList = res.data.data
|
|
115
|
} else {
|
|
116
|
this.$Message.danger('设备类型列表数据获取失败!')
|
|
117
|
}
|
|
118
|
},
|
|
119
|
// 查询数据
|
|
120
|
selectHandle () {
|
|
121
|
this.page = 1
|
|
122
|
this.getDeviceData()
|
|
123
|
},
|
|
124
|
// 重置查询数据
|
|
125
|
resetData () {
|
|
126
|
this.page = 1
|
|
127
|
this.companyTypeId = ''
|
|
128
|
this.staffTypeId = ''
|
|
129
|
this.departmentTypeId = ''
|
|
130
|
this.getDeviceData()
|
|
131
|
},
|
|
132
|
// 当前页改变 触发事件
|
|
133
|
onChange (page) {
|
|
134
|
this.page = page
|
|
135
|
this.getDeviceData()
|
|
136
|
},
|
|
137
|
// 当前页数据总数改变 触发事件
|
|
138
|
onSizeChange (pageSize) {
|
|
139
|
this.limit = pageSize
|
|
140
|
this.getDeviceData()
|
|
141
|
},
|
|
142
|
// 删除数据
|
|
143
|
deleteDeviceData (row) {
|
|
144
|
this.$Confirm.confirm({
|
|
145
|
title: '正在准备删除...',
|
|
146
|
content: '<p>确定要删除?</p><p>删除后将无法还原!</p>',
|
|
147
|
ok: async () => {
|
|
148
|
const res = await sysapi.deleteDeviceData({ resourceToolId: row.resourceToolId })
|
|
149
|
if (res.status === 200) {
|
|
150
|
this.getDeviceData()
|
|
151
|
this.$Message.success('删除成功!')
|
|
152
|
} else {
|
|
153
|
this.$Message.danger('删除失败!')
|
|
154
|
}
|
|
155
|
},
|
|
156
|
cancel: () => {
|
|
157
|
this.$Message.info('已取消删除!')
|
|
158
|
}
|
|
159
|
})
|
|
160
|
},
|
|
161
|
// 当复选框发生改变时 触发事件
|
|
162
|
selectChange (data) {
|
|
163
|
const arr = []
|
|
164
|
data.forEach(item => arr.push(item.resourceToolId))
|
|
165
|
this.deleteResourceToolId = arr
|
|
166
|
},
|
|
167
|
// 批量删除数据
|
|
168
|
multDeleteDeviceData () {
|
|
169
|
if (this.deleteResourceToolId.length === 0) {
|
|
170
|
return this.$Message.warning('请选择要删除的数据!')
|
|
171
|
}
|
|
172
|
this.$Confirm.confirm({
|
|
173
|
title: '正在准备删除...',
|
|
174
|
content: '<p>确定要删除?</p><p>删除后将无法还原!</p>',
|
|
175
|
ok: async () => {
|
|
176
|
const res = await sysapi.deleteDeviceData({ resourceToolId: this.deleteResourceToolId })
|
|
177
|
if (res.status === 200) {
|
|
178
|
this.getDeviceData()
|
|
179
|
this.$Message.success('删除成功!')
|
|
180
|
} else {
|
|
181
|
this.$Message.danger('删除失败!')
|
|
182
|
}
|
|
183
|
},
|
|
184
|
cancel: () => {
|
|
185
|
this.$Message.info('已取消删除!')
|
|
186
|
}
|
|
187
|
})
|
|
188
|
},
|
|
189
|
// 获取设备详情数据
|
|
190
|
async getDeviceInfo (id) {
|
|
191
|
const res = await sysapi.getDeviceInfo(id)
|
|
192
|
if (res.status === 200) {
|
|
193
|
this.currentDeviceData = res.data
|
|
194
|
} else {
|
|
195
|
this.$Message.danger('设备详情数据获取失败!')
|
|
196
|
}
|
|
197
|
},
|
|
198
|
// 显示新增设备对话框
|
|
199
|
showAddDeviceModal () {
|
|
200
|
this.addDeviceModal = true
|
|
201
|
},
|
|
202
|
async editDeviceData (id) {
|
|
203
|
const res = await sysapi.getDeviceInfo(id)
|
|
204
|
if (res.status === 200) {
|
|
205
|
this.currentEditDevice = res.data
|
|
206
|
} else {
|
|
207
|
this.$Message.danger('设备数据获取失败!')
|
|
208
|
}
|
|
209
|
this.addDeviceModal = true
|
|
210
|
}
|
|
211
|
}
|
|
212
|
}
|
|
213
|
</script>
|
|
214
|
|
|
215
|
<style lang="scss">
|
|
216
|
.usermana-page {
|
|
217
|
.card-block {
|
|
218
|
padding: 0px 24px !important;
|
|
219
|
}
|
|
220
|
.tabs {
|
|
221
|
overflow: inherit;
|
|
222
|
}
|
|
223
|
.tabs-list {
|
|
224
|
.tabs-list__content {
|
|
225
|
display: flex;
|
|
226
|
justify-content: flex-end;
|
|
227
|
margin-top: -10px;
|
|
228
|
.tabs-list__nav {
|
|
229
|
height: 32px;
|
|
230
|
line-height: 16px;
|
|
231
|
}
|
|
232
|
}
|
|
233
|
.tabs-tab {
|
|
234
|
margin: 0;
|
|
235
|
padding: 0 25px;
|
|
236
|
font-size: 14px;
|
|
237
|
}
|
|
238
|
.tabs-tab.checked {
|
|
239
|
border-bottom: 3px solid #2d98ff;
|
|
240
|
}
|
|
241
|
}
|
|
242
|
.select-button-box {
|
|
243
|
padding: 0;
|
|
244
|
button {
|
|
245
|
margin-left: 5px;
|
|
246
|
}
|
|
247
|
}
|
|
248
|
.select-confidtion-box {
|
|
249
|
margin: 24px 0;
|
|
250
|
.col-3 {
|
|
251
|
padding: 0;
|
|
252
|
}
|
|
253
|
}
|
|
254
|
.function-button-box {
|
|
255
|
line-height: 32px;
|
|
256
|
button {
|
|
257
|
margin-right: 12px;
|
|
258
|
i {
|
|
259
|
line-height: 32px;
|
|
260
|
margin-right: 8px;
|
|
261
|
}
|
|
262
|
}
|
|
263
|
a {
|
|
264
|
color: #0089d4;
|
|
265
|
i {
|
|
266
|
line-height: 32px !important;
|
|
267
|
margin-left: 4px;
|
|
268
|
}
|
|
269
|
}
|
|
270
|
}
|
|
271
|
.table-box {
|
|
272
|
margin: 20px 0;
|
|
273
|
}
|
|
274
|
.table-pager {
|
|
275
|
display: flex;
|
|
276
|
justify-content: flex-end;
|
|
277
|
}
|
|
278
|
}
|
|
279
|
</style>
|
|
@ -1,5 +1,5 @@
|
1
|
1
|
<template>
|
2
|
|
<t-modal :visibled.sync="visibled" :mask-closable="false" width="600px" height="500px">
|
|
2
|
<t-modal :closable="false" :visibled.sync="visibled" :mask-closable="false" width="600px" height="500px">
|
3
|
3
|
<template slot="header">
|
4
|
4
|
<div class="approval-modal-title">工单审批</div>
|
5
|
5
|
</template>
|
|
@ -1,5 +1,5 @@
|
1
|
1
|
<template>
|
2
|
|
<t-modal :visibled.sync="cardReplacementModal" :mask-closable="false" width="600px" height="500px">
|
|
2
|
<t-modal :closable="false" :visibled.sync="cardReplacementModal" :mask-closable="false" width="600px" height="500px">
|
3
|
3
|
<template slot="header">
|
4
|
4
|
<div class="card-modal-title">新增补卡</div>
|
5
|
5
|
</template>
|
|
@ -1,5 +1,5 @@
|
1
|
1
|
<template>
|
2
|
|
<t-modal :visibled.sync="fieldServiceModal" :mask-closable="false" width="600px" height="500px">
|
|
2
|
<t-modal :closable="false" :visibled.sync="fieldServiceModal" :mask-closable="false" width="600px" height="500px">
|
3
|
3
|
<template slot="header">
|
4
|
4
|
<div class="field-modal-title">新增外勤</div>
|
5
|
5
|
</template>
|
|
@ -1,5 +1,5 @@
|
1
|
1
|
<template>
|
2
|
|
<t-modal :visibled.sync="visibled" :mask-closable="false" width="600px" height="500px">
|
|
2
|
<t-modal :closable="false" :visibled.sync="visibled" :mask-closable="false" width="600px" height="500px">
|
3
|
3
|
<template slot="header">
|
4
|
4
|
<div class="leave-modal-title">导入工单</div>
|
5
|
5
|
</template>
|
|
@ -1,6 +1,6 @@
|
1
|
1
|
<template>
|
2
|
2
|
<!-- 请假对话框 -->
|
3
|
|
<t-modal :visibled.sync="visibled" :mask-closable="false" width="600px" height="500px">
|
|
3
|
<t-modal :visibled.sync="visibled" :mask-closable="false" :closable="false" width="600px" height="500px">
|
4
|
4
|
<template slot="header">
|
5
|
5
|
<div class="leave-modal-title">新增请假</div>
|
6
|
6
|
</template>
|
|
@ -1,5 +1,5 @@
|
1
|
1
|
<template>
|
2
|
|
<t-modal :visibled.sync="overtimeModal" :mask-closable="false" width="600px" height="500px">
|
|
2
|
<t-modal :closable="false" :visibled.sync="overtimeModal" :mask-closable="false" width="600px" height="500px">
|
3
|
3
|
<template slot="header">
|
4
|
4
|
<div class="work-modal-title">新增加班</div>
|
5
|
5
|
</template>
|
|
@ -133,22 +133,15 @@ export const constantRoutes = [
|
133
|
133
|
]
|
134
|
134
|
},
|
135
|
135
|
{
|
136
|
|
path: '/userRights',
|
|
136
|
path: '/usermana',
|
137
|
137
|
component: Layout,
|
138
|
|
meta: { title: '用户权限', icon: 'lock' },
|
139
|
|
redirect: '/userRights/usermana',
|
|
138
|
meta: { icon: 'lock' },
|
140
|
139
|
children: [
|
141
|
140
|
{
|
142
|
|
name: 'organizationmana',
|
143
|
|
path: 'organizationmana',
|
144
|
|
component: () => import(/* webpackChunkName: "user_rights" */ './modules/userRights/organizationmana'),
|
145
|
|
meta: { title: '组织管理' }
|
146
|
|
},
|
147
|
|
{
|
148
|
141
|
name: 'usermana',
|
149
|
|
path: 'usermana',
|
150
|
|
component: () => import(/* webpackChunkName: "user_rights" */ './modules/userRights/usermana'),
|
151
|
|
meta: { title: '用户管理' }
|
|
142
|
path: '',
|
|
143
|
component: () => import(/* webpackChunkName: "user_rights" */ './modules/usermana'),
|
|
144
|
meta: { title: '用户管理', icon: 'lock' }
|
152
|
145
|
}
|
153
|
146
|
|
154
|
147
|
]
|