项目中心-支付模块
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { reactive, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { AppButton, FileList, UploadArea } from '@/components'
|
||||
import { useOssStore } from '@/stores/modules/oss'
|
||||
import type { FileInfo } from '@/types/api'
|
||||
import type { Qualification, QualificationInput, QualificationType } from '@/types/business/profile'
|
||||
|
||||
@@ -11,6 +12,8 @@ interface Props {
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const ossStore = useOssStore()
|
||||
|
||||
const visible = defineModel<boolean>('visible', { default: false })
|
||||
|
||||
const emit = defineEmits<{ save: [payload: QualificationInput] }>()
|
||||
@@ -56,11 +59,8 @@ function onUpload(file: File): void {
|
||||
}
|
||||
|
||||
function onPreview(file: FileInfo): void {
|
||||
if (file.url) {
|
||||
window.open(file.url, '_blank')
|
||||
return
|
||||
}
|
||||
ElMessage.info('附件预览待接口接入')
|
||||
// 同源预览:资质附件多为本地未上传文件(无 ossId),弹窗会提示无法在线预览
|
||||
ossStore.openPreview(file)
|
||||
}
|
||||
|
||||
function onDeleteFile(file: FileInfo): void {
|
||||
|
||||
@@ -4,9 +4,11 @@ import { ElMessage } from 'element-plus'
|
||||
import type { FileInfo } from '@/types/api'
|
||||
import type { Feedback } from '@/types/business/profile'
|
||||
import { useProfileStore } from '@/stores/modules/profile'
|
||||
import { useOssStore } from '@/stores/modules/oss'
|
||||
import FeedbackForm from './cpns/FeedbackForm.vue'
|
||||
|
||||
const profileStore = useProfileStore()
|
||||
const ossStore = useOssStore()
|
||||
|
||||
const resetSignal = ref(0)
|
||||
|
||||
@@ -30,11 +32,8 @@ function onReset(): void {
|
||||
}
|
||||
|
||||
function onPreview(file: FileInfo): void {
|
||||
if (file.url) {
|
||||
window.open(file.url, '_blank')
|
||||
return
|
||||
}
|
||||
ElMessage.info('附件预览待接口接入')
|
||||
// 同源预览:本地未上传文件无 ossId,弹窗会提示无法在线预览
|
||||
ossStore.openPreview(file)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user