Merge branch 'ehs' of https://e.coding.net/ctcdevteam/ehs/ehs_web into ehs
This commit is contained in:
commit
986c09bc22
|
@ -2,6 +2,7 @@
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="绑定定位卡"
|
title="绑定定位卡"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
|
v-model="pageShow"
|
||||||
@closed="closeDrawer"
|
@closed="closeDrawer"
|
||||||
>
|
>
|
||||||
<el-form ref="dialogForm" :model="form" label-width="120px">
|
<el-form ref="dialogForm" :model="form" label-width="120px">
|
||||||
|
@ -9,7 +10,7 @@
|
||||||
{{ bindName }}
|
{{ bindName }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="绑定卡号">
|
<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
|
<el-option
|
||||||
v-for="item in bltList"
|
v-for="item in bltList"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
|
@ -36,11 +37,10 @@
|
||||||
components: {},
|
components: {},
|
||||||
props: {
|
props: {
|
||||||
bindType: {
|
bindType: {
|
||||||
// 接受外部v-model传入的值
|
type: Number,
|
||||||
type: String,
|
|
||||||
},
|
},
|
||||||
bindName: {
|
bindName: {
|
||||||
type: Number,
|
type: String,
|
||||||
},
|
},
|
||||||
bindEmployee: {
|
bindEmployee: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -53,43 +53,26 @@
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
type: 10,
|
type: 10,
|
||||||
blt: "",
|
code: "",
|
||||||
employee: "",
|
employee: "",
|
||||||
},
|
},
|
||||||
|
pageShow:true,
|
||||||
bltList: [],
|
bltList: [],
|
||||||
EemployeeName:'',
|
EemployeeName:'',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
created(){
|
||||||
this.form.type = this.$route.query.bindType;
|
this.getBltList();
|
||||||
this.EemployeeName = this.$route.query.bindName;
|
this.pageShow = true;
|
||||||
this.form.blt = this.$route.query.bindBtl;
|
this.form.type = this.bindType;
|
||||||
this.form.employee = this.$route.query.bindEmployee;
|
this.EemployeeName = this.bindName;
|
||||||
},
|
this.form.code = this.bindBtl;
|
||||||
|
this.form.employee = this.bindEmployee;
|
||||||
|
if(this.bindType==10 ){
|
||||||
|
this.form.code = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
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() {
|
getBltList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.third.tdevice.list.req({ type: 30, page: 0 }).then((res) => {
|
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() {
|
submitBindBlt() {
|
||||||
let that = this;
|
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) => {
|
that.$API.third.tdevice.bltBind.req(this.form).then((res) => {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
} else {
|
} else {
|
||||||
that.showBindBlt = false;
|
that.pageShow=false;
|
||||||
that.$emit('success',false);
|
that.$emit('success',false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
closeDrawer(){
|
closeDrawer(){
|
||||||
|
this.pageShow=false;
|
||||||
this.$emit('closed',false);
|
this.$emit('closed',false);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -936,8 +936,8 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
let type = event.nodeType.toString();
|
let type = event.nodeType.toString();
|
||||||
console.log(type === 'Symbol(icontextmaker)');
|
console.log(type === 'Symbol(icontextmaker)');
|
||||||
debugger;
|
// debugger;
|
||||||
console.log(item)
|
// console.log(item)
|
||||||
if (item.markers.length > 0) {
|
if (item.markers.length > 0) {
|
||||||
if (type === 'Symbol(boxmarker)') {
|
if (type === 'Symbol(boxmarker)') {
|
||||||
this.screenJob = false;
|
this.screenJob = false;
|
||||||
|
@ -1158,12 +1158,10 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAreaList() {
|
getAreaList() {
|
||||||
debugger;
|
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.am.area.list.req({page:0}).then(res => {
|
that.$API.am.area.list.req({page:0}).then(res => {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
} else {
|
} else {
|
||||||
debugger;
|
|
||||||
that.areaList = res;
|
that.areaList = res;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1475,61 +1473,64 @@ export default {
|
||||||
},
|
},
|
||||||
//人员
|
//人员
|
||||||
showUserMarkers(userList) {
|
showUserMarkers(userList) {
|
||||||
|
// debugger;
|
||||||
let that = this;
|
let that = this;
|
||||||
//人员mark
|
|
||||||
let iconTextMarker = null;
|
|
||||||
//标记图片
|
//标记图片
|
||||||
let userImage = '';
|
let userImage = '';
|
||||||
if (userList.length > 0) {
|
if (userList.length > 0) {
|
||||||
// debugger;
|
userList.forEach(item=>{
|
||||||
console.log(userList);
|
let employee_ = item.my_info.employee_;
|
||||||
// debugger;
|
employee_.mac = item.mac;
|
||||||
let lng = [114.62923138539462, 114.6315404372349];//经度
|
console.log(item.my_info.employee_.type)
|
||||||
let i = 0;
|
let employeeType = item.my_info.employee_.type
|
||||||
iconTextMarker = userList[0].mac;
|
if (employeeType === 'employee') {
|
||||||
let employee_ = userList[0].my_info.employee_;
|
userImage = "/img/employee.png"
|
||||||
employee_.mac = userList[0].mac;
|
}else if (employeeType === 'driver') {
|
||||||
console.log(userList[0].my_info.employee_.type)
|
userImage = "/img/visitor.png"
|
||||||
// debugger;
|
} else if (employeeType === 'remployee') {
|
||||||
if (userList[0].my_info.employee_.type === 'employee') {
|
userImage = "/img/employee.png"
|
||||||
userImage = "/img/employee.png"
|
}else {
|
||||||
} else if (serList[0].my_info.employee_.type === 'remployee') {
|
userImage = "/img/visitor.png"
|
||||||
userImage = "/img/employee.png"
|
}
|
||||||
} else {
|
debugger;
|
||||||
userImage = "/img/visitor.png"
|
console.log(item.longitude);
|
||||||
}
|
console.log(item.latitude);
|
||||||
that.userMarker[iconTextMarker] = new jsmap.JSIconTextMarker({
|
let x=item.longitude;
|
||||||
id: userList[0].my_info.code,
|
let y=item.latitude;
|
||||||
position: { x: 114.62923138539462, y: 38.8133418942645, z: 0 }, //坐标
|
that.userMarker[item.mac] = new jsmap.JSIconTextMarker({
|
||||||
floorId: 1, //楼层id,默认为1(地面)
|
id: item.my_info.code,
|
||||||
image: userImage,
|
position: { x: x, y: y, z: 0 }, //坐标
|
||||||
text: employee_.name,
|
floorId: 1, //楼层id,默认为1(地面)
|
||||||
font: '10px sans-serif',
|
image: userImage,
|
||||||
fontColor: '#ffffff',
|
text: employee_.name,
|
||||||
imageHeight: 25,
|
font: '10px sans-serif',
|
||||||
imageWidth: 25,
|
fontColor: '#ffffff',
|
||||||
backgroundColor: 'rgba(0,0,0,0.3)',
|
imageHeight: 25,
|
||||||
backgroundRadius: 1,
|
imageWidth: 25,
|
||||||
backgroundStrokeColor: 'rgba(0,0,0,0.3)',
|
backgroundColor: 'rgba(0,0,0,0.3)',
|
||||||
backgroundStrokeWidth: 1,
|
backgroundRadius: 1,
|
||||||
iconTextType: jsmap.JSIconTextType.TOPTEXT_BOTTOMICON,
|
backgroundStrokeColor: 'rgba(0,0,0,0.3)',
|
||||||
allowPicking: true,
|
backgroundStrokeWidth: 1,
|
||||||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),
|
iconTextType: jsmap.JSIconTextType.TOPTEXT_BOTTOMICON,
|
||||||
nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
|
allowPicking: true,
|
||||||
show: true,
|
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),
|
||||||
properties: {
|
nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
|
||||||
employee: employee_
|
show: true,
|
||||||
},
|
properties: {
|
||||||
});
|
employee: employee_
|
||||||
that.userMaskerLayer.addMarker(that.userMarker[iconTextMarker]);
|
},
|
||||||
setInterval(function () {
|
});
|
||||||
i = (i + 1) % 2;
|
that.userMaskerLayer.addMarker(that.userMarker[item.mac]);
|
||||||
that.userMaskerLayer.updateMarkerPosition(that.userMarker[iconTextMarker], {
|
})
|
||||||
floorId: 1,
|
|
||||||
position: { x: lng[i], y: 38.8133418942642, z: 0 },
|
// setInterval(function () {
|
||||||
animate: { duration: 10000, }
|
// i = (i + 1) % 2;
|
||||||
});//动画效果,持续时间一秒
|
// that.userMaskerLayer.updateMarkerPosition(that.userMarker[iconTextMarker], {
|
||||||
}, 11000)
|
// floorId: 1,
|
||||||
|
// position: { x: lng[i], y: 38.8133418942642, z: 0 },
|
||||||
|
// animate: { duration: 10000, }
|
||||||
|
// });//动画效果,持续时间一秒
|
||||||
|
// }, 11000)
|
||||||
}
|
}
|
||||||
/*setInterval(function () {
|
/*setInterval(function () {
|
||||||
that.refreshUserMarker();
|
that.refreshUserMarker();
|
||||||
|
@ -1737,7 +1738,7 @@ export default {
|
||||||
getVchannels() {
|
getVchannels() {
|
||||||
let that = this;
|
let that = this;
|
||||||
// debugger;
|
// 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) {
|
if (res.err_msg) {
|
||||||
that.$message.error(res.err_msg);
|
that.$message.error(res.err_msg);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
></save-dialog>
|
></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
|
<!-- <el-Dialog
|
||||||
title="绑定定位卡"
|
title="绑定定位卡"
|
||||||
v-model="showBindBlt"
|
v-model="showBindBlt"
|
||||||
|
@ -333,6 +333,10 @@ export default {
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
},
|
},
|
||||||
|
closed(data){
|
||||||
|
this.showBindBlt = false;
|
||||||
|
},
|
||||||
|
|
||||||
getBltList() {
|
getBltList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.third.tdevice.list.req({ type: 30, page: 0 }).then((res) => {
|
that.$API.third.tdevice.list.req({ type: 30, page: 0 }).then((res) => {
|
||||||
|
@ -351,7 +355,7 @@ export default {
|
||||||
this.bindType = type;
|
this.bindType = type;
|
||||||
this.bindEmployee = row.id;
|
this.bindEmployee = row.id;
|
||||||
if (type === 20) {
|
if (type === 20) {
|
||||||
this.bindBtl = row.blt_.mac;
|
this.bindBtl = row.blt_.code;
|
||||||
}
|
}
|
||||||
this.showBindBlt = true;
|
this.showBindBlt = true;
|
||||||
},
|
},
|
||||||
|
|
|
@ -203,7 +203,7 @@
|
||||||
|
|
||||||
showBindBltClose(data){
|
showBindBltClose(data){
|
||||||
debugger;
|
debugger;
|
||||||
this.showBindBlt = data
|
this.showBindBlt = false;
|
||||||
},
|
},
|
||||||
//访客接待人
|
//访客接待人
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue