From d33acff5eaafe9ab6dc78a01f0b00d43c73833a5 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 16 五月 2024 17:41:39 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master

---
 src/components/tool/value-table.vue |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index 4b530fc..0387ae4 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -95,6 +95,12 @@
     align-items: center;
     justify-content: center;
   }
+  .el-table__empty-text{
+    text-align: left;
+    width: 100%;
+    display: inline-block;
+    margin-left: 200px;
+  }
 </style>
 
 <template>
@@ -105,7 +111,7 @@
         @row-click="rowClick" :show-summary="data.countFleid!=undefined && data.countFleid.length > 0"
         :summary-method="getSummaries" :row-class-name="tableRowClassName" :row-key="record=>record.id"
         :current-row-key="data.currentId" :highlight-current-row="data.highlight===undefined||data.highlight"
-        :span-method="spanMethod">
+        :span-method="spanMethod" :key="specialKey">
         <el-table-column type="selection" width="65" v-if="data.showSelect" :key="Math.random()">
         </el-table-column>
         <el-table-column type="index" align="center" label="搴忓彿" width="65" v-if="data.isIndex" :key="Math.random()">
@@ -156,7 +162,7 @@
         :total="total">
       </el-pagination>
     </div>
-    <el-dialog title="缂栬緫" :visible.sync="upDia" :width="data.row==1?'500px':500+data.row * 200 + 'px'" append-to-body>
+    <el-dialog title="缂栬緫" :visible.sync="upDia" :width="data.row==1?'500px':540+data.row * 200 + 'px'" append-to-body>
       <div class="body" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;">
         <div v-if="data.row > 1">
           <div v-for="(a, ai) in upHead" :key="ai" style="line-height: 50px;">
@@ -225,14 +231,14 @@
         <el-button type="primary" @click="saveUpData" :loading="upLoad">纭� 瀹�</el-button>
       </span>
     </el-dialog>
-    <el-dialog title="鏂板" :visible.sync="addDia" :width="data.row==1?'500px':500+data.row * 200 + 'px'" append-to-body>
+    <el-dialog title="鏂板" :visible.sync="addDia" :width="data.row==1?'500px':540+data.row * 200 + 'px'" append-to-body>
       <div class="body" v-if="addDia" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;">
         <div v-if="data.row > 1">
           <div v-for="(a, ai) in upHead" :key="ai" style="line-height: 50px;">
-            <el-col :span="6/data.row" style="text-align: right;"><span class="required-span"
+            <el-col :span="6/data.row" style="text-align: right;" :offset="1"><span class="required-span"
                 v-if="showAddReq(a.label)">*
               </span>{{a.value}}锛�</el-col>
-            <el-col :span="16/data.row" :offset="1">
+            <el-col :span="16/data.row">
               <el-input v-model="upData[a.label]" size="small" clearable :placeholder="`璇疯緭鍏�${a.value}`"
                 v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)"></el-input>
               <el-select v-model="upData[a.label]" size="small" v-if="showType(a.label, data.selectField) != null"
@@ -448,7 +454,8 @@
           //   position:0
           // }
         ],
-        param: {}
+        param: {},
+        specialKey:'table-'
       }
     },
     beforeUpdate() {
@@ -465,6 +472,7 @@
       this.token = {
         'token': sessionStorage.getItem('token')
       }
+      this.specialKey = this.specialKey+Math.random()*100;
     },
     methods: {
       rowspan(spanArr, position, spanName) {
@@ -556,14 +564,17 @@
       },
       sizeChange(val) {
         this.page.size = val
-        this.selectList()
+        this.selectList('page')
       },
       currentChange(val) {
         this.page.current = val
-        this.selectList()
+        this.selectList('page')
       },
-      selectList() {
+      selectList(val) {
         this.loading = true
+        if(val===undefined){
+          this.page.current = 1;
+        }
         if (this.data.isPage != undefined && this.data.isPage != true) {
           this.page = {
             current: -1,
@@ -585,6 +596,7 @@
           this.total = res.data.body.total
           this.tableHead = res.data.head
           this.tableData = res.data.body.records
+          // console.log(JSON.stringify(this.tableHead)+"---------"+JSON.stringify(this.tableData))
           for (var a in this.data.selectField) {
             if (this.data.selectField[a].choose == true) {
               this.tableData.map(b => {

--
Gitblit v1.9.3