添加汇总页面(未符合项整改)

This commit is contained in:
zyn
2022-12-14 17:51:52 +08:00
parent d23dfd73b7
commit 8f7ed7ea1c
5 changed files with 589 additions and 3 deletions
@@ -436,7 +436,7 @@
},
getData() {
this.$http.get("lawss/activiti/queryTaskIndex", {
bpnId:this.$route.query.bpnId,
prcId:this.$route.query.processInstanceId,
index:this.$route.query.index
}, {
_this: this
@@ -0,0 +1,575 @@
<template>
<div class="wfhxzgStep3">
<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;">
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<div class="content-center">
<el-button
style="text-align: end"
class="common-button-default"
size="small"
type="primary"
@click="dutyPeopleList">
批量选择负责人
</el-button>
</div>
<el-table
:data="dataList"
border
ref="multipleTable"
@selection-change="handleSelectionMore"
height="80%"
style="width: 100%"
: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 prop="standSerialNumber" width="100" show-overflow-tooltip label="标准号" align="center">
<template slot-scope="scope">
<a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSerialNumber }}</a>
</template>
</el-table-column>
<el-table-column prop="standName" width="250" align="center" show-overflow-tooltip label="标准名称">
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column prop="productName" width="250" label="项目名称" align="center" show-overflow-tooltip/>
<el-table-column prop="itemsNum" label="条款号" align="center"/>
<el-table-column prop="itemsName" width="200" label="条款名称" align="center"/>
<el-table-column prop="planCloseTime" width="120" label="整改完成时间" align="center">
<template slot-scope="scope">
<span>{{ scope.row.planCloseTime ? $moment(scope.row.planCloseTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column prop="responsibleUnit" width="150" label="责任部门" align="center"/>
<el-table-column prop="dutyEngineerName" width="150" label="责任工程师" align="center"/>
<el-table-column label="选择责任人" prop="dutyPeople" width="200" align="center">
<template slot-scope="scope">
<div style="display: inline;">
<el-input
class="input-button"
style="width: 60%"
@click.native="selectPeople(scope.row)"
v-model="scope.row.dutyPeople"
size="mini"
placeholder="请选择责任人"
/>
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-collapse accordion>
<el-collapse-item title="审批意见">
<div style="margin: 10px 0;">
<el-input
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="textarea">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
</div>
<div class="content" v-show="active === '3'">
<div class="flow-list">
<el-table
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="创建时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") : "" }}</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 HH:mm:ss") : "" }}</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
show-transfer
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:transferLoading="turnLoading"
@transfer="handleTurnTo"
@back="handleSubmitNo"
@save="handleSave"
@submit="handleSubmit"
>
</ProcessFooter>
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="modalshowflag"
:nodeList="nodeList"
@checkedRole="drawerCheck"
/>
</div>
</template>
<script>
import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import {changeAssigneeNew, completeTask, inboundLiaisonDetail, saveTaskForPub} from "@/api/process.js";
export default {
name: "wfhxzgStep3",
data() {
return {
disabled:!!this.$route.query.disabledXX,
activeNames:'1',
passInfo: 0,
detailData: [],
loading: false,
textarea: '', // 意见
title: '', // 新增编辑抽屉标题
ListModel: false, // 新增编辑抽屉开关
nonSearch: {
standId: '', // 标准号/名称
productName: '', // 项目名称
responsibleUnit: '' // 责任部门
},
active: '1', // 默认显示
isSubmit: false,
saveLoading: false,
turnLoading: false,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
userId: this.$route.query.taskAssignee,
dataList: [],
newDataList: {},
// 批量选择负责人table数组
selectTableMore: [],
// 责任部门
zNodesSItem: [],
nodeList: [],
drawerTitle: '', //drawer标题
modalshowflag: false, // drawer开关
treeData: [], // 人员数据
defaultProps: {
children: 'children',
label: 'name'
},
}
},
components: {
ProcessHeader,
ProcessFooter,
ProcessTitle
},
created() {
this.processTable()
this.getData()
},
computed: {
listNoDataText() {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
}
},
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 => {
});
},
getData() {
const params = {
taskIds: this.taskIds,
pId: this.pId,
}
inboundLiaisonDetail(params).then(res => {
const processForm = JSON.parse(res.mesg)
this.getFormFieldList(processForm)
})
},
getFormFieldList (item) {
console.log(item)
this.$nextTick(() => {
if (item.passInfo !== 0) {
this.passInfo = JSON.parse(JSON.stringify(item)).passInfo
let fileData = JSON.parse(JSON.stringify(item)).dockUserList
this.dataList = fileData[0].standardInfoList
fileData.forEach( filedata => {
// console.log(filedata)
if (filedata.id === this.userId){
this.dataList = filedata.standardInfoList
}
})
this.standardInfoList = this.dataList
this.textarea = JSON.parse(JSON.stringify(item)).textarea
/* 注释掉的代码 是因为后端已经分配过数据 前端不需要再做处理*/
// for (let i = 0; i<fileData.length; i++) {
// if (fileData[i].name.slice(0,fileData[i].name.indexOf('(')) === this.$store.getters.userInfo.userName) {
// this.dataList = fileData[0].standardInfoList
// this.standardInfoList = this.dataList
// this.textarea = JSON.parse(JSON.stringify(item)).textarea
// }
// }
} else {
let fileData = JSON.parse(JSON.stringify(item)).dockUserList
this.dataList = fileData[0].standardInfoList
fileData.forEach( filedata => {
// console.log(filedata)
if (filedata.id === this.userId){
this.dataList = filedata.standardInfoList
}
})
this.standardInfoList = this.dataList
// for (let i = 0; i<fileData.length; i++) {
// if (fileData[i].name.slice(0,fileData[i].name.indexOf('(')) === this.$store.getters.userInfo.userName) {
// this.dataList = fileData[0].standardInfoList
// this.standardInfoList = this.dataList
// // this.textarea = JSON.parse(JSON.stringify(item)).commentText
// }
// }
}
})
},
// 选择责任人的按钮操作
selectPeople(val) {
this.$refs.multipleTable.clearSelection();
this.newDataList = val
this.nodeList = []
this.modalshowflag = true
this.drawerTitle = '选择人员信息'
},
// 批量选择负责人按钮
dutyPeopleList(id) {
if (this.selectTableMore.length === 0) {
this.$message.warning("请选择至少一条数据进行分发责任人");
} else {
this.nodeList = []
this.nodeList.push(id)
this.modalshowflag = true
}
},
// 勾选的列表事件
handleSelectionMore(val) {
this.selectTableMore = val
},
handleTabs(name) {
this.active = name
},
// 转办按钮
handleTurnTo() {
this.modalshowflag = true
this.drawerTitle = '转办处理人'
},
// 退回按钮
handleSubmitNo() {
if (this.textarea) {
var json = {
passInfo: 1,
actionFlag: 1,
commentText: this.textarea,
standardInfoList: this.standardInfoList,
}
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskIds)
completeTask(params).then(res => {
if (res.success) {
this.$message.success('驳回成功')
this.$router.push('/processCenter')
}
})
} else {
this.$message.warning('请输入反馈意见')
}
},
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.standId,
// pageType: 'FOREIGN_STAND'
pageType: item.standType + '_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
// 保存按钮
handleSave() {
let zqa = new Map();
for (let lastDataListElement of this.dataList) {
let a = zqa.get(lastDataListElement.dutyPeopleInfoId)
if( a == null){
a = {
id: lastDataListElement.dutyPeopleInfoId,
name: lastDataListElement.dutyPeopleInfo,
standardInfoList: []
}
}
a.standardInfoList.push(lastDataListElement);
zqa.set(a.id, a);
}
let list = [];
for(let item of zqa) {
list.push(item[1])
}
this.saveLoading = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
// roleForm: this.roleForm,
dockUserList: list,
textarea: this.textarea
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
})
},
// 提交按钮
handleSubmit() {
this.isSubmit = true
let flag=false
this.dataList.forEach(item => {
if (item.dutyPeople === '') {
flag = true
this.isSubmit = false
}
})
if(flag)return this.$message.warning('请选择负责人填入')
let zqa = new Map();
for (let lastDataListElement of this.dataList) {
let a = zqa.get(lastDataListElement.dutyPeopleId)
if( a == null){
a = {
id: lastDataListElement.dutyPeopleId,
name: lastDataListElement.dutyPeople,
standardInfoList: []
}
}
a.standardInfoList.push(lastDataListElement);
zqa.set(a.id, a);
}
let list = [];
for(let item of zqa) {
list.push(item[1])
}
let json = {
passInfo: this.passInfo,
responUserList: list,
commentText: this.textarea,
actionFlag: 0
}
if(flag)return;
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
}).catch(e => {
this.isSubmit = false
})
},
drawerCheck (data) {
if (this.drawerTitle === '转办处理人') {
this.turnLoading = true
changeAssigneeNew({
taskId: this.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.userId, // 委托人
pId: this.pId // 流程实例
}).then(res =>{
if (res.success) {
this.turnLoading = false
this.$message.success('调整成功')
this.$router.push("/processCenter")
} else {
this.$message.warning(res.message)
}
})
} else {
this.roleForm = data[0]
// 选择责任人时input框内值
if (this.selectTableMore.length ===0) {
this.newDataList.dutyPeople = this.roleForm.name
this.newDataList.dutyPeopleId = this.roleForm.id
}else {
this.selectTableMore.forEach(item => {
item.dutyPeople = this.roleForm.name
item.dutyPeopleId = this.roleForm.id
})
}
this.lastDataList = this.dataList
}
this.modalshowflag = false
},
//查询按钮
getTableByPage({ standId, productName, responsibleUnit }) {//多条件和模糊查询
this.realList = this.dataList.filter(item => {
let matchId = true; // 标准号 筛选
let matchName = true; // 项目名称 筛选
let matchUnit = true; // 部门 筛选
if (standId) {
const keysId = standId
.toUpperCase() // 转大写
.replace(' ', '') // 删掉空格
.split('') // 切割成 单个字
matchId = keysId.every(key => item.standId.toUpperCase().includes(key));
}
if (productName) {
matchName = item.productName === productName;
}
if (responsibleUnit) {
matchUnit = item.responsibleUnit === responsibleUnit;
}
return matchId && matchName && matchUnit;
})
this.dataList = this.realList
},
// 清空 查询条件
clearAllSearch (search = true) {
this.nonSearch = {
standId: '',
productName: '',
responsibleUnit: ''
}
this.getTableByPage()
},
// 分页事件
pageChange (page) {
this.pageNo = page
this.getTableByPage()
},
pageSizeChange () {
this.getTableByPage()
},
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/style';
.wfhxzgStep3 {
/deep/.el-drawer__container {
.prc-content-border {
border: none;
padding: 0 20px 0;
}
}
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-center {
padding: 10px 0px 10px 10px;
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
}
}
</style>
@@ -256,6 +256,7 @@ export default {
})
},
getFormFieldList (item) {
console.log(item)
this.$nextTick(() => {
if (item.passInfo !== 0) {
this.passInfo = JSON.parse(JSON.stringify(item)).passInfo
@@ -248,7 +248,7 @@ export default {
this.toProcessDetail('xmqdqrStep4-1',row)
}else if (prcType === '8') {
// 未符合项整改 3
this.toProcessDetail('wfhxzgStep3',row)
this.toProcessDetail('wfhxzgStep3-1',row)
}else if(prcType === 'buss1'){
//企标制修订 技术标准 第9
this.toProcessDetail('bussLibrary9',row)
@@ -398,7 +398,8 @@ export default {
prcType: row.prcType,
disabledXX:true,
verifySarStandard:true,
index:this.approveRowIndex
index:this.approveRowIndex,
processInstanceId:row.processInstanceId
}
}
if (unShowReceipt) {
+9
View File
@@ -1034,6 +1034,15 @@ const routes = [
title: '未符合项整改/更新流程'
}
},
{
path: '/wfhxzgStep3-1',
name: 'wfhxzgStep3-1',
component: () => import('@/pages/processCenter/pages/creatProcess/wfhxzg/step3-1.vue'),
meta: {
requireAuth: true,
title: '未符合项整改/更新流程'
}
},
{
path: '/wfhxzgStep4',
name: 'wfhxzgStep4',