日计划列表页面优化
This commit is contained in:
parent
6e60d53b8d
commit
a1cb84cde5
|
|
@ -133,11 +133,18 @@
|
||||||
:highlight-current-row="highlightCurrentRow"
|
:highlight-current-row="highlightCurrentRow"
|
||||||
:class="`table-density-${density}`"
|
:class="`table-density-${density}`"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
@row-click="handleRowClick"
|
|
||||||
v-bind="$attrs"
|
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
|
<el-table-column
|
||||||
v-if="showIndex"
|
v-if="showIndex"
|
||||||
|
|
@ -145,6 +152,7 @@
|
||||||
label="序号"
|
label="序号"
|
||||||
width="60"
|
width="60"
|
||||||
align="center"
|
align="center"
|
||||||
|
fixed
|
||||||
/>
|
/>
|
||||||
<!-- 动态列 -->
|
<!-- 动态列 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -588,10 +596,11 @@ defineExpose({
|
||||||
.com-data-table-container.is-fullscreen .data-table-card :deep(.el-card__body) {
|
.com-data-table-container.is-fullscreen .data-table-card :deep(.el-card__body) {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
padding: 10px 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-table-card {
|
.data-table-card {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-header {
|
.table-header {
|
||||||
|
|
|
||||||
|
|
@ -160,11 +160,11 @@ watch(
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.search-form-card {
|
.search-form-card {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-form-card :deep(.el-card__body) {
|
.search-form-card :deep(.el-card__body) {
|
||||||
padding: 18px 20px 0;
|
padding: 20px 20px 5px 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form--inline .el-form-item {
|
.el-form--inline .el-form-item {
|
||||||
|
|
|
||||||
|
|
@ -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', // 保持左侧高亮在列表菜单
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// 动态路由,基于用户权限动态去加载
|
// 动态路由,基于用户权限动态去加载
|
||||||
|
|
|
||||||
|
|
@ -55,16 +55,54 @@ export const buildFormColumns = () => [
|
||||||
|
|
||||||
// 月计划列表表格列
|
// 月计划列表表格列
|
||||||
export const tableColumns = [
|
export const tableColumns = [
|
||||||
{ prop: 'stationName', label: '日期' },
|
{ prop: 'stationName', label: '日期', fixed: true },
|
||||||
{ prop: 'majorName', label: '运检站' },
|
{ prop: 'majorName', label: '运检站', fixed: true },
|
||||||
{ prop: 'businessTypeName', label: '专业' },
|
{ prop: 'businessTypeName', label: '专业', fixed: true },
|
||||||
{ prop: 'projectName', label: '项目名称' },
|
{ prop: 'projectName', label: '项目名称', fixed: true },
|
||||||
{ prop: 'workTask', label: '工作任务' },
|
{ prop: 'workTask', label: '工作任务' },
|
||||||
{ prop: 'riskLevelName', label: '风险等级' },
|
{ prop: 'riskLevelName', label: '风险等级' },
|
||||||
{ prop: 'categoryName', label: '几乎工作量(基)' },
|
{ prop: 'categoryName', label: '计划工作量(基)' },
|
||||||
{ prop: 'workAmount', label: '拟投入作业人员数量' },
|
]
|
||||||
{ prop: 'baseCount', label: '拟投入作业人员姓名' },
|
export const tableColumns_1 = [
|
||||||
{ prop: 'planStartDate', label: '拟投诉车辆' },
|
{ 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({
|
export const dialogConfig = reactive({
|
||||||
|
|
@ -77,6 +115,8 @@ export const dialogConfig = reactive({
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
tableColumns,
|
tableColumns,
|
||||||
|
tableColumns_1,
|
||||||
|
tableColumns_2,
|
||||||
dialogConfig,
|
dialogConfig,
|
||||||
buildFormColumns,
|
buildFormColumns,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,35 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<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
|
<ComTable
|
||||||
ref="comTableRef"
|
ref="comTableRef"
|
||||||
:form-columns="formColumns"
|
:key="tableType"
|
||||||
:table-columns="tableColumns"
|
|
||||||
:load-data="listPlanAPI"
|
|
||||||
:show-toolbar="true"
|
:show-toolbar="true"
|
||||||
:show-action="true"
|
:show-action="true"
|
||||||
|
:load-data="listPlanAPI"
|
||||||
|
:form-columns="formColumns"
|
||||||
|
:table-columns="initTableColumns"
|
||||||
:action-columns="actionColumns"
|
:action-columns="actionColumns"
|
||||||
>
|
>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<ComButton type="primary" icon="Plus" @click="onHandleAdd">新增日计划</ComButton>
|
<ComButton type="primary" icon="Plus" @click="onHandleAdd">新增日计划</ComButton>
|
||||||
|
<ComButton
|
||||||
|
plain
|
||||||
|
type="info"
|
||||||
|
icon="Download"
|
||||||
|
v-if="['检修', '项目部'].includes(tableType)"
|
||||||
|
>
|
||||||
|
下载工作量统计表
|
||||||
|
</ComButton>
|
||||||
</template>
|
</template>
|
||||||
</ComTable>
|
</ComTable>
|
||||||
|
|
||||||
|
|
@ -40,13 +58,18 @@ import AddForm from './addForm.vue'
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
const { tableColumns, dialogConfig, buildFormColumns } = config
|
const { tableColumns, tableColumns_1, tableColumns_2, dialogConfig, buildFormColumns } = config
|
||||||
|
|
||||||
const comTableRef = ref(null)
|
const comTableRef = ref(null)
|
||||||
const addFormRef = ref(null)
|
const addFormRef = ref(null)
|
||||||
|
const tableType = ref('运行')
|
||||||
|
|
||||||
// 搜索表单配置(当前月计划场景暂不依赖下拉接口,直接使用静态配置)
|
// 搜索表单配置(当前月计划场景暂不依赖下拉接口,直接使用静态配置)
|
||||||
const formColumns = computed(() => buildFormColumns())
|
const formColumns = computed(() => buildFormColumns())
|
||||||
|
const initTableColumns = computed(() => {
|
||||||
|
if (tableType.value === '运行') return [...tableColumns, ...tableColumns_1]
|
||||||
|
if (tableType.value !== '运行') return [...tableColumns, ...tableColumns_2]
|
||||||
|
})
|
||||||
|
|
||||||
// 操作列
|
// 操作列
|
||||||
const actionColumns = [
|
const actionColumns = [
|
||||||
|
|
@ -56,7 +79,7 @@ const actionColumns = [
|
||||||
link: true,
|
link: true,
|
||||||
handler: (row) => {
|
handler: (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/plan/monthlyPlanEdit/index',
|
path: '/plan/dailyPlanEdit/index',
|
||||||
query: { id: row.planId, mode: 'detail' },
|
query: { id: row.planId, mode: 'detail' },
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -67,8 +90,8 @@ const actionColumns = [
|
||||||
link: true,
|
link: true,
|
||||||
handler: (row) => {
|
handler: (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/plan/monthlyPlanEdit/index',
|
path: '/plan/dailyPlanEdit/index',
|
||||||
query: { id: row.planId, mode: 'detail' },
|
query: { id: row.planId, mode: 'edit' },
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -109,4 +132,14 @@ const onCloseDialogOuter = (visible) => {
|
||||||
}
|
}
|
||||||
</script>
|
</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>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue