track&bindblt
This commit is contained in:
parent
01084c4f5b
commit
cfd0f4df95
|
@ -119,7 +119,8 @@
|
||||||
<div class="item-info">
|
<div class="item-info">
|
||||||
<div title="员工" class="normal">内部员工</div>
|
<div title="员工" class="normal">内部员工</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<span class="large">{{userCount.count_employee}}</span> <span class="normal">人</span>
|
<span class="large">{{userCount.count_employee}}</span> <span
|
||||||
|
class="normal">人</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -127,7 +128,8 @@
|
||||||
<div class="item-img item-img1"></div>
|
<div class="item-img item-img1"></div>
|
||||||
<div class="item-info">
|
<div class="item-info">
|
||||||
<div title="外来人员" class="normal">访客</div>
|
<div title="外来人员" class="normal">访客</div>
|
||||||
<div class="bottom"><span class="large">{{userCount.count_visitor}}</span> <span class="normal">人</span>
|
<div class="bottom"><span class="large">{{userCount.count_visitor}}</span> <span
|
||||||
|
class="normal">人</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -136,7 +138,8 @@
|
||||||
<div class="item-info">
|
<div class="item-info">
|
||||||
<div title="承包商" class="normal">相关方</div>
|
<div title="承包商" class="normal">相关方</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<span class="large">{{userCount.count_remployee}}</span> <span class="normal">人</span>
|
<span class="large">{{userCount.count_remployee}}</span> <span
|
||||||
|
class="normal">人</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -488,10 +491,15 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-btn-group">
|
<div class="basic-btn-group">
|
||||||
<div class="danger-btn-bg btn-item" @click="userTrack">
|
<div v-if="tracking" class="danger-btn-bg btn-item" @click="userUnTrack">
|
||||||
|
<span class="trackImg"></span>
|
||||||
|
<span>取消跟踪</span>
|
||||||
|
</div>
|
||||||
|
<div v-else class="danger-btn-bg btn-item" @click="userTrack">
|
||||||
<span class="trackImg"></span>
|
<span class="trackImg"></span>
|
||||||
<span>跟踪</span>
|
<span>跟踪</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="simple-btn-bg btn-item">
|
<div class="simple-btn-bg btn-item">
|
||||||
<span class="viewImg"></span>
|
<span class="viewImg"></span>
|
||||||
<span>轨迹</span>
|
<span>轨迹</span>
|
||||||
|
@ -519,7 +527,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="岗位">
|
<el-table-column label="岗位">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.my_info.employee_">{{scope.row.my_info.employee_.post_name}}</span>
|
<span
|
||||||
|
v-if="scope.row.my_info.employee_">{{scope.row.my_info.employee_.post_name}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -835,6 +844,7 @@
|
||||||
countIndex: '2',
|
countIndex: '2',
|
||||||
markList: [false, false, false, false, false, false, false],
|
markList: [false, false, false, false, false, false, false],
|
||||||
autoRun: false,
|
autoRun: false,
|
||||||
|
tracking: false,
|
||||||
areaDetail: false,
|
areaDetail: false,
|
||||||
screenJob: false,
|
screenJob: false,
|
||||||
screenUser: false,
|
screenUser: false,
|
||||||
|
@ -845,13 +855,13 @@
|
||||||
showUserSelect: false,
|
showUserSelect: false,
|
||||||
warningDetail: false,
|
warningDetail: false,
|
||||||
filterCtrlFocus: true,
|
filterCtrlFocus: true,
|
||||||
warningListTotal:0,
|
warningListTotal: 0,
|
||||||
warningData:{
|
warningData: {
|
||||||
list:[],
|
list: [],
|
||||||
total:0,
|
total: 0,
|
||||||
params:{
|
params: {
|
||||||
page:1,
|
page: 1,
|
||||||
page_size:10
|
page_size: 10
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Vchannels: [],//摄像头列表
|
Vchannels: [],//摄像头列表
|
||||||
|
@ -903,7 +913,7 @@
|
||||||
mark: '1',
|
mark: '1',
|
||||||
},
|
},
|
||||||
LBType: '1',
|
LBType: '1',
|
||||||
userMarker:{},
|
userMarker: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -1051,6 +1061,10 @@
|
||||||
//人员
|
//人员
|
||||||
that.screenUserItem = item.properties.get("employee");
|
that.screenUserItem = item.properties.get("employee");
|
||||||
that.screenUser = true;
|
that.screenUser = true;
|
||||||
|
debugger;
|
||||||
|
window.map.flyToMarker(that.userMarker[that.screenUserItem.mac],{
|
||||||
|
duration:1000
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1077,55 +1091,57 @@
|
||||||
this.getAllPost();//岗位
|
this.getAllPost();//岗位
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
|
|
||||||
},3000)
|
}, 3000)
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
areaRowClick(){
|
areaRowClick(data) {
|
||||||
this.areaDetail = true;
|
this.areaDetail = true;
|
||||||
|
console.log(data);
|
||||||
|
debugger;
|
||||||
},
|
},
|
||||||
//岗位
|
//岗位
|
||||||
getAllPost(){
|
getAllPost() {
|
||||||
this.$API.system.post.list.req({page:0}).then(res=>{
|
this.$API.system.post.list.req({page: 0}).then(res => {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
let children = genTree(res);
|
let children = genTree(res);
|
||||||
for(let i=0;i<4;i++){
|
for (let i = 0; i < 4; i++) {
|
||||||
let obj=new Object();
|
let obj = new Object();
|
||||||
if(i===0){
|
if (i === 0) {
|
||||||
obj.id='';
|
obj.id = '';
|
||||||
obj.name = '全部';
|
obj.name = '全部';
|
||||||
obj.label = '全部';
|
obj.label = '全部';
|
||||||
}else if(i===1){
|
} else if (i === 1) {
|
||||||
obj.id='';
|
obj.id = '';
|
||||||
obj.name = '内部员工';
|
obj.name = '内部员工';
|
||||||
obj.label = '内部员工';
|
obj.label = '内部员工';
|
||||||
obj.children = children;
|
obj.children = children;
|
||||||
}else if(i===2){
|
} else if (i === 2) {
|
||||||
obj.id='';
|
obj.id = '';
|
||||||
obj.name = '相关方';
|
obj.name = '相关方';
|
||||||
obj.label = '相关方';
|
obj.label = '相关方';
|
||||||
}else if(i===3){
|
} else if (i === 3) {
|
||||||
obj.id='';
|
obj.id = '';
|
||||||
obj.name = '访客';
|
obj.name = '访客';
|
||||||
obj.label = '访客';
|
obj.label = '访客';
|
||||||
}
|
}
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
}
|
}
|
||||||
this.postList =arr;
|
this.postList = arr;
|
||||||
// console.log(arr)
|
// console.log(arr)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//人员统计
|
//人员统计
|
||||||
getManCount() {
|
getManCount() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.countIndex==='2'){
|
if (that.countIndex === '2') {
|
||||||
that.$API.third.blt.countNow.req().then(res => {
|
that.$API.third.blt.countNow.req().then(res => {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
} else {
|
} else {
|
||||||
that.userCount = {...res};
|
that.userCount = {...res};
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
that.$API.third.blt.countBind.req().then(res => {
|
that.$API.third.blt.countBind.req().then(res => {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
} else {
|
} else {
|
||||||
|
@ -1180,11 +1196,11 @@
|
||||||
that.userList = res.filter(item => {
|
that.userList = res.filter(item => {
|
||||||
return item.my_info.employee
|
return item.my_info.employee
|
||||||
});
|
});
|
||||||
that.showUserMarkers();
|
that.showUserMarkers(that.userList);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleCurrentChange(){
|
handleCurrentChange() {
|
||||||
this.getWarnings();
|
this.getWarnings();
|
||||||
},
|
},
|
||||||
//获取报警列表
|
//获取报警列表
|
||||||
|
@ -1222,7 +1238,7 @@
|
||||||
//获取人员详细信息
|
//获取人员详细信息
|
||||||
showUserDetail() {
|
showUserDetail() {
|
||||||
this.screenUserDetail = true;
|
this.screenUserDetail = true;
|
||||||
this.$API.hrm.employee.item.req(this.screenUserItem.id).then(res=>{
|
this.$API.hrm.employee.item.req(this.screenUserItem.id).then(res => {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
this.screenUserItemDetail = res;
|
this.screenUserItemDetail = res;
|
||||||
})
|
})
|
||||||
|
@ -1232,12 +1248,12 @@
|
||||||
let that = this;
|
let that = this;
|
||||||
this.showUserSelect = false;
|
this.showUserSelect = false;
|
||||||
this.screenUser = true;
|
this.screenUser = true;
|
||||||
that.screenUserItem.name=this.userList[0].my_info.employee_.name;
|
that.screenUserItem.name = this.userList[0].my_info.employee_.name;
|
||||||
that.screenUserItem.type=this.userList[0].my_info.employee_.type;
|
that.screenUserItem.type = this.userList[0].my_info.employee_.type;
|
||||||
that.screenUserItem.id=this.userList[0].my_info.employee_.id;
|
that.screenUserItem.id = this.userList[0].my_info.employee_.id;
|
||||||
that.screenUserItem.photo=this.userList[0].my_info.employee_.photo?this.userList[0].my_info.employee_.photo:'';
|
that.screenUserItem.photo = this.userList[0].my_info.employee_.photo ? this.userList[0].my_info.employee_.photo : '';
|
||||||
that.screenUserItem.post_name=this.userList[0].my_info.employee_.post_name?this.userList[0].my_info.employee_.post_name:'';
|
that.screenUserItem.post_name = this.userList[0].my_info.employee_.post_name ? this.userList[0].my_info.employee_.post_name : '';
|
||||||
that.screenUserItem.belong_dept_name=this.userList[0].my_info.employee_.belong_dept_name?this.userList[0].my_info.employee_.belong_dept_name:'';
|
that.screenUserItem.belong_dept_name = this.userList[0].my_info.employee_.belong_dept_name ? this.userList[0].my_info.employee_.belong_dept_name : '';
|
||||||
},
|
},
|
||||||
//风险区域layer
|
//风险区域layer
|
||||||
riskMaskerLayers() {
|
riskMaskerLayers() {
|
||||||
|
@ -1417,16 +1433,20 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//人员
|
//人员
|
||||||
showUserMarkers() {
|
showUserMarkers(userList) {
|
||||||
|
|
||||||
let that = this;
|
let that = this;
|
||||||
let iconTextMarker = null;
|
let iconTextMarker = null;
|
||||||
if(that.userList.length>0){
|
if (userList.length > 0) {
|
||||||
let lng = [114.62923138539462,114.6315404372349];//经度
|
let lng = [114.62923138539462, 114.6315404372349];//经度
|
||||||
let i=0;
|
let i = 0;
|
||||||
iconTextMarker = that.userList[0].mac+'userMarker';
|
iconTextMarker = userList[0].mac;
|
||||||
let employee_ = that.userList[0].my_info.employee_;
|
let employee_ = userList[0].my_info.employee_;
|
||||||
|
employee_.mac = userList[0].mac;
|
||||||
|
console.log(employee_)
|
||||||
|
debugger;
|
||||||
that.userMarker[iconTextMarker] = new jsmap.JSIconTextMarker({
|
that.userMarker[iconTextMarker] = new jsmap.JSIconTextMarker({
|
||||||
id: that.userList[0].my_info.code,
|
id: userList[0].my_info.code,
|
||||||
position: {x: 114.62923138539462, y: 38.8133418942645, z: 0}, //坐标
|
position: {x: 114.62923138539462, y: 38.8133418942645, z: 0}, //坐标
|
||||||
floorId: 1, //楼层id,默认为1(地面)
|
floorId: 1, //楼层id,默认为1(地面)
|
||||||
image: "/img/user.png",
|
image: "/img/user.png",
|
||||||
|
@ -1450,75 +1470,70 @@
|
||||||
});
|
});
|
||||||
that.userMaskerLayer.addMarker(that.userMarker[iconTextMarker]);
|
that.userMaskerLayer.addMarker(that.userMarker[iconTextMarker]);
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
i=(i+1)%2;
|
i = (i + 1) % 2;
|
||||||
that.userMaskerLayer.updateMarkerPosition(that.userMarker[iconTextMarker],{
|
that.userMaskerLayer.updateMarkerPosition(that.userMarker[iconTextMarker], {
|
||||||
floorId:1,
|
floorId: 1,
|
||||||
position: {x:lng[i], y:38.8133418942642, z:0},
|
position: {x: lng[i], y: 38.8133418942642, z: 0},
|
||||||
animate: {duration: 8000,}
|
animate: {duration: 10000,}
|
||||||
});//动画效果,持续时间一秒
|
});//动画效果,持续时间一秒
|
||||||
},8500)
|
},11000)
|
||||||
}
|
}
|
||||||
/*that.userList.forEach(item => {
|
/*setInterval(function () {
|
||||||
if (item.my_info.code) {
|
that.refreshUserMarker();
|
||||||
let employee_ = item.my_info.employee_;
|
}, 8500)*/
|
||||||
//{114.62923138539462,38.8133418942642}
|
},
|
||||||
iconTextMarker = new jsmap.JSIconTextMarker({
|
//更新人员标记
|
||||||
id: item.my_info.code,
|
refreshUserMarker() {
|
||||||
position: {x: 114.6315404372349, y: 38.813557855009435, z: 0}, //坐标
|
let that = this;
|
||||||
floorId: 1, //楼层id,默认为1(地面)
|
that.$API.third.blt.all.req().then(res => {
|
||||||
image: "/img/user.png",
|
if (res.err_msg) {
|
||||||
text: employee_.name,
|
} else {
|
||||||
font: '10px sans-serif',
|
let userList = res.filter(item => {
|
||||||
fontColor: '#ffffff',
|
return item.my_info.employee
|
||||||
imageHeight: 25,
|
|
||||||
imageWidth: 25,
|
|
||||||
backgroundColor: 'rgba(0,0,0,0.3)',
|
|
||||||
backgroundRadius: 1,
|
|
||||||
backgroundStrokeColor: 'rgba(0,0,0,0.3)',
|
|
||||||
backgroundStrokeWidth: 1,
|
|
||||||
iconTextType: jsmap.JSIconTextType.TOPTEXT_BOTTOMICON,
|
|
||||||
allowPicking: true,
|
|
||||||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),
|
|
||||||
nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
|
|
||||||
show: true,
|
|
||||||
properties: {
|
|
||||||
employee: employee_
|
|
||||||
},
|
|
||||||
callback: (marker) => {
|
|
||||||
return employee_
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
that.userMaskerLayer.addMarker(iconTextMarker);
|
let addUser = that.func(userList, that.userList)[0];
|
||||||
iconTextMarker1 = new jsmap.JSIconTextMarker({
|
let refreshList = that.func(userList, that.userList)[1];
|
||||||
id: item.my_info.code,
|
let subUser = that.func(that.userList, userList)[0];
|
||||||
position: {x: 114.62923138539462, y: 38.8133418942642, z: 0}, //坐标
|
that.userList = refreshList.concat(addUser);//更新userList
|
||||||
floorId: 1, //楼层id,默认为1(地面)
|
that.showUserMarkers(addUser);//增加新进在线员工
|
||||||
image: "/img/user.png",
|
//that.userMaskerLayer.removeMarker(sectorMarker)(addUser);//删除离线员工
|
||||||
text: employee_.name,
|
refreshList.forEach(item => {
|
||||||
font: '10px sans-serif',
|
that.userMaskerLayer.updateMarkerPosition(that.userMarker[item.id], {
|
||||||
fontColor: '#ffffff',
|
floorId: 1,
|
||||||
imageHeight: 25,
|
position: {x: item.longitude, y: item.latitude, z: item.z},
|
||||||
imageWidth: 25,
|
animate: {duration: 1000,}
|
||||||
backgroundColor: 'rgba(0,0,0,0.3)',
|
});//动画效果,持续时间一秒
|
||||||
backgroundRadius: 1,
|
})
|
||||||
backgroundStrokeColor: 'rgba(0,0,0,0.3)',
|
|
||||||
backgroundStrokeWidth: 1,
|
|
||||||
iconTextType: jsmap.JSIconTextType.TOPTEXT_BOTTOMICON,
|
|
||||||
allowPicking: true,
|
|
||||||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),
|
|
||||||
nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
|
|
||||||
show: true,
|
|
||||||
properties: {
|
|
||||||
employee: employee_
|
|
||||||
},
|
|
||||||
callback: (marker) => {
|
|
||||||
return employee_
|
|
||||||
}
|
|
||||||
});
|
|
||||||
that.userMaskerLayer.addMarker(iconTextMarker1);
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
})*/
|
},
|
||||||
|
//比较两次获取的人数的变动 func(a,b)//a与b相比多出来的
|
||||||
|
func(arr1, arr2) {
|
||||||
|
/*var arr1 = [{name:1},{name:2},{name:3},{name:4}];
|
||||||
|
var arr2 = [{name:2},{name:3},{name:4},{name:5}];*/
|
||||||
|
let arr = [];
|
||||||
|
let list = [];
|
||||||
|
let bool = false;
|
||||||
|
let same = false;
|
||||||
|
for (let i = 0; i < arr1.length; i++) {
|
||||||
|
for (let j = 0; j < arr2.length; j++) {
|
||||||
|
//遇到相同直接跳出循环
|
||||||
|
if (arr1[i].id === arr2[j].id) {
|
||||||
|
same = i;
|
||||||
|
bool = false;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
same = false;
|
||||||
|
bool = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (same !== false) list.push(arr1[same]);
|
||||||
|
if (bool !== false) arr.push(arr1[bool]);
|
||||||
|
}
|
||||||
|
let arrList = [arr,list];
|
||||||
|
debugger;
|
||||||
|
console.log(arrList);
|
||||||
|
return arrList;
|
||||||
},
|
},
|
||||||
//危险作业
|
//危险作业
|
||||||
showPolygonMarkers() {
|
showPolygonMarkers() {
|
||||||
|
@ -1546,9 +1561,10 @@
|
||||||
});
|
});
|
||||||
this.polygonMaskerLayer.addMarker(polygonMarker);
|
this.polygonMaskerLayer.addMarker(polygonMarker);
|
||||||
},
|
},
|
||||||
|
//危险作业图片标记
|
||||||
showJobDomMarkers() {
|
showJobDomMarkers() {
|
||||||
let domMarker = new jsmap.JSDomMarker({
|
let domMarker = new jsmap.JSDomMarker({
|
||||||
id: 'polygonmark',
|
id: 'polygonmark',
|
||||||
position: new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0),
|
position: new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0),
|
||||||
floorId: 1,
|
floorId: 1,
|
||||||
depthTest: true,
|
depthTest: true,
|
||||||
|
@ -1738,19 +1754,27 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//员工列表点击
|
//员工列表点击
|
||||||
userRowClick(row){
|
userRowClick(row) {
|
||||||
debugger;
|
debugger;
|
||||||
console.log(row);
|
console.log(row);
|
||||||
let that = this;
|
let that = this;
|
||||||
that.screenUserItem.name=row.my_info.employee_.name;
|
that.screenUserItem.name = row.my_info.employee_.name;
|
||||||
that.screenUserItem.type=row.my_info.employee_.type;
|
that.screenUserItem.type = row.my_info.employee_.type;
|
||||||
that.screenUserItem.id=row.my_info.employee_.id;
|
that.screenUserItem.id = row.my_info.employee_.id;
|
||||||
that.screenUserItem.photo=row.my_info.employee_.photo?row.my_info.employee_.photo:'';
|
that.screenUserItem.photo = row.my_info.employee_.photo ? row.my_info.employee_.photo : '';
|
||||||
that.screenUserItem.post_name=row.my_info.employee_.post_name?row.my_info.employee_.post_name:'';
|
that.screenUserItem.post_name = row.my_info.employee_.post_name ? row.my_info.employee_.post_name : '';
|
||||||
that.screenUserItem.belong_dept_name=row.my_info.employee_.belong_dept_name?row.my_info.employee_.belong_dept_name:'';
|
that.screenUserItem.belong_dept_name = row.my_info.employee_.belong_dept_name ? row.my_info.employee_.belong_dept_name : '';
|
||||||
},
|
},
|
||||||
userTrack(){
|
//人员追踪
|
||||||
|
userTrack() {
|
||||||
|
this.tracking = true;
|
||||||
|
window.map.trackMarker(this.userMarker[this.screenUserItem.mac],{
|
||||||
|
range:150
|
||||||
|
})
|
||||||
|
},
|
||||||
|
userUnTrack(){
|
||||||
|
window.map.cancelTrack();
|
||||||
|
this.tracking = false;
|
||||||
},
|
},
|
||||||
//区域/部门切换
|
//区域/部门切换
|
||||||
cockpitChange(index) {
|
cockpitChange(index) {
|
||||||
|
@ -2750,6 +2774,7 @@
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
transition: .5s;
|
transition: .5s;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
.drop-content-item {
|
.drop-content-item {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -48,9 +48,7 @@
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="部门" prop="belong_dept" width="180">
|
<el-table-column label="部门" prop="belong_dept" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.belong_dept_">{{
|
<span v-if="scope.row.belong_dept_">{{scope.row.belong_dept_.name}}</span>
|
||||||
scope.row.belong_dept_.name
|
|
||||||
}}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -66,26 +64,23 @@
|
||||||
size="small"
|
size="small"
|
||||||
@click="Addcertificate(scope.row)"
|
@click="Addcertificate(scope.row)"
|
||||||
>绑定证书
|
>绑定证书
|
||||||
</el-button
|
</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
text
|
text
|
||||||
type="success"
|
type="success"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleForm('show', scope.row)"
|
@click="handleForm('show', scope.row)"
|
||||||
>查看
|
>查看
|
||||||
</el-button
|
</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
text
|
text
|
||||||
type="warning"
|
type="warning"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleForm('edit', scope.row)"
|
@click="handleForm('edit', scope.row)"
|
||||||
>编辑
|
>编辑
|
||||||
</el-button
|
</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.third_info.id"
|
v-if="scope.row.blt_"
|
||||||
text
|
text
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -126,7 +121,7 @@
|
||||||
{{bindBltName}}
|
{{bindBltName}}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="绑定卡号">
|
<el-form-item label="绑定卡号">
|
||||||
<el-select v-model="form.blt" style="width: 100%">
|
<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.id"
|
||||||
|
@ -159,21 +154,23 @@
|
||||||
},
|
},
|
||||||
apiObj: this.$API.hrm.employee.list,
|
apiObj: this.$API.hrm.employee.list,
|
||||||
query: {},
|
query: {},
|
||||||
|
tdevice: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
search: {
|
search: {
|
||||||
keyword: null,
|
keyword: null,
|
||||||
},
|
},
|
||||||
|
dis: false,
|
||||||
showBindBlt: false,
|
showBindBlt: false,
|
||||||
bltList:[],
|
bltList: [],
|
||||||
bindBltName:'',
|
bindBltName: '',
|
||||||
form:{
|
form: {
|
||||||
type: 10,
|
type: 10,
|
||||||
blt:'',
|
blt: '',
|
||||||
employee:'',
|
employee: '',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted() {
|
||||||
this.getBltList();
|
this.getBltList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -301,24 +298,36 @@
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
},
|
},
|
||||||
getBltList(){
|
getBltList() {
|
||||||
this.$API.third.tdevice.list.req({type:30,page:0}).then(res=>{
|
let that = this;
|
||||||
this.bltList = res/*.filter(item=>{
|
that.$API.third.tdevice.list.req({type: 30, page: 0}).then(res => {
|
||||||
return item.my_info.code === undefined
|
that.tdevice = res;
|
||||||
})*/
|
that.bltList = res.filter(item => {
|
||||||
|
return item.employee_ === null
|
||||||
|
})
|
||||||
|
;
|
||||||
|
console.log(res);
|
||||||
|
console.log(that.bltList);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleBindBlt(type,row) {
|
handleBindBlt(type, row) {
|
||||||
|
this.dis = false;
|
||||||
this.bindBltName = row.name;
|
this.bindBltName = row.name;
|
||||||
this.form.type = type;
|
this.form.type = type;
|
||||||
this.form.employee = row.id;
|
this.form.employee = row.id;
|
||||||
|
if(type===20){
|
||||||
|
this.dis = true;
|
||||||
|
this.form.blt = row.blt_.id;
|
||||||
|
}
|
||||||
this.showBindBlt = true;
|
this.showBindBlt = true;
|
||||||
},
|
},
|
||||||
submitBindBlt(){
|
submitBindBlt() {
|
||||||
this.$API.third.tdevice.bltBind.req(this.form).then(res=>{
|
let that = this;
|
||||||
this.bltList = res.filter(item=>{
|
that.$API.third.tdevice.bltBind.req(this.form).then(res => {
|
||||||
|
if(res.err_msg){}else{
|
||||||
})
|
that.showBindBlt = false;
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue