feat: There is no way the, 新需求 #52633

This commit is contained in:
super_liu
2022-04-19 16:44:14 +08:00
parent 181cc36207
commit 3485a9a8b0
4 changed files with 142 additions and 97 deletions
@@ -24,29 +24,32 @@
<span class="custom-tree-node" slot-scope="{ node, data }" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
<span :class="data.children.length !== 0 ? 'is-show' : 'is-leaf-none'"></span>
<span style="font-size:12px"> {{ node.label }} </span>
<!-- <span>
<el-button
type="text"
size="mini"
v-show="data.show"
@click="() => append(data)">
新增
</el-button>
<el-button
type="text"
size="mini"
v-show="data.show"
@click="() => update(data)">
编辑
</el-button>
<el-button
type="text"
size="mini"
v-show="data.showDel"
@click="() => remove(node, data)">
删除
</el-button>
</span>-->
<span>
<el-button
type="text"
size="mini"
v-show="data.show"
v-btn-permission="'b1c5fe2985a365d90d10607b47885749'"
@click="() => append(data)">
新增
</el-button>
<el-button
type="text"
size="mini"
v-show="data.show"
v-btn-permission="'8d2e05ebce16d742a7f1fb895f0306b7'"
@click="() => update(data)">
编辑
</el-button>
<el-button
type="text"
size="mini"
v-show="data.showDel"
v-btn-permission="'88ee8b7e529353511d47eb1e67fcd6a1'"
@click="() => remove(node, data)">
删除
</el-button>
</span>
</span>
</el-tree>
</el-card>
@@ -2272,7 +2275,6 @@ export default {
parentIds: null,
parentIdsName: "",
displaySeq: "",
validFlag: "",
creationTime: "",
modifyTime: "",
remarks: "",
@@ -3041,11 +3043,16 @@ export default {
if (row.parentIds.indexOf(res.data.id) != -1) {
this.productModelAdd.parentIds = row.parentIds
} else {
this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id
idsName = row.parentIdsName + ',' + res.data.menuName
if(row.parentIds && row.parentIds.substr(-1,1) === ','){
this.productModelAdd.parentIds = row.parentIds + res.data.id+','
idsName = row.parentIdsName + ',' + res.data.menuName
}else {
this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id+','
idsName = row.parentIdsName + ',' + res.data.menuName
}
}
} else {
this.productModelAdd.parentIds = res.data.id
this.productModelAdd.parentIds = ','+res.data.id+','
idsName = res.data.menuName;
}
this.productModelAdd.parentId = res.data.id