feat : 重新提交
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user