Browse Source

Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType

zhangyu 4 years ago
parent
commit
e1492b3b41

+ 134 - 69
src/components/ready/buildfloor/formItems.vue

@@ -1,40 +1,73 @@
 <template>
   <div id="inforsPoint">
-    <el-form ref="ruleForm" :model="form" label-width="150px" :rules="rules" :inline="true" :label-position="'right'">
-      <div v-for="item in InforsList" :key="item.infoPointCode" style="width:50%;display: inline-block">
+    <el-form
+      ref="ruleForm"
+      :model="form"
+      label-width="150px"
+      :rules="rules"
+      :inline="true"
+      :label-position="'right'"
+    >
+      <div
+        v-for="item in InforsList"
+        :key="item.infoPointCode"
+        style="width: 50%; display: inline-block"
+      >
         <el-form-item
           :label="item.name"
           :prop="item.code"
-          v-if="all||item.visible"
-          :class="{FloorTypeSelect:item.dataType == 'ENUM'||item.unit}">
-
+          v-if="all || item.visible"
+          :class="{ FloorTypeSelect: item.dataType == 'ENUM' || item.unit }"
+        >
           <el-input
             v-model.trim="form[item.path]"
-            v-if="item.infoPointCode == 'bimLocation' || item.infoPointCode =='modelId'"
-            disabled/>
+            v-if="
+              item.infoPointCode == 'bimLocation' ||
+              item.infoPointCode == 'modelId'
+            "
+            disabled
+          />
 
           <!--二维码相关-->
-          <span v-else-if="item.infoPointCode == 'DefaultQRCode' ">
-            <el-input v-if="!form[item.path]" v-model.trim="form[item.path]" disabled/>
+          <span v-else-if="item.infoPointCode == 'DefaultQRCode'">
+            <el-input
+              v-if="!form[item.path]"
+              v-model.trim="form[item.path]"
+              disabled
+            />
             <el-popover v-else placement="right" width="210" trigger="click">
-              <div style="overflow:hidden;">
+              <div style="overflow: hidden">
                 <img
-                  style="width:200px;height:200px;"
-                  :src="'/image-service/common/file_get/'+ form[item.path] +'?systemId=dataPlatform'"
-                  alt="二维码">
+                  style="width: 200px; height: 200px"
+                  :src="
+                    '/image-service/common/file_get/' +
+                    form[item.path] +
+                    '?systemId=dataPlatform'
+                  "
+                  alt="二维码"
+                />
               </div>
               <el-button slot="reference" type="text">点击查看</el-button>
             </el-popover>
           </span>
 
-          <span v-else-if="item.infoPointCode == 'QRCodePic' ">
-            <el-input v-if="!form[item.path]" v-model.trim="form[item.path]" disabled/>
+          <span v-else-if="item.infoPointCode == 'QRCodePic'">
+            <el-input
+              v-if="!form[item.path]"
+              v-model.trim="form[item.path]"
+              disabled
+            />
             <el-popover v-else placement="right" width="210" trigger="click">
-              <div style="overflow:hidden;">
+              <div style="overflow: hidden">
                 <img
-                  style="width:200px;height:200px;"
-                  :src="'/image-service/common/file_get/'+ form[item.path] +'?systemId=dataPlatform'"
-                  alt="二维码">
+                  style="width: 200px; height: 200px"
+                  :src="
+                    '/image-service/common/file_get/' +
+                    form[item.path] +
+                    '?systemId=dataPlatform'
+                  "
+                  alt="二维码"
+                />
               </div>
               <el-button slot="reference" type="text">点击查看</el-button>
             </el-popover>
@@ -42,48 +75,76 @@
 
           <!--/二维码相关-->
           <span v-else-if="item.dataType == 'STRING'">
-            <el-input v-model.trim="form[item.path]"
-                      :disabled="!item.editable"
-                      :placeholder="(item.dataType == 'STRING' && item.path==='localId') ? '填写示例:F1、B1?':'' "/>
-              <div v-if="item.dataType == 'STRING' && item.path==='localId' && isShowTitle"
-                   style="color: gray;font-size: 12px">
-                用于楼层平面图切换
-              </div>
+            <el-input
+              v-model.trim="form[item.path]"
+              :disabled="!item.editable"
+              :placeholder="
+                item.dataType == 'STRING' && item.path === 'localId'
+                  ? '填写示例:F1、B1?'
+                  : ''
+              "
+            />
+            <div
+              v-if="
+                item.dataType == 'STRING' &&
+                item.path === 'localId' &&
+                isShowTitle
+              "
+              style="color: gray; font-size: 12px"
+            >
+              用于楼层平面图切换
+            </div>
           </span>
 
-          <el-input v-model.trim="form[item.path]" v-else-if="item.dataType == 'INTEGER'||item.dataType == 'DOUBLE'"
-                    type="number">
+          <el-input
+            v-model.trim="form[item.path]"
+            v-else-if="item.dataType == 'INTEGER' || item.dataType == 'DOUBLE'"
+            type="number"
+          >
             <template slot="append" v-if="item.unit">{{ item.unit }}</template>
           </el-input>
 
-          <el-select v-model="form[item.path]" placeholder="请选择" v-else-if="item.dataType == 'ENUM'">
-            <el-option v-for="op in item.options" :key="op.code" :label="op.name" :value="op.code"></el-option>
+          <el-select
+            v-model="form[item.path]"
+            placeholder="请选择"
+            v-else-if="item.dataType == 'ENUM'"
+          >
+            <el-option
+              v-for="op in item.options"
+              :key="op.code"
+              :label="op.name"
+              :value="op.code"
+            ></el-option>
           </el-select>
-          <el-input v-model.trim="form[item.path]" v-else :placeholder="item.dataType?'':'字典无输入类型'"></el-input>
+          <el-input
+            v-model.trim="form[item.path]"
+            v-else
+            :placeholder="item.dataType ? '' : '字典无输入类型'"
+          ></el-input>
         </el-form-item>
       </div>
     </el-form>
   </div>
 </template>
 <script>
-import {getDataDictionary} from "@/api/dict";
+import { getDataDictionary } from "@/api/dict";
 
 export default {
   props: {
     type: {
-      default: 'floor'
-    }
+      default: "floor",
+    },
   },
   data() {
     let validateId = (rule, value, callback) => {
       if (!value) {
-        this.isShowTitle = false
-        return callback(new Error('请输入楼层本地编码'));
+        this.isShowTitle = false;
+        return callback(new Error("请输入楼层本地编码"));
       } else {
-        this.isShowTitle = true
-        callback()
+        this.isShowTitle = true;
+        callback();
       }
-    }
+    };
     // }
     return {
       form: {},
@@ -91,23 +152,20 @@ export default {
       InforsList: [],
       all: true, // 默认显示全部
       rules: {
-        "localId": [
-          {validator: validateId, trigger: 'blur', "required": true}
+        localId: [{ validator: validateId, trigger: "blur", required: true }],
+        localName: [
+          { required: true, message: "请输入楼层本地名称", trigger: "blur" },
         ],
-        "localName": [
-          {"required": true, "message": "请输入楼层本地名称", "trigger": "blur"}
+        floorSequenceID: [
+          { required: true, message: "请输入楼层顺序号", trigger: "blur" },
         ],
-        "floorSequenceID": [
-          {"required": true, "message": "请输入楼层顺序号", "trigger": "blur"}
-        ]
-      }
+      },
     };
   },
 
   created() {
-    this.getInforsPoint()
-  }
-  ,
+    this.getInforsPoint();
+  },
   methods: {
     getInforsPoint() {
       let params = {
@@ -124,39 +182,46 @@ export default {
             item.options = item.dataSource
             if (item.options[0]) {
               item.props = {
-                value: 'code',
-                label: 'name',
-                children: 'content',
-                checkStrictly: true
-              }
+                value: "code",
+                label: "name",
+                children: "content",
+                checkStrictly: true,
+              };
             }
           }
-          switch (item.code) { //过滤掉待删除的
-            case 'floorIdentity':
-            case 'relatedSchedule':
-            case 'outPeopleFlow':
-            case 'inPeopleFlow':
-            case 'exsitPeopleNum':
+          switch (
+            item.code //过滤掉待删除的
+          ) {
+            case "floorIdentity":
+            case "relatedSchedule":
+            case "outPeopleFlow":
+            case "inPeopleFlow":
+            case "exsitPeopleNum":
               break;
             default:
-              return item
+              return item;
           }
-        })
+        });
         //手动删除掉数据字典中不存在的字段,等待后台同步
-        this.InforsList = arr.filter(t => t && t.code != 'FloorQRCode')
-      })
+        let newarr = [];
+        arr.forEach((t) => {
+          if ((t && t.code != "FloorQRCode") && (t && t.code != "qRCodePic") && t && t.code !="floorMap") {
+            newarr.push(t);
+          }
+        });
+        this.InforsList = newarr;
+      });
     },
     submitForm(call) {
       this.$refs.ruleForm.validate((valid) => {
         if (valid) {
-          call()
+          call();
         } else {
           return false;
         }
       });
     },
-
-  }
+  },
 };
 </script>
 <style lang="scss" scoped>
@@ -172,7 +237,7 @@ export default {
   }
 
   /deep/ .el-input--small {
-    width: 200px
+    width: 200px;
   }
 }
 </style>

+ 281 - 214
src/views/ledger/property/details/index.vue

@@ -1,15 +1,27 @@
 <template>
   <div class="tableDisplay">
     <div class="header">
-      <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
-      <span :title="`${name} - ${code}`" class="details-title"><b>{{ name }} - {{ code }}</b></span>
+      <el-button
+        style="float: left"
+        size="small"
+        type="default"
+        icon="el-icon-back"
+        @click="goBack"
+      ></el-button>
+      <span :title="`${name} - ${code}`" class="details-title"
+        ><b>{{ name }} - {{ code }}</b></span
+      >
     </div>
     <div class="content">
-      <el-scrollbar style="height:100%;">
+      <el-scrollbar style="height: 100%">
         <div class="content-scrollbar">
           <div class="content-left">
             <div class="content-keyPoint">
-              <exhibitionCrux :exhibitionCrux="exhibitionCrux" :type="type" @cruxSuccess="cruxSuccess"/>
+              <exhibitionCrux
+                :exhibitionCrux="exhibitionCrux"
+                :type="type"
+                @cruxSuccess="cruxSuccess"
+              />
             </div>
             <div class="content-showType">
               <selectRadio
@@ -19,42 +31,63 @@
             </div>
             <div class="content-point">
               <div class="content-point-left">
-                <exhibitionBaseInformation :exhibitionBaseInformation="exhibitionBaseInformation"/>
+                <exhibitionBaseInformation
+                  :exhibitionBaseInformation="exhibitionBaseInformation"
+                />
               </div>
             </div>
           </div>
           <div class="content-right">
             <div class="content-media">
-              <exhibitionImage :exhibitionImage="exhibitionImage" v-show="isShowImage"/>
-              <exhibitionVideo :exhibitionVideo="exhibitionVideo" v-show="isShowVideo"/>
-              <exhibitionFile :exhibitionFile="exhibitionFile" v-show="isShowFile"/>
+              <exhibitionImage
+                :exhibitionImage="exhibitionImage"
+                v-show="isShowImage"
+              />
+              <exhibitionVideo
+                :exhibitionVideo="exhibitionVideo"
+                v-show="isShowVideo"
+              />
+              <exhibitionFile
+                :exhibitionFile="exhibitionFile"
+                v-show="isShowFile"
+              />
             </div>
           </div>
         </div>
       </el-scrollbar>
     </div>
     <div class="footer">
-      <el-button-group style="float:right;margin:8px 10px 0 0">
+      <el-button-group style="float: right; margin: 8px 10px 0 0">
         <el-button
-          :disabled="list.findIndex(item => item.value == id) == 0"
+          :disabled="list.findIndex((item) => item.value == id) == 0"
           @click="handleClickPrev"
           size="mini"
-          icon="el-icon-arrow-left">
+          icon="el-icon-arrow-left"
+        >
           上一页
         </el-button>
-        <el-select size="mini" style="float:left;margin:0 10px;" v-model="id" @change="handleChangeExample"
-                   placeholder="请选择">
+        <el-select
+          size="mini"
+          style="float: left; margin: 0 10px"
+          v-model="id"
+          @change="handleChangeExample"
+          placeholder="请选择"
+        >
           <el-option
             v-for="item in list"
             :key="item.value"
             :label="item.label"
-            :value="item.value">
+            :value="item.value"
+          >
           </el-option>
         </el-select>
         <el-button
-          :disabled="list.findIndex(item => item.value == id) == list.length-1"
+          :disabled="
+            list.findIndex((item) => item.value == id) == list.length - 1
+          "
           @click="handleClickNext"
-          size="mini">
+          size="mini"
+        >
           下一页
           <i class="el-icon-arrow-right el-icon--right"></i>
         </el-button>
@@ -73,8 +106,7 @@ import selectRadio from "@/components/ledger/details/detail/selectRadio";
 import { getDataDictionary } from "@/api/dict";
 import { queryProperty } from "@/api/scan/request";
 import { mapGetters } from "vuex";
-import tools from "@/utils/scan/tools"
-
+import tools from "@/utils/scan/tools";
 
 export default {
   name: "propertyDetails",
@@ -84,7 +116,7 @@ export default {
     exhibitionImage,
     selectRadio,
     exhibitionCrux,
-    exhibitionVideo
+    exhibitionVideo,
   },
   created() {
     this.id = this.$route.query.equipId;
@@ -93,313 +125,345 @@ export default {
     this.type = this.$route.query.type;
     this.list = this.$route.query.data;
     this.getData();
-    console.log(this.$route.query,'query')
+    console.log(this.$route.query, "query");
   },
   computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"])
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
   },
   data() {
     return {
-      id: '', //当前资产id
-      name: '', //当前资产本地名称
-      code: '', //当前资产的本地编码
-      type: '', //资产类型
+      id: "", //当前资产id
+      name: "", //当前资产本地名称
+      code: "", //当前资产的本地编码
+      type: "", //资产类型
       list: [], //资产列表
       pointData: [], //信息点数据
-      currentRadio: '1',//当前选中的select
+      currentRadio: "1", //当前选中的select
       selectRadio: {
-        information: '设备信息点',
-        initRadio: '1',
+        information: "设备信息点",
+        initRadio: "1",
         radioList: [
           {
-            value: '显示需采集信息点',
-            label: '1'
+            value: "显示需采集信息点",
+            label: "1",
           },
           {
-            value: '显示有值信息点',
-            label: '2'
+            value: "显示有值信息点",
+            label: "2",
           },
           {
-            value: '显示全部信息点',
-            label: '3'
-          }
-        ]
+            value: "显示全部信息点",
+            label: "3",
+          },
+        ],
       },
       exhibitionBaseInformation: {
-        information: {}
+        information: {},
       },
       exhibitionFile: {
-        title: '文件',
-        list: {}
+        title: "文件",
+        list: {},
       },
       exhibitionCrux: {
-        title: '关键信息点:',
+        title: "关键信息点:",
         cruxArray: [],
-        allMessage: [],//全部信息点
+        allMessage: [], //全部信息点
       },
       exhibitionImage: {
-        title: '图片',
+        title: "图片",
         list: {},
-        arr: []
+        arr: [],
       },
       exhibitionVideo: {
-        title: '视频',
-        list: {}
+        title: "视频",
+        list: {},
       },
-      instance: {},//实例信息处理
+      instance: {}, //实例信息处理
       isShowImage: true,
       isShowVideo: true,
       isShowFile: true,
-    }
+    };
   },
   methods: {
     deepCopy(obj) {
-      return JSON.parse(JSON.stringify(obj))
+      return JSON.parse(JSON.stringify(obj));
     },
     cruxSuccess() {
-      this.getData()
+      this.getData();
     },
     // 获取表头和实例数据
     getData() {
       let params1 = {
-        orders: "sort asc",
-        pageNumber: 1,
-        pageSize: 1000,
-        type: this.type
-      }, params2 = {
-        filters: `id='${this.id}'`,
-      };
+          orders: "sort asc",
+          pageNumber: 1,
+          pageSize: 1000,
+          type: this.type,
+        },
+        params2 = {
+          filters: `id='${this.id}'`,
+        };
       let promise1 = new Promise((resolve, reject) => {
-        getDataDictionary(params1, res => {
-          resolve(res)
-        })
-      })
+        getDataDictionary(params1, (res) => {
+          resolve(res);
+        });
+      });
       let promise2 = new Promise((resolve, reject) => {
-        queryProperty(params2, res => {
-          resolve(res)
-        })
-      })
-      Promise.all([promise1, promise2]).then(values => {
+        queryProperty(params2, (res) => {
+          resolve(res);
+        });
+      });
+      Promise.all([promise1, promise2]).then((values) => {
         this.pointData = values[0].content;
         this.exampleData = values[1].content[0];
-        this.name = this.exampleData.localName ? this.exampleData.localName : this.exampleData.name ? this.exampleData.name : '';
-        this.code = this.exampleData.localId ? this.exampleData.localId : '';
+        this.name = this.exampleData.localName
+          ? this.exampleData.localName
+          : this.exampleData.name
+          ? this.exampleData.name
+          : "";
+        this.code = this.exampleData.localId ? this.exampleData.localId : "";
         let obj = this.deepCopy(values[1].content[0]);
         obj = tools.flattenKeys(obj);
         for (let key in obj) {
           if (Array.isArray(obj[key]) && !obj[key].length) {
-            delete obj[key]
+            delete obj[key];
           }
         }
         this.instance = obj;
-        this.handleRadios(this.currentRadio)
-        this.handleEnclosure() //处理图片视频文件信息
-      })
+        this.handleRadios(this.currentRadio);
+        this.handleEnclosure(); //处理图片视频文件信息
+      });
     },
     handleEnclosure() {
       //图片文件处理,脱离radio控制
-      let isList = this.pointData
-      let isArr = []
-      isList.map(j => {
+      let isList = this.pointData;
+      let isArr = [];
+      isList.map((j) => {
         if (this.instance.hasOwnProperty(j.path)) {
-          j.value = this.instance[j.path]
-          return j
+          j.value = this.instance[j.path];
+          return j;
         }
-      })
-      isArr = isList.filter(k => k.value)
-      this.handlePicList(isArr)
-      this.handleFileList(isArr)
+      });
+      isArr = isList.filter((k) => k.value);
+      this.handlePicList(isArr);
+      this.handleFileList(isArr);
     },
-    handleRadios(val) { //判断radio的值显示关键信息,基本信息,图片,文件
-      let arr = []
+    handleRadios(val) {
+      //判断radio的值显示关键信息,基本信息,图片,文件
+      let arr = [];
       //关键信息点
-      this.exhibitionCrux.cruxArray = this.pointData.filter(i => i.keyWord)
-      this.exhibitionCrux.cruxArray.map(i => {
+      this.exhibitionCrux.cruxArray = this.pointData.filter((i) => i.keyWord);
+      this.exhibitionCrux.cruxArray.map((i) => {
         if (this.instance.hasOwnProperty(i.path)) {
           return {
             ...i,
-            value: this.instance[i.path]
-          }
+            value: this.instance[i.path],
+          };
         }
-      })
-      if (val == 1) { //需采集信息
-        arr = this.pointData.filter(i => i.visible)
+      });
+      if (val == 1) {
+        //需采集信息
+        arr = this.pointData.filter((i) => i.visible);
 
         //  图片和的处理
         // this.handlePicList(arr)
         // //  文件处理
         // this.handleFileList(arr)
-
-      } else if (val == 2) { //有值信息点
-        let list = this.pointData
-        list.map(j => {
+      } else if (val == 2) {
+        //有值信息点
+        let list = this.pointData;
+        list.map((j) => {
           if (this.instance.hasOwnProperty(j.path)) {
             return {
               ...j,
-              value: this.instance[j.path]
-            }
+              value: this.instance[j.path],
+            };
           }
-          arr = list.filter(k => k.value)
+          arr = list.filter((k) => k.value);
           // this.handlePicList(arr)
           // this.handleFileList(arr)
-        })
-      } else { //全部信息点
-        arr = this.pointData
+        });
+      } else {
+        //全部信息点
+        arr = this.pointData;
         // this.handlePicList(arr)
         // this.handleFileList(arr)
       }
-      this.displayData(arr)
+      this.displayData(arr);
     },
     handlePicList(arr) {
-      let picObject = {}
+      let picObject = {};
       //处理数据格式
-      arr.map(i => {
-        if (i.dataType == 'ATTACHMENT') {
+      arr.map((i) => {
+        if (i.dataType == "ATTACHMENT") {
           switch (i.path) {
-            case 'infos.drawing':
-            case 'infos.installPic':
-            case 'infos.installDrawing':
-            case 'infos.nameplate':
-            case 'infos.pic':
+            case "infos.drawing":
+            case "infos.installPic":
+            case "infos.installDrawing":
+            case "infos.nameplate":
+            case "infos.pic":
               if (this.instance.hasOwnProperty(i.path)) {
-                i.PicList = this.instance[i.path]
+                i.PicList = this.instance[i.path];
               }
               if (picObject[i.name]) {
-
               } else {
-                picObject[i.name] = []
+                picObject[i.name] = [];
               }
               picObject[i.name].push({
                 ...i,
-              })
+              });
               break;
-
           }
         }
-
-      })
+      });
       //展示图片
-      this.exhibitionImage.list = picObject
-      let isArray = [] //获取图片数组
+      this.exhibitionImage.list = picObject;
+      let isArray = []; //获取图片数组
       for (let i in picObject) {
         if (Array.isArray(picObject[i])) {
-          let list = picObject[i]
-          list.forEach(i => {
+          let list = picObject[i];
+          list.forEach((i) => {
             if (i.PicList) {
-              isArray.push(...i.PicList)
+              isArray.push(...i.PicList);
             }
-          })
+          });
         }
       }
-      this.exhibitionImage.arr = isArray
-      let video = isArray.filter(i => i.Type == 'video' && i.type == 'video')
-      this.exhibitionVideo.list = video
+      this.exhibitionImage.arr = isArray;
+      let video = isArray.filter((i) => i.Type == "video" && i.type == "video");
+      this.exhibitionVideo.list = video;
       //判断是否显示图片组件
-      this.isShowImage = isArray.length ? true : false
+      this.isShowImage = isArray.length ? true : false;
       //判断是否显示video组件
-      this.isShowVideo = video.length ? true : false
+      this.isShowVideo = video.length ? true : false;
     },
     handleFileList(arr) {
-      let picObject = {}
+      let picObject = {};
       //处理数据格式
-      arr.map(i => {
-        if (i.dataType == 'ATTACHMENT') {
+      arr.map((i) => {
+        if (i.dataType == "ATTACHMENT") {
           switch (i.path) {
-            case 'infos.insuranceFile':
-            case 'infos.archive':
-            case 'infos.checkReport':
+            case "infos.insuranceFile":
+            case "infos.archive":
+            case "infos.checkReport":
               if (this.instance.hasOwnProperty(i.path)) {
-                i.fileList = this.instance[i.path]
+                i.fileList = this.instance[i.path];
               }
               if (picObject[i.name]) {
-
               } else {
-                picObject[i.name] = []
+                picObject[i.name] = [];
               }
 
               picObject[i.name].push({
                 ...i,
-              })
-              break
+              });
+              break;
           }
         }
-
-      })
+      });
       //展示文件
-      this.exhibitionFile.list = picObject
-      let isArray = [] //获取文件数组
+      this.exhibitionFile.list = picObject;
+      let isArray = []; //获取文件数组
       for (let i in picObject) {
         if (Array.isArray(picObject[i])) {
-          let list = picObject[i]
-          list.forEach(i => {
+          let list = picObject[i];
+          list.forEach((i) => {
             if (i.fileList) {
-              isArray.push(...i.fileList)
+              isArray.push(...i.fileList);
             }
-          })
+          });
         }
       }
       //判断是否显示文件组件
-      this.isShowFile = isArray.length ? true : false
+      this.isShowFile = isArray.length ? true : false;
     },
-    changeRadio(val) { //1,需采集,2,有值,3,全部
-      this.handleRadios(val)
-      this.currentRadio = val
+    changeRadio(val) {
+      //1,需采集,2,有值,3,全部
+      this.handleRadios(val);
+      this.currentRadio = val;
     },
     formatDate(str) {
       if (str) {
-        if (str.includes('-')) {
-          return str
+        if (str.includes("-")) {
+          return str;
         } else {
           if (str.length > 8) {
-            return str.substr(0, 4) + "-" + str.substr(4, 2) + "-" + str.substr(6, 2) + " " + str.substr(8, 2) + ":" + str.substr(10, 2) + ":" + str.substr(12, 2)
+            return (
+              str.substr(0, 4) +
+              "-" +
+              str.substr(4, 2) +
+              "-" +
+              str.substr(6, 2) +
+              " " +
+              str.substr(8, 2) +
+              ":" +
+              str.substr(10, 2) +
+              ":" +
+              str.substr(12, 2)
+            );
           } else {
-            return str.substr(0, 4) + "-" + str.substr(4, 2) + "-" + str.substr(6, 2) + " " + str.substr(8, 2)
+            return (
+              str.substr(0, 4) +
+              "-" +
+              str.substr(4, 2) +
+              "-" +
+              str.substr(6, 2) +
+              " " +
+              str.substr(8, 2)
+            );
           }
         }
       } else {
-        return '--'
+        return "--";
       }
     },
-    displayData(arr) {//对数据进行处理传给组件展示
-      const result = {}
-      arr.forEach(i => {
+    displayData(arr) {
+      //对数据进行处理传给组件展示
+      const result = {};
+      arr.forEach((i) => {
         if (this.instance.hasOwnProperty(i.path) && this.currentRadio != 2) {
-          i.value = this.instance[i.path]
+          i.value = this.instance[i.path];
         }
-        if (i.dataType == 'DATETIME') {
+        if (i.dataType == "DATETIME") {
           if (this.instance.hasOwnProperty(i.path)) {
-            let time = this.instance[i.path]
-            i.value = this.formatDate(time)
+            let time = this.instance[i.path];
+            i.value = this.formatDate(time);
           }
         }
         if (i.dataSource && i.dataSource.length) {
           // let source = JSON.parse(i.DataSource)
-          let source = i.dataSource
+          let source = i.dataSource;
           //判断输入类型
-          if (i.dataType == 'ENUM') {
-            let d1l = tools.formatDataSource(i.dataSource)
-            d1l.forEach(k => {
+          if (i.dataType == "ENUM") {
+            let d1l = tools.formatDataSource(i.dataSource);
+            d1l.forEach((k) => {
               if (k.code == this.instance[i.path]) {
-                i.value = k.name
+                i.value = k.name;
               }
-            })
-          } else if (i.dataType == 'MENUM' || i.dataType == 'DATETIME') {
+            });
+          } else if (i.dataType == "MENUM" || i.dataType == "DATETIME") {
             if (this.instance.hasOwnProperty(i.path)) {
               if (!Array.isArray(this.instance[i.path])) {
-                let transArray = this.instance[i.path].split(',')
-                i.value = source.filter(item => transArray.includes(item.code)).map(item => item.name).join(',')
+                let transArray = this.instance[i.path].split(",");
+                i.value = source
+                  .filter((item) => transArray.includes(item.code))
+                  .map((item) => item.name)
+                  .join(",");
               }
             }
           }
-          source.forEach(j => {
+          source.forEach((j) => {
             if (j.code == this.instance[i.path]) {
-              i.value = j.name
+              i.value = j.name;
             }
-          })
+          });
         }
-        if (i.category == 'STATIC') {
-          if (result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`]) {
-            result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`].paths.push({
+        if (i.category == "STATIC") {
+          if (
+            result[`${i.firstName}${i.secondName ? "/" + i.secondName : ""}`]
+          ) {
+            result[
+              `${i.firstName}${i.secondName ? "/" + i.secondName : ""}`
+            ].paths.push({
               Path: i.Path,
               InfoPointName: i.name,
               InfoPointCode: i.code,
@@ -415,69 +479,73 @@ export default {
               id: i.id,
               groupCode: i.groupCode,
               type: i.type,
-              dataType: i.dataType
-            })
+              dataType: i.dataType,
+            });
           } else {
-            result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
-              paths: [{
-                Path: i.path,
-                InfoPointName: i.name,
-                InfoPointCode: i.code,
-                Value: i.value,
-                Visible: i.visible,
-                KeyWord: i.keyWord,
-                data: i.data,
-                receivetime: i.receivetime,
-                error: i.error,
-                Unit: i.unit,
-                FirstName: i.firstName,
-                classCode: i.classCode,
-                id: i.id,
-                groupCode: i.groupCode,
-                type: i.type,
-                dataType: i.dataType
-              }]
-            }
+            result[
+              `${i.firstName}${i.secondName ? "/" + i.secondName : ""}`
+            ] = {
+              paths: [
+                {
+                  Path: i.path,
+                  InfoPointName: i.name,
+                  InfoPointCode: i.code,
+                  Value: i.value,
+                  Visible: i.visible,
+                  KeyWord: i.keyWord,
+                  data: i.data,
+                  receivetime: i.receivetime,
+                  error: i.error,
+                  Unit: i.unit,
+                  FirstName: i.firstName,
+                  classCode: i.classCode,
+                  id: i.id,
+                  groupCode: i.groupCode,
+                  type: i.type,
+                  dataType: i.dataType,
+                },
+              ],
+            };
           }
         }
-      })
+      });
 
-      this.exhibitionBaseInformation.information = result
-      this.exhibitionCrux.allMessage = result
+      this.exhibitionBaseInformation.information = result;
+      this.exhibitionCrux.allMessage = result;
     },
     goBack() {
       this.$router.push({
-        name: 'propertyLedger',
+        name: "propertyLedger",
         params: {
-          Family: this.type
-        }
-      })
+          Family: this.type,
+        },
+      });
     },
     // 切换实例
     handleChangeExample() {
-      this.selectRadio.initRadio = '1';
-      this.currentRadio = '1';
+      this.selectRadio.initRadio = "1";
+      this.currentRadio = "1";
       this.getData();
     },
     // 切换上一个实例
     handleClickPrev() {
-      let index = this.list.findIndex(item => item.value == this.id);
+      let index = this.list.findIndex((item) => item.value == this.id);
       this.id = this.list[index - 1].value;
       this.handleChangeExample();
     },
     // 切换下一个实例
     handleClickNext() {
-      let index = this.list.findIndex(item => item.value == this.id);
+      let index = this.list.findIndex((item) => item.value == this.id);
       this.id = this.list[index + 1].value;
       this.handleChangeExample();
     },
   },
   watch: {
     projectId() {
-      this.$router.push({ path: "/ledger/property" })
-    }
-  }
-}
+      this.$router.push({ path: "/ledger/property" });
+    },
+  },
+};
 </script>
 
 <style scoped lang="less">
@@ -569,5 +637,4 @@ export default {
 /deep/ .el-scrollbar__wrap {
   overflow-x: hidden;
 }
-
 </style>

+ 67 - 65
src/views/ledger/report/index.vue

@@ -108,7 +108,7 @@
           竖井<i>{{ `(${shaftCount ? shaftCount : '0'})` }}</i></span>
         <div class="data-show" v-loading="isLoading" v-if="shaft.length">
           <div class="show-content" v-for="(item,index) in shaft" :key="index">
-            <datafan :id="'origin-datafan' + index" :renderData="item" v-if="!item.needCountT"></datafan>
+            <datafan :id="'origin-datafan' + index" :renderData="item" v-if="item.needCountT==undefined"></datafan>
             <data-origin :id="'origin-shaft' + index" :renderData="item" v-else></data-origin>
           </div>
         </div>
@@ -139,7 +139,8 @@ import {
   queryTenantCompletion,
   queryZoneCount,
   ShaftRelationBusinessSpace,
-  systemInfoPoint
+  systemInfoPoint,
+  gatherInfoPoint
 } from "@/api/scan/request";
 import { getDataDictionary } from "@/api/dict";
 import dataOrigin from "@/components/ledger/report/dataorigin";
@@ -259,7 +260,7 @@ export default {
     this.getFunctionType();
     this.getStatisticsCount();
     this.getEquipCount();
-    // this.gatherInfoPoints();
+    this.gatherInfoPoints();
     this.systemInfoPoints();
     this.infoPoints();
     this.getAssetsCount();
@@ -319,14 +320,14 @@ export default {
     },
     getShaftFunType() {// 获取数据功能类型
       getCenoteType(this.param, res => {
-        this.ShaftFunType = res.Content;
+        this.ShaftFunType = res.content;
         this.getShaftCount();
       })
     },
     shaftFunTypeTranstion(item) {// 竖井功能类型转换
       this.ShaftFunType.forEach((it, index) => {
-        if (item.Name === it.Id) {
-          item.Name = it.Name;
+        if (item.name === it.id) {
+          item.name = it.name;
         }
       })
     },
@@ -358,40 +359,40 @@ export default {
       })
     },
     // 统计设备信息点与需采集数据占比
-    // gatherInfoPoints() {
-    //   gatherInfoPoint(this.params, res => {
-    //     let arr = JSON.parse(JSON.stringify(res.Content))
-    //     arr.forEach(i => {
-    //       this.$set(this.deviceMessageData, 0, {
-    //         title: '统计设备信息点与需采集数据占比',
-    //         tips: '统计设备信息点与需采集数据占比',
-    //         contentValueO: '总数:',
-    //         contentValueT: '标准静态:',
-    //         needCountO: i.gatherInfoPointCounts,
-    //         needCountT: i.gatherStaticInfoPointCounts,
-    //         text: this.toPercent(i.gatherStaticInfoPointCounts / i.gatherInfoPointCounts),
-    //         val: this.static
-    //       })
-    //       this.$set(this.deviceMessageData, 1, {
-    //         contentValueO: '总数:',
-    //         contentValueT: '标准动态:',
-    //         needCountO: i.gatherInfoPointCounts,
-    //         needCountT: i.gatherDynamicInfoPointCounts,
-    //         text: this.toPercent(i.gatherDynamicInfoPointCounts / i.gatherInfoPointCounts),
-    //         val: this.dynamic
-    //       })
-    //
-    //       this.$set(this.deviceMessageData, 2, {
-    //         contentValueO: '总数:',
-    //         contentValueT: '自定义:',
-    //         needCountO: i.gatherInfoPointCounts,
-    //         needCountT: i.gatherCustomInfoPointCounts,
-    //         text: this.toPercent(i.gatherCustomInfoPointCounts / i.gatherInfoPointCounts),
-    //         val: this.custom
-    //       })
-    //     })
-    //   })
-    // },
+    gatherInfoPoints() {
+      gatherInfoPoint(this.params, res => {
+        let arr = JSON.parse(JSON.stringify(res.content))
+        arr.forEach(i => {
+          this.$set(this.deviceMessageData, 0, {
+            title: '统计设备信息点与需采集数据占比',
+            tips: '统计设备信息点与需采集数据占比',
+            contentValueO: '总数:',
+            contentValueT: '标准静态:',
+            needCountO: i.gatherInfoPointCounts,
+            needCountT: i.gatherStaticInfoPointCounts,
+            text: this.toPercent(i.gatherStaticInfoPointCounts / i.gatherInfoPointCounts),
+            val: this.static
+          })
+          this.$set(this.deviceMessageData, 1, {
+            contentValueO: '总数:',
+            contentValueT: '标准动态:',
+            needCountO: i.gatherInfoPointCounts,
+            needCountT: i.gatherDynamicInfoPointCounts,
+            text: this.toPercent(i.gatherDynamicInfoPointCounts / i.gatherInfoPointCounts),
+            val: this.dynamic
+          })
+    
+          // this.$set(this.deviceMessageData, 2, {
+          //   contentValueO: '总数:',
+          //   contentValueT: '自定义:',
+          //   needCountO: i.gatherInfoPointCounts,
+          //   needCountT: i.gatherCustomInfoPointCounts,
+          //   text: this.toPercent(i.gatherCustomInfoPointCounts / i.gatherInfoPointCounts),
+          //   val: this.custom
+          // })
+        })
+      })
+    },
 
     // 统计系统信息点与需采集数据占比
     systemInfoPoints() {
@@ -416,14 +417,14 @@ export default {
             text: this.toPercent(i.gatherDynamicInfoPointCounts / i.gatherInfoPointCounts),
             val: this.dynamic
           })
-          this.$set(this.sysMessageData, 2, {
-            contentValueO: '总数:',
-            contentValueT: '自定义:',
-            needCountO: i.gatherInfoPointCounts,
-            needCountT: i.gatherCustomInfoPointCounts,
-            text: this.toPercent(i.gatherCustomInfoPointCounts / i.gatherInfoPointCounts),
-            val: this.custom
-          })
+          // this.$set(this.sysMessageData, 2, {
+          //   contentValueO: '总数:',
+          //   contentValueT: '自定义:',
+          //   needCountO: i.gatherInfoPointCounts,
+          //   needCountT: i.gatherCustomInfoPointCounts,
+          //   text: this.toPercent(i.gatherCustomInfoPointCounts / i.gatherInfoPointCounts),
+          //   val: this.custom
+          // })
         })
 
       })
@@ -452,20 +453,20 @@ export default {
             text: this.toPercent(i.dynamicInfoPoint / i.dynamicInfoPointCounts),
             val: this.dynamic
           })
-          let obj = i.customInfoPointCounts ? {} : ''
-          if (obj) {
-            obj = {
-              contentValueO: '总数:',
-              contentValueT: '自定义:',
-              needCountO: i.customInfoPointCounts,
-              needCountT: i.customInfoPoint,
-              text: this.toPercent(i.customInfoPoint / i.customInfoPointCounts),
-              val: this.custom
-            }
-          }
-          this.$set(this.deviceMessageTotal, 2, {
-            ...obj
-          })
+          // let obj = i.customInfoPointCounts ? {} : ''
+          // if (obj) {
+          //   obj = {
+          //     contentValueO: '总数:',
+          //     contentValueT: '自定义:',
+          //     needCountO: i.customInfoPointCounts,
+          //     needCountT: i.customInfoPoint,
+          //     text: this.toPercent(i.customInfoPoint / i.customInfoPointCounts),
+          //     val: this.custom
+          //   }
+          // }
+          // this.$set(this.deviceMessageTotal, 2, {
+          //   ...obj
+          // })
 
 
         })
@@ -721,7 +722,7 @@ export default {
       this.shaft = [];
       // 获取竖井总数
       queryCenoteCount(this.params, res => {
-        this.shaftCount = res.Count;
+        this.shaftCount = res.count;
       })
 
       let promise1 = new Promise((resolve) => {
@@ -764,13 +765,14 @@ export default {
           needCountT: this.shaftCount - res1.count,
           text: text
         })
+        console.log(this.shaft,'88888888888');
       })
     }
   },
   watch: {
     projectId(n, o) {
       this.params = {
-        ProjectId: this.projectId
+        projectId: this.projectId
       }
       this.getFunctionType();
       this.getStatisticsCount();
@@ -780,7 +782,7 @@ export default {
       this.getSystemCount();
       this.getTenantCount();
       this.getShaftFunType();
-      // this.gatherInfoPoints();
+      this.gatherInfoPoints();
       this.systemInfoPoints();
       this.infoPoints();
     }

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

@@ -22,7 +22,7 @@
       </div>
     </div>
     <el-row class="center">
-      <el-button type="primary" size="medium" @click.prevent.once="handleCreateTableData" class="create_button">创建业务空间</el-button>
+      <el-button type="primary" size="medium" @click="handleCreateTableData" :disabled="createDisable" class="create_button">创建业务空间</el-button>
     </el-row>
 
     <!--二维码弹窗 -->
@@ -108,6 +108,7 @@ export default {
       imgsArr: [], //临时保存的图片key数组
       showType: this.$route.query.showType,
       buildFloorData: [],
+      createDisable: false
     };
   },
   computed: {
@@ -160,6 +161,7 @@ export default {
     },
     // 创建业务空间数据
     async handleCreateTableData() {
+      this.createDisable = true;
       let newData = this.tableData.filter(item => {
         let keys = Object.keys(item);
         keys.map(key => {
@@ -201,6 +203,7 @@ export default {
         content: newData
       }
       zoneCreate(param, res => {
+        this.createDisable = false;
         this.$message.success('创建成功')
         session.remove("spaceAddData")
         this.$router.push({

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

@@ -251,7 +251,7 @@ export default {
         this.tableList.forEach(item => {
           this.modelFloor.forEach(it => {
             if (item.Code === it.FolderId) {
-              if (!item.DataCheckResult) {
+              if (!it.DataCheckResult) {
                 item.flag = false;
               }
             }

+ 0 - 1
src/views/ready/buildfloor/drawGraphy/checkGraphy.vue

@@ -164,7 +164,6 @@ export default {
             label: t.FloorName,
           }
         })
-        console.log(tempArr, 'tempArr')
         this.pushChild(this.options, tempArr, val[0])
       })
     },