Merge pull request 'fix : 附件上传修复' (#590) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/590
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<baseTitle title="基础信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||
<baseTitle title="项目实施-上传附件"></baseTitle>
|
||||
<el-form :model="formData" ref="tagForm" label-width="auto" >
|
||||
<el-form :model="formData" ref="tagForm" label-width="auto">
|
||||
<el-form-item label="标签名称" prop="tagName">
|
||||
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px" v-if="showInput" clearable/>
|
||||
<el-select v-model="formData.tagName" placeholder="请选择标签名称" clearable filterable style="width: 300px" v-else>
|
||||
@@ -18,13 +18,14 @@
|
||||
</el-form>
|
||||
<div style="display: flex; align-items: center">
|
||||
<baseTitle title="其他文件" style="margin-right: 10px"></baseTitle>
|
||||
<file-upload @getFile="getFile" :disabled="!formData.tagName" :title="!formData.tagName?'请先选择/输入标签!':''"/></div>
|
||||
<fvTable style="width: 100%;max-height: 162px;" v-if="showTable" height="162" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
<file-upload @getFile="getFile" :disabled="!formData.tagName" :title="!formData.tagName?'请先选择/输入标签!':''"/>
|
||||
</div>
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" height="300" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="99" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(tagForm)">提交</el-button>
|
||||
</div>
|
||||
@@ -37,7 +38,7 @@ import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {uploadFileList} from "@/api/project-manage/attachment";
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {downloadFile,deleteFile} from "@/api/project-demand";
|
||||
import {downloadFile, deleteFile} from "@/api/project-demand";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
@@ -130,14 +131,14 @@ const name = ref(router.currentRoute.value.name)
|
||||
const rules = reactive({
|
||||
tagName: [{required: true, message: '请输入标签名称', trigger: ['blur', 'change']}],
|
||||
})
|
||||
onActivated(()=>{
|
||||
onActivated(() => {
|
||||
console.log('onActivated')
|
||||
formData.value.tagName = '';
|
||||
showTable.value=false
|
||||
nextTick(()=>{
|
||||
showTable.value=true
|
||||
showTable.value = false
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
fileList.value=[]
|
||||
fileList.value = []
|
||||
})
|
||||
const handleDelete = (row) => {
|
||||
deleteFile(row.fileId).then(res => {
|
||||
@@ -246,15 +247,24 @@ const handleSubmit = async (instance) => {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
await router.push({
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: route.query.id,
|
||||
state: route.query.state,
|
||||
projectId: route.query.projectId,
|
||||
step: '40'
|
||||
}
|
||||
})
|
||||
if (router.query.type !== '40') {
|
||||
router.push({
|
||||
name: 'Implementation/attachment',
|
||||
query: {
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
} else {
|
||||
await router.push({
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: route.query.id,
|
||||
state: route.query.state,
|
||||
projectId: route.query.projectId,
|
||||
step: '40'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user