fix : 修复项目立项上传文件bug
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="label" prop="attachment">
|
||||
<template v-if="preview&&JSON.stringify(singleFile) !== '{}'&&JSON.stringify(singleFile)!=='null'">
|
||||
<el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 18px">
|
||||
<el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 16px">
|
||||
{{ singleFile?.originalFileName }}
|
||||
</el-button>
|
||||
<el-button type="danger" link @click="deleteOtherFile(singleFile,1)">删除</el-button>
|
||||
<el-button type="danger" link @click="deleteSingleFile(singleFile,1)">删除</el-button>
|
||||
</template>
|
||||
<template v-else-if="!preview||JSON.stringify(singleFile) === '{}'||singleFile==null">
|
||||
<template v-else-if="!preview||JSON.stringify(singleFile) == '{}'||singleFile==null">
|
||||
<file-upload @getFile="getAttachment" :showFileList="showFileList" :multiple="false" :maxSize="1"
|
||||
:disabled="isSingleFile" @delete="deleteAttachment"/>
|
||||
</template>
|
||||
@@ -175,7 +175,7 @@ const deleteAttachment = (val) => {
|
||||
}
|
||||
});
|
||||
}
|
||||
const deleteOtherFile = (row, type) => {
|
||||
const deleteSingleFile = (row, type) => {
|
||||
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -188,6 +188,7 @@ const deleteOtherFile = (row, type) => {
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
isSingleFile.value=false
|
||||
if (type === 1) {
|
||||
singleFile.value = {}
|
||||
} else {
|
||||
|
||||
@@ -106,7 +106,7 @@ const searchConfig = reactive([
|
||||
props: {
|
||||
placeholder: '请选择状态',
|
||||
clearable: true,
|
||||
cacheKey: 'project_initiation'
|
||||
cacheKey: 'project_filing'
|
||||
}
|
||||
},
|
||||
// {
|
||||
|
||||
@@ -115,6 +115,7 @@ const compositeParam = (item) => {
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
file.value = compositeParam(val)
|
||||
formData.value.singleFile = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
@@ -163,7 +164,6 @@ const handleSubmit = (instance) => {
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
|
||||
console.log('params', params)
|
||||
let res = await projectApply(params)
|
||||
ElNotification({
|
||||
|
||||
@@ -68,13 +68,13 @@ export default defineConfig({
|
||||
strictPort: false,
|
||||
open: true,
|
||||
proxy: {
|
||||
// '/api/workflow': {
|
||||
// target: 'http://frp.feashow.cn:31800/',
|
||||
// // target: 'http://clay.frp.feashow.cn/',
|
||||
// // target: 'http://192.168.31.175:8000',
|
||||
// changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||
// },
|
||||
'/api/workflow': {
|
||||
// target: 'http://frp.feashow.cn:31800/',
|
||||
target: 'http://clay.frp.feashow.cn/',
|
||||
// target: 'http://192.168.31.175:8000',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
},
|
||||
// '/summary/admin': {
|
||||
// // target: 'http://frp.feashow.cn:31800/',
|
||||
// target: 'http://clay.frp.feashow.cn/',
|
||||
|
||||
Reference in New Issue
Block a user