fix : 修改表格高度,页面左右边距,上传文件不能和标题并排

This commit is contained in:
2024-08-13 17:21:19 +08:00
parent fa054d2a07
commit 38b6299dbf
24 changed files with 305 additions and 197 deletions

View File

@@ -19,7 +19,7 @@
<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"
<fvTable style="width: 100%;min-height:160px;max-height: 160px" v-if="showAttachmentTable" height="160"
:tableConfig="executeTableConfig" class="execute-table"
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
<template #empty>
@@ -97,7 +97,7 @@ const executeTableConfig = reactive({
prop: 'originalFileName',
label: '文件名',
align: 'center',
width: 700,
// width: 700,
currentRender: ({row, index}) => (
<div style="color: #2a99ff;cursor: pointer;" onClick={() => clickToPreview(row)}>{row.originalFileName}</div>)
},
@@ -105,13 +105,13 @@ const executeTableConfig = reactive({
prop: 'tag',
label: '标签',
align: 'center',
width: 200,
// width: 200,
},
{
prop: 'size',
label: '文件大小',
align: 'center',
width: 450,
// width: 450,
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
},
{
@@ -350,7 +350,24 @@ const schema = computed(() => {
}
})
} else if (props.type == 'execute') {
arr = []
arr = [{
label: '部门分管领导',
prop: 'optionalChargeLeadership',
colProps: {
span: 24
},
labelWidth: 'left',
component: () => (
<div>
{
props.formData.optionalChargeLeadership?.length > 0 ? props.formData.optionalChargeLeadership.map(item => {
return <span>{item.name} </span>
}) : <span>{'--'}</span>
}
</div>
)
},]
if (props.preProcessShow == 'EDIT') {
preProcess = {
label: '前置流程',
@@ -370,23 +387,6 @@ const schema = computed(() => {
}
arr.push(preProcess)
arr.push(
{
label: '部门分管领导',
prop: 'optionalChargeLeadership',
colProps: {
span: 24
},
labelWidth: 'left',
component: () => (
<div>
{
props.formData.optionalChargeLeadership?.length > 0 ? props.formData.optionalChargeLeadership.map(item => {
return <span>{item.name} </span>
}) : <span>{'--'}</span>
}
</div>
)
},
{
label: '项目验收附件',
prop: 'singleFile',
@@ -591,11 +591,11 @@ watch(() => props.loading, (newVal) => {
}
}
//:deep(.el-table__body) {
// .el-table__cell:first-child {
// .cell {
// margin-left: -13px !important;
// }
// }
//}
:deep(.el-table__body) {
.el-table__cell:first-child {
.cell {
margin-left: 5px !important;
}
}
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<div v-loading="loading" :style="type==='singleDetail'?'padding: 0 40px':''">
<div v-loading="loading" :style="type==='singleDetail'?'padding: 0 30px':''">
<baseTitle title="需求征集信息" v-if="type!=='singleDetail'"></baseTitle>
<el-form :model="formData" >
<el-row gutter="20" style="margin-left: 5px">

View File

@@ -2,7 +2,7 @@
<el-form :label-position="labelAlign">
<el-form-item :label="title?'其他文件':''" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign" :label-width="title?95:''" :style="{marginTop: '10px',marginLeft: tag!=='需求上报'?'15px':'0'}">
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
<fvTable style="width: 100%;max-height: 162px;" v-if="processViewer" height="162" :tableConfig="tableConfig"
<fvTable style="width: 100%;max-height: 160px;" v-if="processViewer" height="160" :tableConfig="tableConfig"
:data="_value" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
@@ -194,7 +194,7 @@ watch(() => props.processViewer, (newVal) => {
<style scoped lang="scss">
:deep(.el-table--fit ) {
height: 162px !important;
height: 160px !important;
}
</style>

View File

@@ -20,7 +20,7 @@
<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"
<fvTable style="width: 100%;min-height:160px;max-height: 160px" v-if="showAttachmentTable" height="160"
:tableConfig="executeTableConfig" class="execute-apply-table"
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
<template #empty>
@@ -51,8 +51,8 @@
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowProjectPersonTable">
{{ projectPersonUserList?.length !== 0 ? '更改' : getProjectPerson(projectPersonUserList) ? '更改' : '请选择' }}
</el-button>
<div v-for="item in getProjectPerson(projectPersonUserList)" :key="item.id" style="margin-right: 5px">
{{ item.name }}
<div v-for="(item,index) in getProjectPerson(projectPersonUserList)" :key="item.id" >
{{ item.name }}{{index != getProjectPerson(projectPersonUserList)?.length - 1 ? '' : ''}}
</div>
<user-picker :multiple="true" ref="projectPersonUserPicker" title="请选择项目成员"
v-model:value="projectPersonUserList" @ok="projectPersonUserPickerOk"/>
@@ -66,9 +66,9 @@
optionalChargeLeadershipList?.length !== 0 ? '更改' : getOptionalChargeLeadershipList(optionalChargeLeadershipList) ? '更改' : '请选择'
}}
</el-button>
<div v-for="item in getOptionalChargeLeadershipList(optionalChargeLeadershipList)" :key="item.id"
style="margin-right: 5px">
{{ item.name }}
<div v-for="(item,index) in getOptionalChargeLeadershipList(optionalChargeLeadershipList)" :key="item.id"
>
{{ item.name }}{{index != getProjectPerson(projectPersonUserList)?.length - 1 ? '' : ''}}
</div>
<user-picker :multiple="true" ref="optionalChargeLeadershipPickerRef" title="请选择部门分管领导"
v-model:value="optionalChargeLeadershipList" @ok="optionalChargeLeaderPickerOk"/>

View File

@@ -29,7 +29,7 @@
<baseTitle title="关联项目" v-if="!data.taskId"></baseTitle>
<el-col :span="24" v-if="!data.taskId" >
<el-form-item >
<fvTable style="width: 100%;max-height:162px" height="162" v-if="showTable" :tableConfig="projectTable"
<fvTable style="width: 100%;max-height:160px" height="160" v-if="showTable" :tableConfig="projectTable"
:data="formData.projects" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
@@ -37,10 +37,10 @@
</fvTable>
</el-form-item>
</el-col>
<baseTitle title="附件列表"></baseTitle>
<baseTitle title="附件文件"></baseTitle>
<el-col :span="24">
<el-form-item>
<fvTable style="width: 100%;max-height: 162px;" height="162" v-if="showTable" :tableConfig="fileTable"
<fvTable style="width: 100%;max-height: 160px;" height="160" v-if="showTable" :tableConfig="fileTable"
:data="formData.files" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>

View File

@@ -21,7 +21,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="实用性新型专利(项)" prop="newPatent">
<el-form-item label="新型专利(项)" prop="newPatent">
<span>{{ localFormData.newPatent }}</span>
</el-form-item>
</el-col>
@@ -50,7 +50,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="研发项目关键内容描述" prop="contentDescription">
<el-form-item label="建设目标描述" prop="contentDescription">
<span style="white-space: pre-wrap">{{ localFormData.contentDescription }}</span>
</el-form-item>
</el-col>
@@ -68,7 +68,7 @@
<!-- </el-form-item>-->
</el-col>
</el-row>
<baseTitle title="附件列表" style="margin-bottom: 0"></baseTitle>
<baseTitle title="附件文件" style="margin-bottom: 0"></baseTitle>
<el-row gutter="20" style="margin-bottom: -18px;">
<el-col :span="24">
<file-component tag="需求上报"