zhangyu пре 4 година
родитељ
комит
305c3aa063

+ 2 - 2
src/components/dialogs/changeRea.vue

@@ -16,7 +16,7 @@
         </div> -->
         <el-radio-group v-model="radio" style="width:100%;">
           <el-table :data="tableData" style="width: 100%" height="300px">
-            <el-table-column label="资产名称">
+            <el-table-column label="资产名称" show-overflow-tooltip>
               <template slot-scope="scope">
                 <el-radio :label="scope.row.id" :ref="scope.row.id" :value="scope.row.localName || scope.row.name">
                   {{ scope.row.localName || scope.row.name }}
@@ -169,7 +169,7 @@ export default {
       }
       //名称和编码
       if (this.search) {
-        param.filters += `;localName contain '${this.search}' || localId contain '${this.search}'`
+        param.filters += `;name contain '${this.search}' || localName contain '${this.search}' || localId contain '${this.search}'`
       }
       queryProperty(param, res => {
         this.tableData = res.content

+ 7 - 1
src/components/ledger/details/detail/exhibitionEnergy.vue

@@ -5,7 +5,7 @@
         <h4 class="base">{{key}}</h4>
         <div class="table-dynamic" v-for="(value,keys,index) in val.paths">
           <div class="table-title"> {{ value.InfoPointName }}:</div>
-          <p :style="{'color':value.value? '' :'#F56C6C'}">{{ value.value ? `${value.value}` : '未维护' }}</p>
+          <p class="iot_data" :style="{'color':value.value? '' :'#F56C6C'}" :title="value.value ? `${value.value}` : '未维护'">{{ value.value ? `${value.value}` : '未维护' }}</p>
           <p v-if="value.data == '0'">{{ value.data }}{{ value.Unit }}</p>
           <p v-else-if="value.data">{{ value.data }}{{ value.Unit }}</p>
           <!--          <p v-else-if="value.error">{{value.error}}</p>-->
@@ -80,6 +80,12 @@
       box-sizing: border-box;
     }
 
+    .iot_data {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+
     .table-title {
       float: left;
       max-width: 200px;

+ 1 - 0
src/components/ledger/lib/uploadImgsName.vue

@@ -29,6 +29,7 @@
       <!--      v-if="!readOnly && imagesArr.length < max"-->
       <div style="float:left;">
         <el-upload
+        	v-show="!readOnly"
           class="avatar-uploader"
           :http-request="uploadAndSubmit"
           :show-file-list="false"

+ 1 - 0
src/components/model/file/addFloorDialog.vue

@@ -50,6 +50,7 @@
               style="margin-left:10px;"
               v-model="form.floorNum"
               :min="1"
+              :max="999"
               :disabled="form.floorTypeVal == 'RF'"
               @change="handleChange"
             ></el-input-number>

+ 1 - 1
src/components/model/file/floorTable.vue

@@ -14,7 +14,7 @@
           <span style="margin-left: 10px">{{ scope.row.FloorName }}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="Note" label="备注" width="240"></el-table-column>
+      <el-table-column prop="Note" label="备注" :show-overflow-tooltip="true" width="240"></el-table-column>
       <el-table-column label="版本号">
         <template slot-scope="scope">
           <span style="margin-right: 5px">{{ scope.row.Version }}</span>

+ 1 - 1
src/views/ledger/facility/addfacility.vue

@@ -230,7 +230,7 @@ export default {
             item.SystemList.push(t.id)
           })
         }
-        item.propertyId = !!item.checked;
+        item.propertyId = item.checked;
         item.classCode = this.category.deviceId;
       })
       if (flag) {

+ 44 - 34
src/views/ledger/facility/batchPoint.vue

@@ -4,7 +4,7 @@
 			<el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goback"></el-button>
 			<div id="buildFloor">
                 <span class="buildFloor">建筑楼层</span>
-                <el-cascader ref="floorCascader" placeholder="请选择" :props="props" :options="bfOptions" filterable size="small" @change="changeFloor"></el-cascader>
+                <el-cascader ref="floorCascader" placeholder="请选择" :props="props" v-model="floorValue" :options="bfOptions" filterable size="small" @change="changeFloor"></el-cascader>
             </div>
 			<my-cascader ref="cascader" @change="changeDevice"></my-cascader>
 			<el-button type="primary" size="mini" @click="handleClickSave" :disabled="!isChange" style="float:right;">确认</el-button>
@@ -111,6 +111,8 @@ export default {
             left: 0,
         },
         selectedIcon: null,
+        floorValue: "",
+        oldFloorValue: "",
 		buildId: "", //建筑Id
 		floorId: "", //楼层Id
 		floorMap: "", //楼层平面图地址
@@ -219,7 +221,7 @@ export default {
       })
     },
     // 二次确认
-    confirm(callback) {
+    confirm(callback, cancel) {
         if (this.isChange) {
             this.$confirm('平面图数据未保存,此操作将不会保存修改数据!', '提示', {
                 confirmButtonText: '确定',
@@ -227,6 +229,8 @@ export default {
                 type: 'warning'
             }).then(() => {
                 callback();
+            }). catch(() => {
+                cancel();
             });
         } else {
             callback();
@@ -410,38 +414,44 @@ export default {
 	},
     //修改楼层
     changeFloor(value) {
-		this.showCanvas = false;
-		this.clearGraphy();
-		if (value[0]) {
-			this.buildId = value[0];
-		}
-		if (value[1]) {
-			this.floorId = value[1];
-            this.floorData = this.fIdToFloor[value[1]];
-		} else {
-			this.floorId = "";
-            this.floorData = {}
-        }
-		if (this.floorData.infos && this.floorData.infos.floorMap) {
-			this.floorMap = this.floorData.infos.floorMap;
-			this.showCanvas = true;
-			this.getGraphy();
-		} else {
-			this.initParams();
-			this.floorMap = "";
-        }
-        if (this.floorData.infos && this.floorData.infos.height) {
-            this.maxHeight = this.floorData.infos.height;
-            this.minHeight = -(this.floorData.infos.height);
-        } else {
-            this.maxHeight = 99000;
-            this.minHeight = -99000;
-        }
-		if (this.floorData.outline && this.floorData.outline.length) {
-			this.floorOutline = this.floorData.outline;
-		} else {
-			this.floorOutline = null;
-		}
+        this.confirm(() => {         
+            this.oldFloorValue = value;
+            this.isChange = false;
+            this.showCanvas = false;
+            this.clearGraphy();
+            if (value[0]) {
+                this.buildId = value[0];
+            }
+            if (value[1]) {
+                this.floorId = value[1];
+                this.floorData = this.fIdToFloor[value[1]];
+            } else {
+                this.floorId = "";
+                this.floorData = {}
+            }
+            if (this.floorData.infos && this.floorData.infos.floorMap) {
+                this.floorMap = this.floorData.infos.floorMap;
+                this.showCanvas = true;
+                this.getGraphy();
+            } else {
+                this.initParams();
+                this.floorMap = "";
+            }
+            if (this.floorData.infos && this.floorData.infos.height) {
+                this.maxHeight = this.floorData.infos.height;
+                this.minHeight = -(this.floorData.infos.height);
+            } else {
+                this.maxHeight = 99000;
+                this.minHeight = -99000;
+            }
+            if (this.floorData.outline && this.floorData.outline.length) {
+                this.floorOutline = this.floorData.outline;
+            } else {
+                this.floorOutline = null;
+            }
+        }, () => {
+            this.floorValue = this.oldFloorValue;
+        })
 	},
     //修改设备族
     changeDevice(value) {

+ 2 - 2
src/views/ledger/facility/partsmanage/addparts/index.vue

@@ -208,12 +208,12 @@ export default {
       }
       let flag = false;
       newData.map(item => {
-        if (item.Checked && !item.localName) {
+        if (!item.localName || !item.localId) {
           flag = true;
         }
       })
       if (flag) {
-        this.$message.info("存在设备的本地名称为空,请检查")
+        this.$message.info("存在设备的本地名称或本地编码为空,请检查")
         return;
       }