Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yanyizhou
2021-11-29 21:01:25 +08:00
@@ -5,36 +5,22 @@
<template slot="proNode">选择分发责任人</template> <template slot="proNode">选择分发责任人</template>
</ProcessHeader> </ProcessHeader>
<div class="headerTabs"> <div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div> <div :class="active === '1' ? 'active' : ''" class="headerTabsItem" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div> <div :class="active === '3' ? 'active' : ''" class="headerTabsItem" @click="handleTabs('3')">审批历史</div>
</div> </div>
<div class="content" v-show="active === '1'"> <div v-show="active === '1'" class="content">
<div style="flex: auto; overflow: auto"> <div style="flex: auto; overflow: auto">
<process-title> <process-title>
<template slot="title">基础信息</template> <template slot="title">基础信息</template>
</process-title> </process-title>
<el-form <el-form :model="listForm" class="label-input-form prc-content-border" label-width="150px">
:model="listForm"
class="label-input-form prc-content-border"
label-width="150px"
>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="项目编号" prop="projectNumber" class="add-form-item form-item-disabled"> <el-form-item class="add-form-item form-item-disabled" label="项目编号" prop="projectNumber">
<el-input <el-input v-model="listForm.projectNumber" clearable disabled placeholder="请输入项目编号"></el-input>
v-model="listForm.projectNumber"
placeholder="请输入项目编号"
disabled
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="项目名称" prop="projectName" class="add-form-item form-item-disabled"> <el-form-item class="add-form-item form-item-disabled" label="项目名称" prop="projectName">
<el-input <el-input v-model="listForm.projectName" clearable disabled placeholder="请输入项目名称"></el-input>
v-model="listForm.projectName"
placeholder="请输入项目名称"
disabled
clearable
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -42,75 +28,53 @@
<process-title> <process-title>
<template slot="title">填写信息</template> <template slot="title">填写信息</template>
</process-title> </process-title>
<!-- <div class="tableTitle">--> <div class="tableTitle">
<!-- <div class="tableButton">--> <div class="tableButton">
<!-- <el-button plain class="common-button-primary" size="mini" @click="choiceZRRS('', 2, '')">批量分发责任人--> <el-button class="common-button-primary" plain size="mini" @click="choiceZRRS('', 2, '')">批量分发责任人
<!-- </el-button>--> </el-button>
<!-- </div>--> </div>
<!-- </div>--> </div>
<el-table <el-table v-if="refreshTable" ref="myTable" :data="dataList" :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
:data="dataList" fontWeight: 'bold', height: '48px'}" border height="70%"
style="width: 100%" row-key="standId" style="width: 100%" @select="select" @select-all="selectAll"
row-key="standId" @selection-change="selectStandChange">
<el-table-column align="center" type="selection" width="55">
v-if="refreshTable"
height="70%"
border
ref="myTable"
@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>
<el-table-column <el-table-column label="标准号" prop="standNumber">
prop="standNumber"
label="标准号"
>
<template slot-scope="scope"> <template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump" <a v-if="scope.row.standYear" class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber @click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber
}}-{{ scope.row.standYear }}</a> }}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSort }} <a v-else class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSort }}
{{ scope.row.standNumber }}</a> {{ scope.row.standNumber }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="标准名称" prop="standName">
prop="standName"
label="标准名称"
>
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a> <a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="条款号" prop="itemsNum">
prop="itemsNum"
label="条款号"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="条款名称" prop="itemsName">
prop="itemsName"
label="条款名称"
>
</el-table-column> </el-table-column>
<el-table-column label="责任人" prop="workPeople" align="center"> <el-table-column align="center" label="责任人" prop="workPeople">
<template slot-scope="scope" > <template slot-scope="scope">
<div v-if="selectList.length<=1"> <div v-if="selectList.length<=1">
<el-input v-if="scope.row.workPeople" v-model="scope.row.workPeopleId" style="display: none;" readonly/> <el-input v-if="scope.row.workPeople" v-model="scope.row.workPeopleId" readonly
style="display: none;" />
<el-input v-if="scope.row.workPeople" v-model="scope.row.workPeople" placeholder="请选择分发责任人" <el-input v-if="scope.row.workPeople" v-model="scope.row.workPeople" placeholder="请选择分发责任人"
@click.native="choiceZRRS(scope.row, 1, scope.$index)" readonly/> readonly @click.native="choiceZRRS(scope.row, 1, scope.$index)" />
</div> </div>
<div v-else> <div v-else>
<el-input v-if="scope.row.workPeople" v-model="scope.row.workPeopleId" style="display: none;" readonly/> <el-input v-if="scope.row.workPeople" v-model="scope.row.workPeopleId" readonly
style="display: none;" />
<el-input v-if="scope.row.workPeople" v-model="scope.row.workPeople" placeholder="请选择分发责任人" <el-input v-if="scope.row.workPeople" v-model="scope.row.workPeople" placeholder="请选择分发责任人"
@click.native="choiceZRRS('', 2, '')" readonly/> readonly @click.native="choiceZRRS('', 2, '')" />
</div> </div>
<el-button style="width: 98%" :loading="buttonLoading" v-if="!scope.row.workPeople" size="small" type="primary" @click="choiceZRRS(scope.row, 3, '')">{{ "批量分发该标准下的责任人" }}</el-button> <!-- <el-button style="width: 98%" :loading="buttonLoading" v-if="!scope.row.workPeople" size="small" type="primary" @click="choiceZRRS(scope.row, 3, '')">{{ "批量分发该标准下的责任人" }}</el-button>-->
</template> </template>
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <div :class="{'fileClass': !scope.row.workPeople}">--> <!-- <div :class="{'fileClass': !scope.row.workPeople}">-->
@@ -124,77 +88,41 @@
<el-collapse accordion> <el-collapse accordion>
<el-collapse-item title="回执说明"> <el-collapse-item title="回执说明">
<div style="margin: 10px 0;"> <div style="margin: 10px 0;">
<el-input <el-input v-model="commentText" :rows="3" placeholder="请输入意见" resize="none" type="textarea">
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="commentText">
</el-input> </el-input>
</div> </div>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
</div> </div>
<div class="content" v-show="active === '3'"> <div v-show="active === '3'" class="content">
<div class="flow-list" style="height: 100%"> <div class="flow-list" style="height: 100%">
<el-table <el-table ref="selection" :data="detailData" :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
height="100%" :no-data-text="listNoDataText" border height="100%"
ref="selection" row-key="id" style="width: 100%"
:data="detailData" tooltip-effect="dark">
tooltip-effect="dark" <el-table-column align="center" type="selection" width="55">
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>
<el-table-column <el-table-column align="center" label="任务步骤" prop="name">
prop="name"
label="任务步骤"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column align="center" label="任务受理人" prop="assignee">
prop="assignee"
label="任务受理人"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column align="center" label="创建时间" prop="createTime" sortable="custom">
prop="createTime"
label="创建时间"
sortable="custom"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD") : "" }}</span> <span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD") : "" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column align="center" label="完成时间" prop="endTime">
prop="endTime"
label="完成时间"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format("YYYY-MM-DD") : "" }}</span> <span>{{ scope.row.endTime ? $moment(scope.row.endTime).format("YYYY-MM-DD") : "" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column align="center" label="流程信息" prop="comment">
prop="comment"
label="流程信息"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.commentText }}</span> <span>{{ scope.row.commentText }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column align="center" label="状态" prop="completeFlag">
prop="completeFlag"
label="状态"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.endTime ? "已完成" : "未完成" }}</span> <span>{{ scope.row.endTime ? "已完成" : "未完成" }}</span>
</template> </template>
@@ -203,34 +131,16 @@
<loading :loading="loading">流程列表加载中</loading> <loading :loading="loading">流程列表加载中</loading>
</div> </div>
</div> </div>
<ProcessFooter <ProcessFooter :saveLoading="saveLoading" :submitLoading="isSubmit" :transfer-loading="isTransfer" show-save
show-save show-submit
show-submit show-transfer @save="handleSave" @submit="handleSubmit" @transfer="handleTransfer">
show-transfer
:submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading"
@save="handleSave"
@transfer="handleTransfer"
@submit="handleSubmit"
>
</ProcessFooter> </ProcessFooter>
<!-- 福田全公司选人解决方案 --> <!-- 福田全公司选人解决方案 -->
<Role-tree <Role-tree :is-title="drawerTitle" :is-visible.sync="drawerModal" :nodeList="nodeList" check-box
check-box @checkedRole="checkedTransferRole"></Role-tree>
:is-title="drawerTitle"
:is-visible.sync="drawerModal"
@checkedRole="checkedTransferRole"
:nodeList="nodeList"
></Role-tree>
<!-- 选择责任人--> <!-- 选择责任人-->
<Role-tree <Role-tree :is-visible.sync="modalshowflag" :nodeList="nodeList" is-title="选择责任人"
check-box @checkedRole="checkedRole"></Role-tree>
is-title="选择责任人"
:is-visible.sync="modalshowflag"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div> </div>
</template> </template>
@@ -238,7 +148,7 @@
import ProcessHeader from "../../components/ProcessHeader"; import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter"; import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle"; import ProcessTitle from "../../components/ProcessTitle";
import { inboundLiaisonDetail, saveTaskForPub ,changeAssigneeNew } from "api/process"; import { changeAssigneeNew, inboundLiaisonDetail, saveTaskForPub } from "api/process";
export default { export default {
name: "xmpg2Step5", name: "xmpg2Step5",
@@ -252,7 +162,7 @@ export default {
isTransfer: false, isTransfer: false,
// 调整处理人抽屉状态 // 调整处理人抽屉状态
drawerModal: false, drawerModal: false,
workPeopleList:[], workPeopleList: [],
//防止按钮点击过快的按钮loading //防止按钮点击过快的按钮loading
buttonLoading: false, buttonLoading: false,
//刷新表格 //刷新表格
@@ -282,8 +192,8 @@ export default {
}, },
//表单的数据 //表单的数据
listForm: { listForm: {
projectNumber: "", //项目编号 projectNumber: "", //项目编号
projectName: "", //项目名称 projectName: "", //项目名称
dataList: [], //项目下的标准数据 dataList: [], //项目下的标准数据
children: [] //标准下的分解单数据 children: [] //标准下的分解单数据
}, },
@@ -298,45 +208,45 @@ export default {
}, },
methods: { methods: {
//确认转办 //确认转办
checkedTransferRole (data) { checkedTransferRole(data) {
this.assigneeNewLoading = true this.assigneeNewLoading = true;
changeAssigneeNew({ changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人 assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人 userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例 pId: this.$route.query.prcId // 流程实例
}).then(res => { }).then(res => {
this.isTransfer = false this.isTransfer = false;
if (res.success) { if (res.success) {
this.drawerModal = false this.drawerModal = false;
this.$message.success('调整成功') this.$message.success("调整成功");
this.$router.push("/processCenter"); this.$router.push("/processCenter");
this.processNum() this.processNum();
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message);
} }
}) });
}, },
// 请求转换流程图 // 请求转换流程图
processNum (row) { processNum(row) {
axios.request({ axios.request({
url: '/api/lawss/activiti/getImg?_t=' + new Date().getTime(), url: "/api/lawss/activiti/getImg?_t=" + new Date().getTime(),
responseType: 'blob', responseType: "blob",
method: 'get', method: "get",
params: { params: {
prcNum: this.$route.query.prcNum prcNum: this.$route.query.prcNum
} }
}).then(res => { }).then(res => {
// let blob = new Blob([res.data], {type: 'image/jpg'}) // let blob = new Blob([res.data], {type: 'image/jpg'})
// let url = window.URL.createObjectURL(res.data) // let url = window.URL.createObjectURL(res.data)
this.processStep = window.URL.createObjectURL(res.data) this.processStep = window.URL.createObjectURL(res.data);
}) });
}, },
//转办事件 //转办事件
handleTransfer(){ handleTransfer() {
this.drawerModal = true this.drawerModal = true;
this.drawerTitle = '转办处理人' this.drawerTitle = "转办处理人";
this.selectPeople = row this.selectPeople = row;
}, },
// 点击查看 // 点击查看
handlePreview(item) { handlePreview(item) {
@@ -407,6 +317,7 @@ export default {
}, },
//动态表单读取 //动态表单读取
getFormFieldList(item) { getFormFieldList(item) {
console.log(item);
this.$nextTick(() => { this.$nextTick(() => {
this.listForm = JSON.parse(JSON.stringify(item)); this.listForm = JSON.parse(JSON.stringify(item));
if (item.form === undefined) { if (item.form === undefined) {
@@ -444,9 +355,18 @@ export default {
} }
}); });
this.listForm.children = children; this.listForm.children = children;
this.dataList.forEach(item => {
this.$set(item, "workPeople", "请选择责任人");
});
console.log(this.dataList);
} else { } else {
this.listForm = item.form; this.listForm = item.form;
this.dataList = item.form.dataList; this.dataList = item.form.dataList;
this.dataList.forEach(item => {
this.$set(item, "workPeople", "请选择责任人");
this.$set(item, "workPeopleId", "");
});
console.log(this.dataList);
} }
}); });
}, },
@@ -471,19 +391,21 @@ export default {
}, },
//提交事件 //提交事件
handleSubmit() { handleSubmit() {
let dataChildren = [] let dataChildren = [];
let dataListChildren = [] let dataListChildren = [];
this.dataList.forEach(item => { this.dataList.forEach(item => {
dataChildren.push(item.children) dataChildren.push(item.children);
}) });
dataChildren.forEach((item,index) => { dataChildren.forEach((item, index) => {
dataListChildren = dataListChildren.concat(item) dataListChildren = dataListChildren.concat(item);
}) });
this.isSubmit = true; this.isSubmit = true;
this.listForm.commentText = this.commentText; this.listForm.commentText = this.commentText;
this.listForm.children = dataListChildren this.listForm.children = dataListChildren;
this.listForm.dataList = this.dataList this.listForm.dataList = this.dataList;
const json = JSON.stringify(this.listForm); const json = JSON.stringify(this.listForm);
console.log(json);
return;
this.$http.post("lawss/activiti/completeTask", { this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds, taskIds: this.taskIds,
userId: this.userId, userId: this.userId,
@@ -501,7 +423,8 @@ export default {
}, },
//批量分发按钮 //批量分发按钮
choiceZRRS(row, type, index) { choiceZRRS(row, type, index) {
this.selectedId = row.id; console.log(row);
this.selectedId = row.id || row.standId;
this.type = type; this.type = type;
if (type === 1) { if (type === 1) {
this.drawerTitle = "选择责任人"; this.drawerTitle = "选择责任人";
@@ -522,24 +445,86 @@ export default {
} }
} }
//批量分发某标准下的责任人 //批量分发某标准下的责任人
else if (type === 3){ else if (type === 3) {
//弹出选人框 //弹出选人框
// if (this.tableExpand === false){ // if (this.tableExpand === false){
this.modalshowflag = true; this.modalshowflag = true;
this.drawerTitle = "批量选择责任人"; this.drawerTitle = "批量选择责任人";
// } // }
//展开表格 //展开表格
this.workPeopleList = row this.workPeopleList = row;
// console.log('279',row.children) // console.log('279',row.children)
this.refreshTable = false this.refreshTable = false;
// this.tableExpand = !this.tableExpand // this.tableExpand = !this.tableExpand
this.$nextTick(() => { this.$nextTick(() => {
this.refreshTable = true this.refreshTable = true;
}); });
} }
}, },
setChildren(children, type) {
// 编辑多个子层级
children.map(j => {
this.toggleSelection(j, type);
if (j.children) {
this.setChildren(j.children, type);
}
});
},
// 选中父节点时,子节点一起选中取消
select(selection, row) {
const hasSelect = selection.some(el => {
return row.id === el.id;
});
if (hasSelect) {
if (row.children) {
// 解决子组件没有被勾选到
this.setChildren(row.children, true);
}
} else {
if (row.children) {
this.setChildren(row.children, false);
}
}
},
toggleSelection(row, select) {
if (row) {
this.$nextTick(() => {
this.$refs.myTable &&
this.$refs.myTable.toggleRowSelection(row, select);
});
}
},
// 选择全部
selectAll(selection) {
// dataList第一层只要有在selection里面就是全选
const isSelect = selection.some(el => {
const dataListIds = this.dataList.map(j => j.id);
return dataListIds.includes(el.id);
});
// dataList第一层只要有不在selection里面就是全不选
const isCancel = !this.dataList.every(el => {
const selectIds = selection.map(j => j.id);
return selectIds.includes(el.id);
});
if (isSelect) {
selection.map(el => {
if (el.children) {
// 解决子组件没有被勾选到
this.setChildren(el.children, true);
}
});
}
if (isCancel) {
this.dataList.map(el => {
if (el.children) {
// 解决子组件没有被勾选到
this.setChildren(el.children, false);
}
});
}
},
//标准表格选择框改变 //标准表格选择框改变
selectStandChange(data) { selectStandChange(data) {
this.selectList = data; this.selectList = data;
@@ -559,14 +544,28 @@ export default {
} }
}, },
checkedRole(data) { checkedRole(data) {
var idList = "";
var nameList = "";
data.forEach(item => {
if (nameList.length > 0) {
nameList += ",";
idList += ",";
}
idList += item.id;
nameList += item.name;
});
//单选操作 //单选操作
if (this.type === 1) { if (this.type === 1) {
this.dataList.forEach(item => { this.dataList.forEach(item => {
if(item.standId === this.selectedId){
item.workPeople = nameList;
item.workPeopleId = idList;
}
if (item.children) { if (item.children) {
item.children.forEach(items => { item.children.forEach(items => {
if (items.id === this.selectedId) { if (items.id === this.selectedId) {
items.workPeople = data[0].name; items.workPeople = nameList;
items.workPeopleId = data[0].id; items.workPeopleId = idList;
// this.$set(items,'workPeople',data[0].name) // this.$set(items,'workPeople',data[0].name)
//this.$set(items,'workPeopleId',data[0].id) //this.$set(items,'workPeopleId',data[0].id)
} }
@@ -577,37 +576,37 @@ export default {
} else if (this.type === 2) { } else if (this.type === 2) {
this.selectList.forEach(item => { this.selectList.forEach(item => {
this.dataList.map(items => { this.dataList.map(items => {
if (item.id === items.id) { if (item.standId === items.standId) {
items.workPeople = ""; items.workPeople = nameList;
items.workPeopleId = ""; items.workPeopleId = idList;
this.$message.warning('您只能针对条款进行分发') // this.$message.warning('您只能针对条款进行分发')
} }
if (items.children.length) { if (items.children) {
items.children.map(childrenItem => { items.children.map(childrenItem => {
if (childrenItem.id === item.id) { if (childrenItem.id === item.id) {
childrenItem.workPeople = data[0].name; childrenItem.workPeople = nameList;
childrenItem.workPeopleId = data[0].id; childrenItem.workPeopleId = idList;
} }
}); });
} }
}); });
}); });
this.dataList = JSON.parse(JSON.stringify(this.dataList)); this.dataList = JSON.parse(JSON.stringify(this.dataList));
}else if (this.type === 3){ } else if (this.type === 3) {
// console.log("529",this.workPeopleList) // console.log("529",this.workPeopleList)
for (let i=0;i<this.workPeopleList.children.length;i++){ for (let i = 0; i < this.workPeopleList.children.length; i++) {
this.workPeopleList.children[i].workPeople = data[0].name this.workPeopleList.children[i].workPeople = data[0].name;
this.workPeopleList.children[i].workPeopleId = data[0].id this.workPeopleList.children[i].workPeopleId = data[0].id;
// console.log(row.children[i].id) // console.log(row.children[i].id)
// console.log(row.children[i].workPeople) // console.log(row.children[i].workPeople)
} }
// items.children.map(childrenItem => { // items.children.map(childrenItem => {
// //
// childrenItem.workPeople = data[0].name; // childrenItem.workPeople = data[0].name;
// childrenItem.workPeopleId = data[0].id; // childrenItem.workPeopleId = data[0].id;
// }) // })
} }
this.modalshowflag = false; this.modalshowflag = false;
@@ -704,4 +703,3 @@ export default {
} }
} }
</style> </style>