日计划列表页面优化

This commit is contained in:
BianLzhaoMin 2025-12-19 18:27:58 +08:00
parent 6e60d53b8d
commit a1cb84cde5
5 changed files with 119 additions and 21 deletions

View File

@ -133,11 +133,18 @@
:highlight-current-row="highlightCurrentRow"
:class="`table-density-${density}`"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
v-bind="$attrs"
@row-click="handleRowClick"
style="width: 100%"
>
<!-- 选择列 -->
<el-table-column v-if="showSelection" type="selection" width="55" align="center" />
<el-table-column
v-if="showSelection"
type="selection"
width="55"
align="center"
fixed
/>
<!-- 索引列 -->
<el-table-column
v-if="showIndex"
@ -145,6 +152,7 @@
label="序号"
width="60"
align="center"
fixed
/>
<!-- 动态列 -->
<el-table-column
@ -588,10 +596,11 @@ defineExpose({
.com-data-table-container.is-fullscreen .data-table-card :deep(.el-card__body) {
flex: 1;
overflow: auto;
padding: 10px 20px !important;
}
.data-table-card {
margin-bottom: 20px;
margin-bottom: 10px;
}
.table-header {

View File

@ -160,11 +160,11 @@ watch(
<style scoped>
.search-form-card {
margin-bottom: 20px;
margin-bottom: 10px;
}
.search-form-card :deep(.el-card__body) {
padding: 18px 20px 0;
padding: 20px 20px 5px 20px !important;
}
.el-form--inline .el-form-item {

View File

@ -101,6 +101,22 @@ export const constantRoutes = [
},
],
},
{
path: '/plan/dailyPlanEdit',
component: Layout,
hidden: true,
children: [
{
path: 'index',
component: () => import('@/views/planMange/dailyPlan/edit.vue'),
name: 'DailyPlanEdit',
meta: {
title: '日计划填报',
activeMenu: '/plan/dailyPlan', // 保持左侧高亮在列表菜单
},
},
],
},
]
// 动态路由,基于用户权限动态去加载

View File

@ -55,16 +55,54 @@ export const buildFormColumns = () => [
// 月计划列表表格列
export const tableColumns = [
{ prop: 'stationName', label: '日期' },
{ prop: 'majorName', label: '运检站' },
{ prop: 'businessTypeName', label: '专业' },
{ prop: 'projectName', label: '项目名称' },
{ prop: 'stationName', label: '日期', fixed: true },
{ prop: 'majorName', label: '运检站', fixed: true },
{ prop: 'businessTypeName', label: '专业', fixed: true },
{ prop: 'projectName', label: '项目名称', fixed: true },
{ prop: 'workTask', label: '工作任务' },
{ prop: 'riskLevelName', label: '风险等级' },
{ prop: 'categoryName', label: '几乎工作量(基)' },
{ prop: 'workAmount', label: '拟投入作业人员数量' },
{ prop: 'baseCount', label: '拟投入作业人员姓名' },
{ prop: 'planStartDate', label: '拟投诉车辆' },
{ prop: 'categoryName', label: '计划工作量(基)' },
]
export const tableColumns_1 = [
{ prop: 'stationName', label: '拟投入作业人员数量', fixed: false },
{ prop: 'majorName', label: '拟投入作业人员姓名', fixed: false },
{ prop: 'businessTypeName', label: '拟投入车辆', fixed: false },
{ prop: 'projectName', label: '实际投入作业人员数量', fixed: false },
{ prop: 'workTask', label: '实际投入作业人员姓名', fixed: false },
{ prop: 'riskLevelName', label: '实际投入车辆', fixed: false },
{ prop: 'categoryName', label: '实际完成工作量明细', fixed: false },
{ prop: 'categoryName', label: '实际完成工作量(基)', fixed: false },
{ prop: 'categoryName', label: '完成比例', fixed: false },
{ prop: 'categoryName', label: '作业计划完成情况', fixed: false },
{ prop: 'categoryName', label: '计划变更及未完成情况说明', fixed: false },
]
export const tableColumns_2 = [
{ prop: 'stationName', label: '拟投入高处作业人员数量', fixed: false },
{ prop: 'majorName', label: '高处作业人员姓名', fixed: false },
{ prop: 'businessTypeName', label: '拟投入地面作业人员数量', fixed: false },
{ prop: 'projectName', label: '地面作业人员姓名', fixed: false },
{ prop: 'workTask', label: '拟投入检修熟练工数量(分包高空作业人员)', fixed: false },
{ prop: 'riskLevelName', label: '拟投入检修辅助工数量(分包地面作业人员)', fixed: false },
{ prop: 'categoryName', label: '拟投入车辆', fixed: false },
{ prop: 'categoryName', label: '实际投入高处作业人员数量', fixed: false },
{ prop: 'categoryName', label: '高处作业人员姓名', fixed: false },
{ prop: 'categoryName', label: '实际投入地面作业人员数量', fixed: false },
{ prop: 'categoryName', label: '地面作业人员姓名', fixed: false },
{
prop: 'categoryName',
label: '实际投入检修熟练工数量(分包高空作业人员)',
fixed: false,
},
{
prop: 'categoryName',
label: '实际投入检修辅助工数量(分包高空作业人员)',
fixed: false,
},
{ prop: 'categoryName', label: '实际投入车辆', fixed: false },
{ prop: 'categoryName', label: '实际完成工作内容', fixed: false },
{ prop: 'categoryName', label: '完成比例', fixed: false },
{ prop: 'categoryName', label: '作业计划完成情况', fixed: false },
{ prop: 'categoryName', label: '计划变更及未完成情况说明', fixed: false },
]
export const dialogConfig = reactive({
@ -77,6 +115,8 @@ export const dialogConfig = reactive({
export default {
tableColumns,
tableColumns_1,
tableColumns_2,
dialogConfig,
buildFormColumns,
}

View File

@ -1,17 +1,35 @@
<template>
<div class="app-container">
<el-card class="top-radio">
<el-radio-group v-model="tableType">
<el-radio-button label="运行" value="运行" />
<el-radio-button label="检修" value="检修" />
<el-radio-button label="项目部" value="项目部" />
</el-radio-group>
<ComButton type="info" plain icon="Download"> 下载统计表 </ComButton>
</el-card>
<!-- 日计划填报管理列表 -->
<ComTable
ref="comTableRef"
:form-columns="formColumns"
:table-columns="tableColumns"
:load-data="listPlanAPI"
:key="tableType"
:show-toolbar="true"
:show-action="true"
:load-data="listPlanAPI"
:form-columns="formColumns"
:table-columns="initTableColumns"
:action-columns="actionColumns"
>
<template #toolbar>
<ComButton type="primary" icon="Plus" @click="onHandleAdd">新增日计划</ComButton>
<ComButton
plain
type="info"
icon="Download"
v-if="['检修', '项目部'].includes(tableType)"
>
下载工作量统计表
</ComButton>
</template>
</ComTable>
@ -40,13 +58,18 @@ import AddForm from './addForm.vue'
const router = useRouter()
const { proxy } = getCurrentInstance()
const { tableColumns, dialogConfig, buildFormColumns } = config
const { tableColumns, tableColumns_1, tableColumns_2, dialogConfig, buildFormColumns } = config
const comTableRef = ref(null)
const addFormRef = ref(null)
const tableType = ref('运行')
// 使
const formColumns = computed(() => buildFormColumns())
const initTableColumns = computed(() => {
if (tableType.value === '运行') return [...tableColumns, ...tableColumns_1]
if (tableType.value !== '运行') return [...tableColumns, ...tableColumns_2]
})
//
const actionColumns = [
@ -56,7 +79,7 @@ const actionColumns = [
link: true,
handler: (row) => {
router.push({
path: '/plan/monthlyPlanEdit/index',
path: '/plan/dailyPlanEdit/index',
query: { id: row.planId, mode: 'detail' },
})
},
@ -67,8 +90,8 @@ const actionColumns = [
link: true,
handler: (row) => {
router.push({
path: '/plan/monthlyPlanEdit/index',
query: { id: row.planId, mode: 'detail' },
path: '/plan/dailyPlanEdit/index',
query: { id: row.planId, mode: 'edit' },
})
},
},
@ -109,4 +132,14 @@ const onCloseDialogOuter = (visible) => {
}
</script>
<style scoped></style>
<style scoped lang="scss">
.top-radio {
margin-bottom: 10px;
:deep(.el-card__body) {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 20px !important;
}
}
</style>