品类增删改查

master
rouchen 2024-03-10 21:32:32 +08:00
parent 095fc4d78a
commit 8dbfac5726
2 changed files with 13 additions and 4 deletions

View File

@ -307,10 +307,9 @@ export default {
* @param index
*/
removeChecked(index){
console.log(this.form.attributeIdList)
this.checkedAttributeList.splice(index, 1);
this.form.attributeIdList.splice(index, 1);
console.log(this.form.attributeIdList)
console.log(index)
},
/**

View File

@ -217,6 +217,9 @@ export default {
},
//
form: {
attributeInfoList: [],
attributeGroupList: [],
brandInfoList: []
},
//
rules: {
@ -249,9 +252,13 @@ export default {
handler(val){
if (val !== undefined && val !== 0){
parentCommonElement(val).then(response => {
console.log(response)
this.attributeInfoList = response.data.attributeInfoList;
this.attributeGroupList = response.data.attributeGroupList;
this.brandInfoList = response.data.brandInfoList;
console.log(val)
console.log(this.attributeGroupList)
console.log(this.brandInfoList)
})
}
},
@ -309,7 +316,10 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
attributeInfoList: [],
attributeGroupList: [],
brandInfoList: []
};
this.resetForm("form");
},
@ -324,6 +334,7 @@ export default {
},
/** 新增按钮操作 */
handleAdd(row) {
console.log(row)
this.reset();
this.getTreeselect();
if (row != null && row.id) {
@ -348,7 +359,6 @@ export default {
this.getTreeselect();
if (row != null) {
this.form.parentId = row.parentId;
this.form.attributeIdList
}
getCategory(row.id).then(response => {
this.form = response.data;