bind
This commit is contained in:
parent
b4664383fb
commit
517a91a93b
|
@ -0,0 +1,130 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="绑定定位卡"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="closeDrawer"
|
||||||
|
>
|
||||||
|
<el-form ref="dialogForm" :model="form" label-width="120px">
|
||||||
|
<el-form-item label="姓名">
|
||||||
|
{{ bindName }}
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="绑定卡号">
|
||||||
|
<el-select v-model="form.blt" filterable style="width: 100%" :disabled="dis">
|
||||||
|
<el-option
|
||||||
|
v-for="item in bltList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.code"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button v-if="bindType === 10" type="primary" @click="submitBindBlt"
|
||||||
|
>绑定</el-button
|
||||||
|
>
|
||||||
|
<el-button v-if="bindType === 20" type="primary" @click="submitBindBlt"
|
||||||
|
>解绑</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "employee",
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
components: {},
|
||||||
|
props: {
|
||||||
|
bindType: {
|
||||||
|
// 接受外部v-model传入的值
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
bindName: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
|
bindEmployee: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
bindBtl:{
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: {
|
||||||
|
type: 10,
|
||||||
|
blt: "",
|
||||||
|
employee: "",
|
||||||
|
},
|
||||||
|
bltList: [],
|
||||||
|
EemployeeName:'',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.form.type = this.$route.query.bindType;
|
||||||
|
this.EemployeeName = this.$route.query.bindName;
|
||||||
|
this.form.blt = this.$route.query.bindBtl;
|
||||||
|
this.form.employee = this.$route.query.bindEmployee;
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
showDialog() {
|
||||||
|
debugger;
|
||||||
|
let that = this;
|
||||||
|
that.dialoguser = true;
|
||||||
|
that.$nextTick(function () {
|
||||||
|
debugger;
|
||||||
|
if(that.user===""){
|
||||||
|
that.selection = [];
|
||||||
|
that.apiObj.map(item => {
|
||||||
|
that.$refs.table.toggleRowSelection(item, false)
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.apiObj.map(item => {
|
||||||
|
debugger;
|
||||||
|
if (item.id === that.user) {
|
||||||
|
that.$refs.table.toggleRowSelection(item, true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getBltList() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.third.tdevice.list.req({ type: 30, page: 0 }).then((res) => {
|
||||||
|
that.tdevice = res;
|
||||||
|
that.bltList = res.filter((item) => {
|
||||||
|
return item.employee_ === null;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//加载人员
|
||||||
|
handleQuery() {
|
||||||
|
this.$API.system.user.list
|
||||||
|
.req(this.query)
|
||||||
|
.then((res) => {
|
||||||
|
this.apiObj = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
submitBindBlt() {
|
||||||
|
let that = this;
|
||||||
|
this.form.type=this.bindType;
|
||||||
|
this.form.bindBtl=this.bindBtl;
|
||||||
|
this.form.bindEmployee=this.bindEmployee;
|
||||||
|
that.$API.third.tdevice.bltBind.req(this.form).then((res) => {
|
||||||
|
if (res.err_msg) {
|
||||||
|
} else {
|
||||||
|
that.showBindBlt = false;
|
||||||
|
that.$emit('success',false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
closeDrawer(){
|
||||||
|
this.$emit('closed',false);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -5,6 +5,7 @@ import http from "./utils/request"
|
||||||
import { permission, rolePermission } from './utils/permission'
|
import { permission, rolePermission } from './utils/permission'
|
||||||
|
|
||||||
import scTable from './components/scTable'
|
import scTable from './components/scTable'
|
||||||
|
import scBind from './components/scBind'
|
||||||
import scTableColumn from './components/scTable/column.js'
|
import scTableColumn from './components/scTable/column.js'
|
||||||
import scFilterBar from './components/scFilterBar'
|
import scFilterBar from './components/scFilterBar'
|
||||||
import scUpload from './components/scUpload'
|
import scUpload from './components/scUpload'
|
||||||
|
@ -45,6 +46,7 @@ export default {
|
||||||
app.config.globalProperties.$ROLE = rolePermission;
|
app.config.globalProperties.$ROLE = rolePermission;
|
||||||
|
|
||||||
//注册全局组件
|
//注册全局组件
|
||||||
|
app.component('scBind', scBind);
|
||||||
app.component('scTable', scTable);
|
app.component('scTable', scTable);
|
||||||
app.component('scTableColumn', scTableColumn);
|
app.component('scTableColumn', scTableColumn);
|
||||||
app.component('scFilterBar', scFilterBar);
|
app.component('scFilterBar', scFilterBar);
|
||||||
|
|
|
@ -379,6 +379,7 @@ export default {
|
||||||
handleDel(row) {
|
handleDel(row) {
|
||||||
this.$API.am.area.delete.req(row.id).then((res) => {
|
this.$API.am.area.delete.req(row.id).then((res) => {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
|
this.refreshArea();
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -464,6 +465,19 @@ export default {
|
||||||
} else if (mode == "edit") {
|
} else if (mode == "edit") {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
}
|
}
|
||||||
|
this.refreshArea();
|
||||||
|
},
|
||||||
|
//更新区域缓存
|
||||||
|
refreshArea(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.am.area.list.req({page_size:999}).then(res => {
|
||||||
|
if (res.err_msg) {
|
||||||
|
} else {
|
||||||
|
let areaList = res.results;
|
||||||
|
that.$TOOL.data.remove("qyjyAreaList");
|
||||||
|
that.$TOOL.data.set("qyjyAreaList", areaList);
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccessAccess(data, mode) {
|
handleSaveSuccessAccess(data, mode) {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
row-key="id" @selection-change="selectionChange" stripe @resetQuery="resetQuery">
|
row-key="id" @selection-change="selectionChange" stripe @resetQuery="resetQuery">
|
||||||
<!-- <el-table-column type="selection" width="50"></el-table-column> -->
|
<!-- <el-table-column type="selection" width="50"></el-table-column> -->
|
||||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="喇叭名称" prop="name" min-width="150"></el-table-column>
|
<el-table-column label="喇叭名称" prop="name" min-width="120"></el-table-column>
|
||||||
<el-table-column label="音量" prop="extra" min-width="40">
|
<el-table-column label="音量" prop="extra" min-width="40">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.extra && scope.row.extra.player">{{
|
<span v-if="scope.row.extra && scope.row.extra.player">{{
|
||||||
|
@ -31,6 +31,11 @@
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="sn" prop="extra" min-width="90">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.extra">{{ scope.row.extra.config.sn }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="ip" prop="extra" min-width="90">
|
<el-table-column label="ip" prop="extra" min-width="90">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.extra">{{ scope.row.extra.ip }}</span>
|
<span v-if="scope.row.extra">{{ scope.row.extra.ip }}</span>
|
||||||
|
@ -97,12 +102,16 @@ export default {
|
||||||
handlePosition(row) {
|
handlePosition(row) {
|
||||||
debugger;
|
debugger;
|
||||||
console.log(row)
|
console.log(row)
|
||||||
this.channelId = row.my_info.id ? row.my_info.id : null;
|
if(row.my_info.id&&row.my_info.id!==null){
|
||||||
this.channelArea = row.my_info.area ? row.my_info.area : '';
|
this.channelId = row.my_info.id ? row.my_info.id : null;
|
||||||
this.channelAreas = row.my_info.areas ? row.my_info.areas : [];
|
this.channelArea = row.my_info.area ? row.my_info.area : '';
|
||||||
this.channelLocation = row.my_info.location ? row.my_info.location : {};
|
this.channelAreas = row.my_info.areas ? row.my_info.areas : [];
|
||||||
this.channelName = row.name;
|
this.channelLocation = row.my_info.location ? row.my_info.location : {};
|
||||||
this.dialogSave = true;
|
this.channelName = row.name;
|
||||||
|
this.dialogSave = true;
|
||||||
|
}else{
|
||||||
|
this.$message.error("请先完成设备同步");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//表格选择后回调事件
|
//表格选择后回调事件
|
||||||
selectionChange(selection) {
|
selectionChange(selection) {
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
<el-table-column label="设备编号" prop="deviceCode" min-width="100"></el-table-column>
|
<el-table-column label="设备编号" prop="deviceCode" min-width="100"></el-table-column>
|
||||||
<el-table-column label="通道编号" prop="channelCode" min-width="150"></el-table-column>
|
<el-table-column label="通道编号" prop="channelCode" min-width="150"></el-table-column>
|
||||||
<el-table-column label="通道名称" prop="channelName" min-width="250"></el-table-column>
|
<el-table-column label="通道名称" prop="channelName" min-width="250"></el-table-column>
|
||||||
|
<!-- <el-table-column label="通道IP" prop="channelName" min-width="250"></el-table-column> -->
|
||||||
<el-table-column label="通道状态" prop="stat" min-width="80">
|
<el-table-column label="通道状态" prop="stat" min-width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.stat === 0">未启用</span>
|
<span v-if="scope.row.stat === 0">未启用</span>
|
||||||
|
@ -81,8 +82,8 @@
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<el-dialog :title="channelName" v-model="limitedVisible" :width="745">
|
<el-dialog class="videoViewWrap" :title="channelName" v-model="limitedVisible" with="100%">
|
||||||
<video-view v-if="limitedVisible" :channelCode="channelCode"></video-view>
|
<video-view id="videoView" v-if="limitedVisible" :channelCode="channelCode"></video-view>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="viewClose">关闭</el-button>
|
<el-button @click="viewClose">关闭</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -156,6 +157,7 @@ export default {
|
||||||
that.channelCode = row.channelCode;
|
that.channelCode = row.channelCode;
|
||||||
that.channelName = row.channelName;
|
that.channelName = row.channelName;
|
||||||
that.limitedVisible = true;
|
that.limitedVisible = true;
|
||||||
|
|
||||||
// that.$API.am.video.item.req(this.params).then((res) => {
|
// that.$API.am.video.item.req(this.params).then((res) => {
|
||||||
// this.url = res.url;
|
// this.url = res.url;
|
||||||
// if (flvjs.isSupported()) {
|
// if (flvjs.isSupported()) {
|
||||||
|
@ -176,12 +178,17 @@ export default {
|
||||||
handlePosition(row) {
|
handlePosition(row) {
|
||||||
debugger;
|
debugger;
|
||||||
console.log(row)
|
console.log(row)
|
||||||
this.channelId = row.my_info.id ? row.my_info.id : null;
|
if(row.my_info.id&&row.my_info.id!==null){
|
||||||
this.channelArea = row.my_info.area ? row.my_info.area : '';
|
this.channelId = row.my_info.id ? row.my_info.id : null;
|
||||||
this.channelAreas = row.my_info.areas ? row.my_info.areas : [];
|
this.channelArea = row.my_info.area ? row.my_info.area : '';
|
||||||
this.channelLocation = row.my_info.location ? row.my_info.location : {};
|
this.channelAreas = row.my_info.areas ? row.my_info.areas : [];
|
||||||
this.channelName = row.channelName;
|
this.channelLocation = row.my_info.location ? row.my_info.location : {};
|
||||||
this.dialogSave = true;
|
this.channelName = row.channelName;
|
||||||
|
this.dialogSave = true;
|
||||||
|
}else{
|
||||||
|
this.$message.error("请先完成设备同步");
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//表格选择后回调事件
|
//表格选择后回调事件
|
||||||
selectionChange(selection) {
|
selectionChange(selection) {
|
||||||
|
@ -204,3 +211,9 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-dialog{
|
||||||
|
width: 100%!important;
|
||||||
|
height: 100%!important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -113,6 +113,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.map.openMapById('0000');
|
window.map.openMapById('0000');
|
||||||
|
|
||||||
window.map.on('loadComplete', e => {
|
window.map.on('loadComplete', e => {
|
||||||
debugger;
|
debugger;
|
||||||
console.log(that.channelLocation)
|
console.log(that.channelLocation)
|
||||||
|
@ -155,9 +156,9 @@ export default {
|
||||||
console.log(feature.geometry);//type:POINT;coordinates:[114.63028499839209,38.81195080123784,0]
|
console.log(feature.geometry);//type:POINT;coordinates:[114.63028499839209,38.81195080123784,0]
|
||||||
let floorNo = feature.properties.floorNo=='室外'?'Floor1':feature.properties.floorNo;
|
let floorNo = feature.properties.floorNo=='室外'?'Floor1':feature.properties.floorNo;
|
||||||
let floorId = feature.properties.floorId;
|
let floorId = feature.properties.floorId;
|
||||||
this.form.location = feature.geometry.coordinates;
|
that.form.location = feature.geometry.coordinates;
|
||||||
this.form.location.push(floorNo);
|
that.form.location.push(floorNo);
|
||||||
this.form.location.push(floorId);
|
that.form.location.push(floorId);
|
||||||
},
|
},
|
||||||
//移除相应点的回调,返回相应点信息
|
//移除相应点的回调,返回相应点信息
|
||||||
removeCallback: (feature) => {
|
removeCallback: (feature) => {
|
||||||
|
@ -173,13 +174,21 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.map.addControl(drawTool);
|
window.map.addControl(drawTool);
|
||||||
|
let compassControl = new jsmap.JSCompassControl({
|
||||||
|
position: jsmap.JSControlPosition.LEFT_TOP,
|
||||||
|
offset: {
|
||||||
|
x: 50,
|
||||||
|
y: 50
|
||||||
|
}
|
||||||
|
});
|
||||||
|
window.map.addControl(compassControl);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
closeDrawer() {
|
closeDrawer() {
|
||||||
this.$emit('closed');
|
this.$emit('closed');
|
||||||
},
|
},
|
||||||
getArea() {
|
getArea() {
|
||||||
this.areasList = that.$TOOL.data.get('qyjyAreaList');
|
this.areasList = this.$TOOL.data.get('qyjyAreaList');
|
||||||
},
|
},
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
submit() {
|
submit() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="height: 560px">
|
<div style="height: 100%;width: 100%;">
|
||||||
<video id="videoElement" muted="muted"></video>
|
<video id="videoElement" muted="muted" style="object-fit:fill"></video>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1337,7 +1337,7 @@ export default {
|
||||||
});
|
});
|
||||||
let maskColor = '',strokeColor='';
|
let maskColor = '',strokeColor='';
|
||||||
if(item.level===10){
|
if(item.level===10){
|
||||||
maskColor = 'rgba(0,0,255,.44)';//蓝色
|
maskColor = 'rgba(0,0,255,.2)';//蓝色
|
||||||
strokeColor = '#0000ff';
|
strokeColor = '#0000ff';
|
||||||
}else if(item.level===20){
|
}else if(item.level===20){
|
||||||
maskColor = 'rgba(255,255,0,0.44)';//黄色
|
maskColor = 'rgba(255,255,0,0.44)';//黄色
|
||||||
|
|
|
@ -129,7 +129,9 @@
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
></save-dialog>
|
></save-dialog>
|
||||||
<el-Dialog
|
|
||||||
|
<ScBind v-model="showBindBlt" :bindBtl="bindBtl" :bindType="bindType" :bindName="bindName" :bindEmployee="bindEmployee"></ScBind>
|
||||||
|
<!-- <el-Dialog
|
||||||
title="绑定定位卡"
|
title="绑定定位卡"
|
||||||
v-model="showBindBlt"
|
v-model="showBindBlt"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
|
@ -143,9 +145,9 @@
|
||||||
<el-select v-model="form.blt" style="width: 100%" :disabled="dis">
|
<el-select v-model="form.blt" style="width: 100%" :disabled="dis">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in bltList"
|
v-for="item in bltList"
|
||||||
:key="item.id"
|
:key="item.code"
|
||||||
:label="item.code"
|
:label="item.code"
|
||||||
:value="item.id"
|
:value="item.code"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -159,16 +161,18 @@
|
||||||
>
|
>
|
||||||
<el-button @click="showBindBlt = false">取消</el-button>
|
<el-button @click="showBindBlt = false">取消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-Dialog>
|
</el-Dialog> -->
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./ep_form.vue";
|
import saveDialog from "./ep_form.vue";
|
||||||
|
import ScBind from "@/components/scBind/index.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "employee",
|
name: "employee",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
},
|
ScBind
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialog: {
|
dialog: {
|
||||||
|
@ -185,7 +189,10 @@ export default {
|
||||||
dis: false,
|
dis: false,
|
||||||
showBindBlt: false,
|
showBindBlt: false,
|
||||||
bltList: [],
|
bltList: [],
|
||||||
bindBltName: "",
|
bindName: "",
|
||||||
|
bindType:10,
|
||||||
|
bindBtl:null,
|
||||||
|
bindEmployee:'',
|
||||||
form: {
|
form: {
|
||||||
type: 10,
|
type: 10,
|
||||||
blt: "",
|
blt: "",
|
||||||
|
@ -338,13 +345,13 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleBindBlt(type, row) {
|
handleBindBlt(type, row) {
|
||||||
this.dis = false;
|
// this.dis = false;
|
||||||
this.bindBltName = row.name;
|
debugger;
|
||||||
this.form.type = type;
|
this.bindName = row.name;
|
||||||
this.form.employee = row.id;
|
this.bindType = type;
|
||||||
|
this.bindEmployee = row.id;
|
||||||
if (type === 20) {
|
if (type === 20) {
|
||||||
this.dis = true;
|
this.bindBtl = row.blt_.mac;
|
||||||
this.form.blt = row.blt_.id;
|
|
||||||
}
|
}
|
||||||
this.showBindBlt = true;
|
this.showBindBlt = true;
|
||||||
},
|
},
|
||||||
|
|
|
@ -85,16 +85,30 @@
|
||||||
<el-space v-else>否</el-space>
|
<el-space v-else>否</el-space>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="60">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link
|
||||||
|
v-if="scope.row.blt_==null"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="bindCard(scope.row,10)"
|
||||||
|
v-auth="'visit.update'"
|
||||||
|
>绑卡
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
<ScBind v-model="showBindBlt" :bindBtl="bindBtl"
|
||||||
|
:bindType="bindType" :bindName="bindName" :bindEmployee="bindEmployee"
|
||||||
|
@success="showBindBltSuccess" @closed="showBindBltClose"></ScBind>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {genTree} from "@/utils/verificate";
|
import ScBind from "@/components/scBind/index.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
props: {
|
props: {
|
||||||
|
@ -103,11 +117,15 @@
|
||||||
default: ""
|
default: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
ScBind
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
showBindBlt:false,
|
||||||
state_: {
|
state_: {
|
||||||
10: "创建中",
|
10: "创建中",
|
||||||
20: "审批中",
|
20: "审批中",
|
||||||
|
@ -122,6 +140,10 @@
|
||||||
40: "其他",
|
40: "其他",
|
||||||
},
|
},
|
||||||
form:{},
|
form:{},
|
||||||
|
bindName: "",
|
||||||
|
bindType:10,
|
||||||
|
bindBtl:null,
|
||||||
|
bindEmployee:'',
|
||||||
rpjFileList: [],
|
rpjFileList: [],
|
||||||
memeberList: [],
|
memeberList: [],
|
||||||
};
|
};
|
||||||
|
@ -131,6 +153,31 @@
|
||||||
this.getMemberList();*/
|
this.getMemberList();*/
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//访客绑卡
|
||||||
|
bindCard(row,type){
|
||||||
|
debugger;
|
||||||
|
if(row.remployee==null){
|
||||||
|
this.$message.success("请审批通过后再进行绑卡操作");
|
||||||
|
}else{
|
||||||
|
debugger;
|
||||||
|
this.bindName = row.remployee_.name;
|
||||||
|
this.bindType = type;
|
||||||
|
this.bindEmployee = row.remployee;
|
||||||
|
if (type === 20) {
|
||||||
|
this.bindBtl = row.blt_.mac;
|
||||||
|
}
|
||||||
|
this.showBindBlt = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showBindBltSuccess(data){
|
||||||
|
debugger;
|
||||||
|
this.showBindBlt = data
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
showBindBltClose(data){
|
||||||
|
debugger;
|
||||||
|
this.showBindBlt = data
|
||||||
|
},
|
||||||
//显示
|
//显示
|
||||||
open() {
|
open() {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
<el-table-column prop="type" label="岗位" min-width="150">
|
<el-table-column prop="type" label="岗位" min-width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.id">{{scope.row.post_.name}}</span>
|
<span v-if="scope.row.id">{{scope.row.post_.name}}</span>
|
||||||
<el-select v-else v-model="scope.row.post" placeholder="请选择所在岗位">
|
<el-select v-else v-model="scope.row.post" filterable placeholder="请选择所在岗位">
|
||||||
<el-option v-for="item in postOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in postOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="访问级别"
|
label="访问级别"
|
||||||
prop="level"
|
prop="level"
|
||||||
width="200"
|
min-width="100"
|
||||||
fixed="left"
|
fixed="left"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
@ -51,20 +51,20 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="来访单位"
|
label="来访单位"
|
||||||
prop="company"
|
prop="company"
|
||||||
width="180"
|
min-width="180"
|
||||||
fixed="left"
|
fixed="left"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="项目状态"
|
label="项目状态"
|
||||||
prop="state"
|
prop="state"
|
||||||
width="180"
|
min-width="180"
|
||||||
>
|
>
|
||||||
<template #default="scope">{{state_[scope.row.state] }}</template>
|
<template #default="scope">{{state_[scope.row.state] }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="审批状态"
|
label="审批状态"
|
||||||
prop="state"
|
prop="state"
|
||||||
width="180"
|
min-width="150"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.ticket_&&scope.row.ticket_.state_" style="margin-right: 5px;">{{scope.row.ticket_.state_.name }}</span>
|
<span v-if="scope.row.ticket_&&scope.row.ticket_.state_" style="margin-right: 5px;">{{scope.row.ticket_.state_.name }}</span>
|
||||||
|
@ -79,12 +79,12 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="来访概述"
|
label="来访概述"
|
||||||
prop="name"
|
prop="name"
|
||||||
width="180"
|
min-width="180"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="来访详述"
|
label="来访详述"
|
||||||
prop="description"
|
prop="description"
|
||||||
width="180"
|
min-width="180"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="来访时间"
|
label="来访时间"
|
||||||
|
@ -99,17 +99,17 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="来访人数"
|
label="来访人数"
|
||||||
prop="count_people"
|
prop="count_people"
|
||||||
width="180"
|
min-width="80"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="属地部门"
|
label="属地部门"
|
||||||
prop="belong_dept"
|
prop="belong_dept"
|
||||||
width="180"
|
min-width="150"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="接待人"
|
label="接待人"
|
||||||
prop="receptionist_name"
|
prop="receptionist_name"
|
||||||
width="180"
|
min-width="80"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.receptionist_">{{scope.row.receptionist_.name}}</span>
|
<span v-if="scope.row.receptionist_">{{scope.row.receptionist_.name}}</span>
|
||||||
|
@ -150,12 +150,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
<save-dialog
|
|
||||||
v-if="dialog.save"
|
|
||||||
ref="saveDialog"
|
|
||||||
@success="handleSaveSuccess"
|
|
||||||
@closed="dialog.save = false"
|
|
||||||
></save-dialog>
|
|
||||||
<detial-dialog
|
<detial-dialog
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
ref="detialDialog"
|
ref="detialDialog"
|
||||||
|
|
|
@ -87,17 +87,36 @@
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="create_time"
|
prop="create_time"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
<el-table-column label="操作" width="60">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link
|
||||||
|
v-if="scope.row.blt_==null"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="bindCard(scope.row,10)"
|
||||||
|
v-auth="'visit.update'"
|
||||||
|
>绑卡
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
<ScBind v-model="showBindBlt" :bindBtl="bindBtl"
|
||||||
|
:bindType="bindType" :bindName="bindName"
|
||||||
|
:bindEmployee="bindEmployee"
|
||||||
|
@success="showBindBltSuccess" @closed="showBindBltClose"></ScBind>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { genTree } from "@/utils/verificate";
|
import ScBind from "@/components/scBind/index.vue";
|
||||||
export default {
|
export default {
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
|
components: {
|
||||||
|
ScBind
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
@ -116,8 +135,13 @@ export default {
|
||||||
receptionist: [{ required: true, message: "请输入" }],
|
receptionist: [{ required: true, message: "请输入" }],
|
||||||
level: [{ required: true, message: "请输入" }],
|
level: [{ required: true, message: "请输入" }],
|
||||||
},
|
},
|
||||||
|
bindName: "",
|
||||||
|
bindType:10,
|
||||||
|
bindBtl:null,
|
||||||
|
bindEmployee:'',
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
showBindBlt:false,
|
||||||
selectionFilters: [],
|
selectionFilters: [],
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
purposeoptions: [
|
purposeoptions: [
|
||||||
|
@ -147,13 +171,34 @@ export default {
|
||||||
// this.getUser();
|
// this.getUser();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//访客接待人
|
//访客绑卡
|
||||||
// getUser() {
|
bindCard(row,type){
|
||||||
// this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
debugger;
|
||||||
// this.receptionistoptions = res;
|
if(row.visitor_.employee==null){
|
||||||
// });
|
this.$message.success("请审批通过后再进行绑卡操作");
|
||||||
// },
|
}else{
|
||||||
|
debugger;
|
||||||
|
this.bindName = row.visitor_.name;
|
||||||
|
this.bindType = type;
|
||||||
|
this.bindEmployee = row.visitor_.employee;
|
||||||
|
if (type === 20) {
|
||||||
|
this.bindBtl = row.blt_.mac;
|
||||||
|
}
|
||||||
|
this.showBindBlt = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
showBindBltSuccess(data){
|
||||||
|
debugger;
|
||||||
|
this.showBindBlt = data
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
|
||||||
|
showBindBltClose(data){
|
||||||
|
debugger;
|
||||||
|
this.showBindBlt = data
|
||||||
|
},
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add") {
|
open(mode = "add") {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
|
|
|
@ -154,6 +154,7 @@ export default {
|
||||||
{ id: 20, name: "拜访" },
|
{ id: 20, name: "拜访" },
|
||||||
{ id: 30, name: "面试" },
|
{ id: 30, name: "面试" },
|
||||||
{ id: 40, name: "开会" },
|
{ id: 40, name: "开会" },
|
||||||
|
{ id: 50, name: "货车司机" },
|
||||||
],
|
],
|
||||||
|
|
||||||
receptionist_name: null,
|
receptionist_name: null,
|
||||||
|
|
Loading…
Reference in New Issue