From 22271e641e4505ba906c3770905b7e84e3ad8d85 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 02 四月 2024 17:05:57 +0800
Subject: [PATCH] mrshi
---
company/src/components/business/modification.vue | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/company/src/components/business/modification.vue b/company/src/components/business/modification.vue
index 877a401..d832b5f 100644
--- a/company/src/components/business/modification.vue
+++ b/company/src/components/business/modification.vue
@@ -22,8 +22,9 @@
<el-table-column
align="center"
label="淇濋櫓鏂规">
- <template slot-scope="{row}">
- <el-select v-model="row.solutionBaseId" placeholder="璇烽�夋嫨">
+ <template slot-scope="scope">
+<!-- :value="{ id:item.id, baseId: item.baseId }"-->
+ <el-select v-model="scope.row.solution.id" @change="changeSolution($event, scope.$index)" placeholder="璇烽�夋嫨">
<el-option
v-for="item in programme"
:key="item.id"
@@ -71,7 +72,7 @@
id: null,
solutionList: [
{
- solutionBaseId: '',
+ solution: { id: null, baseId: null },
canAdd: 0,
canReduce: 0
}
@@ -93,6 +94,15 @@
})
},
methods: {
+ changeSolution(e, index) {
+ let baseId = ''
+ this.programme.forEach(item => {
+ if (item.id === e) {
+ baseId = item.baseId
+ }
+ })
+ this.form.solutionList[index].solution.baseId = baseId
+ },
confirm() {
this.isWorking = true
updateSolutions(this.form)
@@ -110,7 +120,7 @@
},
// 鑾峰彇鍏ㄩ儴鏂规
getAll() {
- all({})
+ all({ dataType: 2 })
.then(res => {
this.programme = res
})
@@ -126,17 +136,18 @@
.then(resa => {
that.form.solutionList = resa.map(item => {
return {
- solutionBaseId: item.solutionBaseId,
+ solution: {id: item.solutionId, baseId: item.solutionBaseId },
canAdd: item.canAdd,
canReduce: item.canReduce
}
})
+ console.log(that.form.solutionList)
that.visible = true
})
},
add() {
this.form.solutionList.push({
- solutionName: '',
+ solution: { id: null, baseId: null },
canAdd: '',
canReduce: ''
})
--
Gitblit v1.9.3