Procházet zdrojové kódy

add;文件流下载接口

liujiayin před 3 roky
rodič
revize
cde044b615

+ 13 - 0
src/api/platform/file/attachment.js

@@ -103,6 +103,19 @@ export function download(params) {
     params: params
   })
 }
+/**
+ * 根据文件id获取文件流
+ * @param {*} params
+ */
+export function getFileByte(params) {
+    return request({
+      url: SYSTEM_URL() + '/file/getFileByte',
+      method: 'get',
+      isLoading: true,
+      responseType: 'arraybuffer',
+      params: params
+    })
+  }
 /* 在线编辑进行实时回调 */
 export function showView(params) {
   return request({

+ 10 - 1
src/business/platform/form/utils/JForm.js

@@ -24,6 +24,7 @@ import {
   sealPage,
   getSigPageUrl,
   generateUUID,
+  getFileByte
 } from '@/api/platform/file/attachment' //印章,快照
 const _import = require('@/utils/util.import.' + process.env.NODE_ENV)
 import pinyin4js from 'pinyin4js';
@@ -31,6 +32,11 @@ import store from '@/store'
 import router from '@/router'
 import { save } from '@/api/platform/message/innerMessage'
 
+import {
+    goSeal
+  } from '@/api/platform/form/seal' // ca电子签章接口
+
+
 // 定义全局
 var JForm
 if (!window.JForm) {
@@ -66,7 +72,10 @@ _.extend(JForm, {
     this.$doManulSeal = doManulSeal // 手动签章弹框
     this.$generateUUID = generateUUID // 自定义规则自动生成uuid
     this.$router = router //添加router对象
-    this.$save = save
+    this.$save = save   // 文件发放通知
+    this.$goSeal = goSeal  // ca电子签章接口
+    this.$getFileByte = getFileByte // 获取文件流
+
     this._ = _
     this.$store = store
     this._isInitialization = true