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(() => { /> - +