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 class="apply-block">
<el-row v-if="title==='check'">
<el-row v-if="title==='check'">
<el-col :span="24">
<baseTitle :title="'附件信息'"></baseTitle>
</el-col>
@@ -20,12 +20,13 @@
<el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>
</el-form-item>
</el-form>
<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"/>
</template>
</fvTable>
<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"/>
</template>
</fvTable>
</el-row>
<baseTitle :title="getTitleName(title)+'信息'"></baseTitle>
<el-form :model="localFormData" ref="formRef" label-width="auto" v-if="step!=='50'">
@@ -45,11 +46,11 @@
</el-form-item>
</el-col>
<el-col :span="24" v-if="title==='apply'">
<el-form-item label="项目成员" :required="true" prop=""
<el-form-item label="项目成员" :required="true" prop=""
label-width="125">
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowProjectPersonTable">
<!-- {{ localFormData.projectPersonIds ? '更改' : '请选择' }}-->
{{ projectPersonUserList.length !== 0 ? '更改' :getProjectPerson(projectPersonUserList)?'更改': '请选择' }}
{{ projectPersonUserList.length !== 0 ? '更改' : getProjectPerson(projectPersonUserList) ? '更改' : '请选择' }}
</el-button>
<div v-for="item in getProjectPerson(projectPersonUserList)" :key="item.id" style="margin-right: 5px">
{{ item.name }}
@@ -59,21 +60,23 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
<el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">
{{ localFormData.preProcess&&localFormData.preProcess.length>0 ? '更改' :sessionParams.preProcess&&sessionParams.preProcess.length>0 ? '更改' : '请选择' }}
{{
localFormData.preProcess && localFormData.preProcess.length > 0 ? '更改' : sessionParams.preProcess && sessionParams.preProcess.length > 0 ? '更改' : '请选择'
}}
</el-button>
<div v-for="item in getRequestName(localFormData.preProcess)" :key="item.requestId">
<a :href="item.baseUrl" target="_blank"
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{item.requestName}}
</a>
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ item.requestName }}
</a>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- v-if="showAttachment"-->
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
<!-- v-if="showAttachment"-->
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
v-model:otherFileList="otherFileList" :tag="getTitleName(props.title)"
@getAttachment="getAttachment" v-model:singleList="singleList" :showSingleTable="showSingleTable"
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
@@ -114,7 +117,7 @@
<el-button @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
<el-table :data="preProcessList" v-loading="loading"
<el-table :data="preProcessList" v-loading="loading"
@select="handleSelect" @select-all="handleSelect" row-key="requestId" ref="preProcessTable">
<el-table-column type="selection" width="55" :reserve-selection="true"/>
<el-table-column prop="requestId" label="请求id"></el-table-column>
@@ -164,6 +167,7 @@ import Paging from "@/components/pagination/index.vue";
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
import {searchImplementationFileList} from "@/api/project-manage/attachment";
const router = useRouter()
const route = useRoute()
const changeDiagram = ref(false)
@@ -290,63 +294,63 @@ const name = ref(router.currentRoute.value.name)
const deploymentId = ref()
const selectRows = ref([])
const projectId = ref(route.query.projectId)
const sessionParams=ref({})
const sessionParams = ref({})
if(localStorage.getItem('preProcess')){
let param=JSON.parse(localStorage.getItem('preProcess'))
localFormData.value.preProcess=param
sessionParams.value.preProcess=param
if (localStorage.getItem('preProcess')) {
let param = JSON.parse(localStorage.getItem('preProcess'))
localFormData.value.preProcess = param
sessionParams.value.preProcess = param
localStorage.setItem('preProcess', JSON.stringify(param))
}
if(localStorage.getItem('singleFile')){
let param=JSON.parse(localStorage.getItem('singleFile'))
localFormData.value.singleFile=param
singleList.value=[param]
if (localStorage.getItem('singleFile')) {
let param = JSON.parse(localStorage.getItem('singleFile'))
localFormData.value.singleFile = param
singleList.value = [param]
localStorage.setItem('singleFile', JSON.stringify(param))
showSingleTable.value=false
nextTick(()=>{
showSingleTable.value=true
})
showSingleTable.value = false
nextTick(() => {
showSingleTable.value = true
})
}
if(localStorage.getItem('otherFileList')){
let param=JSON.parse(localStorage.getItem('otherFileList'))
localFormData.value.otherFileList=param
otherFileList.value=param
if (localStorage.getItem('otherFileList')) {
let param = JSON.parse(localStorage.getItem('otherFileList'))
localFormData.value.otherFileList = param
otherFileList.value = param
localStorage.setItem('otherFileList', JSON.stringify(param))
showTable.value=false
nextTick(()=>{
showTable.value=true
})
showTable.value = false
nextTick(() => {
showTable.value = true
})
}
if(localStorage.getItem('projectChargePersonUserList')){
let param=JSON.parse(localStorage.getItem('projectChargePersonUserList'))
projectChargePersonUserList.value=param
if (localStorage.getItem('projectChargePersonUserList')) {
let param = JSON.parse(localStorage.getItem('projectChargePersonUserList'))
projectChargePersonUserList.value = param
localStorage.setItem('projectChargePersonUserList', JSON.stringify(param))
}
if(localStorage.getItem('projectPersonUserList')){
let param=JSON.parse(localStorage.getItem('projectPersonUserList'))
projectPersonUserList.value= param
localProjectPerson.value=param
if (localStorage.getItem('projectPersonUserList')) {
let param = JSON.parse(localStorage.getItem('projectPersonUserList'))
projectPersonUserList.value = param
localProjectPerson.value = param
localStorage.setItem('projectPersonUserList', JSON.stringify(param))
}
const getProjectPerson=(list)=>{
if(!list||list&&list.length===0){
if(localStorage.getItem('projectPersonUserList')){
let param=JSON.parse(localStorage.getItem('projectPersonUserList'))
projectPersonUserList.value=param
const getProjectPerson = (list) => {
if (!list || list && list.length === 0) {
if (localStorage.getItem('projectPersonUserList')) {
let param = JSON.parse(localStorage.getItem('projectPersonUserList'))
projectPersonUserList.value = param
return projectPersonUserList.value
}
}else {
} else {
return list
}
}
const getRequestName=(list)=>{
if(!list||(list&&list.length===0)){
if(sessionParams.value.preProcess){
const getRequestName = (list) => {
if (!list || (list && list.length === 0)) {
if (sessionParams.value.preProcess) {
return sessionParams.value.preProcess
}
}else {
} else {
return list
}
}
@@ -355,7 +359,7 @@ const getTagsOption = () => {
getTags(route.query.projectId).then(res => {
if (res.code === 1000) {
tagsOption.value = res.data
}else{
} else {
ElNotification({
title: '提示',
message: res.msg,
@@ -385,7 +389,7 @@ const handleSearch = () => {
nextTick(() => {
showAttachmentTable.value = true
})
}else{
} else {
ElNotification({
title: '提示',
message: res.msg,
@@ -398,9 +402,9 @@ const handleUpload = () => {
router.push({
name: 'Implementation/upload',
query: {
id: route.query.requirementId,
id: route.query.id,
projectId: route.query.projectId,
state: route.query.state,
projectId:route.query.projectId,
step: '40'
}
})
@@ -568,9 +572,9 @@ const getFileParam = (item) => {
const handleSubmit = async () => {
if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') {
if (localFormData.value.preProcess == undefined) {
if(JSON.parse(localStorage.getItem('preProcess'))?.length>0){
if (JSON.parse(localStorage.getItem('preProcess'))?.length > 0) {
}else {
} else {
ElNotification({
title: '提示',
message: '请选择前置流程!',
@@ -615,8 +619,8 @@ const handleSubmit = async () => {
projectId: projectId.value,
preProcess: JSON.stringify(localFormData.value.preProcess)
}
if(sessionParams.value.preProcess&&!localFormData.value.preProcess){
params.preProcess=JSON.stringify(sessionParams.value.preProcess)
if (sessionParams.value.preProcess && !localFormData.value.preProcess) {
params.preProcess = JSON.stringify(sessionParams.value.preProcess)
}
// console.log(params.preProcess)
let res
@@ -680,7 +684,7 @@ const handleSubmit = async () => {
}
}
const init = async () => {
if(props.title&&props.title==='check'){
if (props.title && props.title === 'check') {
handleSearch()
getTagsOption()
}
@@ -742,7 +746,7 @@ watchEffect(() => {
// console.log('projectPersonUserList.value',projectPersonUserList.value)
return flag
})
onActivated(()=>{
onActivated(() => {
init()
})
onMounted(async () => {