fix : 修复详情排版

This commit is contained in:
2024-08-07 21:54:46 +08:00
parent 66746458ee
commit 5cdec2b677
9 changed files with 143 additions and 72 deletions

View File

@@ -1,5 +1,5 @@
<template>
<el-form :model="formData" ref="applyForm" :rules="rules" :label-position="labelPosition">
<el-form :model="formData" ref="applyForm" :rules="rules" :label-position="labelPosition" style="margin-left: 5px">
<el-row>
<el-col :span="24">
<el-form-item :label="label" prop="attachment" >

View File

@@ -2,9 +2,9 @@
<div v-loading="loading">
<el-row v-if="type==='execute'">
<el-col :span="24">
<baseTitle :title="'附件信息'"></baseTitle>
<baseTitle :title="'附件信息'" style="margin-bottom: 5px"></baseTitle>
</el-col>
<el-form :model="attachmentParam" inline style="margin-top: 15px">
<el-form :model="attachmentParam" inline style="margin-top: 15px;margin-left: 15px">
<el-form-item label="标签" prop="tag">
<el-select v-model="attachmentParam.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
<el-option
@@ -20,7 +20,7 @@
</el-form-item>
</el-form>
<fvTable style="width: 100%;min-height:162px;max-height: 162px" v-if="showAttachmentTable" height="162"
:tableConfig="executeTableConfig"
:tableConfig="executeTableConfig" class="execute-table"
: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 v-if="type!='phase'" :title="getTagName(type)+getTitleInfo(data.taskId)"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
<fvForm :schema="schema" @getInstance="(e)=>form = e" style="margin-left: 15px"></fvForm>
<el-form :model="formData" label-width="auto" style="margin-top: -15px">
<file-component :title="getTagName(type)+'附件'" :tag="getTagName(type)"
v-model:value="formData.fileList" :processViewer="processViewer"
@@ -92,24 +92,26 @@ const executeTableConfig = reactive({
type: 'index',
label: '序号',
align: 'center',
width: '80',
},
{
prop: 'originalFileName',
label: '文件名',
align: 'center',
width: 700,
currentRender: ({row, index}) => (
<div style="color: #2a99ff;cursor: pointer;" onClick={() => clickToPreview(row)}>{row.originalFileName}</div>)
},
{
prop: 'tag',
label: '标签',
align: 'center'
align: 'center',
width: 200,
},
{
prop: 'size',
label: '文件大小',
align: 'center',
width: 450,
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
},
{
@@ -264,7 +266,7 @@ const schema = computed(() => {
label: '项目负责人',
prop: 'projectChargePerson',
colProps: {
span: 24
span: 6
},
labelWidth: 'left',
component: () => (
@@ -281,14 +283,15 @@ const schema = computed(() => {
label: '项目成员',
prop: 'projectPersonList',
colProps: {
span: 24
span: 6
},
labelWidth: 'left',
component: () => (
<div>
{
props.formData.projectPersonList ? props.formData.projectPersonList.map(item => {
return <span>{item.name} </span>
props.formData.projectPersonList ? props.formData.projectPersonList.map((item, index) => {
return <span>{item.name}
<span>{index != props.formData.projectPersonList?.length - 1 ? '' : ''}</span></span>
}) : <span>{'--'}</span>
}
</div>
@@ -298,13 +301,13 @@ const schema = computed(() => {
label: '部门分管领导',
prop: 'optionalChargeLeadership',
colProps: {
span: 24
span: 6
},
labelWidth: 'left',
component: () => (
<div>
{
props.formData.optionalChargeLeadership?.length>0 ? props.formData.optionalChargeLeadership.map(item => {
props.formData.optionalChargeLeadership?.length > 0 ? props.formData.optionalChargeLeadership.map(item => {
return <span>{item.name} </span>
}) : <span>{'--'}</span>
}
@@ -377,7 +380,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.optionalChargeLeadership?.length>0 ? props.formData.optionalChargeLeadership.map(item => {
props.formData.optionalChargeLeadership?.length > 0 ? props.formData.optionalChargeLeadership.map(item => {
return <span>{item.name} </span>
}) : <span>{'--'}</span>
}
@@ -557,7 +560,41 @@ watch(() => props.loading, (newVal) => {
props.loading = newVal
}, {deep: true})
</script>
<style lang="scss">
.execute-table {
.el-table__header {
.el-table__cell:last-child {
.cell {
margin-left: -160px !important;
}
}
}
.el-table__body {
.el-table__cell:last-child{
.cell {
margin-left: -160px !important;
}
}
}
}
</style>
<style lang="scss" scoped>
:deep(.el-table__header) {
.is-leaf:first-child {
.cell {
margin-left: 10px !important;
white-space: nowrap;
padding: 0;
}
}
}
//:deep(.el-table__body) {
// .el-table__cell:first-child {
// .cell {
// margin-left: -13px !important;
// }
// }
//}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<el-form :label-position="labelAlign">
<el-form-item :label="title?'其他文件':''" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign" :label-width="title?95:''" style="margin-top: 10px">
<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"
:data="_value" :isSettingCol="false" :pagination="false">
@@ -196,19 +196,5 @@ watch(() => props.processViewer, (newVal) => {
:deep(.el-table--fit ) {
height: 162px !important;
}
:deep(.el-table__header) {
.is-leaf:first-child {
.cell {
margin-left: -25px !important;
}
}
}
:deep(.el-table__body) {
.el-table__cell:first-child {
.cell {
margin-left: -13px !important;
}
}
}
</style>

View File

@@ -4,7 +4,7 @@
<el-col :span="24">
<baseTitle :title="'附件信息'"></baseTitle>
</el-col>
<el-form :model="attachmentParam" inline >
<el-form :model="attachmentParam" inline style="margin-left: 15px">
<el-form-item label="标签" prop="tag">
<el-select v-model="attachmentParam.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
<el-option
@@ -21,7 +21,7 @@
</el-form-item>
</el-form>
<fvTable style="width: 100%;min-height:162px;max-height: 162px" v-if="showAttachmentTable" height="162"
:tableConfig="tableConfig"
:tableConfig="executeTableConfig" class="execute-apply-table"
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
@@ -31,9 +31,10 @@
<baseTitle :title="getTitleName(title)+'信息'"></baseTitle>
<el-form :model="localFormData" ref="formRef" label-width="auto" v-if="step!=='50'">
<el-row>
<el-col :span="24" v-if="title==='apply'">
<el-form-item label="项目负责人" :required="true" prop=""
label-width="106">
<el-col :span="6" v-if="title==='apply'">
<!-- label-width="106"-->
<el-form-item label="项目负责人" :required="true" prop="" label-width="111"
>
<el-button style="margin-right: 10px" color="#DED0B2" @click="handleShowProjectChargePersonTable">
{{ projectChargePersonUserList?.length !== 0 ? '更改' : '请选择' }}
</el-button>
@@ -44,9 +45,9 @@
v-model:value="projectChargePersonUserList" @ok="projectChargePersonUserPickerOk"/>
</el-form-item>
</el-col>
<el-col :span="24" v-if="title==='apply'">
<el-form-item label="项目成员" :required="true" prop=""
label-width="106">
<el-col :span="6" v-if="title==='apply'">
<el-form-item label="项目成员" :required="true" prop="" label-width="85"
>
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowProjectPersonTable">
{{ projectPersonUserList?.length !== 0 ? '更改' : getProjectPerson(projectPersonUserList) ? '更改' : '请选择' }}
</el-button>
@@ -57,13 +58,16 @@
v-model:value="projectPersonUserList" @ok="projectPersonUserPickerOk"/>
</el-form-item>
</el-col>
<el-col :span="24" v-if="title==='apply'||title==='check'">
<el-form-item label="部门分管领导"
label-width="106">
<el-col :span="6" v-if="title==='apply'||title==='check'">
<el-form-item label="部门分管领导" label-width="115"
>
<el-button color="#DED0B2" style="margin-right: 10px" @click="handleShowOptionalChargeLeadershipPicker">
{{ optionalChargeLeadershipList?.length !== 0 ? '更改' : getOptionalChargeLeadershipList(optionalChargeLeadershipList) ? '更改' : '请选择' }}
{{
optionalChargeLeadershipList?.length !== 0 ? '更改' : getOptionalChargeLeadershipList(optionalChargeLeadershipList) ? '更改' : '请选择'
}}
</el-button>
<div v-for="item in getOptionalChargeLeadershipList(optionalChargeLeadershipList)" :key="item.id" style="margin-right: 5px">
<div v-for="item in getOptionalChargeLeadershipList(optionalChargeLeadershipList)" :key="item.id"
style="margin-right: 5px">
{{ item.name }}
</div>
<user-picker :multiple="true" ref="optionalChargeLeadershipPickerRef" title="请选择部门分管领导"
@@ -79,7 +83,8 @@
</el-button>
<div v-for="(item,index) in getRequestName(localFormData.preProcess)" :key="item.requestId">
<a :href="item.baseUrl" target="_blank"
style="color: #2a99ff;cursor: pointer">{{ item.requestName }}<span v-if="index != localFormData.preProcess?.length -1"></span>
style="color: #2a99ff;cursor: pointer">{{ item.requestName }}<span
v-if="index != localFormData.preProcess?.length -1"></span>
</a>
</div>
</el-form-item>
@@ -95,8 +100,8 @@
<div>
<div class="approval-record">
<div class="approval-title" style="margin-top: -15px">
<!-- <baseTitle title="审批记录" v-if="mode === 'resubmit'"></baseTitle>-->
<!-- <div v-else></div>-->
<!-- <baseTitle title="审批记录" v-if="mode === 'resubmit'"></baseTitle>-->
<!-- <div v-else></div>-->
<baseTitle title="审批记录"></baseTitle>
<div class="diagram">
<div class="base-title">流程图</div>
@@ -106,10 +111,12 @@
/>
</div>
</div>
<el-empty :image-size="100" description="暂无审批记录" v-if="!data?.operationList&&!changeDiagram"/>
<el-empty :image-size="100" description="暂无审批记录" v-if="!data?.operationList&&!changeDiagram"/>
<div class="process">
<operation-render v-if="mode === 'resubmit'&&processDiagramViewer&& data?.operationList && data?.operationList.length > 0&&!changeDiagram" :operation-list="data.operationList"
:state="data.state"/>
<operation-render
v-if="mode === 'resubmit'&&processDiagramViewer&& data?.operationList && data?.operationList.length > 0&&!changeDiagram"
:operation-list="data.operationList"
:state="data.state"/>
<process-diagram-viewer mode="view" :idName="title" v-if="processDiagramViewer&&changeDiagram"/>
</div>
</div>
@@ -120,7 +127,8 @@
<el-button @click="handleBack">返回</el-button>
</div>
<file-preview ref="filePreviewRef" v-if="filePreviewShow" :fileName="filePreviewParam.fileName" :fileUrl="filePreviewParam.fileUrl"
<file-preview ref="filePreviewRef" v-if="filePreviewShow" :fileName="filePreviewParam.fileName"
:fileUrl="filePreviewParam.fileUrl"
:fileType="filePreviewParam.fileType"/>
<el-dialog v-if="showPreTable" title="前置流程" v-model="showPreTable" width="80%">
<el-form :model="preProcessForm" inline @submit.prevent="searchPreProcess">
@@ -201,7 +209,7 @@ const otherAttachmentList = ref([])
const attachmentParam = reactive({
tag: ''
})
const tableConfig = reactive({
const executeTableConfig = reactive({
columns: [
{
prop: 'index',
@@ -214,17 +222,21 @@ const tableConfig = reactive({
prop: 'originalFileName',
label: '文件名',
align: 'center',
currentRender: ({row, index}) => (<div style="color: #2a99ff;cursor: pointer;" onClick={()=>clickToPreview(row)}>{row.originalFileName}</div>)
width: 620,
currentRender: ({row, index}) => (
<div style="color: #2a99ff;cursor: pointer;" onClick={() => clickToPreview(row)}>{row.originalFileName}</div>)
},
{
prop: 'tag',
label: '标签',
align: 'center'
align: 'center',
width: 160,
},
{
prop: 'size',
label: '文件大小',
align: 'center',
width: 600,
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
},
{
@@ -333,14 +345,14 @@ const optionalChargeLeaderPickerOk = (userList) => {
localStorage.setItem('optionalChargeLeadershipList', JSON.stringify(optionalChargeLeadershipList.value))
}
const clickToPreview=(row)=>{
const clickToPreview = (row) => {
filePreviewShow.value = false
filePreviewParam.value = {
fileUrl: row.url,
fileName: row.originalFileName,
fileType: row.fileType
}
nextTick(()=>{
nextTick(() => {
filePreviewShow.value = true
})
}
@@ -732,14 +744,14 @@ const init = async () => {
watchEffect(() => {
if (props.formData.projectChargePerson == null) {
projectChargePersonUserList.value = []
projectChargePersonUserList.value = []
} else {
projectChargePersonUserList.value = [props.formData.projectChargePerson]
}
if (props.formData.optionalChargeLeadership == null) {
optionalChargeLeadershipList.value = []
} else {
optionalChargeLeadershipList.value=props.formData.optionalChargeLeadership
optionalChargeLeadershipList.value = props.formData.optionalChargeLeadership
}
projectPersonUserList.value = props.formData.projectPersonList ? props.formData.projectPersonList : []
let flag = Object.keys(props.formData).length && (localFormData.value = props.formData)
@@ -801,11 +813,30 @@ onMounted(async () => {
await init()
})
</script>
<style lang="scss">
.execute-apply-table {
.el-table__header {
.el-table__cell:last-child {
.cell {
margin-left: -108px !important;
}
}
}
<style scoped>
.el-table__body {
.el-table__cell:last-child {
.cell {
margin-left: -108px !important;
}
}
}
}
</style>
<style scoped lang="scss">
.oper {
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
</style>

View File

@@ -322,4 +322,19 @@ getFundOptions()
overflow-y: auto;
padding-bottom: 0 !important;
}
:deep(.el-table__header) {
.is-leaf:first-child {
.cell {
margin-left: -25px !important;
}
}
}
:deep(.el-table__body) {
.el-table__cell:first-child {
.cell {
margin-left: -13px !important;
}
}
}
</style>

View File

@@ -11,12 +11,12 @@
v-bind="item.colProps || { span: 12}"
:key="item.prop"
>
<el-form-item
<el-form-item
v-bind="item"
:key="item.prop"
>
<template #default>
<component
<component
v-if="item.component"
:is="item.component"
v-bind="item.props || {}"
@@ -105,4 +105,4 @@ defineExpose({ getValues, setValues, validate, resetFields, formInstance, form }
<style lang="scss" scoped>
</style>
</style>

View File

@@ -2,9 +2,9 @@
<div v-loading="loading">
<el-row v-if="type==='execute'">
<el-col :span="24">
<baseTitle :title="'附件信息'"></baseTitle>
<baseTitle :title="'附件信息'" style="margin-bottom: 5px"></baseTitle>
</el-col>
<el-form :model="attachmentParam" inline style="margin-top: 15px" @submit.prevent>
<el-form :model="attachmentParam" inline style="margin-top: 15px;margin-left: 15px" @submit.prevent>
<el-form-item label="标签" prop="tag">
<el-select v-model="attachmentParam.tag" placeholder="请选择标签" clearable filterable style="width: 200px">
<el-option
@@ -28,10 +28,11 @@
</el-row>
<baseTitle v-if="type!='phase'" :title="getTagName(type)+'信息'" ></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>form = e" ></fvForm>
<fvForm :schema="schema" @getInstance="(e)=>form = e" style="margin-left: 15px"></fvForm>
<el-form :model="formData" label-width="auto">
<file-component
:title="getTagName(type)+'附件'"
:fileNameTableWidth="300"
:tag="getTagName(type)"
v-model:value="formData.fileList"
:processViewer="processViewer"
@@ -105,6 +106,7 @@ const executeTableConfig = reactive({
prop: 'originalFileName',
label: '文件名',
align: 'center',
width: 300
},
{
prop: 'tag',
@@ -189,7 +191,7 @@ const editSingleTableConfig = reactive({
prop: 'originalFileName',
label: '文件名',
align: 'center',
width: 400,
width: 300,
currentRender: ({row, index}) => (<div style="color: #2a99ff;cursor: pointer;" onClick={()=>clickToPreview(row)}>{row.originalFileName}</div>)
},
{
@@ -289,8 +291,8 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.projectPersonList ? props.formData.projectPersonList.map(item => {
return <span>{item.name} </span>
props.formData.projectPersonList ? props.formData.projectPersonList.map((item, index) => {
return <span>{item.name} <span>{index != props.formData.projectPersonList?.length - 1 ? '' : ''}</span></span>
}) : <span>{'--'}</span>
}
</div>
@@ -306,7 +308,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.optionalChargeLeadership ? props.formData.optionalChargeLeadership.map(item => {
props.formData.optionalChargeLeadership?.length > 0 ? props.formData.optionalChargeLeadership.map(item => {
return <span>{item.name} </span>
}) : <span>{'--'}</span>
}
@@ -379,7 +381,7 @@ const schema = computed(() => {
component: () => (
<div>
{
props.formData.optionalChargeLeadership ? props.formData.optionalChargeLeadership.map(item => {
props.formData.optionalChargeLeadership?.length > 0 ? props.formData.optionalChargeLeadership.map(item => {
return <span>{item.name} </span>
}) : <span>{'--'}</span>
}

View File

@@ -80,7 +80,7 @@ const localSteps = ref([
key: 'approve',
},
{
title: '项目实施',
title: '项目验收',
key: 'execute',
},
{

View File

@@ -59,7 +59,7 @@
<baseTitle title="需求上报申请书" style="margin-bottom: 10px">></baseTitle>
<el-row gutter="20" style="margin-bottom: -15px;">
<el-col :span="24">
<single-file-component tag="需求上报" :fileNameTableWidth="200" :fullscreen="true"
<single-file-component tag="需求上报" :fileNameTableWidth="300" :fullscreen="true"
v-model:value="localFormData.singleFile" :processViewer="processViewer"
labelAlign="top"/>
<!-- <el-form-item label="需求上报申请书" label-position="top" style="display:block;">-->
@@ -74,7 +74,7 @@
</el-col>
<el-col :span="24">
<file-component
tag="需求上报" :fileNameTableWidth="200" :fullscreen="true"
tag="需求上报" :fileNameTableWidth="300" :fullscreen="true"
v-model:value="localFormData.fileList"
:processViewer="processViewer"
:file-list-show="fileListShow"