优化:运营中心 - 配送商从联盟商家中分离 单独成组

修复:运营中心 - 修改子级代理信息后,列表中的内容未正常刷新
This commit is contained in:
wuhui_zzw 2024-03-28 17:34:23 +08:00
parent 6489440764
commit 9923fe759f
1 changed files with 23 additions and 2 deletions

View File

@ -36,6 +36,7 @@
<el-radio-button label="3">区县运营中心</el-radio-button>
<el-radio-button label="4">烟酒馆运营中心</el-radio-button>
<el-radio-button label="5">联盟商家</el-radio-button>
<el-radio-button label="6">配送商</el-radio-button>
</el-radio-group>
<!--表格信息-->
<el-table
@ -123,7 +124,7 @@
<el-table-column label="添加时间" prop="create_time" min-width="130" align="center"/>
<el-table-column label="操作" min-width="120" align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" effect="dark" @click="showEditInfoPopup(scope.row.agent_type,scope.row.id)">编辑</el-button>
<el-button type="primary" size="small" effect="dark" @click="showEditInfoPopup(scope.row.agent_type,scope.row.id, scope.row.pid)">编辑</el-button>
</template>
</el-table-column>
</el-table>
@ -160,6 +161,7 @@ export default {
drawer_show: false,
agent_type: 0,
agent_id: 0,
pid: 0,
//
userListLoading: false,
tableFrom: {
@ -175,6 +177,8 @@ export default {
data: [],
total: 0,
},
//
tableTreeRefreshTool: {}
};
},
watch: {
@ -190,15 +194,22 @@ export default {
},
methods: {
// -
showEditInfoPopup(agent_type,agent_id = 0){
showEditInfoPopup(agent_type,agent_id = 0, pid = 0){
// 1=,2=,3=,4=,5=,6=,7=,8=
this.agent_type = agent_type || 0;
this.agent_id = agent_id || 0;
this.pid = pid || 0;
this.drawer_show = true;
},
// -
closeEditInfoPopup() {
this.drawer_show = false;
//
let currentTreeInfo = this.tableTreeRefreshTool[this.pid] || {};
if(Object.values(currentTreeInfo).length > 0){
this.load(currentTreeInfo.tree, currentTreeInfo.treeNode, currentTreeInfo.resolve);
}
//
this.getAgentList('');
},
//
@ -226,6 +237,16 @@ export default {
//
load(tree, treeNode, resolve) {
let _this = this;
// 使
let currentTreeInfo = _this.tableTreeRefreshTool[tree.id] || {};
if(Object.values(currentTreeInfo).length <= 0){
_this.tableTreeRefreshTool[tree.id] = {
tree: tree,
treeNode: treeNode,
resolve: resolve,
};
}
//
_this.userListLoading = true;
childrenList({ pid: tree.id }).then((res) => {
_this.userListLoading = false;