|
|
@@ -158,10 +158,14 @@
|
|
|
<server-form v-if="menuObj.index==2" ref="formRef" @reloadData="fetchData"></server-form>
|
|
|
<snap-form v-if="menuObj.index==3" ref="formRef" @reloadData="fetchData"></snap-form>
|
|
|
<device-door ref="deviceDoor"></device-door>
|
|
|
+ <el-dialog title="请选择要下发的设备" :visible.sync="deviceShow" :destroy-on-close="true" center :append-to-body="true" :modal-append-to-body="true" width="55%">
|
|
|
+ <device-door-simple-crud ref="deviceDoorSimpleCrud" @deleteFace="deleteFace"></device-door-simple-crud>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import deviceDoor from "@/components/device-door/device-door.vue"
|
|
|
+ import deviceDoorSimpleCrud from "@/components/device-door/comps/device-door-simple-crud.vue"
|
|
|
import {
|
|
|
getToken
|
|
|
} from '@/util/auth';
|
|
|
@@ -186,6 +190,7 @@
|
|
|
} from "@/api/estate/serveruser.js";
|
|
|
//抓拍记录
|
|
|
import snapForm from "../form/snap.vue"
|
|
|
+ //
|
|
|
import {
|
|
|
getList2 as getSnapList,
|
|
|
exportExcel
|
|
|
@@ -197,10 +202,12 @@
|
|
|
statistics
|
|
|
} from "@/api/estate/useraccesspermissions";
|
|
|
import dateTime from "@/util/dateTime.js"
|
|
|
+ import {deleteFace} from "@/api/estate/useraccesspermissions.js"
|
|
|
export default {
|
|
|
name: "face-card",
|
|
|
components: {
|
|
|
deviceDoor,
|
|
|
+ deviceDoorSimpleCrud,
|
|
|
staffForm,
|
|
|
guestForm,
|
|
|
serverForm,
|
|
|
@@ -216,13 +223,16 @@
|
|
|
name: '',
|
|
|
index: 0
|
|
|
},
|
|
|
- statuObj: {},
|
|
|
+ statusObj: {},
|
|
|
+ deviceShow: false,
|
|
|
+ selectedUser: null,
|
|
|
|
|
|
current: 1,
|
|
|
size: 17,
|
|
|
pageCount: 0,
|
|
|
list: [],
|
|
|
- dataList: [{
|
|
|
+ dataList: [
|
|
|
+ {
|
|
|
label: '待审核',
|
|
|
value: 0,
|
|
|
},
|
|
|
@@ -235,7 +245,8 @@
|
|
|
value: 0,
|
|
|
}
|
|
|
],
|
|
|
- operationList: [{
|
|
|
+ operationList: [
|
|
|
+ {
|
|
|
icon: 'el-icon-view',
|
|
|
name: '详情'
|
|
|
},
|
|
|
@@ -352,6 +363,34 @@
|
|
|
this.fetchData()
|
|
|
},
|
|
|
methods: {
|
|
|
+ deleteFace(deviceIds) {
|
|
|
+ if (this.$isEmpty(deviceIds)) {
|
|
|
+ this.$message.error('请选择要下发的设备')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ deviceIds: deviceIds.join(','),
|
|
|
+ userId: this.selectedUser.id,
|
|
|
+ };
|
|
|
+ let index = this.menuObj.index || 0
|
|
|
+ if (index == 0) {
|
|
|
+ //常驻人员
|
|
|
+ params.targetType = 1 //人脸入库(设备库)类型 1:白名单 2:访客 3:黑名单
|
|
|
+ params.userType = 'QYYG_' //用户类型,QYYG_:企业员工,FWY_:服务员,FK_:访客。ADMIN_:管理员
|
|
|
+ } else if (index == 1) {
|
|
|
+ //来访人员
|
|
|
+ params.targetType = 2
|
|
|
+ params.userType = 'FK_'
|
|
|
+ } else if (index == 2) {
|
|
|
+ //服务人员
|
|
|
+ params.targetType = 1
|
|
|
+ params.userType = 'FWY_'
|
|
|
+
|
|
|
+ deleteFace(params).then(res => {
|
|
|
+ console.log(res);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
handleExcel(type) {
|
|
|
window.open(`/api/cyzh-estate/snaprecord/exportExcel?${this.website.tokenHeader}=${getToken()}&type=${type}`);
|
|
|
},
|
|
|
@@ -376,13 +415,14 @@
|
|
|
},
|
|
|
dropdownClick(item, name) {
|
|
|
if (name == '详情') {
|
|
|
- this.$refs.formRef.showDialog(item)
|
|
|
+ this.$refs.formRef.showDialog(item);
|
|
|
} else if (name == '编辑') {
|
|
|
- this.$refs.formRef.showDialog(item, false)
|
|
|
+ this.$refs.formRef.showDialog(item, false);
|
|
|
} else if (name == '删除') {
|
|
|
- this.$refs.formRef.rowDel(item.id)
|
|
|
+ this.$refs.formRef.rowDel(item.id);
|
|
|
} else if (name == '禁用') {
|
|
|
- this.deleteUserFaceFromDevice(item.id)
|
|
|
+ this.deviceShow = true;
|
|
|
+ this.selectedUser = item;
|
|
|
}
|
|
|
},
|
|
|
//下发人脸
|
|
|
@@ -401,45 +441,41 @@
|
|
|
item.targetType=1
|
|
|
item.userType='FWY_'
|
|
|
}
|
|
|
- this.$refs.deviceDoor.showDialog(item)
|
|
|
- },
|
|
|
- //禁用人脸
|
|
|
- deleteUserFaceFromDevice(id, deviceIds) {
|
|
|
- this.$refs.formRef.deleteUserFaceFromDevice(id, deviceIds)
|
|
|
+ this.$refs.deviceDoor.showDialog(item, true, true);
|
|
|
},
|
|
|
actived(e) {
|
|
|
- this.resetPageParams()
|
|
|
- this.menuObj = e.menuObj
|
|
|
- this.statuObj = e.statusObj
|
|
|
- this.fetchData()
|
|
|
+ this.resetPageParams();
|
|
|
+ this.menuObj = e.menuObj;
|
|
|
+ this.statusObj = e.statusObj;
|
|
|
+ this.fetchData();
|
|
|
},
|
|
|
fetchData(params = {}) {
|
|
|
- this.loading = true
|
|
|
- let index = this.menuObj.index || 0
|
|
|
+ this.loading = true;
|
|
|
+ let index = this.menuObj.index || 0;
|
|
|
//获取统计数据
|
|
|
- this.getStatistics(index)
|
|
|
+ this.getStatistics(index);
|
|
|
//获取列表数据
|
|
|
if (index == 0) {
|
|
|
//常驻人员
|
|
|
- this.size = 17
|
|
|
- this.getStaffList(params)
|
|
|
+ this.size = 17;
|
|
|
+ this.getStaffList(params);
|
|
|
} else if (index == 1) {
|
|
|
//来访人员
|
|
|
- this.size = 17
|
|
|
- this.getGuestList(params)
|
|
|
+ this.size = 17;
|
|
|
+ this.getGuestList(params);
|
|
|
} else if (index == 2) {
|
|
|
//服务人员
|
|
|
- this.size = 17
|
|
|
- this.getServerList(params)
|
|
|
+ this.size = 17;
|
|
|
+ this.getServerList(params);
|
|
|
} else if (index == 3) {
|
|
|
//体温异常
|
|
|
- this.size = 23
|
|
|
- this.getSnapList(params)
|
|
|
+ this.size = 23;
|
|
|
+ this.getSnapList(params);
|
|
|
}
|
|
|
},
|
|
|
currentChange(current) {
|
|
|
- this.current = current
|
|
|
- this.fetchData()
|
|
|
+ this.current = current;
|
|
|
+ this.fetchData();
|
|
|
},
|
|
|
//获取数据统计
|
|
|
async getStatistics(type) {
|
|
|
@@ -474,7 +510,7 @@
|
|
|
async getSnapList(params) {
|
|
|
params.isHigh = false
|
|
|
let data = {}
|
|
|
- let index = this.statuObj.index
|
|
|
+ let index = this.statusObj.index
|
|
|
if (index == 1) {
|
|
|
//温度异常
|
|
|
params.isHigh = true
|
|
|
@@ -487,13 +523,13 @@
|
|
|
//获取服务人员列表
|
|
|
async getServerList(params) {
|
|
|
let data = {}
|
|
|
- let index = this.statuObj.index
|
|
|
+ let index = this.statusObj.index
|
|
|
if (index == 1 || index == 2) {
|
|
|
- params.type = this.statuObj.value
|
|
|
+ params.type = this.statusObj.value
|
|
|
data = (await getServerXFList(this.current, this.size, params)).data.data
|
|
|
data.records.forEach(item => {
|
|
|
//下发状态
|
|
|
- item.pushStatus = this.statuObj.value
|
|
|
+ item.pushStatus = this.statusObj.value
|
|
|
})
|
|
|
} else {
|
|
|
data = (await getServerList(this.current, this.size, params)).data.data
|
|
|
@@ -505,16 +541,16 @@
|
|
|
//获取访客人员列表
|
|
|
async getGuestList(params) {
|
|
|
let data = {}
|
|
|
- let index = this.statuObj.index
|
|
|
+ let index = this.statusObj.index
|
|
|
if (index == 4 || index == 5) {
|
|
|
- params.type = this.statuObj.value
|
|
|
+ params.type = this.statusObj.value
|
|
|
data = (await getGuestXFList(this.current, this.size, params)).data.data
|
|
|
data.records.forEach(item => {
|
|
|
//下发状态
|
|
|
- item.pushStatus = this.statuObj.value
|
|
|
+ item.pushStatus = this.statusObj.value
|
|
|
})
|
|
|
} else {
|
|
|
- params.checkState = this.statuObj.value
|
|
|
+ params.checkState = this.statusObj.value
|
|
|
data = (await getGuestList(this.current, this.size, params)).data.data
|
|
|
}
|
|
|
this.list = data.records
|
|
|
@@ -524,16 +560,16 @@
|
|
|
//获取常驻人员数据列表
|
|
|
async getStaffList(params) {
|
|
|
let data = {}
|
|
|
- let index = this.statuObj.index
|
|
|
+ let index = this.statusObj.index
|
|
|
if (index == 4 || index == 5) {
|
|
|
- params.type = this.statuObj.value
|
|
|
+ params.type = this.statusObj.value
|
|
|
data = (await getStaffXFList(this.current, this.size, params)).data.data
|
|
|
data.records.forEach(item => {
|
|
|
//下发状态
|
|
|
- item.pushStatus = this.statuObj.value
|
|
|
+ item.pushStatus = this.statusObj.value
|
|
|
})
|
|
|
} else {
|
|
|
- params.auditStatus = this.statuObj.value
|
|
|
+ params.auditStatus = this.statusObj.value
|
|
|
data = (await getStaffList(this.current, this.size, params)).data.data
|
|
|
}
|
|
|
this.list = data.records
|