From d484c8a6a8709affe1f3a1edc6cc2ec4a3ea6dfe Mon Sep 17 00:00:00 2001 From: renxiangke Date: Mon, 27 Jul 2026 18:54:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BB=BB=E5=8A=A1=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Table/index.vue | 15 +++++++++++++++ src/pages/yxcj/index.vue | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/Table/index.vue b/src/components/Table/index.vue index 62b1e897..5afc8e14 100644 --- a/src/components/Table/index.vue +++ b/src/components/Table/index.vue @@ -197,6 +197,8 @@ defineExpose({ tableData: props.tableData, // 暴露props中的表格数据 }); function getValueStyle(val: any, colorArr: string[]) { + + console.log(val,colorArr,"2141414") if (!colorArr || !Array.isArray(colorArr)) { return {}; } @@ -257,6 +259,19 @@ function getValueStyle(val: any, colorArr: string[]) { {{ scope.row[item.prop!].text }} + + +
+ {{ + getValueById( + selectOptions[item.prop!].list, + scope.row[item.prop!], + selectOptions[item.prop!].valueKey || 'value', + selectOptions[item.prop!].labelKey || 'label', + ) + }} +
+
{{ diff --git a/src/pages/yxcj/index.vue b/src/pages/yxcj/index.vue index 3baed84a..ebac4517 100644 --- a/src/pages/yxcj/index.vue +++ b/src/pages/yxcj/index.vue @@ -271,7 +271,7 @@ function listUpload() { const columns = ref([ { prop: 'taskName', label: '任务名称', type: 'text' }, // width: 180 - { prop: 'taskStatus', label: '任务状态', type: 'select', colorArr: ['#8C8C8C', '#FAAD14', '#1677FF', '#52C41A', '#F5222D', '#fff'], width: 90 }, + { prop: 'taskStatus', label: '任务状态', type: 'select', colorArr: ['#8C8C8C', '#FAAD14', '#1677FF', '#52C41A', '#F5222D', 'pink'], width: 120 }, { prop: 'releaseType', label: '释放类型', type: 'select', width: 90 }, { prop: 'releaseSourceLocation', label: '释放源位置', type: 'select', width: 100 }, { prop: 'timeRange', label: '数据时间范围', type: 'text', width: 200 }, @@ -932,7 +932,7 @@ onMounted(() => { /> - +