From a24f5347bfd2331f8a4819b215f79555776534cd Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 25 四月 2024 09:16:57 +0800
Subject: [PATCH] 合并冲突

---
 src/components/tool/value-table.vue |   43 ++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 38 insertions(+), 5 deletions(-)

diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index 418d4e2..5c37a1e 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -178,7 +178,7 @@
 								v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" :disabled="isDisabled(a.label)"></el-input>
 							<el-select v-model="upData[a.label]" :multiple="data.selectField[a.label].choose" size="small"
 								v-if="showType(a.label, data.selectField) != null" style="width: 100%;" :disabled="isDisabled(a.label)"
-								clearable>
+								clearable filterable>
 								<el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value"
 									:label="b.label">
 								</el-option>
@@ -222,7 +222,7 @@
 								v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" :disabled="isDisabled(a.label)"></el-input>
 							<el-select v-model="upData[a.label]" :multiple="data.selectField[a.label].choose" size="small"
 								v-if="showType(a.label, data.selectField) != null" style="width: 100%;" :disabled="isDisabled(a.label)"
-								clearable>
+								clearable filterable>
 								<el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value"
 									:label="b.label"></el-option>
 							</el-select>
@@ -263,7 +263,7 @@
 							<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"
-								style="width: 100%;" :placeholder="`璇烽�夋嫨${a.value}`" clearable>
+								style="width: 100%;" :placeholder="`璇烽�夋嫨${a.value}`" clearable filterable>
 								<el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value"
 									:label="b.label"></el-option>
 							</el-select>
@@ -892,6 +892,15 @@
 					}
 				}
 				this.addLoad = true
+        this.upHead.forEach((item,index)=>{
+          if(this.data.cascaderField&&this.data.cascaderField[item.label]){
+            if(this.upData[item.label]){
+              this.upData[item.label] = this.upData[item.label].join(',');
+            }else{
+              this.upData[item.label] = ''
+            }
+          }
+        })
 				this.$axios.post(this.addUrl, this.upData, {
 					headers: {
 						'Content-Type': 'application/json'
@@ -1050,7 +1059,7 @@
 				return count * 15 + 60 + 'px'
 			},
       handleSuccessUp(response,label){
-        if(label){
+        if(typeof label === 'string'){
           if(response.code==200){
             this.upData[label] = response.data.url;
           }
@@ -1063,7 +1072,31 @@
       },
       handleCascader(e,label){
         this.upData[label] = e;
-      }
+      },
+      // 鎵归噺鍒犻櫎
+      batchDelete(){
+        if(this.multipleSelection&&this.multipleSelection.length>0){
+          this.$confirm('鏄惁鍒犻櫎閫変腑鐨勬暟鎹�?', "璀﹀憡", {
+							confirmButtonText: "纭畾",
+							cancelButtonText: "鍙栨秷",
+							type: "warning"
+						}).then(() => {
+							this.$axios.post(this.delUrl, {
+								ids: JSON.stringify(this.multipleSelection.map(item => item.id))
+							}).then(res => {
+								if (res.code === 201) {
+									return
+								}
+								this.$message.success('鍒犻櫎鎴愬姛')
+								this.selectList()
+							}).catch(e => {
+								this.$message.error('鍒犻櫎澶辫触')
+							})
+						}).catch(() => {})
+        }else{
+          this.$message.error('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁')
+        }
+      },
 		}
 	}
 </script>

--
Gitblit v1.9.3