张延森 6 年前
父节点
当前提交
8215b5bc80
共有 1 个文件被更改,包括 0 次插入56 次删除
  1. 0
    56
      src/views/person/edit.vue

+ 0
- 56
src/views/person/edit.vue 查看文件

52
             <el-tooltip content="同步数据至各抓拍机" placement="top">
52
             <el-tooltip content="同步数据至各抓拍机" placement="top">
53
               <el-button type="warn" class="right-space" @click="downFace" :loading="optLoading.sync" :disabled="!(memProfile.personId && memProfile.avatar)">同步</el-button>
53
               <el-button type="warn" class="right-space" @click="downFace" :loading="optLoading.sync" :disabled="!(memProfile.personId && memProfile.avatar)">同步</el-button>
54
             </el-tooltip>
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
             <el-button @click="onCancel">取消</el-button>
55
             <el-button @click="onCancel">取消</el-button>
64
           </el-row>
56
           </el-row>
65
         </el-form-item>
57
         </el-form-item>
66
       </el-form>
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
     </el-tab-pane>
59
     </el-tab-pane>
78
     <el-tab-pane label="来访记录" name="visiting">
60
     <el-tab-pane label="来访记录" name="visiting">
79
       <visitinglog :person="memProfile.personId" :sales-list="salesList" @change="handleLogUpdate" />
61
       <visitinglog :person="memProfile.personId" :sales-list="salesList" @change="handleLogUpdate" />
101
       imgurl: '',
83
       imgurl: '',
102
       optLoading: {
84
       optLoading: {
103
         sync: false,
85
         sync: false,
104
-        toGuard: false,
105
-        forbid: false,
106
       },
86
       },
107
       activeName: 'detail',
87
       activeName: 'detail',
108
       logInfo: {},
88
       logInfo: {},
109
       showDispatchDialog: false,
89
       showDispatchDialog: false,
110
-      guardId: null,
111
     }
90
     }
112
   },
91
   },
113
   computed: {
92
   computed: {
117
     ...mapMemberState({
96
     ...mapMemberState({
118
       detail: x => x.detail,
97
       detail: x => x.detail,
119
       // logs: x => x.visitingLog,
98
       // logs: x => x.visitingLog,
120
-      guards: x => x.guards,
121
     }),
99
     }),
122
     ...mapUserState({
100
     ...mapUserState({
123
       salesList: x => (x.list || {}).records || [],
101
       salesList: x => (x.list || {}).records || [],
144
       'addPerson',
122
       'addPerson',
145
       'editPerson',
123
       'editPerson',
146
       'dispatchFace',
124
       'dispatchFace',
147
-      'dispatchGuard',
148
-      'forbidGuard',
149
-      'getGuards',
150
     ]),
125
     ]),
151
     ...mapUserActions([
126
     ...mapUserActions([
152
       'getSysUserList',
127
       'getSysUserList',
216
         _that.optLoading.sync = false
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
     initData () {
194
     initData () {
249
       this.activeName = this.$route.query.tab || this.activeName
195
       this.activeName = this.$route.query.tab || this.activeName
250
 
196
 
251
-      this.getGuards()
252
-
253
       this.getSysUserList({ pageNum: 1, pageSize: 999, isSales: 1 })
197
       this.getSysUserList({ pageNum: 1, pageSize: 999, isSales: 1 })
254
 
198
 
255
       this.getList({
199
       this.getList({