From 537db52bc0006cc015436c7636f455365b52ab7d Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 02 八月 2023 15:27:26 +0800
Subject: [PATCH] 主数据回收状态提示

---
 Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue |   33 +++++++++++++++++++--------------
 1 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
index 1bec8e9..dadf546 100644
--- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -31,7 +31,7 @@
                                :label="item.label"
                                :prop="item.prop" :show-overflow-tooltip="true"
                                :sortable="item.sortable"
-                               :width="item.label.length >= 4 ? '150' : item.label.length == 3 ? '120' : '90'"
+                               :width="item.width"
                                align="center">
               </el-table-column>
             </el-table>
@@ -54,13 +54,13 @@
                               :type="edit"
                               :visible.sync="DataVisible"></FormTemplateDialog>
           <!--          鍙戝竷-->
-          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow"></set-personnel>
+          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow" @onLoad="onLoad"></set-personnel>
           <!--          鍋滅敤-->
-          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleDeactivate"></set-personnel>
+          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleDeactivate" @onLoad="onLoad"></set-personnel>
           <!--          鍚敤-->
-          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleEnable"></set-personnel>
+          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleEnable" @onLoad="onLoad"></set-personnel>
           <!--          鍥炴敹-->
-          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleRecovery"></set-personnel>
+          <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleRecovery" @onLoad="onLoad"></set-personnel>
           <!--          楂樼骇鏌ヨ-->
           <advanced-query :options="this.options" :visible.sync="findvisible"
                           @echoContion="echoContion"></advanced-query>
@@ -241,13 +241,12 @@
   created() {
   },
   mounted() {
-
   },
   activated() {
-    // this.doLayout();
-    this.$nextTick(() => {
-      this.$refs.dataTable.doLayout()
-    })
+   this.doLayout()
+  },
+  updated() {
+    this.doLayout()
   },
   watch: {
     tableHeadDataFateher: {
@@ -266,6 +265,7 @@
       handler(newval, oldval) {
         this.tableData = newval;
         this.searchResults = newval
+        this.doLayout()
       },
     },
     tableHeadFindData: {
@@ -391,7 +391,6 @@
                 this.parameter.code=this.templateOid
                 this.title = '娴佺▼瀹℃壒'
                 this.visibleFlow = true;
-                this.onLoad()
               } else {
                 this.$confirm('褰撳墠鍒嗙被娌℃湁娣诲姞娴佺▼妯℃澘锛屾槸鍚︿笉鐢ㄦ祦绋嬪鎵圭洿鎺ユ墽琛�?', '鎻愮ず', {
                   confirmButtonText: '纭畾',
@@ -579,9 +578,11 @@
                 }
               }
             });
-          } else if (this.selectRow.length >=1 && !(disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0)  && showMessage) {
+          } else if (showMessage && this.selectRow.length >1 && !(disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0)) {
             this.$message.warning('鎮ㄩ�夋嫨鐨勬暟鎹叏閮ㄤ负銆愬仠鐢ㄧ姸鎬佹垨鍙戝竷鐘舵�併�戞墠鍙互鍙戣捣娴佺▼');
             showMessage = false;
+          }else if(showMessage){
+            this.$message.warning('鎮ㄩ�夋嫨鐨勬暟鎹负銆愬仠鐢ㄧ姸鎬佹垨鍙戝竷鐘舵�併�戞墠鍙互鍙戣捣娴佺▼')
           }
         });
       }
@@ -643,10 +644,13 @@
     saveRow() {
       this.editingRow = null;
     },
+    //琛ㄦ牸閿欒闂
     doLayout() {
       this.$nextTick(() => {
-        this.$refs.crud.doLayout();
-      });
+        if (this.$refs.dataTable && this.$refs.dataTable.doLayout) {
+          this.$refs.dataTable.doLayout();
+        }
+      })
     },
     //琛ㄦ牸澶存覆鏌�
     CrudHeaderRend() {
@@ -717,6 +721,7 @@
         limit: this.page.pageSize,
       }).then((res) => {
         this.tableData = res.data.data;
+        this.doLayout()
       });
     },
     //澶氶��

--
Gitblit v1.9.3