c3614e79 by 田浩浩

修改单元对应的表单信息

1 parent 9185df97
......@@ -86,6 +86,14 @@ export function getNextLinkInfo (params) {
});
}
//获取单元对应的环节表单信息
export function getStepFormInfo(data){
return request({
url: '/business/workFlow/getStepFormInfo',
method: 'post',
data
});
}
// 环节扩展信息
export function stepExpandInfo (data) {
return request({
......
......@@ -77,6 +77,7 @@ import {
record,
getNextLinkInfo,
completeTask,
getStepFormInfo,
} from "@/api/fqsq.js";
import { mapGetters } from "vuex"
import { deleteBdcdy } from "@/api/ywbl.js";
......@@ -200,19 +201,19 @@ export default {
if (res.code === 200) {
this.leftButtonList = res.result.button;
this.rightButtonList = res.result.operation;
this.tabList = res.result.form;
//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.$route.query.sqywbm);
that.clxxTab = item;
}
});
//默认加载第一个选项卡的组件内容
this.getFromRouter(res.result.form[0].value);
// 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.$route.query.sqywbm);
// that.clxxTab = item;
// }
// });
// //默认加载第一个选项卡的组件内容
// this.getFromRouter(res.result.form[0].value);
}
});
},
......@@ -394,15 +395,34 @@ export default {
if (res.code === 200) {
this.unitData = res.result;
this.currentSelectProps = res.result[0];
this.unitClick(0);
}
});
},
//申请单元点击事件
unitClick (index) {
if (this.currentSelectProps.bsmSldy != this.unitData[index].bsmSldy) {
this.currentSelectProps = this.unitData[index];
this.fresh += 1;
}
this.currentSelectProps = this.unitData[index];
getStepFormInfo(this.unitData[index]).then((res) => {
if (res.code === 200) {
//获取单元对应的所有表单信息
this.tabList = res.result;
//默认加载第一个表单信息
this.tabName = res.result[0].value;
//处理分屏材料信息
let that = this;
this.tabList.forEach(function (item, index) {
if (item.value == "clxx") {
that.clxxIndex = index;
that.clxxForm = getForm(item.value, that.$route.query.sqywbm);
that.clxxTab = item;
}
});
}
});
// if (this.currentSelectProps.bsmSldy != this.unitData[index].bsmSldy) {
// this.currentSelectProps = this.unitData[index];
// this.fresh += 1;
// }
},
//表单选项卡事件
beforeLeave (activeName, oldActiveName) {
......