Browse Source

Merge branch 'master' of http://39.106.8.246:3003/BDTP/adm-frontend

qule 2 years ago
parent
commit
536ce19e79

+ 1 - 1
src/components/old-adm/businessSpaceLedger/spaceadd/index.vue

@@ -134,7 +134,7 @@ export default {
       addNum: 1,
       onlyRead: false,
       showTypes: [
-        { value: "Visible", label: "只看采集信息" },
+        { value: "Visible", label: "只看需交付的" },
         { value: "all", label: "全部" },
       ],
       tableHeader: [],

+ 2 - 2
src/components/old-adm/business_space/business/handsontable.vue

@@ -215,11 +215,11 @@ export default {
     showTypes() {
       return this.onlyRead
         ? [
-            { value: "Visible", label: "只看采集信息" },
+            { value: "Visible", label: "只看需交付的" },
             { value: "all", label: "全部" },
           ]
         : [
-            { value: "Visible", label: "只看采集信息" },
+            { value: "Visible", label: "只看需交付的" },
             { value: "all", label: "全部" },
           ];
     },

File diff suppressed because it is too large
+ 686 - 448
src/components/old-adm/ledger/components/handsontables/assets.vue


+ 3 - 3
src/components/old-adm/ledger/components/handsontables/device.vue

@@ -31,7 +31,7 @@
       <el-select
         v-model="showType"
         @change="handleChangeShowType"
-        style="width: 100px; margin-right: 8px; vertical-align: bottom"
+        style="width: 140px; margin-right: 8px; vertical-align: bottom"
       >
         <el-option
           v-for="item in showTypes"
@@ -317,11 +317,11 @@ export default {
     showTypes() {
       return this.onlyRead
         ? [
-            { value: "Visible", label: "只看采集信息" },
+            { value: "Visible", label: "只看需交付的" },
             { value: "all", label: "全部" },
           ]
         : [
-            { value: "Visible", label: "只看采集信息" },
+            { value: "Visible", label: "只看需交付的" },
             { value: "all", label: "全部" },
           ];
     },

File diff suppressed because it is too large
+ 982 - 802
src/components/old-adm/ledger/components/handsontables/system.vue


+ 1 - 1
src/components/old-adm/ledger/facility/addfacility.vue

@@ -132,7 +132,7 @@ export default {
       addNum: 1,
       onlyRead: false,
       showTypes: [
-        { value: "Visible", label: "只看采集信息" },
+        { value: "Visible", label: "只看需交付的" },
         { value: "all", label: "全部" },
       ],
       tableHeader: [],

File diff suppressed because it is too large
+ 523 - 462
src/components/old-adm/ledger/facility/parts/index.vue


File diff suppressed because it is too large
+ 648 - 541
src/components/old-adm/ledger/facility/partsmanage/addparts/index.vue


File diff suppressed because it is too large
+ 828 - 702
src/components/old-adm/ledger/facility/partsmanage/index.vue


+ 154 - 102
src/components/old-adm/ledger/system/addsystem.vue

@@ -2,21 +2,43 @@
   <div id="deviceList">
     <el-row class="right">
       <el-col span="4">
-        <span style="float:left;">当前选择的系统类型:{{ category.categoryName }}</span>
+        <span style="float: left"
+          >当前选择的系统类型:{{ category.categoryName }}</span
+        >
       </el-col>
-      
+
       <el-col span="20" style="text-align: right">
-        <el-select :disabled='showType === "all"' 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
+          :disabled="showType === 'all'"
+          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-number v-model="addNum" :controls="false" style="width:50px;" :min="1" :max="50"></el-input-number>
+        <el-input-number
+          v-model="addNum"
+          :controls="false"
+          style="width: 50px"
+          :min="1"
+          :max="50"
+        ></el-input-number>
         <span>个{{ category.categoryName }}</span>
         <el-button @click="handleAddTableRow">增加</el-button>
       </el-col>
     </el-row>
     <div class="tableBox">
-      <div class="center middle_sty" style="flex:2;" v-show="tableData && !tableData.length">
+      <div
+        class="center middle_sty"
+        style="flex: 2"
+        v-show="tableData && !tableData.length"
+      >
         <p>
           <i class="icon-wushuju iconfont"></i>
           暂无数据
@@ -27,14 +49,36 @@
       </div>
     </div>
     <el-row class="center">
-      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button" :disabled="createDisable">创建系统</el-button>
+      <el-button
+        type="primary"
+        size="medium"
+        @click="handleCreateTableData"
+        class="create_button"
+        :disabled="createDisable"
+        >创建系统</el-button
+      >
     </el-row>
-		<!-- 上传图片组件 -->
-		<upload-img-dialog :read="onlyRead ? true : false" @changeFile="imgChange" :keysArr="imgsArr" firmDataType="row" :dialog="myDialog"></upload-img-dialog>
+    <!-- 上传图片组件 -->
+    <upload-img-dialog
+      :read="onlyRead ? true : false"
+      @changeFile="imgChange"
+      :keysArr="imgsArr"
+      firmDataType="row"
+      :dialog="myDialog"
+    ></upload-img-dialog>
     <!-- 关联楼层 -->
-    <editSysfloor ref="editFloor" @relateSuccess="relateSuccess" :isCreate="true"></editSysfloor>
+    <editSysfloor
+      ref="editFloor"
+      @relateSuccess="relateSuccess"
+      :isCreate="true"
+    ></editSysfloor>
     <!-- 多选枚举类型维护 -->
-   <menum :dialog="myDialog" :updateInfoData="updateInfoData" :updateInput="updateInput" @change="handleChangeMenum"></menum>
+    <menum
+      :dialog="myDialog"
+      :updateInfoData="updateInfoData"
+      :updateInput="updateInput"
+      @change="handleChangeMenum"
+    ></menum>
   </div>
 </template>
 <script>
@@ -44,31 +88,31 @@ import text from "@/utils/old-adm/handsontable/mainText";
 import session from "@/utils/storageUtil";
 
 import editSysfloor from "@/components/old-adm/ledger/components/lib/editSysFloor";
-import uploadImgDialog from "@/components/old-adm/dialogs/list/uploadImgDialog"
+import uploadImgDialog from "@/components/old-adm/dialogs/list/uploadImgDialog";
 import handsonTable from "@/components/old-adm/common/handsontable";
 import Dict from "@/controller/old-adm/dicController";
 
-import Scan from '@/controller/old-adm/ScanController'
+import Scan from "@/controller/old-adm/ScanController";
 import { mapGetters, mapActions } from "vuex";
-import BuildController from "@/controller/old-adm/buildController"
+import BuildController from "@/controller/old-adm/buildController";
 import menum from "@/components/old-adm/dialogs/list/menum";
 
-const { getDataDictionary } = Dict
-const { createSystemBuildFloor }  = Scan
+const { getDataDictionary } = Dict;
+const { createSystemBuildFloor } = Scan;
 export default {
   components: {
     handsonTable,
     menum,
     editSysfloor,
-		uploadImgDialog
+    uploadImgDialog,
   },
   data() {
     return {
       addNum: 1,
       onlyRead: false,
       showTypes: [
-        { value: "Visible", label: '只看采集信息' },
-        { value: "all", label: '全部' }
+        { value: "Visible", label: "只看需交付的" },
+        { value: "all", label: "全部" },
       ],
       tableHeader: [],
       tableData: session.get("systemAddData")
@@ -96,9 +140,9 @@ export default {
           code: "flowBuild",
           name: "建筑楼层",
           path: "flowBuild",
-          category: 'STATIC',
-          dataType: "ENUM"
-        }
+          category: "STATIC",
+          dataType: "ENUM",
+        },
       }, //信息点和输入方式映射表
       qrcodeUrl: "", //二维码图片地址
       filesArr: [], //保存临时的文件key
@@ -116,7 +160,7 @@ export default {
     };
   },
   computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"])
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
   },
   created() {
     this.category = this.$route.query;
@@ -130,21 +174,17 @@ export default {
       let param = {
         pageNumber: 1,
         pageSize: 1000,
-        projection: [
-          "id",
-          "localName"
-        ]
-      }
+        projection: ["id", "localName"],
+      };
       const res = BuildController.buildingQuery(param);
-        let data = res.content.map(t => {
-          return {
-            Code: t.id,
-            Name: t.localName,
-          }
-        })
-        data.unshift({ Code: '', Name: '未明确建筑' })
-        this.buildingData = data;
-      
+      let data = res.content.map((t) => {
+        return {
+          Code: t.id,
+          Name: t.localName,
+        };
+      });
+      data.unshift({ Code: "", Name: "未明确建筑" });
+      this.buildingData = data;
     },
     // 获取表头数据(初始化表格)
     async getTableHeader() {
@@ -152,30 +192,30 @@ export default {
         orders: "sort asc, name desc",
         pageNumber: 1,
         pageSize: 1000,
-        type: this.category.category
+        type: this.category.category,
       };
-      await getDataDictionary(params, res => {
+      await getDataDictionary(params, (res) => {
         this.tableHeader = res.content;
-        this.tableHeader.forEach(item => {
-            if (item.path) {
-              this.inputMap[item.path] = item;
-            }
-        })
+        this.tableHeader.forEach((item) => {
+          if (item.path) {
+            this.inputMap[item.path] = item;
+          }
+        });
         this.initTable();
       });
     },
     // 创建设备数据
     async handleCreateTableData() {
-      let params = {}
-      let newData = this.tableData.filter(item => {
+      let params = {};
+      let newData = this.tableData.filter((item) => {
         let keys = Object.keys(item);
-        keys.map(key => {
+        keys.map((key) => {
           //将值为空字符串的属性删除
           if (item[key] == "") {
             delete item[key];
           }
         });
-        let newK = Object.keys(item)
+        let newK = Object.keys(item);
         if (newK.length) {
           return item;
         }
@@ -185,34 +225,34 @@ export default {
         return;
       }
       let flag = false;
-      newData.map(item => {
+      newData.map((item) => {
         if (!item.localName) {
           flag = true;
         }
-        item.classCode = this.category.category
-      })
+        item.classCode = this.category.category;
+      });
       if (flag) {
-        this.$message.info("存在系统的本地名称为空,请检查")
+        this.$message.info("存在系统的本地名称为空,请检查");
         return;
       }
-      params.content = newData
+      params.content = newData;
       this.createDisable = true;
-      createSystemBuildFloor(params, res => {
+      createSystemBuildFloor(params, (res) => {
         this.createDisable = false;
-        this.$message.success('创建成功')
-        session.remove("systemAddData")
+        this.$message.success("创建成功");
+        session.remove("systemAddData");
         this.$router.push({
           name: "systemlist",
-          params: { SysType: this.category.category }
+          params: { SysType: this.category.category },
         });
-      })
+      });
     },
     // 删除表格行
-    handleDeleteTableRow(a,b,c,d) {
-      if (d && d === 'ContextMenu.removeRow') {
-				this.$message.success("删除成功");
-    		this.formaTableData();
-			}
+    handleDeleteTableRow(a, b, c, d) {
+      if (d && d === "ContextMenu.removeRow") {
+        this.$message.success("删除成功");
+        this.formaTableData();
+      }
     },
     // 添加行
     handleAddTableRow() {
@@ -229,9 +269,9 @@ export default {
     },
     //保存去掉空字段的新增数据
     formaTableData() {
-      let newData = this.tableData.filter(item => {
+      let newData = this.tableData.filter((item) => {
         let keys = Object.keys(item);
-        keys.map(key => {
+        keys.map((key) => {
           //将值为空字符串的属性删除
           if (item[key] == "") {
             delete item[key];
@@ -246,17 +286,27 @@ export default {
     //格式化表头显示的数据
     formatHeaderData(list) {
       let arr = tools.copyArr(list);
-      let data = showTools.headerTextFilter(arr, 'system', this.onlyRead, this.showType);
+      let data = showTools.headerTextFilter(
+        arr,
+        "system",
+        this.onlyRead,
+        this.showType
+      );
       data.unshift("所属建筑楼层");
       return data;
     },
     formatHeaderType(list) {
       //格式化表头头映射的数据
       let arr = tools.copyArr(list);
-      let data = showTools.headerTypeFilter(arr, 'system', this.onlyRead, this.showType);
+      let data = showTools.headerTypeFilter(
+        arr,
+        "system",
+        this.onlyRead,
+        this.showType
+      );
       data.unshift({
         data: "buildingFloorInfoList",
-        renderer: text.sysInBuildFloor
+        renderer: text.sysInBuildFloor,
       });
       return data;
     },
@@ -267,15 +317,17 @@ export default {
         colHeaders: this.formatHeaderData(this.tableHeader),
         columns: this.formatHeaderType(this.tableHeader),
         rowHeights: 30,
-        fillHandle: 'vertical', //允许纵向填充
+        fillHandle: "vertical", //允许纵向填充
         maxRows: this.tableData.length,
-        contextMenu: this.onlyRead ? false : {
-          items: {
-            remove_row: {
-              name: "删除该系统"
-            }
-          }
-        },
+        contextMenu: this.onlyRead
+          ? false
+          : {
+              items: {
+                remove_row: {
+                  name: "删除该系统",
+                },
+              },
+            },
         autoColumnSize: true,
         language: "zh-CN",
         manualColumnResize: true,
@@ -284,7 +336,7 @@ export default {
         afterChange: this.handleUpdataTable, //修改后
         afterFilter: this.trimmedRows, //排序前
         afterRemoveRow: this.handleDeleteTableRow, //右键删除
-        afterOnCellMouseDown: this.handleTdClick //鼠标点击
+        afterOnCellMouseDown: this.handleTdClick, //鼠标点击
       };
       this.$nextTick(() => {
         this.tableExample = this.$refs.table.init(settings);
@@ -313,14 +365,14 @@ export default {
       //是否启用了排序
       let isSort = this.tableExample.getPlugin("columnSorting").isSorted();
       if (trimmedArr.length && isSort) {
-        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
-          .__arrayMap;
+        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 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) {
@@ -353,9 +405,9 @@ export default {
       this.messKey = val;
       switch (val) {
         //操作
-        case 'caozuo':
+        case "caozuo":
           // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
-          this.$message("开发中...")
+          this.$message("开发中...");
           break;
         //设备二维码图片
         // case 'EquipQRCode':
@@ -368,18 +420,18 @@ export default {
         //   }
         //   break;
         //关联设备数量
-        case 'count':
+        case "count":
           if (!this.onlyRead) {
-            this.myDialog.relevance = true
+            this.myDialog.relevance = true;
           }
           break;
         //所属建筑楼层
-        case 'buildingFloorInfoList':
+        case "buildingFloorInfoList":
           if (!this.onlyRead) {
             this.$refs.editFloor.showDialog(this.tableData[row.row]);
           }
           break;
-				//系统图(F2)
+        //系统图(F2)
         case "infos.systemChart":
           let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
           this.imgsArr = SSPPdata ? SSPPdata : [];
@@ -397,19 +449,19 @@ export default {
         return false;
       }
       if (!this.onlyRead && !inputData.editable) {
-        this.$confirm('该信息点的值为自动生成,不可人工维护!', '提示', {
-            confirmButtonText: '我知道了',
-            showCancelButton: false,
-            type: 'warning',
-            center: true
+        this.$confirm("该信息点的值为自动生成,不可人工维护!", "提示", {
+          confirmButtonText: "我知道了",
+          showCancelButton: false,
+          type: "warning",
+          center: true,
         }).then(() => {
-            return false;
+          return false;
         });
       }
     },
     //多选枚举类型值修改
     handleChangeMenum(newValue) {
-        tools.setDataForKey(
+      tools.setDataForKey(
         this.tableData[this.row],
         this.updateInfoPoint,
         newValue
@@ -421,18 +473,18 @@ export default {
       this.myDialog.menum = false;
       this.updateInput = "";
     },
-	//上传图片弹窗触发事件
+    //上传图片弹窗触发事件
     imgChange(keys) {
-		this.setDataToMain(keys, this.messKey, this.row);
+      this.setDataToMain(keys, this.messKey, this.row);
     },
     //建筑楼层
     relateSuccess(data) {
-      this.tableData[this.row].buildingFloorInfoList = data
-      this.tableExample.render()
+      this.tableData[this.row].buildingFloorInfoList = data;
+      this.tableExample.render();
     },
-		//判断是否有值,有值赋值
+    //判断是否有值,有值赋值
     setDataToMain(data, key, row) {
-		if (!!data && data != "--") {
+      if (!!data && data != "--") {
         if (!!this.tableData[row]) {
           tools.setDataForKey(this.tableData[row], key, data);
           this.handleUpdataTable([[row, key, null, data]], "edit");
@@ -443,8 +495,8 @@ export default {
       } else {
         tools.setDataForKey(this.tableData[row], key, "");
       }
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="less" scoped>