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