瀏覽代碼

添加批量创建业务空间功能,修改台账排序规则

zhangyu 4 年之前
父節點
當前提交
e95308776e

+ 102 - 15
src/components/business_space/business/handsontable.vue

@@ -41,6 +41,31 @@
     <!--      上传图片-->
     <upload-img-dialog :read="onlyRead" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog" />
     <dialogZone ref="zone" @createSuccess="getOtherType" />
+    <!-- 不支持的输入方式 -->
+    <el-dialog title="临时维护信息点" :visible.sync="myDialog.update" @close="handleCloseUpdate" width="670px">
+      <el-row>
+        该信息点未定义对应组件,现在维护数据不确定后续是否可用。如确实需要维护,请点击
+        <el-link @click="updateInputShow = true" type="primary" :underline="false">继续维护</el-link>
+        。
+      </el-row>
+      <el-row style="margin-top:20px;" v-show="updateInputShow">
+        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" placeholder="请输入内容"
+                  v-model="updateInput"></el-input>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="myDialog.update = false">取 消</el-button>
+        <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
+      </span>
+    </el-dialog>
+    <!-- 新增业务空间 -->
+    <el-dialog title="确定新增业务空间的分区类型" :visible.sync="myDialog.addSpace" width="670px">
+      <el-row>
+        <space-cascader ref="cascader" @change="changeAddType"></space-cascader>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="toAddSpace">下 一 步</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -55,6 +80,7 @@ import showTools from "@/utils/handsontable/notShow"
 import handsonUtils from "@/utils/hasontableUtils"
 import Handsontable from "handsontable-pro"
 import buildFloor from '@/utils/handsontable/buildFloorData'
+import spaceCascader from '@/components/ledger/lib/spaceSelect'
 import 'handsontable-pro/dist/handsontable.full.css'
 import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
 import qrcode from "@/components/ledger/lib/qrcode";
@@ -81,7 +107,7 @@ export default {
     addBusiness,
     uploadImgDialog,
     dialogZone,
-
+    spaceCascader,
   },
   computed: {
     ...mapGetters("layout", ["projectId", "secret", "userId"]),
@@ -127,12 +153,27 @@ export default {
       copyMain: [], //深拷贝数组
       buildFloorData: [], //楼层数据
       zoneItemID: '',
+      inputMap: {
+        flowBuild: {
+          InputMode: 'D1',
+          Editable:true,
+          InfoPointCode:"flowBuild",
+          InfoPointName:"建筑楼层",
+          Path:"flowBuild"
+        }
+      }, //信息点和输入方式映射表
+      updateInputShow: false, //是否显示临时维护输入框
+      updateInfoPoint: '',//临时维护信息点
+      updateInput: '', //临时维护信息点值
       myDialog: {
         uploadImgs: false, //上传图片弹窗
+        update: false,//临时维护信息点
+        addSpace: false, //批量添加业务空间
       },
       imgsArr: [], //空间图片
       OtherList: [],//其他分区筛选框
       OtherValue: '',
+      addData: {}, 
     };
   },
   created() {
@@ -150,6 +191,11 @@ export default {
     //获取表格数据
     getHeader(headers, buildFloorSelectd) {
       this.headers = headers
+      this.headers.forEach(item => {
+        if (item.Path && item.InputMode) {
+          this.inputMap[item.Path] = item
+        }
+      })
       this.buildFloorSelectd = buildFloorSelectd
       this.page.pageNumber = 1
       this.getData()
@@ -160,7 +206,7 @@ export default {
         ZoneType: this.zoneCode,
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize,
-        Orders: "createTime desc, RoomID asc"
+        Orders: "createTime desc, RoomLocalName desc, RoomLocalID desc, RoomID asc"
       }
       if (this.buildFloorSelectd.length === 1) {
         switch (this.buildFloorSelectd[0]) {
@@ -377,6 +423,7 @@ export default {
     getInfors(infos, row) {
       let val = this.hot.colToProp(row.col);
       this.row = row.row;
+      let inputData = this.inputMap[val];
       lStorage.set('screen_data', { path: this.$route.path, data: { RoomID: infos.RoomID, zone: this.zoneCode } })
       if (val == "point") {
         let query = {
@@ -394,7 +441,7 @@ export default {
         if (!!this.qrcodeUrl) {
           this.dialog.qrcode = true;
         } else {
-          this.$message("此设备没有设备二维码")
+          this.$message("此空间没有二维码")
         }
       } else if (val == "Pic") {
         let Picdata = tools.dataForKey(this.main[row.row], val);
@@ -402,10 +449,32 @@ export default {
         if (!this.onlyRead || this.imgsArr.length) {
           this.myDialog.uploadImgs = true;
         }
-      } else {
+      }
+      if (!this.onlyRead && !inputData.Editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
+      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputData.InputMode) == '-1') {
+        this.updateInfoPoint = val;
+        this.updateInput = tools.dataForKey(this.tableData[row.row], val);
+        this.myDialog.update = true;
         return false;
       }
     },
+    //关闭临时维护弹窗回调
+    handleCloseUpdate() {
+        this.updateInputShow = false
+        this.updateInfoPoint = ''
+        this.updateInput = ''
+    },
+    //更新临时维护信息点
+    handleClickUpdate() {
+        tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+        this.tdChange([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+        this.updateInputShow = false
+        this.myDialog.update = false
+        this.updateInput = ''
+    },
     //表格发生更改
     tdChange(changeData, source) {
       if (!this.onlyRead) {
@@ -750,20 +819,38 @@ export default {
     },
     /**  页面中的按钮事件--------------------------- */
     addSp() {
-      if (this.main && this.main.length && this.main[0].RoomID) {
-        this.hot.destroy()
-        this.hot = null
-        this.main.unshift({})
-        this.getMain()
+      this.myDialog.addSpace = true
+      // if (this.main && this.main.length && this.main[0].RoomID) {
+      //   this.hot.destroy()
+      //   this.hot = null
+      //   this.main.unshift({})
+      //   this.getMain()
+      // } else {
+      //   if (this.main && this.main.length) {
+      //     this.$message("请添加完成后继续添加")
+      //   } else {
+      //     this.main.unshift({})
+      //     this.getMain()
+      //   }
+      // }
+    },
+    //下一步
+    toAddSpace() {
+      if (this.addData.spaceType) {
+        this.$router.push({
+          path: "/ledger/spaceadd",
+          query: this.addData
+        });
       } else {
-        if (this.main && this.main.length) {
-          this.$message("请添加完成后继续添加")
-        } else {
-          this.main.unshift({})
-          this.getMain()
-        }
+        this.$message("请选择要添加的业务空间类型!")
       }
     },
+    //选择业务空间类型-添加业务空间
+    changeAddType(val, item) {
+      this.addData.spaceType = val;
+      this.addData.spaceName = item.Name;
+      this.addData.showType = this.showType;
+    },
     //刷新
     reset() {
       this.getData()

+ 1 - 1
src/components/business_space/dialogs/list/firm.vue

@@ -40,7 +40,7 @@
                 找不到想要的型号? 赶快去
                 <i style="color:#46B0FF;cursor: pointer;">厂家库</i>维护吧
             </p>
-            <my-pagination :page="page" @change="changed" style="margin-top:10px;"></my-pagination>
+            <my-pagination :page="page" @change="changed" style="margin-top:40px;"></my-pagination>
         </div>
 
       </div>

+ 1 - 1
src/components/dialogs/list/firm.vue

@@ -39,7 +39,7 @@
                 找不到想要的型号? 赶快去
                 <i style="color:#46B0FF;cursor: pointer;">厂家库</i>维护吧
             </p>
-            <my-pagination :page="page" @change="changed" style="margin-top:10px;"></my-pagination>
+            <my-pagination :page="page" @change="changed" style="margin-top:40px;"></my-pagination>
         </div>
 
       </div>

+ 25 - 17
src/components/dialogs/list/systemType.vue

@@ -20,7 +20,7 @@
             </el-col>
           </el-row>
         </div>
-        <el-table class='data-table' border :data="tableData" @selection-change="handleSelectionChange" style="width: 100%" ref="multipleTable">
+        <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.SysLocalName || scope.row.SysName}}</template>
@@ -37,7 +37,7 @@
         </el-table>
       </div>
     </div>
-    <span slot="footer" class="dialog-footer">
+    <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>
@@ -85,7 +85,7 @@ export default {
       search: "", //搜索文案
       tableData: [],
       systemList: [],
-      allData: [],
+      linkSystemData: [],
       multipleSelection: [],
       iframeSrc: "",
       iframeShow: false,
@@ -172,24 +172,25 @@ export default {
     },
     //点击详情
     lookDeatils(infos) {
-      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;
+      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: `category="${this.device.deviceId.substring(0, 2)}"`,
         PageNumber: 1,
-        PageSize: 100
+        PageSize: 1000
       }
       //建筑id
       if (this.buildId == "noKnow") {
@@ -202,11 +203,14 @@ export default {
         param.Filters += `;SysLocalName contain "${this.search}" or SysLocalID contain "${this.search}"`
       }
       queryLinkSys(param, res => {
-        this.allData = res.Content
         this.tableData = res.Content
         this.toggleSelection(res.Content)
       })
     },
+    //获取关联的系统
+    getLinkSystemData() {
+       this.linkSystemData = this.list?JSON.parse(JSON.stringify(this.list)):[]
+    },
     //添加设备关联系统关系
     createRelatSys() {
       if (this.curDevice) {//有即为编辑
@@ -229,7 +233,11 @@ export default {
       handler () {
         if (this.dialog.systemType) {
           this.getData()
-          this.getTableData()
+          if (this.type == 'read') {
+            this.getLinkSystemData()
+          } else {
+            this.getTableData()
+          }
         }
       }
     },

+ 1 - 1
src/components/ledger/cenote/elevationMap.vue

@@ -65,7 +65,7 @@
       this.load = true;
       // 查询竖井关联的空间垂直交通关系
       shaftVerticalSpace(this.params, (res) => {
-        let data = res.Content;
+        let data = res.Content?res.Content:[];
         let max = 0, idMap = {}, groupMap = {}, copyData = JSON.parse(JSON.stringify(data));
         this.groupWidth = {};
         copyData.reverse().forEach(floor => {

+ 21 - 8
src/components/ledger/handsontables/assets.vue

@@ -243,7 +243,13 @@
         },
         dieNum: 0, // 查询设备部件数量
         inputMap: {
-          flowBuild: 'D1'
+          flowBuild: {
+            InputMode: 'D1',
+            Editable:true,
+            InfoPointCode:"flowBuild",
+            InfoPointName:"建筑楼层",
+            Path:"flowBuild"
+          }
         }, //信息点和输入方式映射表
         updateInputShow: false, //是否显示临时维护输入框
         updateInfoPoint: '',//临时维护信息点
@@ -258,9 +264,9 @@
         if (this.mess.deviceId) {
           let params = {
             data: {
-              Orders: "sort asc",
+              Orders: "sort asc, InfoPointName desc",
               PageNumber: 1,
-              PageSize: 500
+              PageSize: 1000
             },
             type: this.mess.deviceId
           };
@@ -282,7 +288,7 @@
         if (!!this.mess.deviceId) {
           let param = {
             PageSize: this.page.size,
-            Orders: "createTime desc, EquipID desc",
+            Orders: "createTime desc, EquipLocalName desc, EquipLocalID desc, EquipID desc",
             PageNumber: this.page.currentPage,
             Filters: `Family='${this.mess.deviceId}'`
           }
@@ -465,6 +471,7 @@
         if (val.code && val.facility) {
           this.addData.Family = val.code
           this.addData.name = val.facility
+          this.addData.showType = this.showType
           this.numParams.Family = val.code
         }
       },
@@ -744,7 +751,7 @@
       //获取到了正确的信息
       getInfors(infos, row, el) {
         let val = this.hot.colToProp(row.col);
-        let inputMode = this.inputMap[val];
+        let inputData = this.inputMap[val];
         this.row = row.row;
         this.messKey = val;
         switch (val) {
@@ -859,6 +866,7 @@
           case 'LedgerParam.EquipManufactor.TestReport': //检测报告
           case 'LedgerParam.PhotoDoc.ProductCertification': //产品合格证
           case 'LedgerParam.Siteinstall.InstallInstruction': //安装说明书
+          case 'LedgerParam.SupplyPurchase.SupplierContract': //供应合同
           case 'LedgerParam.PhotoDoc.Drawing': //设备图纸
           case 'LedgerParam.Siteinstall.InstallDrawing': //安装图纸
             let IPSdata = tools.dataForKey(this.tableData[row.row], val);
@@ -892,10 +900,15 @@
           default:
             break;
         }
+        if (!this.onlyRead && !inputData.Editable) {
+          this.$message("该信息点的值为自动生成,不可人工维护!");
+          return false;
+        }
         if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
-          this.updateInfoPoint = val
-          this.updateInput = tools.dataForKey(this.tableData[row.row], val)
-          this.myDialog.update = true
+          this.updateInfoPoint = val;
+          this.updateInput = tools.dataForKey(this.tableData[row.row], val);
+          this.myDialog.update = true;
+          return false;
         }
       },
       //关闭临时维护弹窗回调

+ 25 - 14
src/components/ledger/handsontables/device.vue

@@ -285,7 +285,13 @@
         addData: {}, //
         showParts: false,
         inputMap: {
-          flowBuild: 'D1'
+          flowBuild: {
+            InputMode: 'D1',
+            Editable:true,
+            InfoPointCode:"flowBuild",
+            InfoPointName:"建筑楼层",
+            Path:"flowBuild"
+          }
         }, //信息点和输入方式映射表
         updateInputShow: false, //是否显示临时维护输入框
         updateInfoPoint: '',//临时维护信息点
@@ -367,7 +373,7 @@
         if (this.mess.deviceId) {
           let params = {
             data: {
-              Orders: "sort asc",
+              Orders: "sort asc, InfoPointName desc",
               PageNumber: 1,
               PageSize: 1000
             },
@@ -377,7 +383,7 @@
             this.tableHeader = res.Content;
             this.tableHeader.forEach(item => {
               if (item.Path && item.InputMode) {
-                this.inputMap[item.Path] = item.InputMode
+                this.inputMap[item.Path] = item
               }
             })
             this.getTableData()
@@ -394,7 +400,7 @@
         if (!!this.mess.deviceId) {
           let param = {
             PageSize: this.page.size,
-            Orders: "createTime desc, EquipID desc",
+            Orders: "createTime desc, EquipLocalName desc, EquipLocalID desc, EquipID desc",
             PageNumber: this.page.currentPage,
             Filters: `category='${this.mess.deviceId}'`
           }
@@ -595,6 +601,7 @@
       changeAddType(val) {
         this.addData.deviceId = val.code;
         this.addData.name = val.facility;
+        this.addData.showType = this.showType;
       },
       //下载
       download() {
@@ -974,7 +981,7 @@
       //获取到了正确的信息
       getInfors(infos, row, el) {
           let val = this.hot.colToProp(row.col);
-          let inputMode = this.inputMap[val];
+          let inputData = this.inputMap[val];
           this.row = row.row;
           this.messKey = val;
           this.firmDataType = 'row'
@@ -1011,11 +1018,9 @@
                   return false
               //关联系统
               case 'LinkSystem':
-                  if (!this.onlyRead) {
-                      this.curDevice = infos.EquipID;
-                      this.systemList = this.tableData[row.row].LinkSystem || [];
-                      this.myDialog.systemType = true;
-                  }
+                  this.curDevice = infos.EquipID;
+                  this.systemList = this.tableData[row.row].LinkSystem || [];
+                  this.myDialog.systemType = true;
                   return false
               //关联资产
               case 'LinkEquipLocalName':
@@ -1091,6 +1096,7 @@
               case 'LedgerParam.EquipManufactor.TestReport': //检测报告
               case 'LedgerParam.PhotoDoc.ProductCertification': //产品合格证
               case 'LedgerParam.Siteinstall.InstallInstruction': //安装说明书
+              case 'LedgerParam.SupplyPurchase.SupplierContract': //供应合同
               case 'LedgerParam.PhotoDoc.Drawing': //设备图纸
               case 'LedgerParam.Siteinstall.InstallDrawing': //安装图纸
                   let IPSdata = tools.dataForKey(this.tableData[row.row], val);
@@ -1129,10 +1135,15 @@
               default:
                   break;
           }
-          if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
-              this.updateInfoPoint = val
-              this.updateInput = tools.dataForKey(this.tableData[row.row], val)
-              this.myDialog.update = true
+          if (!this.onlyRead && !inputData.Editable) {
+            this.$message("该信息点的值为自动生成,不可人工维护!");
+            return false;
+          }
+          if (!this.onlyRead && showTools.InputModeArr.indexOf(inputData.InputMode) == '-1') {
+            this.updateInfoPoint = val;
+            this.updateInput = tools.dataForKey(this.tableData[row.row], val);
+            this.myDialog.update = true;
+            return false;
           }
       },
       //关闭临时维护弹窗回调

+ 13 - 7
src/components/ledger/handsontables/system.vue

@@ -175,9 +175,9 @@ export default {
       if (this.mess.deviceId) {
         let params = {
           data: {
-            Orders: "sort asc",
+            Orders: "sort asc, InfoPointName desc",
             PageNumber: 1,
-            PageSize: 500
+            PageSize: 1000
           },
           type: this.mess.deviceId
         }
@@ -204,7 +204,7 @@ export default {
         let param = {
           data: {
             PageSize: this.page.size,
-            Orders: "createTime desc, SysID desc",
+            Orders: "createTime desc, SysLocalName desc, SysLocalID desc, SysID desc",
             PageNumber: this.page.currentPage,
             Filters: `category='${this.mess.deviceId}'`
           }
@@ -270,6 +270,7 @@ export default {
     changeAddType(val) {
       this.addData.Category = val.Category;
       this.addData.CategoryName = val.CategoryName;
+      this.addData.showType = this.showType;
     },
     //格式化表头
     formatHeaderData(list) {
@@ -527,7 +528,7 @@ export default {
     getInfors(infos, row) {
       //其他的开始判断
       let val = this.hot.colToProp(row.col);
-      let inputMode = this.inputMap[val];
+      let inputData = this.inputMap[val];
       this.systemId = infos.SysID
       this.row = row.row
       this.messKey = val
@@ -564,10 +565,15 @@ export default {
         default:
           break;
       }
+      if (!this.onlyRead && !inputData.Editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
       if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
-        this.updateInfoPoint = val
-        this.updateInput = tools.dataForKey(this.tableData[row.row], val)
-        this.myDialog.update = true
+        this.updateInfoPoint = val;
+        this.updateInput = tools.dataForKey(this.tableData[row.row], val);
+        this.myDialog.update = true;
+        return false;
       }
     },
     //关闭临时维护弹窗回调

+ 35 - 18
src/components/ledger/lib/spaceSelect.vue

@@ -1,15 +1,25 @@
 <template>
   <div id="spaceSelect">
-    <span class="buildFloor" style="padding-right:12px">业务空间</span>
-    <el-select v-model="value" placeholder="请选择" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
-      <el-option v-for="(item, key) in options" :key="key" :label="item.Name" :value="item.Code"></el-option>
-    </el-select>
+    <span class="buildFloor" style="padding-right:12px">空间类型</span>
+    <el-cascader
+      v-model="value"
+      placeholder="请选择空间类型"
+      clearable
+      :style="isWidth ? '' : 'width:160px;'" size="small" 
+      :props="{value:'Code',label:'Name',children:'ZoneType'}"
+      :options="options" 
+      @change="changeVal">
+    </el-cascader>
   </div>
 </template>
 
 <script>
-import { queryDictionaryHead } from '@/api/scan/request';
+import { queryDictionaryHead, queryAllZoneType } from '@/api/scan/request';
+import { mapGetters } from 'vuex'
 export default {
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
   props: {
     isWidth: {
       type: Boolean,
@@ -18,7 +28,7 @@ export default {
   },
   data() {
     return {
-      value:null,
+      value:[null],
       spaceVal: null,//值
       options: [],
       props: {
@@ -29,22 +39,29 @@ export default {
   methods: {
     //获取下拉框数据
     getOptionData() {
-      let pa = {
-        Filters: `parentId = 'Space'`
-      }
-      queryDictionaryHead(pa, res => {
-        this.options = res.Content.map(t => {
-          if (t.Name == "元空间") {
-            return undefined;
-          }
-          return t;
-        }).filter(item => item);
-        this.options.unshift({Code:null, CreateTime:null, LastUpdate:null, Name:'全部', ObjectType: null, ParentId: null, Statistics: {}});
+      let params1 = {Cascade: [{ Name: 'zoneType', Filters: `ProjectId='${this.projectId}'` }]}
+      queryAllZoneType(params1, res => {
+        this.options = res.Content;
       })
     },
     //改变空间
     changeVal(value) {
-      this.$emit('change', value)
+      let val = value[value.length - 1];
+      let space = {};
+      this.options.forEach(item => {
+        if (item.ZoneType) {
+          item.ZoneType.forEach(other => {
+            if (other.Code == val) {
+              space = other
+            }
+          })
+        } else {
+          if (item.Code == val) {
+            space = item
+          }
+        }
+      })
+      this.$emit('change', val, space)
     }
   },
   created() {

+ 13 - 6
src/router/system.js

@@ -59,6 +59,7 @@ import addPropertys from '@/views/ledger/property/addpropertys' //根据未关
 import batchlinkAssets from '@/views/ledger/facility/batchlink' //批量关联资产
 import cenotelist from '@/views/ledger/cenotelist' //竖井清单
 import cenoteadd from '@/views/ledger/cenotelist/cenoteadd' //添加竖井
+import spaceadd from '@/views/ledger/spacelist/spaceadd' //添加业务空间
 import cenoteDetail from '@/views/ledger/cenotelist/cenoteDetail' //竖井关系详情
 import rentlist from '@/views/ledger/rentlist' //租户清单
 import manageTenantZone from '@/views/ledger/rentlist/manageTenantZone' //租户清单
@@ -344,12 +345,12 @@ export default [{
             name: 'deviceDetails',
             component: deviceDetails,
             meta: {
-							keepAlive: false,
-							breadcrumbs: [
-								{label: '台账管理', path: '/ledger/facility'},
-								{label: '设备台账', path: '/ledger/facility'},
-								{label: '台账详情'}
-							]
+                keepAlive: false,
+                breadcrumbs: [
+                    {label: '台账管理', path: '/ledger/facility'},
+                    {label: '设备台账', path: '/ledger/facility'},
+                    {label: '台账详情'}
+                ]
             }
           },
           {
@@ -460,6 +461,12 @@ export default [{
                 meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '业务空间台账', path: '/ledger/spacelist' }, { label: '业务空间详情' }] }
             },
             {
+                path: 'spaceadd',
+                name: 'spaceadd',
+                component: spaceadd,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '业务空间台账', path: '/ledger/spacelist' }, { label: '添加业务空间' }] }
+            },
+            {
                 path: 'cenotelist',
                 name: 'cenotelist',
                 component: cenotelist,

+ 1 - 0
src/utils/authutils.js

@@ -58,6 +58,7 @@ export default {
                     (from.path == "/ledger/rentadd" && session.get("rentAddData") && session.get("rentAddData").length) ||
                     (from.path == "/ledger/cenoteadd" && session.get("cenoteAddData") && session.get("cenoteAddData").length) ||
                     (from.path == "/ledger/deviceadd" && session.get("deviceAddData") && session.get("deviceAddData").length) ||
+                    (from.path == "/ledger/spaceadd" && session.get("spaceAddData") && session.get("spaceAddData").length) ||
                     (from.path == "/ledger/propertyadd" && session.get("propertyAddData") && session.get("propertyAddData").length) ||
                     (from.path == "/ledger/partsadd" && session.get("partsAddData") && session.get("partsAddData").length) ||
                     (from.path == "/ledger/systemadd" && session.get("systemAddData") && session.get("systemAddData").length)

+ 7 - 47
src/utils/handsontable/fillterField.js

@@ -1,73 +1,33 @@
 const data = {
   equipment: { //设备
     onlyRead: [],
-    edit: [
-      "EquipID",
-      "EquipName",
-      "EquipQRCode",
-      "BIMID",
-      "BIMLocation"
-    ]
+    edit: []
   },
   tenant: { //租户
     onlyRead: [],
-    edit: [
-      "TenantID",
-      "TenantName",
-      "BIMID",
-      "BIMLocation"
-    ]
+    edit: []
   },
   shaft: { //竖井
     onlyRead: [],
-    edit: [
-      "ShaftID",
-      "ShaftName",
-      "BIMID",
-      "BIMLocation"
-    ]
+    edit: []
   },
   parts: { //部件
     onlyRead: [],
-    edit: [
-      "EquipID",
-      "EquipName",
-      "EquipQRCode",
-      "BIMID",
-      "BIMLocation"
-    ]
+    edit: []
   },
   property:{ //资产
     onlyRead: [],
-    edit: [
-      "EquipID",
-      "EquipName",
-      "EquipQRCode",
-      "BIMID",
-      "BIMLocation"
-    ]
+    edit: []
   },
   system:{ //系统
     onlyRead: [],
-    edit: [
-      "SysID",
-      "SysName",
-      "EquipQRCode",
-      "BIMID",
-      "BIMLocation"
-    ]
+    edit: []
   },
   space:{//业务空间
     onlyRead: [
       "Outline"
     ],
-    edit: [
-      "RoomID",
-      "RoomName",
-      "BIMID",
-      "BIMLocation",
-      "Outline"
-    ]
+    edit: []
   }
 }
 

+ 6 - 1
src/utils/handsontable/notShow.js

@@ -488,6 +488,7 @@ const showTools = {
                         item.InfoPointCode == "TestReport" ||
                         item.InfoPointCode == "ProductCertification" ||
                         item.InfoPointCode == "InstallInstruction" ||
+                        item.InfoPointCode == "SupplierContract" ||
                         item.InfoPointCode == "Drawing" ||
                         item.InfoPointCode == "InstallDrawing"
 
@@ -671,6 +672,7 @@ const showTools = {
                         item.InfoPointCode == "TestReport" ||
                         item.InfoPointCode == "ProductCertification" ||
                         item.InfoPointCode == "InstallInstruction" ||
+                        item.InfoPointCode == "SupplierContract" ||
                         item.InfoPointCode == "Drawing" ||
                         item.InfoPointCode == "InstallDrawing"
                     ) {
@@ -839,6 +841,7 @@ const showTools = {
                         item.InfoPointCode == "TestReport" ||
                         item.InfoPointCode == "ProductCertification" ||
                         item.InfoPointCode == "InstallInstruction" ||
+                        item.InfoPointCode == "SupplierContract" ||
                         item.InfoPointCode == "Drawing" ||
                         item.InfoPointCode == "InstallDrawing"
                     ) {
@@ -1044,6 +1047,7 @@ const showTools = {
             item.InfoPointCode == "TestReport" ||
             item.InfoPointCode == "ProductCertification" ||
             item.InfoPointCode == "InstallInstruction" ||
+            item.InfoPointCode == "SupplierContract" ||
             item.InfoPointCode == "Drawing" ||
             item.InfoPointCode == "InstallDrawing"
         ) {
@@ -1148,6 +1152,7 @@ const showTools = {
             item.InfoPointCode == "TestReport" ||
             item.InfoPointCode == "ProductCertification" ||
             item.InfoPointCode == "InstallInstruction" ||
+            item.InfoPointCode == "SupplierContract" ||
             item.InfoPointCode == "Drawing" ||
             item.InfoPointCode == "InstallDrawing"
         ) {
@@ -1225,7 +1230,7 @@ const showTools = {
         } else { //(未支持的输入方式)暂不支持编辑
             return {
                 data: item.Path,
-                readOnly: onlyRead
+                readOnly: !item.Editable
             }
         }
     },

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

@@ -48,7 +48,7 @@ export default {
       relationids: "",
       onlyRead: false,
       showTypes: [{ value: "Visible", label: '只看采集信息' }, { value: "all", label: '全部' }],
-      showType: "Visible",
+      showType: this.$route.query.showType,
       tableHeader: [],
       tableData: session.get("cenoteAddData")? session.get("cenoteAddData").length? session.get("cenoteAddData"): [{}]: [{}],
       copyTableData: []
@@ -68,9 +68,9 @@ export default {
     async getTableHeader() {
       let param = {
         data: {
-          Orders: "sort asc",
+          Orders: "sort asc, InfoPointName desc",
           PageNumber: 1,
-          PageSize: 500,
+          PageSize: 1000,
         },
         type: 'Shaft'
       }

+ 29 - 11
src/views/ledger/cenotelist/index.vue

@@ -87,7 +87,15 @@ export default {
       myDialog: {
         update: false,//临时维护信息点
       },
-      inputMap: {}, //信息点和输入方式映射表
+      inputMap: {
+        flowBuild: {
+          InputMode: 'D1',
+          Editable:true,
+          InfoPointCode:"flowBuild",
+          InfoPointName:"建筑楼层",
+          Path:"flowBuild"
+        }
+      }, //信息点和输入方式映射表
       updateInputShow: false, //是否显示临时维护输入框
       updateInfoPoint: '',//临时维护信息点
       updateInput: '', //临时维护信息点值
@@ -126,9 +134,9 @@ export default {
     async getTableHeader() {
       let param = {
         data: {
-          Orders: "sort asc",
+          Orders: "sort asc, InfoPointName desc",
           PageNumber: 1,
-          PageSize: 500
+          PageSize: 1000
         },
         type: 'Shaft'
       }
@@ -136,7 +144,7 @@ export default {
         this.tableHeader = res.Content;
         this.tableHeader.forEach(item => {
           if (item.Path && item.InputMode) {
-            this.inputMap[item.Path] = item.InputMode
+            this.inputMap[item.Path] = item
           }
         })
         this.getTableData()
@@ -146,7 +154,7 @@ export default {
       let params = {
         Cascade: [{ Name: 'spaceList' }],
         Filters: this.cenoteId ? `ProjectId='${this.projectId}';structureInfo.ShaftFuncType='${this.cenoteId}'` : `ProjectId='${this.projectId}'`,
-        Orders: "createTime desc, ShaftID asc",
+        Orders: "createTime desc, ShaftLocalName desc, ShaftLocalID desc, ShaftID asc",
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize
       }
@@ -217,7 +225,12 @@ export default {
     },
     // 添加竖井
     handleCreateTableData() {
-      this.$router.push({ name: 'cenoteadd' })
+      this.$router.push({
+        path: '/ledger/cenoteadd',
+        query: {
+          showType: this.showType
+        }
+      })
     },
     // 删除表格行
     handleDeleteTableRow() {
@@ -340,7 +353,7 @@ export default {
     getInfors(infos, row) {
       //其他的开始判断
       let val = this.tableExample.colToProp(row.col)
-      let inputMode = this.inputMap[val]
+      let inputData = this.inputMap[val]
       let name = infos.ShaftLocalName ? infos.ShaftLocalName : infos.ShaftName
       this.shaftId = infos.ShaftID //要操作的数据id
       //点击关联的元空间
@@ -360,10 +373,15 @@ export default {
         })
         return false
       }
-      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
-        this.updateInfoPoint = val
-        this.updateInput = tools.dataForKey(this.tableData[row.row], val)
-        this.myDialog.update = true
+      if (!this.onlyRead && !inputData.Editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
+      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputData.InputMode) == '-1') {
+        this.updateInfoPoint = val;
+        this.updateInput = tools.dataForKey(this.tableData[row.row], val);
+        this.myDialog.update = true;
+        return false;
       }
     },
     //关闭临时维护弹窗回调

+ 22 - 13
src/views/ledger/cenotelist/relatedSpace.vue

@@ -136,30 +136,39 @@ export default {
           });
           this.showDefaultSpace();
         });
-      }
-      else {
-        let pa = {
-          Cascade: [{ Name: 'zoneType', Filters: `ProjectId='${this.projectId}'` }]
-        }
-        queryAllZoneType(pa, res => {
-          this.spaceList = res.Content.map(t => {
+      } else {
+        let params1 = {Cascade: [{ Name: 'zoneType', Filters: `ProjectId='${this.projectId}'` }]},
+            params2 = {shaftId: this.$route.query.ShaftId};
+        let promise1 = new Promise((resolve, reject) => {
+            queryAllZoneType(params1, res => {
+                resolve(res)
+            })
+        })
+        let promise2 = new Promise((resolve, reject) => {
+            shaftSpaceTypeQuery(params2, res => {
+                resolve(res)
+            })
+        })
+        Promise.all([promise1, promise2]).then(values => {
+          let val1 = values[0], val2 = values[1]
+          this.spaceList = val1.Content.map(t => {
             if (t.Name != "元空间") {
               this.spaceType[t.Code] = t.Name;
             }
             return t;
           });
-          this.showDefaultSpace();
-        });
+          this.space = [val2.Content[0].ObjectType];
+          this.ObjectType = this.space[0];
+          //加载楼层信息
+          this.loadBuildingData();
+        })
       }
     },
     //默认显示默认分区,无默认分区显示第一个分区
     showDefaultSpace() {
-      if (this.spaceList.length) {
+      if (this.spaceList.length && this.cenoteObj.onlyRead) {
         this.space = this.spaceList.find((item) => { return item.Code == "GeneralZone" }) ? ["GeneralZone"] : [this.spaceList[0].Code];
         this.ObjectType = this.space[0];
-        // if (this.spaceList.length > 1 && this.cenoteObj.onlyRead) {
-        //   this.showSpaceDot = true;
-        // }
       }
       //处理空间类型
       this.spaceList.map(item => {

+ 4 - 3
src/views/ledger/facility/addfacility.vue

@@ -128,7 +128,7 @@ export default {
       systemId: null,
       graphyId: null,
       id: 0,
-      showType: 'partInfo',
+      showType: this.$route.query.showType,
       EquipmentList: [],
       firmId: "", //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
       buildFloorData: [],
@@ -205,9 +205,9 @@ export default {
     async getTableHeader() {
       let params = {
         data: {
-          Orders: "sort asc",
+          Orders: "sort asc, InfoPointName desc",
           PageNumber: 1,
-          PageSize: 500
+          PageSize: 1000
         },
         type: this.category.deviceId
       };
@@ -616,6 +616,7 @@ export default {
         case 'LedgerParam.EquipManufactor.TestReport': //检测报告
         case 'LedgerParam.PhotoDoc.ProductCertification': //产品合格证
         case 'LedgerParam.Siteinstall.InstallInstruction': //安装说明书
+        case 'LedgerParam.SupplyPurchase.SupplierContract': //供应合同
         case 'LedgerParam.PhotoDoc.Drawing': //设备图纸
         case 'LedgerParam.Siteinstall.InstallDrawing': //安装图纸
           let IPSdata = tools.dataForKey(this.tableData[row.row], val);

+ 5 - 3
src/views/ledger/facility/parts/index.vue

@@ -161,9 +161,9 @@ export default {
     async getTableHeader() {
       let params = {
         data: {
-          Orders: "sort asc",
+          Orders: "sort asc, InfoPointName desc",
           PageNumber: 1,
-          PageSize: 500
+          PageSize: 1000
         },
         type: this.tabVal
       };
@@ -177,6 +177,7 @@ export default {
       let params = {
         PageNumber: this.page.pageNumber,
         PageSize: this.page.PageSize,
+        Orders: "createTime desc, EquipLocalName desc, EquipLocalID desc, EquipID desc",
         Filters: `category='${this.tabVal}';parentId='${this.deviceId}'`
       };
       await getEquipPartsCon(params, res => {
@@ -369,7 +370,8 @@ export default {
         val == "LedgerParam.EquipManufactor.OriginalCertificate" || //原厂证明
         val == "LedgerParam.EquipManufactor.TestReport" || //检测报告
         val == "LedgerParam.PhotoDoc.ProductCertification" || //产品合格证
-        val == "LedgerParam.Siteinstall.InstallInstruction" || //安装说明书
+        val == "LedgerParam.Siteinstall.InstallInstruction" || //
+        val == 'LedgerParam.SupplyPurchase.SupplierContract' || //供应合同
         val == "LedgerParam.PhotoDoc.Drawing" || //设备图纸
         val == "LedgerParam.Siteinstall.InstallDrawing" //安装图纸
       ) {

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

@@ -102,7 +102,7 @@ export default {
         { value: "all", label: '全部' },
         { value: "Visible", label: '只看采集信息' }
       ],
-      showType: "partInfo",
+      showType: this.$route.query.showType,
       copyTableData: [],
       category: "", //当前设备类
       myDialog: {
@@ -160,9 +160,9 @@ export default {
     async getTableHeader() {
       let params = {
         data: {
-          Orders: "sort asc",
+          Orders: "sort asc, InfoPointName desc",
           PageNumber: 1,
-          PageSize: 500
+          PageSize: 1000
         },
         type: this.category.Code
         // Filters: `type='Equipment' or type='${this.category.Code}'`
@@ -515,6 +515,7 @@ export default {
         val == "LedgerParam.EquipManufactor.TestReport" || //检测报告
         val == "LedgerParam.PhotoDoc.ProductCertification" || //产品合格证
         val == "LedgerParam.Siteinstall.InstallInstruction" || //安装说明书
+        val == 'LedgerParam.SupplyPurchase.SupplierContract' || //供应合同
         val == "LedgerParam.PhotoDoc.Drawing" || //设备图纸
         val == "LedgerParam.Siteinstall.InstallDrawing" //安装图纸
       ) {

+ 66 - 3
src/views/ledger/facility/partsmanage/index.vue

@@ -57,6 +57,22 @@
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
     <!-- 关联资产 -->
     <change-rea @changeProperty="changeProperty" :dialog="myDialog" :category="deviceType"></change-rea>
+    <!-- 不支持的输入方式 -->
+    <el-dialog title="临时维护信息点" :visible.sync="myDialog.update" @close="handleCloseUpdate" width="670px">
+      <el-row>
+        该信息点未定义对应组件,现在维护数据不确定后续是否可用。如确实需要维护,请点击
+        <el-link @click="updateInputShow = true" type="primary" :underline="false">继续维护</el-link>
+        。
+      </el-row>
+      <el-row style="margin-top:20px;" v-show="updateInputShow">
+        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" placeholder="请输入内容"
+                  v-model="updateInput"></el-input>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="myDialog.update = false">取 消</el-button>
+        <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -123,6 +139,18 @@ export default {
       },
       tableData: [],
       copyTableData: [],
+      inputMap: {
+        flowBuild: {
+          InputMode: 'D1',
+          Editable:true,
+          InfoPointCode:"flowBuild",
+          InfoPointName:"建筑楼层",
+          Path:"flowBuild"
+        }
+      }, //信息点和输入方式映射表
+      updateInputShow: false, //是否显示临时维护输入框
+      updateInfoPoint: '',//临时维护信息点
+      updateInput: '', //临时维护信息点值
       tableExample: null,
       tabVal: "",
       activeTab: {}, //当前tab页index
@@ -143,6 +171,7 @@ export default {
         details: false, //详情页
         lookPic: false, //图片查看
         changeRea: false, //关联的资产
+        update: false,//临时维护信息点
       },
       qrcodeUrl: "", //二维码图片地址
       filesArr: [], //保存临时的文件key
@@ -208,14 +237,19 @@ export default {
     async getTableHeader() {
       let params = {
         data: {
-          Orders: "sort asc",
+          Orders: "sort asc, InfoPointName desc",
           PageNumber: 1,
-          PageSize: 500
+          PageSize: 1000
         },
         type: this.tabVal
       };
       await getDataDictionary(params, res => {
         this.tableHeader = res.Content;
+        this.tableHeader.forEach(item => {
+          if (item.Path && item.InputMode) {
+            this.inputMap[item.Path] = item
+          }
+        })
         this.getTableData();
       });
     },
@@ -224,6 +258,7 @@ export default {
       let params = {
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize,
+        Orders: "createTime desc, EquipLocalName desc, EquipLocalID desc, EquipID desc",
         Filters: `category='${this.tabVal}';parentId='${this.deviceId}'`
       };
       await getEquipPartsCon(params, res => {
@@ -306,7 +341,8 @@ export default {
         query: {
           ...this.activeTab,
           pageNo: this.queryParam.pageNo,
-          pageSize: this.queryParam.pageSize
+          pageSize: this.queryParam.pageSize,
+          showType: this.showType
         }
       });
     },
@@ -581,6 +617,7 @@ export default {
     getInfors(infos, row) {
       this.row = row.row;
       let val = this.tableExample.colToProp(row.col);
+      let inputData = this.inputMap[val];
       this.messKey = val;
       switch (val) {
         //操作
@@ -679,6 +716,7 @@ export default {
         case 'LedgerParam.EquipManufactor.TestReport': //检测报告
         case 'LedgerParam.PhotoDoc.ProductCertification': //产品合格证
         case 'LedgerParam.Siteinstall.InstallInstruction': //安装说明书
+        case 'LedgerParam.SupplyPurchase.SupplierContract': //供应合同
         case 'LedgerParam.PhotoDoc.Drawing': //设备图纸
         case 'LedgerParam.Siteinstall.InstallDrawing': //安装图纸
           let IPSdata = tools.dataForKey(this.tableData[row.row], val);
@@ -709,6 +747,31 @@ export default {
         default:
           break;
       }
+      if (!this.onlyRead && !inputData.Editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
+      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
+        this.updateInfoPoint = val;
+        this.updateInput = tools.dataForKey(this.tableData[row.row], val);
+        this.myDialog.update = true;
+        return false;
+      }
+    },
+    //关闭临时维护弹窗回调
+    handleCloseUpdate() {
+      this.updateInputShow = false
+      this.updateInfoPoint = ''
+      this.updateInput = ''
+    },
+    //更新临时维护信息点
+    handleClickUpdate() {
+      // this.$message("更新成功");
+      tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+      this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+      this.updateInputShow = false
+      this.myDialog.update = false
+      this.updateInput = ''
     },
     utilToKey(key, name, data, messName) {
       if (key == name) {

+ 4 - 3
src/views/ledger/property/addproperty.vue

@@ -109,7 +109,7 @@ export default {
       systemId: null,
       graphyId: null,
       id: 0,
-      showType: 'partInfo',
+      showType: this.$route.query.showType,
       EquipmentList: []
     };
   },
@@ -126,9 +126,9 @@ export default {
     async getTableHeader() {
       let params = {
         data: {
-          Orders: "sort asc",
+          Orders: "sort asc, InfoPointName desc",
           PageNumber: 1,
-          PageSize: 500
+          PageSize: 1000
         },
         type: this.category.Family
       };
@@ -449,6 +449,7 @@ export default {
         case 'LedgerParam.EquipManufactor.TestReport': //检测报告
         case 'LedgerParam.PhotoDoc.ProductCertification': //产品合格证
         case 'LedgerParam.Siteinstall.InstallInstruction': //安装说明书
+        case 'LedgerParam.SupplyPurchase.SupplierContract': //供应合同
         case 'LedgerParam.PhotoDoc.Drawing': //设备图纸
         case 'LedgerParam.Siteinstall.InstallDrawing': //安装图纸
           let IPSdata = tools.dataForKey(this.tableData[row.row], val);

+ 23 - 8
src/views/ledger/rentlist/index.vue

@@ -100,7 +100,13 @@ export default {
         update: false,//临时维护信息点
       },
       inputMap: {
-        FloorId: 'B1'
+        FloorId: {
+          InputMode: 'B1',
+          Editable:true,
+          InfoPointCode:"FloorId",
+          InfoPointName:"所属楼层",
+          Path:"FloorId"
+        }
       }, //信息点和输入方式映射表
       updateInputShow: false, //是否显示临时维护输入框
       updateInfoPoint: '',//临时维护信息点
@@ -140,9 +146,9 @@ export default {
     async getTableHeader() {
       let param = {
         data: {
-          Orders: "sort asc",
+          Orders: "sort asc, InfoPointName desc",
           PageNumber: 1,
-          PageSize: 500
+          PageSize: 1000
         },
         type: 'Tenant'
       }
@@ -150,7 +156,7 @@ export default {
         this.tableHeader = res.Content;
         this.tableHeader.forEach(item => {
           if (item.Path && item.InputMode) {
-            this.inputMap[item.Path] = item.InputMode
+            this.inputMap[item.Path] = item
           }
         })
         this.getTableData()
@@ -162,7 +168,7 @@ export default {
           { Name: 'zoneTenantList', Cascade: [{ Name: 'building' }, { Name: 'floor' }] },
           { Name: 'zoneGeneraltList', Cascade: [{ Name: 'building' }, { Name: 'floor' }] }
         ],
-        Orders: "createTime desc, TenantID asc",
+        Orders: "createTime desc, TenantLocalName desc, TenantLocalID desc, TenantID asc",
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize
       }
@@ -233,7 +239,12 @@ export default {
     },
     // 添加租户数据
     handleCreateTableData() {
-      this.$router.push({ name: 'rentadd' })
+      this.$router.push({
+        path: '/ledger/rentadd',
+        query: {
+          showType: this.showType
+        }
+      })
     },
     // 删除表格行
     handleDeleteTableRow() {
@@ -374,7 +385,7 @@ export default {
     getInfors(infos, row) {
       //其他的开始判断
       let val = this.tableExample.colToProp(row.col)
-      let inputMode = this.inputMap[val]
+      let inputData = this.inputMap[val]
       this.row = row.row //要操作的列号
       this.messKey = val //要操作的列类型
       this.tenantID = infos.TenantID //要操作的数据id
@@ -395,7 +406,11 @@ export default {
         this.$refs.roomCountDrawer.showDrawer(infos)
         return false
       }
-      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
+      if (!this.onlyRead && !inputData.Editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
+      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputData.InputMode) == '-1') {
         this.updateInfoPoint = val
         this.updateInput = tools.dataForKey(this.tableData[row.row], val)
         this.myDialog.update = true

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

@@ -51,7 +51,7 @@ export default {
         { value: "all", label: '全部' }, 
         { value: "Visible", label: '只看采集信息' }
       ],
-      showType: "Visible",
+      showType: this.$route.query.showType,
       tableHeader: [],
       tableData: session.get("rentAddData")? session.get("rentAddData").length? session.get("rentAddData"): [{}]: [{}],
       copyTableData: []
@@ -71,9 +71,9 @@ export default {
     async getTableHeader() {
       let param = {
         data: {
-          Orders: "sort asc",
+          Orders: "sort asc, InfoPointName desc",
           PageNumber: 1,
-          PageSize: 500,
+          PageSize: 1000,
         },
         type: 'Tenant'
       }

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

@@ -298,9 +298,9 @@ export default {
     initMessage() {
       let params = {
         data: {
-          Orders: "sort asc",
+          Orders: "sort asc, InfoPointName desc",
           PageNumber: 1,
-          PageSize: 500
+          PageSize: 1000
         },
         type: this.activeName
       }

+ 430 - 0
src/views/ledger/spacelist/spaceadd/index.vue

@@ -0,0 +1,430 @@
+<template>
+  <div id="deviceList">
+    <el-row class="right">
+      <span style="float:left;">当前选择的分区类型:{{space.spaceName}}</span>
+      <el-select v-model="showType" @change="initTable" style="width:125px;margin-right:10px;vertical-align:bottom;">
+        <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value"></el-option>
+      </el-select>
+      <span>增加</span>
+      <el-input v-model="addNum" style="width:50px;" size="small"></el-input>
+      <span>个{{space.spaceName}}</span>
+      <el-button @click="handleAddTableRow">增加</el-button>
+    </el-row>
+    <div class="tableBox">
+      <div class="center middle_sty" style="flex:2;" v-show="tableData && !tableData.length">
+        <p>
+          <i class="icon-wushuju iconfont"></i>
+          暂无数据
+        </p>
+      </div>
+      <div class="tableLeft" v-show="tableData && tableData.length">
+        <handson-table ref="table"></handson-table>
+      </div>
+    </div>
+    <el-row class="center">
+      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button">创建业务空间</el-button>
+    </el-row>
+
+    <!--二维码弹窗 -->
+    <qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
+    <!--上传图片-->
+    <upload-img-dialog :read="false" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog" />
+    <!-- 不支持的输入方式 -->
+    <el-dialog title="临时维护信息点" :visible.sync="myDialog.update" @close="handleCloseUpdate" width="670px">
+      <el-row>
+        该信息点未定义对应组件,现在维护数据不确定后续是否可用。如确实需要维护,请点击
+        <el-link @click="updateInputShow = true" type="primary" :underline="false">继续维护</el-link>
+        。
+      </el-row>
+      <el-row style="margin-top:20px;" v-show="updateInputShow">
+        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" placeholder="请输入内容"
+                  v-model="updateInput"></el-input>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="myDialog.update = false">取 消</el-button>
+        <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import tools from "@/utils/scan/tools";
+import handsonUtils from "@/utils/hasontableUtils";
+import showTools from "@/utils/handsontable/notShow";
+import text from "@/utils/handsontable/mainText";
+import session from "@/framework/utils/storage";
+import buildFloor from '@/utils/handsontable/buildFloorData'
+
+import handsonTable from "@/components/common/handsontable";
+import { getDataDictionary, zoneCreate } from "@/api/scan/request";
+import { mapGetters, mapActions } from "vuex";
+
+import qrcode from "@/components/ledger/lib/qrcode";
+import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
+export default {
+  components: {
+    qrcode, //二维码页面
+    uploadImgDialog,
+    handsonTable
+  },
+  data() {
+    return {
+      addNum: 1,
+      onlyRead: false,
+      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }],
+      tableHeader: [],
+      tableData: session.get("spaceAddData")
+        ? session.get("spaceAddData").length
+          ? session.get("spaceAddData")
+          : [{}]
+        : [{}],
+      copyTableData: [],
+      category: {}, //路由参数
+      myDialog: {
+        qrcode: false, //二维码弹窗
+        uploadImgs: false, //上传单个图片
+        update: false,//临时维护信息点
+      },
+      inputMap: {
+        flowBuild: {
+          InputMode: 'D1',
+          Editable:true,
+          InfoPointCode:"flowBuild",
+          InfoPointName:"建筑楼层",
+          Path:"flowBuild"
+        }
+      }, //信息点和输入方式映射表
+      updateInputShow: false, //是否显示临时维护输入框
+      updateInfoPoint: '',//临时维护信息点
+      updateInput: '', //临时维护信息点值
+      qrcodeUrl: "", //二维码图片地址
+      imgsArr: [], //临时保存的图片key数组
+      showType: this.$route.query.showType,
+      buildFloorData: [],
+    };
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"])
+  },
+  created() {
+    this.space = this.$route.query;
+    buildFloor.getData(this.buildFloorData)
+    this.getTableHeader();
+  },
+  methods: {
+    // 获取表头数据(初始化表格)
+    async getTableHeader() {
+      let params = {
+        data: {
+          Orders: "sort asc, InfoPointName desc",
+          PageNumber: 1,
+          PageSize: 1000
+        },
+        type: this.space.spaceType
+      };
+      await getDataDictionary(params, res => {
+        this.tableHeader = res.Content;
+        this.tableHeader.forEach(item => {
+          if (item.Path && item.InputMode) {
+            this.inputMap[item.Path] = item
+          }
+        })
+        this.initTable();
+      });
+    },
+    // 创建业务空间数据
+    async handleCreateTableData() {
+      let newData = this.tableData.filter(item => {
+        let keys = Object.keys(item);
+        keys.map(key => {
+          //将值为空字符串的属性删除
+          if (item[key] == "") {
+            delete item[key];
+          }
+        });
+        let newK = Object.keys(item)
+        if (newK.length) {
+          return item;
+        }
+      });
+      if (!newData.length) {
+        this.$message("创建信息为空,请录入信息后再创建!");
+        return;
+      }
+      let flag = false;
+      newData.map(item => {
+        if (!item.RoomLocalName) {
+          flag = true;
+        }
+        // 处理建筑-楼层
+        if (item.flowBuild) {
+          let bid = item.flowBuild.split("-");
+          item.BuildingId = item.flowBuild.split("-")[0]
+          if (bid[1]) {
+            item.FloorId = item.flowBuild.split("-")[1]
+          }
+        }
+        item.ObjectType = this.space.spaceType;
+      })
+      if (flag) {
+        this.$message.info("存在业务空间的本地名称为空,请检查")
+        return;
+      }
+      //待接口修改为关联创建即可修改
+      let param = {
+        Content: newData
+      }
+      zoneCreate(param, res => {
+        this.$message.success('创建成功')
+        session.remove("spaceAddData")
+        this.$router.push({
+          name: "spacelist",
+          params: {
+            zone: this.space.spaceType,
+            buildFloorSelectd: ['all'],
+            isMyTab: '2'
+          }
+        });
+      })
+    },
+    // 删除表格行
+    handleDeleteTableRow() {
+      this.$message.success("删除成功");
+      this.formaTableData();
+    },
+    // 添加行
+    handleAddTableRow() {
+      let addRowLength = this.addNum;
+      for (let i = 0; i < addRowLength; i++) {
+        this.tableData.push({ Checked: 1 });
+      }
+      this.initTable();
+      this.formaTableData();
+    },
+    //修改
+    handleUpdataTable(changeData, source) {
+      if (!this.onlyRead && source != 'ObserveChanges.change') {
+        this.formaTableData();
+      }
+    },
+    //保存去掉空字段的新增数据
+    formaTableData() {
+      let newData = this.tableData.filter(item => {
+        let keys = Object.keys(item);
+        keys.map(key => {
+          //将值为空字符串的属性删除
+          if (item[key] == "") {
+            delete item[key];
+          }
+        });
+        if (keys.length && Object.keys(item).length) {
+          return item;
+        }
+      });
+      session.set("spaceAddData", newData);
+    },
+    //格式化表头显示的数据
+    formatHeaderData(list) {
+      let arr = tools.copyArr(list);
+      let data = showTools.headerTextFilter(arr, 'space', this.onlyRead, this.showType, true);
+      data.unshift("所属建筑楼层");
+      return data;
+    },
+    formatHeaderType(list) {
+      //格式化表头头映射的数据
+      let arr = tools.copyArr(list);
+      let data = showTools.headerTypeFilter(arr, 'space', this.onlyRead, this.showType, true);
+      data.unshift({
+        data: "flowBuild",
+        renderer: tools.customDropdownRenderer,
+        editor: "chosen",
+        chosenOptions: {
+          data: this.buildFloorData
+        }
+      });
+      return data;
+    },
+    initTable() {
+      //实例化表格
+      let settings = {
+        data: this.tableData,
+        colHeaders: this.formatHeaderData(this.tableHeader),
+        columns: this.formatHeaderType(this.tableHeader),
+        rowHeights: 30,
+        maxRows: this.tableData.length,
+        contextMenu: this.onlyRead ? false :{
+          items: {
+            remove_row: {
+              name: "删除业务空间"
+            }
+          }
+        },
+        // 事件
+        afterChange: this.handleUpdataTable, //修改后
+        afterFilter: this.trimmedRows, //排序前
+        afterRemoveRow: this.handleDeleteTableRow, //右键删除
+        afterOnCellMouseDown: this.handleTdClick //鼠标点击
+      };
+      this.$nextTick(() => {
+        this.tableExample = this.$refs.table.init(settings);
+      });
+    },
+    //去除数组中相同的元素
+    array_diff(a, b) {
+      for (var i = 0; i < b.length; i++) {
+        for (var j = 0; j < a.length; j++) {
+          if (a[j] == b[i]) {
+            a.splice(j, 1);
+            j = j - 1;
+          }
+        }
+      }
+      return a;
+    },
+    //表格点击事件
+    handleTdClick(el, rowArr) {
+      //点击的是表头
+      if (rowArr.row < 0) {
+        return;
+      }
+      //被筛选过后的数组
+      let trimmedArr = this.trimmedRows();
+      //是否启用了排序
+      let isSort = this.tableExample.getPlugin("columnSorting").isSorted();
+      if (trimmedArr.length && isSort) {
+        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
+          .__arrayMap;
+        let infos = this.tableData[trimmedArr[sortArr[rowArr.row]]];
+        this.getInfors(infos, { row: sortArr[rowArr.row], col: rowArr.col });
+      } else if (isSort) {
+        //排序后的数组
+        let sortArr = this.tableExample.getPlugin("columnSorting").rowsMapper
+          .__arrayMap;
+        let infos = this.tableData[sortArr[rowArr.row]];
+        this.getInfors(infos, { row: sortArr[rowArr.row], col: rowArr.col });
+      } else if (trimmedArr.length) {
+        let infos = this.tableData[trimmedArr[rowArr.row]];
+        this.getInfors(infos, { row: trimmedArr[rowArr.row], col: rowArr.col });
+      } else {
+        let infos = this.tableData[rowArr.row];
+        this.getInfors(infos, rowArr);
+      }
+    },
+    //获取被筛选掉的行号
+    trimmedRows() {
+      var plugin = this.tableExample.getPlugin("trimRows").trimmedRows;
+      let dataLength = this.tableData.length;
+      let dataArr = new Array();
+      for (let i = 0; i < dataLength; i++) {
+        dataArr.push(i);
+      }
+      if (plugin.length <= 0) {
+        dataArr = undefined;
+      } else {
+        dataArr = this.array_diff(dataArr, plugin);
+      }
+      return dataArr || [];
+    },
+    getInfors(infos, row) {
+      let val = this.tableExample.colToProp(row.col);
+      this.row = row.row;
+      this.messKey = val;
+      let inputData = this.inputMap[val];
+      switch (val) {
+        //空间二维码图片
+        case 'RoomQRCode':
+          this.qrcodeUrl = this.tableData[row.row].RoomQRCode;
+          if (!!this.qrcodeUrl) {
+            this.myDialog.qrcode = true;
+          } else {
+            this.$message("此空间没有二维码");
+          }
+          break;
+        case 'Pic':
+          let Pdata = tools.dataForKey(this.tableData[row.row], val);
+          this.imgsArr = Pdata ? Pdata : [];
+          this.myDialog.uploadImgs = true;
+          break;
+        default:
+          break;
+      }
+      if (!this.onlyRead && !inputData.Editable) {
+        this.$message("该信息点的值为自动生成,不可人工维护!");
+        return false;
+      }
+      if (!this.onlyRead && showTools.InputModeArr.indexOf(inputData.InputMode) == '-1') {
+        this.updateInfoPoint = val;
+        this.updateInput = tools.dataForKey(this.tableData[row.row], val);
+        this.myDialog.update = true;
+        return false;
+      }
+    },
+    //关闭临时维护弹窗回调
+    handleCloseUpdate() {
+      this.updateInputShow = false
+      this.updateInfoPoint = ''
+      this.updateInput = ''
+    },
+    //更新临时维护信息点
+    handleClickUpdate() {
+      tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+      this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+      this.updateInputShow = false
+      this.myDialog.update = false
+      this.updateInput = ''
+    },
+    utilToKey(key, name, data, messName) {
+      if (key == name) {
+        this.setDataToMain(data[key], messName, this.row);
+      }
+    },
+    //上传图片弹窗触发事件
+    imgChange(keys) {
+      this.setDataToMain(keys, 'Pic', this.row);
+    },
+    //判断是否有值,有值赋值
+    setDataToMain(data, key, row) {
+      if (!!data && data != "--") {
+        if (!!this.tableData[row]) {
+          //铭牌照片特殊处理
+          tools.setDataForKey(this.tableData[row], key, data)
+          // this.tableData[row][key] = data;
+        } else {
+          this.tableData[row] = {};
+          tools.setDataForKey(this.tableData[row], key, data)
+        }
+      } else {
+        tools.setDataForKey(this.tableData[row], key, "")
+      }
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#deviceList {
+  overflow: hidden;
+  height: 100%;
+  background-color: #fff;
+  padding: 10px;
+  position: relative;
+  .right {
+    background: #fff;
+  }
+  .search-header {
+    overflow: hidden;
+    padding: 0 10px 10px 10px;
+    border-bottom: 1px solid #bcbcbc;
+  }
+  .tableBox {
+    display: flex;
+    height: calc(100% - 100px);
+    margin-top: 10px;
+    .tableLeft {
+      flex: 1;
+    }
+  }
+  .create_button {
+    margin-top: 10px;
+  }
+}
+</style>

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

@@ -95,7 +95,7 @@ export default {
       systemId: null,
       graphyId: null,
       id: 0,
-      showType: 'Visible',
+      showType: this.$route.query.showType,
       EquipmentList: [],
     };
   },
@@ -131,7 +131,7 @@ export default {
     getBuildData() {
       let param = {
         PageNumber: 1,
-        PageSize: 500,
+        PageSize: 1000,
         Projection: [
           "BuildID",
           "BuildLocalName"
@@ -152,9 +152,9 @@ export default {
     async getTableHeader() {
       let params = {
         data: {
-          Orders: "sort asc",
+          Orders: "sort asc, InfoPointName desc",
           PageNumber: 1,
-          PageSize: 500
+          PageSize: 1000
         },
         type: this.category.Category
       };