fix : 项目归档附件查询功能优化
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-form :model="attachment" inline>
|
||||
<el-form-item label="关键词" prop="name">
|
||||
<el-input v-model="attachment.name" placeholder="请输入" clearable filterable style="width: 300px"/>
|
||||
<el-form-item label="名称" prop="fileName">
|
||||
<el-input v-model="attachment.fileName" placeholder="请输入附件名称查询" clearable filterable style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="标签" prop="tag" v-if="type==='3'">
|
||||
<el-form-item label="标签" prop="tag" v-if="type==='40'">
|
||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
@@ -35,10 +35,7 @@ import {getTags} from "@/api/project-manage";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const attachment = reactive({
|
||||
name: '',
|
||||
tag: ''
|
||||
})
|
||||
const attachment = reactive({})
|
||||
const emit = defineEmits(['search'])
|
||||
const props = defineProps({
|
||||
otherFileList: {
|
||||
@@ -47,7 +44,7 @@ const props = defineProps({
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: '0'
|
||||
default: '00'
|
||||
},
|
||||
uploadState:{
|
||||
type: Boolean,
|
||||
@@ -68,12 +65,13 @@ const tableConfig = reactive({
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'processNodeTag',
|
||||
label: '内置标签',
|
||||
align: 'center'
|
||||
prop: 'size',
|
||||
label: '文件大小',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
prop: 'createTime',
|
||||
label: '上传时间',
|
||||
align: 'center',
|
||||
},
|
||||
@@ -95,11 +93,7 @@ const tableConfig = reactive({
|
||||
const showTable = ref(true)
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.id) return
|
||||
let params = {
|
||||
projectId: route.query.id
|
||||
}
|
||||
getTags(params).then(res => {
|
||||
|
||||
getTags(route.query.id).then(res => {
|
||||
if (res.code === 1000) {
|
||||
tagsOption.value = res.data
|
||||
} else {
|
||||
@@ -127,11 +121,7 @@ const handleDownload = (row) => {
|
||||
})
|
||||
}
|
||||
watch(() => props.type, (val) => {
|
||||
console.log('va四川省l', val)
|
||||
props.type = val
|
||||
if (val === '3') {
|
||||
getTagsOption()
|
||||
}
|
||||
})
|
||||
watch(() => props.otherFileList, (val) => {
|
||||
showTable.value = false
|
||||
@@ -140,12 +130,9 @@ watch(() => props.otherFileList, (val) => {
|
||||
})
|
||||
props.otherFileList = val
|
||||
})
|
||||
if (props.type === '3') {
|
||||
if (props.type === '40') {
|
||||
getTagsOption()
|
||||
}
|
||||
defineExpose({
|
||||
tagsOption
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user