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

@@ -15,8 +15,7 @@
</el-form>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="分摊明细" name="first">
<expense-detail :formData="shareData.formData" :data="shareData"
:processViewer="shareProcessViewer" :detailList="detailList"
<expense-detail :processViewer="shareProcessViewer" :detailList="detailList"
:loading="loading"/>
</el-tab-pane>
<el-tab-pane label="分摊汇总" name="second">
@@ -39,6 +38,8 @@
</template>
<script setup lang="jsx">
import OperationRender from '@/views/workflow/common/OperationRender.vue'
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
import {ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js';
import {getAllocationDetail, getAllocationDetailList} from "@/api/expense-manage";

View File

@@ -1,11 +1,11 @@
<template>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="需求征集" name="00">
<search-files-by-tag v-if="showTable" @search="searchRequirement" @upload="upload"
<search-files-by-tag @search="searchRequirement" @upload="upload"
:otherFileList="otherFileList" :uploadState="uploadState"/>
</el-tab-pane>
<el-tab-pane label="需求上报" name="10">
<search-files-by-tag v-if="showTable" @search="searchReport" @upload="upload"
<search-files-by-tag @search="searchReport" @upload="upload"
:otherFileList="otherFileList" :uploadState="uploadState"/>
</el-tab-pane>
<el-tab-pane label="项目立项" name="20">
@@ -13,7 +13,7 @@
:otherFileList="otherFileList" :uploadState="uploadState"/>
</el-tab-pane>
<el-tab-pane label="项目实施" name="40">
<search-files-by-tag type="3" @search="searchImplementation" @upload="upload" ref="implementation"
<search-files-by-tag type="40" @search="searchImplementation" @upload="upload" ref="implementation"
:otherFileList="otherFileList" :uploadState="uploadState"/>
</el-tab-pane>
<el-tab-pane label="项目归档" name="50">
@@ -29,20 +29,18 @@ import {ElNotification} from "element-plus";
const route = useRoute()
const router = useRouter()
const activeName = ref('4')
const activeName = ref('50')
const attachment = ref({})
const showTable = ref(true)
const implementation = ref()
const uploadState = ref(true)
const otherFileList = ref([])
const projectId = ref(route.query.id)
const requirementId = ref(route.query.requirementId)
const handleClick = (tab) => {
let name = {}
switchSearch(name, tab.props.name)
switchSearch(tab.props.name)
}
const switchSearch = (name, index) => {
const switchSearch = (index) => {
switch (index) {
case '00':
searchRequirement({})
@@ -88,6 +86,7 @@ const searchInitiation = async (param) => {
const searchImplementation = async (param) => {
param.targetState = '40'
param.targetId = projectId.value
console.log('param',param)
searchFileList(param).then(res => {
changeFileList(res)
})
@@ -102,13 +101,9 @@ const searchFiling = async (param) => {
const changeFileList = (res) => {
showTable.value = false
if (res.code === 1000) {
otherFileList.value = res.data.fileList
uploadState.value = res.data.upload
nextTick(() => {
showTable.value = true
})
} else {
ElNotification({
title: '提示',
@@ -120,19 +115,19 @@ const changeFileList = (res) => {
onMounted(() => {
if (activeName.value === '4') {
if (activeName.value === '50') {
searchFiling({})
}
})
const upload = () => {
if (activeName.value === '3') {
if (activeName.value === '40') {
router.push({
name: 'Implementation/upload',
query: {
id: route.query.id,
type: '3'
type: '40'
}
})
} else {
@@ -146,15 +141,15 @@ const upload = () => {
}
const switchUpload = (index) => {
switch (index) {
case '0':
case '00':
return 'Requirement/upload';
case '1':
case '10':
return 'Summary/upload';
case '2':
case '20':
return 'Initiation/upload';
case '3':
case '40':
return 'Implementation/upload';
case '4':
case '50':
return 'Filing/upload';
}
}

View File

@@ -161,7 +161,7 @@ const handleSubmit = async (instance) => {
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
if(route.query.type=='3'){
if(route.query.type==='40'){
await router.push({
name: 'Filing/attachment',
query:{