duy 1 год назад
Родитель
Сommit
6c8b6a2615
2 измененных файлов с 33 добавлено и 11 удалено
  1. 14 6
      src/api/modules/initial/initial.js
  2. 19 5
      src/views/transfer/write-report.vue

+ 14 - 6
src/api/modules/initial/initial.js

@@ -124,10 +124,18 @@ export default {
     },
     //在线验收-获取档案文件抽检意见
     async getArchiveFileOpinion(form, msg = true) {
-    return httpApi({
-        url: '/api/blade-archive/archivesauto/getArchiveFileOpinion',
-        method: 'get',
-        params: form,
-    }, msg)
-},
+        return httpApi({
+            url: '/api/blade-archive/archivesauto/getArchiveFileOpinion',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
+    //在线验收-获取报告
+    async getArchiveConclusion(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-archive/archivesauto/getArchiveConclusion',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
 }

+ 19 - 5
src/views/transfer/write-report.vue

@@ -21,7 +21,7 @@
                 <el-button hc-btn @click="toBackClick">返回主页</el-button>
             </template>
 
-            <HcOnlineOffice :src="docxUrl" title="测试的文档.docx" />
+            <HcOnlineOffice :src="docxUrl" title="测试的文档.docx" :url="saveUrl" />
         </hc-new-card>
 
         <!-- 短信认证 -->
@@ -57,6 +57,7 @@
 import { onMounted, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import { useRouter } from 'vue-router'
+import initialgApi from '~api/initial/initial'
 
 //变量
 const router = useRouter()
@@ -65,17 +66,30 @@ const projectId = ref(useAppState.getProjectId)
 const contractId = ref(useAppState.getContractId)
 const projectInfo = ref(useAppState.getProjectInfo)
 
+
 //渲染完成
 onMounted(() => {
-    setTimeout(() => {
-        docxUrl.value = 'http://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com/upload/20230317/e2bdc6581e397b810b46ac7cd71b111b.docx'
-    }, 1000)
+    // setTimeout(() => {
+    //     docxUrl.value = 'http://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com/upload/20230317/e2bdc6581e397b810b46ac7cd71b111b.docx'
+    // }, 1000)
+    geDocxUrl()
 })
 
 const state = ref(1)
 const docxUrl = ref('')
+const saveUrl = ref('http://192.168.0.128:8090/blade-archive/archivesauto/callbackSave')
 //const docxUrl = ref('https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20230317/e2bdc6581e397b810b46ac7cd71b111b.docx')
-
+//获取文档地址
+const geDocxUrl = async ()=>{
+    const { error, code, data } = await initialgApi.getArchiveConclusion({
+        projectId: projectId.value,
+    })
+    if (!error && code === 200) {
+        docxUrl.value = data['worldUrl']
+    } else {
+        docxUrl.value = ''
+    }
+}
 //确认提交
 const submissionClick = () => {
     SMSAuthShow.value = true