Merge branch 'ma-mall-ui' of http://192.168.0.56:3000/bonus/bonus-ui into ma-mall-ui
This commit is contained in:
commit
e7ed45b13c
|
|
@ -612,6 +612,46 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in propertyNames"
|
||||||
|
:key="index"
|
||||||
|
class="dynamic-item"
|
||||||
|
>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="属性" prop="attribute">
|
||||||
|
<el-input
|
||||||
|
v-model="propertyNames[index]"
|
||||||
|
placeholder="请输入"
|
||||||
|
maxlength="20"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col
|
||||||
|
:span="2"
|
||||||
|
style="
|
||||||
|
margin-top: 10px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: left;
|
||||||
|
align-items: center;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
class="el-icon-plus"
|
||||||
|
style="font-size: 20px; color: blue"
|
||||||
|
@click="addPartItem"
|
||||||
|
></i>
|
||||||
|
<i
|
||||||
|
class="el-icon-minus"
|
||||||
|
style="font-size: 20px; color: red"
|
||||||
|
v-if="index != 0"
|
||||||
|
@click="removePartItem(index)"
|
||||||
|
></i>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
<el-row style="text-align: right">
|
<el-row style="text-align: right">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button size="small" type="primary" @click="onSubmit"
|
<el-button size="small" type="primary" @click="onSubmit"
|
||||||
|
|
@ -882,6 +922,8 @@ export default {
|
||||||
isMousemoveId: null,
|
isMousemoveId: null,
|
||||||
editTypeIds: [],
|
editTypeIds: [],
|
||||||
batchEdit: true,
|
batchEdit: true,
|
||||||
|
|
||||||
|
propertyNames: [''],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -1184,6 +1226,7 @@ export default {
|
||||||
|
|
||||||
/* 树节点增加 */
|
/* 树节点增加 */
|
||||||
appendTreeNode(data) {
|
appendTreeNode(data) {
|
||||||
|
this.propertyNames = [];
|
||||||
if (data.level === 3) {
|
if (data.level === 3) {
|
||||||
this.reset();
|
this.reset();
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
|
|
@ -1215,10 +1258,22 @@ export default {
|
||||||
/* 树节点修改 */
|
/* 树节点修改 */
|
||||||
editTreeNode(data) {
|
editTreeNode(data) {
|
||||||
console.log(data, "修改");
|
console.log(data, "修改");
|
||||||
|
if(data.level!=2){
|
||||||
|
this.propertyNames= []
|
||||||
Object.assign(this.addFormParams, data);
|
Object.assign(this.addFormParams, data);
|
||||||
this.addTitle = "修改";
|
this.addTitle = "修改";
|
||||||
this.addFormParams.typeName = data.label;
|
this.addFormParams.typeName = data.label;
|
||||||
this.addTitleVisible = true;
|
this.addTitleVisible = true;
|
||||||
|
}else{
|
||||||
|
this.propertyNames= ['']
|
||||||
|
if(data.propertyNames!=null){
|
||||||
|
this.propertyNames = data.propertyNames
|
||||||
|
}
|
||||||
|
Object.assign(this.addFormParams, data);
|
||||||
|
this.addTitle = "修改";
|
||||||
|
this.addFormParams.typeName = data.label;
|
||||||
|
this.addTitleVisible = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/* 确定 */
|
/* 确定 */
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
|
@ -1231,6 +1286,7 @@ export default {
|
||||||
typeId: id,
|
typeId: id,
|
||||||
typeName,
|
typeName,
|
||||||
parentId,
|
parentId,
|
||||||
|
propertyNames:this.propertyNames,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$refs["addFormParamsRef"].validate(async (valid) => {
|
this.$refs["addFormParamsRef"].validate(async (valid) => {
|
||||||
|
|
@ -1249,6 +1305,7 @@ export default {
|
||||||
this.addTitleVisible = false;
|
this.addTitleVisible = false;
|
||||||
this.getTreeData();
|
this.getTreeData();
|
||||||
}
|
}
|
||||||
|
this.propertyNames = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -1256,6 +1313,7 @@ export default {
|
||||||
/* 取消 */
|
/* 取消 */
|
||||||
onCancel() {
|
onCancel() {
|
||||||
this.addTitleVisible = false;
|
this.addTitleVisible = false;
|
||||||
|
this.propertyNames = ['']
|
||||||
},
|
},
|
||||||
getParentName(list, id) {
|
getParentName(list, id) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -1325,6 +1383,16 @@ export default {
|
||||||
this.editTypeIds.push(row.typeId);
|
this.editTypeIds.push(row.typeId);
|
||||||
this.editLeasePriceVisible = true;
|
this.editLeasePriceVisible = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//新增属性
|
||||||
|
addPartItem() {
|
||||||
|
this.propertyNames.push('');
|
||||||
|
},
|
||||||
|
removePartItem(index) {
|
||||||
|
if (this.propertyNames.length > 1) {
|
||||||
|
this.propertyNames.splice(index, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue