From f327b067c2c6adc4996c43ef5737637c562a8cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=A5=89=E6=BA=90?= <1976974459@qq.com> Date: Wed, 8 Nov 2023 17:55:58 +0800 Subject: [PATCH] =?UTF-8?q?2023-11-08=20=E8=AE=BE=E5=A4=87=E5=92=8C?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=E4=BF=AE=E6=94=B92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main-navbar.vue | 10 +- src/views/modules/qc/FAIResultEntry.vue | 233 ++++++++++++++++++++--- src/views/modules/qc/FQCResultEntry.vue | 220 ++++++++++++++++++++- src/views/modules/qc/IPQCResultEntry.vue | 221 ++++++++++++++++++++- src/views/modules/qc/IQCResultEntry.vue | 35 +++- 5 files changed, 669 insertions(+), 50 deletions(-) diff --git a/src/views/main-navbar.vue b/src/views/main-navbar.vue index d180a0b..9c6f071 100644 --- a/src/views/main-navbar.vue +++ b/src/views/main-navbar.vue @@ -24,11 +24,11 @@ - - - - - + + + + + diff --git a/src/views/modules/qc/FAIResultEntry.vue b/src/views/modules/qc/FAIResultEntry.vue index 5a9ad3b..223d23d 100644 --- a/src/views/modules/qc/FAIResultEntry.vue +++ b/src/views/modules/qc/FAIResultEntry.vue @@ -92,7 +92,7 @@ { for (let i = 0; i < data.list.length; i++) { - // let flag=false; if(this.$route.meta.menuId==data.list[i].menuId){ this.favorite = true - // flag=true; } } - }) }, @@ -2468,17 +2589,10 @@ functionId: this.$route.meta.menuId, } if (this.favorite) { - // 取消收藏 - // this.$confirm(`确定取消收藏`, '提示', { - // confirmButtonText: '确定', - // cancelButtonText: '取消', - // type: 'warning' - // }).then(() => { - removeUserFavorite(userFavorite).then(({data}) => { - this.$message.success(data.msg) - this.favorite = false - }) - // }) + removeUserFavorite(userFavorite).then(({data}) => { + this.$message.success(data.msg) + this.favorite = false + }) } else { // 收藏 saveUserFavorite(userFavorite).then(({data}) => { @@ -2495,23 +2609,17 @@ await qcFAIInspectionSearch(this.searchData).then(({data}) => { this.exportList= data.page.list; }) - return this.exportList; }, - startDownload() { - // this.exportData = this.dataList - - }, + startDownload() {}, - finishDownload() { - - }, + finishDownload() {}, fields() { let json = "{" - this.columnList.forEach((item, index) => { - if (index == this.columnList.length - 1) { + this.columnList1.forEach((item, index) => { + if (index == this.columnList1.length - 1) { json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" } else { json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," @@ -2522,7 +2630,74 @@ 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.columnList1 = data.rows + break; + // case 2: + // this.columnList1 = 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.columnList1 = data.rows + break; + // case 2: + // this.columnList1 = 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/qc/FQCResultEntry.vue b/src/views/modules/qc/FQCResultEntry.vue index 15992bb..70a4dc9 100644 --- a/src/views/modules/qc/FQCResultEntry.vue +++ b/src/views/modules/qc/FQCResultEntry.vue @@ -92,7 +92,7 @@ - + @@ -339,7 +339,7 @@ 上传文件 - +
@@ -353,7 +353,7 @@ prop="" header-align="center" align="center" - min-width="40" + min-width="60" label="操作"> - + @@ -374,7 +374,7 @@ prop="" header-align="center" align="center" - min-width="40" + min-width="60" label="操作">