Explorar o código

Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType

haojianlong %!s(int64=3) %!d(string=hai) anos
pai
achega
11c5f0da05

+ 10 - 2
src/components/data_admin/buildTask/dialog/modelTaskDialog.vue

@@ -2,14 +2,13 @@
   <el-dialog :title="title" :visible.sync="dialogVisible" :before-close="handleClose" width="900px" id="addEqDialog">
     <div class="table-box">
       <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle"
-                ref="multipleTable"
+                ref="multipleTable" :row-class-name="getRowClassName"
                 @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55"></el-table-column>
         <el-table-column type="expand">
           <template slot-scope="props">
             <p v-if="props.row.ComponentCount && props.row.ComponentCount.length"
                style="color:#99a9bf;line-height:32px;font-size:14px;">包含的部件:</p>
-            <p v-else style="color:#99a9bf;line-height:32px;font-size:14px;">无部件信息</p>
             <el-form label-position="left" label-width="auto" inline class="demo-table-expand"
                      v-if="props.row.ComponentCount && props.row.ComponentCount.length">
               <el-form-item v-for="item in props.row.ComponentCount?props.row.ComponentCount:[]" :key="item.code"
@@ -211,6 +210,11 @@ export default {
       })
       this.page.total = res.total
     },
+    getRowClassName({row, rowIndex}){
+        if (!(row.ComponentCount && row.ComponentCount.length)) {
+            return 'row-expand-cover';
+        }
+    },
     //选中项修改
     handleSelectionChange(val) {
       this.selections = val;
@@ -305,6 +309,10 @@ export default {
   color: #99a9bf;
 }
 
+.row-expand-cover .el-table__expand-icon{
+    visibility:hidden;
+}
+
 .demo-table-expand .el-form-item {
   margin-right: 0;
   margin-bottom: 0;

+ 8 - 2
src/views/data_admin/buildAssets/report.vue

@@ -20,7 +20,7 @@
 </template>
 
 <script>
-  import {mapState} from "vuex";
+  import { mapState, mapGetters } from "vuex";
 
   export default {
     name: "report",
@@ -30,11 +30,17 @@
       }
     },
     computed: {
-      ...mapState('layout', ['errorReport'])
+        ...mapGetters('layout', ['projectId']),
+        ...mapState('layout', ['errorReport'])
 
     },
     created() {
       console.log("lisa gagagg",this.errorReport)
+    },
+    watch: {
+        projectId() {
+            this.$router.push({path: '/floor/abnormalprop'})
+        }
     }
 
   }

+ 10 - 2
src/views/data_admin/buildTask/addTask/addDeviceTask.vue

@@ -14,13 +14,12 @@
       <div class="main"
            :style="tableData && tableData.length?'height: calc(100% - 96px);':'height: calc(100% - 46px);'">
         <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%"
-                  @selection-change="handleSelectionChange" :header-cell-style="headerStyle">
+                  @selection-change="handleSelectionChange" :header-cell-style="headerStyle" :row-class-name="getRowClassName">
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column type="expand">
             <template slot-scope="props">
               <p v-if="props.row.ComponentCount && props.row.ComponentCount.length"
                  style="color:#99a9bf;line-height:32px;font-size:14px;">包含的部件:</p>
-              <p v-else style="color:#99a9bf;line-height:32px;font-size:14px;">无部件信息</p>
               <el-form label-position="left" label-width="auto" inline class="demo-table-expand"
                        v-if="props.row.ComponentCount && props.row.ComponentCount.length">
                 <el-form-item v-for="item in props.row.ComponentCount?props.row.ComponentCount:[]" :key="item.code"
@@ -267,6 +266,11 @@ export default {
       }
       return params
     },
+    getRowClassName({row, rowIndex}){
+        if (!(row.ComponentCount && row.ComponentCount.length)) {
+            return 'row-expand-cover';
+        }
+    },
     //选择的设备或部件
     handleSelectionChange(val) {
       this.multipleSelection = val;
@@ -347,6 +351,10 @@ export default {
   color: #99a9bf;
 }
 
+.row-expand-cover .el-table__expand-icon{
+    visibility:hidden;
+}
+
 .demo-table-expand .el-form-item {
   margin-right: 0;
   margin-bottom: 0;

+ 1 - 1
src/views/model/report/deleted.vue

@@ -41,7 +41,7 @@
             </p>
           </el-scrollbar>
         </div>
-        <div class="photo" v-for="it in item.scanTaskBase[0].taskPicList" :key='it.key' v-show="item.scanTaskBase && item.scanTaskBase[0] && item.scanTaskBase[0].taskPicList">
+        <div class="photo" v-for="it in item.scanTaskBase && item.scanTaskBase[0] && item.scanTaskBase[0].taskPicList || []" :key='it.key'>
           <div class="img-box">
             <p>{{it.name}}<span>拍摄时间:{{it.createTime | timeTransformation}}</span></p>
             <div class="img-content">

+ 2 - 2
src/views/model/report/supplement.vue

@@ -30,7 +30,7 @@
         </div>
       </div>
       <div class="content-bottom">
-        <div class="photo" v-for="(it,ind) in item.infos.nameplate" :key="ind">
+        <div class="photo" v-for="(it,ind) in item.infos && item.infos.nameplate" :key="ind">
           <p>{{ it.name }}<span>拍摄时间:{{ it.createTime | timeTransformation }}</span></p>
           <div class="img-box">
             <div class="img-content">
@@ -38,7 +38,7 @@
             </div>
           </div>
         </div>
-        <div class="photo" v-for="(photo,num) in item.infos.pic" :key="num+photo">
+        <div class="photo" v-for="(photo,num) in item.infos && item.infos.pic" :key="num+photo">
           <div class="img-box" v-if="item.infos.pic">
             <p v-if="item.infos.pic && photo.type !== 'video'">
               {{ photo.name }}<span>拍摄时间:{{ photo.createTime | timeTransformation }}</span>