diff --git a/src/components/AttachmentUpload.vue b/src/components/AttachmentUpload.vue index f5d791e..fa2cc3c 100644 --- a/src/components/AttachmentUpload.vue +++ b/src/components/AttachmentUpload.vue @@ -114,9 +114,14 @@ watch(() => props.showTable, (newVal) => { watch(() => props.otherFileList, (newVal) => { console.log('newotherFileList',newVal) if (props.preview) { - newVal?.forEach(item => { - allFileList.value.push(item) - }) + if(props.formData.fileList==null){ + allFileList.value=newVal + }else { + newVal?.forEach(item => { + allFileList.value.push(item) + }) + } + }else { allFileList.value=newVal } @@ -124,9 +129,9 @@ watch(() => props.otherFileList, (newVal) => { watch(() => props.formData.fileList, (newVal) => { console.log('newVal-fileList',newVal) if (props.preview) { - newVal?.forEach(item => { - allFileList.value.push(item) - }) + newVal?.forEach(item => { + allFileList.value.push(item) + }) } }, {deep: true}) watch(() => props.formData.singleFile, (newVal) => { diff --git a/src/views/expense-management/share/index.vue b/src/views/expense-management/share/index.vue index 2956ad2..211f087 100644 --- a/src/views/expense-management/share/index.vue +++ b/src/views/expense-management/share/index.vue @@ -90,18 +90,18 @@ const tableConfig = reactive({ if(row.buttons){ buttons = new Set(Array.from(row.buttons)) } - // if (buttons.has("details")) { + if (buttons.has("details")) { btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'}) - // } - // if (buttons.has("edit")) { + } + if (buttons.has("edit")) { btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'}) - // } - // if (buttons.has("report")) { + } + if (buttons.has("report")) { btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'}) - // } - // if (buttons.has("report")) { + } + if (buttons.has("report")) { btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'}) - // } + } return (