fix : 修复项目附件页面细节

This commit is contained in:
2024-05-30 16:46:51 +08:00
parent 94528cfa06
commit 0c1e566578
3 changed files with 63 additions and 11 deletions

View File

@@ -1,7 +1,14 @@
<template>
<el-form :model="attachment" inline class="query-form">
<el-form-item label="标签" prop="tag">
<el-input v-model="attachment.tag" placeholder="请输入标签" clearable style="width: 200px"/>
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 200px">
<el-option
v-for="item in tagsOption"
:key="item.label"
:label="item.value"
:value="item.label"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
@@ -20,7 +27,7 @@
<script setup lang="jsx">
import {downloadFile} from "@/api/project-demand";
import {getImplementationAttachment} from "@/api/project-manage";
import {getImplementationAttachment,getTags} from "@/api/project-manage";
import {ElNotification} from "element-plus";
const route = useRoute()
@@ -28,6 +35,7 @@ const router = useRouter()
const attachment = reactive({
tag: ''
})
const tagsOption = ref([])
const tableConfig = reactive({
columns: [
{
@@ -70,7 +78,19 @@ const tableConfig = reactive({
})
const showTable = ref(true)
const otherFileList = ref([])
const getTagsOption = () => {
if (!route.query.id) return
getTags(route.query.id).then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
tagsOption.value = res.data
}
})
}
const handleSearch = () => {
let params
if (attachment.tag) {
@@ -115,6 +135,7 @@ const handleDownload = (row) => {
a.click()
})
}
// getTagsOption()
handleSearch()
</script>