fix : 修复项目实施附件查询及上传功能
This commit is contained in:
@@ -1,23 +1,30 @@
|
||||
<template>
|
||||
<el-form :model="attachment" inline class="query-form">
|
||||
<el-form-item label="关键词" prop="tag">
|
||||
<el-input v-model="attachment.tag" placeholder="请输入" clearable filterable style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
|
||||
<el-button color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>-->
|
||||
<el-card style="width: 100%">
|
||||
<file-upload @getFile="getOtherFile" :showFileList="true"/>
|
||||
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="需求征集" name="first">
|
||||
<el-form :model="attachment" inline class="query-form">
|
||||
<el-form-item label="关键词" prop="tag">
|
||||
<el-input v-model="attachment.tag" placeholder="请输入" clearable filterable style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
|
||||
<el-button color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>-->
|
||||
<el-card style="width: 100%">
|
||||
<file-upload @getFile="getOtherFile" :showFileList="true"/>
|
||||
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="分摊汇总" name="second">
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
@@ -25,6 +32,7 @@ import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const activeName = ref('first')
|
||||
const attachment = reactive({
|
||||
tag: ''
|
||||
})
|
||||
@@ -76,7 +84,7 @@ const tableConfig = reactive({
|
||||
}
|
||||
]
|
||||
})
|
||||
const showTable=ref(true)
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const handleUpload = () => {
|
||||
router.push({
|
||||
@@ -91,7 +99,7 @@ const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href=URL.createObjectURL(blob)
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user