@@ -221,7 +215,8 @@
+ @getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
+ :preview="name === 'Summary/edit'"/>
@@ -246,12 +241,13 @@ import {useCacheStore} from '@/stores/cache.js'
import {useProcessStore} from '@/stores/processStore.js';
import {getSubCompOpt} from "@/api/user/user";
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
+
const cacheStore = useCacheStore()
const processStore = useProcessStore()
const router = useRouter()
const route = useRoute()
const attachment = ref()
-const name=ref(router.currentRoute.value.name)
+const name = ref(router.currentRoute.value.name)
const loading = ref(false)
const processDiagramViewer = ref(false)
const tagsViewStore = useTagsView()
@@ -290,7 +286,7 @@ const rules = reactive({
})
const compositeParam = (item, type) => {
let tag = ''
- if ( name.value=== 'Summary/add'||name.value === 'Summary/edit') {
+ if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
tag = '需求上报'
}
return {
@@ -302,8 +298,8 @@ const compositeParam = (item, type) => {
tag: tag
}
}
-const getEditOtherFile=(val)=>{
- console.log('getEditOtherFile',val)
+const getEditOtherFile = (val) => {
+ console.log('getEditOtherFile', val)
}
const getAttachment = (val) => {
console.log('上传文件getAttachment', val)
@@ -369,13 +365,15 @@ const handleSubmit = async (instance) => {
"specialFundAmount": "3",
deploymentId: deploymentId.value,
"singleFile": singleFile,
- "files": otherFiles,
+ "fileList": otherFiles,
"requirementId":route.query.id
}
- // ...formData.value,
+ // let params = {
+ // ...formData.value,
// deploymentId: deploymentId.value,
- // fileList: files,
- // requirementId:102
+ // fileList: otherFiles,
+ // singleFile: singleFile,
+ // requirementId: route.query.id
// }
let res = await requirementReported(params)
ElNotification({
@@ -395,31 +393,31 @@ const handleResubmit = () => {
let singleFile = {}
let otherFiles = []
let fileArray
- if(name.value === 'Summary/edit'){
+ if (name.value === 'Summary/edit') {
singleFile = {
fileId: attachment.value.singleFile.fileId
}
- fileArray=attachment.value.allFileList
- }else {
+ fileArray = attachment.value.allFileList
+ } else {
if (file.value.fileId !== undefined) {
singleFile = {
fileId: file.value.fileId
}
}
- fileArray=otherFileList.value
+ fileArray = otherFileList.value
}
fileArray.forEach(item => {
otherFiles.push(getFileParam(item))
})
//todo requirementId
- let params={
+ let params = {
...formData.value,
deploymentId: deploymentId.value,
fileList: otherFiles,
singleFile: singleFile,
requirementId: route.query.id
}
- console.log('重新提交params',params)
+ console.log('重新提交params', params)
resubmitReported(params).then(res => {
ElNotification({
title: '提示',
@@ -443,7 +441,7 @@ const getDetailInfo = async () => {
})
if (res.code === 1000) {
formData.value = res.data.formData
- loading.value=false
+ loading.value = false
}
})
}
@@ -474,7 +472,7 @@ const init = async () => {
onMounted(async () => {
await init()
if (route.query.projectId) {
- loading.value=true
+ loading.value = true
await getDetailInfo()
}
})
diff --git a/src/views/project-demand/summary/api/index.js b/src/views/project-demand/summary/api/index.js
index 26d0dba..f32bd7b 100644
--- a/src/views/project-demand/summary/api/index.js
+++ b/src/views/project-demand/summary/api/index.js
@@ -13,7 +13,7 @@ export const fileUp = (url, data) => {
export const requirementReported = (data) => {
return request({
- url: '/workflow/mosr/requirement/collect/reported',
+ url: '/workflow/mosr/requirement/reported',
method: "post",
data: data
});