Commit d6e86d74 by 张杰

修复bug

1 parent b496f611
......@@ -53,6 +53,10 @@ export default {
return request(params, '/usercenter/organization/orgtree')
},
getWifiLocationBySn(params = {}) {
return request(params,"track/getWifiLocationBySn");
},
// 根据sn 获取围栏信息接口
getFenceInfo(params) {
......
......@@ -286,7 +286,7 @@ export default {
rules: {
fenceName: [
{ required: true, message: "请输入围栏名称", trigger: "blur" },
{ min:2,max:200, message: "至少2字", trigger: "blur" },
{ min: 2, max: 200, message: "至少2字", trigger: "blur" },
// {validator: checkFenceName, trigger: 'blur'}
],
triggerType: [
......@@ -440,11 +440,16 @@ export default {
return false;
}
_this.submitting = true;
let oParams = _this.getParams();
if (oParams.snList.length > 2000) {
showToast({
message: "最多关联2000个设备",
});
return false;
}
_this.submitting = true;
console.log(oParams);
// 编辑围栏
if (_this.fenceId) {
UPDATE_ELECFENCE_INFO(oParams)
......@@ -523,7 +528,7 @@ export default {
if (form.shapeType == 1) {
oParams.radius = form.radius;
oParams.lnglat = `${form.lng},${form.lat}`;
oParams.analysisAddress = form.analysisAddress
oParams.analysisAddress = form.analysisAddress;
}
// 多边形围栏
......@@ -688,8 +693,8 @@ export default {
obj.lng = lnglat[0];
obj.lat = lnglat[1];
}
if(obj.areaCode){
obj.areaCode = [obj.areaCode]
if (obj.areaCode) {
obj.areaCode = [obj.areaCode];
}
_this.form = obj;
......
......@@ -71,6 +71,17 @@
</el-scrollbar>
</div>
<!-- <el-alert v-show="showSuccessTips" :title="`保存成功,页面将在${timer}秒后自动关闭`" type="success" :closable="false" show-icon class="show_success_tips"></el-alert> -->
<el-dialog title="提示" custom-class="monitor_dialog" :visible.sync="showSuccessTips" width="30%" append-to-body :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false">
<div class="monitor_dialog_content">
<i class="el-icon-circle-check"></i>
<span class="">{{`保存成功,页面将在${timer}秒后自动关闭`}}</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="closePage">立即关闭</el-button>
</span>
</el-dialog>
</div>
</template>
</v-full-layout>
......@@ -210,6 +221,8 @@ export default {
polygonPath: [],
deviceInfo: {}, // 设备信息
deviceList: [], // 设备列表
showSuccessTips: false,
timer: 5,
};
},
created() {
......@@ -290,10 +303,17 @@ export default {
});
return false;
}
showToast({
message: "保存成功",
type: "success",
});
_this.showSuccessTips = true;
let tipInterval = setInterval(function () {
if (_this.timer == 0) {
clearInterval(tipInterval);
_this.showSuccessTips = false;
_this.timer = 5;
window.close();
return false;
}
_this.timer -= 1;
}, 1000);
})
.catch((error) => {
_this.isSubmitting = false;
......@@ -469,8 +489,17 @@ export default {
});
return false;
}
EventBus.$emit("uiMap.fence.updateFenceRadius", { fenceType:'circle',radius: e });
EventBus.$emit("uiMap.fence.updateFenceRadius", {
fenceType: "circle",
radius: e,
});
},
// 关闭标签页
closePage(){
window.close()
}
},
};
</script>
......@@ -524,4 +553,33 @@ export default {
}
}
}
.show_success_tips {
position: absolute;
width: auto;
top: 0;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
}
.monitor_dialog_content{
display: flex;
align-items: center;
justify-content: center;
font-size:14px;
i{
font-size:24px;
color:#67C23A;
margin:0 10px;
}
}
</style>
<style lang="scss">
.monitor_dialog{
.el-dialog__header{
padding:10px !important;
}
.el-dialog__footer{
padding:10px !important;
}
}
</style>
\ No newline at end of file
......@@ -186,12 +186,14 @@ export default {
this.$emit("onUserListInit", false);
}
},
// 全选
checkedAll(newVal) {
if (newVal) {
this.resultList.forEach((item) => {
item.checked = true;
item.sn = item.sns;
const findItem = this.chosenList.find((o) => o.vin === item.vin);
const findItem = this.chosenList.find((o) => o.sn === item.sns);
if (!findItem) {
this.chosenList.push(item);
}
......@@ -200,10 +202,8 @@ export default {
} else {
this.resultList.forEach((item) => {
item.checked = false;
const findItem = this.chosenList.find((o) => o.vin === item.vin);
if (findItem) {
this.chosenList.splice(this.chosenList.indexOf(findItem), 1);
}
//const findItem = this.chosenList.find((o) => o.sn === item.sns);
this.chosenList = this.chosenList.filter((k) => k.sns != item.sns);
});
}
},
......
......@@ -583,7 +583,6 @@ MapService.prototype = {
_html += `<p><i class="icon_info_plate"></i>车牌号: <span class="des">${info.licensePlate || '--'}</span></p>`;
}
_html += `<p><i class="icon icon-info_device"></i> 设备号:<span class="des"> ${info.sn} (${info.isSource === '1' ? '有线' : '无线'})</span>
<span class="battery" data-battery>
<i class="fill"><i class="fill-percentage" data-battery-percentage></i></i>
......@@ -605,17 +604,17 @@ MapService.prototype = {
(info.eLocateType === 'gpsLocation' ?
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
<button type="button" class="el-button el-button--mini" data-wifi style="display:none">wifi</button>
</span>`:
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>
<button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
<button type="button" class="el-button el-button--mini" data-wifi style="display:none">wifi</button>
</span>`
) :
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini" data-base>基站</button>
<button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
<button type="button" class="el-button el-button--mini" data-wifi style="display:none">wifi</button>
</span>`
) :
info.eLocateSingle ?
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!