评估流程

This commit is contained in:
宋伟佳
2021-07-22 21:10:42 +08:00
parent 902e291fb1
commit 9507b5157a
5 changed files with 1058 additions and 116 deletions
@@ -124,45 +124,10 @@
{{ listForm.breakdownList[scope.$index].implementer == null ? "请选择落实人" : listForm.breakdownList[scope.$index].implementer
}}
</div>
<!-- <div @click="choiceZRR(scope,'implementer', '选择落实人', roleForm.implementer)">-->
<!-- {{ listForm.breakdownList[scope.$index].implementer == null ? "请选择落实人" : listForm.breakdownList[scope.$index].implementer-->
<!-- }}-->
<!-- </div>-->
</div>
</template>
</el-table-column>
</el-table>
<!-- 选择责任人-->
<!-- <el-drawer-->
<!-- :title="drawerTitle"-->
<!-- :visible.sync="modalshowflag"-->
<!-- :wrapperClosable="false"-->
<!-- size="800px">-->
<!-- <el-tree-->
<!-- v-if="modalshowflag"-->
<!-- style="height: 100%; overflow: auto;"-->
<!-- node-key="id"-->
<!-- class="filter-tree"-->
<!-- :data="treeData"-->
<!-- :props="defaultProps"-->
<!-- :default-checked-keys="nodeList"-->
<!-- highlight-current-->
<!-- check-strictly-->
<!-- @check="drawerCheck"-->
<!-- default-expand-all-->
<!-- :expand-on-click-node="false"-->
<!-- show-checkbox-->
<!-- ref="tree">-->
<!-- </el-tree>-->
<!-- <div id="roleFormButton" class="demo-drawer-footer">-->
<!-- <el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary"-->
<!-- @click="saveUserInfo">-->
<!-- 确定-->
<!-- </el-button>-->
<!-- <el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancleUserInfo">取消-->
<!-- </el-button>-->
<!-- </div>-->
<!-- </el-drawer>-->
<el-drawer
title="选择责任部门对接人"
:visible.sync="modalshowflag2"
@@ -1,5 +1,5 @@
<template>
<div class="xmpg-step2">
<div class="xmpg-step3">
<ProcessHeader toggle>
<template slot="proName">项目合规评估流程-项目</template>
<template slot="proNode">工程经理进行转办</template>
@@ -34,10 +34,18 @@
clearable
></el-input>
</el-form-item>
<el-form-item label="架构经理" prop="jgUser" class="add-form-item form-item-disabled">
<el-input
v-model="listForm.jgUser"
placeholder="请选择架构经理"
clearable
@click.native="choiceZRR(null,'jgUser', '选择质量工程师', roleForm.jgUser)"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<process-title style="margin-top:5px; margin-bottom: 5px">
<process-title>
<template slot="title">填写信息</template>
</process-title>
<el-table
@@ -46,6 +54,7 @@
ref="selection"
height="70%"
style="width: 100%; border:1px solid #ccc"
@selection-change="selectStandChange"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}">
<el-table-column
@@ -53,23 +62,26 @@
width="55"
align="center">
</el-table-column>
<el-table-column
prop="standId"
align="center"
label="标准编号"
>
</el-table-column>
<el-table-column
prop="standName"
align="center"
label="中文名称"
width="180px"
>
</el-table-column>
<el-table-column
prop="standEnName"
label="英文名称"
align="center"
width="180px"
>
</el-table-column>
<el-table-column
prop="ssrq"
width="190px"
align="center"
sortable
label="标准实施日期">
@@ -77,75 +89,14 @@
<span>{{ scope.row.ssrq ? $moment(scope.row.ssrq).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="xcxssrqgj"
width="190px"
align="center"
label="新车型实施日期">
<template slot-scope="scope">
<span>{{ scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="zccssrqgj"
align="center"
sortable
width="190px"
label="在产车实施日期">
<template slot-scope="scope">
<span>{{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="zrbm"
label="责任部门"
align="center"
width="180px"
>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppsbm"
width="180px"
align="center"
label="卡车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppscn"
width="180px"
align="center"
label="卡车vpps中文名称">
</el-table-column>
<el-table-column
prop="cycvppsbm"
width="180px"
align="center"
label="乘用车VPPS编码">
</el-table-column>
<el-table-column
prop="cycvppscn"
width="180px"
align="center"
label="乘用车vpps中文名称">
</el-table-column>
</el-table>
</div>
<div>
<el-collapse accordion>
<el-collapse-item title="意见填写">
<div style="margin: 10px 0;">
<el-input
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="commentText">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
</div>
</div>
<div class="content" v-show="active === '3'">
<div class="flow-list" style="height: 100%">
@@ -215,15 +166,22 @@
</div>
</div>
<ProcessFooter
show-back
show-save
show-submit
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:approval="true"
@back="beforeBack"
@save="handleSave"
@submit="handleSubmit"
>
</ProcessFooter>
<!-- 选择责任人-->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="modalshowflag"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
@@ -248,16 +206,34 @@ export default {
processType: 1,
isSubmit: false,
saveLoading: false,
showColumn: true,
drawerTitle: "", //drawer标题
modalshowflag: false, // drawer开关
selectList: [],
treeData: [], // 人员数据
roleForm: {
jgUser: ""
},
nodeList: [],
defaultProps: {
children: "children",
label: "name"
},
//表单的数据
listForm: {
projectNumber: "", //项目编号
projectName: "", //项目名称
jgUser: "", //架构经理
dataList: [], //项目下的标准数据
breakdownList: [] //标准下的分解单数据
},
dataList: [], //展示的标准数据
commentText: "", //审批意见
detailData: [] //流程历史数据
detailData: [], //流程历史数据
userId: this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId
};
},
methods: {
@@ -307,16 +283,71 @@ export default {
this.listForm.breakdownList = item.breakdownList;
});
},
//驳回事件
beforeBack() {
//保存事件
handleSave() {
},
//提交事件
handleSubmit() {
if (this.listForm.jgUser == null || this.listForm.jgUser == undefined ) {
this.$message.warning("请选择架构经理");
} else {
this.listForm.commentText = this.commentText;
const json = JSON.stringify(this.listForm);
console.log(json);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
}, e => {
});
}
},
choiceZRR(scope, type, title, id) {
if (scope != null) {
this.dsadadadsada = scope.$index;
}
this.nodeList = [];
this.nodeList.push(id);
this.type = type;
this.drawerTitle = title;
this.modalshowflag = true;
},
//标准表格选择框改变
selectStandChange(data) {
this.selectList = data;
},
getTree() {
this.$http.get("SarInstitution/institution/institutionAndUser", {}, {}, res => {
this.treeData = res.data;
});
},
drawerCheck(data) {
var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
if (getlist.length == 1) {
this.roleRow = getlist[0];
} else {
this.$refs.tree.setCheckedKeys([data.id]);
this.roleRow = this.$refs.tree.getCheckedNodes()[0];
}
},
checkedRole(data) {
if (this.type === "jgUser") {
this.listForm.jgUserId = data[0].id;
this.listForm.jgUser = data[0].name;
}
},
cancleUserInfo() {
this.modalshowflag = false;
}
},
computed: {
listNoDataText() {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
@@ -325,6 +356,7 @@ export default {
mounted() {
this.processTable();
this.getData();
this.getTree();
}
};
</script>
@@ -332,7 +364,7 @@ export default {
<style lang="less" scoped>
@import '~@/assets/styles/style';
.xmpg-step2 {
.xmpg-step3 {
/deep/ .el-drawer__container {
.prc-content-border {
border: none;
@@ -1,13 +1,464 @@
<template>
<div class="xmpg-step3">
<ProcessHeader toggle>
<template slot="proName">项目合规评估流程-项目</template>
<template slot="proNode">架构经理选择分发负责人</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content" v-show="active === '1'">
<div style="flex: auto; overflow: auto">
<process-title>
<template slot="title">基础信息</template>
</process-title>
<el-form
:model="listForm"
class="label-input-form prc-content-border"
label-width="150px"
>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="项目编号" prop="projectNumber" class="add-form-item form-item-disabled">
<el-input
v-model="listForm.projectNumber"
placeholder="请输入项目编号"
clearable
></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="projectName" class="add-form-item form-item-disabled">
<el-input
v-model="listForm.projectName"
placeholder="请输入项目名称"
clearable
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<process-title>
<template slot="title">填写信息</template>
</process-title>
<div class="tableTitle">
<div class="tableButton">
<el-button plain class="common-button-primary" size="mini" @click="batchOperation">批量分发负责人</el-button>
</div>
</div>
<el-table
:data="dataList"
border
ref="selection"
height="70%"
style="width: 100%; border:1px solid #ccc"
@selection-change="selectStandChange"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="standId"
align="center"
label="标准编号"
>
</el-table-column>
<el-table-column
prop="standName"
align="center"
label="中文名称"
>
</el-table-column>
<el-table-column
prop="standEnName"
label="英文名称"
align="center"
>
</el-table-column>
<el-table-column
prop="ssrq"
align="center"
sortable
label="标准实施日期">
<template slot-scope="scope">
<span>{{ scope.row.ssrq ? $moment(scope.row.ssrq).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="zrbm"
label="责任部门"
align="center"
>
</el-table-column>
<el-table-column label="分发责任人" prop="liablePeople" align="center">
<template slot-scope="scope">
<div v-if="scope.row.liablePeople == undefined">
{{ "请选择分发责任人" }}
</div>
<div v-else class="fileClass">
{{ scope.row.liablePeople || "-" }}
</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div class="content" v-show="active === '3'">
<div class="flow-list" style="height: 100%">
<el-table
height="100%"
ref="selection"
:data="detailData"
tooltip-effect="dark"
style="width: 100%"
border
row-key="id"
:no-data-text="listNoDataText"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="name"
label="任务步骤"
align="center"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
sortable="custom"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="endTime"
label="完成时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="comment"
label="审批意见"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.commentText }}</span>
</template>
</el-table-column>
<el-table-column
prop="completeFlag"
label="状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? "已完成" : "未完成" }}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="loading">流程列表加载中</loading>
</div>
</div>
<ProcessFooter
show-save
show-submit
:submitLoading="isSubmit"
:saveLoading="saveLoading"
@save="handleSave"
@submit="handleSubmit"
>
</ProcessFooter>
<!-- 选择责任人-->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="modalshowflag"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
import { inboundLiaisonDetail, queryDetail } from "api/process";
export default {
name: "xmpg2Step4"
name: "xmpg2Step4",
components: {
ProcessTitle,
ProcessHeader,
ProcessFooter
},
data() {
return {
active: "1",
loading: false,
// 当前流程类型(1待办/2已办)
processType: 1,
isSubmit: false,
saveLoading: false,
showColumn: true,
drawerTitle: "", //drawer标题
modalshowflag: false, // drawer开关
selectList: [],
treeData: [], // 人员数据
roleForm: {
liablePeople: ""
},
peopleFlag: true,
nodeList: [],
defaultProps: {
children: "children",
label: "name"
},
//表单的数据
listForm: {
projectNumber: "", //项目编号
projectName: "", //项目名称
dataList: [], //项目下的标准数据
breakdownList: [] //标准下的分解单数据
},
dataList: [], //展示的标准数据
commentText: "", //审批意见
detailData: [], //流程历史数据
userId: this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
};
},
methods: {
processTable() {
this.$http.get("lawss/activiti/get_list_by_instance", {
prcNum: this.$route.query.prcNum,
sortWord: this.shunxu ? this.paixu : "",
shunxu: this.shunxu
}, {
loading: "loading",
_this: this
}, res => {
this.detailData = res;
}, e => {
});
},
//tab改变
handleTabs(type) {
this.active = type;
},
//获取数据
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
console.log(res.mesg);
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
}
}).catch(e => {
});
});
},
//动态表单读取
getFormFieldList(item) {
this.$nextTick(() => {
this.listForm = JSON.parse(JSON.stringify(item));
this.listForm.prcNum = this.prcNum;
this.listForm.prcName = this.prcName;
this.listForm["id"] = item.id;
this.listForm.dataList = item.dataList;
this.dataList = item.dataList;
this.dataList.distributePerson = item.dataList[0].distributePerson;
this.listForm.breakdownList = item.breakdownList;
});
},
//保存事件
handleSave() {
},
//提交事件
handleSubmit() {
this.listForm.dataList.forEach(item => {
if(item.liablePeople !== undefined){
this.peopleFlag = true
}else{
this.peopleFlag = false
}
})
if(this.peopleFlag === true){
this.listForm.commentText = this.commentText;
const json = JSON.stringify(this.listForm);
console.log(json);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
}, e => {
});
}else{
this.$message.warning('请选择分发负责人')
}
},
//批量操作按钮
batchOperation(id) {
if (this.selectList.length === 0) {
this.$message.warning("请至少选择一条数据进行批量分发");
} else {
this.nodeList = [];
this.nodeList.push(id);
this.modalshowflag = true;
}
},
//标准表格选择框改变
selectStandChange(data) {
this.selectList = data;
},
getTree() {
this.$http.get("SarInstitution/institution/institutionAndUser", {}, {}, res => {
this.treeData = res.data;
});
},
drawerCheck(data) {
var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
if (getlist.length == 1) {
this.roleRow = getlist[0];
} else {
this.$refs.tree.setCheckedKeys([data.id]);
this.roleRow = this.$refs.tree.getCheckedNodes()[0];
}
},
checkedRole(data) {
// 选取负责人时的操作
let mis = [];
this.selectList.forEach(item => {
item.liablePeople = data[0].name;
item.liablePeopleId = data[0].id;
mis.push(item.standId);
});
this.dataList.forEach(item => {
if (!mis.includes(item.standId)) {
this.selectList.push(item);
}
});
this.dataList = this.selectList;
this.$refs.selection.clearSelection();
this.modalshowflag = false;
},
cancleUserInfo() {
this.modalshowflag = false;
}
},
computed: {
listNoDataText() {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
}
},
mounted() {
this.processTable();
this.getData();
this.getTree();
}
};
</script>
<style scoped>
<style lang="less" scoped>
@import '~@/assets/styles/style';
.xmpg-step3 {
/deep/ .el-drawer__container {
.prc-content-border {
border: none;
padding: 0 20px 0;
}
}
.choiceBtn {
.el-button--primary {
width: 150px;
}
}
position: relative;
height: 100%;
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
.tableTitle {
margin-bottom: 10px;
height: 30px;
line-height: 30px;
position: relative;
font-size: 13px;
font-weight: bold;
.tableButton {
position: absolute;
right: 0;
top: 0;
}
.accessStandardsAndRegulations {
height: 100%;
}
}
}
.demo-drawer-content {
margin-top: 10px;
}
}
</style>
@@ -1,13 +1,463 @@
<template>
<div class="xmpg-step3">
<ProcessHeader toggle>
<template slot="proName">项目合规评估流程-项目</template>
<template slot="proNode">选择分发责任人</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content" v-show="active === '1'">
<div style="flex: auto; overflow: auto">
<process-title>
<template slot="title">基础信息</template>
</process-title>
<el-form
:model="listForm"
class="label-input-form prc-content-border"
label-width="150px"
>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="项目编号" prop="projectNumber" class="add-form-item form-item-disabled">
<el-input
v-model="listForm.projectNumber"
placeholder="请输入项目编号"
clearable
></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="projectName" class="add-form-item form-item-disabled">
<el-input
v-model="listForm.projectName"
placeholder="请输入项目名称"
clearable
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<process-title>
<template slot="title">填写信息</template>
</process-title>
<div class="tableTitle">
<div class="tableButton">
<el-button plain class="common-button-primary" size="mini" @click="batchOperation">批量分发责任人</el-button>
</div>
</div>
<el-table
:data="dataList"
style="width: 100%"
row-key= "id"
height="70%"
border
lazy
:load="load"
@selection-change="selectStandChange"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="standId"
label="标准编号"
>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称"
>
</el-table-column>
<el-table-column label="责任人" prop="liablePeople" align="center">
<template slot-scope="scope">
<div v-if="scope.row.liablePeople == undefined">
{{ "请选择责任人" }}
</div>
<div v-else class="fileClass">
{{ scope.row.liablePeople || "-" }}
</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div class="content" v-show="active === '3'">
<div class="flow-list" style="height: 100%">
<el-table
height="100%"
ref="selection"
:data="detailData"
tooltip-effect="dark"
style="width: 100%"
border
row-key="id"
:no-data-text="listNoDataText"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="name"
label="任务步骤"
align="center"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
sortable="custom"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="endTime"
label="完成时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="comment"
label="审批意见"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.commentText }}</span>
</template>
</el-table-column>
<el-table-column
prop="completeFlag"
label="状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? "已完成" : "未完成" }}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="loading">流程列表加载中</loading>
</div>
</div>
<ProcessFooter
show-save
show-submit
:submitLoading="isSubmit"
:saveLoading="saveLoading"
@save="handleSave"
@submit="handleSubmit"
>
</ProcessFooter>
<!-- 选择责任人-->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="modalshowflag"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
import { inboundLiaisonDetail, queryDetail } from "api/process";
export default {
name: "xmpg2Step5"
name: "xmpg2Step5",
components: {
ProcessTitle,
ProcessHeader,
ProcessFooter
},
data() {
return {
hasChildren: true,
active: "1",
loading: false,
// 当前流程类型(1待办/2已办)
processType: 1,
isSubmit: false,
saveLoading: false,
showColumn: true,
drawerTitle: "", //drawer标题
modalshowflag: false, // drawer开关
selectList: [],
treeData: [], // 人员数据
roleForm: {
liablePeople: ""
},
peopleFlag: true,
nodeList: [],
defaultProps: {
children: "children",
label: "name"
},
//表单的数据
listForm: {
projectNumber: "", //项目编号
projectName: "", //项目名称
dataList: [], //项目下的标准数据
children: [], //标准下的分解单数据
},
dataList: [], //展示的标准数据
commentText: "", //审批意见
detailData: [], //流程历史数据
userId: this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId
};
},
methods: {
load(tree, treeNode, resolve) {
setTimeout(() => {
resolve(
this.listForm.children
)
}, 1000)
},
processTable() {
this.$http.get("lawss/activiti/get_list_by_instance", {
prcNum: this.$route.query.prcNum,
sortWord: this.shunxu ? this.paixu : "",
shunxu: this.shunxu
}, {
loading: "loading",
_this: this
}, res => {
this.detailData = res;
}, e => {
});
},
//tab改变
handleTabs(type) {
this.active = type;
},
//获取数据
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
console.log(res.mesg);
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
}
}).catch(e => {
});
});
},
//动态表单读取
getFormFieldList(item) {
this.$nextTick(() => {
this.listForm = JSON.parse(JSON.stringify(item));
item.dataList.forEach(item => {
item.hasChildren = true
})
this.listForm.prcNum = this.prcNum;
this.listForm.prcName = this.prcName;
this.listForm["id"] = item.id;
this.listForm.dataList = item.dataList;
this.dataList = item.dataList;
this.dataList.distributePerson = item.dataList[0].distributePerson;
this.listForm.breakdownList = item.breakdownList;
this.listForm.children = item.breakdownList;
let children = []
item.breakdownList.forEach(
item=>{
let aa = {
id:item.id,
standId:'条款号: '+ item.itemsNum,
standName:'条款名称: '+ item.itemsName,
}
children.push(aa)
}
)
this.listForm.children = children;
});
},
//保存事件
handleSave() {
},
//提交事件
handleSubmit() {
this.listForm.dataList.forEach(item => {
if (item.liablePeople !== undefined) {
this.listForm.commentText = this.commentText;
const json = JSON.stringify(this.listForm);
console.log(json);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
}, e => {
});
} else {
this.$message.warning("请选择分发负责人");
}
});
},
//批量操作按钮
batchOperation(id) {
console.log(this.selectList);
if (this.selectList.length === 0) {
this.$message.warning("请至少选择一条数据进行批量分发");
} else {
this.nodeList = [];
this.nodeList.push(id);
this.modalshowflag = true;
}
},
//标准表格选择框改变
selectStandChange(data) {
this.selectList = data;
},
getTree() {
this.$http.get("SarInstitution/institution/institutionAndUser", {}, {}, res => {
this.treeData = res.data;
});
},
drawerCheck(data) {
var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
if (getlist.length == 1) {
this.roleRow = getlist[0];
} else {
this.$refs.tree.setCheckedKeys([data.id]);
this.roleRow = this.$refs.tree.getCheckedNodes()[0];
}
},
checkedRole(data) {
// 选取负责人时的操作
let mis = [];
this.selectList.forEach(item => {
item.liablePeople = data[0].name;
item.liablePeopleId = data[0].id;
mis.push(item.standId);
});
this.dataList.forEach(item => {
if (!mis.includes(item.standId)) {
this.selectList.push(item);
}
});
this.dataList = this.selectList;
this.$refs.selection.clearSelection();
this.modalshowflag = false;
},
cancleUserInfo() {
this.modalshowflag = false;
}
},
computed: {
listNoDataText() {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
}
},
mounted() {
this.processTable();
this.getData();
this.getTree();
}
};
</script>
<style scoped>
<style lang="less" scoped>
@import '~@/assets/styles/style';
.xmpg-step3 {
/deep/ .el-drawer__container {
.prc-content-border {
border: none;
padding: 0 20px 0;
}
}
.choiceBtn {
.el-button--primary {
width: 150px;
}
}
position: relative;
height: 100%;
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
.tableTitle {
margin-bottom: 10px;
height: 30px;
line-height: 30px;
position: relative;
font-size: 13px;
font-weight: bold;
.tableButton {
position: absolute;
right: 0;
top: 0;
}
.accessStandardsAndRegulations {
height: 100%;
}
}
}
.demo-drawer-content {
margin-top: 10px;
}
}
</style>
@@ -556,6 +556,50 @@ export default {
prcType: row.prcType
}
})
}else if(row.taskInfo === '工程经理转办'){
this.$router.push({
name: 'xmpg2Step3',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
} else if(row.taskInfo === '架构经理任务分发') {
this.$router.push({
name: 'xmpg2Step4',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
} else if(row.taskInfo === '分发责任人下发') {
this.$router.push({
name: 'xmpg2Step5',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
} else if(row.taskInfo === '合规性评估') {
this.$router.push({
name: 'xmpg2Step6',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}
break
//未符合项整改流程