Browse Source

no message

aXin-0810 9 months ago
parent
commit
9381dedad0
1 changed files with 48 additions and 22 deletions
  1. 48 22
      src/components/template/template-page-1.vue

+ 48 - 22
src/components/template/template-page-1.vue

@@ -1,14 +1,34 @@
 <template>
   <div class="template-page-1">
-    <zj-page-template ref="zjpage" tableMinHeight="300px" :getTableData="getTableData" :columnParsing="columnParsing"
-      :reduction="reduction" :showTable="showTable" :codeGather="codeGather" :loading="loading" :lowerLine="true"
-      :onSavePlan="onSavePlan" :onClosePlain="onClosePlain" :defaultSearchData="defaultSearchData"
-      :replaceOrNotMap="replaceOrNotMap" :optionsEvensGroup="selBtn([...optionsEvensGroup, evens])" :operation="operation"
-      :operationColumnWidth="operationColumnWidth" :plan="[...defaultPlan, ...timePlan, ...paramList, ...morePlan]"
+    <zj-page-template
+      ref="zjpage"
+      tableMinHeight="300px"
+      :getTableData="getTableData"
+      :columnParsing="columnParsing"
+      :reduction="reduction"
+      :showTable="showTable"
+      :codeGather="codeGather"
+      :loading="loading"
+      :lowerLine="true"
+      :onSavePlan="onSavePlan"
+      :onClosePlain="onClosePlain"
+      :defaultSearchData="defaultSearchData"
+      :replaceOrNotMap="replaceOrNotMap"
+      :optionsEvensGroup="selBtn([...optionsEvensGroup, evens])"
+      :operation="operation"
+      :operationColumnWidth="operationColumnWidth"
+      :plan="[...defaultPlan, ...timePlan, ...paramList, ...morePlan]"
       :tableEvents="{ ...defaultTableEvents, ...tableEvents }"
-      :tableAttributes="{ ...defaultTableAttributes, ...tableAttributes }" :ellipsis="ellipsis" :pageSizes="pageSizes"
-      @columnWidthChange="columnWidthChange" @columnListChange="columnListChange" :screeningAnalysis="screeningAnalysis"
-      :filterMethod="filterMethod" :sortMethod="sortMethod" :moreParameters="moreParameters">
+      :tableAttributes="{ ...defaultTableAttributes, ...tableAttributes }"
+      :ellipsis="ellipsis"
+      :pageSizes="pageSizes"
+      @columnWidthChange="columnWidthChange"
+      @columnListChange="columnListChange"
+      :screeningAnalysis="screeningAnalysis"
+      :filterMethod="filterMethod"
+      :sortMethod="sortMethod"
+      :moreParameters="moreParameters"
+    >
       <template slot="more-search">
         <slot name="moreSearch"></slot>
       </template>
@@ -139,7 +159,7 @@ export default {
     },
     pageSizes: {
       type: Array,
-      default: () => [15, 30, 50, 100, 150, 200],
+      default: () => [15, 30, 50, 100, 150, 200]
     },
     expCode: {
       type: String,
@@ -148,7 +168,7 @@ export default {
     // 数据钩子
     recordsHook: {
       type: Function
-    },
+    }
   },
   data() {
     return {
@@ -193,11 +213,13 @@ export default {
     },
     evens() {
       return this.exportList
-        ? [[
-          this.optionsEvensAuth(this.expCode, {
-            click: this.export
-          })
-        ]]
+        ? [
+            [
+              this.optionsEvensAuth(this.expCode, {
+                click: this.export
+              })
+            ]
+          ]
         : []
     }
   },
@@ -336,7 +358,7 @@ export default {
               this.getZfireParamList()
             })
           })
-          .catch(() => { })
+          .catch(() => {})
       }
     },
     // 过滤按钮集合
@@ -399,7 +421,12 @@ export default {
         // alert('接收到数据断点')
         if (res.code == 200) {
           if (this.recordsHook) {
-            res.data.records = this.recordsHook([...(res?.data?.records || [])]) || res?.data?.records || []
+            res.data.records =
+              this.recordsHook([...(res?.data?.records.map(item => ({ ...item, selectMapData: {} })) || [])]) ||
+              res?.data?.records.map(item => ({ ...item, selectMapData: {} })) ||
+              []
+          } else {
+            res.data.records = res?.data?.records.map(item => ({ ...item, selectMapData: {} })) || []
           }
           if (this.fieldBeansHook) {
             res.fieldBeans = this.fieldBeansHook(res.fieldBeans) || res.fieldBeans
@@ -451,7 +478,7 @@ export default {
         }),
         this.moduleId
       )
-        .then(res => { })
+        .then(res => {})
         .catch(err => {
           this.$message.error('保存失败')
         })
@@ -475,7 +502,7 @@ export default {
         }),
         this.moduleId
       )
-        .then(res => { })
+        .then(res => {})
         .catch(err => {
           this.$message.error('保存失败')
         })
@@ -538,7 +565,7 @@ export default {
         })
       }
       var newPms = {}
-      var res = await this.getList(pms, (data) => {
+      var res = await this.getList(pms, data => {
         newPms = data
       })
       // alert('接收到数据断点')
@@ -649,7 +676,7 @@ export default {
   flex-direction: row;
   align-items: center;
 
-  &>*:not(:last-child) {
+  & > *:not(:last-child) {
     margin-right: 5px;
   }
 
@@ -659,7 +686,6 @@ export default {
 }
 
 ::v-deep .is-disabled {
-
   .el-textarea__inner,
   .el-input__inner,
   .el-radio__label,