fix : 修复项目归档全部附件名称搜索

This commit is contained in:
2024-10-25 20:52:03 +08:00
parent c5d7961b4d
commit e0299baf46
2 changed files with 14 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div v-loading="_value">
<el-form :model="attachment" inline style="margin-left: 15px">
<el-form :model="attachment" inline style="margin-left: 15px" @submit.prevent="handleSearch">
<el-form-item label="名称" prop="fileName">
<el-input v-model="attachment.fileName" placeholder="请输入文件名查询" clearable filterable style="width: 300px"/>
</el-form-item>
@@ -17,7 +17,7 @@
<el-form-item>
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
<el-button @click="handleReset">重置</el-button>
<el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>
<el-button v-if="uploadState&&!allFile" color="#DED0B2" @click="handleUpload">上传附件</el-button>
</el-form-item>
</el-form>
<el-card style="width: 100%;overflow-y: hidden">
@@ -59,6 +59,10 @@ const props = defineProps({
loading: {
type: Boolean,
default: true
},
allFile: {
type: Boolean,
default: false
}
})
const tagsOption = ref([])
@@ -150,6 +154,7 @@ const getTagsOption = () => {
})
}
const handleSearch = () => {
console.info("🚀 ~method:'attachment' -----", attachment)
emit('search', attachment)
}
const handleReset=()=>{

View File

@@ -4,7 +4,7 @@
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane v-for="item in paneList" :label="item.label" :name="item.name">
<search-files-by-tag @search="search" @upload="upload" :type="item.name==='30'?'30':''"
<search-files-by-tag @search="search" @upload="upload" :type="item.name==='30'?'30':''" :allFile="item.name=='all'?true:false"
:fileList="fileList" :uploadState="uploadState" v-model:loading="loading"/>
</el-tab-pane>
</el-tabs>
@@ -327,8 +327,12 @@ const handleClick = (tab) => {
const search = async (param) => {
if( activeName.value=='all'){
param.targetId = projectId.value
searchAllFileList(param).then(res => {
let params={
targetId:projectId.value,
fileName:param.fileName
}
// param.targetId = projectId.value
searchAllFileList(params).then(res => {
loading.value = false
changeFileList(res)
})