4e248ae4 by 田浩浩

新增分屏功能

1 parent 42744ffa
......@@ -213,38 +213,6 @@ import InformationTable from "./InformationTable";
import { Init, fristReg } from "@/api/cfdjFlow.js";
import { mapGetters } from "vuex";
export default {
created() {
// console.log(1111111111111111);
var bsmSldy = this.$parent._data.unitData[0].bsmSldy;
var formdata = new FormData();
formdata.append("bsmSldy", bsmSldy);
Init(formdata).then((res) => {
if (res.code === 200 && res.result) {
this.ruleForm = {
...res.result,
...res.result.qlxxdatas,
...res.result.djQlxxCfdjDo,
};
}
});
},
watch: {
},
components: { InformationTable },
props: {
flag: {
type: Boolean,
default: false,
},
fetch: {
type: Boolean,
default: false,
},
},
computed: {
...mapGetters(["dictData"]),
},
data() {
return {
disabled: true,
......@@ -279,8 +247,43 @@ export default {
czr: "",
},
rules: {},
//传递参数
propsParam: {},
};
},
created() {
// console.log(1111111111111111);
this.propsParam = this.$attrs;
var formdata = new FormData();
formdata.append("bsmSldy", this.propsParam.bsmSldy);
Init(formdata).then((res) => {
if (res.code === 200 && res.result) {
this.ruleForm = {
...res.result,
...res.result.qlxxdatas,
...res.result.djQlxxCfdjDo,
};
}
});
},
watch: {
},
components: { InformationTable },
props: {
flag: {
type: Boolean,
default: false,
},
fetch: {
type: Boolean,
default: false,
},
},
computed: {
...mapGetters(["dictData"]),
},
methods: {
list(bsmSldy) {
var formdata = new FormData();
......
......@@ -43,6 +43,9 @@
</el-menu-item>
</el-menu>
</div>
<div v-if="splitScreen" class="splitScreen-con">
<component :is="clxxForm" v-bind="currentSelectProps" :key="fresh" />
</div>
<!-- 表单内容区域 -->
<div id="rightContainer">
<div class="tabDiv">
......@@ -61,9 +64,6 @@
v-bind="currentSelectProps"
/>
</div>
<!-- <div style="width: 100%">
</div> -->
</div>
</div>
</div>
......@@ -89,9 +89,9 @@ export default {
data() {
return {
//受理申请标识码
bsmSlsq: "",
bsmSlsq: this.$route.query.bsmSlsq,
//当前流程所在环节
bestepid: "",
bestepid: this.$route.query.bestepid,
//顶部左侧按钮集合
leftButtonList: [],
//顶部右侧按钮集合
......@@ -108,11 +108,17 @@ export default {
fresh: 0,
//设置表单传递数据
currentSelectProps: {},
//是否开启材料分屏
splitScreen: false,
//材料分屏表单
clxxForm: "",
//材料信息选择卡索引
clxxIndex: "",
//材料信息选项卡对象
clxxTab: {},
};
},
mounted() {
this.bsmSlsq = this.$route.query.bsmSlsq;
this.bestepid = this.$route.query.bestepid;
this.loadBdcdylist();
this.flowInitParam();
},
......@@ -129,6 +135,14 @@ export default {
this.tabList = res.result.form;
//默认选择第一个选项卡内容
this.tabName = res.result.form[0].value;
let that = this;
this.tabList.forEach(function (item, index) {
if (item.value == "clxx") {
that.clxxIndex = index;
that.clxxForm = getForm(item.value);
that.clxxTab = item;
}
});
//默认加载第一个选项卡的组件内容
this.getFromRouter(res.result.form[0].value);
}
......@@ -142,13 +156,17 @@ export default {
this.zsylFlag = true;
break;
case "clfp":
this.key++;
this.issplitScreen = !this.issplitScreen;
this.flag = !this.flag;
if (this.issplitScreen) {
this.tabList.splice(1, 1);
this.splitScreen = this.splitScreen ? false : true;
//this.$alert(this.tabName);
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 = [...this.tabList1];
this.tabList.splice(this.clxxIndex, 1, this.clxxTab);
}
break;
case "th":
......@@ -206,11 +224,11 @@ export default {
},
//表单选项卡事件
tabClick(tab, event) {
//this.$alert(tab.name);
this.getFromRouter(tab.name);
},
//切换选项卡内容组件
getFromRouter(tabname) {
//this.$alert(getForm(tabname));
this.componentTag = getForm(tabname);
},
},
......