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