diff --git a/src/views/project-demand/collection/index.vue b/src/views/project-demand/collection/index.vue index b9fb47c..2208968 100644 --- a/src/views/project-demand/collection/index.vue +++ b/src/views/project-demand/collection/index.vue @@ -94,11 +94,17 @@ const tableConfig = reactive({ align: 'center', showOverflowTooltip: false, currentRender: ({row, index}) => { - console.log('row',row.buttons) - let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}] - if (row.state === '3' || row.state === '2') { + let btn = [] + let buttons = new Set(Array.from(row.buttons)) + if (buttons.has("details")){ + btn.push({label: '详情', func: () => handleDetail(row), type: 'primary'}) + } + if (buttons.has("edit")) { btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'}) } + if (buttons.has("report")) { + btn.push({label: '需求上报', func: () => handleEdit(row), type: 'primary'}) + } return (