|
@@ -185,18 +185,18 @@ export default {
|
|
|
init() {
|
|
|
if(this.jiBie == 0){
|
|
|
this.tip = this.$store.state.user.agentFlag ? '代理' : "全站"
|
|
|
- this.setLevelId(this.$store.state.user.agentFlag ? this.$store.state.user.userId : this.deptId)
|
|
|
+ this.setLevelId(undefined)
|
|
|
this.selectAgency();
|
|
|
}else if(this.jiBie == 1){
|
|
|
this.tip = "集团"
|
|
|
this.currentGroup = {
|
|
|
- deptId: this.deptId,
|
|
|
+ deptId: undefined,
|
|
|
deptName: this.$store.state.user.deptName
|
|
|
}
|
|
|
this.setLevelId(this.currentGroup.deptId)
|
|
|
this.selectGroup(this.currentGroup);
|
|
|
}else if(this.jiBie == 2){
|
|
|
- this.setLevelId(this.deptId)
|
|
|
+ this.setLevelId(undefined)
|
|
|
}
|
|
|
},
|
|
|
selectAgency() {
|
|
@@ -204,7 +204,8 @@ export default {
|
|
|
this.filterText = "";
|
|
|
this.currentGroup = undefined;
|
|
|
this.currentStation = undefined;
|
|
|
- this.setLevelId(this.$store.state.user.agentFlag ? this.$store.state.user.userId : this.deptId)
|
|
|
+ this.setLevelId(undefined)
|
|
|
+
|
|
|
getGroups().then((res)=>{
|
|
|
if(res.code == 200){
|
|
|
this.groups = res.data
|
|
@@ -221,7 +222,8 @@ export default {
|
|
|
this.filterText = "";
|
|
|
this.currentGroup = group;
|
|
|
this.currentStation = undefined;
|
|
|
- this.setLevelId(this.currentGroup.deptId);
|
|
|
+ const id = this.jiBie==1 ? undefined : this.currentGroup.deptId;
|
|
|
+ this.setLevelId(id);
|
|
|
getStations({
|
|
|
deptId: group.deptId
|
|
|
}).then((res)=>{
|
|
@@ -239,7 +241,8 @@ export default {
|
|
|
this.tip = "站点";
|
|
|
this.filterText = "";
|
|
|
this.currentStation = station;
|
|
|
- this.setLevelId(this.currentStation.deptId)
|
|
|
+ const id = this.jiBie==2 ? undefined : this.currentStation.deptId;
|
|
|
+ this.setLevelId(id)
|
|
|
this.refreshTagView();
|
|
|
},
|
|
|
/** 查询部门下拉树结构 */
|