| | |
| | | @row-dblclick="handleMapingRowClick" @selection-change="selectionChange" @select="setCurrentRow" |
| | | @select-all="handleSelectAll"> |
| | | <template slot="menuLeft"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" :disabled="disabledPush" |
| | | <el-button icon="el-icon-plus" size="small" type="primary" |
| | | @click="dialogPush = true">新 增 |
| | | </el-button> |
| | | <el-button icon="el-icon-check" size="small" type="primary" @click="handleSave">保 存 |
| | |
| | | if (response.status === 200) { |
| | | this.loading = false |
| | | this.mappingData = response.data.data |
| | | console.log(this.filtermapping) |
| | | // console.log(this.filtermapping) |
| | | } |
| | | }, |
| | | // 接口获取属性映射取值范围 |
| | |
| | | this.rangeData = [] |
| | | const response = await gridAttrRanges({ meatId: oid }) |
| | | if (response.status === 200) { |
| | | console.log(response.data) |
| | | // console.log(response.data) |
| | | this.rangeData = response.data.data |
| | | } |
| | | }, |
| | |
| | | }, |
| | | // 保存按钮 |
| | | async handleSave() { |
| | | console.log(this.mappingData) |
| | | const response = await batchAddSave({ dockingPreAttrMappingVOList: this.mappingData }) |
| | | console.log(response) |
| | | if (response.status === 200) { |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | message: "请选择一条集团分类" |
| | | }); |
| | | } else { |
| | | console.log(param) |
| | | const response = await syncClassifyModel(param) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | |
| | | }, |
| | | handelTransferSave(event) { |
| | | let that = this |
| | | console.log(event) |
| | | const transferValue = event.value |
| | | if (Object.keys(that.mappingForm).length == 0) { |
| | | this.$message({ |
| | |
| | | }, |
| | | // 属性取值范围单元格编辑后 |
| | | handleUpdate(row, index, done) { |
| | | console.log(row) |
| | | console.log(index) |
| | | const findRow = this.mappingData.findIndex(item => item.metaListId === row.metaListId) |
| | | this.rangeData[index] = row |
| | | console.log(this.rangeData) |
| | | this.mappingData[findRow].dockingPreAttrRangeVoList = (this.rangeData) |
| | | console.log('修改后', row) |
| | | this.$message({ |
| | | showClose: true, |
| | | message: "修改成功", |
| | |
| | | }, |
| | | // 属性取值范围单元格编辑后 |
| | | handleMapingUpdate(row, index, done) { |
| | | console.log(row) |
| | | console.log('修改后', row) |
| | | this.$message({ |
| | | showClose: true, |
| | | message: "修改成功", |
| | |
| | | }, |
| | | // 集团映射属性选择(单选) |
| | | selectionChange(selection) { |
| | | console.log(selection) |
| | | console.log(this.mappingForm) |
| | | if (selection.length > 1) { |
| | | const nowVal = selection.shift(); |
| | | this.$refs.crudMapping.toggleRowSelection(nowVal, false); |
| | |
| | | } |
| | | }, |
| | | setCurrentRow(selection, row) { |
| | | console.log(row) |
| | | this.mappingForm = row |
| | | this.disabledPush = false |
| | | }, |
| | | handleSelectAll(selection) { |
| | | console.log(selection) |
| | | this.$refs.crudMapping.toggleSelection() |
| | | } |
| | | } |