ソースを参照

竖井台账添加其他关系列

zhangyu 5 年 前
コミット
4d50f2f254

+ 2 - 4
src/components/ledger/lib/linkassets.vue

@@ -244,9 +244,8 @@ export default {
           deviceType: this.deviceType,
           buildFloor: this.buildFloor,
           spaceList: this.space.map(item => {
-            if(item[0] == 'noKnow'){
-              
-            }
+            if(item[0] == 'noKnow')
+            return item[0]
             if(item[1])
             return item[1]
           })
@@ -257,7 +256,6 @@ export default {
           buildFloor: this.buildFloor
         }
       }
-      debugger
       this.$router.push({
         name: "batchlinkAssets",
         params: query

+ 1 - 1
src/router/system.js

@@ -261,7 +261,7 @@ export default [
                 path: 'batchlinkAssets',
                 name: 'batchlinkAssets',
                 component: batchlinkAssets,
-                meta: { keepAlive: true, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '设备台账', path: '/ledger/facility' }, { label: '批量关联资产' }] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '设备台账', path: '/ledger/facility' }, { label: '批量关联资产' }] }
             },
             {
                 path: 'property',

+ 2 - 2
src/views/ledger/cenotelist/cenoteadd/index.vue

@@ -47,8 +47,8 @@ export default {
       isTableRightShow: false,
       relationids: "",
       onlyRead: false,
-      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }],
-      showType: "partInfo",
+      showTypes: [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }],
+      showType: "Visible",
       tableHeader: [],
       tableData: session.get("cenoteAddData")? session.get("cenoteAddData").length? session.get("cenoteAddData"): [{}]: [{}],
       copyTableData: []

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

@@ -290,7 +290,7 @@ export default {
     formatHeaderData(list) {//格式化表头显示的数据
       let arr = tools.copyArr(list)
       let data = showTools.headerTextFilter(arr, "shaft", this.onlyRead, this.showType)
-      data.unshift("关联的元空间");
+      data.unshift("关联的元空间", "其他关系");
       return data;
     },
     formatHeaderType(list) {//格式化表头头映射的数据
@@ -300,6 +300,15 @@ export default {
         data: "SpaceCount",
         renderer: tools.num,
         readOnly: true
+      },{
+        data: "OtheRelations",
+        renderer: (instance, td, row, col, prop, value, cellProperties) => {
+          td.style.color = "#409EFF";
+          td.style.cursor = "pointer";
+          td.innerHTML = "查看";
+          return td;
+        },
+        readOnly: true
       })
       return data;
     },
@@ -332,11 +341,21 @@ export default {
     getInfors(infos, row) {
       //其他的开始判断
       let val = this.tableExample.colToProp(row.col)
+      let name = infos.ShaftLocalName?infos.ShaftLocalName:infos.ShaftName
       this.shaftId = infos.ShaftID //要操作的数据id
       //点击关联的元空间
       if (val === "SpaceCount") {
         this.spaceList = infos.SpaceList
         this.isTableRightShow = true
+      } else if (val === "OtheRelations") {
+        debugger
+        this.$router.push({
+          path: "",
+          query: {
+            id: this.shaftId,
+            name: name
+          }
+        })
       }
     },
     //表格点击事件

+ 12 - 37
src/views/ledger/facility/batchlink.vue

@@ -2,11 +2,10 @@
   <div class="box">
     <div class="condition">
       <div class="header">
-        <!-- <i style="float:left;font-size:30px;padding-right:10px;cursor:pointer;" title="返回" @click="goBack" class="el-icon-back"></i> -->
         <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
-        <die-cascader ref="dieCascader" :Family="params.Family" @change="changeDevice"></die-cascader>
-        <floor-cascader ref="floorCascader" @change="changeFloor"></floor-cascader>
-        <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">创建已选</el-button>
+        <span class="statistics-title">发现未关联资产的设备:<b>XXXX</b></span>
+        <span class="statistics-title">可在此功能中批量关联的:<b>XXXX</b></span>
+        <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">保存选定的设备资产关联关系</el-button>
       </div>
       <div class="main">
         <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%" @selection-change="handleSelectionChange">
@@ -46,9 +45,6 @@
 
 <script>
 import { mapGetters } from "vuex"
-//组件
-import floorCascader from "@/components/ledger/lib/floorCascader"
-import dieCascader from "@/components/ledger/lib/partsDieList"
 //api
 import { queryPartsDie, createPropertys } from "@/api/scan/request";
 export default {
@@ -70,23 +66,13 @@ export default {
     ...mapGetters("layout", ["projectId", "userId", "secret"])
   },
   components: {
-    floorCascader,
-    dieCascader
+    
   },
   created() {
-    this.params = this.$route.query
+    this.params = this.$route.params
   },
   mounted() {
-    if (this.params.category) {
-      this.$refs.dieCascader.setValue(this.params.category)
-    }
-    if (this.params.buildId && this.params.floorId) {
-      this.$refs.floorCascader.setValue([this.params.buildId,this.params.floorId])
-    } else if (this.params.buildId && !this.params.floorId) {
-      this.$refs.floorCascader.setValue([this.params.buildId])
-    } else {
-      this.$refs.floorCascader.setValue(['all'])
-    }
+    
   },
   watch: {
     projectId() {}
@@ -94,10 +80,7 @@ export default {
   methods: {
     //返回
     goBack() {
-      this.$router.push({
-        name: "propertyLedger",
-        params: { Family: this.params.Family }
-      })
+      this.$router.push({ name: "facilityLedger" })
     },
     //选择设备或部件
     changeDevice(val) {
@@ -190,19 +173,7 @@ export default {
     },
     //创建已选
     handleClickCreate() {
-      let list = this.multipleSelection.map((item) => {
-        return item.EquipID
-      })
-      let param = {
-        Filters: `EquipID in ${JSON.stringify(list)}`
-      }
-      createPropertys(param, res => {
-        this.$message.success("创建成功!")
-        this.$router.push({
-          name: "propertyLedger",
-          params: { Family: this.params.Family }
-        })
-      })
+      
     }
   }
 };
@@ -221,6 +192,10 @@ export default {
     .header{
       padding-bottom: 10px;
       border-bottom: 1px solid #bcbcbc;
+      .statistics-title{
+        margin-left: 20px;
+        line-height: 32px;
+      }
     }
     .main{
       margin-top: 10px;