From 039d01c3ee6217e18ef3bcaec263fd2ad59e6f68 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期三, 20 九月 2023 16:19:51 +0800
Subject: [PATCH] 	modified:   src/components/view/equipmentmaintain.vue 	modified:   src/components/view/standard-table/material.vue 	modified:   src/components/view/standard-table/product.vue 	modified:   src/components/view/standard-table/target.vue 	modified:   src/components/view/standard-table/technology.vue

---
 src/components/view/equipmentmaintain.vue |   66 ++++++++++++++++++--------------
 1 files changed, 37 insertions(+), 29 deletions(-)

diff --git a/src/components/view/equipmentmaintain.vue b/src/components/view/equipmentmaintain.vue
index 18aefff..e4f9bd3 100644
--- a/src/components/view/equipmentmaintain.vue
+++ b/src/components/view/equipmentmaintain.vue
@@ -114,7 +114,7 @@
             <el-form ref="form" :model="form" label-width="80px">
                 <el-form-item label="绫诲瀷">
                     <template>
-                        <el-select v-model="form.type" placeholder="璇烽�夋嫨" @change="edittype" style="width: 480px;">
+                        <el-select v-model="form.type" placeholder="璇烽�夋嫨" @change="edittype" style="width: 100%;">
                             <el-option label="姗¤兌杩炴帴鍣�" :value="0"></el-option>
 							<el-option label="閲戝睘杩炴帴鍣�" :value="1"></el-option>
 							<el-option label="婀挎彃鎷旂數杩炴帴鍣�" :value="2"></el-option>
@@ -202,7 +202,7 @@
                     <el-col :span="11" :offset="2">
                         <el-form-item label="鍗曚綅">
                             <template>
-                        <el-input v-model="unitrow" :disabled="true" placeholder="璇疯緭鍏ュ崟浣�" style="width: 200px;"></el-input>
+                        <el-input v-model="unitrow" :disabled="true" placeholder="璇疯緭鍏ュ崟浣�" style="width: 100%;"></el-input>
                         </template>
                         </el-form-item>
                      </el-col>
@@ -261,10 +261,11 @@
             <!-- 涓讳綋鍙� -->
 			<div class="right">
                 <el-table
+                height="calc(90vh - 200px)"
                     :data="tableData"
-                    style="width: 100%;margin-bottom: 20px;height: 600px;overflow: auto;"
                     row-key="rowId"
                     border
+                    @select-all="selectAll"
                     @select="selectTr"
                     @selection-change="handleSelectionChange"
                     default-expand-all
@@ -606,23 +607,17 @@
 			},
 
             dels() {
-				this.selects.forEach(a => {
-					for (var b = 0; b < this.tableData.length; b++) {
-						if (this.tableData[b].id == a.id) {
-							this.tableData.splice(b, 1)
-							b--
-						}
-					}
-				})
-                let cc = this.selects.map(el => {
-					return el.id
-				})
-                // cc.forEach((el,idx) =>{
-                //     delete  idx[0]
-                // })
-                cc.splice(0,1)
-                console.log(cc);
-				this.delete = cc.join(',')
+                let ee = []
+                console.log(this.selects);
+                this.selects.forEach(el =>{ 
+                    if(el.children){
+                        el.children.forEach(ele =>{
+                            ee.push(ele.id)
+                        })   
+                    } 
+                })
+                console.log(ee);
+				this.delete = ee.join(',')
 				console.log(this.delete);
 				this.delAllQue()
 				this.$message.success('鍒犻櫎瀹屾垚')
@@ -639,6 +634,7 @@
             // },
             handleSelectionChange(val) {
                 this.selects = val
+                // console.log(this.selects);
                 this.deleteList = [];
                 val.forEach((v) => {
                 if (v.id !== undefined) {
@@ -646,13 +642,15 @@
                 }
                 });
 			},
-             // 琛ㄦ牸鏍戝叏閮ㄩ�変腑閰嶇疆
-                // 鍏ㄩ��/鍙栨秷閫夋搷浣�
-                selectAll(val) {
-                    this.isAllSelect = !this.isAllSelect;
-                    let data = this.tableData;
+            // 鍏ㄩ��/鍙栨秷閫夋搷浣�
+            selectAll(val) {
+                // console.log(val);
+                this.isAllSelect = !this.isAllSelect;
+                let data = this.tableData;
+                this.$nextTick(() =>{
                     this.toggleSelect(data, this.isAllSelect, "all");
-                },
+                })
+            },
              //閫夋嫨鏌愯
 		    selectTr(selection, row) {
                 console.log(selection,row);
@@ -663,10 +661,19 @@
                 });
 
             },
+            toggleSelection(row, flag) {
+                this.$set(row, "isChecked", flag);
+                this.$nextTick(() => {
+                if (flag) {
+                    this.$refs.multipleTable.toggleRowSelection(row, flag);
+                } else {
+                    this.$refs.multipleTable.clearSelection();
+                }
+                });
+            },
              //閫掑綊瀛愮骇
             toggleSelect(data, flag, type) {
                 if (type === "all") {
-                    console.log('222');
                     if (data.length > 0) {
                         data.forEach((item) => {
                         this.toggleSelection(item, flag);
@@ -685,7 +692,6 @@
                     }
                 }
             },
-          
         }
     }
 </script>
@@ -770,7 +776,9 @@
 	.thing .right {
 		width: calc(100% - 305px);
 		height: calc(100% - 25px);
-		overflow: hidden;
+		/* overflow: hidden; */
+        overflow-y: scroll;
+        overflow-x: scroll;
 		padding: 10px;
 	}
 

--
Gitblit v1.9.3