637b2558 by 田浩浩

修改分屏以后,别的选项卡内容消失

1 parent fe5fc1f2
......@@ -88,8 +88,8 @@
<el-tab-pane
:label="item.name"
:name="item.value"
v-for="(item, index) in tabList"
:key="index"
v-for="item in tabList"
:key="item.value"
>
</el-tab-pane>
</el-tabs>
......@@ -272,16 +272,18 @@ export default {
break;
case "B2": //材料分屏按钮
this.splitScreen = this.splitScreen ? false : true;
this.$store.dispatch("app/settScreen", this.splitScreen);
if (this.splitScreen) {
this.$store.dispatch("app/settScreen", this.splitScreen);
if (this.splitScreen) {
//如果当前选项卡为材料信息内容,递减到上一个选项卡内容
if (this.tabName == this.clxxTab.value) {
this.tabName = this.tabList[this.clxxIndex - 1].value;
this.getFromRouter(this.tabList[this.clxxIndex - 1].value);
}
//删除材料信息选项卡数据
this.tabList.splice(this.clxxIndex, 1);
} else {
this.tabList.splice(this.clxxIndex, 1, this.clxxTab);
//新增材料信息选项卡数据
this.tabList.splice(this.clxxIndex, 0, this.clxxTab);
}
break;
case "B4":
......