fix : 修复项目实施附件查询及上传功能、代码文件优化
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
<template>
|
||||
<!-- <baseTitle title="标签名称"></baseTitle>-->
|
||||
<!-- <el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">-->
|
||||
<!-- <el-form-item label="标签名称" prop="tagName">-->
|
||||
<!-- <el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<baseTitle title="上传附件"></baseTitle>
|
||||
<el-card style="width: 100%;margin: 15px 0">
|
||||
<file-upload @getFile="getFile" />
|
||||
@@ -23,7 +17,7 @@
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {uploadFilingAttachment} from "@/api/project-manage";
|
||||
import {uploadFileList} from "@/api/project-manage/attachment";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
@@ -76,6 +70,24 @@ const rules = reactive({
|
||||
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||
})
|
||||
const compositeParam = (item) => {
|
||||
let tag=''
|
||||
switch (route.query.name) {
|
||||
case '00':
|
||||
tag='需求征集'
|
||||
break
|
||||
case '10':
|
||||
tag='需求上报'
|
||||
break
|
||||
case '20':
|
||||
tag='项目立项'
|
||||
break
|
||||
case '40':
|
||||
tag='项目实施'
|
||||
break
|
||||
case '50':
|
||||
tag='项目归档'
|
||||
break
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
@@ -83,7 +95,7 @@ const compositeParam = (item) => {
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
newFile: true,
|
||||
tag: '项目归档',
|
||||
tag: tag,
|
||||
}
|
||||
}
|
||||
const getFile = (val) => {
|
||||
@@ -106,10 +118,11 @@ const handleSubmit = async () => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
mosrUserFileDtoList: files,
|
||||
fileList: files,
|
||||
targetState:'',
|
||||
projectId: route.query.id,
|
||||
}
|
||||
let res = await uploadFilingAttachment(params)
|
||||
let res = await uploadFileList(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
|
||||
Reference in New Issue
Block a user