吉安感知网项目-前端
罗广辉
6 days ago 998b9078fb1e7fb99a6c695469e51ea2dd47178b
Merge remote-tracking branch 'origin/master'
2 files modified
1 files added
29 ■■■■ changed files
applications/task-work-order/src/views/documentPreview/index.vue 3 ●●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/orderManage/inspectionReport/index.vue 25 ●●●● patch | view | raw | blame | history
uniapps/work-wx/uploadCloudFunction.sh 1 ●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/documentPreview/index.vue
@@ -28,6 +28,8 @@
const route = useRoute()
const documentServerUrl = import.meta.env.VITE_APP_ONLYOFFICE_DOCUMENT_SERVER_URL
const attachId = computed(() => String(route.query.attachId || ''))
const mode = computed(() => String(route.query.mode || ''))
const config = ref(null)
const loading = ref(false)
const errorMessage = ref('')
@@ -45,6 +47,7 @@
    try {
        const res = await getOnlyOfficeConfigApi({
            attachId: attachId.value,
            mode: mode.value,
        })
        const data = res?.data?.data || res?.data
        if (!data?.document || !data?.editorConfig) {
applications/task-work-order/src/views/orderView/orderManage/inspectionReport/index.vue
@@ -279,12 +279,20 @@
    if (!row.link) {
        ElMessage.warning('文件链接不存在')
    } else if (allSupportedExtensions.includes(fileType)){
        let url = `${VITE_APP_PREVIEW_URL}/onlinePreview?url=` + encodeURIComponent(Base64.encode(row.link))
        // word/pdf 以可编辑的 html 模式打开(与 excel 一致)
        if (editableOfficeTypes.includes(fileType)) {
            url += '&officePreviewType=html'
        }
        window.open(url)
        // let url = `${VITE_APP_PREVIEW_URL}/onlinePreview?url=` + encodeURIComponent(Base64.encode(row.link))
        // // word/pdf 以可编辑的 html 模式打开(与 excel 一致)
        // if (editableOfficeTypes.includes(fileType)) {
        //     url += '&officePreviewType=html'
        // }
        // window.open(url)
        const route = router.resolve({
            path: '/documentPreview/officeEdit',
            query: {
                attachId: row.id,
                mode: 'view',
            },
        })
        window.open(route.href, '_blank')
    } else {
        ElMessage.warning(`${fileType}文件格式,可以下载再查看`)
    }
@@ -295,11 +303,16 @@
        ElMessage.warning('附件ID不存在')
        return
    }
    if (row?.extension === 'zip') {
        ElMessage.warning(`${row?.extension}文件格式,不能编辑`)
        return
    }
    const route = router.resolve({
        path: '/documentPreview/officeEdit',
        query: {
            attachId: row.id,
            mode: 'edit',
        },
    })
    window.open(route.href, '_blank')
uniapps/work-wx/uploadCloudFunction.sh
New file
@@ -0,0 +1 @@
${installPath} cloud functions deploy --e ${envId} --n quickstartFunctions --r --project ${projectPath}