fix : 项目归档附件查询功能优化

This commit is contained in:
2024-06-02 23:17:06 +08:00
parent 83fd1b37e2
commit 747b40f9ba
6 changed files with 89 additions and 85 deletions

View File

@@ -1,34 +1,15 @@
<template>
<div v-loading="loading">
<el-form :model="formData" ref="form" class="query-form" label-width="auto">
<el-row>
<el-col :span="24">
<el-form-item>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item>
<el-table :data="detailList" style="width: 100%">
<el-table-column prop="projectId" label="项目名称" width="180"/>
<el-table-column prop="researchPersonnel" label="研发人员" width="180"/>
<el-table-column prop="wagesPayable" label="应发工资"/>
<el-table-column prop="performance" label="绩效"/>
<el-table-column prop="reserveFund" label="公积金"/>
<el-table-column prop="socialSecurity" label="社保"/>
<el-table-column prop="annuity" label="年金"/>
<el-table-column prop="workday" label="工作日(天)"/>
<el-table-column prop="researchDuration" label="研发时长(天)"/>
</el-table>
</el-form-item>
</el-col>
</el-row>
</el-form>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="detailList" style="width: 100%">
<template #empty>
<el-empty description="暂无数据"/>
</template>
</fvTable>
</div>
</template>
<script setup lang="jsx">
const searchConfig = reactive([
{
label: '项目名称',
@@ -63,16 +44,57 @@ const searchConfig = reactive([
colProps: {}
},
])
const tableConfig = reactive({
columns: [
{
prop: 'projectName',
label: '项目名称',
align: 'center'
},
{
prop: 'researchPersonnel',
label: '研发人员',
align: 'center'
},
{
prop: 'wagesPayable',
label: '应发工资',
align: 'center'
},
{
prop: 'performance',
label: '绩效',
align: 'center'
},
{
prop: 'reserveFund',
label: '公积金',
align: 'center'
},
{
prop: 'socialSecurity',
label: '社保',
align: 'center'
},
{
prop: 'annuity',
label: '年金',
align: 'center'
},
{
prop: 'workday',
label: '工作日(天)',
align: 'center'
},
{
prop: 'researchDuration',
label: '研发时长(天)',
align: 'center'
},
]
})
const tableIns = ref()
const props = defineProps({
formData: {
type: Array,
default: []
},
data: {
type: Array,
default: []
},
detailList: {
type: Array,
default: []

View File

@@ -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>