Bladeren bron

扫楼问题和二轮测试问题修改

zhangyu 3 jaren geleden
bovenliggende
commit
0016b3d41f

+ 1 - 1
src/api/scan/request.js

@@ -1252,7 +1252,7 @@ export function querySysLinkBuild(param, success) {
 
 //设备清单 - 设备关联系统 设备1-n
 export function equipLinkSys(param, success) {
-  let url = `${baseUrl}${dataCenter}/sy-in-eq/link-sy`;
+  let url = `${baseUrl}${dataCenter}/rel/sy-in-eq/link-sy`;
   http.postJson(url, param, success)
 }
 

+ 2 - 2
src/components/business_space/business/handsontable.vue

@@ -138,7 +138,7 @@ export default {
         label: '编辑模式'
       }],
       onlyRead: true,
-      showType: "",
+      showType: "Visible",
       page: {
         pageSize: 50,
         pageSizes: [10, 20, 50, 100],
@@ -901,7 +901,7 @@ export default {
         if (newName && newName[0] && newName[0].value) {
           this.showType = newName[0].value
         } else {
-          this.showType = ""
+          this.showType = "Visible"
         }
       },
       immediate: true,

+ 224 - 215
src/components/data_admin/buildTask/detail/assetsDetail.vue

@@ -1,240 +1,249 @@
 <template>
-  <div class="detail-box">
-    <el-scrollbar style="height:100%;">
-      <div class="attribute-detail detail-item">
-        <el-form :model="detail" label-width="150px">
-          <el-form-item label="资产基本信息"></el-form-item>
-          <el-form-item label="任务创建时间:">{{ detail.createTime || '--' }}</el-form-item>
-          <el-form-item label="任务当前状态:">{{ detail.taskState || '--' }}</el-form-item>
-          <el-form-item label="任务执行方案:">
-            {{detail.schemeId?detail.schemeId == 1 ? '极简' : '标准':'--' }}
-          </el-form-item>
-          <el-form-item label="设备族:">{{ detail.equipFamily?detail.equipFamily.familyName?detail.equipFamily.familyName:'--':'--' }}</el-form-item>
-          <el-form-item label="全局名称:">{{ detail.equipName || '--' }}</el-form-item>
-          <el-form-item label="资产本地名称:">{{ detail.localName || '--' }}</el-form-item>
-          <el-form-item label="资产本地编码:">{{ detail.localId || '--' }}</el-form-item>
-          <el-form-item label="设计图纸中编码:">{{ detail.cadId || '--' }}</el-form-item>
-          <el-form-item label="安装位置:">{{ detail.installLocation || '--' }}</el-form-item>
-          <el-form-item label="生产厂家:">{{ detail.manufacturer || '--' }}</el-form-item>
-          <el-form-item label="型号:">{{ detail.specification || '--' }}</el-form-item>
-          <el-form-item label="供应商:">{{ detail.supplier || '--' }}</el-form-item>
-        </el-form>
-      </div>
-      <div class="implement-detail detail-item" v-if="detail.taskState == '未找到'">
-        <el-form :model="detail" label-width="150px">
-          <el-form-item label="执行任务人:">{{ detail.workerName || '--' }}</el-form-item>
-          <el-form-item label="执行时间:">{{ detail.processTime || '--' }}</el-form-item>
-          <el-form-item label="未找到对象信息"></el-form-item>
-          <el-form-item label="资产名称:">{{ detail.localName || detail.equipName || '--' }}</el-form-item>
-          <el-form-item label="全景图:" v-show="panoramaList && panoramaList.length">
-            <div class="img-item" @click="dialogVisible = true"  v-for="item in panoramaList" :key="item.key">
-              <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`" style="width:100%;" :alt="item.name">
+    <div class="detail-box">
+        <el-scrollbar style="height: 100%">
+            <div class="attribute-detail detail-item">
+                <el-form :model="detail" label-width="150px">
+                    <el-form-item label="资产基本信息"></el-form-item>
+                    <el-form-item label="任务创建时间:">{{ detail.createTime || "--" }}</el-form-item>
+                    <el-form-item label="任务当前状态:">{{ detail.taskState || "--" }}</el-form-item>
+                    <el-form-item label="任务执行方案:">
+                        {{ detail.schemeId ? (detail.schemeId == 1 ? "极简" : "标准") : "--" }}
+                    </el-form-item>
+                    <el-form-item label="设备族:">{{
+                        detail.equipFamily ? (detail.equipFamily.familyName ? detail.equipFamily.familyName : "--") : "--"
+                    }}</el-form-item>
+                    <el-form-item label="全局名称:">{{ detail.equipName || "--" }}</el-form-item>
+                    <el-form-item label="资产本地名称:">{{ detail.localName || "--" }}</el-form-item>
+                    <el-form-item label="资产本地编码:">{{ detail.localId || "--" }}</el-form-item>
+                    <el-form-item label="设计图纸中编码:">{{ detail.cadId || "--" }}</el-form-item>
+                    <el-form-item label="安装位置:">{{ detail.installLocation || "--" }}</el-form-item>
+                    <el-form-item label="生产厂家:">{{ detail.manufacturer || "--" }}</el-form-item>
+                    <el-form-item label="型号:">{{ detail.specification || "--" }}</el-form-item>
+                    <el-form-item label="供应商:">{{ detail.supplier || "--" }}</el-form-item>
+                </el-form>
             </div>
-          </el-form-item>
-          <el-form-item label="资产照片:" v-show="imgList && imgList.length">
-            <div class="img-item">
-              <div class="demo-image__preview">
-                <el-image style="width:100%;" v-for="item in imgList"
-                 :key="item.key" :title="item.name"
-                 @click="nowUrl = item.key"
-                 :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}&width=400`"
-                 :preview-src-list="srcList">
-                </el-image>
-              </div>
+            <div class="implement-detail detail-item" v-if="detail.taskState == '未找到'">
+                <el-form :model="detail" label-width="150px">
+                    <el-form-item label="执行任务人:">{{ detail.workerName || "--" }}</el-form-item>
+                    <el-form-item label="执行时间:">{{ detail.processTime || "--" }}</el-form-item>
+                    <el-form-item label="未找到对象信息"></el-form-item>
+                    <el-form-item label="资产名称:">{{ detail.localName || detail.equipName || "--" }}</el-form-item>
+                    <el-form-item label="全景图:" v-show="panoramaList && panoramaList.length">
+                        <div class="img-item" @click="dialogVisible = true" v-for="item in panoramaList" :key="item.key">
+                            <img
+                                :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`"
+                                style="width: 100%"
+                                :alt="item.name"
+                            />
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="资产照片:" v-show="imgList && imgList.length">
+                        <div class="img-item">
+                            <div class="demo-image__preview">
+                                <el-image
+                                    style="width: 100%"
+                                    v-for="item in imgList"
+                                    :key="item.key"
+                                    :title="item.name"
+                                    @click="nowUrl = item.key"
+                                    :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}&width=400`"
+                                    :preview-src-list="srcList"
+                                >
+                                </el-image>
+                            </div>
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="现场视频:" v-show="videoList && videoList.length">
+                        <video controls style="width: 100%" v-for="item in videoList" :key="item.key" :title="item.name">
+                            <source :src="`/image-service/common/file_get?systemId=dataPlatform&key=${item.key}`" type="video/mp4" />
+                            您的浏览器不支持 HTML5 video ,暂无法播放。
+                        </video>
+                    </el-form-item>
+                    <el-form-item label="备注信息:">{{ detail.note || "--" }}</el-form-item>
+                </el-form>
             </div>
-          </el-form-item>
-          <el-form-item label="现场视频:" v-show="videoList && videoList.length">
-            <video controls style="width:100%;" v-for="item in videoList" :key="item.key" :title="item.name">
-              <source :src="`/image-service/common/file_get?systemId=dataPlatform&key=${item.key}`" type="video/mp4">
-              您的浏览器不支持 HTML5 video ,暂无法播放。
-            </video>
-          </el-form-item>
-          <el-form-item label="备注信息:">{{ detail.note || '--' }}</el-form-item>
-        </el-form>
-      </div>
-      <div class="operation-detail detail-item" v-if="detail.taskState === '未找到'">
-        <el-form>
-          <el-form-item label="操作信息:"></el-form-item>
-          <div class="block">
-            <el-timeline>
-              <el-timeline-item
-                  placement="top"
-                  v-for="(item,index) in arr"
-                  :key="index"
-                  :timestamp="item.timestamp"
-              >
-                <el-card>
-                  <small>{{item.content}}</small>
-                  <p>{{item.title}}</p>
-                  <img
-                      v-for="isImg in item.imgs"
-                      :key="isImg.key"
-                      :src="`/image-service/common/image_get?systemId=dataPlatform&key=${isImg.key}`">
+            <div class="operation-detail detail-item" v-if="detail.taskState === '未找到'">
+                <el-form>
+                    <el-form-item label="操作信息:"></el-form-item>
+                    <div class="block">
+                        <el-timeline>
+                            <el-timeline-item placement="top" v-for="(item, index) in arr" :key="index" :timestamp="item.timestamp">
+                                <el-card>
+                                    <small>{{ item.content }}</small>
+                                    <p>{{ item.title }}</p>
+                                    <img
+                                        v-for="isImg in item.imgs"
+                                        :key="isImg.key"
+                                        :src="`/image-service/common/image_get?systemId=dataPlatform&key=${isImg.key}`"
+                                    />
 
-                  <video controls style="width:100%;" v-for="v in videoList" :key="index"
-                         :title="v.name">
-                    <source
-                        :src="`/image-service/common/file_get?systemId=dataPlatform&key=${v.key}`"
-                        type="video/mp4">
-                    您的浏览器不支持 HTML5 video ,暂无法播放。
-                  </video>
-                </el-card>
-              </el-timeline-item>
-            </el-timeline>
-          </div>
-        </el-form>
-      </div>
-    </el-scrollbar>
-    <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body>
-      一张图
-    </el-dialog>
-  </div>
+                                    <video controls style="width: 100%" v-for="(v, i) in item.videoList" :key="`video_${i}`" :title="v.name">
+                                        <source :src="`/image-service/common/file_get?systemId=dataPlatform&key=${v.key}`" type="video/mp4" />
+                                        您的浏览器不支持 HTML5 video ,暂无法播放。
+                                    </video>
+                                </el-card>
+                            </el-timeline-item>
+                        </el-timeline>
+                    </div>
+                </el-form>
+            </div>
+        </el-scrollbar>
+        <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body> 一张图 </el-dialog>
+    </div>
 </template>
 
 <script>
 import { mapGetters } from "vuex"
 
 export default {
-  components: {
+    components: {},
+    computed: {
+        ...mapGetters("layout", ["projectId"]),
+        panoramaList() {
+            if (this.detail && this.detail.taskPicList && this.detail.taskPicList.length) {
+                return this.detail.taskPicList.filter(item => {
+                    return item.type == 'panorama'
+                })
+            } else {
+                return []
+            }
+        },
+        imgList() {
+            if (this.detail && this.detail.taskPicList && this.detail.taskPicList.length) {
+                return this.detail.taskPicList.filter(item => {
+                    return item.type == 'image'
+                })
+            } else {
+                return []
+            }
+        },
+        videoList() {
+            if (this.detail && this.detail.taskPicList && this.detail.taskPicList.length) {
+                return this.detail.taskPicList.filter(item => {
+                    return item.type == 'video'
+                })
+            } else {
+                return []
+            }
+        },
+        srcList() {
+            let nowIndex = this.imgList.findIndex(item => { return item.key == this.nowUrl })
+            let index = nowIndex >= 1 ? nowIndex : 0;
+            let tempArr1 = this.imgList.slice(0, index);
+            let tempArr2 = this.imgList.slice(index, this.imgList.length);
 
-  },
-  created() {
-    let {confirmTime, positivePhotoTime, qrCodeTime, nameplateTime, sidePhotoTime, videoTime, equipProblemTime, equipProblem, taskPicList} = this.detail;
-    let arr = []
-    qrCodeTime && arr.push({
-      timestamp: qrCodeTime,
-      time: new Date(qrCodeTime).getTime(),
-      content: '黏贴二维码',
-      imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('带二维码的设备近景照片'))
-    })
-    positivePhotoTime && arr.push({
-      timestamp: positivePhotoTime,
-      time: new Date(positivePhotoTime).getTime(),
-      content: '拍摄正面照片',
-      imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('设备正面照片'))
-    })
-    nameplateTime && arr.push({
-      timestamp: nameplateTime,
-      time: new Date(nameplateTime).getTime(),
-      content: '拍摄铭牌照片',
-      imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('铭牌照片'))
-    })
-    sidePhotoTime && arr.push({
-      timestamp: sidePhotoTime,
-      time: new Date(sidePhotoTime).getTime(),
-      content: '拍摄侧面照片',
-      imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('设备左侧照片' || '设备右侧照片'))
-    })
-    videoTime && arr.push({
-      timestamp: videoTime,
-      time: new Date(videoTime).getTime(),
-      content: '拍摄30s视频',
-      videoList: taskPicList.length && taskPicList.filter(i => i.name.includes('视频资料'))
-    })
-    equipProblemTime && arr.push({
-      timestamp: equipProblemTime,
-      time: new Date(equipProblemTime).getTime(),
-      content: '记录设备问题',
-      title: equipProblem
-    })
-    confirmTime && arr.push({
-      timestamp: confirmTime,
-      time: new Date(confirmTime).getTime(),
-      content: '确认信息',
-      title: '已确认的设备信息'
-    })
-    this.arr = arr.map(i => ({...i})).sort((a, b) => b.time - a.time)
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId"]),
-    panoramaList(){
-      if(this.detail && this.detail.taskPicList && this.detail.taskPicList.length){
-        return this.detail.taskPicList.filter(item => {
-          return item.type == 'panorama'
-        })
-      } else {
-        return []
-      }
+            let res = tempArr2.concat(tempArr1).map(item => {
+                return `/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`
+            });
+            return res;
+        },
+        arr() {
+            let { confirmTime, positivePhotoTime, qrCodeTime, nameplateTime, sidePhotoTime, videoTime, equipProblemTime, equipProblem, taskPicList, processTime, regionPhotoTime } = this.detail;
+            let arr = []
+            processTime && arr.push({
+                timestamp: processTime,
+                time: new Date(processTime).getTime(),
+                content: '开始执行任务',
+            })
+            qrCodeTime && arr.push({
+                timestamp: qrCodeTime,
+                time: new Date(qrCodeTime).getTime(),
+                content: '黏贴二维码',
+                imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('带二维码的设备近景照片'))
+            })
+            positivePhotoTime && arr.push({
+                timestamp: positivePhotoTime,
+                time: new Date(positivePhotoTime).getTime(),
+                content: '拍摄正面照片',
+                imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('设备正面照片'))
+            })
+            nameplateTime && arr.push({
+                timestamp: nameplateTime,
+                time: new Date(nameplateTime).getTime(),
+                content: '拍摄铭牌照片',
+                imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('铭牌照片'))
+            })
+            sidePhotoTime && arr.push({
+                timestamp: sidePhotoTime,
+                time: new Date(sidePhotoTime).getTime(),
+                content: '拍摄侧面照片',
+                imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('设备左侧照片' || '设备右侧照片'))
+            })
+            regionPhotoTime && arr.push({
+                timestamp: regionPhotoTime,
+                time: new Date(regionPhotoTime).getTime(),
+                content: '拍摄局部照片',
+                imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('其他照片'))
+            })
+            videoTime && arr.push({
+                timestamp: videoTime,
+                time: new Date(videoTime).getTime(),
+                content: '拍摄30s视频',
+                videoList: taskPicList.length && taskPicList.filter(i => i.name.includes('视频资料'))
+            })
+            equipProblemTime && arr.push({
+                timestamp: equipProblemTime,
+                time: new Date(equipProblemTime).getTime(),
+                content: '记录设备问题',
+                title: equipProblem
+            })
+            confirmTime && arr.push({
+                timestamp: confirmTime,
+                time: new Date(confirmTime).getTime(),
+                content: '确认信息',
+                title: '已确认的设备信息'
+            })
+            return arr.map(i => ({ ...i })).sort((a, b) => b.time - a.time)
+        },
     },
-    imgList(){
-      if(this.detail && this.detail.taskPicList && this.detail.taskPicList.length){
-        return this.detail.taskPicList.filter(item => {
-          return item.type == 'image'
-        })
-      } else {
-        return []
-      }
+    props: {
+        detail: Object
     },
-    videoList(){
-      if(this.detail && this.detail.taskPicList && this.detail.taskPicList.length){
-        return this.detail.taskPicList.filter(item => {
-          return item.type == 'video'
-        })
-      } else {
-        return []
-      }
+    data() {
+        return {
+            dialogVisible: false,//全景图弹出框
+            nowUrl: '',//当前正在显示的图
+        };
     },
-    srcList(){
-      let nowIndex = this.imgList.findIndex(item => {return item.key == this.nowUrl})
-      let index = nowIndex >= 1 ? nowIndex : 0;
-      let tempArr1 = this.imgList.slice(0, index);
-      let tempArr2 = this.imgList.slice(index, this.imgList.length);
-
-      let res = tempArr2.concat(tempArr1).map(item => {
-        return `/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`
-      });
-      return res;
-    }
-  },
-  props: {
-    detail: Object
-  },
-  data() {
-    return {
-      dialogVisible: false,//全景图弹出框
-      nowUrl: '',//当前正在显示的图
-      arr: [],
-    };
-  },
-  methods: {
+    methods: {
 
-  },
-  watch: {
-    'detail.id'() {
-      console.log(this.detail)
+    },
+    watch: {
+        'detail.id'() {
+            console.log(this.detail)
+        }
     }
-  }
 };
 </script>
 <style lang="less" scoped>
 .detail-box {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  /deep/ .el-scrollbar__wrap {
-    overflow-x: hidden;
-  }
-  /deep/ .el-icon-circle-close {
-    color: white;
-  }
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    /deep/ .el-scrollbar__wrap {
+        overflow-x: hidden;
+    }
+    /deep/ .el-icon-circle-close {
+        color: white;
+    }
 
-  /deep/ .el-form-item__content {
-    text-overflow: ellipsis;
-    overflow: hidden;
-  }
+    /deep/ .el-form-item__content {
+        text-overflow: ellipsis;
+        overflow: hidden;
+    }
 
-  .detail-item {
-    width: calc(100% - 30px);
-    margin: 15px 15px 10px;
-    padding: 10px;
-    box-sizing: border-box;
-    border-left: 1px solid #eee;
-    box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
-  }
+    .detail-item {
+        width: calc(100% - 30px);
+        margin: 15px 15px 10px;
+        padding: 10px;
+        box-sizing: border-box;
+        border-left: 1px solid #eee;
+        box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
+    }
 
-  .img-item {
-    position: relative;
-    cursor: pointer;
-  }
+    .img-item {
+        position: relative;
+        cursor: pointer;
+    }
 }
 </style>

+ 273 - 276
src/components/data_admin/buildTask/detail/deviceDetail.vue

@@ -1,117 +1,104 @@
 <template>
-  <div class="detail-box">
-    <el-scrollbar style="height:100%;">
-      <div class="attribute-detail detail-item">
-        <el-form :model="detail" label-width="150px">
-          <el-form-item label="设备基本信息"></el-form-item>
-          <el-form-item label="任务创建时间:">{{ detail.createTime || '--' }}</el-form-item>
-          <el-form-item label="任务当前状态:">{{ detail.taskState || '--' }}</el-form-item>
-          <el-form-item label="任务执行方案:">
-            {{ detail.schemeId ? detail.schemeId == 1 ? '极简' : '标准' : '--' }}
-          </el-form-item>
-          <el-form-item label="设备类:">{{
-              detail.equipCategory ? detail.equipCategory.name ? detail.equipCategory.name : '--' : '--'
-            }}
-          </el-form-item>
-          <el-form-item label="全局名称:">{{ detail.equipName || '--' }}</el-form-item>
-          <el-form-item label="设备本地名称:">{{ detail.localName || '--' }}</el-form-item>
-          <el-form-item label="设备本地编码:">{{ detail.localId || '--' }}</el-form-item>
-          <el-form-item label="设计图纸中编码:">{{ detail.cadId || '--' }}</el-form-item>
-          <el-form-item label="安装位置:">{{ detail.installLocation || '--' }}</el-form-item>
-          <el-form-item label="生产厂家:">{{ detail.manufacturer || '--' }}</el-form-item>
-          <el-form-item label="型号:">{{ detail.specification || '--' }}</el-form-item>
-          <el-form-item label="供应商:">{{ detail.supplier || '--' }}</el-form-item>
-          <el-form-item label="包含部件:">
-            {{ Name ? Name : '-' }}{{ Count ? ':' + Count + '个' : '-' }}
-          </el-form-item>
-        </el-form>
-      </div>
-      <div class="implement-detail detail-item" v-if="detail.taskState === '未找到'">
-        <el-form :model="detail" label-width="150px">
-          <el-form-item label="执行任务人:">{{ detail.workerName || '--' }}</el-form-item>
-          <el-form-item label="执行时间:">{{ detail.processTime || '--' }}</el-form-item>
-          <el-form-item label="未找到对象信息"></el-form-item>
-          <el-form-item label="设备信息:" v-if="!detail.isComponent">{{
-              detail.localName || detail.name
-              || '--'
-            }}
-          </el-form-item>
-          <el-form-item label="部件信息:" v-else>
-            <div v-if="detail.component && detail.component.length">
-              <p v-for="item in detail.component?detail.component:[]" :key="item.taskId"
-                 show-overflow-tooltip>
-                {{ item.localName || item.equipName }}
-              </p>
+    <div class="detail-box">
+        <el-scrollbar style="height: 100%">
+            <div class="attribute-detail detail-item">
+                <el-form :model="detail" label-width="150px">
+                    <el-form-item label="设备基本信息"></el-form-item>
+                    <el-form-item label="任务创建时间:">{{ detail.createTime || "--" }}</el-form-item>
+                    <el-form-item label="任务当前状态:">{{ detail.taskState || "--" }}</el-form-item>
+                    <el-form-item label="任务执行方案:">
+                        {{ detail.schemeId ? (detail.schemeId == 1 ? "极简" : "标准") : "--" }}
+                    </el-form-item>
+                    <el-form-item label="设备类:"
+                        >{{ detail.equipCategory ? (detail.equipCategory.name ? detail.equipCategory.name : "--") : "--" }}
+                    </el-form-item>
+                    <el-form-item label="全局名称:">{{ detail.equipName || "--" }}</el-form-item>
+                    <el-form-item label="设备本地名称:">{{ detail.localName || "--" }}</el-form-item>
+                    <el-form-item label="设备本地编码:">{{ detail.localId || "--" }}</el-form-item>
+                    <el-form-item label="设计图纸中编码:">{{ detail.cadId || "--" }}</el-form-item>
+                    <el-form-item label="安装位置:">{{ detail.installLocation || "--" }}</el-form-item>
+                    <el-form-item label="生产厂家:">{{ detail.manufacturer || "--" }}</el-form-item>
+                    <el-form-item label="型号:">{{ detail.specification || "--" }}</el-form-item>
+                    <el-form-item label="供应商:">{{ detail.supplier || "--" }}</el-form-item>
+                    <el-form-item label="包含部件:"> {{ Name ? Name : "-" }}{{ Count ? ":" + Count + "个" : "-" }} </el-form-item>
+                </el-form>
             </div>
-            <div v-else>--</div>
-          </el-form-item>
-          <el-form-item label="全景图:" v-show="panoramaList && panoramaList.length">
-            <div class="img-item" @click="dialogVisible = true" v-for="item in panoramaList"
-                 :key="item.key">
-              <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`"
-                     style="width:100%;" :alt="item.name">
+            <div class="implement-detail detail-item" v-if="detail.taskState === '未找到'">
+                <el-form :model="detail" label-width="150px">
+                    <el-form-item label="执行任务人:">{{ detail.workerName || "--" }}</el-form-item>
+                    <el-form-item label="执行时间:">{{ detail.processTime || "--" }}</el-form-item>
+                    <el-form-item label="未找到对象信息"></el-form-item>
+                    <el-form-item label="设备信息:" v-if="!detail.isComponent">{{ detail.localName || detail.name || "--" }} </el-form-item>
+                    <el-form-item label="部件信息:" v-else>
+                        <div v-if="detail.component && detail.component.length">
+                            <p v-for="item in detail.component ? detail.component : []" :key="item.taskId" show-overflow-tooltip>
+                                {{ item.localName || item.equipName }}
+                            </p>
+                        </div>
+                        <div v-else>--</div>
+                    </el-form-item>
+                    <el-form-item label="全景图:" v-show="panoramaList && panoramaList.length">
+                        <div class="img-item" @click="dialogVisible = true" v-for="item in panoramaList" :key="item.key">
+                            <img
+                                :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`"
+                                style="width: 100%"
+                                :alt="item.name"
+                            />
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="设备照片:" v-show="imgList && imgList.length">
+                        <div class="img-item">
+                            <div class="demo-image__preview">
+                                <el-image
+                                    style="width: 100%"
+                                    v-for="item in imgList"
+                                    :key="item.key"
+                                    :title="item.name"
+                                    @click="nowUrl = item.key"
+                                    :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}&width=400`"
+                                    :preview-src-list="srcList"
+                                >
+                                </el-image>
+                            </div>
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="现场视频:" v-show="videoList && videoList.length">
+                        <video controls style="width: 100%" v-for="item in videoList" :key="item.key" :title="item.name">
+                            <source :src="`/image-service/common/file_get?systemId=dataPlatform&key=${item.key}`" type="video/mp4" />
+                            您的浏览器不支持 HTML5 video ,暂无法播放。
+                        </video>
+                    </el-form-item>
+                    <el-form-item label="备注信息:">{{ detail.note || "--" }}</el-form-item>
+                </el-form>
             </div>
-          </el-form-item>
-          <el-form-item label="设备照片:" v-show="imgList && imgList.length">
-            <div class="img-item">
-              <div class="demo-image__preview">
-                <el-image style="width:100%;" v-for="item in imgList"
-                          :key="item.key" :title="item.name"
-                          @click="nowUrl = item.key"
-                          :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.key}&width=400`"
-                          :preview-src-list="srcList">
-                </el-image>
-              </div>
-            </div>
-          </el-form-item>
-          <el-form-item label="现场视频:" v-show="videoList && videoList.length">
-            <video controls style="width:100%;" v-for="item in videoList" :key="item.key"
-                   :title="item.name">
-              <source :src="`/image-service/common/file_get?systemId=dataPlatform&key=${item.key}`"
-                      type="video/mp4">
-              您的浏览器不支持 HTML5 video ,暂无法播放。
-            </video>
-          </el-form-item>
-          <el-form-item label="备注信息:">{{ detail.note || '--' }}</el-form-item>
-        </el-form>
-      </div>
-      <div class="operation-detail detail-item" v-if="detail.taskState === '未找到'">
-        <el-form>
-          <el-form-item label="操作信息:"></el-form-item>
-          <div class="block">
-            <el-timeline>
-              <el-timeline-item
-                placement="top"
-                v-for="(item,index) in arr"
-                :key="index"
-                :timestamp="item.timestamp"
-              >
-                <el-card>
-                  <small>{{ item.content }}</small>
-                  <p>{{ item.title }}</p>
-                  <img
-                    v-for="isImg in item.imgs"
-                    :key="isImg.key"
-                    :src="`/image-service/common/image_get?systemId=dataPlatform&key=${isImg.key}`">
+            <div class="operation-detail detail-item" v-if="detail.taskState === '未找到'">
+                <el-form>
+                    <el-form-item label="操作信息:"></el-form-item>
+                    <div class="block">
+                        <el-timeline>
+                            <el-timeline-item placement="top" v-for="(item, index) in arr" :key="index" :timestamp="item.timestamp">
+                                <el-card>
+                                    <small>{{ item.content }}</small>
+                                    <p>{{ item.title }}</p>
+                                    <img
+                                        v-for="isImg in item.imgs"
+                                        :key="isImg.key"
+                                        :src="`/image-service/common/image_get?systemId=dataPlatform&key=${isImg.key}`"
+                                    />
 
-                  <video controls style="width:100%;" v-for="v in videoList" :key="index"
-                         :title="v.name">
-                    <source
-                        :src="`/image-service/common/file_get?systemId=dataPlatform&key=${v.key}`"
-                        type="video/mp4">
-                    您的浏览器不支持 HTML5 video ,暂无法播放。
-                  </video>
-                </el-card>
-              </el-timeline-item>
-            </el-timeline>
-          </div>
-        </el-form>
-      </div>
-    </el-scrollbar>
-    <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body>
-      一张图
-    </el-dialog>
-  </div>
+                                    <video controls style="width: 100%" v-for="(v, i) in item.videoList" :key="`video_${i}`" :title="v.name">
+                                        <source :src="`/image-service/common/file_get?systemId=dataPlatform&key=${v.key}`" type="video/mp4" />
+                                        您的浏览器不支持 HTML5 video ,暂无法播放。
+                                    </video>
+                                </el-card>
+                            </el-timeline-item>
+                        </el-timeline>
+                    </div>
+                </el-form>
+            </div>
+        </el-scrollbar>
+        <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body> 一张图 </el-dialog>
+    </div>
 </template>
 
 <script>
@@ -119,203 +106,213 @@ import { mapGetters } from "vuex"
 import { categoryCount, modelCategoryCount } from "@/api/data_admin/buildTaskApi"
 
 export default {
-  components: {},
-  created() {
-    let { confirmTime, positivePhotoTime, qrCodeTime, nameplateTime, sidePhotoTime, videoTime, equipProblemTime, equipProblem, taskPicList } = this.detail;
-    let arr = []
-    qrCodeTime && arr.push({
-      timestamp: qrCodeTime,
-      time: new Date(qrCodeTime).getTime(),
-      content: '黏贴二维码',
-      imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('带二维码的设备近景照片'))
-    })
-    positivePhotoTime && arr.push({
-      timestamp: positivePhotoTime,
-      time: new Date(positivePhotoTime).getTime(),
-      content: '拍摄正面照片',
-      imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('设备正面照片'))
-    })
-    nameplateTime && arr.push({
-      timestamp: nameplateTime,
-      time: new Date(nameplateTime).getTime(),
-      content: '拍摄铭牌照片',
-      imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('铭牌照片'))
-    })
-    sidePhotoTime && arr.push({
-      timestamp: sidePhotoTime,
-      time: new Date(sidePhotoTime).getTime(),
-      content: '拍摄侧面照片',
-      imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('设备左侧照片' || '设备右侧照片'))
-    })
-    videoTime && arr.push({
-      timestamp: videoTime,
-      time: new Date(videoTime).getTime(),
-      content: '拍摄30s视频',
-      videoList: taskPicList.length && taskPicList.filter(i => i.name.includes('视频资料'))
-    })
-    equipProblemTime && arr.push({
-      timestamp: equipProblemTime,
-      time: new Date(equipProblemTime).getTime(),
-      content: '记录设备问题',
-      title: equipProblem
-    })
-    confirmTime && arr.push({
-        timestamp: confirmTime,
-        time: new Date(confirmTime).getTime(),
-        content: '确认信息',
-        title: '已确认的设备信息'
-      })
-      this.arr = arr.map(i => ({...i})).sort((a, b) => b.time - a.time)
-    },
+    components: {},
     computed: {
-      ...mapGetters("layout", ["projectId"]),
-      notFoundList() {
-        if (this.detail && this.detail.component && this.detail.component.length) {//是否存在部件
-          let index = this.detail.component.findIndex(item => {
-            return item.taskState == -1
-          })
-          if (index != -1) {//部件中存在未找到的对象
-            this.detail.isComponent = true
-            return this.detail.component[index].taskPicList ? this.detail.component[index].taskPicList : []
-          } else {//部件全部找到
-            this.detail.isComponent = false
-            return this.detail.taskPicList ? this.detail.taskPicList : []
-          }
-        } else {
-          this.detail.isComponent = false
-          if (this.detail && this.detail.taskPicList && this.detail.taskState.length) {
-            return this.detail.taskPicList
-          } else {
-            return []
-          }
-        }
-      },
-      panoramaList() {
-        if (this.notFoundList && this.notFoundList.length) {
-          return this.notFoundList.filter(item => {
-            return item.type == 'panorama'
-          })
-        } else {
-          return []
-        }
-      },
-      imgList() {
-        if (this.notFoundList && this.notFoundList.length) {
-          return this.notFoundList.filter(item => {
-            return item.type == 'image'
-          })
-        } else {
-          return []
-        }
-      },
-      videoList() {
-        if (this.notFoundList && this.notFoundList.length) {
-          return this.notFoundList.filter(item => {
-            return item.type == 'video'
-          })
-        } else {
-          return []
-        }
-      },
-      srcList() {
-        let nowIndex = this.imgList.findIndex(item => {
-          return item.key == this.nowUrl
-        })
-        let index = nowIndex >= 1 ? nowIndex : 0;
-        let tempArr1 = this.imgList.slice(0, index);
-        let tempArr2 = this.imgList.slice(index, this.imgList.length);
+        ...mapGetters("layout", ["projectId"]),
+        notFoundList() {
+            if (this.detail && this.detail.component && this.detail.component.length) {//是否存在部件
+                let index = this.detail.component.findIndex(item => {
+                    return item.taskState == -1
+                })
+                if (index != -1) {//部件中存在未找到的对象
+                    this.detail.isComponent = true
+                    return this.detail.component[index].taskPicList ? this.detail.component[index].taskPicList : []
+                } else {//部件全部找到
+                    this.detail.isComponent = false
+                    return this.detail.taskPicList ? this.detail.taskPicList : []
+                }
+            } else {
+                this.detail.isComponent = false
+                if (this.detail && this.detail.taskPicList && this.detail.taskState.length) {
+                    return this.detail.taskPicList
+                } else {
+                    return []
+                }
+            }
+        },
+        panoramaList() {
+            if (this.notFoundList && this.notFoundList.length) {
+                return this.notFoundList.filter(item => {
+                    return item.type == 'panorama'
+                })
+            } else {
+                return []
+            }
+        },
+        imgList() {
+            if (this.notFoundList && this.notFoundList.length) {
+                return this.notFoundList.filter(item => {
+                    return item.type == 'image'
+                })
+            } else {
+                return []
+            }
+        },
+        videoList() {
+            if (this.notFoundList && this.notFoundList.length) {
+                return this.notFoundList.filter(item => {
+                    return item.type == 'video'
+                })
+            } else {
+                return []
+            }
+        },
+        srcList() {
+            let nowIndex = this.imgList.findIndex(item => {
+                return item.key == this.nowUrl
+            })
+            let index = nowIndex >= 1 ? nowIndex : 0;
+            let tempArr1 = this.imgList.slice(0, index);
+            let tempArr2 = this.imgList.slice(index, this.imgList.length);
 
-        let res = tempArr2.concat(tempArr1).map(item => {
-          return `/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`
-        });
-        return res;
-      }
+            let res = tempArr2.concat(tempArr1).map(item => {
+                return `/image-service/common/image_get?systemId=dataPlatform&key=${item.key}`
+            });
+            return res;
+        },
+        arr() {
+            let { confirmTime, positivePhotoTime, qrCodeTime, nameplateTime, sidePhotoTime, videoTime, equipProblemTime, equipProblem, taskPicList, processTime, regionPhotoTime } = this.detail;
+            let arr = []
+            processTime && arr.push({
+                timestamp: processTime,
+                time: new Date(processTime).getTime(),
+                content: '开始执行任务',
+            })
+            qrCodeTime && arr.push({
+                timestamp: qrCodeTime,
+                time: new Date(qrCodeTime).getTime(),
+                content: '黏贴二维码',
+                imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('带二维码的设备近景照片'))
+            })
+            positivePhotoTime && arr.push({
+                timestamp: positivePhotoTime,
+                time: new Date(positivePhotoTime).getTime(),
+                content: '拍摄正面照片',
+                imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('设备正面照片'))
+            })
+            nameplateTime && arr.push({
+                timestamp: nameplateTime,
+                time: new Date(nameplateTime).getTime(),
+                content: '拍摄铭牌照片',
+                imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('铭牌照片'))
+            })
+            sidePhotoTime && arr.push({
+                timestamp: sidePhotoTime,
+                time: new Date(sidePhotoTime).getTime(),
+                content: '拍摄侧面照片',
+                imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('设备左侧照片' || '设备右侧照片'))
+            })
+            regionPhotoTime && arr.push({
+                timestamp: regionPhotoTime,
+                time: new Date(regionPhotoTime).getTime(),
+                content: '拍摄局部照片',
+                imgs: taskPicList.length && taskPicList.filter(i => i.name.includes('其他照片'))
+            })
+            videoTime && arr.push({
+                timestamp: videoTime,
+                time: new Date(videoTime).getTime(),
+                content: '拍摄30s视频',
+                videoList: taskPicList.length && taskPicList.filter(i => i.name.includes('视频资料'))
+            })
+            equipProblemTime && arr.push({
+                timestamp: equipProblemTime,
+                time: new Date(equipProblemTime).getTime(),
+                content: '记录设备问题',
+                title: equipProblem
+            })
+            confirmTime && arr.push({
+                timestamp: confirmTime,
+                time: new Date(confirmTime).getTime(),
+                content: '确认信息',
+                title: '已确认的设备信息'
+            })
+            return arr.map(i => ({ ...i })).sort((a, b) => b.time - a.time)
+        },
     },
     props: {
-      detail: Object,
-      type: String
+        detail: Object,
+        type: String
     },
     data() {
-      return {
-        dialogVisible: false,//全景图弹出框
-        nowUrl: '',//当前正在显示的图
-        arr: [],
-        Name: '',
-        Count: '', //包含部件
-      };
+        return {
+            dialogVisible: false,//全景图弹出框
+            nowUrl: '',//当前正在显示的图
+            Name: '',
+            Count: '', //包含部件
+        };
     },
     methods: {
-      //  查询设备部件数量
-      handleContent(row) {
-        let param = {
-          id: row.id,
-          equipId: row.equipId
-        }
-        this.Name = ''
-        this.Count = ''
-        categoryCount(param, res => {
-          if (res.content.length) {
-            this.Name = res.content[0].name
-            this.Count = res.content[0].count
-          }
+        //  查询设备部件数量
+        handleContent(row) {
+            let param = {
+                id: row.id,
+                equipId: row.equipId
+            }
+            this.Name = ''
+            this.Count = ''
+            categoryCount(param, res => {
+                if (res.content.length) {
+                    this.Name = res.content[0].name
+                    this.Count = res.content[0].count
+                }
 
-        })
-      },
-      //  查询模型部件数量
-      handleModelContent(row) {
-        let param = {
-          id: row.id,
-          equipId: row.equipId
-        }
-        this.Name = ''
-        this.Count = ''
-        modelCategoryCount(param, res => {
-          if (res.content.length) {
-            this.Name = res.content[0].name
-            this.Count = res.content[0].count
-          }
+            })
+        },
+        //  查询模型部件数量
+        handleModelContent(row) {
+            let param = {
+                id: row.id,
+                equipId: row.equipId
+            }
+            this.Name = ''
+            this.Count = ''
+            modelCategoryCount(param, res => {
+                if (res.content.length) {
+                    this.Name = res.content[0].name
+                    this.Count = res.content[0].count
+                }
 
-        })
-      }
+            })
+        }
     },
     watch: {
-      'detail.TaskId'() {
-        console.log(this.detail)
-      }
+        'detail.id'() {
+            console.log(this.detail)
+        }
     }
-  };
+};
 </script>
 <style lang="less" scoped>
-  .detail-box {
+.detail-box {
     width: 100%;
     height: 100%;
     box-sizing: border-box;
 
     /deep/ .el-scrollbar__wrap {
-      overflow-x: hidden;
+        overflow-x: hidden;
     }
 
     /deep/ .el-icon-circle-close {
-      color: white;
+        color: white;
     }
 
     /deep/ .el-form-item__content {
-      text-overflow: ellipsis;
-      overflow: hidden;
+        text-overflow: ellipsis;
+        overflow: hidden;
     }
 
     .detail-item {
-      width: calc(100% - 30px);
-      margin: 15px 15px 10px;
-      padding: 10px;
-      box-sizing: border-box;
-      border-left: 1px solid #eee;
-      box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
+        width: calc(100% - 30px);
+        margin: 15px 15px 10px;
+        padding: 10px;
+        box-sizing: border-box;
+        border-left: 1px solid #eee;
+        box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
     }
 
     .img-item {
-      position: relative;
-      cursor: pointer;
+        position: relative;
+        cursor: pointer;
     }
-  }
+}
 </style>

+ 226 - 239
src/components/dialogs/list/systemType.vue

@@ -2,271 +2,258 @@
     systemType 设备所属类型
 -->
 <template>
-  <el-dialog title="所属系统实例" :visible.sync="dialog.systemType" width="900px">
-    <div>
-      <div id="systemType">
-        <div class="title-search query-form" style="padding: 10px;margin-bottom: 10px;" v-if="type != 'read' ">
-          <el-row>
-            <el-col :span="10">
-              <span>系统所属建筑</span>
-              <el-select v-model="buildId" placeholder="请选择" @change="getTableData">
-                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-                </el-option>
-              </el-select>
-            </el-col>
-            <el-col :span="14">
-              <el-input placeholder="输入名称或编码进行查询" v-model="search" size="small" style="width:300px; margin-right:10px"
-                        clearable></el-input>
-              <el-button size="small" @click="getTableData">查找</el-button>
-            </el-col>
-          </el-row>
+    <el-dialog title="所属系统实例" :visible.sync="dialog.systemType" width="900px">
+        <div>
+            <div id="systemType">
+                <div class="title-search query-form" style="padding: 10px; margin-bottom: 10px" v-if="type != 'read'">
+                    <el-row>
+                        <el-col :span="10">
+                            <span>系统所属建筑</span>
+                            <el-select v-model="buildId" placeholder="请选择" @change="getTableData">
+                                <el-option v-for="item in options" :key="item.id" :label="item.localName" :value="item.id"> </el-option>
+                            </el-select>
+                        </el-col>
+                        <el-col :span="14">
+                            <el-input
+                                placeholder="输入名称或编码进行查询"
+                                v-model="search"
+                                size="small"
+                                style="width: 300px; margin-right: 10px"
+                                clearable
+                            ></el-input>
+                            <el-button size="small" @click="getTableData">查找</el-button>
+                        </el-col>
+                    </el-row>
+                </div>
+                <el-table
+                    class="data-table"
+                    border
+                    row-key="id"
+                    :data="type == 'read' ? linkSystemData : tableData"
+                    @selection-change="handleSelectionChange"
+                    style="width: 100%"
+                    ref="multipleTable"
+                >
+                    <el-table-column v-if="type != 'read'" type="selection" :reserve-selection="true" :disabled="true" width="55"></el-table-column>
+                    <el-table-column label="系统名称" header-align="center">
+                        <template slot-scope="scope">{{ scope.row.localName || scope.row.name }}</template>
+                    </el-table-column>
+                    <el-table-column label="本地编码" header-align="center">
+                        <template slot-scope="scope">{{ scope.row.localId || "--" }}</template>
+                    </el-table-column>
+                    <el-table-column label="系统类型" prop="categoryName" header-align="center"></el-table-column>
+                    <el-table-column label="详情" header-align="center" width="100" align="center">
+                        <template slot-scope="scope">
+                            <el-button @click="lookDeatils(scope.row)" type="text">详情</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </div>
         </div>
-        <el-table class='data-table' border :data="type == 'read'?linkSystemData:tableData"
-                  @selection-change="handleSelectionChange" style="width: 100%" ref="multipleTable">
-          <el-table-column v-if="type != 'read' " type="selection" :reserve-selection="true" :disabled="true"
-                           width="55"></el-table-column>
-          <el-table-column label="系统名称" header-align='center'>
-            <template slot-scope="scope">{{ scope.row.localName || scope.row.name }}</template>
-          </el-table-column>
-          <el-table-column label="本地编码" header-align='center'>
-            <template slot-scope="scope">{{ scope.row.localId || '--' }}</template>
-          </el-table-column>
-          <el-table-column label="专业" prop="MajorName" header-align='center'></el-table-column>
-          <el-table-column label="详情" header-align='center' width="100" align="center">
-            <template slot-scope="scope">
-              <el-button @click="lookDeatils(scope.row)" type="text">详情</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-    </div>
-    <span slot="footer" class="dialog-footer" v-if="type != 'read' ">
-      <el-button type="primary" @click="getChange">确 定</el-button>
-    </span>
-    <el-dialog title="系统详情" :visible.sync="iframeShow" v-if="iframeShow" width="500px" append-to-body>
-      <iframe id="google_ads_frame2" name="google_ads_frame2" frameborder="0" :src="iframeSrc" marginwidth="0"
-              marginheight="0" vspace="0" hspace="0"
-              style="width:100%;height:500px;" allowtransparency="true" scrolling="no" allowfullscreen="true"></iframe>
+        <span slot="footer" class="dialog-footer" v-if="type != 'read'">
+            <el-button type="primary" @click="getChange">确 定</el-button>
+        </span>
+        <el-dialog title="系统详情" :visible.sync="iframeShow" v-if="iframeShow" width="500px" append-to-body>
+            <iframe
+                id="google_ads_frame2"
+                name="google_ads_frame2"
+                frameborder="0"
+                :src="iframeSrc"
+                marginwidth="0"
+                marginheight="0"
+                vspace="0"
+                hspace="0"
+                style="width: 100%; height: 500px"
+                allowtransparency="true"
+                scrolling="no"
+                allowfullscreen="true"
+            ></iframe>
+        </el-dialog>
     </el-dialog>
-  </el-dialog>
 </template>
 <script>
 import myPagination from "@/components/ledger/lib/myPagination";
-import { queryLinkSys, getSpaceFloor, equipLinkSys } from "@/api/scan/request"
+import { querySysLinkBuild, buildingQuery, equipLinkSys } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
 import { mapGetters } from 'vuex'
 
 export default {
-  components: {
-    myPagination
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
+    components: {
+        myPagination
+    },
+    props: {
+        dialog: {
+            type: Object,
+            default: function () {
+                return {
+                    systemType: true
+                };
+            }
+        },
+        graphyId: {
+            type: String,
+            default: ""
+        },
+        device: {},
+        curDevice: {
+            default: ''
+        },//设备id
+        type: {
+            type: String,
+            default: "read"
+        },
+        list: {
+            type: [Array]
+        }
+    },
+    data() {
         return {
-          systemType: true
+            search: "", //搜索文案
+            tableData: [],
+            systemList: [],
+            linkSystemData: [],
+            multipleSelection: [],
+            iframeSrc: "",
+            iframeShow: false,
+            buildId: 'all', //查询条件
+            options: [], //系统所属建筑
         };
-      }
     },
-    graphyId: {
-      type: String,
-      default: ""
+    computed: {
+        ...mapGetters("layout", ["projectId", "secret", "userId"])
     },
-    device: {},
-    curDevice: {
-      default: ''
-    },//设备id
-    type: {
-      type: String,
-      default: "read"
+    mounted() {
     },
-    list: {
-      type: [Array]
-    }
-  },
-  data() {
-    return {
-      search: "", //搜索文案
-      tableData: [],
-      systemList: [],
-      linkSystemData: [],
-      multipleSelection: [],
-      iframeSrc: "",
-      iframeShow: false,
-      buildId: 'all', //查询条件
-      options: [], //系统所属建筑
-    };
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"])
-  },
-  mounted() {
-  },
-  methods: {
-    //获取查询条件-建筑
-    // getData() { // 物理世界 已无接口
-    //   let param = {
-    //     ProjId: this.projectId,
-    //     secret: this.secret,
-    //   }
-    //   getSpaceFloor(param).then(res => {
-    //     if (res.data.Result == 'success') {
-    //       let data = this.changeArr(res.data.Content)
-    //       data.unshift({
-    //         value: "all",
-    //         label: "全部"
-    //       }, {
-    //           value: "noKnow",
-    //           label: "未明确建筑的设备"
-    //         })
-    //       this.options = data
-    //     } else {
-    //       this.$message.error(res.data.ResultMsg)
-    //     }
-    //   }).catch(err => {
-    //     this.$message.error(err)
-    //   })
-    // },
-    //将数组转换成optiosn格式
-    changeArr(arr) {
-      return arr.map(item => {
-        if (item.floors && item.floors.length && this.type == "yes") {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: item.floors.map(i => {
-              return {
-                value: i.id,
-                label: i.infos.FloorLocalName,
-                FloorSequenceID: i.infos.FloorSequenceID
-              }
+    methods: {
+        //获取查询条件-建筑
+        getData() {
+            let param = {
+                orders: "localName asc",
+                pageNumber: 1,
+                pageSize: 1000
+            }
+            buildingQuery(param, res => {
+                if (res.result == 'success') {
+                    let data = res.content;
+                    data.unshift({
+                        id: "all",
+                        localName: "全部"
+                    }, {
+                        id: "noKnow",
+                        localName: "未明确建筑的设备"
+                    })
+                    this.options = data
+                } else {
+                    this.$message.error(res.message)
+                }
+            })
+        },
+        handleSelectionChange(val) {
+            this.multipleSelection = val;
+        },
+        //设置默认
+        toggleSelection(rows) {
+            if (this.$refs.multipleTable) {
+                this.$refs.multipleTable.clearSelection();
+            }
+            if (rows.length && this.list.length) {
+                rows.map(row => {
+                    this.list.map(t => {
+                        if (row.id == t.id) {
+                            this.$refs.multipleTable.toggleRowSelection(row)
+                        }
+                    })
+                })
+            }
+        },
+        //确认
+        getChange() {
+            this.createRelatSys()
+            this.$emit("change", this.multipleSelection)
+            this.dialog.systemType = false
+            this.multipleSelection = []
+        },
+        //点击详情
+        lookDeatils(infos) {
+            this.$message("开发中...")
+        },
+        //根据设备类型-查询系统关联专业
+        getTableData() {
+            let param = {
+                data: {
+                    filters: `classCode="${this.device.deviceId.substring(0, 4)}"`,
+                    pageNumber: 1,
+                    pageSize: 1000
+                }
+            }
+            //建筑id
+            if (this.buildId && this.buildId != "all" && this.buildId != "noKnow") {
+                param.buildingId = this.buildId;
+            }
+            //输入的查询条件
+            if (this.search) {
+                param.data.filters += `;localName contain "${this.search}" or localId contain "${this.search}"`
+            }
+            querySysLinkBuild(param, res => {
+                this.tableData = res.content
+                this.toggleSelection(res.content)
             })
-          }
-        } else {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: null,
-            isChilren: 1,
-          }
+        },
+        //获取关联的系统
+        getLinkSystemData() {
+            this.linkSystemData = this.list ? JSON.parse(JSON.stringify(this.list)) : []
+        },
+        //添加设备关联系统关系
+        createRelatSys() {
+            if (this.curDevice) {//有即为编辑
+                let param = {
+                    equipId: this.curDevice,
+                    sysIdList: []
+                }
+                this.multipleSelection.map(t => {
+                    param.sysIdList.push(t.id)
+                })
+                equipLinkSys(param, res => {
+                    this.multipleSelection = []
+                })
+            }
         }
-      })
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
     },
-    //设置默认
-    toggleSelection(rows) {
-      this.$refs.multipleTable.clearSelection();
-      if (rows.length && this.list.length) {
-        rows.map(row => {
-          this.list.map(t => {
-            if (row.SysID == t.SysID) {
-              this.$refs.multipleTable.toggleRowSelection(row)
+    watch: {
+        dialog: {
+            deep: true,
+            handler() {
+                if (this.dialog.systemType) {
+                    this.getData()
+                    if (this.type == 'read') {
+                        this.getLinkSystemData()
+                    } else {
+                        this.getLinkSystemData()
+                        this.getTableData()
+                    }
+                }
             }
-          })
-        })
-      }
-    },
-    //确认
-    getChange() {
-      this.createRelatSys()
-      this.$emit("change", this.multipleSelection)
-      this.dialog.systemType = false
-      this.multipleSelection = []
-    },
-    //点击详情
-    lookDeatils(infos) {
-      this.$message("开发中...")
-      // this.iframeSrc =
-      //   process.env.BASE_URL +
-      //   ":8889/#/details?perjectId=" +
-      //   this.projectId +
-      //   "&secret=" +
-      //   this.secret +
-      //   "&FmId=" +
-      //   infos.id +
-      //   "&type=1&code=" +
-      //   infos.category.substring(2, 4);
-      // this.iframeShow = true;
-    },
-    //根据设备类型-查询系统关联专业
-    getTableData() {
-      let param = {
-        filters: `classCode="${this.device.deviceId.substring(0, 2)}"`,
-        pageNumber: 1,
-        pageSize: 1000
-      }
-      //建筑id
-      if (this.buildId == "noKnow") {
-        param.filters += `;buildingId isNull`
-      } else if (this.buildId && this.buildId != "all") {
-        param.filters += `;buildingId='${this.buildId}'`
-      }
-      //输入的查询条件
-      if (this.search) {
-        param.filters += `;localName contain "${this.search}" or localId contain "${this.search}"`
-      }
-      queryLinkSys(param, res => {
-        this.tableData = res.content
-        this.toggleSelection(res.content)
-      })
-    },
-    //获取关联的系统
-    getLinkSystemData() {
-      this.linkSystemData = this.list ? JSON.parse(JSON.stringify(this.list)) : []
-    },
-    //添加设备关联系统关系
-    createRelatSys() {
-      if (this.curDevice) {//有即为编辑
-        let param = {
-          EquipID: this.curDevice,
-          SysIdList: []
-        }
-        this.multipleSelection.map(t => {
-          param.SysIdList.push(t.SysID)
-        })
-        equipLinkSys(param, res => {
-          this.multipleSelection = []
-        })
-      }
-    }
-  },
-  watch: {
-    dialog: {
-      deep: true,
-      handler() {
-        if (this.dialog.systemType) {
-          // this.getData()
-          if (this.type == 'read') {
-            this.getLinkSystemData()
-          } else {
-            this.getTableData()
-          }
+        },
+        projectId() {
+            this.buildId = 'all';
+            this.options = [];
+            this.getData()
         }
-      }
-    },
-    projectId() {
-      this.buildId = 'all';
-      this.options = [];
-      // this.getData()
     }
-  }
 };
 </script>
 
 <style lang="less">
 #systemType {
-  height: 455px;
-  overflow-y: auto;
+    height: 455px;
+    overflow-y: auto;
 
-  .el-table thead {
-    tr {
-      th {
-        background-color: #f5f7fa;
-      }
+    .el-table thead {
+        tr {
+            th {
+                background-color: #f5f7fa;
+            }
+        }
     }
-  }
 }
 </style>

+ 3 - 2
src/components/ledger/handsontables/assets.vue

@@ -729,6 +729,7 @@ export default {
       }
       let param = []
       params.map(item => {
+        this.deleteCode = item.family;
         param.push({ id: item.id })
       })
       this.$confirm("此操作将删除资产,是否继续?", "提示", {
@@ -746,7 +747,7 @@ export default {
     async removeDevice(param) {
       await deleteProperty(param, res => {
         this.$message.success("删除成功")
-        this.$emit('getJson', '')
+        this.$emit('close', {code: this.deleteCode})
         this.getTableData()
       })
     },
@@ -1243,7 +1244,7 @@ export default {
         if (newName && newName[0] && newName[0].value) {
           this.showType = newName[0].value
         } else {
-          this.showType = ""
+          this.showType = "Visible"
         }
       },
       immediate: true,

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

@@ -159,8 +159,8 @@ export default {
           {value: "all", label: "全部"}
         ]
         : [
-          {value: "all", label: "全部"},
-          {value: "Visible", label: "只看采集信息"}
+          {value: "Visible", label: "只看采集信息"},
+          {value: "all", label: "全部"}
         ];
     },
     // batchDate() {
@@ -1069,6 +1069,7 @@ export default {
       let inputData = this.inputMap[val];
       this.row = row.row;
       this.messKey = val;
+      this.curDevice = infos.id;
       this.firmDataType = "row";
       lStorage.set("screen_data", {
         path: this.$route.path,
@@ -1124,7 +1125,6 @@ export default {
           return false;
         //关联系统()
         case "linkSystem":
-          this.curDevice = infos.EquipID;
           this.systemList = this.tableData[row.row].linkSystem || [];
           this.myDialog.systemType = true;
           return false;
@@ -1441,7 +1441,7 @@ export default {
         if (newName && newName[0] && newName[0].value) {
           this.showType = newName[0].value;
         } else {
-          this.showType = "";
+          this.showType = "Visible";
         }
       },
       immediate: true,

+ 2 - 2
src/components/ledger/handsontables/system.vue

@@ -13,7 +13,7 @@
       </el-select>
       <el-button size="small" style="width: 80px" @click="addDevice" icon="iconfont icon-tianjia">添加系统</el-button>
       <el-button size="small" style="width: 80px" @click="reset" icon="iconfont icon-shuaxin">刷新</el-button>
-      <el-button v-show="onlyRead" size="small" style="width: 80px" @click="undo" icon="iconfont icon-undo">撤销</el-button>
+      <el-button v-show="!onlyRead" size="small" style="width: 80px" @click="undo" icon="iconfont icon-undo">撤销</el-button>
     </div>
     <qrcode :dialog="myDialog" :addBody="true" ref="qrcode"></qrcode>
     <upload-files-dialog ref="upload" @changeFile="fileChange" :keysArr="filesArr"
@@ -698,7 +698,7 @@ export default {
         if (newName && newName[0] && newName[0].value) {
           this.showType = newName[0].value
         } else {
-          this.showType = ""
+          this.showType = "Visible"
         }
       },
       immediate: true,

+ 2 - 2
src/framework/components/messagesever/index.vue

@@ -125,7 +125,7 @@ export default {
             name: "project"
           }
         ],
-        filters: `userId='${this.userId}';type!='refresh'`,
+        filters: `userId='${this.userId}';type!='refresh';type!='Refresh'`,
         orders: "createTime desc, id asc",
         pageNumber: 1,
         pageSize: 10
@@ -136,7 +136,7 @@ export default {
     },
     getUnreadCount() {//获取未读消息的数量
       let params = {
-        filters: `read=false;userId='${this.userId}';type!='refresh'`
+        filters: `read=false;userId='${this.userId}';type!='refresh';type!='Refresh'`
       }
       messgeCount(params, res => {
         this.unreadNum = res.count

+ 1 - 1
src/framework/components/messagesever/msgAllDetails.vue

@@ -117,7 +117,7 @@ export default {
             name: "project"
           }
         ],
-        filters: `userId='${this.userId}';type!='refresh'`,
+        filters: `userId='${this.userId}';type!='refresh';type!='Refresh'`,
         orders: "createTime desc, id asc",
         pageNumber: this.page.pageNumber,
         pageSize: this.page.pageSize

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

@@ -132,7 +132,7 @@ export default {
         if (newName && newName[0] && newName[0].value) {
           this.showType = newName[0].value
         } else {
-          this.showType = ""
+          this.showType = "Visible"
         }
       },
       immediate: true,

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

@@ -77,8 +77,8 @@ export default {
       addNum: 1,
       onlyRead: false,
       showTypes: [
-        { value: "all", label: '全部' },
-        { value: "Visible", label: '只看采集信息' }
+        { value: "Visible", label: '只看采集信息' },
+        { value: "all", label: '全部' }
       ],
       tableHeader: [],
       tableData: session.get("deviceAddData")

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

@@ -101,8 +101,8 @@ export default {
         : [{ Checked: 1 }],
       showTypes: [
         // { value: "partInfo", label: '隐藏信息点' },
+        { value: "Visible", label: '只看采集信息' },
         { value: "all", label: '全部' },
-        { value: "Visible", label: '只看采集信息' }
       ],
       showType: this.$route.query.showType,
       copyTableData: [],

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

@@ -113,8 +113,8 @@ export default {
       onlyRead: false,
       showTypes: [
         // { value: "partInfo", label: '隐藏信息点' },
+        { value: "Visible", label: '只看采集信息' },
         { value: "all", label: '全部' },
-        { value: "Visible", label: '只看采集信息' }
       ],
       showType: "Visible",
       tableHeader: [],

+ 2 - 2
src/views/ledger/property/addproperty.vue

@@ -62,8 +62,8 @@ export default {
       addNum: 1,
       onlyRead: false,
       showTypes: [
-        { value: "all", label: '全部' },
-        { value: "Visible", label: '只看采集信息' }
+        { value: "Visible", label: '只看采集信息' },
+        { value: "all", label: '全部' }
       ],
       buildFloorData: [],
       tableHeader: [],

+ 8 - 6
src/views/ledger/property/index.vue

@@ -6,7 +6,7 @@
         <floor-cascader @change="changeFloor"></floor-cascader>
         <my-cascader ref="cascader" @change="changeDevice"></my-cascader>
       </div>
-      <hanson-table @getJson="change" ref="tableMain"></hanson-table>
+      <hanson-table @close="change" ref="tableMain"></hanson-table>
     </div>
     <!-- <table-transfers></table-transfers> -->
   </div>
@@ -112,14 +112,16 @@ export default {
     },
 
     //新建资产后进行刷新
-    change(val) {
-      this.$refs.cascader.setValue(val.code)
+    change(val) {      
       this.param.deviceId = val.code
       this.getNumber()
-      if (!!this.param.deviceId) {
-        if (this.$refs.tableMain)
-          this.$refs.tableMain.getHeaderData(this.param);
+      if (val && this.$refs.cascader) {
+        this.$refs.cascader.changeVal(val.code)
       }
+    //   if (!!this.param.deviceId) {
+    //     if (this.$refs.tableMain)
+    //       this.$refs.tableMain.getHeaderData(this.param);
+    //   }
     },
 
     //修改设备族

+ 2 - 2
src/views/ledger/rentlist/index.vue

@@ -98,7 +98,7 @@ export default {
         label: '编辑模式'
       }],
       onlyRead: true,
-      showType: "",
+      showType: "Visible",
       // allMess: true,
       tableHeader: [],
       page: {
@@ -148,7 +148,7 @@ export default {
         if (newName && newName[0] && newName[0].value) {
           this.showType = newName[0].value
         } else {
-          this.showType = ""
+          this.showType = "Visible"
         }
       },
       immediate: true,

+ 2 - 2
src/views/ledger/rentlist/rentadd/index.vue

@@ -49,8 +49,8 @@ export default {
       onlyRead: false,
       showTypes: [
         // { value: "partInfo", label: '隐藏信息点' },
-        { value: "all", label: '全部' },
-        { value: "Visible", label: '只看采集信息' }
+        { value: "Visible", label: '只看采集信息' },
+        { value: "all", label: '全部' }
       ],
       inputMap: {
         FloorId: {

+ 4 - 4
src/views/ledger/spacelist/spaceadd/index.vue

@@ -74,10 +74,10 @@ export default {
     return {
       addNum: 1,
       onlyRead: false,
-      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, {
-        value: "Visible",
-        label: '只看采集信息'
-      }],
+      showTypes: [
+          { value: "Visible", label: '只看采集信息' },
+          { value: "all", label: '全部' }
+    	],
       tableHeader: [],
       tableData: session.get("spaceAddData")
         ? session.get("spaceAddData").length

+ 2 - 2
src/views/ledger/system/addsystem.vue

@@ -58,8 +58,8 @@ export default {
       addNum: 1,
       onlyRead: false,
       showTypes: [
-        { value: "all", label: '全部' },
-        { value: "Visible", label: '只看采集信息' }
+        { value: "Visible", label: '只看采集信息' },
+        { value: "all", label: '全部' }
       ],
       tableHeader: [],
       tableData: session.get("systemAddData")