|
|
@@ -27,7 +27,7 @@
|
|
|
<!--人脸信息-->
|
|
|
<div class="face-top">
|
|
|
<div style="display: flex">
|
|
|
- <el-image class="img" fit="cover" :src="handeData(item).img">
|
|
|
+ <el-image class="img" fit="cover" @error="item.imgError=true" :src="handeData(item).img">
|
|
|
<img slot="error" class="img"
|
|
|
src="https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"></img>
|
|
|
</el-image>
|
|
|
@@ -75,7 +75,7 @@
|
|
|
|
|
|
|
|
|
<el-button v-else-if="handelStatus(item).txt == '审核通过' || menuObj.index==2"
|
|
|
- @click.stop="pushFaceToDevice(item.id)" size="mini" round type="primary"
|
|
|
+ @click.stop="showDeviceDoorDialog(item)" size="mini" round type="primary"
|
|
|
style="padding: 4px 8px;font-size: 12px;font-weight: 300">
|
|
|
<span v-if="item.pushStatus == 0">下发人脸</span>
|
|
|
<span v-if="item.pushStatus == 1">重新下发</span>
|
|
|
@@ -157,10 +157,14 @@
|
|
|
<guest-form v-if="menuObj.index==1" ref="formRef" @reloadData="fetchData"></guest-form>
|
|
|
<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>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- import {getToken} from '@/util/auth';
|
|
|
+ import deviceDoor from "@/components/device-door/device-door.vue"
|
|
|
+ import {
|
|
|
+ getToken
|
|
|
+ } from '@/util/auth';
|
|
|
import website from '@/config/website';
|
|
|
//常驻人员
|
|
|
import staffForm from "../form/staff.vue"
|
|
|
@@ -196,6 +200,7 @@
|
|
|
export default {
|
|
|
name: "face-card",
|
|
|
components: {
|
|
|
+ deviceDoor,
|
|
|
staffForm,
|
|
|
guestForm,
|
|
|
serverForm,
|
|
|
@@ -278,18 +283,22 @@
|
|
|
let index = this.menuObj.index || 0
|
|
|
switch (index) {
|
|
|
case 0:
|
|
|
+ //下发人脸所需
|
|
|
+ data.userFace = data.face
|
|
|
obj.img = data.face
|
|
|
obj.name = data.realName
|
|
|
obj.opinion = data.auditOpinion
|
|
|
obj.content = data.enterpriseName || '暂无企业信息'
|
|
|
break;
|
|
|
case 1:
|
|
|
+ data.userFace = data.imageUri
|
|
|
obj.img = data.imageUri
|
|
|
obj.name = data.guestName
|
|
|
obj.opinion = data.opinion
|
|
|
obj.content = data.enterpriseName ? '拜访【' + data.enterpriseName + '】' : '暂无拜访企业信息'
|
|
|
break;
|
|
|
case 2:
|
|
|
+ data.userFace = data.faceUrl
|
|
|
obj.img = data.faceUrl
|
|
|
obj.name = data.name
|
|
|
obj.opinion = data.remark ? '备注:' + data.remark : ''
|
|
|
@@ -377,8 +386,22 @@
|
|
|
}
|
|
|
},
|
|
|
//下发人脸
|
|
|
- pushFaceToDevice(id) {
|
|
|
- this.$refs.formRef.pushUserFaceToDevice(id)
|
|
|
+ showDeviceDoorDialog(item) {
|
|
|
+ let index=this.menuObj.index || 0
|
|
|
+ if (index==0) {
|
|
|
+ //常驻人员
|
|
|
+ item.targetType=1 //人脸入库(设备库)类型 1:白名单 2:访客 3:黑名单
|
|
|
+ item.userType='QYYG_' //用户类型,QYYG_:企业员工,FWY_:服务员,FK_:访客。ADMIN_:管理员
|
|
|
+ }else if (index==1) {
|
|
|
+ //来访人员
|
|
|
+ item.targetType=2
|
|
|
+ item.userType='FK_'
|
|
|
+ }else if (index==2) {
|
|
|
+ //服务人员
|
|
|
+ item.targetType=1
|
|
|
+ item.userType='FWY_'
|
|
|
+ }
|
|
|
+ this.$refs.deviceDoor.showDialog(item)
|
|
|
},
|
|
|
//禁用人脸
|
|
|
deleteUserFaceFromDevice(id) {
|