Przeglądaj źródła

1,本地编码展示
2,显示设备类
3,不选择源末端时,可点击启动计算

shaun-sheep 4 lat temu
rodzic
commit
3056b0fbf1

+ 7 - 0
src/api/relation/api.js

@@ -157,3 +157,10 @@ export function relDelete(param, success) {
   let url = '/api/datacenter/relation-manual-calc/rel-del'
   httpUtil.postJson(url, param, success)
 }
+
+
+//查询设备分类
+export function modelScanTaskQuery(param, success) {
+  let url = '/api/datacenter/model-scan-task/model-category-query'
+  httpUtil.postJson(url, param, success)
+}

+ 4 - 3
src/components/relation/overview/CardList.vue

@@ -242,8 +242,8 @@
         }
       },
       equipment(relation) { //配置源端末端
-        this.values.equipmentSetting=`${relation.RelationTypeName} 源末端关系设置`
-        this.$refs.maintain.dialogEquipment = true
+        this.values.equipmentSetting = `${relation.RelationTypeName} 源末端关系设置`
+        this.$refs.maintain.dialogEquipmentOpen()
       },
       manual(relation) {
         let {Manual, Prompting, RelationTypeName, ComputingTime} = relation;
@@ -270,7 +270,8 @@
           localStorage.setItem('RelationType',relation.RelationType)
           localStorage.setItem('ZoneType',relation.ZoneType)
           localStorage.setItem('MainObject',relation.MainObject)
-          localStorage.setItem('FromObject',relation.FromObject)
+          localStorage.setItem('FromObject', relation.FromObject)
+          localStorage.setItem('ComputingTime', relation.ComputingTime ? relation.ComputingTime : '')
           } else {
             this.$message.warning("设计中")
             return false

+ 52 - 32
src/components/relation/overview/Modal/RelationMaintain.vue

@@ -95,25 +95,31 @@
       <el-row :span="24" style="margin-top: 15px">
         <el-col :span="8">
           <p class="">{{values.originEquipment}}</p>
-          <el-cascader
-            :key="isResouceShow"
-            :options="list"
-            v-model="ops"
-            :props="props"
-            collapse-tags
-            clearable
-          />
+          <!--          <el-cascader-->
+          <!--            :key="isResouceShow"-->
+          <!--            :options="list"-->
+          <!--            v-model="ops"-->
+          <!--            :props="props"-->
+          <!--            collapse-tags-->
+          <!--            clearable-->
+          <!--          />-->
+          <el-select v-model="assetValue" placeholder="请选择" clearable filterable size="small" @change="changeVal">
+            <el-option v-for="item in assetOptions" :key="item.Code" :label="item.Name" :value="item.Code"></el-option>
+          </el-select>
         </el-col>
         <el-col :span="8">
           <p class="">{{values.endEquipment}}</p>
-          <el-cascader
-            :options="list"
-            v-model="filterOps"
-            :key="isResouceShow"
-            :props="props"
-            collapse-tags
-            clearable
-          />
+          <!--          <el-cascader-->
+          <!--            :options="list"-->
+          <!--            v-model="filterOps"-->
+          <!--            :key="isResouceShow"-->
+          <!--            :props="props"-->
+          <!--            collapse-tags-->
+          <!--            clearable-->
+          <!--          />-->
+          <el-select v-model="assetValueLast" placeholder="请选择" clearable filterable size="small" @change="changeVal">
+            <el-option v-for="item in assetOptions" :key="item.Code" :label="item.Name" :value="item.Code"></el-option>
+          </el-select>
         </el-col>
       </el-row>
 
@@ -237,6 +243,7 @@
 <script>
   import {mapGetters} from 'vuex'
   import storage from '@/framework/utils/storage'
+  import {modelScanTaskQuery} from "@/api/relation/api";
 
   export default {
     name: "RelationMaintain",
@@ -286,6 +293,9 @@
         ops: [],
         filterOps: [],//为清空第二个选择器
         isResouceShow: 0,
+        assetOptions: [],
+        assetValue: '',
+        assetValueLast: ''
       }
     },
     computed: {
@@ -322,7 +332,14 @@
       deepCopy(obj) {
         return JSON.parse(JSON.stringify(obj))
       },
-
+      dialogEquipmentOpen() {
+        this.dialogEquipment = true
+        modelScanTaskQuery('', res => {
+          this.assetOptions = res.Content
+        })
+      },
+      changeVal() {
+      },
       showCascader() {
         ++this.isResouceShow
         let copy = this.deepCopy(this.source)
@@ -421,22 +438,25 @@
         })
       },
       computedUpdate() {
-        if (!this.resultOrigin.length && !this.ops.length) {
-          this.$message({
-            showClose: true,
-            message: '请选择源端设备类',
-            type: 'warning'
-          });
-          return false
-        } else {
-
-          if (this.resultOrigin.length || this.resultEnd.length) {
-            this.resultOrigin.push(...this.resultEnd)
-            this.$emit('openComputed', this.resultOrigin)
-          }
-          this.dialogTableVisibleMore = false
+        // if (!this.resultOrigin.length && !this.ops.length) {
+        //   this.$message({
+        //     showClose: true,
+        //     message: '请选择源端设备类',
+        //     type: 'warning'
+        //   });
+        //   return false
+        // } else {
+        //   if (this.resultOrigin.length || this.resultEnd.length) {
+        //     this.resultOrigin.push(...this.resultEnd)
+        //     this.$emit('openComputed', this.resultOrigin)
+        //   }
+        //   this.dialogTableVisibleMore = false
+        //
+        // }
+        this.resultOrigin.push(...this.resultEnd)
+        this.$emit('openComputed', this.resultOrigin)
+        this.dialogTableVisibleMore = false
 
-        }
       },
     }
   }

+ 7 - 9
src/views/relation/relationShip/index.vue

@@ -113,7 +113,7 @@
         >
         </el-table-column>
         <el-table-column
-          prop="LocalId"
+          prop="LocalID"
           label="本地编码"
           align="left"
           min-width="100"
@@ -156,7 +156,7 @@
         >
         </el-table-column>
         <el-table-column
-          prop="cLocalId"
+          prop="cLocalID"
           align="left"
           label="本地编码"
         >
@@ -274,7 +274,7 @@
           optionTips: `请下载最新最新<${localStorage.getItem('RelationTypeName')}>数据进行手动维护`, //请下载最新最新 xxxx 数据进行手动维护
           currentNum: '当前关系数量:',
           download: '下载模板(含数据)',
-          lastTime: '最后更新时间为', //最后更新时间为
+          lastTime: '最后更新时间为' + localStorage.getItem('ComputingTime') || '', //最后更新时间为
           uploadTxt: '将Excel文件拖到此处,或<em>单击上传Excel文件<em>',
           uploadTips: '上传的Excel数据将完全覆盖当前关系表(关系表先前数据不会保留)',
           downloadFile: ' 下载报告文件',
@@ -342,7 +342,7 @@
         tableData: [],
         delParam: {},
         loading: false,
-        needMergeArr: ['Name', 'LocalId', 'LocalName', 'CADID', 'btn'],
+        needMergeArr: ['Name', 'LocalID', 'LocalName', 'CADID', 'btn'],
         rowMergeArrs: {}
         // needMergeArr: ['name', 'id'], // 有合并项的列
         // rowMergeArrs: {}, // 包含需要一个或多个合并项信息的对象
@@ -403,11 +403,11 @@
               arr.push({
                 Name: i.Name,
                 LocalName: i.LocalName,
-                LocalId: i.LocalId,
+                LocalID: i.LocalID,
                 CADID: i.CADID,
                 cName: j.Name,
                 cLocalName: j.LocalName,
-                cLocalId: j.LocalId,
+                cLocalID: j.LocalID,
                 cCADID: j.CADID,
                 Id: i.Id,
                 cId: j.Id
@@ -419,8 +419,6 @@
         } else {
           this.tableData = []
         }
-
-
       },
       back() {
         this.$router.go(-1)
@@ -502,7 +500,7 @@
 
       objectSpanMethod({row, column, rowIndex, columnIndex}) {
         if (column.property === 'Name') return this.mergeAction('Name', rowIndex, column);
-        if (column.property === 'LocalId' && row.LocalId != undefined) return this.mergeAction('LocalId', rowIndex, column);
+        if (column.property === 'LocalID' && row.LocalID != undefined) return this.mergeAction('LocalID', rowIndex, column);
         if (column.property === 'LocalName' && row.LocalName != undefined) return this.mergeAction('LocalName', rowIndex, column);
         if (column.property === 'CADID' && row.CADID != undefined) return this.mergeAction('CADID', rowIndex, column);
         if (column.property === 'btn') return this.mergeAction('Name', rowIndex, column);