| | |
| | | /><el-table-column |
| | | label="适用方式" |
| | | align="center" |
| | | key="suitWay" |
| | | prop="suitWay" |
| | | key="suitWayList" |
| | | prop="suitWayList" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="mode" :value="scope.row.suitWay" /> |
| | | <dict-tag :options="mode" :value="scope.row.suitWayList" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | |
| | | <el-row v-if="!measurement"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="适用场景" prop="suitWay"> |
| | | <el-form-item label="适用场景" prop="suitWayList"> |
| | | <el-select |
| | | v-model="indexform.suitWay" |
| | | v-model="indexform.suitWayList" |
| | | multiple |
| | | placeholder="请选择" |
| | | > |
| | |
| | | if (index !== -1) { |
| | | this.testuserList[index].isoperation = 3; |
| | | this.targetoptionList.push(this.testuserList[index]); |
| | | console.log(this.targetoptionList, "aaaa.targetoptionList"); |
| | | this.testuserList.splice(index, 1); // 从索引位置删除一个元素 |
| | | this.sortFn(); |
| | | } else { |
| | |
| | | nodynamiccruxs: item.nodynamiccruxs, |
| | | dynamiccruxsJson: item.dynamiccruxsJson, |
| | | nodynamiccruxsJson: item.nodynamiccruxsJson, |
| | | targetoptionid: item.targetoptionid, |
| | | }; |
| | | }); |
| | | console.log(this.testuserList); |
| | |
| | | // 表单重置 |
| | | reset() { |
| | | this.indexform = { |
| | | suitWay: undefined, |
| | | suitWayList: undefined, |
| | | id: undefined, |
| | | targetdesc: undefined, |
| | | baseTagList: [], |
| | |
| | | } |
| | | this.dynamicTags = row.baseTagList.map(this.processElement); |
| | | this.testuserList = row.targetoptionList; |
| | | console.log(this.testuserList, "bbbb"); |
| | | this.testvalue = ""; |
| | | this.indexopen = true; |
| | | this.measurement = false; |
| | |
| | | |
| | | /** 更新/修改提交按钮 */ |
| | | submitForm: function () { |
| | | // this.indexform.targetoptionList=[] |
| | | this.indexform.targetoptionList = this.indexform.targetoptionList.map( |
| | | (res) => { |
| | | res.isoperation = 2; |
| | | return res; |
| | | } |
| | | ); |
| | | // this.indexform.targetoptionList = this.indexform.targetoptionList.map( |
| | | // (res) => { |
| | | // res.isoperation = 2; |
| | | // return res; |
| | | // } |
| | | // ); |
| | | console.log(this.testuserList, "aaa"); |
| | | console.log(this.targetoptionList, "bbb"); |
| | | this.$refs["indexform"].validate((valid) => { |
| | | this.indexform.targetoptionList = this.testuserList.concat( |
| | | this.targetoptionList |
| | | ); |
| | | console.log(this.indexform.targetoptionList); |
| | | if (valid) { |
| | | if (!this.indexform.version) this.indexform.version = "1.0"; |
| | | if (this.indexform.id != undefined) { |