fix : 修复项目实施中功能细节
This commit is contained in:
@@ -1,7 +1,22 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<el-form :model="attachment" inline class="query-form" ref="queryForm">
|
||||
<el-form-item label="标签" prop="tag">
|
||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch" color="#DED0B2" >搜索</el-button>
|
||||
<el-button @click="handleUpload" color="#DED0B2" >上传附件</el-button>
|
||||
<!-- <file-upload @getFile="getFile" :showFileList="true"/>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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>
|
||||
@@ -12,22 +27,17 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {shallowRef} from "vue";
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {getImplementationAttachment} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '标签',
|
||||
prop: 'collectType',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择标签',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
}
|
||||
}
|
||||
])
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const attachment=reactive({
|
||||
tag:''
|
||||
})
|
||||
|
||||
const tagsOption = ref([])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -70,8 +80,31 @@ const tableConfig = reactive({
|
||||
})
|
||||
const showTable=ref(true)
|
||||
const otherFileList = ref([])
|
||||
const getOtherFile = () => {
|
||||
|
||||
const getTagsOption = (id=route.query.id) => {
|
||||
if(!route.query.id) return
|
||||
getImplementationAttachment(id).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if(res.code === 1000) {
|
||||
tagsOption.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleSearch = () => {
|
||||
console.log('attachment.tag',attachment.tag)
|
||||
// getTagsOption()
|
||||
}
|
||||
const handleUpload=()=>{
|
||||
router.push({
|
||||
name: 'Implementation/upload',
|
||||
query: {
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
@@ -82,6 +115,7 @@ const handleDownload = (row) => {
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
getTagsOption()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user