feat : 重新提交
This commit is contained in:
@@ -19,6 +19,12 @@ export const getInfo = (requirementId) => {
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const getFormInfo = (requirementId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/requirement/form/${requirementId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const agreeTask = (data) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/process/task/agree`,
|
||||
@@ -41,6 +47,13 @@ export const addRequirement = (data) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const resubmit = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/resubmit',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const deleteFile = (fileId) => {
|
||||
return request({
|
||||
url: `/workflow/process/file/delete/${fileId}`,
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -77,7 +78,7 @@
|
||||
<script setup lang="jsx">
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getWorkflowInfo, addRequirement, getInfo} from "@/api/project-demand/index.js";
|
||||
import {getWorkflowInfo, addRequirement, getFormInfo,resubmit} from "@/api/project-demand/index.js";
|
||||
import FileUpload from "@/components/FileUpload.vue";
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {ElMessage} from "element-plus";
|
||||
@@ -150,6 +151,8 @@ const getFile = (val) => {
|
||||
})
|
||||
fileList.value=newFileArray
|
||||
}
|
||||
|
||||
|
||||
const init = async () => {
|
||||
getWorkflowInfo().then(res => {
|
||||
let data = res.data
|
||||
@@ -183,11 +186,28 @@ const handleSubmit = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
getInfo(route.query.id).then(res => {
|
||||
const handleResubmit = () => {
|
||||
resubmit({
|
||||
...formData.value,
|
||||
files: fileList.value,
|
||||
deploymentId: processInstanceData.value.deploymentId
|
||||
}).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
formData.value = res.data.formData
|
||||
router.push({
|
||||
path: '/projectdemand/demandcollection'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
getFormInfo(route.query.id).then(res => {
|
||||
if (res.code === 1000) {
|
||||
console.log(res)
|
||||
ElMessage.success(res.msg)
|
||||
formData.value = res.data
|
||||
if(route.query.isAdd==undefined){
|
||||
showTable.value=true
|
||||
}
|
||||
|
||||
@@ -20,34 +20,43 @@
|
||||
<component :is="user.icon"/>
|
||||
</el-icon>
|
||||
</div>
|
||||
<el-tooltip effect="dark" :content="user.name" placement="bottom-start">
|
||||
<el-tooltip effect="dark" :content="user.name" placement="bottom-start">
|
||||
<span class="username">{{ user.name }}</span>
|
||||
</el-tooltip>
|
||||
|
||||
<template v-if="user.auditOpinion">
|
||||
<div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">
|
||||
<div>
|
||||
{{ user.auditOpinion }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div style="margin-left: 10px;">
|
||||
<div style="color: #c0bebe">{{ operation.operationName }}</div>
|
||||
<div style="font-size: 14px; font-weight: bold;">{{ operation.remark }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="operation.comment">
|
||||
<div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">
|
||||
<div>
|
||||
{{ operation.comment.context }}
|
||||
</div>
|
||||
<div style="margin-top: 10px;" v-if="operation.comment.attachments && operation.comment.attachments.length > 0">
|
||||
<template v-for="(item) in getAttachmentList(operation.comment.attachments,true)">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="item.url"
|
||||
:preview-src-list="[item.url]">
|
||||
</el-image>
|
||||
</template>
|
||||
<div v-for="(file) in getAttachmentList(operation.comment.attachments,false)">
|
||||
<el-link style="color: #2a99ff" :href="file.url" icon="el-icon-document">{{ file.name }}</el-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- <template v-if="operation.comment">-->
|
||||
<!-- <div style="margin-top: 10px;background:#f5f5f5;padding: 10px;">-->
|
||||
<!-- <div>-->
|
||||
<!-- {{ operation.comment.context }}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-top: 10px;"-->
|
||||
<!-- v-if="operation.comment.attachments && operation.comment.attachments.length > 0">-->
|
||||
<!-- <template v-for="(item) in getAttachmentList(operation.comment.attachments,true)">-->
|
||||
<!-- <el-image-->
|
||||
<!-- style="width: 100px; height: 100px"-->
|
||||
<!-- :src="item.url"-->
|
||||
<!-- :preview-src-list="[item.url]">-->
|
||||
<!-- </el-image>-->
|
||||
<!-- </template>-->
|
||||
<!-- <div v-for="(file) in getAttachmentList(operation.comment.attachments,false)">-->
|
||||
<!-- <el-link style="color: #2a99ff" :href="file.url" icon="el-icon-document">{{ file.name }}</el-link>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item :color="timeline.color" :icon="timeline.icon" size="large">
|
||||
@@ -61,7 +70,7 @@
|
||||
|
||||
<script setup>
|
||||
import {CircleCheckFilled, Close, Loading, MoreFilled} from "@element-plus/icons-vue";
|
||||
import {ref,defineProps} from 'vue'
|
||||
import {ref, defineProps} from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
operationList: {
|
||||
@@ -114,12 +123,12 @@ const init = () => {
|
||||
break
|
||||
}
|
||||
// let operationListNew = []
|
||||
for (let i = 0;i<props.operationList.length;i++) {
|
||||
for (let i = 0; i < props.operationList.length; i++) {
|
||||
let operationNew = initOperationFun(props.operationList[i])
|
||||
let userList = []
|
||||
if (operationNew.userInfo){
|
||||
if (operationNew.userInfo) {
|
||||
for (let user of operationNew.userInfo) {
|
||||
let userNew = initUser(user,operationNew.operation)
|
||||
let userNew = initUser(user, operationNew.operation)
|
||||
userList.push(userNew)
|
||||
}
|
||||
operationNew.userInfo = userList
|
||||
@@ -133,7 +142,7 @@ const init = () => {
|
||||
|
||||
const getAttachmentList = (attachments, image) => {
|
||||
let result = [];
|
||||
if (attachments){
|
||||
if (attachments) {
|
||||
for (let attachment of attachments) {
|
||||
if (attachment.isImage === image) {
|
||||
result.push(attachment)
|
||||
@@ -143,7 +152,7 @@ const getAttachmentList = (attachments, image) => {
|
||||
return result;
|
||||
}
|
||||
|
||||
const initUser = (user,type) => {
|
||||
const initUser = (user, type) => {
|
||||
let state = user.state
|
||||
//创建节点
|
||||
if (state === 'CREATE') {
|
||||
@@ -155,7 +164,7 @@ const initUser = (user,type) => {
|
||||
user["icon"] = 'CircleCheckFilled'
|
||||
user["color"] = "#0bbd87"
|
||||
}
|
||||
if (type === "CC"){
|
||||
if (type === "CC") {
|
||||
user["icon"] = "Promotion"
|
||||
user["color"] = "#3395f8"
|
||||
}
|
||||
@@ -170,7 +179,7 @@ const initUser = (user,type) => {
|
||||
user["icon"] = 'Close'
|
||||
user["color"] = "#f56c6c"
|
||||
}
|
||||
if (state === 'PASS'){
|
||||
if (state === 'PASS') {
|
||||
user["icon"] = 'MoreFilled'
|
||||
user["color"] = "#c0c4cc"
|
||||
}
|
||||
@@ -278,7 +287,8 @@ init()
|
||||
position: relative;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.el-timeline-item__node{
|
||||
|
||||
.el-timeline-item__node {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 1px;
|
||||
|
||||
Reference in New Issue
Block a user