|
@@ -52,28 +52,10 @@
|
52
|
52
|
<el-tooltip content="同步数据至各抓拍机" placement="top">
|
53
|
53
|
<el-button type="warn" class="right-space" @click="downFace" :loading="optLoading.sync" :disabled="!(memProfile.personId && memProfile.avatar)">同步</el-button>
|
54
|
54
|
</el-tooltip>
|
55
|
|
- <!--
|
56
|
|
- <el-tooltip content="下发数据至各门禁" placement="top">
|
57
|
|
- <el-button type="success" @click="showDispatchDialog = true" :disabled="!(memProfile.personId && memProfile.avatar)">下发</el-button>
|
58
|
|
- </el-tooltip>
|
59
|
|
- <el-tooltip content="禁用各门禁权限" placement="top">
|
60
|
|
- <el-button type="danger" class="right-space" :loading="optLoading.forbid" :disabled="!(memProfile.personId && memProfile.avatar)" @click="deleteFromGuard">禁用</el-button>
|
61
|
|
- </el-tooltip>
|
62
|
|
- -->
|
63
|
55
|
<el-button @click="onCancel">取消</el-button>
|
64
|
56
|
</el-row>
|
65
|
57
|
</el-form-item>
|
66
|
58
|
</el-form>
|
67
|
|
- <el-dialog
|
68
|
|
- title="提示"
|
69
|
|
- :visible.sync="showDispatchDialog"
|
70
|
|
- width="30%"
|
71
|
|
- center>
|
72
|
|
- <el-select v-model="guardId" placeholder="请选择门禁" class="right-space">
|
73
|
|
- <el-option v-for="item in guards" :label="item.faceName" :value="item.faceId" :key="item.faceId"></el-option>
|
74
|
|
- </el-select>
|
75
|
|
- <el-button type="primary" :loading="optLoading.toGuard" @click="addToGuard">确定</el-button>
|
76
|
|
- </el-dialog>
|
77
|
59
|
</el-tab-pane>
|
78
|
60
|
<el-tab-pane label="来访记录" name="visiting">
|
79
|
61
|
<visitinglog :person="memProfile.personId" :sales-list="salesList" @change="handleLogUpdate" />
|
|
@@ -101,13 +83,10 @@ export default {
|
101
|
83
|
imgurl: '',
|
102
|
84
|
optLoading: {
|
103
|
85
|
sync: false,
|
104
|
|
- toGuard: false,
|
105
|
|
- forbid: false,
|
106
|
86
|
},
|
107
|
87
|
activeName: 'detail',
|
108
|
88
|
logInfo: {},
|
109
|
89
|
showDispatchDialog: false,
|
110
|
|
- guardId: null,
|
111
|
90
|
}
|
112
|
91
|
},
|
113
|
92
|
computed: {
|
|
@@ -117,7 +96,6 @@ export default {
|
117
|
96
|
...mapMemberState({
|
118
|
97
|
detail: x => x.detail,
|
119
|
98
|
// logs: x => x.visitingLog,
|
120
|
|
- guards: x => x.guards,
|
121
|
99
|
}),
|
122
|
100
|
...mapUserState({
|
123
|
101
|
salesList: x => (x.list || {}).records || [],
|
|
@@ -144,9 +122,6 @@ export default {
|
144
|
122
|
'addPerson',
|
145
|
123
|
'editPerson',
|
146
|
124
|
'dispatchFace',
|
147
|
|
- 'dispatchGuard',
|
148
|
|
- 'forbidGuard',
|
149
|
|
- 'getGuards',
|
150
|
125
|
]),
|
151
|
126
|
...mapUserActions([
|
152
|
127
|
'getSysUserList',
|
|
@@ -216,40 +191,9 @@ export default {
|
216
|
191
|
_that.optLoading.sync = false
|
217
|
192
|
})
|
218
|
193
|
},
|
219
|
|
- addToGuard () {
|
220
|
|
- this.optLoading.toGuard = true
|
221
|
|
-
|
222
|
|
- this.dispatchGuard({
|
223
|
|
- id: this.memProfile.personId,
|
224
|
|
- faceId: this.guardId,
|
225
|
|
- }).then(() => {
|
226
|
|
- this.$message('下发成功')
|
227
|
|
- this.optLoading.toGuard = false
|
228
|
|
- this.showDispatchDialog = false
|
229
|
|
- }).catch(() => {
|
230
|
|
- this.$message.error('下发失败')
|
231
|
|
- this.optLoading.toGuard = false
|
232
|
|
- // this.showDispatchDialog = false
|
233
|
|
- })
|
234
|
|
- },
|
235
|
|
- deleteFromGuard () {
|
236
|
|
- this.optLoading.forbid = true
|
237
|
|
-
|
238
|
|
- this.forbidGuard({
|
239
|
|
- id: this.memProfile.personId}
|
240
|
|
- ).then(() => {
|
241
|
|
- this.$message('禁用成功')
|
242
|
|
- this.optLoading.forbid = false
|
243
|
|
- }).catch(() => {
|
244
|
|
- this.$message.error('设置失败')
|
245
|
|
- this.optLoading.forbid = false
|
246
|
|
- })
|
247
|
|
- },
|
248
|
194
|
initData () {
|
249
|
195
|
this.activeName = this.$route.query.tab || this.activeName
|
250
|
196
|
|
251
|
|
- this.getGuards()
|
252
|
|
-
|
253
|
197
|
this.getSysUserList({ pageNum: 1, pageSize: 999, isSales: 1 })
|
254
|
198
|
|
255
|
199
|
this.getList({
|