From 981b359684adbf8b16fe42a009d8d24805b3b70f Mon Sep 17 00:00:00 2001 From: Apcallover <1503963513@qq.com> Date: Sun, 7 Apr 2024 16:01:18 +0800 Subject: [PATCH] =?UTF-8?q?flat:=20=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/report/talentPool/confirmed.vue | 38 +++++++++++----------- src/views/report/talentPool/potential.vue | 39 ++++++++++++----------- vue.config.js | 2 +- 3 files changed, 40 insertions(+), 39 deletions(-) diff --git a/src/views/report/talentPool/confirmed.vue b/src/views/report/talentPool/confirmed.vue index a7fd3f6..7ae653d 100644 --- a/src/views/report/talentPool/confirmed.vue +++ b/src/views/report/talentPool/confirmed.vue @@ -20,9 +20,9 @@ import {confirmCount} from '@/api/report/report' import CustomLoading from "@/components/Custom-Loading/index.vue"; import { dateFormat } from "@/util/date"; const columnEnum = { - 'totalCount': '总数', - 'otherCount': '机构登记数', - 'registerCount': '总库(其他)', + 'data1': '总数', + 'data2': '机构登记数', + 'data3': '总库(其他)', } const pages = { total: 0, size: 10, currentPage: 1 } const baseOptions = { @@ -59,27 +59,28 @@ export default { computed: { options() { const tableHead = this.headColum.map((item, index) => ({ - label: item.columnName, + label: item.gname, display:false, children: Object.keys(columnEnum).map((key) => ({ label: columnEnum[key], - prop: `${index}_${item.id}_${key}`, + prop: `${index}_${item.gid}_${key}`, display:false, - width: 120, + width: 100, })) })) - console.log('tableHead',tableHead) + const headTitle = { + label: '机构名称', + prop: 'name', + search: true, + fixed: true, + } + if(this.infoPages.total !== 0) {headTitle.width = 200} return { ...baseOptions, height: 200, width:200, - column: [{ - label: '机构名称', - prop: 'name', - search: true, - fixed: true, - width: 200, - }, + column: [ + headTitle, ...tableHead, { label: '日期', @@ -127,13 +128,12 @@ export default { } let resData = await confirmCount(params) if(resData.data.code === 200) { - const { list, columnInfo } = resData.data.data - const { current, size ,total, records } = list + const { current, size ,total, records } = resData.data.data this.infoData = records.map((item) => ({ ...item, ...this.decompose(item.list) })) - console.log('infoData',this.infoData) + const columnInfo = records.length ? records[0].list : [] this.headColum = columnInfo this.infoPages = { ...this.infoPages, currentPage: current, total, size} this.visible = false; @@ -147,8 +147,8 @@ export default { let obj = {} for (let i = 0; i < list.length; i++) { const item = list[i] - Object.keys(item).forEach((vitem) => { - obj[`${i}_${item.id}_${vitem}`] = item[vitem] + Object.keys(item.dataVO).forEach((vitem) => { + obj[`${i}_${item.gid}_${vitem}`] = item.dataVO[vitem] }) } return obj diff --git a/src/views/report/talentPool/potential.vue b/src/views/report/talentPool/potential.vue index 2472d8c..ea7d3ff 100644 --- a/src/views/report/talentPool/potential.vue +++ b/src/views/report/talentPool/potential.vue @@ -20,9 +20,9 @@ import {potentialCount} from '@/api/report/report' import CustomLoading from "@/components/Custom-Loading/index.vue"; import { dateFormat } from "@/util/date"; const columnEnum = { - 'totalCount': '总数', - 'otherCount': '机构登记数', - 'registerCount': '总库(其他)', + 'data1': '总数', + 'data2': '机构登记数', + 'data3': '总库(其他)', } const pages = { total: 0, size: 10, currentPage: 1 } const baseOptions = { @@ -51,6 +51,7 @@ export default { visible: false, search: {}, headColum: [], + } }, created() { @@ -59,27 +60,28 @@ export default { computed: { options() { const tableHead = this.headColum.map((item, index) => ({ - label: item.columnName, + label: item.gname, display:false, children: Object.keys(columnEnum).map((key) => ({ label: columnEnum[key], - prop: `${index}_${item.id}_${key}`, + prop: `${index}_${item.gid}_${key}`, display:false, - width: 120, + width: 100, })) })) - console.log('tableHead',tableHead) + const headTitle = { + label: '机构名称', + prop: 'name', + search: true, + fixed: true, + } + if(this.infoPages.total !== 0) {headTitle.width = 200} return { ...baseOptions, height: 200, width:200, - column: [{ - label: '机构名称', - prop: 'name', - search: true, - fixed: true, - width: 200, - }, + column: [ + headTitle, ...tableHead, { label: '日期', @@ -127,13 +129,12 @@ export default { } let resData = await potentialCount(params) if(resData.data.code === 200) { - const { list, columnInfo } = resData.data.data - const { current, size ,total, records } = list + const { current, size ,total, records } = resData.data.data this.infoData = records.map((item) => ({ ...item, ...this.decompose(item.list) })) - console.log('infoData',this.infoData) + const columnInfo = records.length ? records[0].list : [] this.headColum = columnInfo this.infoPages = { ...this.infoPages, currentPage: current, total, size} this.visible = false; @@ -147,8 +148,8 @@ export default { let obj = {} for (let i = 0; i < list.length; i++) { const item = list[i] - Object.keys(item).forEach((vitem) => { - obj[`${i}_${item.id}_${vitem}`] = item[vitem] + Object.keys(item.dataVO).forEach((vitem) => { + obj[`${i}_${item.gid}_${vitem}`] = item.dataVO[vitem] }) } return obj diff --git a/vue.config.js b/vue.config.js index d02b6dc..29b9062 100644 --- a/vue.config.js +++ b/vue.config.js @@ -23,7 +23,7 @@ module.exports = { port: 1888, proxy: { "/api": { - target: 'http://192.168.1.106:8000', + target: 'http://192.168.1.108:8000', ws: true, changeOrigin: true, pathRewrite: {