Pārlūkot izejas kodu

add:添加手动签章

liujiayin 3 gadi atpakaļ
vecāks
revīzija
2e12349da3

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 22459
package-lock.json


+ 36 - 9
src/api/platform/file/attachment.js

@@ -189,12 +189,39 @@ export function seal(url,fileType,type) {
       data: data
     })
 }
- function generateUUID() {
-      var d = new Date().getTime();
-      var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
-        var r = (d + Math.random()*16)%16 | 0;
-        d = Math.floor(d/16);
-        return (c=='x' ? r : (r&0x3|0x8)).toString(16);
-      });
-      return uuid;
-      };
+
+/* 脚本对文件进行手动盖章-预处理 */
+export function sealPre(url, fileKey) {
+  let Base64 = require('js-base64').Base64
+  let data = {
+    "signKey": "V1FTMjAyMTEyMjFkOTVjNWM=",
+    "signSecret": "YWQwMmY3ZjQ4ZDJmMmYwNDA=",
+    "sealUser": "YWRtaW4=",
+    "password": "MTIzNA==",
+    "provideSigFile": Base64.encode(url),
+    // "getSigFile":  Base64.encode(this.$form.$getSigFile),
+    "getSigFile":  Base64.encode('https://www.mingjianlims.com'),
+    "fileKey": Base64.encode(fileKey),
+  }
+  return axios({
+    url: this.$form.$getSealPreFile,
+    method: 'post',
+    data: data
+  })
+}
+
+/* 脚本对文件进行手动盖章-手动签章页面的url */
+export function getSigPageUrl(sigFile) {
+  let sigUrl = this.$form.$getSealPageFile+'?signKey=V1FTMjAyMTEyMjFkOTVjNWM=&signSecret=YWQwMmY3ZjQ4ZDJmMmYwNDA=&sigFile='+sigFile;
+  return  sigUrl
+}
+
+export function generateUUID() {
+  var d = new Date().getTime();
+  var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+    var r = (d + Math.random() * 16) % 16 | 0;
+    d = Math.floor(d / 16);
+    return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);
+  });
+  return uuid;
+};

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

@@ -16,7 +16,9 @@ import getserial from './custom/serialNumber' //编码规则
 import pintText from './custom/pintText.js' //打印规则
 import repostCurd from './custom/joinCURD.js' //增删改查规则
 import getDate from './custom/getDateRule.js' //获取年月日
-import { snapshoot,seal } from '@/api/platform/file/attachment' //印章,快照
+import { snapshoot,seal,sealPre,
+  getSigPageUrl,
+  generateUUID, } from '@/api/platform/file/attachment' //印章,快照
 const _import = require('@/utils/util.import.' + process.env.NODE_ENV)
 import pinyin4js from 'pinyin4js';
 import store from '@/store'
@@ -50,6 +52,9 @@ _.extend(JForm, {
     this.$curdPost = repostCurd //封装通用增删改查
     this.$snapshoot = snapshoot //报表快照
     this.$seal = seal //对报表进行印章
+    this.$sealPre = sealPre // 对报表进行手动印章->预处理
+    this.$getSigPageUrl = getSigPageUrl // 对报表进行手动印章->预处理->签章页面url
+    this.$generateUUID = generateUUID // 自定义规则自动生成uuid
     this._ = _
     this.$store=store
     this._isInitialization = true

+ 5 - 1
src/plugins/ibps/index.js

@@ -62,9 +62,13 @@ export default {
           if (getToken()) {
               Vue.prototype.$reportPash = 'https://www.mingjianlims.com/demo/reportJsp/showReport.jsp?access_token = '+getToken()+'&rpx=中汇瑞德检测中心/' //报表路径
               Vue.prototype.$getReportFile = downloadReport //通过方法函数,拼接url,并将字符串格式化
-              Vue.prototype.$getSealUri = 'https://www.mingjianlims.com/getSealFile/' //微签 回显获取文件地址
+              // Vue.prototype.$getSealUri = 'https://www.mingjianlims.com/getSealFile/' //微签 回显获取文件地址
+              Vue.prototype.$getSealUri = 'http://139.159.229.35:9999/no/getSealFile/' //微签 回显获取文件地址
               Vue.prototype.$getFileDow = 'https://www.mingjianlims.com/ibps/platform/v3/file/download?attachmentId=' //文件下载地址
               Vue.prototype.$getSealUploadingFile='https://www.mingjianlims.com/doSeal/' //微签 上传地址
+              Vue.prototype.$getSealPreFile = 'https://www.mingjianlims.com/preprocess/' //微签 手动签章-预处理
+              // Vue.prototype.$getSealPageFile = 'https://www.mingjianlims.com/manualSigPage/' //微签 手动签章-页面接口
+              Vue.prototype.$getSealPageFile = 'http://139.159.229.35:9999/manualSig/manualSigPage/' //微签 手动签章-页面接口( 微签服务器地址,非nginx转发)
            clearInterval(timer) //添加成功后即删除定时任务
             }
     }, 500)

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels