|
|
@ -43,6 +43,8 @@ |
|
|
|
<template #fileSlot="{text}"> |
|
|
|
<template #fileSlot="{text}"> |
|
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
|
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
|
|
|
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button> |
|
|
|
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button> |
|
|
|
|
|
|
|
<a-button v-if="text" type="primary" preIcon="ant-design:download-outlined" size="small" @click="handlePreview(text)">预览</a-button> |
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</BasicTable> |
|
|
|
</BasicTable> |
|
|
|
<!-- 表单区域 --> |
|
|
|
<!-- 表单区域 --> |
|
|
@ -62,6 +64,7 @@ |
|
|
|
import JSelectUserByDept from '/@/components/Form/src/jeecg/components/JSelectUserByDept.vue'; |
|
|
|
import JSelectUserByDept from '/@/components/Form/src/jeecg/components/JSelectUserByDept.vue'; |
|
|
|
import { useRoute } from 'vue-router'; |
|
|
|
import { useRoute } from 'vue-router'; |
|
|
|
import {useMessage} from "../../hooks/web/useMessage"; |
|
|
|
import {useMessage} from "../../hooks/web/useMessage"; |
|
|
|
|
|
|
|
import {getDownWork} from "/@/views/UpfilePersion/UpfilePersion.api"; |
|
|
|
|
|
|
|
|
|
|
|
const { createMessage } = useMessage(); |
|
|
|
const { createMessage } = useMessage(); |
|
|
|
const route = useRoute(); |
|
|
|
const route = useRoute(); |
|
|
@ -105,6 +108,21 @@ |
|
|
|
sm: { span: 16 }, |
|
|
|
sm: { span: 16 }, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handlePreview(record) { |
|
|
|
|
|
|
|
console.log("==========================================================="); |
|
|
|
|
|
|
|
console.log(record); |
|
|
|
|
|
|
|
console.log("==========================================================="); |
|
|
|
|
|
|
|
const previewServerUrl = 'http://10.20.15.171:8012/onlinePreview?url='; |
|
|
|
|
|
|
|
let url = 'http://10.20.15.171/jeecg-boot/sys/common/static/' + record; |
|
|
|
|
|
|
|
window.open(previewServerUrl + encodeURIComponent(base64Encode(url))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function base64Encode(str: string): string { |
|
|
|
|
|
|
|
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) { |
|
|
|
|
|
|
|
return String.fromCharCode('0x' + p1); |
|
|
|
|
|
|
|
})); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 新增事件 |
|
|
|
* 新增事件 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|