Bladeren bron

添加台账页面增加信息点显示模式切换

zhangyu 5 jaren geleden
bovenliggende
commit
1135b1f5d3

+ 1 - 1
src/components/ledger/handsontables/assets.vue

@@ -177,7 +177,7 @@ export default {
       iframeSrc: "",
       id: 0,
       onlyRead: true,
-      showType: 'all',
+      showType: 'Visible',
       linkNameFalg: false,
       qrcodeUrl: "", //二维码图片地址
       loading: false,

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

@@ -192,7 +192,7 @@ export default {
       iframeSrc: "",
       id: 0,
       onlyRead: true,
-      showType: 'all',
+      showType: 'Visible',
       linkNameFalg: false,
       qrcodeUrl: "", //二维码图片地址
       loading: false,

+ 1 - 1
src/components/ledger/handsontables/system.vue

@@ -137,7 +137,7 @@ export default {
       iframeSrc: "",
       systemId: "",
       onlyRead: true,
-      showType: 'all',
+      showType: 'Visible',
       linkNameFalg: false,
       qrcodeUrl: "",//二维码图片地址
       loading: false,

+ 5 - 1
src/views/ledger/cenotelist/cenoteadd/index.vue

@@ -2,6 +2,9 @@
   <div id="deviceList">
     <el-row class="right">
       <!-- <span style="float:left;">当前选择的部件类型:{{page.total || '--'}}</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>个竖井</span>
@@ -44,7 +47,8 @@ export default {
       isTableRightShow: false,
       relationids: "",
       onlyRead: false,
-      showType: "all",
+      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }],
+      showType: "partInfo",
       tableHeader: [],
       tableData: session.get("cenoteAddData")? session.get("cenoteAddData").length? session.get("cenoteAddData"): [{}]: [{}],
       copyTableData: []

+ 7 - 9
src/views/ledger/facility/addfacility.vue

@@ -5,10 +5,9 @@
         <i class="el-icon-fa  el-icon-fa-compass"></i>
       </span>
       <span style="float:left;">当前选择的设备类型:{{category.name}}</span>
-      <div style="width:200px;display:inline-block;text-align:left;color:gray;">
-        <span>隐藏自动填充的信息</span>
-        <el-checkbox v-model="showTypeFlag" @change="getTableHeader"></el-checkbox>
-      </div>
+      <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>个{{category.name}}</span>
@@ -95,6 +94,7 @@ export default {
     return {
       addNum: 1,
       onlyRead: false,
+      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }],
       tableHeader: [],
       tableData: session.get("deviceAddData")
         ? session.get("deviceAddData").length
@@ -128,7 +128,7 @@ export default {
       systemId: null,
       graphyId: null,
       id: 0,
-      showTypeFlag: true,
+      showType: 'partInfo',
       EquipmentList: [],
       firmId: "", //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
       buildFloorData: [],
@@ -342,8 +342,7 @@ export default {
     //格式化表头显示的数据
     formatHeaderData(list) {
       let arr = tools.copyArr(list);
-      let showType = this.showTypeFlag ? 'partInfo' : 'all';
-      let data = showTools.headerTextFilter(arr, 'equipment', this.onlyRead, showType, true);
+      let data = showTools.headerTextFilter(arr, 'equipment', this.onlyRead, this.showType, true);
       data.unshift("同时创建资产", "所属系统实例");
       if (this.floorFlag) {
         data.splice(1, 0, "所属建筑楼层")
@@ -353,8 +352,7 @@ export default {
     formatHeaderType(list) {
       //格式化表头头映射的数据
       let arr = tools.copyArr(list);
-      let showType = this.showTypeFlag ? 'partInfo' : 'all';
-      let data = showTools.headerTypeFilter(arr, 'equipment', this.onlyRead, showType, true);
+      let data = showTools.headerTypeFilter(arr, 'equipment', this.onlyRead, this.showType, true);
       data.unshift({
         type: "checkbox",
         checkedTemplate: 1,

+ 7 - 9
src/views/ledger/property/addproperty.vue

@@ -2,10 +2,9 @@
   <div id="deviceList">
     <el-row class="right">
       <span style="float:left;">当前选择的设备族:{{category.name}}</span>
-      <div style="width:200px;display:inline-block;text-align:left;color:gray;">
-        <span>隐藏自动填充的信息</span>
-        <el-checkbox v-model="showTypeFlag" @change="getTableHeader"></el-checkbox>
-      </div>
+      <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>个{{category.name}}</span>
@@ -78,6 +77,7 @@ export default {
     return {
       addNum: 1,
       onlyRead: false,
+      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }],
       buildFloorData: [],
       tableHeader: [],
       tableData: session.get("propertyAddData")
@@ -109,7 +109,7 @@ export default {
       systemId: null,
       graphyId: null,
       id: 0,
-      showTypeFlag: true,
+      showType: 'partInfo',
       EquipmentList: []
     };
   },
@@ -226,16 +226,14 @@ export default {
     //格式化表头显示的数据
     formatHeaderData(list) {
       let arr = tools.copyArr(list)
-      let showType = this.showTypeFlag?'partInfo':'all'
-      let data = showTools.headerTextFilter(arr, 'property', this.onlyRead, showType, true)
+      let data = showTools.headerTextFilter(arr, 'property', this.onlyRead, this.showType, true)
       data.unshift("所属建筑楼层")
       return data
     },
     //格式化表头头映射的数据
     formatHeaderType(list) {
       let arr = tools.copyArr(list)
-      let showType = this.showTypeFlag?'partInfo':'all'
-      let data = showTools.headerTypeFilter(arr, 'property', this.onlyRead, showType, true)
+      let data = showTools.headerTypeFilter(arr, 'property', this.onlyRead, this.showType, true)
       data.unshift({
         data: "flowBuild",
         renderer: tools.customDropdownRenderer,

+ 5 - 1
src/views/ledger/rentlist/rentadd/index.vue

@@ -2,6 +2,9 @@
   <div id="deviceList">
     <el-row class="right">
       <!-- <span style="float:left;">当前选择的部件类型:{{page.total || '--'}}</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>个租户</span>
@@ -43,7 +46,8 @@ export default {
       isTableRightShow: false,
       relationids: "",
       onlyRead: false,
-      showType: "all",
+      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }],
+      showType: "partInfo",
       tableHeader: [],
       tableData: session.get("rentAddData")? session.get("rentAddData").length? session.get("rentAddData"): [{}]: [{}],
       copyTableData: []

+ 7 - 9
src/views/ledger/system/addsystem.vue

@@ -5,10 +5,9 @@
         <i class="el-icon-fa  el-icon-fa-compass"></i>
       </span>
       <span style="float:left;">当前选择的系统类型:{{category.CategoryName}}</span>
-      <div style="width:200px;display:inline-block;text-align:left;color:gray;">
-        <span>隐藏自动填充的信息</span>
-        <el-checkbox v-model="showTypeFlag" @change="getTableHeader"></el-checkbox>
-      </div>
+      <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>个{{category.CategoryName}}</span>
@@ -54,6 +53,7 @@ export default {
     return {
       addNum: 1,
       onlyRead: false,
+      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }],
       tableHeader: [],
       tableData: session.get("systemAddData")
         ? session.get("systemAddData").length
@@ -86,7 +86,7 @@ export default {
       systemId: null,
       graphyId: null,
       id: 0,
-      showTypeFlag: true,
+      showType: 'partInfo',
       EquipmentList: [],
     };
   },
@@ -236,16 +236,14 @@ export default {
     //格式化表头显示的数据
     formatHeaderData(list) {
       let arr = tools.copyArr(list);
-      let showType = this.showTypeFlag ? 'partInfo' : 'all';
-      let data = showTools.headerTextFilter(arr, 'system', this.onlyRead, showType);
+      let data = showTools.headerTextFilter(arr, 'system', this.onlyRead, this.showType);
       data.unshift("所属建筑");
       return data;
     },
     formatHeaderType(list) {
       //格式化表头头映射的数据
       let arr = tools.copyArr(list);
-      let showType = this.showTypeFlag ? 'partInfo' : 'all';
-      let data = showTools.headerTypeFilter(arr, 'system', this.onlyRead, showType);
+      let data = showTools.headerTypeFilter(arr, 'system', this.onlyRead, this.showType);
       data.unshift({
         data: "flowBuild",
         renderer: tools.customDropdownRenderer,