diff --git a/src/api/unqualProcess.js b/src/api/unqualProcess.js new file mode 100644 index 000000000..a87c8a3ac --- /dev/null +++ b/src/api/unqualProcess.js @@ -0,0 +1,26 @@ +import axios from '@/common/axiosV2' + +// 查询未整改项列表接口 +export function standUnqualified (data) { + return axios({ + url: '/api/sarStandUnqualified/sar-stand-unqualified', + method: 'get', + params: data + }) +} +// 人员菜单列表获取 +export function roleTreeData (data) { + return axios({ + url: '/api/SarInstitution/institution/institutionAndUser', + method: 'get', + params: data + }) +} +// 上传文件 +export function uploadFileText (data) { + return axios({ + url: 'api/att/attFile/upload', + method: 'get', + params: data + }) +} diff --git a/src/pages/processCenter/pages/creatProcess/wfhxzg/step1.vue b/src/pages/processCenter/pages/creatProcess/wfhxzg/step1.vue index d2787d24f..174ddb4bb 100644 --- a/src/pages/processCenter/pages/creatProcess/wfhxzg/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/wfhxzg/step1.vue @@ -54,7 +54,7 @@
@@ -81,39 +81,6 @@ - - - -

分发责任人

-
- - -
-
-
-
- - - -

负责人

-
- - -
-
-
-
- - - -

分发责任人

-
- - -
-
-
-
@@ -127,21 +94,23 @@ >
- + - + - + - + { + this.taskID = res.data + }) + }, //点击新增事件 addList() { - this.$http.get("sarStandUnqualified/sar-stand-unqualified", "", { - ...this.nonConformitySearch, - current: this.pageNo, - size: this.$store.getters.userInfo.configContent - }, { - _this: this - }, res => { + standUnqualified(this.queryUnqualidiedData).then(res => { this.unqualidiedData = res.data.records + this.unqualidiedData.forEach(item => { + this.$set(item,'dutyPeopleInfo','') + this.$set(item,'dutyPeople','') + this.$set(item,'dutyPeopleInfoId','') + this.$set(item,'dutyPeopleId','') + this.$set(item,'fileText','') + this.$set(item,'fileTextId','') + this.$set(item,'fileTextPath','') + }) this.total = res.data.total - }, e => { - }); + }) this.standModel = true; }, @@ -371,7 +373,7 @@ export default { OkDrawer() { if (this.selectedList.length !== 0) { this.dataList = this.selectedList - this.ListModel = false; + this.standModel = false; } else { this.$message.warning("请选择至少一条数据进行带入"); } @@ -386,12 +388,40 @@ export default { // 保存按钮 handleSave() {}, // 提交按钮 - handleSubmit() {}, - + handleSubmit() { + let json = { + startUser: this.$store.getters.userInfo.userId, + engineer: this.roleForm.dockUser, + standardInfoList: this.dataList, + } + if (this.dataList[0].standId === '') { + this.$message.warning('请选择基础信息进行添加') + } else { + if (this.roleForm.dockUserName === '') { + this.$message.warning('请选择基础信息进行添加') + } else { + this.$refs['roleForm'].validate((valid) => { + if (valid) { + const params = new FormData(); + params.set('json', JSON.stringify(json)) + params.set('userId', this.$store.getters.userInfo.userId) + params.set('taskIds', this.taskID) + completeTask(params).then(res => { + if(res.success === true) { + this.$message.success('提交成功') + this.$router.push("/processCenter"); + } + }) + } + }) + } + } + }, // 获取流程节点数据 getTree () { this.$http.get('SarInstitution/institution/institutionAndUser', {}, {}, res=> { this.treeData = res.data + console.log(res.data) }) }, // 流程阶段负责人选择 @@ -413,19 +443,8 @@ export default { }, // 流程节点负责人抽屉保存按钮 saveUserInfo () { - if (this.type === 'dockUser') { - this.roleForm.dockUser = this.roleRow.id - this.roleForm.dockUserName = this.roleRow.name - } else if (this.type === 'ministerUser') { - this.roleForm.ministerUser = this.roleRow.id - this.roleForm.ministerUserName = this.roleRow.name - } else if (this.type === 'directorUser') { - this.roleForm.directorUser = this.roleRow.id - this.roleForm.directorUserName = this.roleRow.name - } else if (this.type === 'presidentUser') { - this.roleForm.presidentUser = this.roleRow.id - this.roleForm.presidentUserName = this.roleRow.name - } + this.roleForm.dockUser = this.roleRow.id + this.roleForm.dockUserName = this.roleRow.name this.modalshowflag = false }, // 流程节点负责人抽屉取消按钮 @@ -438,7 +457,7 @@ export default { }, // 清空 查询条件 clearAllSearch (search = true) { - this.nonConformitySearch = { + this.queryUnqualidiedData = { standId: '', productName: '', responsibleUnit: '' diff --git a/src/pages/processCenter/pages/creatProcess/wfhxzg/step2.vue b/src/pages/processCenter/pages/creatProcess/wfhxzg/step2.vue index 9c4edbd1c..687f3930a 100644 --- a/src/pages/processCenter/pages/creatProcess/wfhxzg/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/wfhxzg/step2.vue @@ -90,7 +90,7 @@ :data="dataList" border ref="multipleTable" - @select="handleSelectionChange" + @selection-change="handleSelectionChange" height="49%" style="width: 100%" :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', @@ -103,17 +103,17 @@ - + @@ -175,15 +175,18 @@ import ProcessHeader from '../../components/ProcessHeader' import ProcessFooter from '../../components/ProcessFooter' import ProcessTitle from '../../components/ProcessTitle' -import {interfaceUrl} from "@/sysConfig"; +import { roleTreeData } from "@/api/unqualProcess.js" +import {completeTask, inboundLiaisonDetail} from "@/api/process.js" export default { - name: "step2", + name: "wfhxzgStep2", data() { return { textarea: '', // 意见 title: '', // 新增编辑抽屉标题 ListModel: false, // 新增编辑抽屉开关 + taskIds: this.$route.query.taskIds, + pId: this.$route.query.prcId, nonConformitySearch: { standId: '', // 标准号/名称 productName: '', // 项目名称 @@ -193,6 +196,8 @@ export default { isSubmit: false, saveLoading: false, dataList: [], + endDataList: [], + lastDataList: [], // 新增选择分发责任人数组 multipleSelection: [], // 当前页数 @@ -214,6 +219,15 @@ export default { nodeList: [], drawerTitle: '', //drawer标题 modalshowflag: false, // drawer开关 + roleForm: { + dutyUserInfo: [], + dutyUserInfoName: [], + dutyPeopleInfo: '', + dutyPeople: '' + }, + props: { label: 'name', children: 'children', value: 'id', multiple: true, disabled: false }, + dutyUserCaseData: [], + roleFormRules: {}, treeData: [], // 人员数据 defaultProps: { children: 'children', @@ -232,47 +246,20 @@ export default { }, methods: { getData() { - this.dataList = [ - { - standId: '1', - productName: '1', - itemsNum: '1', - itemsName: '1', - planCloseTime: '1', - responsibleUnit: '1', - dutyEngineer: '1', - dutyPeople: '', - },{ - standId: '332', - productName: '333', - itemsNum: '33', - itemsName: '33', - planCloseTime: '33', - responsibleUnit: '33', - dutyEngineer: '33', - dutyPeople: '' - },{ - standId: '312`', - productName: '31312', - itemsNum: '31`2', - itemsName: '312`1`', - planCloseTime: '321`3`2', - responsibleUnit: '312`123`', - dutyEngineer: '312123', - dutyPeople: '121' - },{ - standId: '32123', - productName: '32132', - itemsNum: '312321', - itemsName: '3123', - planCloseTime: '3123', - responsibleUnit: '3123', - dutyEngineer: '3123', - dutyPeople: '' - }, - ] + const params = { + taskIds: this.taskIds, + pId: this.pId, + } + inboundLiaisonDetail(params).then(res => { + const processForm = JSON.parse(res.mesg) + this.getFormFieldList(processForm) + }) + }, + getFormFieldList (item) { + this.$nextTick(() => { + this.dataList = JSON.parse(JSON.stringify(item)).standardInfoList + }) }, - // 批量选择分发责任人 dutyEngineerList() { if (this.multipleSelection.length === 0) { @@ -287,12 +274,12 @@ export default { // 选择勾选项的集合 handleSelectionChange(value) { this.multipleSelection = value - console.log(value) }, // 选择分发责任人时 choiceDuty(type, title, id) { this.nodeList = [] this.nodeList.push(id) + this.type = type this.drawerTitle = title this.modalshowflag = true }, @@ -306,37 +293,91 @@ export default { // 保存按钮 handleSave() {}, // 提交按钮 - handleSubmit() {}, + handleSubmit() { + let zqa = new Map(); + for (let lastDataListElement of this.lastDataList) { + 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]) + } + let json = { + dockUserList: list, + // engineer: this.$store.getters.userInfo.userId, + // standardInfoList: list[0].standardInfoList, + } + console.log(json) + let flag=false + this.dataList.forEach(item => { + if (item.dutyPeopleInfo === '') { + this.$message.warning('请选择分发负责人填入') + flag=true + } + }) + 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"); + } + }) + }, + // 流程阶段负责人选择 + choiceZRR (type, title, id) { + this.nodeList = [] + this.nodeList.push(id) + this.type = type + this.drawerTitle = title + this.modalshowflag = true + }, // 获取流程节点数据 getTree () { - this.$http.get('SarInstitution/institution/institutionAndUser', {}, {}, res=> { + roleTreeData().then(res => { this.treeData = res.data + this.dutyUserCaseData = res.data }) }, drawerCheck (data) { var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes()); - if(getlist.length == 1) { - this.roleRow = getlist[0] + if(getlist.length !== 0) { + this.roleRow = getlist }else { this.$refs.tree.setCheckedKeys([data.id]); - this.roleRow = this.$refs.tree.getCheckedNodes()[0] + this.roleRow = this.$refs.tree.getCheckedNodes() } }, // 流程节点负责人抽屉保存按钮 saveUserInfo () { // 选取负责人时的操作 for (let i = 0; i < this.multipleSelection.length; i++ ) { - this.multipleSelection[i].dutyPeople = this.roleRow.name - for (let b = 0; b < this.multipleSelection.length; b++) { - this.multipleSelection[b].dutyPeople = this.multipleSelection[i].dutyPeople - this.dataList.forEach(val=> { - val.show = false - }) - } - this.multipleSelection = [] + this.multipleSelection[i].dutyPeopleInfo = this.roleRow[0].name + this.multipleSelection[i].dutyPeopleInfoId = this.roleRow[0].id + for (let b = 0; b < this.multipleSelection.length; b++) { + this.dataList[b].dutyPeopleInfo = this.multipleSelection[i].dutyPeopleInfo + this.dataList[b].dutyPeopleInfoId = this.multipleSelection[i].dutyPeopleInfoId + this.dataList.forEach(val=> { + val.show = false + }) + } + this.lastDataList = this.dataList this.$refs.multipleTable.clearSelection(); } + this.roleForm.dutyUserInfoName = this.roleRow.name this.modalshowflag = false }, // 流程节点负责人抽屉取消按钮 diff --git a/src/pages/processCenter/pages/creatProcess/wfhxzg/step3.vue b/src/pages/processCenter/pages/creatProcess/wfhxzg/step3.vue index 5d3255c1e..51d0aa452 100644 --- a/src/pages/processCenter/pages/creatProcess/wfhxzg/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/wfhxzg/step3.vue @@ -168,10 +168,10 @@ import ProcessHeader from '../../components/ProcessHeader' import ProcessFooter from '../../components/ProcessFooter' import ProcessTitle from '../../components/ProcessTitle' -import {interfaceUrl} from "@/sysConfig"; +import {completeTask, inboundLiaisonDetail} from "@/api/process.js"; export default { - name: "step3", + name: "wfhxzgStep3", data() { return { textarea: '', // 意见 @@ -185,26 +185,9 @@ export default { active: '1', // 默认显示 isSubmit: false, saveLoading: false, - dataList: [ - { - standId: '1', - productName: '1', - itemsNum: '1', - itemsName: '1', - planCloseTime: '1', - responsibleUnit: '1', - dutyEngineer: '1', - dutyPeople: '13123' - },{ - standId: '', - productName: '', - itemsNum: '', - itemsName: '', - planCloseTime: '', - responsibleUnit: '', - dutyEngineer: '', - dutyPeople: '' - }], + taskIds: this.$route.query.taskIds, + pId: this.$route.query.prcId, + dataList: [], newDataList: [], // 责任部门 @@ -226,9 +209,30 @@ export default { ProcessTitle }, created() { + this.getData() this.getTree() }, methods: { + getData() { + const params = { + taskIds: this.taskIds, + pId: this.pId, + } + inboundLiaisonDetail(params).then(res => { + const processForm = JSON.parse(res.mesg) + this.getFormFieldList(processForm) + }) + }, + getFormFieldList (item) { + this.$nextTick(() => { + let fileData = JSON.parse(JSON.stringify(item)).dockUserList + for (let i = 0; i { + if (item.dutyPeople === '') { + this.$message.warning('请选择负责人填入') + flag=true + } + }) + 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"); + } + }) + }, // 获取流程节点数据 getTree () { @@ -263,6 +307,9 @@ export default { saveUserInfo () { // 选择责任人时input框内值 this.newDataList.dutyPeople = this.roleRow.name + this.newDataList.dutyPeopleId = this.roleRow.id + this.lastDataList = this.dataList + console.log(this.dataList) this.modalshowflag = false }, // 流程节点负责人抽屉取消按钮 diff --git a/src/pages/processCenter/pages/creatProcess/wfhxzg/step4.vue b/src/pages/processCenter/pages/creatProcess/wfhxzg/step4.vue index 8641d0257..480176623 100644 --- a/src/pages/processCenter/pages/creatProcess/wfhxzg/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/wfhxzg/step4.vue @@ -92,27 +92,28 @@ - + @@ -141,6 +142,24 @@ @submit="handleSubmit" > + + +
+ +

点击或拖拽上传文件

+
+
+
@@ -149,9 +168,10 @@ import ProcessHeader from '../../components/ProcessHeader' import ProcessFooter from '../../components/ProcessFooter' import ProcessTitle from '../../components/ProcessTitle' import {interfaceUrl} from "@/sysConfig"; +import {inboundLiaisonDetail, completeTask} from "@/api/process" export default { - name: "step4", + name: "wfhxzgStep4", data() { return { textarea: '', // 意见 @@ -165,34 +185,17 @@ export default { active: '1', // 默认显示 isSubmit: false, saveLoading: false, - dataList: [ - { - standId: '1', - productName: '1', - itemsNum: '1', - itemsName: '1', - planCloseTime: '1', - responsibleUnit: '1', - dutyEngineer: '1', - dutyPeople: '13123' - },{ - standId: '', - productName: '', - itemsNum: '', - itemsName: '', - planCloseTime: '', - responsibleUnit: '', - dutyEngineer: '', - dutyPeople: '13123' - }], + dataList: [], + taskIds: this.$route.query.taskIds, + pId: this.$route.query.prcId, // 当前页数 pageNo: 1, total: 0, myLoading: false, // 上传路径 uploadPath: 'api/att/attFile/upload', - // 上传文件所储存的数组 - uploadFileList: [], + fileMadel: false, + newDataList: [], // 责任部门 zNodesSItem: [], } @@ -203,25 +206,84 @@ export default { ProcessTitle }, created() { + this.getData() }, methods: { + getData() { + const params = { + taskIds: this.taskIds, + pId: this.pId, + } + inboundLiaisonDetail(params).then(res => { + const processForm = JSON.parse(res.mesg) + this.getFormFieldList(processForm) + }) + }, + getFormFieldList (item) { + this.$nextTick(() => { + console.log(item) + this.dataList = [JSON.parse(JSON.stringify(item.responUserInfo.info))] + console.log(this.dataList) + /*for (let i = 0; i { + if (item.fileText === '') { + this.$message.warning('请选择佐证材料进行上传') + flag=true + } + }) + if(flag)return; + let fileDataList = this.dataList + let json = { + info: { fileDataList }, + username: this.$store.getters.userInfo.userName + } + console.log(json) + 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"); + } + }) + }, //未整改项抽屉中的查询按钮 getTableByPage() { diff --git a/src/pages/processCenter/pages/creatProcess/wfhxzg/step5.vue b/src/pages/processCenter/pages/creatProcess/wfhxzg/step5.vue index c157cb998..a8b85cad1 100644 --- a/src/pages/processCenter/pages/creatProcess/wfhxzg/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/wfhxzg/step5.vue @@ -106,19 +106,21 @@ :rows="3" resize="none" placeholder="请输入意见" - v-model="textarea"> + v-model="commentText">
@@ -129,13 +131,15 @@ import ProcessHeader from '../../components/ProcessHeader' import ProcessFooter from '../../components/ProcessFooter' import ProcessTitle from '../../components/ProcessTitle' import {interfaceUrl} from "@/sysConfig"; +import {inboundLiaisonDetail} from "@/api/process"; export default { - name: "step5", + name: "wfhxzgStep5", data() { return { - textarea: '', // 意见 + commentText: '', title: '', // 新增编辑抽屉标题 + saveLoading: false, ListModel: false, // 新增编辑抽屉开关 nonConformitySearch: { standId: '', // 标准号/名称 @@ -145,24 +149,10 @@ export default { active: '1', // 默认显示 isSubmit: false, backLoading: false, - dataList: [ - { - standId: '1', - productName: '1', - itemsNum: '1', - itemsName: '1', - planCloseTime: '1', - responsibleUnit: '1', - dutyEngineer: '1' - },{ - standId: '', - productName: '', - itemsNum: '', - itemsName: '', - planCloseTime: '', - responsibleUnit: '', - dutyEngineer: '' - }], + dataList: [], + json: {}, + taskIds: this.$route.query.taskIds, + pId: this.$route.query.prcId, // 当前页数 pageNo: 1, total: 0, @@ -180,15 +170,66 @@ export default { ProcessTitle }, created() { + this.getData() }, methods: { + getData() { + const params = { + taskIds: this.taskIds, + pId: this.pId, + } + inboundLiaisonDetail(params).then(res => { + const processForm = JSON.parse(res.mesg) + this.getFormFieldList(processForm) + }) + }, + getFormFieldList (item) { + this.$nextTick(() => { + console.log(item) + this.dataList = JSON.parse(JSON.stringify(item)).info.fileDataList + console.log(this.dataList) + }) + }, handleTabs(name) { this.active = name }, // 提交按钮 - handleSubmit() {}, + handleSubmit() { + var json = this.json + json.actionFlag = 0 + json.commentText = this.commentText + this.$http.post('lawss/activiti/completeTask', { + json: JSON.stringify(json), + taskId: this.taskIds, + userId: this.$store.getters.userInfo.userId + }, {}, res => { + if (res.success) { + this.$message.success('提交成功') + this.$router.push('/processCenter') + } + }) + }, + handleSubmitNo() { + if (this.commentText) { + var json = this.json + json.actionFlag = 1 + json.commentText = this.commentText + this.$http.post('lawss/activiti/completeTask', { + json: JSON.stringify(json), + taskId: this.taskIds, + userId: this.$store.getters.userInfo.userId + }, {}, res => { + if (res.success) { + this.$message.success('驳回成功') + this.$router.push('/processCenter') + } + }) + } else { + this.$message.warning('请输入反馈意见') + } + }, //未整改项抽屉中的查询按钮 getTableByPage() { }, diff --git a/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue b/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue index 6ba2be88c..a8aecdb8a 100644 --- a/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue +++ b/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue @@ -472,7 +472,6 @@ export default { } }) } - break; break //项目合规评估流程 case '5' : @@ -500,7 +499,54 @@ export default { }) } break - + //未符合项整改流程 + case '8' : + if(row.taskInfo === '下发至标准法规工程师'){ + this.$router.push({ + name: 'wfhxzgStep2', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) + } else if (row.taskInfo === '确认+选择责任人') { + this.$router.push({ + name: 'wfhxzgStep3', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) + }else if (row.taskInfo === '上传佐证材料填写信息') { + this.$router.push({ + name: 'wfhxzgStep4', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) + }else { + this.$router.push({ + name: 'wfhxzgStep5', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) + } + break } }, ...mapMutations(['setProcess', 'setHandleInfo']), diff --git a/src/router/index.js b/src/router/index.js index a61dcc0e4..8939581cf 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -341,7 +341,7 @@ const routes = [ }, { path: '/wfhxzgStep1', - name: 'wfhxzgStep2', + name: 'wfhxzgStep1', component: () => import('@/pages/processCenter/pages/creatProcess/wfhxzg/step1.vue'), meta: { requireAuth: true, @@ -1699,7 +1699,7 @@ router.beforeEach((to, from, next) => { // if (processCenter) { // if (to.meta.process) { // if (store.getters.getHandleInfo.prcType === to.meta.process.prcType && - // (store.getters.getHandleInfo.taskInfo === to.meta.process.taskInfo || + // (store.getters.getHandleInfo. === to.meta.process.taskInfo || // (to.meta.process.taskInfo.__proto__.constructor === Array && to.meta.process.taskInfo.includes(store.getters.getHandleInfo.taskInfo)))) { // next() // } else {