diff --git a/src/api/project-demand/index.js b/src/api/project-demand/index.js index de4098d..9a5a163 100644 --- a/src/api/project-demand/index.js +++ b/src/api/project-demand/index.js @@ -90,3 +90,10 @@ export const getRequirementAttachment = (params) => { params:params }); }; +export const uploadRequirementAttachment= (data) => { + return request({ + url: '/workflow/mosr/requirement/upload', + method: "post", + data: data + }); +}; diff --git a/src/api/project-manage/index.js b/src/api/project-manage/index.js index d746e48..0189260 100644 --- a/src/api/project-manage/index.js +++ b/src/api/project-manage/index.js @@ -34,6 +34,13 @@ export const getInitiationAttachment = (params) => { params:params }); }; +export const uploadInitiationAttachment= (data) => { + return request({ + url: '/workflow/mosr/project/approval/upload', + method: "post", + data: data + }); +}; //项目实施 export const getCheckDetail = (projectId) => { return request({ @@ -126,3 +133,10 @@ export const getFilingAttachment = (params) => { params:params }); }; +export const uploadFilingAttachment= (data) => { + return request({ + url: '/workflow/mosr/project/filing/upload', + method: "post", + data: data + }); +}; diff --git a/src/components/AttachmentUpload.vue b/src/components/AttachmentUpload.vue index 8709334..f5d791e 100644 --- a/src/components/AttachmentUpload.vue +++ b/src/components/AttachmentUpload.vue @@ -10,7 +10,7 @@ 删除 @@ -63,20 +63,21 @@ const tableConfig = reactive({ align: 'center', currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB') }, - // { - // prop: 'oper', - // label: '操作', - // align: 'center', - // showOverflowTooltip: false, - // currentRender: ({row, index}) => { - // return ( - //
- // handleDownload(row)}>下载 - // deleteOtherFile(row)}>删除 - //
- // ) - // } - // } + { + prop: 'oper', + label: '操作', + align: 'center', + showOverflowTooltip: false, + currentRender: ({row, index}) => { + return ( +
+ handleDownload(row)}>下载 +
+ ) + } + } + + // deleteOtherFile(row)}>删除 ] }) const rules = reactive({ @@ -84,6 +85,7 @@ const rules = reactive({ }) const applyForm = ref() const singleFile = ref() +const isSingleFile = ref(false) const allFileList = ref([]) const props = defineProps({ showFileList: { @@ -110,12 +112,17 @@ watch(() => props.showTable, (newVal) => { props.showTable = newVal }, {deep: true}) watch(() => props.otherFileList, (newVal) => { - console.log('new',newVal) - // newVal?.forEach(item => { + console.log('newotherFileList',newVal) + if (props.preview) { + newVal?.forEach(item => { + allFileList.value.push(item) + }) + }else { allFileList.value=newVal - // }) + } }, {deep: true}) watch(() => props.formData.fileList, (newVal) => { + console.log('newVal-fileList',newVal) if (props.preview) { newVal?.forEach(item => { allFileList.value.push(item) @@ -127,6 +134,7 @@ watch(() => props.formData.singleFile, (newVal) => { singleFile.value = newVal }, {deep: true}) const getAttachment = (val) => { + isSingleFile.value=true emit('getAttachment', val) } const getOtherFile = (val) => { @@ -135,7 +143,12 @@ const getOtherFile = (val) => { const deleteAttachment = (val) => { deleteFile(val).then(res => { if (res.code === 1000) { - ElMessage.success("删除成功"); + ElNotification({ + title: '提示', + message:"删除成功", + type:'success' + }) + isSingleFile.value=false } }); } diff --git a/src/components/DetailComponent/Opinion.vue b/src/components/DetailComponent/Opinion.vue index d5f00b5..4e6738b 100644 --- a/src/components/DetailComponent/Opinion.vue +++ b/src/components/DetailComponent/Opinion.vue @@ -37,8 +37,7 @@ const schema = computed(() => { props: { placeholder: '请输入审核意见', type: 'textarea', - // maxlength: 140, - rows:3 + rows: 3 } } ] @@ -52,7 +51,13 @@ const back = () => { router.push({name: 'Filing'}) break; case 'Implementation/detail': - router.push({name: 'Implementation'}) + if (route.query.step === '20') { + router.push({name: 'Initiation'}) + } else if (route.query.step === '40') { + router.push({name: 'Implementation'}) + } else if (route.query.step === '50') { + router.push({name: 'Filing'}) + } break; case 'Summary/detail': router.push({name: 'Summary'}) diff --git a/src/components/FileUpload.vue b/src/components/FileUpload.vue index 2d4b863..2a6a16d 100644 --- a/src/components/FileUpload.vue +++ b/src/components/FileUpload.vue @@ -4,7 +4,7 @@ :headers="headers" :limit="maxSize" with-credentials - :multiple="maxSize > 0" + :multiple="multiple" :data="uploadParams" :show-file-list="showFileList" :auto-upload="true" @@ -19,8 +19,9 @@ @@ -108,6 +106,7 @@ a { font-size: 14px; color: #2a99ff; } + :deep(.el-upload-list) { width: 400px; } diff --git a/src/fvcomponents/fvTable/index.vue b/src/fvcomponents/fvTable/index.vue index ed4a388..2ca8d2f 100644 --- a/src/fvcomponents/fvTable/index.vue +++ b/src/fvcomponents/fvTable/index.vue @@ -4,12 +4,12 @@
{{ btn.name }} @@ -19,7 +19,9 @@
- + + +
- +
@@ -49,19 +52,19 @@