From 210fcd0502411029b95a91ece5d5baac6f20d10d Mon Sep 17 00:00:00 2001 From: yuejiayang <146344614+YangLei105@users.noreply.github.com> Date: Wed, 13 Dec 2023 16:30:32 +0800 Subject: [PATCH] =?UTF-8?q?12.13=20=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/eam/eamFeedBack.vue | 213 ++++++++---- .../modules/eam/eamWorkOrderForDefect.vue | 265 +++++++++------ .../eamReport/eamObjectCheckReport.vue | 83 +++++ .../eamReport/eamObjectDefectReport.vue | 83 +++++ .../eamReport/eamObjectMaintenanceReport.vue | 86 ++++- .../eamReport/eamOperatorCheckReport.vue | 83 ++++- .../eamReport/eamOperatorDefectReport.vue | 100 +++++- .../eamOperatorMaintenanceReport.vue | 108 ++++++- .../reportWorkOrder/reportDefectOrder.vue | 302 +++++++++++------- .../reportMaintenanceOrder.vue | 13 +- 10 files changed, 1035 insertions(+), 301 deletions(-) diff --git a/src/views/modules/eam/eamFeedBack.vue b/src/views/modules/eam/eamFeedBack.vue index e534e86..348d6e8 100644 --- a/src/views/modules/eam/eamFeedBack.vue +++ b/src/views/modules/eam/eamFeedBack.vue @@ -162,6 +162,10 @@ cancelFeedBack, saveDefectOrder, } from "@/api/eam/eam.js" + import { + getTableDefaultListLanguage, + getTableUserListLanguage, + } from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' export default { @@ -233,10 +237,10 @@ columnList: [ { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableDefectDesc', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1Urgency', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'urgency', headerAlign: "center", align: "center", @@ -251,10 +255,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableFeedBackID', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1FeedBackID', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'feedBackID', headerAlign: "center", align: "center", @@ -265,13 +269,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableFeedBackDesc', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1FeedBackDesc', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'feedBackDesc', headerAlign: "center", align: "center", @@ -282,13 +287,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableDefectID', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1DefectID', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'defectID', headerAlign: "center", align: "center", @@ -299,13 +305,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableDefectDesc', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1DefectDesc', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'defectDesc', headerAlign: "center", align: "center", @@ -316,13 +323,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableObjectID', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1ObjectID', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'objectID', headerAlign: "center", align: "center", @@ -333,13 +341,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableObjectDesc', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1ObjectDesc', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'objectDesc', headerAlign: "center", align: "center", @@ -350,13 +359,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableStatus', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1Status', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'status', headerAlign: "center", align: "center", @@ -367,13 +377,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TablePlanOperatorName', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1PlanOperatorName', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'planOperatorName', headerAlign: "center", align: "center", @@ -384,13 +395,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableActualOperatorName', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1ActualOperatorName', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'actualOperatorName', headerAlign: "center", align: "center", @@ -401,13 +413,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableActualDefectDate', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1DefectDate', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'defectDate', headerAlign: "center", align: "center", @@ -418,13 +431,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableActualCreatedDate', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1CreatedDate', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'createdDate', headerAlign: "center", align: "center", @@ -435,13 +449,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableFinishDate', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1FinishDate', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'finishDate', headerAlign: "center", align: "center", @@ -452,13 +467,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableActualCreatedBy', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1CreatedBy', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'createdBy', headerAlign: "center", align: "center", @@ -469,13 +485,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableActualCreatedBy', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1FeedbackBy', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'feedbackBy', headerAlign: "center", align: "center", @@ -486,13 +503,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableActualRemark', - tableId: "101020Table", - tableName: "common", + functionId: 101004001, + serialNumber: '101004001Table1Remark', + tableId: "101004001Table1", + tableName: "维修反馈表", columnProp: 'remark', headerAlign: "center", align: "center", @@ -503,6 +521,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 95, }, ], } @@ -515,6 +534,8 @@ created () { this.favoriteIsOk() this.getDataList() + // 动态列 + this.getTableUserColumn(this.$route.meta.menuId+'table1',1) }, methods: { // 校验用户是否收藏 @@ -703,7 +724,71 @@ } }) }, + // 动态列开始 获取 用户保存的 格式列 + async getTableUserColumn(tableId, columnId) { + let queryTableUser = { + userId: this.$store.state.user.name, + functionId: this.$route.meta.menuId, + tableId: tableId, + status: true, + languageCode: this.$i18n.locale + } + await getTableUserListLanguage(queryTableUser).then(({data}) => { + if (data.rows.length > 0) { + //this.columnList1 = [] + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + + } else { + this.getColumnList(tableId, columnId) + } + }) + + }, + + // 获取 tableDefault 列 + async getColumnList(tableId, columnId) { + this.queryTable.tableId = tableId + let queryTable= { + functionId: this.$route.meta.menuId, + tableId: tableId, + languageCode: this.$i18n.locale + } + await getTableDefaultListLanguage(queryTable).then(({data}) => { + if (!data.rows.length == 0) { + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + } else { + // this.showDefault = true. + } + }) + }, + //动态列结束 } } diff --git a/src/views/modules/eam/eamWorkOrderForDefect.vue b/src/views/modules/eam/eamWorkOrderForDefect.vue index 0521aa2..e545b9a 100644 --- a/src/views/modules/eam/eamWorkOrderForDefect.vue +++ b/src/views/modules/eam/eamWorkOrderForDefect.vue @@ -350,6 +350,10 @@ getDeptList, updateReportResult, // 修改执行结果 } from "@/api/eam/eam.js" + import { + getTableDefaultListLanguage, + getTableUserListLanguage, + } from "@/api/table.js" import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' import Chooselist from '@/views/modules/common/Chooselist_eam' import {isAuth} from '../../../utils' @@ -426,10 +430,10 @@ columnList: [ { userId: this.$store.state.user.name, - functionId: 101014, - serialNumber: '101014TableResult', - tableId: "101014Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1DisposalMeasures', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'disposalMeasures', headerAlign: "center", align: "center", @@ -444,10 +448,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableOrderNo', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1OrderNo', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'orderNo', headerAlign: "center", align: "center", @@ -462,10 +466,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TablePlanID', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1PlanID', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'planID', headerAlign: "center", align: "center", @@ -480,10 +484,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TablePlanID', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1FeedBackDesc', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'feedBackDesc', headerAlign: "center", align: "center", @@ -498,10 +502,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TablePropertiesCode', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1DefectID', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'defectID', headerAlign: "center", align: "center", @@ -516,10 +520,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TablePropertiesCode', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1DefectDesc', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'defectDesc', headerAlign: "center", align: "center", @@ -534,10 +538,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableObjectID', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1ObjectID', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'objectID', headerAlign: "center", align: "center", @@ -552,10 +556,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableObjectID', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1ObjectDesc', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'objectDesc', headerAlign: "center", align: "center", @@ -570,10 +574,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableObjectID', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1ResourceDesc', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'resourceDesc', headerAlign: "center", align: "center", @@ -588,10 +592,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableObjectID', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1DepartmentName', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'departmentName', headerAlign: "center", align: "center", @@ -606,10 +610,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableObjectID', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1CreateBy', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'createBy', headerAlign: "center", align: "center", @@ -624,10 +628,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableStatus', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1Status', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'status', headerAlign: "center", align: "center", @@ -642,10 +646,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TablePlanOperatorName', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1PlanOperatorName', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'planOperatorName', headerAlign: "center", align: "center", @@ -660,10 +664,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableActualOperatorName', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1ActualOperatorName', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'actualOperatorName', headerAlign: "center", align: "center", @@ -678,10 +682,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableActualPlanDate', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1PlanDate', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'planDate', headerAlign: "center", align: "center", @@ -696,10 +700,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableCreatedDate', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1CreatedDate', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'createdDate', headerAlign: "center", align: "center", @@ -714,10 +718,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableActualPlanDate', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1ReachDate', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'reachDate', headerAlign: "center", align: "center", @@ -732,10 +736,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableActualActualDate', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1ActualDate', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'actualDate', headerAlign: "center", align: "center", @@ -750,10 +754,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableResponseTime', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1ResponseTime', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'responseTime', headerAlign: "center", align: "right", @@ -768,10 +772,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableWorkTime', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1WorkTime', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'workTime', headerAlign: "center", align: "right", @@ -786,10 +790,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableActualRemark', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1Remark', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'remark', headerAlign: "center", align: "center", @@ -804,10 +808,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableActualRemark', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1DifficultyLevel', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'difficultyLevel', headerAlign: "center", align: "center", @@ -822,10 +826,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableActualRemark', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1DifficultyRemark', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'difficultyRemark', headerAlign: "center", align: "center", @@ -840,10 +844,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101018, - serialNumber: '101018TableActualRemark', - tableId: "101018Table", - tableName: "common", + functionId: 101004002, + serialNumber: '101004002Table1DocumentSource', + tableId: "101004002Table1", + tableName: "维修工单表", columnProp: 'documentSource', headerAlign: "center", align: "center", @@ -927,6 +931,8 @@ this.favoriteIsOk() // 查询登陆人员的部门,并过滤出相应工单 this.getUserDept() + // 动态列 + this.getTableUserColumn(this.$route.meta.menuId+'table1',1) }, methods: { @@ -1377,7 +1383,72 @@ // 清空搜索框部门 clearDepartmentName(){ this.searchData.departmentName = '' - } + }, + // 动态列开始 获取 用户保存的 格式列 + async getTableUserColumn(tableId, columnId) { + let queryTableUser = { + userId: this.$store.state.user.name, + functionId: this.$route.meta.menuId, + tableId: tableId, + status: true, + languageCode: this.$i18n.locale + } + await getTableUserListLanguage(queryTableUser).then(({data}) => { + if (data.rows.length > 0) { + //this.columnList1 = [] + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + + } else { + this.getColumnList(tableId, columnId) + } + }) + + }, + + // 获取 tableDefault 列 + async getColumnList(tableId, columnId) { + this.queryTable.tableId = tableId + let queryTable= { + functionId: this.$route.meta.menuId, + tableId: tableId, + languageCode: this.$i18n.locale + } + await getTableDefaultListLanguage(queryTable).then(({data}) => { + if (!data.rows.length == 0) { + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + } else { + // this.showDefault = true. + } + }) + + }, + //动态列结束 } } diff --git a/src/views/modules/eamReport/eamObjectCheckReport.vue b/src/views/modules/eamReport/eamObjectCheckReport.vue index 2922b3b..03e7caf 100644 --- a/src/views/modules/eamReport/eamObjectCheckReport.vue +++ b/src/views/modules/eamReport/eamObjectCheckReport.vue @@ -99,6 +99,10 @@ import { searchEamObjectSumReport } from "@/api/eam/eamReport.js" + import { + getTableDefaultListLanguage, + getTableUserListLanguage, + } from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' @@ -171,6 +175,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 152, }, { userId: this.$store.state.user.name, @@ -188,6 +193,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -205,6 +211,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -222,6 +229,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -239,6 +247,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -256,6 +265,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -273,6 +283,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -290,6 +301,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -307,6 +319,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -324,6 +337,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -341,6 +355,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, } ], @@ -354,6 +369,8 @@ created () { this.favoriteIsOk() this.getDataList() + // 动态列 + this.getTableUserColumn(this.$route.meta.menuId+'table',1) }, methods: { // 校验用户是否收藏 @@ -497,6 +514,72 @@ return s }, // 导出 end + + // 动态列开始 获取 用户保存的 格式列 + async getTableUserColumn(tableId, columnId) { + let queryTableUser = { + userId: this.$store.state.user.name, + functionId: this.$route.meta.menuId, + tableId: tableId, + status: true, + languageCode: this.$i18n.locale + } + await getTableUserListLanguage(queryTableUser).then(({data}) => { + if (data.rows.length > 0) { + //this.columnList1 = [] + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + + } else { + this.getColumnList(tableId, columnId) + } + }) + + }, + + // 获取 tableDefault 列 + async getColumnList(tableId, columnId) { + this.queryTable.tableId = tableId + let queryTable= { + functionId: this.$route.meta.menuId, + tableId: tableId, + languageCode: this.$i18n.locale + } + await getTableDefaultListLanguage(queryTable).then(({data}) => { + if (!data.rows.length == 0) { + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + } else { + // this.showDefault = true. + } + }) + + }, + //动态列结束 } } diff --git a/src/views/modules/eamReport/eamObjectDefectReport.vue b/src/views/modules/eamReport/eamObjectDefectReport.vue index 4734d41..0675c2a 100644 --- a/src/views/modules/eamReport/eamObjectDefectReport.vue +++ b/src/views/modules/eamReport/eamObjectDefectReport.vue @@ -99,6 +99,10 @@ import { searchEamObjectSumReport } from "@/api/eam/eamReport.js" + import { + getTableDefaultListLanguage, + getTableUserListLanguage, + } from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' @@ -170,6 +174,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 152, }, { userId: this.$store.state.user.name, @@ -187,6 +192,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -204,6 +210,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -221,6 +228,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -238,6 +246,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -255,6 +264,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -272,6 +282,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -289,6 +300,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -306,6 +318,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -323,6 +336,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -340,6 +354,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, } ], @@ -353,6 +368,8 @@ created () { this.favoriteIsOk() this.getDataList() + // 动态列 + this.getTableUserColumn(this.$route.meta.menuId+'table',1) }, methods: { // 校验用户是否收藏 @@ -495,6 +512,72 @@ return s }, // 导出 end + + // 动态列开始 获取 用户保存的 格式列 + async getTableUserColumn(tableId, columnId) { + let queryTableUser = { + userId: this.$store.state.user.name, + functionId: this.$route.meta.menuId, + tableId: tableId, + status: true, + languageCode: this.$i18n.locale + } + await getTableUserListLanguage(queryTableUser).then(({data}) => { + if (data.rows.length > 0) { + //this.columnList1 = [] + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + + } else { + this.getColumnList(tableId, columnId) + } + }) + + }, + + // 获取 tableDefault 列 + async getColumnList(tableId, columnId) { + this.queryTable.tableId = tableId + let queryTable= { + functionId: this.$route.meta.menuId, + tableId: tableId, + languageCode: this.$i18n.locale + } + await getTableDefaultListLanguage(queryTable).then(({data}) => { + if (!data.rows.length == 0) { + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + } else { + // this.showDefault = true. + } + }) + + }, + //动态列结束 } } diff --git a/src/views/modules/eamReport/eamObjectMaintenanceReport.vue b/src/views/modules/eamReport/eamObjectMaintenanceReport.vue index fbe4cd9..497207e 100644 --- a/src/views/modules/eamReport/eamObjectMaintenanceReport.vue +++ b/src/views/modules/eamReport/eamObjectMaintenanceReport.vue @@ -99,6 +99,10 @@ import { searchEamObjectSumReport } from "@/api/eam/eamReport.js" + import { + getTableDefaultListLanguage, + getTableUserListLanguage, + } from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' @@ -170,7 +174,9 @@ sortLv: 0, status: true, fixed: '', - },{ + columnWidth: 152, + }, + { userId: this.$store.state.user.name, functionId: 101005002, serialNumber: '101005002TableObjectDesc', @@ -186,6 +192,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -203,6 +210,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -220,6 +228,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -237,6 +246,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -254,6 +264,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -271,6 +282,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -288,6 +300,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -305,6 +318,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -322,6 +336,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, }, { userId: this.$store.state.user.name, @@ -339,6 +354,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 145, } ], @@ -352,6 +368,8 @@ created () { this.getDataList() this.favoriteIsOk() + // 动态列 + this.getTableUserColumn(this.$route.meta.menuId+'table',1) }, methods: { // 校验用户是否收藏 @@ -494,6 +512,72 @@ return s }, // 导出 end + + // 动态列开始 获取 用户保存的 格式列 + async getTableUserColumn(tableId, columnId) { + let queryTableUser = { + userId: this.$store.state.user.name, + functionId: this.$route.meta.menuId, + tableId: tableId, + status: true, + languageCode: this.$i18n.locale + } + await getTableUserListLanguage(queryTableUser).then(({data}) => { + if (data.rows.length > 0) { + //this.columnList1 = [] + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + + } else { + this.getColumnList(tableId, columnId) + } + }) + + }, + + // 获取 tableDefault 列 + async getColumnList(tableId, columnId) { + this.queryTable.tableId = tableId + let queryTable= { + functionId: this.$route.meta.menuId, + tableId: tableId, + languageCode: this.$i18n.locale + } + await getTableDefaultListLanguage(queryTable).then(({data}) => { + if (!data.rows.length == 0) { + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + } else { + // this.showDefault = true. + } + }) + + }, + //动态列结束 } } diff --git a/src/views/modules/eamReport/eamOperatorCheckReport.vue b/src/views/modules/eamReport/eamOperatorCheckReport.vue index 2447952..23fb4b8 100644 --- a/src/views/modules/eamReport/eamOperatorCheckReport.vue +++ b/src/views/modules/eamReport/eamOperatorCheckReport.vue @@ -99,6 +99,10 @@ import { searchEamOperatorSumReport } from "@/api/eam/eamReport.js" + import { + getTableDefaultListLanguage, + getTableUserListLanguage, + } from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' @@ -171,6 +175,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 162, }, { userId: this.$store.state.user.name, @@ -188,6 +193,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 160, }, { userId: this.$store.state.user.name, @@ -205,6 +211,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 160, }, { userId: this.$store.state.user.name, @@ -222,6 +229,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 160, }, { userId: this.$store.state.user.name, @@ -239,6 +247,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 160, }, { userId: this.$store.state.user.name, @@ -256,6 +265,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 160, }, { userId: this.$store.state.user.name, @@ -273,6 +283,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 160, }, { userId: this.$store.state.user.name, @@ -290,6 +301,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 160, }, { userId: this.$store.state.user.name, @@ -307,6 +319,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 160, }, { userId: this.$store.state.user.name, @@ -324,6 +337,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 160, } ], @@ -336,8 +350,9 @@ }, created () { this.getDataList() - this.favoriteIsOk() + // 动态列 + this.getTableUserColumn(this.$route.meta.menuId+'table',1) }, methods: { // 校验用户是否收藏 @@ -482,6 +497,72 @@ return s }, // 导出 end + + // 动态列开始 获取 用户保存的 格式列 + async getTableUserColumn(tableId, columnId) { + let queryTableUser = { + userId: this.$store.state.user.name, + functionId: this.$route.meta.menuId, + tableId: tableId, + status: true, + languageCode: this.$i18n.locale + } + await getTableUserListLanguage(queryTableUser).then(({data}) => { + if (data.rows.length > 0) { + //this.columnList1 = [] + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + + } else { + this.getColumnList(tableId, columnId) + } + }) + + }, + + // 获取 tableDefault 列 + async getColumnList(tableId, columnId) { + this.queryTable.tableId = tableId + let queryTable= { + functionId: this.$route.meta.menuId, + tableId: tableId, + languageCode: this.$i18n.locale + } + await getTableDefaultListLanguage(queryTable).then(({data}) => { + if (!data.rows.length == 0) { + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + } else { + // this.showDefault = true. + } + }) + + }, + //动态列结束 } } diff --git a/src/views/modules/eamReport/eamOperatorDefectReport.vue b/src/views/modules/eamReport/eamOperatorDefectReport.vue index 5e03a20..8aea921 100644 --- a/src/views/modules/eamReport/eamOperatorDefectReport.vue +++ b/src/views/modules/eamReport/eamOperatorDefectReport.vue @@ -99,6 +99,10 @@ import { searchEamOperatorSumReport } from "@/api/eam/eamReport.js" + import { + getTableDefaultListLanguage, + getTableUserListLanguage, + } from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' export default { @@ -159,7 +163,7 @@ functionId: 101005006, serialNumber: '101005006TableOperator', tableId: "101005006Table", - tableName: "设备维修报表", + tableName: "人员维修报表", columnProp: 'operator', headerAlign: "center", align: "left", @@ -176,7 +180,7 @@ functionId: 101005006, serialNumber: '101005006TableOperatorName', tableId: "101005006Table", - tableName: "设备维修报表", + tableName: "人员维修报表", columnProp: 'operatorName', headerAlign: "center", align: "left", @@ -187,13 +191,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 113, }, { userId: this.$store.state.user.name, functionId: 101005006, serialNumber: '101005006TableDepartment', tableId: "101005006Table", - tableName: "设备维修报表", + tableName: "人员维修报表", columnProp: 'department', headerAlign: "center", align: "left", @@ -204,13 +209,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 113, }, { userId: this.$store.state.user.name, functionId: 101005006, serialNumber: '101005006TableAdminLevelID', tableId: "101005006Table", - tableName: "设备维修报表", + tableName: "人员维修报表", columnProp: 'adminLevelID', headerAlign: "center", align: "center", @@ -221,13 +227,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 113, }, { userId: this.$store.state.user.name, functionId: 101005006, serialNumber: '101005006TableAdminLevelDesc', tableId: "101005006Table", - tableName: "设备维修报表", + tableName: "人员维修报表", columnProp: 'adminLevelDesc', headerAlign: "center", align: "left", @@ -238,13 +245,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 113, }, { userId: this.$store.state.user.name, functionId: 101005006, serialNumber: '101005006TableQtyAll', tableId: "101005006Table", - tableName: "设备维修报表", + tableName: "人员维修报表", columnProp: 'qtyAll', headerAlign: "center", align: "right", @@ -255,13 +263,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 113, }, { userId: this.$store.state.user.name, functionId: 101005006, serialNumber: '101005006TableQTyFinished', tableId: "101005006Table", - tableName: "设备维修报表", + tableName: "人员维修报表", columnProp: 'qtyFinished', headerAlign: "center", align: "right", @@ -272,13 +281,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 113, }, { userId: this.$store.state.user.name, functionId: 101005006, serialNumber: '101005006TableQtycancelled', tableId: "101005006Table", - tableName: "设备维修报表", + tableName: "人员维修报表", columnProp: 'qtycancelled', headerAlign: "center", align: "right", @@ -289,13 +299,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 113, }, { userId: this.$store.state.user.name, functionId: 101005006, serialNumber: '101005006TableFinishPercent', tableId: "101005006Table", - tableName: "设备维修报表", + tableName: "人员维修报表", columnProp: 'finishPercent', headerAlign: "center", align: "right", @@ -306,13 +317,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 113, }, { userId: this.$store.state.user.name, functionId: 101005006, serialNumber: '101005006TableWorkTime', tableId: "101005006Table", - tableName: "设备维修报表", + tableName: "人员维修报表", columnProp: 'workTime', headerAlign: "center", align: "right", @@ -337,6 +349,8 @@ this.favoriteIsOk() this.getDataList() + // 动态列 + this.getTableUserColumn(this.$route.meta.menuId+'table',1) }, methods: { // 校验用户是否收藏 @@ -480,6 +494,72 @@ return s }, // 导出 end + + // 动态列开始 获取 用户保存的 格式列 + async getTableUserColumn(tableId, columnId) { + let queryTableUser = { + userId: this.$store.state.user.name, + functionId: this.$route.meta.menuId, + tableId: tableId, + status: true, + languageCode: this.$i18n.locale + } + await getTableUserListLanguage(queryTableUser).then(({data}) => { + if (data.rows.length > 0) { + //this.columnList1 = [] + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + + } else { + this.getColumnList(tableId, columnId) + } + }) + + }, + + // 获取 tableDefault 列 + async getColumnList(tableId, columnId) { + this.queryTable.tableId = tableId + let queryTable= { + functionId: this.$route.meta.menuId, + tableId: tableId, + languageCode: this.$i18n.locale + } + await getTableDefaultListLanguage(queryTable).then(({data}) => { + if (!data.rows.length == 0) { + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + } else { + // this.showDefault = true. + } + }) + + }, + //动态列结束 } } diff --git a/src/views/modules/eamReport/eamOperatorMaintenanceReport.vue b/src/views/modules/eamReport/eamOperatorMaintenanceReport.vue index c0aa5a2..e7dbf9e 100644 --- a/src/views/modules/eamReport/eamOperatorMaintenanceReport.vue +++ b/src/views/modules/eamReport/eamOperatorMaintenanceReport.vue @@ -99,6 +99,10 @@ import { searchEamOperatorSumReport } from "@/api/eam/eamReport.js" + import { + getTableDefaultListLanguage, + getTableUserListLanguage, + } from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' @@ -160,7 +164,7 @@ functionId: 101005005, serialNumber: '101005005TableOperator', tableId: "101005005Table", - tableName: "设备维保报表", + tableName: "人员维保报表", columnProp: 'operator', headerAlign: "center", align: "left", @@ -171,13 +175,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 170, }, { userId: this.$store.state.user.name, functionId: 101005005, serialNumber: '101005005TableOperatorName', tableId: "101005005Table", - tableName: "设备维保报表", + tableName: "人员维保报表", columnProp: 'operatorName', headerAlign: "center", align: "left", @@ -188,13 +193,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 161, }, { userId: this.$store.state.user.name, functionId: 101005005, serialNumber: '101005005TableDepartment', tableId: "101005005Table", - tableName: "设备维保报表", + tableName: "人员维保报表", columnProp: 'department', headerAlign: "center", align: "left", @@ -205,13 +211,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 161, }, { userId: this.$store.state.user.name, functionId: 101005005, serialNumber: '101005005TableAdminLevelID', tableId: "101005005Table", - tableName: "设备维保报表", + tableName: "人员维保报表", columnProp: 'adminLevelID', headerAlign: "center", align: "center", @@ -222,13 +229,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 161, }, { userId: this.$store.state.user.name, functionId: 101005005, serialNumber: '101005005TableAdminLevelDesc', tableId: "101005005Table", - tableName: "设备维保报表", + tableName: "人员维保报表", columnProp: 'adminLevelDesc', headerAlign: "center", align: "left", @@ -239,13 +247,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 161, }, { userId: this.$store.state.user.name, functionId: 101005005, serialNumber: '101005005TableQtyAll', tableId: "101005005Table", - tableName: "设备维保报表", + tableName: "人员维保报表", columnProp: 'qtyAll', headerAlign: "center", align: "right", @@ -256,13 +265,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 161, }, { userId: this.$store.state.user.name, functionId: 101005005, serialNumber: '101005005TableQTyFinished', tableId: "101005005Table", - tableName: "设备维保报表", + tableName: "人员维保报表", columnProp: 'qtyFinished', headerAlign: "center", align: "right", @@ -273,13 +283,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 161, }, { userId: this.$store.state.user.name, functionId: 101005005, serialNumber: '101005005TableQtycancelled', tableId: "101005005Table", - tableName: "设备维保报表", + tableName: "人员维保报表", columnProp: 'qtycancelled', headerAlign: "center", align: "right", @@ -290,12 +301,14 @@ sortLv: 0, status: true, fixed: '', - },{ + columnWidth: 161, + }, + { userId: this.$store.state.user.name, functionId: 101005005, serialNumber: '101005005TableFinishPercent', tableId: "101005005Table", - tableName: "设备维保报表", + tableName: "人员维保报表", columnProp: 'finishPercent', headerAlign: "center", align: "right", @@ -306,13 +319,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 161, }, { userId: this.$store.state.user.name, functionId: 101005005, serialNumber: '101005005TableWorkTime', tableId: "101005005Table", - tableName: "设备维保报表", + tableName: "人员维保报表", columnProp: 'workTime', headerAlign: "center", align: "right", @@ -323,10 +337,9 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 161, } ], - - } }, mounted () { @@ -336,8 +349,9 @@ }, created () { this.getDataList() - this.favoriteIsOk() + // 动态列 + this.getTableUserColumn(this.$route.meta.menuId+'table',1) }, methods: { // 校验用户是否收藏 @@ -480,6 +494,72 @@ return s }, // 导出 end + + // 动态列开始 获取 用户保存的 格式列 + async getTableUserColumn(tableId, columnId) { + let queryTableUser = { + userId: this.$store.state.user.name, + functionId: this.$route.meta.menuId, + tableId: tableId, + status: true, + languageCode: this.$i18n.locale + } + await getTableUserListLanguage(queryTableUser).then(({data}) => { + if (data.rows.length > 0) { + //this.columnList1 = [] + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + + } else { + this.getColumnList(tableId, columnId) + } + }) + + }, + + // 获取 tableDefault 列 + async getColumnList(tableId, columnId) { + this.queryTable.tableId = tableId + let queryTable= { + functionId: this.$route.meta.menuId, + tableId: tableId, + languageCode: this.$i18n.locale + } + await getTableDefaultListLanguage(queryTable).then(({data}) => { + if (!data.rows.length == 0) { + switch (columnId) { + case 1: + this.columnList = data.rows + break; + // case 2: + // this.columnDetailList = data.rows + // break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + } else { + // this.showDefault = true. + } + }) + + }, + //动态列结束 } } diff --git a/src/views/modules/reportWorkOrder/reportDefectOrder.vue b/src/views/modules/reportWorkOrder/reportDefectOrder.vue index 93cc810..e6630ef 100644 --- a/src/views/modules/reportWorkOrder/reportDefectOrder.vue +++ b/src/views/modules/reportWorkOrder/reportDefectOrder.vue @@ -350,6 +350,10 @@ searchFileUrl, // 查询文件路径 reach // 到达 } from "@/api/eam/eam.js" + import { + getTableDefaultListLanguage, + getTableUserListLanguage, + } from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' import reportImageUpload from "./report_image_upload.vue"; @@ -427,10 +431,10 @@ columnList: [ { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableOrderNo', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1Urgency', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'urgency', headerAlign: "center", align: "center", @@ -445,10 +449,10 @@ }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableOrderNo', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1OrderNo', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'orderNo', headerAlign: "center", align: "center", @@ -459,13 +463,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TablePlanID', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1PlanID', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'planID', headerAlign: "center", align: "center", @@ -476,13 +481,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TablePlanID', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1FeedBackDesc', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'feedBackDesc', headerAlign: "center", align: "center", @@ -493,13 +499,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TablePlanID', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1DefectID', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'defectID', headerAlign: "center", align: "center", @@ -510,13 +517,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TablePlanID', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1DefectDesc', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'defectDesc', headerAlign: "center", align: "center", @@ -527,13 +535,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableObjectID', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1ObjectID', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'objectID', headerAlign: "center", align: "center", @@ -544,13 +553,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableObjectID', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1ObjectDesc', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'objectDesc', headerAlign: "center", align: "center", @@ -561,13 +571,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableObjectID', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1CreateBy', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'createBy', headerAlign: "center", align: "center", @@ -578,13 +589,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableStatus', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1Status', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'status', headerAlign: "center", align: "center", @@ -595,13 +607,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TablePlanOperatorName', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1PlanOperatorName', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'planOperatorName', headerAlign: "center", align: "center", @@ -612,30 +625,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, - // { - // userId: this.$store.state.user.name, - // functionId: 101020, - // serialNumber: '101020TableActualOperatorName', - // tableId: "101020Table", - // tableName: "common", - // columnProp: 'actualOperatorName', - // headerAlign: "center", - // align: "center", - // columnLabel: '实际机修人员', - // columnHidden: false, - // columnImage: false, - // columnSortable: false, - // sortLv: 0, - // status: true, - // fixed: '', - // }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableActualPlanDate', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1PlanDate', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'planDate', headerAlign: "center", align: "center", @@ -646,47 +643,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, - // { - // userId: this.$store.state.user.name, - // functionId: 101020, - // serialNumber: '101020TableActualActualDate', - // tableId: "101020Table", - // tableName: "common", - // columnProp: 'actualDate', - // headerAlign: "center", - // align: "center", - // columnLabel: '实际执行时间', - // columnHidden: false, - // columnImage: false, - // columnSortable: false, - // sortLv: 0, - // status: true, - // fixed: '', - // }, - // { - // userId: this.$store.state.user.name, - // functionId: 101020, - // serialNumber: '101020TableWorkTime', - // tableId: "101020Table", - // tableName: "common", - // columnProp: 'workTime', - // headerAlign: "center", - // align: "center", - // columnLabel: '工作时间', - // columnHidden: false, - // columnImage: false, - // columnSortable: false, - // sortLv: 0, - // status: true, - // fixed: '', - // }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableActualRemark', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1Remark', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'remark', headerAlign: "center", align: "center", @@ -697,13 +661,14 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, { userId: this.$store.state.user.name, - functionId: 101020, - serialNumber: '101020TableActualRemark', - tableId: "101020Table", - tableName: "common", + functionId: 101004003, + serialNumber: '101004003Table1DocumentSource', + tableId: "101004003Table1", + tableName: "维修执行表", columnProp: 'documentSource', headerAlign: "center", align: "center", @@ -714,6 +679,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 107, }, ], detailModelFlag:false, @@ -864,6 +830,12 @@ HistoryRecordList: [], columnHistoryList: [ { + userId: this.$store.state.user.name, + functionId: 101004003, + serialNumber: '101004003Table2OrderNo', + tableId: "101004003Table2", + tableName: "维修记录表", + columnWidth: 114, columnProp: 'orderNo', headerAlign: "center", align: "center", @@ -876,6 +848,12 @@ fixed: '', }, { + userId: this.$store.state.user.name, + functionId: 101004003, + serialNumber: '101004003Table2PlanDesc', + tableId: "101004003Table2", + tableName: "维修记录表", + columnWidth: 114, columnProp: 'planDesc', headerAlign: "center", align: "center", @@ -888,6 +866,12 @@ fixed: '', }, { + userId: this.$store.state.user.name, + functionId: 101004003, + serialNumber: '101004003Table2DefectDesc', + tableId: "101004003Table2", + tableName: "维修记录表", + columnWidth: 114, columnProp: 'defectDesc', headerAlign: "center", align: "center", @@ -900,6 +884,12 @@ fixed: '', }, { + userId: this.$store.state.user.name, + functionId: 101004003, + serialNumber: '101004003Table2Result', + tableId: "101004003Table2", + tableName: "维修记录表", + columnWidth: 114, columnProp: 'result', headerAlign: "center", align: "center", @@ -912,6 +902,12 @@ fixed: '', }, { + userId: this.$store.state.user.name, + functionId: 101004003, + serialNumber: '101004003Table2DisposalMeasures', + tableId: "101004003Table2", + tableName: "维修记录表", + columnWidth: 114, columnProp: 'disposalMeasures', headerAlign: "center", align: "center", @@ -924,6 +920,12 @@ fixed: '', }, { + userId: this.$store.state.user.name, + functionId: 101004003, + serialNumber: '101004003Table2ActualOperatorName', + tableId: "101004003Table2", + tableName: "维修记录表", + columnWidth: 114, columnProp: 'actualOperatorName', headerAlign: "center", align: "center", @@ -936,6 +938,12 @@ fixed: '', }, { + userId: this.$store.state.user.name, + functionId: 101004003, + serialNumber: '101004003Table2WorkTime', + tableId: "101004003Table2", + tableName: "维修记录表", + columnWidth: 114, columnProp: 'workTime', headerAlign: "center", align: "right", @@ -948,6 +956,12 @@ fixed: '', }, { + userId: this.$store.state.user.name, + functionId: 101004003, + serialNumber: '101004003Table2ActualDate', + tableId: "101004003Table2", + tableName: "维修记录表", + columnWidth: 114, columnProp: 'actualDate', headerAlign: "center", align: "center", @@ -960,6 +974,12 @@ fixed: '', }, { + userId: this.$store.state.user.name, + functionId: 101004003, + serialNumber: '101004003Table2Remark', + tableId: "101004003Table2", + tableName: "维修记录表", + columnWidth: 114, columnProp: 'remark', headerAlign: "center", align: "center", @@ -986,6 +1006,9 @@ created () { this.getDataList() this.favoriteIsOk() + // 动态列 + this.getTableUserColumn(this.$route.meta.menuId+'table1',1) + this.getTableUserColumn(this.$route.meta.menuId+'table2',2) }, methods: { // 时间处理函数 @@ -1445,6 +1468,71 @@ elDatePickerOnFocus(){ document.activeElement.blur(); }, + // 动态列开始 获取 用户保存的 格式列 + async getTableUserColumn(tableId, columnId) { + let queryTableUser = { + userId: this.$store.state.user.name, + functionId: this.$route.meta.menuId, + tableId: tableId, + status: true, + languageCode: this.$i18n.locale + } + await getTableUserListLanguage(queryTableUser).then(({data}) => { + if (data.rows.length > 0) { + //this.columnList1 = [] + switch (columnId) { + case 1: + this.columnList = data.rows + break; + case 2: + this.columnHistoryList = data.rows + break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + + } else { + this.getColumnList(tableId, columnId) + } + }) + + }, + + // 获取 tableDefault 列 + async getColumnList(tableId, columnId) { + this.queryTable.tableId = tableId + let queryTable= { + functionId: this.$route.meta.menuId, + tableId: tableId, + languageCode: this.$i18n.locale + } + await getTableDefaultListLanguage(queryTable).then(({data}) => { + if (!data.rows.length == 0) { + switch (columnId) { + case 1: + this.columnList = data.rows + break; + case 2: + this.columnHistoryList = data.rows + break; + // case 3: + // this.columnList2 = data.rows + // break; + // case 4: + // this.columnList3 = data.rows + // break; + } + } else { + // this.showDefault = true. + } + }) + + }, + //动态列结束 } } diff --git a/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue b/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue index dc340a5..71c688c 100644 --- a/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue +++ b/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue @@ -1225,7 +1225,6 @@ this.getTableUserColumn(this.$route.meta.menuId+'table1',1) this.getTableUserColumn(this.$route.meta.menuId+'table2',2) this.getTableUserColumn(this.$route.meta.menuId+'table3',3) - this.getTableUserColumn(this.$route.meta.menuId+'table4',4) }, methods: { // 回车选中下一行 @@ -1645,9 +1644,9 @@ case 3: this.columnHistoryList = data.rows break; - case 4: - this.columnHistoryDetailList = data.rows - break; + // case 4: + // this.columnHistoryDetailList = data.rows + // break; } } else { @@ -1677,9 +1676,9 @@ case 3: this.columnHistoryList = data.rows break; - case 4: - this.columnHistoryDetailList = data.rows - break; + // case 4: + // this.columnHistoryDetailList = data.rows + // break; } } else { // this.showDefault = true.