Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/project-demand/requirement/detail.vue
This commit is contained in:
clay
2024-06-02 17:39:20 +08:00
23 changed files with 150 additions and 89 deletions

View File

@@ -27,10 +27,11 @@
<script setup lang="jsx">
import {useTagsView} from '@/stores/tagsview.js'
import {ElMessage, ElNotification} from "element-plus";
import { ElNotification} from "element-plus";
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import {getApplyProcess, projectApply, resubmitApply, getApplyDetail} from "@/api/project-manage";
import {useProcessStore} from '@/stores/processStore.js';
import {downloadFile} from "@/api/project-demand";
const tagsViewStore = useTagsView()
const router = useRouter()
@@ -71,25 +72,31 @@ const tableConfig = reactive({
align: 'center',
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
},
// {
// prop: 'oper',
// label: '操作',
// align: 'center',
// currentRender: ({row, index}) => {
// return (
// <div>
// <a style="cursor: pointer;font-size: 14px;color: #2a99ff;" href={row.url}>下载</a>
// <el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
// </div>
// )
// }
// }
{
prop: 'oper',
label: '操作',
align: 'center',
currentRender: ({row, index}) => {
return (
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
)
}
}
]
})
const loading = ref(false)
const processInstanceData = ref()
const processDiagramViewer = ref(true)
const name = ref(router.currentRoute.value.name)
const handleDownload = (row) => {
downloadFile(row.fileId).then(res => {
const blob = new Blob([res])
let a = document.createElement('a')
a.href = URL.createObjectURL(blob)
a.download = row.originalFileName
a.click()
})
}
const compositeParam = (item) => {
let tag = ''
if (name.value === 'Initiation/apply' || name.value === 'Initiation/edit') {
@@ -146,7 +153,7 @@ const handleSubmit = (instance) => {
type: 'error'
})
return;
}else {
} else {
attachment.value.clearValidate()
}
let params = {
@@ -207,7 +214,7 @@ const handleResubmit = async () => {
type: 'error'
})
return;
}else {
} else {
attachment.value.clearValidate()
}
console.log('params', params)
@@ -253,7 +260,7 @@ const init = () => {
nextTick(() => {
processDiagramViewer.value = true
})
}else {
} else {
ElNotification({
title: '提示',
message: res.msg,

View File

@@ -8,7 +8,7 @@
<baseTitle title="上传附件"></baseTitle>
<el-card style="width: 100%;margin: 15px 0">
<file-upload @getFile="getFile"/>
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" :tableConfig="tableConfig"
:data="fileList" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
@@ -127,5 +127,7 @@ const handleSubmit = async () => {
</script>
<style scoped>
:deep(.el-table--fit ){
height: 300px!important;
}
</style>