| | |
| | | <el-table-column |
| | | align="center" |
| | | label="保险方案"> |
| | | <template slot-scope="{row}"> |
| | | <el-select v-model="row.solution" 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" |
| | | :label="item.name" |
| | | :value="{id:item.id,baseId:item.baseId}"> |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | |
| | | id: null, |
| | | solutionList: [ |
| | | { |
| | | solution: {id: null, baseId: null }, |
| | | solution: { id: null, baseId: null }, |
| | | canAdd: 0, |
| | | canReduce: 0 |
| | | } |
| | |
| | | }) |
| | | }, |
| | | 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) |
| | |
| | | }, |
| | | // 获取全部方案 |
| | | getAll() { |
| | | all({ dataType: 0 }) |
| | | all({ dataType: 2 }) |
| | | .then(res => { |
| | | this.programme = res |
| | | }) |
| | |
| | | .then(resa => { |
| | | that.form.solutionList = resa.map(item => { |
| | | return { |
| | | solution: {id: item.baseSolutionId, baseId: item.solutionId }, |
| | | 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({ |
| | | solution: {id: null, baseId: null }, |
| | | solution: { id: null, baseId: null }, |
| | | canAdd: '', |
| | | canReduce: '' |
| | | }) |