Commit 09800889 by 张杰

修复bug

1 parent 98a54dcd
......@@ -23,7 +23,7 @@
<div class="ibox-content scrollbar" style="padding: 30px 20px;">
<el-form ref="fenceForm" :model="form" :rules="rules" :inline="false" size="mini" label-width="100px" class="fence_form" align="left">
<el-form-item label="围栏名称" prop="fenceName">
<el-input v-model.trim="form.fenceName" placeholder="请输入围栏名称" maxlength="200" show-word-limit :disabled="readonlyStatus"></el-input>
<el-input v-model.trim="form.fenceName" placeholder="请输入围栏名称" minlength="2" maxlength="200" show-word-limit :disabled="readonlyStatus"></el-input>
</el-form-item>
<el-form-item label="监控类型" prop="triggerType">
<el-select v-model="form.triggerType" placeholder="请选择" size="small">
......@@ -286,7 +286,7 @@ export default {
rules: {
fenceName: [
{ required: true, message: "请输入围栏名称", trigger: "blur" },
{ pattern: /^\S{2,200}$/, message: "至少2字", trigger: "blur" },
{ min:2,max:200, message: "至少2字", trigger: "blur" },
// {validator: checkFenceName, trigger: 'blur'}
],
triggerType: [
......@@ -687,6 +687,9 @@ export default {
obj.lng = lnglat[0];
obj.lat = lnglat[1];
}
if(obj.areaCode){
obj.areaCode = [obj.areaCode]
}
_this.form = obj;
mapData.fenceType = _typeList[obj.shapeType];
......
......@@ -217,14 +217,14 @@ export default {
mounted() {
//store.dispatch("setFullsize", true);
},
// watch: {
// "form.shapeType": {
// handler: function (n, o) {
// this.changeShapeType(n);
// },
// immediate: true,
// },
// },
watch: {
"form.shapeType": {
handler: function (n, o) {
this.changeShapeType(n);
},
immediate: true,
},
},
methods: {
// 初始化地图
initMap() {
......@@ -289,7 +289,7 @@ export default {
}
showToast({
message: "保存成功",
type: "success",
type: "success"
});
})
.catch((error) => {
......
......@@ -639,12 +639,9 @@ export default {
}
};
},
// 搜索车架号、设备号、工单号
searchSubmit() {
/* this.addMonitor({
sn: '75108160001'
})
return */
//if(!this.searchText) return;
switch (this.searchType) {
case "1":
case "2":
......@@ -704,6 +701,8 @@ export default {
}
}); */
},
// 根据搜索条件查询组织树结构
querySearch() {
let _this = this;
//this.autocompleteHide = true
......@@ -718,22 +717,14 @@ export default {
if (!list || list.length <= 0) {
return false;
}
for (var i = 0, len = list.length; i < len; i++) {
_this.handleSelect(list[i]);
}
//cb(res.data)
// if(!res.data.length) {
// cb([{
// tip: '无数据'
// }])
// }
//this.autocompleteHide = false
});
}
},
// 查询树node
// 查询树node层级
handleSelect(item) {
if (!item.tip) {
MONITOR_SERVICE.getVehicleTree({
......
......@@ -60,7 +60,7 @@ export const Util = {
Message({
message: options.message || '提示',
type: options.type || 'error',
duration: options.time || 2000,
duration: options.duration||options.time || 2000,
onClose: options.onClose || '',
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!