Browse Source

修改数据报告相关问题

shaun-sheep 4 năm trước cách đây
mục cha
commit
afbe5634e1

+ 21 - 1
src/components/dialogs/list/batchDialog.vue

@@ -160,6 +160,26 @@
             >{{item.Key | filterImgName}}</span>
           </p>
         </div>
+<!--        test-->
+<!--        <br><br>-->
+<!--        <div class="checkbox">-->
+<!--          <p v-for="(item,index) in newEnclosure">-->
+<!--            <el-checkbox-->
+<!--              v-model="item.Path"-->
+<!--              @change="multiple(item.InfoPointCode)"-->
+<!--            > &lt;!&ndash;设备文档&ndash;&gt;-->
+<!--              {{item.InfoPointName}}-->
+<!--            </el-checkbox>-->
+<!--&lt;!&ndash;            <span&ndash;&gt;-->
+<!--&lt;!&ndash;              class="text-color"&ndash;&gt;-->
+<!--&lt;!&ndash;              v-for="item in information.archive.Archive"&ndash;&gt;-->
+<!--&lt;!&ndash;            >{{item.Name | filterImgName}}</span>  &ndash;&gt;-->
+<!--            <span-->
+<!--              class="text-color"-->
+<!--            ></span>-->
+<!--          </p>-->
+<!--        </div>-->
+<!--        /test-->
       </section>
       <el-button
           class="next-step"
@@ -225,7 +245,7 @@
 
   export default {
     name: "batchDialog",
-    props: ['firmName', 'allObject', 'page', 'information'],
+    props: ['firmName', 'allObject', 'page', 'information','newEnclosure'],
     components: {myPagination},
     data() {
       return {

+ 6 - 1
src/components/ledger/details/detail/exhibitionBaseInformation.vue

@@ -41,7 +41,12 @@
         <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{value.InfoPointName}}</p>
         <div v-for="(pic,index) in value.Value">
           <div>图纸名称:{{pic.Name}}
-              <el-button style="" type="text" size="mini" @click="downloadFile(pic.Key)">下载</el-button>
+<!--              <el-button style="" type="text" size="mini" @click="downloadFile(pic.Key)">下载</el-button>-->
+            <a
+              style="cursor: pointer;color: #409eff"
+              :href="`/image-service/common/file_get/${pic.Key}?systemId=dataPlatform`"
+              :download="pic.Name"
+            >下载</a>
           </div>
         </div>
         <el-button slot="reference" type="text">{{value.Value? '有':'-'}}</el-button>

+ 53 - 0
src/components/ledger/details/detail/exhibitionEnergyT.vue

@@ -0,0 +1,53 @@
+<template>
+  <div class="exhibition-energy">
+    <div class="title">
+      <section v-for="(val,key,i) in exhibitionEnergy.list">
+        <h4 class="base">{{key}}</h4>
+        <div class="table-dynamic" v-for="(value,keys,index) in val.paths">
+            <div class="table-title"> {{value.InfoPointName}}:</div>
+          <p :style="{'color':value.value? '' :'#F56C6C'}">{{value.value? `表号功能号:${value.value} `:'未维护'}}</p>
+          <p>{{value.data ? value.data :value.error}} {{value.Unit}}</p>
+          <p>{{value.receivetime ? formatDate(value.receivetime):'--'}}</p>
+        </div>
+      </section>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "exhibitionEnergy",
+    props: ['exhibitionEnergy'],
+    methods:{
+      formatDate(str) {
+        return str ? str.substr(0,4)+"-"+str.substr(4,2)+"-"+str.substr(6,2)+" "+str.substr(8,2) + ":" +str.substr(10,2) + ":"+str.substr(12,2) :'--'
+      }
+    }
+  }
+</script>
+
+<style scoped lang="less">
+  .exhibition-energy {
+    .base {
+      margin: 10px;
+      font-weight: 600;
+      text-indent: 10px;
+      border-bottom: 1px dashed #eee;
+    }
+
+    .table-dynamic {
+      height: 85px;
+      width: 100%;
+      margin: 5px 0;
+      padding-left: 20px;
+      box-sizing: border-box;
+    }
+
+    .table-title {
+      float: left;
+      max-width: 200px;
+      width: 100px;
+      height: 85px;
+    }
+  }
+</style>

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

@@ -130,6 +130,7 @@
         :allObject="allObject"
         :page="batchPage"
         :information="information"
+        :newEnclosure="newEnclosure"
         @getAllData="getAllData"
         @multiple="multiple"
         @upDataDevice="upDataDevice"
@@ -343,7 +344,8 @@
           }
 
         },
-        infoType: ''
+        infoType: '',
+        newEnclosure:[]
       };
     },
     methods: {
@@ -379,6 +381,8 @@
             })
             this.getTableData()
             this.getAllData()
+          //  信息维护
+          this.newEnclosure = res.Content.filter(i=>i.InputMode =='F2')
           });
         }
       },

+ 55 - 4
src/views/ledger/facility/details/index.vue

@@ -116,6 +116,7 @@
         exampleData: {}, //实例数据
         currentRadio: '1',//当前选中的select
         criterias: [], //动态参数
+        criteriasArray: [],
         selectRadio: {
           information: '设备信息点',
           initRadio: '1',
@@ -141,6 +142,7 @@
           title: '能耗信息',
           firstName:'',
           dynamic: [],
+          list: {}
         },
         exhibitionMaintain: {
           title: '维修/维保记录'
@@ -210,8 +212,6 @@
           let obj = this.deepCopy(values[1].Content[0]);
           obj = tools.flattenKeys(obj);
           this.instance = obj;
-          this.handleRadios(this.currentRadio)
-          this.handleEnclosure() //处理图片视频文件信息
           this.pointData.forEach(item => {
             if (item.InputMode == "L" || item.InputMode == "L1" || item.InputMode == "L2" || item.InputMode == "M") {
               let cur = tools.dataForKey(this.exampleData, item.Path);
@@ -224,7 +224,6 @@
               }
             }
           })
-
           let params = { //获取动态参数
             secret: this.secret,
             ProjId: this.projectId,
@@ -235,7 +234,20 @@
           let arr = []
           if (this.criterias.length) {
             BeatchQueryParam(params, res => {
+              this.criteriasArray = res.Content;
               arr = res.Content
+              arr && arr.length && arr.forEach(child => {
+                this.pointData.map(head => {
+                  if (head.InfoPointCode == child.code) {
+                    head.svalue = child.value;
+                    head.data = child.data || '--';
+                    head.receivetime = child.receivetime || '';
+                    head.error = child.error || ''
+                  }
+                  return head
+                })
+              })
+              /****************************delete****************************/
               arr && arr.length && arr.map(child => {
                 this.pointData.forEach(head => {
                   if (head.InfoPointCode == child.code) {
@@ -255,9 +267,12 @@
                   }
                 })
               })
+            /****************************delete****************************/
             })
 
           }
+          this.handleRadios(this.currentRadio);
+          this.handleEnclosure() //处理图片视频文件信息
         })
       },
       handleEnclosure() {
@@ -426,7 +441,8 @@
       },
       displayData(arr) {//对数据进行处理传给组件展示
         const result = {}
-        arr.forEach(i => {
+        const resultEnergy = {};
+        arr.map(i => {
           if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
             i.value = this.instance[i.Path]
           }
@@ -461,11 +477,45 @@
               }
             })
           }
+          // 动态信息点处理
           switch (i.InputMode) {
             case "L":
             case "L1":
             case "L2":
             case "M":
+              if (resultEnergy[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`]) {
+                resultEnergy[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`].paths.push({
+                  Path: i.Path,
+                  InfoPointName: i.InfoPointName,
+                  InfoPointCode: i.InfoPointCode,
+                  value: i.svalue,
+                  Visible: i.Visible,
+                  KeyWord: i.KeyWord,
+                  InputMode: i.InputMode,
+                  data: i.data,
+                  receivetime: i.receivetime,
+                  error: i.error,
+                  Unit: i.Unit,
+                  FirstName: i.FirstName,
+                })
+              } else {
+                resultEnergy[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
+                  paths: [{
+                    Path: i.Path,
+                    InfoPointName: i.InfoPointName,
+                    InfoPointCode: i.InfoPointCode,
+                    value: i.svalue,
+                    Visible: i.Visible,
+                    KeyWord: i.KeyWord,
+                    InputMode: i.InputMode,
+                    data: i.data,
+                    receivetime: i.receivetime,
+                    error: i.error,
+                    Unit: i.Unit,
+                    FirstName: i.FirstName,
+                  }]
+                }
+              }
               break;
             default:
               if (result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`]) {
@@ -498,6 +548,7 @@
         })
         this.exhibitionBaseInformation.information = result
         this.exhibitionCrux.allMessage = result
+        this.exhibitionEnergy.list = resultEnergy;
       },
       goBack() {
         this.$router.push({

+ 6 - 5
src/views/ledger/report/index.vue

@@ -513,13 +513,13 @@
           let res1 = response[1];
           let res2 = response[2];
           this.equipment.push({
-            title: '未关联资产',
+            title: '未关联设备',
             tips: '设备未关联资产数量',
             contentValueO: '已关联:',
             contentValueT: '未关联:',
             needCountO: this.equipCount - res.Count,
             needCountT: res.Count,
-            text: `总数${this.equipCount}`
+            text: `${res.Count}`
           })
 
           let text = this.toPercent(res1.Count / this.equipCount)
@@ -590,14 +590,15 @@
           let res0 = response[0];
           let res1 = response[1];
           let res2 = response[2];
+
           this.assets.push({
             title: '未关联资产',
             tips: '资产未关联设备数量',
             contentValueO: '已关联:',
             contentValueT: '未关联:',
-            text: `总数${this.assetsCount}`,
-            needCountO: this.assetsCount - res1.Count,
-            needCountT: res1.Count
+            text: `${res0.Count}`,
+            needCountO: this.assetsCount - res0.Count,
+            needCountT: res0.Count
           })
 
           let text = res1.Count / this.assetsCount;