未符合项整改流程

This commit is contained in:
shen_yan_pu
2021-07-13 15:36:29 +08:00
parent b6c147848c
commit 75bccd61eb
8 changed files with 549 additions and 242 deletions
+26
View File
@@ -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
})
}
@@ -54,7 +54,7 @@
<div class="block" style="padding-top: 20px;">
<el-timeline>
<el-form
ref="Form"
ref="roleForm"
:model="roleForm"
:rules="roleFormRules"
class="label-input-form">
@@ -81,39 +81,6 @@
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="确认分发责任人" placement="top" :color="roleForm.ministerUser ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="ministerUserName" style="margin-bottom: 0">
<h4>分发责任人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.ministerUser" style="display: none;"></el-input>
<el-input v-model="roleForm.ministerUserName" placeholder="选择分发责任人" @click.native="choiceZRR('ministerUser', '选择分发责任人', roleForm.ministerUser)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="负责人上传材料" placement="top" :color="roleForm.directorUser ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="directorUserName" style="margin-bottom: 0">
<h4>负责人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.directorUser" style="display: none;"></el-input>
<el-input v-model="roleForm.directorUserName" placeholder="选择负责人" @click.native="choiceZRR('directorUser', '选择负责人', roleForm.directorUser)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="批准人" placement="top" :color="roleForm.presidentUser ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="presidentUserName" style="margin-bottom: 0">
<h4>分发责任人</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.presidentUser" style="display: none;"></el-input>
<el-input v-model="roleForm.presidentUserName" placeholder="选择分发负责人" @click.native="choiceZRR('presidentUser', '选择分发负责人', roleForm.presidentUser)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
</el-form>
</el-timeline>
</div>
@@ -127,21 +94,23 @@
>
<div class="search-area">
<div class="content-top">
<el-form :modal="nonConformitySearch" inline class="label-input-form">
<el-form :modal="queryUnqualidiedData" inline class="label-input-form">
<el-form-item label="标准号/标准名称" class="search-item">
<el-input v-model="nonConformitySearch.standId"
placeholder="请输入"
clearable
:maxlength="100"></el-input>
<el-input
v-model="queryUnqualidiedData.standId"
placeholder="请输入"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item label="项目名称" class="search-item">
<el-input v-model="nonConformitySearch.productName"
placeholder="请输入"
clearable
:maxlength="100"></el-input>
<el-input
v-model="queryUnqualidiedData.productName"
placeholder="请输入"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item label="责任部门" class="search-item">
<el-input v-model="nonConformitySearch.responsibleUnit" v-show="false" />
<el-input v-model="queryUnqualidiedData.responsibleUnit" v-show="false" />
<el-popover
placement="bottom"
popper-class="user-dept-popper"
@@ -150,7 +119,7 @@
>
<el-input
slot="reference"
v-model="nonConformitySearch.responseUnitShow"
v-model="queryUnqualidiedData.responseUnitShow"
placeholder="根据责任部门查找"
readonly
clearable
@@ -257,19 +226,15 @@ import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import {interfaceUrl} from "@/sysConfig";
import { startProcess, completeTask } from '@/api/process.js'
import { standUnqualified } from '@/api/unqualProcess.js'
export default {
name: "step1",
name: "wfhxzgStep1",
data() {
return {
textarea: '', // 意见
title: '', // 新增编辑抽屉标题
ListModel: false, // 新增编辑抽屉开关
nonConformitySearch: {
standId: '', // 标准号/名称
productName: '', // 项目名称
responsibleUnit: '' // 责任部门
},
active: '1', // 默认显示
isSubmit: false,
saveLoading: false,
@@ -280,11 +245,26 @@ export default {
itemsName: '',
planCloseTime: '',
responsibleUnit: '',
dutyEngineer: ''
dutyEngineer: '',
dutyPeopleInfo: '',
dutyPeople: '',
fileText: '',
fileTextId: '',
fileTextPath: ''
}],
// 责任部门
zNodesSItem: [],
standModel: false,
// 查询未符合项整改数据库数据
queryUnqualidiedData: {
pageNo: 1,
pageSize: 10,
total: 0,
closeState: '1',
standId: '', // 标准号/名称
productName: '', // 项目名称
responsibleUnit: '' // 责任部门
},
unqualidiedData: [{
standId: '',
productName: '',
@@ -292,14 +272,24 @@ export default {
itemsName: '',
planCloseTime: '',
responsibleUnit: '',
dutyEngineer: ''
dutyEngineer: '',
dutyPeopleInfo: '',
dutyPeopleInfoId: '',
dutyPeople: '',
dutyPeopleId: '',
fileText: '',
fileTextId: '',
fileTextPath: ''
}],
selectedList: [], //未整改项的选择框
roleForm: {
startUserName: this.$store.getters.userInfo.userName,
startUser: this.$store.getters.userInfo.userId,
dockUserName: '',
dockUser: ''
},
roleFormRules: {
dockUserName: [{ required: true, message: "请选择标准法规工程师", trigger: ['blur', 'change']}]
},
nodeList: [],
drawerTitle: '', //drawer标题
@@ -309,6 +299,7 @@ export default {
children: 'children',
label: 'name'
},
taskID: '',
}
},
components: {
@@ -318,21 +309,32 @@ export default {
},
mounted () {
this.getTree()
this.getJsonData()
},
methods: {
getJsonData() {
const params = {
type: '8'
}
startProcess(params).then(res => {
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: ''
@@ -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 @@
<el-table-column prop="planCloseTime" label="整改完成时间"/>
<el-table-column prop="responsibleUnit" label="责任部门"/>
<el-table-column prop="dutyEngineer" label="责任工程师"/>
<el-table-column label="选择分发责任人" prop="dutyPeople">
<el-table-column label="选择分发责任人" prop="dutyPeopleInfo">
<template slot-scope="scope">
<span v-if="scope.row.show">
<el-input
v-model="scope.row.dutyPeople"
v-model="scope.row.dutyPeopleInfo"
size="mini"
placeholder="请输入内容"
@click.native="choiceDuty"
/>
</span>
<span v-else>{{scope.row.dutyPeople}}</span>
<span v-else>{{scope.row.dutyPeopleInfo}}</span>
</template>
</el-table-column>
</el-table>
@@ -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
},
// 流程节点负责人抽屉取消按钮
@@ -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<fileData.length; i++) {
if (fileData[i].name === this.$store.getters.userInfo.userName) {
this.dataList = fileData[i].standardInfoList
}
}
})
},
// 选择责任人的按钮操作
selectPeople(val) {
this.newDataList = val
@@ -242,7 +246,47 @@ export default {
// 保存按钮
handleSave() {},
// 提交按钮
handleSubmit() {},
handleSubmit() {
let zqa = new Map();
for (let lastDataListElement of this.lastDataList) {
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 = {
responUserList: list,
actionFlag: 0
}
let flag=false
this.dataList.forEach(item => {
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
},
// 流程节点负责人抽屉取消按钮
@@ -92,27 +92,28 @@
<el-table-column prop="planCloseTime" label="整改完成时间"/>
<el-table-column prop="responsibleUnit" label="责任部门"/>
<el-table-column prop="dutyPeople" label="负责人"/>
<el-table-column label="佐证材料">
<el-table-column label="佐证材料" prop="info.fileText" show-overflow-tooltip width="150">
<template slot-scope="scope">
<el-upload
v-model="fileText"
ref="uploadFile"up
:action="uploadPath"
class="upload-demo"
:http-request="handleUpload"
:on-success="handleOnsuccess"
:on-error="handleOnError"
:before-upload="handleBeforeUpload"
:before-remove="handleBeforeRemove"
:on-remove="handleOnRemove"
:on-exceed="handleExceed"
:limit="10"
:file-list="uploadFileList"
list-type="picture"
:auto-upload="true"
>
<el-button type="text">上传佐证材料</el-button>
</el-upload>
<div style="display: inline;">
<el-input
disabled
style="display: none"
v-model="scope.row.fileText"
clearable
/>
<div v-if="scope.row.fileText" type="primary" @click="fileUpload(scope.row)" class="fileClass">
{{ scope.row.fileText }}
</div>
<div v-else>
<el-button
type="primary"
class="common-button-primary"
@click="fileUpload(scope.row)"
size="mini">
点击上传
</el-button>
</div>
</div>
</template>
</el-table-column>
</el-table>
@@ -141,6 +142,24 @@
@submit="handleSubmit"
>
</ProcessFooter>
<el-dialog width='400px' :visible.sync="fileMadel" title="上传文件">
<el-upload
multiple
drag
:action="uploadPath"
ref="importfile"
name="file"
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx"
:before-upload="handleBeforeUpload"
:on-success="handleOnsuccess"
:show-file-list="false"
>
<div style="padding: 20px 0">
<i class="el-icon-upload" style="color: #3399ff"></i>
<p>点击或拖拽上传文件</p>
</div>
</el-upload>
</el-dialog>
</div>
</template>
@@ -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<fileData.length; i++) {
if (fileData[i].name === this.$store.getters.userInfo.userName) {
this.dataList = fileData[i].standardInfoList
console.log(this.dataList)
}
}*/
})
},
handleTabs(name) {
this.active = name
},
/************ 上传佐证材料 *****************/
// 上传材料
handleUpload() {},
fileUpload (val) {
this.newDataList = val
this.fileMadel = true
},
// 文件上传成功
handleOnsuccess(res, file) {
this.$message.success('上传成功!')
console.log(file)
handleOnsuccess(res, file, fileList) {
if (res.ok) {
this.fileMadel = false
this.newDataList.fileText = res.data.name
this.newDataList.fileTextId = res.data.id
this.newDataList.fileTextPath = res.data.filePath
console.log(this.dataList)
this.$message({
showClose: true,
message: res.message,
type: 'success'
})
}
},
// 文件上传失败后回调
handleOnError(res, file) {},
// 文件上传限制条件
handleBeforeUpload() {},
handleBeforeUpload(file) {
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
// const fileSuffix = file.name.split('.')[1] // 后缀名
// 判断上传文件格式
if (fileSuffix === '.ZIP' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.zip' || fileSuffix === '.xls' || fileSuffix === '.xlsx') {
return true
} else {
this.spinShow = false
this.$message.error('文件' + file.name + '格式不正确,请上传ZIP/DOCX或XLS文件')
return false
}
// 判断文件上传大小
// eslint-disable-next-line no-unreachable
if (file.size / 1024 / 1024 <= 200) {
return true
} else {
this.$message.error('文件' + file.name + '大小不超过200M')
return false
}
return true
},
// 移除上传的文件
handleBeforeRemove() {},
handleOnRemove() {},
@@ -233,7 +295,32 @@ export default {
// 保存按钮
handleSave() {},
// 提交按钮
handleSubmit() {},
handleSubmit() {
let flag=false
this.dataList.forEach(item => {
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() {
@@ -106,19 +106,21 @@
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="textarea">
v-model="commentText">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
</div>
<ProcessFooter
show-back
show-submit
show-back
approval
@back="handleSubmitNo"
:submitLoading="isSubmit"
:backLoading="backLoading"
@back="handleDataBack"
:saveLoading="saveLoading"
@submit="handleSubmit"
submitBTNText="同意"
>
</ProcessFooter>
</div>
@@ -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() {
},
@@ -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']),
+2 -2
View File
@@ -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 {