品类增删改查
parent
095fc4d78a
commit
8dbfac5726
|
@ -307,10 +307,9 @@ export default {
|
||||||
* @param index
|
* @param index
|
||||||
*/
|
*/
|
||||||
removeChecked(index){
|
removeChecked(index){
|
||||||
console.log(this.form.attributeIdList)
|
|
||||||
this.checkedAttributeList.splice(index, 1);
|
this.checkedAttributeList.splice(index, 1);
|
||||||
this.form.attributeIdList.splice(index, 1);
|
this.form.attributeIdList.splice(index, 1);
|
||||||
console.log(this.form.attributeIdList)
|
console.log(index)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -217,6 +217,9 @@ export default {
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
|
attributeInfoList: [],
|
||||||
|
attributeGroupList: [],
|
||||||
|
brandInfoList: []
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
@ -249,9 +252,13 @@ export default {
|
||||||
handler(val){
|
handler(val){
|
||||||
if (val !== undefined && val !== 0){
|
if (val !== undefined && val !== 0){
|
||||||
parentCommonElement(val).then(response => {
|
parentCommonElement(val).then(response => {
|
||||||
|
console.log(response)
|
||||||
this.attributeInfoList = response.data.attributeInfoList;
|
this.attributeInfoList = response.data.attributeInfoList;
|
||||||
this.attributeGroupList = response.data.attributeGroupList;
|
this.attributeGroupList = response.data.attributeGroupList;
|
||||||
this.brandInfoList = response.data.brandInfoList;
|
this.brandInfoList = response.data.brandInfoList;
|
||||||
|
console.log(val)
|
||||||
|
console.log(this.attributeGroupList)
|
||||||
|
console.log(this.brandInfoList)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -309,7 +316,10 @@ export default {
|
||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null
|
updateTime: null,
|
||||||
|
attributeInfoList: [],
|
||||||
|
attributeGroupList: [],
|
||||||
|
brandInfoList: []
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -324,6 +334,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd(row) {
|
handleAdd(row) {
|
||||||
|
console.log(row)
|
||||||
this.reset();
|
this.reset();
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
if (row != null && row.id) {
|
if (row != null && row.id) {
|
||||||
|
@ -348,7 +359,6 @@ export default {
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
if (row != null) {
|
if (row != null) {
|
||||||
this.form.parentId = row.parentId;
|
this.form.parentId = row.parentId;
|
||||||
this.form.attributeIdList
|
|
||||||
}
|
}
|
||||||
getCategory(row.id).then(response => {
|
getCategory(row.id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
|
Loading…
Reference in New Issue