fix : 修复页面bug

This commit is contained in:
2024-07-18 22:06:23 +08:00
parent 3ec7a9c78e
commit 9d5c393ebe
28 changed files with 562 additions and 286 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div v-loading="loading">
<el-row v-if="type==='execute'">
<el-row v-if="type==='execute'">
<el-col :span="24">
<baseTitle :title="'附件信息'"></baseTitle>
</el-col>
@@ -16,11 +16,11 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
<!-- <el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>-->
<el-button @click="handleSearchImplementationFileList" color="#DED0B2">搜索</el-button>
</el-form-item>
</el-form>
<fvTable style="width: 100%;min-height:162px;max-height: 162px" v-if="showAttachmentTable" height="162" :tableConfig="tableConfig"
<fvTable style="width: 100%;min-height:162px;max-height: 162px" v-if="showAttachmentTable" height="162"
:tableConfig="tableConfig"
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
@@ -28,7 +28,7 @@
</fvTable>
</el-row>
<baseTitle :title="getTagName(type)+getTitleInfo(data.taskId)" ></baseTitle>
<baseTitle v-if="type!='phase'" :title="getTagName(type)+getTitleInfo(data.taskId)"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
<el-form :model="formData" label-width="auto" style="margin-top: -15px">
<file-component :title="getTagName(type)+'附件'" :tag="getTagName(type)"
@@ -74,6 +74,7 @@ import {ElLoading, ElNotification} from 'element-plus';
import {downloadFile} from "@/api/project-demand";
import {searchImplementationFileList} from "@/api/project-manage/attachment";
import {getTags} from "@/api/project-manage";
const attachmentParam = reactive({
tag: ''
})
@@ -350,7 +351,7 @@ const getTagsOption = () => {
getTags(route.query.projectId).then(res => {
if (res.code === 1000) {
tagsOption.value = res.data
}else{
} else {
ElNotification({
title: '提示',
message: res.msg,
@@ -359,7 +360,7 @@ const getTagsOption = () => {
}
})
}
const handleSearch = () => {
const handleSearchImplementationFileList = () => {
let params = {
targetId: route.query.projectId,
targetState: "40"
@@ -380,7 +381,7 @@ const handleSearch = () => {
nextTick(() => {
showAttachmentTable.value = true
})
}else{
} else {
ElNotification({
title: '提示',
message: res.msg,
@@ -390,11 +391,10 @@ const handleSearch = () => {
})
}
const getTitleInfo=(taskId)=>{
if(taskId){
const getTitleInfo = (taskId) => {
if (taskId) {
return '审批'
}else {
} else {
return '信息'
}
}
@@ -423,13 +423,20 @@ const handleDownload = (row) => {
}
watchEffect(() => {
Object.keys(props.formData).length && (form.value?.setValues(props.formData))
if(props.formData.mode=='view'&&props.type&&props.type==='execute'){
handleSearch()
getTagsOption()
}
})
onMounted(() => {
// if (props.formData.mode == 'view' && props.type == 'execute') {
// handleSearchImplementationFileList()
// getTagsOption()
// }
})
console.log("propsprops", props.formData, props.type , props)
if (props.formData.mode == 'view' && props.type == 'execute') {
handleSearchImplementationFileList()
getTagsOption()
}
watch(() => props.loading, (newVal) => {
props.loading = newVal
}, {deep: true})