Przeglądaj źródła

Merge branch 'master' of http://119.23.210.103:3000/wy/lh_firm_former

zhangjingyuan 3 lat temu
rodzic
commit
064e4d06b2

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

@@ -103,6 +103,19 @@ export function download(params) {
     params: 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) {
 export function showView(params) {
   return request({
   return request({

+ 4 - 1
src/business/platform/data/templatebuilder/right-aside/components/export-column.vue

@@ -166,10 +166,13 @@ export default {
     },
     },
     data: {
     data: {
       handler: function(val, oldVal) {
       handler: function(val, oldVal) {
+        const arr = this.datasets.filter(d => d.parentId !== '0')
         if (!val) return
         if (!val) return
-        // this.exportColumns.fields = this.initFormData(this.datasets)
+        // 当未设置导出字段或已设置导出字段但是字段数量与数据集字段不等时(说明表中有新增字段),重新获取导出字段
         if (this.$utils.isEmpty(val.export_columns)) {
         if (this.$utils.isEmpty(val.export_columns)) {
           this.exportColumns.fields = this.initFormData(this.datasets)
           this.exportColumns.fields = this.initFormData(this.datasets)
+        } else if (val.export_columns.fields && (val.export_columns.fields.length !== arr.length)) {
+          this.exportColumns.fields = this.initFormData(this.datasets)
         } else {
         } else {
           this.exportColumns = val.export_columns
           this.exportColumns = val.export_columns
         }
         }

+ 7 - 7
src/business/platform/data/templaterender/components/print.vue

@@ -79,8 +79,8 @@
                         value: 'bianHao'
                         value: 'bianHao'
                     },
                     },
                     {
                     {
-                        label: '规格',
-                        value: 'guiGe'
+                        label: '代数',
+                        value: 'daiShu'
                     },
                     },
                     {
                     {
                         label: '货号',
                         label: '货号',
@@ -90,6 +90,10 @@
                         label: '批号',
                         label: '批号',
                         value: 'piHao'
                         value: 'piHao'
                     },
                     },
+                    {
+                        label: '规格',
+                        value: 'guiGe'
+                    },
                     {
                     {
                         label: '到库日期',
                         label: '到库日期',
                         value: 'daoKuRiQi'
                         value: 'daoKuRiQi'
@@ -98,10 +102,6 @@
                         label: '有效期',
                         label: '有效期',
                         value: 'youXiaoQi'
                         value: 'youXiaoQi'
                     },
                     },
-                    {
-                        label: '代数',
-                        value: 'daiShu'
-                    },
                     {
                     {
                         label: '生厂商',
                         label: '生厂商',
                         value: 'shengChanShang',
                         value: 'shengChanShang',
@@ -145,7 +145,7 @@
             border: 1px solid #000;
             border: 1px solid #000;
             border-radius: 4px;
             border-radius: 4px;
             .item {
             .item {
-                margin-bottom: 1px;
+                margin-bottom: 6px;
                 display: inline-block;
                 display: inline-block;
                 min-width: 50%;
                 min-width: 50%;
                 .name {
                 .name {

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

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