| | |
| | | <el-tag>{{ row.attrDataTypeText }}</el-tag> |
| | | </template> |
| | | <template slot="menu" slot-scope="{row,index}"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="cellEditClick(row)">编辑 |
| | | <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="cellEditClick(row,index)">编辑 |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit" |
| | | @click="removeFormAttrTable(row,index)">移除 |
| | |
| | | if (!this.btmType.attributes) { |
| | | this.btmType.attributes = []; |
| | | } |
| | | console.log(this.attrRef.selectData); |
| | | // console.log(this.attrRef.selectData); |
| | | this.attrRef.selectData.forEach(item => { |
| | | this.btmType.attributes.push({ |
| | | id: item.id, |
| | |
| | | }, |
| | | // 列表编辑 |
| | | cellEditClick(cell) { |
| | | console.log(cell); |
| | | // console.log(cell); |
| | | cell.$cellEdit = true; |
| | | }, |
| | | // 列表编辑保存 |
| | | cellEditSave(row) { |
| | | this.btmType.attributes[row.$index].name = row.name |
| | | this.btmType.attributes[row.$index].defaultValue = row.defaultValue; |
| | | this.btmType.attributes[row.$index].description = row.description; |
| | | cellEditSave(row,index) { |
| | | // console.log("1111111111111111111111") |
| | | this.btmType.attributes[index].name = row.name |
| | | this.btmType.attributes[index].defaultValue = row.defaultValue; |
| | | this.btmType.attributes[index].description = row.description; |
| | | row.$cellEdit = false; |
| | | // console.log(this.btmType.attributes); |
| | | this.$refs.attrTable.refreshTable(); |
| | | }, |
| | | // 打开版本规则参照 |
| | | openRevision() { |