0906
This commit is contained in:
parent
3b96be33e2
commit
56154669b9
|
@ -2,6 +2,7 @@
|
|||
<el-dialog
|
||||
title="绑定定位卡"
|
||||
destroy-on-close
|
||||
v-model="pageShow"
|
||||
@closed="closeDrawer"
|
||||
>
|
||||
<el-form ref="dialogForm" :model="form" label-width="120px">
|
||||
|
@ -9,7 +10,7 @@
|
|||
{{ bindName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="绑定卡号">
|
||||
<el-select v-model="form.blt" filterable style="width: 100%" :disabled="dis">
|
||||
<el-select v-model="form.code" filterable style="width: 100%" :disabled="bindType == 20">
|
||||
<el-option
|
||||
v-for="item in bltList"
|
||||
:key="item.code"
|
||||
|
@ -36,11 +37,10 @@
|
|||
components: {},
|
||||
props: {
|
||||
bindType: {
|
||||
// 接受外部v-model传入的值
|
||||
type: String,
|
||||
type: Number,
|
||||
},
|
||||
bindName: {
|
||||
type: Number,
|
||||
type: String,
|
||||
},
|
||||
bindEmployee: {
|
||||
type: String,
|
||||
|
@ -53,43 +53,26 @@
|
|||
return {
|
||||
form: {
|
||||
type: 10,
|
||||
blt: "",
|
||||
code: "",
|
||||
employee: "",
|
||||
},
|
||||
pageShow:true,
|
||||
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;
|
||||
},
|
||||
|
||||
created(){
|
||||
this.getBltList();
|
||||
this.pageShow = true;
|
||||
this.form.type = this.bindType;
|
||||
this.EemployeeName = this.bindName;
|
||||
this.form.code = this.bindBtl;
|
||||
this.form.employee = this.bindEmployee;
|
||||
if(this.bindType==10 ){
|
||||
this.form.code = ''
|
||||
}
|
||||
},
|
||||
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) => {
|
||||
|
@ -100,29 +83,18 @@
|
|||
});
|
||||
},
|
||||
|
||||
//加载人员
|
||||
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);
|
||||
that.pageShow=false;
|
||||
that.$emit('success',false);
|
||||
}
|
||||
});
|
||||
},
|
||||
closeDrawer(){
|
||||
this.pageShow=false;
|
||||
this.$emit('closed',false);
|
||||
},
|
||||
},
|
||||
|
|
|
@ -936,8 +936,8 @@ export default {
|
|||
let that = this;
|
||||
let type = event.nodeType.toString();
|
||||
console.log(type === 'Symbol(icontextmaker)');
|
||||
debugger;
|
||||
console.log(item)
|
||||
// debugger;
|
||||
// console.log(item)
|
||||
if (item.markers.length > 0) {
|
||||
if (type === 'Symbol(boxmarker)') {
|
||||
this.screenJob = false;
|
||||
|
@ -1158,12 +1158,10 @@ export default {
|
|||
})
|
||||
},
|
||||
getAreaList() {
|
||||
debugger;
|
||||
let that = this;
|
||||
that.$API.am.area.list.req({page:0}).then(res => {
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
debugger;
|
||||
that.areaList = res;
|
||||
}
|
||||
})
|
||||
|
@ -1475,61 +1473,64 @@ export default {
|
|||
},
|
||||
//人员
|
||||
showUserMarkers(userList) {
|
||||
// debugger;
|
||||
let that = this;
|
||||
//人员mark
|
||||
let iconTextMarker = null;
|
||||
//标记图片
|
||||
let userImage = '';
|
||||
if (userList.length > 0) {
|
||||
// debugger;
|
||||
console.log(userList);
|
||||
// debugger;
|
||||
let lng = [114.62923138539462, 114.6315404372349];//经度
|
||||
let i = 0;
|
||||
iconTextMarker = userList[0].mac;
|
||||
let employee_ = userList[0].my_info.employee_;
|
||||
employee_.mac = userList[0].mac;
|
||||
console.log(userList[0].my_info.employee_.type)
|
||||
// debugger;
|
||||
if (userList[0].my_info.employee_.type === 'employee') {
|
||||
userImage = "/img/employee.png"
|
||||
} else if (serList[0].my_info.employee_.type === 'remployee') {
|
||||
userImage = "/img/employee.png"
|
||||
} else {
|
||||
userImage = "/img/visitor.png"
|
||||
}
|
||||
that.userMarker[iconTextMarker] = new jsmap.JSIconTextMarker({
|
||||
id: userList[0].my_info.code,
|
||||
position: { x: 114.62923138539462, y: 38.8133418942645, z: 0 }, //坐标
|
||||
floorId: 1, //楼层id,默认为1(地面)
|
||||
image: userImage,
|
||||
text: employee_.name,
|
||||
font: '10px sans-serif',
|
||||
fontColor: '#ffffff',
|
||||
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_
|
||||
},
|
||||
});
|
||||
that.userMaskerLayer.addMarker(that.userMarker[iconTextMarker]);
|
||||
setInterval(function () {
|
||||
i = (i + 1) % 2;
|
||||
that.userMaskerLayer.updateMarkerPosition(that.userMarker[iconTextMarker], {
|
||||
floorId: 1,
|
||||
position: { x: lng[i], y: 38.8133418942642, z: 0 },
|
||||
animate: { duration: 10000, }
|
||||
});//动画效果,持续时间一秒
|
||||
}, 11000)
|
||||
userList.forEach(item=>{
|
||||
let employee_ = item.my_info.employee_;
|
||||
employee_.mac = item.mac;
|
||||
console.log(item.my_info.employee_.type)
|
||||
let employeeType = item.my_info.employee_.type
|
||||
if (employeeType === 'employee') {
|
||||
userImage = "/img/employee.png"
|
||||
}else if (employeeType === 'driver') {
|
||||
userImage = "/img/visitor.png"
|
||||
} else if (employeeType === 'remployee') {
|
||||
userImage = "/img/employee.png"
|
||||
}else {
|
||||
userImage = "/img/visitor.png"
|
||||
}
|
||||
debugger;
|
||||
console.log(item.longitude);
|
||||
console.log(item.latitude);
|
||||
let x=item.longitude;
|
||||
let y=item.latitude;
|
||||
that.userMarker[item.mac] = new jsmap.JSIconTextMarker({
|
||||
id: item.my_info.code,
|
||||
position: { x: x, y: y, z: 0 }, //坐标
|
||||
floorId: 1, //楼层id,默认为1(地面)
|
||||
image: userImage,
|
||||
text: employee_.name,
|
||||
font: '10px sans-serif',
|
||||
fontColor: '#ffffff',
|
||||
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_
|
||||
},
|
||||
});
|
||||
that.userMaskerLayer.addMarker(that.userMarker[item.mac]);
|
||||
})
|
||||
|
||||
// setInterval(function () {
|
||||
// i = (i + 1) % 2;
|
||||
// that.userMaskerLayer.updateMarkerPosition(that.userMarker[iconTextMarker], {
|
||||
// floorId: 1,
|
||||
// position: { x: lng[i], y: 38.8133418942642, z: 0 },
|
||||
// animate: { duration: 10000, }
|
||||
// });//动画效果,持续时间一秒
|
||||
// }, 11000)
|
||||
}
|
||||
/*setInterval(function () {
|
||||
that.refreshUserMarker();
|
||||
|
@ -1737,7 +1738,7 @@ export default {
|
|||
getVchannels() {
|
||||
let that = this;
|
||||
// debugger;
|
||||
that.$API.am.tdevice.vchannel.req({pageSize:999}).then(res => {
|
||||
that.$API.am.tdevice.vchannel.req({page_size:999}).then(res => {
|
||||
if (res.err_msg) {
|
||||
that.$message.error(res.err_msg);
|
||||
} else {
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
|
||||
<ScBind v-model="showBindBlt" :bindBtl="bindBtl" :bindType="bindType" :bindName="bindName" :bindEmployee="bindEmployee"></ScBind>
|
||||
<ScBind v-if="showBindBlt" :bindBtl="bindBtl" :bindType="bindType" :bindName="bindName" :bindEmployee="bindEmployee" @closed="closed"></ScBind>
|
||||
<!-- <el-Dialog
|
||||
title="绑定定位卡"
|
||||
v-model="showBindBlt"
|
||||
|
@ -333,6 +333,10 @@ export default {
|
|||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
closed(data){
|
||||
this.showBindBlt = false;
|
||||
},
|
||||
|
||||
getBltList() {
|
||||
let that = this;
|
||||
that.$API.third.tdevice.list.req({ type: 30, page: 0 }).then((res) => {
|
||||
|
@ -351,7 +355,7 @@ export default {
|
|||
this.bindType = type;
|
||||
this.bindEmployee = row.id;
|
||||
if (type === 20) {
|
||||
this.bindBtl = row.blt_.mac;
|
||||
this.bindBtl = row.blt_.code;
|
||||
}
|
||||
this.showBindBlt = true;
|
||||
},
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
|
||||
showBindBltClose(data){
|
||||
debugger;
|
||||
this.showBindBlt = data
|
||||
this.showBindBlt = false;
|
||||
},
|
||||
//访客接待人
|
||||
|
||||
|
|
Loading…
Reference in New Issue