优化:运营中心 - 配送商从联盟商家中分离 单独成组
修复:运营中心 - 修改子级代理信息后,列表中的内容未正常刷新
This commit is contained in:
parent
6489440764
commit
9923fe759f
|
|
@ -36,6 +36,7 @@
|
||||||
<el-radio-button label="3">区县运营中心</el-radio-button>
|
<el-radio-button label="3">区县运营中心</el-radio-button>
|
||||||
<el-radio-button label="4">烟酒馆运营中心</el-radio-button>
|
<el-radio-button label="4">烟酒馆运营中心</el-radio-button>
|
||||||
<el-radio-button label="5">联盟商家</el-radio-button>
|
<el-radio-button label="5">联盟商家</el-radio-button>
|
||||||
|
<el-radio-button label="6">配送商</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!--表格信息-->
|
<!--表格信息-->
|
||||||
<el-table
|
<el-table
|
||||||
|
|
@ -123,7 +124,7 @@
|
||||||
<el-table-column label="添加时间" prop="create_time" min-width="130" align="center"/>
|
<el-table-column label="添加时间" prop="create_time" min-width="130" align="center"/>
|
||||||
<el-table-column label="操作" min-width="120" align="center">
|
<el-table-column label="操作" min-width="120" align="center">
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -160,6 +161,7 @@ export default {
|
||||||
drawer_show: false,
|
drawer_show: false,
|
||||||
agent_type: 0,
|
agent_type: 0,
|
||||||
agent_id: 0,
|
agent_id: 0,
|
||||||
|
pid: 0,
|
||||||
// 列表
|
// 列表
|
||||||
userListLoading: false,
|
userListLoading: false,
|
||||||
tableFrom: {
|
tableFrom: {
|
||||||
|
|
@ -175,6 +177,8 @@ export default {
|
||||||
data: [],
|
data: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
},
|
},
|
||||||
|
// 表格 懒加载子列表刷新
|
||||||
|
tableTreeRefreshTool: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -190,15 +194,22 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 代理编辑 - 弹出弹框
|
// 代理编辑 - 弹出弹框
|
||||||
showEditInfoPopup(agent_type,agent_id = 0){
|
showEditInfoPopup(agent_type,agent_id = 0, pid = 0){
|
||||||
// 类型:1=总部发起人,2=省发起人,3=省公司外勤,4=省公司内勤,5=区县运营商,6=区县合伙人,7=餐厅,8=配送商
|
// 类型:1=总部发起人,2=省发起人,3=省公司外勤,4=省公司内勤,5=区县运营商,6=区县合伙人,7=餐厅,8=配送商
|
||||||
this.agent_type = agent_type || 0;
|
this.agent_type = agent_type || 0;
|
||||||
this.agent_id = agent_id || 0;
|
this.agent_id = agent_id || 0;
|
||||||
|
this.pid = pid || 0;
|
||||||
this.drawer_show = true;
|
this.drawer_show = true;
|
||||||
},
|
},
|
||||||
// 代理编辑 - 关闭弹框
|
// 代理编辑 - 关闭弹框
|
||||||
closeEditInfoPopup() {
|
closeEditInfoPopup() {
|
||||||
this.drawer_show = false;
|
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('');
|
this.getAgentList('');
|
||||||
},
|
},
|
||||||
// 代理列表
|
// 代理列表
|
||||||
|
|
@ -226,6 +237,16 @@ export default {
|
||||||
// 获取下级
|
// 获取下级
|
||||||
load(tree, treeNode, resolve) {
|
load(tree, treeNode, resolve) {
|
||||||
let _this = this;
|
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;
|
_this.userListLoading = true;
|
||||||
childrenList({ pid: tree.id }).then((res) => {
|
childrenList({ pid: tree.id }).then((res) => {
|
||||||
_this.userListLoading = false;
|
_this.userListLoading = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue