From 032ddb30a8d9d884cc176a4a506580b4a1272586 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 26 十二月 2023 17:14:07 +0800
Subject: [PATCH] 模态框ui调整

---
 src/views/product/workbench/feed-form.vue |   50 +++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/src/views/product/workbench/feed-form.vue b/src/views/product/workbench/feed-form.vue
index ccfa65d..484bf96 100644
--- a/src/views/product/workbench/feed-form.vue
+++ b/src/views/product/workbench/feed-form.vue
@@ -1,6 +1,7 @@
 <template>
   <el-dialog
-    width="40%"
+    width="60%"
+    top="5vh"
     title="鎶曟枡"
     :visible.sync="innerVisible"
     append-to-body
@@ -15,17 +16,20 @@
           :key="tableKey"
           :data="dataList"
           border
-          style="width: 100%;"
+          height="400"
+          style="width: 100%;overflow-y: scroll;"
           @cell-dblclick="dblhandleCurrentChange"
           show-summary
           :span-method="objectSpanMethod"
           :summary-method="getSummaries"
         >
+          <el-table-column header-align="center" align="center" type="index" label="搴忓彿"></el-table-column>
           <el-table-column
             prop="partNo"
             header-align="center"
             align="center"
             label="闆朵欢缂栧彿"
+            show-overflow-tooltip
           >
           </el-table-column>
           <el-table-column
@@ -33,6 +37,7 @@
             header-align="center"
             align="center"
             label="闆朵欢"
+            show-overflow-tooltip
           >
           </el-table-column>
           <el-table-column
@@ -40,6 +45,7 @@
             header-align="center"
             align="center"
             label="鎵瑰彿"
+            show-overflow-tooltip
           >
           </el-table-column>
           <!-- <el-table-column
@@ -72,7 +78,13 @@
             header-align="center"
             align="center"
             label="鍗曚綅"
+            show-overflow-tooltip
           >
+          </el-table-column>
+          <el-table-column prop="menu" label="鎿嶄綔"  header-align="center" align="center">
+            <template scope="scope">
+              <el-button type="text" icon="el-icon-circle-close" @click="cancelFeed(scope.$index,scope.row)">鍙栨秷</el-button>
+            </template>
           </el-table-column>
         </el-table>
       </div>
@@ -142,6 +154,12 @@
       password: null
     }
   },
+  beforeUpdate(){
+    this.$nextTick(()=>{
+      this.objectSpanMethod()
+      this.$refs.table.doLayout()
+    })
+  },
   directives: {
     focus: {
       inserted: function(el, option) {
@@ -162,6 +180,10 @@
     }
   },
   methods: {
+    //鎶曞叆鍙栨秷鎸夐挳
+    cancelFeed(index,row){
+      this.dataList.splice(index,1)
+    },
     confirmData() {
       if (this.password != null) {
         checkSubmitPassword({ password: this.password }).then((response) => {
@@ -197,7 +219,6 @@
     pullFeed() {
       var partNoList = []
       var partNoLists
-      console.log('this.dataList', this.dataList)
       for (var i = 0; i < this.dataList.length; i++) {
         partNoLists = this.dataList[i].partNo
         partNoList.push(partNoLists)
@@ -286,16 +307,16 @@
       return reg.test(value)
     },
     objectSpanMethod() {
-      setTimeout(() => {
+      this.$nextTick(()=>{
         if (this.$refs.table.$el) {
           const current = this.$refs.table.$el
             .querySelector('.el-table__footer-wrapper')
             .querySelector('.el-table__footer')
           const cell = current.rows[0].cells
           // cell[1].style.display = 'none'
-          cell[0].colSpan = '4'
+          cell[0].colSpan = '6'
         }
-      }, 50)
+      })
     },
     getSummaries(param) {
       const { columns, data } = param
@@ -325,12 +346,19 @@
   },
   watch: {
     currshowlist() {
-      this.innerVisible = this.currshowlist
-      this.password = null
-      if (this.currshowlist) {
-        this.$nextTick(() => {})
+      const _than = this
+      _than.innerVisible = _than.currshowlist
+      _than.password = null
+      if (!_than.currshowlist) {
+        _than.$nextTick(() => {
+        })
       }
-    }
+    },
+  },
+  created(){
+    this.$nextTick(()=>{
+      this.objectSpanMethod()
+    })
   },
   mounted() {}
 }

--
Gitblit v1.9.3