Browse Source

Merge branch 'msg-sever' into dev

haojianlong 5 years ago
parent
commit
153172ccfb

+ 1 - 1
src/components/ledger/handsontables/assets.vue

@@ -5,7 +5,7 @@
         <!-- <span style="width:20px;float:left;display:block;height:20px;cursor: pointer;" @click="changeAssetsFalg">
           <i v-if="!onlyRead" class="el-icon-fa  el-icon-fa-eye"></i>
         </span> -->
-        <span>当前筛选条件下共{{page.total || '--'}}设备</span>
+        <span>当前筛选条件下共{{page.total || '--'}}资产</span>
       </div>
       <el-select v-model="onlyRead" @change="getHeaderData(mess)" style="width:100px;margin-right:20px;vertical-align:bottom;">
         <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>

+ 1 - 1
src/components/ledger/handsontables/device.vue

@@ -762,7 +762,7 @@ export default {
             await deleteEquip(param, res => {
                 this.$message.success("删除成功")
                 this.$emit('close', {code: this.deleteCode})
-                this.getTableData()
+                // this.getTableData()
             })
         },
         // 更新

+ 14 - 10
src/components/ledger/lib/cascader.vue

@@ -1,8 +1,9 @@
 <template>
   <div id="cascaderMap">
     <span class="buildFloor" style="margin-right: 12px;">设备类别</span>
-    <el-select v-model="value" placeholder="请选择" clearable :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
-      <el-option  v-for="item in options" :key="item.code" :label="item.facility" :value="item.code"></el-option>
+    <el-select v-model="value" placeholder="请选择" clearable :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small"
+      @change="changeVal">
+      <el-option v-for="item in options" :key="item.code" :label="item.facility" :value="item.code"></el-option>
     </el-select>
     <!-- <el-cascader placeholder="请选择" :options="options" v-model="value" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small"
       @change="changeVal" change-on-select></el-cascader> -->
@@ -54,12 +55,18 @@ export default {
     //修改val
     changeVal(val) {
       let value = {}
+      let flag = true;
       this.options.map(item => {
         if (item.code == val) {
+          flag = false;
           value = item
         }
       })
       this.value = val
+      if (flag) {
+        this.value = '';
+      }
+      console.log(value)
       this.$emit("change", value)
     },
     //获取当前项目下的设备类型(只拿到编码-需要过滤)
@@ -93,20 +100,17 @@ export default {
           resolve(res)
         })
       })
-      Promise.all([promise1,promise2]).then((res) => {
+      Promise.all([promise1, promise2]).then((res) => {
         let allData = res[0], data = res[1]
         this.options = this.formatOptions(allData.Content)
-        if (this.value) {
-          this.changeVal(this.value)
-        }
-        if(!this.all) {
+        if (!this.all) {
           this.content = data.Content.map(t => {
             return t.Category
           });
           this.filterForOptions();
-          if (this.value) {
-            this.changeVal(this.value)
-          }
+        }
+        if (this.value) {
+          this.changeVal(this.value)
         }
       })
     },

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

@@ -81,7 +81,7 @@ export default {
     let deviceId = this.$route.params.deviceId;
     if (deviceId) {
       this.$nextTick(() => {
-        this.$refs.cascader.changeVal(deviceId)
+        this.$refs.cascader.setValue(deviceId)
       })
     }
   },

+ 3 - 3
src/views/ledger/spacelist/index.vue

@@ -192,9 +192,9 @@ export default {
     getMutiCount() {
       getSpaceBdFlCount({}, res => {
         this.mutiCount = res.Count;
-        // if (this.mutiCount > 0) {
-        //   this.getTips();
-        // }
+        if (this.mutiCount > 0) {
+          this.getTips();
+        }
       })
     },
     // 获取关系是否需要计算