@toolspack/ttd-common 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -719,7 +719,7 @@ if (typeof window !== 'undefined') {
719
719
  // Indicate to webpack that this file can be concatenated
720
720
  /* harmony default export */ var setPublicPath = (null);
721
721
 
722
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6391278d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/cfca/CfcaPdf.vue?vue&type=template&id=cd924424&
722
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"371aa644-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/cfca/CfcaPdf.vue?vue&type=template&id=cd924424&
723
723
  var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"cfca-pdf"},[(_vm.isIE)?[_c('div',{staticClass:"cfca-pdf-wrapper",style:({visibility: _vm.visible})},[_c('div',{class:{'cfca-left': true, 'active': _vm.active==='left', 'disabled': _vm.pageNo <= 1},on:{"click":function($event){return _vm.GoToPrevPage()}}},[_c('span',{staticClass:"el-icon-arrow-left"})]),_c('div',{staticClass:"cfca-content"},[_c('div',{staticClass:"cfca-page"},[_c('div',{staticClass:"fl cfca-title"},[_c('h2',[_vm._v(_vm._s(_vm.title))])]),_c('div',{staticClass:"fr"},[_vm._v(" "+_vm._s(_vm.pageNo)+"/"+_vm._s(_vm.pageCount)+" "),_c('span',{staticClass:"di"},[_vm._v("第")]),_c('el-input',{staticClass:"page-num",attrs:{"size":"mini"},on:{"change":_vm.GoToPage},nativeOn:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.GoToPage($event)}},model:{value:(_vm.inputPage),callback:function ($$v) {_vm.inputPage=$$v},expression:"inputPage"}}),_vm._v("页 ")],1)]),_c('div',{ref:"PDFCtrlPlaceHolder",staticClass:"cfca-object"},[_c('div',{staticClass:"obj-wrapper",on:{"dragenter":_vm.onDragEnter,"dragover":_vm.onDragOver,"drop":_vm.onDrop}},[(this.idstr)?[_c('object',{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{"position":"relative","z-Index":"1"},attrs:{"id":'PDFCtrl' + this.idstr,"tabindex":0,"codebase":_vm.publicPath + _vm.codebase,"classid":"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A","width":"100%","height":"100%"}},[_c('param',{attrs:{"name":"wmode","value":"transparent"}}),_c('param',{attrs:{"name":"showToolbar","value":"false"}})])]:[_c('object',{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{"position":"relative","z-Index":"1"},attrs:{"tabindex":0,"codebase":_vm.publicPath + _vm.codebase,"classid":"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A","width":"100%","height":"100%"}},[_c('param',{attrs:{"name":"wmode","value":"transparent"}}),_c('param',{attrs:{"name":"showToolbar","value":"false"}})])]],2)]),_c('div',{staticClass:"cfca-control"},[_vm._t("default")],2)]),_c('div',{class:{'cfca-right': true, 'active': _vm.active==='right', 'disabled': _vm.pageNo >= _vm.pageCount},on:{"click":function($event){return _vm.GoToNextPage()}}},[_c('span',{staticClass:"el-icon-arrow-right"})])])]:[_c('div',{staticClass:"red",staticStyle:{"height":"350px","padding":"20px","position":"relative","margin-bottom":"20px"}},[_vm._v(" 提示:当前浏览器不支持控件预览,请切换IE浏览器进行查看 "),_c('div',{staticClass:"tc",staticStyle:{"position":"absolute","bottom":"0","left":"0","right":"0"}},[_vm._t("default")],2)])]],2)}
724
724
  var staticRenderFns = []
725
725
 
@@ -1613,7 +1613,7 @@ var component = normalizeComponent(
1613
1613
  )
1614
1614
 
1615
1615
  /* harmony default export */ var CfcaPdf = (component.exports);
1616
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6391278d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/Ukey.vue?vue&type=template&id=2976751a&scoped=true&
1616
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"371aa644-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/Ukey.vue?vue&type=template&id=2976751a&scoped=true&
1617
1617
  var Ukeyvue_type_template_id_2976751a_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"CryptoAgent-wrapper"},[(_vm.isIE)?[_c('object',{ref:"CryptoAgent",attrs:{"codebase":_vm.publicPath + _vm.codebase,"classid":_vm.classid}})]:[_c('embed',{ref:"CryptoAgent",staticStyle:{"height":"0px","width":"0px"},attrs:{"type":"application/npCryptoKit.Ultimate.x86"}})]],2)}
1618
1618
  var Ukeyvue_type_template_id_2976751a_scoped_true_staticRenderFns = []
1619
1619
 
@@ -1827,7 +1827,7 @@ var Ukey_component = normalizeComponent(
1827
1827
  )
1828
1828
 
1829
1829
  /* harmony default export */ var Ukey = (Ukey_component.exports);
1830
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6391278d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/WzhSign.vue?vue&type=template&id=339a252e&scoped=true&
1830
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"371aa644-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/WzhSign.vue?vue&type=template&id=339a252e&scoped=true&
1831
1831
  var WzhSignvue_type_template_id_339a252e_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"CryptoAgent-wrapper"},[(_vm.isIE)?_c('object',{ref:"CryptoAgent",attrs:{"codebase":_vm.publicPath + _vm.codebase,"classid":_vm.classid}}):_c('embed',{ref:"CryptoAgent",staticStyle:{"height":"0px","width":"0px"},attrs:{"type":"application/npCryptoKit.ToToDi.x86"}})])}
1832
1832
  var WzhSignvue_type_template_id_339a252e_scoped_true_staticRenderFns = []
1833
1833
 
@@ -2346,14 +2346,14 @@ var WzhSign_component = normalizeComponent(
2346
2346
  )
2347
2347
 
2348
2348
  /* harmony default export */ var WzhSign = (WzhSign_component.exports);
2349
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6391278d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/SignNew.vue?vue&type=template&id=77c835ca&
2350
- var SignNewvue_type_template_id_77c835ca_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.isIE)?_c('WzhSign',{ref:"signIe",attrs:{"api":_vm.api}}):_c('WzhSignChrome',{ref:"signChrome",attrs:{"api":_vm.api}})],1)}
2351
- var SignNewvue_type_template_id_77c835ca_staticRenderFns = []
2349
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"371aa644-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/SignNew.vue?vue&type=template&id=8de344a0&
2350
+ var SignNewvue_type_template_id_8de344a0_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.isIE)?_c('WzhSign',{ref:"signIe",attrs:{"api":_vm.api}}):_c('WzhSignChrome',{ref:"signChrome",attrs:{"api":_vm.api}})],1)}
2351
+ var SignNewvue_type_template_id_8de344a0_staticRenderFns = []
2352
2352
 
2353
2353
 
2354
- // CONCATENATED MODULE: ./src/packages/ukey/SignNew.vue?vue&type=template&id=77c835ca&
2354
+ // CONCATENATED MODULE: ./src/packages/ukey/SignNew.vue?vue&type=template&id=8de344a0&
2355
2355
 
2356
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6391278d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/WzhSignChrome.vue?vue&type=template&id=74a914d1&scoped=true&
2356
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"371aa644-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/WzhSignChrome.vue?vue&type=template&id=74a914d1&scoped=true&
2357
2357
  var WzhSignChromevue_type_template_id_74a914d1_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"CryptoAgent-wrapper"})}
2358
2358
  var WzhSignChromevue_type_template_id_74a914d1_scoped_true_staticRenderFns = []
2359
2359
 
@@ -3343,7 +3343,7 @@ var WzhSignChrome_component = normalizeComponent(
3343
3343
  data: function data() {
3344
3344
  return {
3345
3345
  child: null,
3346
- isIE: false
3346
+ isIE: true
3347
3347
  };
3348
3348
  },
3349
3349
  props: {
@@ -3352,8 +3352,7 @@ var WzhSignChrome_component = normalizeComponent(
3352
3352
  required: true
3353
3353
  }
3354
3354
  },
3355
- created: function created() {
3356
- this.getBrowserInfo();
3355
+ created: function created() {// this.getBrowserInfo()
3357
3356
  },
3358
3357
  mounted: function mounted() {
3359
3358
  if (this.isIE) {
@@ -3363,25 +3362,19 @@ var WzhSignChrome_component = normalizeComponent(
3363
3362
  }
3364
3363
  },
3365
3364
  methods: {
3366
- getBrowserInfo: function getBrowserInfo() {
3367
- var _navigator = navigator,
3368
- appVersion = _navigator.appVersion,
3369
- appName = _navigator.appName;
3370
-
3371
- if (appName.indexOf('Internet') >= 0) {
3372
- this.isIE = true;
3373
- return false;
3374
- }
3375
-
3376
- if (appVersion.indexOf('Trident') >= 0) {
3377
- this.isIE = true;
3378
- return false;
3379
- } // 360的急速模式,需要使用id签署控件
3380
-
3381
-
3382
- if (appVersion.indexOf(' WOW64') >= 0) {
3383
- this.isIE = true;
3384
- }
3365
+ getBrowserInfo: function getBrowserInfo() {// const { appVersion, appName } = navigator
3366
+ // if (appName.indexOf('Internet') >= 0) {
3367
+ // this.isIE = true
3368
+ // return false
3369
+ // }
3370
+ // if (appVersion.indexOf('Trident') >= 0) {
3371
+ // this.isIE = true
3372
+ // return false
3373
+ // }
3374
+ // 360的急速模式,需要使用id签署控件
3375
+ // if (appVersion.indexOf(' WOW64') >= 0) {
3376
+ // this.isIE = true
3377
+ // }
3385
3378
  }
3386
3379
  }
3387
3380
  });
@@ -3397,8 +3390,8 @@ var WzhSignChrome_component = normalizeComponent(
3397
3390
 
3398
3391
  var SignNew_component = normalizeComponent(
3399
3392
  ukey_SignNewvue_type_script_lang_js_,
3400
- SignNewvue_type_template_id_77c835ca_render,
3401
- SignNewvue_type_template_id_77c835ca_staticRenderFns,
3393
+ SignNewvue_type_template_id_8de344a0_render,
3394
+ SignNewvue_type_template_id_8de344a0_staticRenderFns,
3402
3395
  false,
3403
3396
  null,
3404
3397
  null,
@@ -3440,5 +3433,4 @@ var SignNew_component = normalizeComponent(
3440
3433
 
3441
3434
  /***/ })
3442
3435
 
3443
- /******/ });
3444
- //# sourceMappingURL=ttd-common.common.js.map
3436
+ /******/ });
@@ -728,7 +728,7 @@ if (typeof window !== 'undefined') {
728
728
  // Indicate to webpack that this file can be concatenated
729
729
  /* harmony default export */ var setPublicPath = (null);
730
730
 
731
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6391278d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/cfca/CfcaPdf.vue?vue&type=template&id=cd924424&
731
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"371aa644-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/cfca/CfcaPdf.vue?vue&type=template&id=cd924424&
732
732
  var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"cfca-pdf"},[(_vm.isIE)?[_c('div',{staticClass:"cfca-pdf-wrapper",style:({visibility: _vm.visible})},[_c('div',{class:{'cfca-left': true, 'active': _vm.active==='left', 'disabled': _vm.pageNo <= 1},on:{"click":function($event){return _vm.GoToPrevPage()}}},[_c('span',{staticClass:"el-icon-arrow-left"})]),_c('div',{staticClass:"cfca-content"},[_c('div',{staticClass:"cfca-page"},[_c('div',{staticClass:"fl cfca-title"},[_c('h2',[_vm._v(_vm._s(_vm.title))])]),_c('div',{staticClass:"fr"},[_vm._v(" "+_vm._s(_vm.pageNo)+"/"+_vm._s(_vm.pageCount)+" "),_c('span',{staticClass:"di"},[_vm._v("第")]),_c('el-input',{staticClass:"page-num",attrs:{"size":"mini"},on:{"change":_vm.GoToPage},nativeOn:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.GoToPage($event)}},model:{value:(_vm.inputPage),callback:function ($$v) {_vm.inputPage=$$v},expression:"inputPage"}}),_vm._v("页 ")],1)]),_c('div',{ref:"PDFCtrlPlaceHolder",staticClass:"cfca-object"},[_c('div',{staticClass:"obj-wrapper",on:{"dragenter":_vm.onDragEnter,"dragover":_vm.onDragOver,"drop":_vm.onDrop}},[(this.idstr)?[_c('object',{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{"position":"relative","z-Index":"1"},attrs:{"id":'PDFCtrl' + this.idstr,"tabindex":0,"codebase":_vm.publicPath + _vm.codebase,"classid":"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A","width":"100%","height":"100%"}},[_c('param',{attrs:{"name":"wmode","value":"transparent"}}),_c('param',{attrs:{"name":"showToolbar","value":"false"}})])]:[_c('object',{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{"position":"relative","z-Index":"1"},attrs:{"tabindex":0,"codebase":_vm.publicPath + _vm.codebase,"classid":"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A","width":"100%","height":"100%"}},[_c('param',{attrs:{"name":"wmode","value":"transparent"}}),_c('param',{attrs:{"name":"showToolbar","value":"false"}})])]],2)]),_c('div',{staticClass:"cfca-control"},[_vm._t("default")],2)]),_c('div',{class:{'cfca-right': true, 'active': _vm.active==='right', 'disabled': _vm.pageNo >= _vm.pageCount},on:{"click":function($event){return _vm.GoToNextPage()}}},[_c('span',{staticClass:"el-icon-arrow-right"})])])]:[_c('div',{staticClass:"red",staticStyle:{"height":"350px","padding":"20px","position":"relative","margin-bottom":"20px"}},[_vm._v(" 提示:当前浏览器不支持控件预览,请切换IE浏览器进行查看 "),_c('div',{staticClass:"tc",staticStyle:{"position":"absolute","bottom":"0","left":"0","right":"0"}},[_vm._t("default")],2)])]],2)}
733
733
  var staticRenderFns = []
734
734
 
@@ -1622,7 +1622,7 @@ var component = normalizeComponent(
1622
1622
  )
1623
1623
 
1624
1624
  /* harmony default export */ var CfcaPdf = (component.exports);
1625
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6391278d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/Ukey.vue?vue&type=template&id=2976751a&scoped=true&
1625
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"371aa644-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/Ukey.vue?vue&type=template&id=2976751a&scoped=true&
1626
1626
  var Ukeyvue_type_template_id_2976751a_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"CryptoAgent-wrapper"},[(_vm.isIE)?[_c('object',{ref:"CryptoAgent",attrs:{"codebase":_vm.publicPath + _vm.codebase,"classid":_vm.classid}})]:[_c('embed',{ref:"CryptoAgent",staticStyle:{"height":"0px","width":"0px"},attrs:{"type":"application/npCryptoKit.Ultimate.x86"}})]],2)}
1627
1627
  var Ukeyvue_type_template_id_2976751a_scoped_true_staticRenderFns = []
1628
1628
 
@@ -1836,7 +1836,7 @@ var Ukey_component = normalizeComponent(
1836
1836
  )
1837
1837
 
1838
1838
  /* harmony default export */ var Ukey = (Ukey_component.exports);
1839
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6391278d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/WzhSign.vue?vue&type=template&id=339a252e&scoped=true&
1839
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"371aa644-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/WzhSign.vue?vue&type=template&id=339a252e&scoped=true&
1840
1840
  var WzhSignvue_type_template_id_339a252e_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"CryptoAgent-wrapper"},[(_vm.isIE)?_c('object',{ref:"CryptoAgent",attrs:{"codebase":_vm.publicPath + _vm.codebase,"classid":_vm.classid}}):_c('embed',{ref:"CryptoAgent",staticStyle:{"height":"0px","width":"0px"},attrs:{"type":"application/npCryptoKit.ToToDi.x86"}})])}
1841
1841
  var WzhSignvue_type_template_id_339a252e_scoped_true_staticRenderFns = []
1842
1842
 
@@ -2355,14 +2355,14 @@ var WzhSign_component = normalizeComponent(
2355
2355
  )
2356
2356
 
2357
2357
  /* harmony default export */ var WzhSign = (WzhSign_component.exports);
2358
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6391278d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/SignNew.vue?vue&type=template&id=77c835ca&
2359
- var SignNewvue_type_template_id_77c835ca_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.isIE)?_c('WzhSign',{ref:"signIe",attrs:{"api":_vm.api}}):_c('WzhSignChrome',{ref:"signChrome",attrs:{"api":_vm.api}})],1)}
2360
- var SignNewvue_type_template_id_77c835ca_staticRenderFns = []
2358
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"371aa644-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/SignNew.vue?vue&type=template&id=8de344a0&
2359
+ var SignNewvue_type_template_id_8de344a0_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.isIE)?_c('WzhSign',{ref:"signIe",attrs:{"api":_vm.api}}):_c('WzhSignChrome',{ref:"signChrome",attrs:{"api":_vm.api}})],1)}
2360
+ var SignNewvue_type_template_id_8de344a0_staticRenderFns = []
2361
2361
 
2362
2362
 
2363
- // CONCATENATED MODULE: ./src/packages/ukey/SignNew.vue?vue&type=template&id=77c835ca&
2363
+ // CONCATENATED MODULE: ./src/packages/ukey/SignNew.vue?vue&type=template&id=8de344a0&
2364
2364
 
2365
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6391278d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/WzhSignChrome.vue?vue&type=template&id=74a914d1&scoped=true&
2365
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"371aa644-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/ukey/WzhSignChrome.vue?vue&type=template&id=74a914d1&scoped=true&
2366
2366
  var WzhSignChromevue_type_template_id_74a914d1_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"CryptoAgent-wrapper"})}
2367
2367
  var WzhSignChromevue_type_template_id_74a914d1_scoped_true_staticRenderFns = []
2368
2368
 
@@ -3352,7 +3352,7 @@ var WzhSignChrome_component = normalizeComponent(
3352
3352
  data: function data() {
3353
3353
  return {
3354
3354
  child: null,
3355
- isIE: false
3355
+ isIE: true
3356
3356
  };
3357
3357
  },
3358
3358
  props: {
@@ -3361,8 +3361,7 @@ var WzhSignChrome_component = normalizeComponent(
3361
3361
  required: true
3362
3362
  }
3363
3363
  },
3364
- created: function created() {
3365
- this.getBrowserInfo();
3364
+ created: function created() {// this.getBrowserInfo()
3366
3365
  },
3367
3366
  mounted: function mounted() {
3368
3367
  if (this.isIE) {
@@ -3372,25 +3371,19 @@ var WzhSignChrome_component = normalizeComponent(
3372
3371
  }
3373
3372
  },
3374
3373
  methods: {
3375
- getBrowserInfo: function getBrowserInfo() {
3376
- var _navigator = navigator,
3377
- appVersion = _navigator.appVersion,
3378
- appName = _navigator.appName;
3379
-
3380
- if (appName.indexOf('Internet') >= 0) {
3381
- this.isIE = true;
3382
- return false;
3383
- }
3384
-
3385
- if (appVersion.indexOf('Trident') >= 0) {
3386
- this.isIE = true;
3387
- return false;
3388
- } // 360的急速模式,需要使用id签署控件
3389
-
3390
-
3391
- if (appVersion.indexOf(' WOW64') >= 0) {
3392
- this.isIE = true;
3393
- }
3374
+ getBrowserInfo: function getBrowserInfo() {// const { appVersion, appName } = navigator
3375
+ // if (appName.indexOf('Internet') >= 0) {
3376
+ // this.isIE = true
3377
+ // return false
3378
+ // }
3379
+ // if (appVersion.indexOf('Trident') >= 0) {
3380
+ // this.isIE = true
3381
+ // return false
3382
+ // }
3383
+ // 360的急速模式,需要使用id签署控件
3384
+ // if (appVersion.indexOf(' WOW64') >= 0) {
3385
+ // this.isIE = true
3386
+ // }
3394
3387
  }
3395
3388
  }
3396
3389
  });
@@ -3406,8 +3399,8 @@ var WzhSignChrome_component = normalizeComponent(
3406
3399
 
3407
3400
  var SignNew_component = normalizeComponent(
3408
3401
  ukey_SignNewvue_type_script_lang_js_,
3409
- SignNewvue_type_template_id_77c835ca_render,
3410
- SignNewvue_type_template_id_77c835ca_staticRenderFns,
3402
+ SignNewvue_type_template_id_8de344a0_render,
3403
+ SignNewvue_type_template_id_8de344a0_staticRenderFns,
3411
3404
  false,
3412
3405
  null,
3413
3406
  null,
@@ -3450,5 +3443,4 @@ var SignNew_component = normalizeComponent(
3450
3443
  /***/ })
3451
3444
 
3452
3445
  /******/ });
3453
- });
3454
- //# sourceMappingURL=ttd-common.umd.js.map
3446
+ });
@@ -1,2 +1 @@
1
- (function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["ttd-common"]=t():e["ttd-common"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="fb15")}({"24fb":function(e,t,r){"use strict";function n(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"===typeof btoa){var i=o(n),a=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}function o(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(r," */")}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=n(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"===typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);n&&o[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),t.push(c))}},t}},"29f3":function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".CryptoAgent-wrapper[data-v-2976751a]{height:0;width:0;position:absoute;left:-5000px}",""]),e.exports=t},3075:function(e,t,r){"use strict";r("3494")},3494:function(e,t,r){var n=r("d373");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("6f6994a3",n,!0,{sourceMap:!1,shadowMode:!1})},"3a50":function(e,t,r){var n=r("6780");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("271332fa",n,!0,{sourceMap:!1,shadowMode:!1})},"499e":function(e,t,r){"use strict";function n(e,t){for(var r=[],n={},o=0;o<t.length;o++){var i=t[o],a=i[0],s=i[1],c=i[2],l=i[3],u={id:e+":"+o,css:s,media:c,sourceMap:l};n[a]?n[a].parts.push(u):r.push(n[a]={id:a,parts:[u]})}return r}r.r(t),r.d(t,"default",(function(){return d}));var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},a=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,l=!1,u=function(){},f=null,p="data-vue-ssr-id",g="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(e,t,r,o){l=r,f=o||{};var a=n(e,t);return h(a),function(t){for(var r=[],o=0;o<a.length;o++){var s=a[o],c=i[s.id];c.refs--,r.push(c)}t?(a=n(e,t),h(a)):a=[];for(o=0;o<r.length;o++){c=r[o];if(0===c.refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}}function h(e){for(var t=0;t<e.length;t++){var r=e[t],n=i[r.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](r.parts[o]);for(;o<r.parts.length;o++)n.parts.push(C(r.parts[o]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var a=[];for(o=0;o<r.parts.length;o++)a.push(C(r.parts[o]));i[r.id]={id:r.id,refs:1,parts:a}}}}function m(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function C(e){var t,r,n=document.querySelector("style["+p+'~="'+e.id+'"]');if(n){if(l)return u;n.parentNode.removeChild(n)}if(g){var o=c++;n=s||(s=m()),t=b.bind(null,n,o,!1),r=b.bind(null,n,o,!0)}else n=m(),t=y.bind(null,n),r=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else r()}}var v=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}();function b(e,t,r,n){var o=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=v(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function y(e,t){var r=t.css,n=t.media,o=t.sourceMap;if(n&&e.setAttribute("media",n),f.ssrId&&e.setAttribute(p,t.id),o&&(r+="\n/*# sourceURL="+o.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}},6780:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".cfca-pdf{width:100%;min-height:100%;position:relative;margin-top:-1px}.cfca-pdf .fontSize1{font-size:65%}.cfca-pdf .fontSize1,.cfca-pdf .fontSize2{font-family:Verdana,Geneva,Arial,Helvetica,sans-serif}.cfca-pdf .fontSize2{font-size:70%}.cfca-pdf .fontSize3{font-size:75%;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif}.cfca-pdf .fakehlink{cursor:pointer;text-decoration:underline;font-weight:400;line-height:26px;color:#06c}.cfca-pdf .plaintext{line-height:28px}.cfca-pdf .blankline{height:5px}.cfca-pdf .remaining{width:100%;position:absolute;z-index:1;top:72px;bottom:0}.cfca-pdf .cfca-page .page-num{display:inline-block;width:auto}.cfca-pdf .cfca-page .page-num input{display:inline-block;width:48px;height:32px;border:1px solid #ccc;border-radius:2px;margin:0 5px}.cfca-pdf .cfca-pdf-wrapper{position:relative;width:560px;margin:0 auto;box-shadow:0 5px 10px 0 rgba(0,0,0,.05)}.cfca-pdf .cfca-pdf-wrapper .cfca-left,.cfca-pdf .cfca-pdf-wrapper .cfca-right{color:#dcdcdc;position:absolute;width:73px;height:130px;text-align:center;font-size:33px;cursor:pointer;border-radius:4px;top:50%;left:-72px}.cfca-pdf .cfca-pdf-wrapper .disabled{cursor:not-allowed}.cfca-pdf .cfca-pdf-wrapper .cfca-right{left:auto;right:-72px}.cfca-pdf .cfca-pdf-wrapper .cfca-content{display:flex;flex-direction:column;justify-content:space-between;position:relative;background:#fff;border:1px solid #d4d4d4;border-radius:0;padding:0;box-sizing:border-box;overflow:hidden}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-object{box-sizing:border-box;position:relative}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-object .obj-wrapper{height:758px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page{position:relative;height:48px;line-height:48px;box-sizing:border-box;overflow:hidden;padding:0 20px;text-align:left;font-size:14px;background:#fff;color:#666;border-bottom:1px solid #d4d4d4}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .cfca-title h2{max-width:340px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:18px;color:#222;line-height:48px;font-weight:400;margin:0;padding:0}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .cfca-title .sub-title{font-size:12px;color:#999;line-height:17px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .fr{position:absolute;right:20px;top:0;max-width:180px;white-space:nowrap;text-overflow:ellipsis}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .di{margin-left:10px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-control{line-height:64px;box-sizing:border-box;overflow:hidden;padding:0 20px;text-align:right;font-size:14px;background:#f5f5f5;color:#666}",""]),e.exports=t},"6bd3":function(e,t,r){"use strict";r("c488")},8875:function(e,t,r){var n,o,i;(function(r,a){o=[],n=a,i="function"===typeof n?n.apply(t,o):n,void 0===i||(e.exports=i)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(g){var r,n,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,s=i.exec(g.stack)||a.exec(g.stack),c=s&&s[1]||!1,l=s&&s[2]||!1,u=document.location.href.replace(document.location.hash,""),f=document.getElementsByTagName("script");c===u&&(r=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=r.replace(n,"$1").trim());for(var p=0;p<f.length;p++){if("interactive"===f[p].readyState)return f[p];if(f[p].src===c)return f[p];if(c===u&&f[p].innerHTML&&f[p].innerHTML.trim()===o)return f[p]}return null}}return e}))},"890c":function(e,t,r){"use strict";r("c13c")},c13c:function(e,t,r){var n=r("29f3");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("765e63b4",n,!0,{sourceMap:!1,shadowMode:!1})},c3a0:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".CryptoAgent-wrapper[data-v-339a252e]{height:0;width:0;position:absolute;left:-5000px}",""]),e.exports=t},c488:function(e,t,r){var n=r("c3a0");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("74daed76",n,!0,{sourceMap:!1,shadowMode:!1})},d373:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".CryptoAgent-wrapper[data-v-74a914d1]{height:0;width:0;position:absolute;left:-5000px}",""]),e.exports=t},fb15:function(e,t,r){"use strict";if(r.r(t),"undefined"!==typeof window){var n=window.document.currentScript,o=r("8875");n=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(r.p=i[1])}var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"cfca-pdf"},[e.isIE?[r("div",{staticClass:"cfca-pdf-wrapper",style:{visibility:e.visible}},[r("div",{class:{"cfca-left":!0,active:"left"===e.active,disabled:e.pageNo<=1},on:{click:function(t){return e.GoToPrevPage()}}},[r("span",{staticClass:"el-icon-arrow-left"})]),r("div",{staticClass:"cfca-content"},[r("div",{staticClass:"cfca-page"},[r("div",{staticClass:"fl cfca-title"},[r("h2",[e._v(e._s(e.title))])]),r("div",{staticClass:"fr"},[e._v(" "+e._s(e.pageNo)+"/"+e._s(e.pageCount)+" "),r("span",{staticClass:"di"},[e._v("第")]),r("el-input",{staticClass:"page-num",attrs:{size:"mini"},on:{change:e.GoToPage},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.GoToPage(t)}},model:{value:e.inputPage,callback:function(t){e.inputPage=t},expression:"inputPage"}}),e._v("页 ")],1)]),r("div",{ref:"PDFCtrlPlaceHolder",staticClass:"cfca-object"},[r("div",{staticClass:"obj-wrapper",on:{dragenter:e.onDragEnter,dragover:e.onDragOver,drop:e.onDrop}},[this.idstr?[r("object",{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{position:"relative","z-Index":"1"},attrs:{id:"PDFCtrl"+this.idstr,tabindex:0,codebase:e.publicPath+e.codebase,classid:"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A",width:"100%",height:"100%"}},[r("param",{attrs:{name:"wmode",value:"transparent"}}),r("param",{attrs:{name:"showToolbar",value:"false"}})])]:[r("object",{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{position:"relative","z-Index":"1"},attrs:{tabindex:0,codebase:e.publicPath+e.codebase,classid:"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A",width:"100%",height:"100%"}},[r("param",{attrs:{name:"wmode",value:"transparent"}}),r("param",{attrs:{name:"showToolbar",value:"false"}})])]],2)]),r("div",{staticClass:"cfca-control"},[e._t("default")],2)]),r("div",{class:{"cfca-right":!0,active:"right"===e.active,disabled:e.pageNo>=e.pageCount},on:{click:function(t){return e.GoToNextPage()}}},[r("span",{staticClass:"el-icon-arrow-right"})])])]:[r("div",{staticClass:"red",staticStyle:{height:"350px",padding:"20px",position:"relative","margin-bottom":"20px"}},[e._v(" 提示:当前浏览器不支持控件预览,请切换IE浏览器进行查看 "),r("div",{staticClass:"tc",staticStyle:{position:"absolute",bottom:"0",left:"0",right:"0"}},[e._t("default")],2)])]],2)},s=[];function c(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,s,"next",e)}function s(e){c(i,n,o,a,s,"throw",e)}a(void 0)}))}}var u=function(e){var t={};return e&&(t="string"===typeof e&&/^{/.test(e)?JSON.parse(e):e),t.url&&(t.url=decodeURI(t.url)),t},f={name:"cfca-pdf",props:{action:{type:String,default:""},pdfurl:{type:String,default:""},visible:{type:[String,Boolean],default:"visible"},title:{type:String,default:""},image:{type:String,default:""},idstr:{type:[String,Number]}},data:function(){var e="";return e="x86"===window.navigator.cpuClass?"TrustSignPDFPlugin.ttd.x86.cab#version=3,2,1,4":"TrustSignPDFPlugin.ttd.x64.cab#version=3,2,1,4",{publicPath:"https://wsp.totodi.com/cfca_plug/",PDFCtrl:"",codebase:e,active:"",inputPage:"",isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,pageNo:1,pageCount:1}},beforeDestroy:function(){console.log("--cfca-pdf-beforeDestroy")},beforeRouteLeave:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log("-cfca--beforeRouteLeave---"),e.next=3,n.CloseFile();case 3:r();case 4:case"end":return e.stop()}}),e)})))()},mounted:function(){this.isIE&&(this.OnLoad(),console.log("cfca mounted =".concat(this.pdfurl)),this.pdfurl&&setTimeout(this.OpenFile,100))},methods:{OnLoad:function(){return!this.PDFCtrl&&(!!this.isIE&&(this.PDFCtrl=this.$refs.pdfCtrl,this.PDFCtrl||(console.log("使用id 加载this.PDFCtrl "),this.PDFCtrl=window["PDFCtrl".concat(this.idstr)]),void(window.OnClickPoint=this.OnClickPoint)))},OpenFile:function(e){var t=this;if(e=e||this.pdfurl,!e)return alert("未发现pdf资源路径!"),!1;try{console.log("OpenFile--src--".concat(e)),this.PDFCtrl.OpenWebFile(encodeURI(e)),this.PDFCtrl=this.$refs.pdfCtrl,setTimeout((function(){t.PDFCtrl.ZoomTo(-1),t.GetPageNo()}),100)}catch(n){if(this.PDFCtrl.GetLastErrorDesc){var r=this.PDFCtrl.GetLastErrorDesc();alert(r+n)}}},sleep:function(e){return new Promise((function(t){return setTimeout(t,e)}))},CloseFile:function(){try{this.pdfurl&&this.PDFCtrl&&(console.log("CloseFile---"),this.PDFCtrl.CloseFile())}catch(t){if(console.log("CloseFile error--",t),this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},onDragEnter:function(e){this.$emit("cfcaDragEnter",e)},onDragOver:function(e){e.preventDefault(),this.$emit("cfcaDragOver",e)},onDrop:function(e){this.$emit("cfcaDrop",e)},GoToFirstPage:function(){try{this.PDFCtrl.GoToFirstPage()}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},GoToLastPage:function(){try{this.PDFCtrl.GoToLastPage()}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},GoToPrevPage:function(){this.active="left";var e=this;try{this.PDFCtrl.GoToPrevPage(),this.inputPage="",setTimeout((function(){e.GetPageNo()}),100)}catch(r){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+r)}}},GoToNextPage:function(){this.active="right";var e=this;try{this.PDFCtrl.GoToNextPage(),this.inputPage="",setTimeout((function(){e.GetPageNo()}),100)}catch(r){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+r)}}},GetPageNo:function(){try{this.pageNo=this.PDFCtrl.GetCurrentPageNo(),this.pageCount=this.PDFCtrl.GetPageCount()}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},GoToPage:function(){var e=this;try{var t=this.inputPage.replace(/\D/,"");if(""===t)return void alert("请输入页码!");this.PDFCtrl.GoToPage(t),setTimeout((function(){e.GetPageNo()}),100)}catch(n){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var r=this.PDFCtrl.GetLastErrorDesc();alert(r+n)}}},ZoomTo:function(e){try{this.PDFCtrl.ZoomTo(e)}catch(r){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+r)}}},ZoomOut:function(){try{this.PDFCtrl.ZoomOut()}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},ZoomIn:function(){try{this.PDFCtrl.ZoomIn()}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},OnClickPoint:function(e,t,r){console.log("OnClickPoint--","nPageNo=".concat(e,", x=").concat(t,", y=").concat(r));try{console.log("image2=",this.image),this.image?this.PDFCtrl.SignFile_Image(e,t,r,this.image):this.PDFCtrl.SignFile_KeyImage(e,t,r),this.$emit("cfca-point",e,t,r)}catch(o){var n=this.PDFCtrl.GetLastErrorDesc();alert(n+o)}},openDialog:function(e){var t=this;this.isIE&&(console.log(" openDialog---"),setTimeout((function(){t.OpenFile(e)}),350))},getUkeyImage:function(){var e=this.PDFCtrl.GetVersion();if(console.log(e),this.PDFCtrl.SetPKCS11Module("UyeePKCS11.Enterprise.dll|UlanPKCS11.Enterprise.dll|UlanPKCS11.dll|CFCA_UKEY_P11.dll"),"3.2.1.7"===e)return this.PDFCtrl.ReadKeyImage();alert("客户端签章控件[v=".concat(e,"],需要升级!"))},GetCertInfo:function(e){e=e||"SubjectDN";try{var t=this.PDFCtrl.GetSignCertInfo(e);if(!t){var r=this.PDFCtrl.GetLastErrorDesc();return void alert(r)}return t}catch(o){console.log("GetCertInfo :",o);var n=this.PDFCtrl.GetLastErrorDesc();alert(n+o)}},selectSignCert:function(e){try{var t="",r="CFCA ACS ",n=e||"";return console.log("证书序列号,精确匹配",n),this.PDFCtrl.SelectSignCert(t,r,"".concat(n),""),this.PDFCtrl.SetTimestampServer("http://210.74.41.195/timestamp"),!0}catch(o){return console.log("PDFCtrl.SelectSignCert ",o),alert("选择证书失败!".concat(o)),!1}},UploadFile:function(){try{var e=this.PDFCtrl.UploadCurrentFile(this.action);return e=JSON.parse(e),0===e.code?e.data.list[0]:""}catch(r){var t=this.PDFCtrl.GetLastErrorDesc();console.log("PDFCtrl 文件上传:",t),alert("PDFCtrl 文件上传:".concat(t).concat(r))}return!1},signFileKeyImage:function(e,t){var r=this.PDFCtrl.GetSignCertInfo("SerialNumber");console.log("-signFileKeyImage--certSN-".concat(r),e);try{var n="",o="";return e.height?(n=Number(e.X)+47,o=Number(e.height)-Number(e.Y)-47):(n=Number(e.X)+47,o=Number(e.Y)-47),console.log(" 参数 pageIndex = ".concat(e.pageIndex," x = ").concat(n," Y = ").concat(o)),console.log("signFileKeyImage: image=".concat(t)),t?this.PDFCtrl.SignFile_Image(e.pageIndex,n,o,t):this.PDFCtrl.SignFile_KeyImage(e.pageIndex,n,o),console.log("SignFile_KeyImage 成功"),!0}catch(a){var i=this.PDFCtrl.GetLastErrorDesc();return console.log("signFileKeyImage",a),alert("".concat(i," ").concat(a)),!1}},multipleSign7:function(e,t,r,n,o){for(var i=0;i<e.length;i++){var a=e[i];"number"===typeof o&&(a.Y-=o);try{var s="",c="";return a.height?(s=Number(a.X)+47,c=Number(a.height)-Number(a.Y)-47):(s=Number(a.X)+47,c=Number(a.Y)-47),this.PDFCtrl.AddSignaturePosition(a.pageIndex,s,c),!0}catch(u){var l=this.PDFCtrl.GetLastErrorDesc();console.log(" multipleSign7",u),alert(l+u)}}n?this.PDFCtrl.SignFile_Image(n):this.PDFCtrl.SignFile_KeyImage()},multipleSign5:function(e,t,r,n,o){console.log("multipleSign 循环签的begin ",r);var i=this.PDFCtrl.GetSignCertInfo("SerialNumber");console.log("serialNoBegin ",i);for(var a="",s=0;s<e.length;s++){var c=e[s];if(console.log("item=",c),"number"===typeof o&&(c.Y-=o),s>0){var l=this.PDFCtrl.GetSignCertInfo("SerialNumber");if(console.log("本次获得的序列号serialNoAgain:",l),i!==l)return alert("签署过程中,请不要更换ukey!"),!1;console.log("serialNo=",r),a=a&&this.signFileKeyImage(c,n),console.log("iterateSign 签章结果".concat(s,"-------"),a)}else console.log("第一个章,不用验签",s),a=this.signFileKeyImage(c,n),console.log("iterateSign 签章结果",a);if(!a)return!1}return console.log("multipleSign 签章的结果",a),a},multipleSign:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return n||this.PDFCtrl.SetPKCS11Module("UyeePKCS11.Enterprise.dll|UlanPKCS11.Enterprise.dll|UlanPKCS11.dll|CFCA_UKEY_P11.dll"),this.PDFCtrl.AddSignaturePosition?(console.log("新版插件"),this.multipleSign7(e,t,r,n,o)):this.multipleSign5(e,t,r,n,o)},GetSignatureInfo:function(){for(var e=this.PDFCtrl.GetSignatureCount(),t=[],r=0;r<e;r++){var n=this.PDFCtrl.VerifySignature(r),o=n.GetSignCertInfo("SerialNumber");t.push({SerialNumber:o})}return t}},watch:{pdfurl:function(e,t){this.inputPage=1,this.isIE&&e&&(this.PDFCtrl?(console.log("cfca watch pdfurl=="),t?t!==e&&(console.log("cfca watch oldval==",t),this.CloseFile(),setTimeout(this.OpenFile,100)):setTimeout(this.OpenFile,100)):console.log("cfca watch PDFCtrl 未加载 "))}}},p=f;r("ff64");function g(e,t,r,n,o,i,a,s){var c,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=r,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),a?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=c):o&&(c=s?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:l}}var d=g(p,a,s,!1,null,null,null),h=d.exports,m=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"CryptoAgent-wrapper"},[e.isIE?[r("object",{ref:"CryptoAgent",attrs:{codebase:e.publicPath+e.codebase,classid:e.classid}})]:[r("embed",{ref:"CryptoAgent",staticStyle:{height:"0px",width:"0px"},attrs:{type:"application/npCryptoKit.Ultimate.x86"}})]],2)},C=[];function v(){var e="";this.sourceData="".concat((new Date).getTime());try{var t=this.sourceData,r="",n="Attach",o="SHA-1";return r="Attach"===n?this.CryptoAgent.SignMsgPKCS7(t,o,!0):"Detach"===n?this.CryptoAgent.SignMsgPKCS7(t,o,!1):this.CryptoAgent.SignMsgPKCS1(t,o),r?(console.log("SignOnClick 签名结果:",r),r):(e=this.CryptoAgent.GetLastErrorDesc(),alert(e),"")}catch(i){console.log("SignOnClick error=",i),e=this.CryptoAgent.GetLastErrorDesc(),alert(e)}return""}var b={name:"ukey",data:function(){var e="",t="";return"x86"===window.navigator.cpuClass?(e="ukey/Cryptokit/x86/CryptoKit.ToToDi.x86.cab",t="clsid:5635B01D-C661-4ACE-B997-EECFA63BD388"):(e="ukey/Cryptokit/x64/CryptoKit.ToToDi.x64.cab",t="clsid:63F9892E-D854-476E-A839-C8BA79254EC1"),{isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,publicPath:"https://wsp.totodi.com/jz/",codebase:e,classid:t,sourceData:"",certType:"RSA",hashAlg:"SHA-1",singType:"Detach",CryptoAgent:"",random:"ttd"}},mounted:function(){this.onLoad()},methods:{onLoad:function(){return!this.CryptoAgent&&(!!this.isIE&&(this.CryptoAgent=this.$refs.CryptoAgent,this.CryptoAgent||alert("验签插件加载失败!"),void console.log("加载this.CryptoAgent ",this.CryptoAgent)))},SignOnClick:v,SelectCertificateOnClick:function(e){this.isIE||alert("请使用IE浏览器!");try{var t="",r="CFCA ACS ",n=e;n||console.log(" Ukye, 无序列号筛选证书, serialNo 非必传 ");var o="",i="",a="Uyee CSP v6.0 (Enterprise)||CFCA FOR UKEY CSP v1.1.0";return o=this.CryptoAgent.SelectCertificate(t,r,n,a),o||(i=this.CryptoAgent.GetLastErrorDesc(),alert(i)),o}catch(c){console.log("SelectCertificateOnClick catch",c);var s=this.CryptoAgent.GetLastErrorDesc();return alert("".concat(s,"/error")),!1}},GetSignCertInfoUkey:function(e){e=e||"SubjectDN",console.log("-Ukey-GetSignCertInfoUkey:InfoTypeID ",e);try{var t=this.CryptoAgent.GetSignCertInfo(e);if(!t){var r=this.CryptoAgent.GetLastErrorDesc();return void alert(r)}return t}catch(o){console.log("GetSignCertInfoUkey-Ukey: ",o);var n=this.CryptoAgent.GetLastErrorDesc();alert(n)}}}},y=b,S=(r("890c"),g(y,m,C,!1,null,"2976751a",null)),x=S.exports,w=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"CryptoAgent-wrapper"},[e.isIE?r("object",{ref:"CryptoAgent",attrs:{codebase:e.publicPath+e.codebase,classid:e.classid}}):r("embed",{ref:"CryptoAgent",staticStyle:{height:"0px",width:"0px"},attrs:{type:"application/npCryptoKit.ToToDi.x86"}})])},D=[],P={name:"wzh-sing",data:function(){var e="",t="";return"x86"===window.navigator.cpuClass?(e="wzh/CryptoKit.Paperless.x86.cab",t="clsid:B64B695B-348D-400D-8D58-9AAB1DA5851A"):(e="wzh/CryptoKit.Paperless.x64.cab",t="clsid:8BF7E683-630E-4B59-9E61-C996B671EBDF"),{isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,publicPath:"https://wsp.totodi.com/jz/",codebase:e,classid:t,sourceData:"",certType:"RSA",CryptoAgent:null}},props:{api:{type:Object,required:!0}},mounted:function(){this.onLoad()},methods:{onLoad:function(){if(this.CryptoAgent)return!1;this.CryptoAgent=this.$refs.CryptoAgent,this.CryptoAgent||alert("验签插件加载失败!"),console.log("加载this.CryptoAgent ",this.CryptoAgent)},getUkeyImage:function(){var e="";try{e=this.CryptoAgent.GetSealImage("CFCA_UKEY_P11.dll"),console.log("CFCA_UKEY_P11",e)}catch(t){console.log("CFCA_UKEY_P11 error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UyeePKCS11.Enterprise.dll"),console.log("UyeePKCS11",e)}catch(t){console.log("UyeePKCS11 error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UlanPKCS11.Enterprise.dll"),console.log("UlanPKCS11.Enterprise",e)}catch(t){console.log("UlanPKCS11.Enterprise error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UlanPKCS11.dll"),console.log("UlanPKCS11",e)}catch(t){console.log("error",t)}return e||alert("读取Ukey印章图片失败!"),e},SignOnClick:function(){this.sourceData="".concat((new Date).getTime());try{var e=this.sourceData,t="",r="Attach",n="SHA-1";return t="Attach"===r?this.CryptoAgent.SignMsgPKCS7(e,n,!0):"Detach"===r?this.CryptoAgent.SignMsgPKCS7(e,n,!1):this.CryptoAgent.SignMsgPKCS1(e,n),t?(console.log("SignOnClick 签名结果:",t),t):(this.ShowErrorInfo(),"")}catch(o){console.log("SignOnClick error=",o),this.ShowErrorInfo()}return""},GetCertInfoOnClick:function(e){e=e||"SubjectDN",console.log("GetCertInfoOnClick:InfoTypeID ",e);try{var t=this.CryptoAgent.GetSignCertInfo(e);return t||(this.ShowErrorInfo(),!1)}catch(r){console.log("GetCertInfoOnClick-WzhSign: ",r),this.ShowErrorInfo(r)}},SelectCertificateOnClick:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{var t="",r="CFCA ACS",n=e,o="Uyee CSP v6.0 (Enterprise)||CFCA FOR UKEY CSP v1.1.0",i="";return console.log("无纸化 选证书 selectSignCert, serialNo(非传)=",e),i=this.CryptoAgent.SelectCertificate(t,r,n,o),i?(console.log("wzh SelectCertResult",i),!0):(console.log("wzh SelectCertResult 不存在"),this.ShowErrorInfo(),!1)}catch(a){return console.log("wzh SelectCertResult catch error: "),this.ShowErrorInfo(a),!1}},getHashValue:function(e,t,r){var n=this.CryptoAgent.GetSignCertInfo("CertContent");return this.$emit("getImg",r),n?t.bucketName&&t.objectKey?this.api.getSignHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{attachfile:"oss:".concat(t.bucketName,":").concat(t.objectKey),reason:"",location:"",signImgfileName:"",signImgfile:r,pageNo:e.pageIndex,pageX:Number(e.X),pageY:Number(e.Y),certBase64:n}}}):(alert("文件对象不合规!"),Promise.reject()):(alert("获取证书公钥失败!"),Promise.reject())},getSignHashValue:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function o(){var i,a,s,c,l;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.prev=0,i="",o.next=4,n.getHashValue(e,t,r);case 4:if(a=o.sent,s=a.code,c=a.data,0===s&&"200"==="".concat(c.bean.code)&&(i=c.bean.pdfHash),i){o.next=11;break}return alert("CFCA计算HASH值失败!( ".concat(c.bean.msg||"",")")),o.abrupt("return",!1);case 11:if(l=n.CryptoAgent.SignHashMsgPKCS7Detached(i,"SHA-1"),l){o.next=15;break}return n.ShowErrorInfo(),o.abrupt("return",!1);case 15:return o.abrupt("return",{signature:l,id:c.bean.id});case 18:o.prev=18,o.t0=o["catch"](0),console.log("getSignHashValue",o.t0),n.ShowErrorInfo(o.t0);case 22:case"end":return o.stop()}}),o,null,[[0,18]])})))()},signFileKeyImage:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function o(){var i,a,s,c,l;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,n.getSignHashValue(e,t,r);case 2:if(i=o.sent,a="计算Hash 失败!",!i){o.next=17;break}return o.next=7,n.api.mergeHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{sigString:i.signature,id:i.id}}});case 7:if(s=o.sent,c=s.data,l=s.code,0!==l){o.next=16;break}if(!c.bean.url){o.next=13;break}return o.abrupt("return",c.bean);case 13:a=c.bean.msg,o.next=17;break;case 16:a=c.msg;case 17:return n.$message.error(a||"error计算Hash失败!"),o.abrupt("return",!1);case 19:case"end":return o.stop()}}),o)})))()},multipleSign:function(e,t,r,n){var o=arguments,i=this;return l(regeneratorRuntime.mark((function r(){var a,s,c,l,f,p;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(a=o.length>4&&void 0!==o[4]?o[4]:18,s=i.CryptoAgent.GetSignCertInfo("SerialNumber"),c="",n){r.next=6;break}return alert("印章图片缺失!"),r.abrupt("return",!1);case 6:l=0;case 7:if(!(l<e.length)){r.next=29;break}if(f=u(e[l]),"number"===typeof a&&(f.Y-=a),!(l>0)){r.next=22;break}if(p=i.CryptoAgent.GetSignCertInfo("SerialNumber"),s===p){r.next=15;break}return alert("签署过程中,请不要更换ukey!"),r.abrupt("return",!1);case 15:if(!c){r.next=19;break}return r.next=18,i.signFileKeyImage(f,c,n);case 18:c=r.sent;case 19:console.log("iterateSign 签章结果".concat(l,"---result----"),c),r.next=26;break;case 22:return r.next=24,i.signFileKeyImage(f,t,n);case 24:c=r.sent,console.log("第一个章 签章结果",c);case 26:l++,r.next=7;break;case 29:return console.log("multipleSign 签章的结果",c),r.abrupt("return",c);case 31:case"end":return r.stop()}}),r)})))()}},ShowErrorInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.CryptoAgent&&this.CryptoAgent.GetLastErrorDesc){var t=this.CryptoAgent.GetLastErrorDesc();e&&(t="".concat(t,"[").concat(e,"]")),alert(t)}else alert("不支持该功能!")}},E=P,I=(r("6bd3"),g(E,w,D,!1,null,"339a252e",null)),F=I.exports,A=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[e.isIE?r("WzhSign",{ref:"signIe",attrs:{api:e.api}}):r("WzhSignChrome",{ref:"signChrome",attrs:{api:e.api}})],1)},k=[],O=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"CryptoAgent-wrapper"})},G=[];function N(e){this.browser=e}function j(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890",t=e.length,r="",n=0;n<10;n++)r+=e.charAt(Math.floor(Math.random()*t));return r}N.chromeExtension="ldpdnooafijfamkammjmhjnnfblekpno",N.edgeExtension="odpbakhphoggmefmfppocigpfppblick",N.productID="com.cfca.cryptokit.totodi",N.extensionName=N.productID+".extension",N.reqEventName=N.productID+".request",N.respEventName=N.productID+".response",N.Browser={IE:"Internet Explorer",Edge:"Edge",Edg:"Edge(Chromium)",Chrome:"Chrome",Safari:"Safari",Firefox:"Firefox"},window.nmCryptokit=N,N.SendMessageforChrome=function(e){return new Promise((function(t,r){chrome.runtime.sendMessage(N.chromeExtension,e,(function(e){if(e)0==e.errorcode?t(e):r(e);else{var n=new Object;n.errorcode=1,n.result=chrome.runtime.lastError.message,r(n)}}))}))},N.SendMessageforEdge=function(e){return new Promise((function(t,r){chrome.runtime.sendMessage(N.edgeExtension,e,(function(e){if(e)0==e.errorcode?t(e):r(e);else{var n=new Object;n.errorcode=1,n.result=chrome.runtime.lastError.message,r(n)}}))}))},N.SendMessagebyEvent=function(e){var t=new CustomEvent(N.reqEventName,{detail:e});return document.dispatchEvent(t),new Promise((function(t,r){var n=N.respEventName;void 0!=e.funcInfo&&void 0!=e.funcInfo.randomId&&(n+="."+e.funcInfo.randomId),document.addEventListener(n,(function e(n){document.removeEventListener(n.type,e);var o=JSON.parse(n.detail);null!=o&&0==o.errorcode?t(o):r(o)}),!1)}))},N.SendMessage=function(e,t){return N.Browser.Chrome==e?N.SendMessageforChrome(t):N.Browser.Edg==e?N.SendMessageforEdge(t):N.SendMessagebyEvent(t)},N.checkExtension=function(e){return new Promise((function(t,r){var n=new Object;console.log("444",e),N.Browser.Chrome==e||N.Browser.Edg==e?chrome.runtime?t(e):(n.errorcode=2,n.result="Extension does not exist!",r(n)):N.Browser.Edge==e||N.Browser.Firefox==e?document.getElementById(N.extensionName)?t(e):(n.errorcode=2,n.result="Extension does not exist!",r(n)):(n.errorcode=3,n.result="Only support Chrome/Edge/Firefox",r(n))}))},N.prototype.init=function(){var e=this.browser;return console.log("2223",e),N.checkExtension(e).then((function(e){var t=new Object;return t.action="connect",t.host=N.productID,N.SendMessage(e,t)})).then((function(){var t=new Object,r=new Object,n=j();return r["function"]="GetLastErrorDesc",r.params=null,r.randomId=n,t.action="invoke",t.funcInfo=r,N.SendMessage(e,t)}))},N.prototype.uninit=function(){var e=new Object;return e.action="disconnect",e.host=N.productID,N.SendMessage(this.browser,e)},N.prototype.getExtensionVersion=function(){var e=new Object,t=new Object;return t["function"]="getExtensionVersion",t.params=null,e.action="getExtensionVersion",e.funcInfo=t,N.SendMessage(this.browser,e)},N.prototype.GetSealImage=function(e){var t=new Object,r=new Object,n=new Array,o=j();return n.push(e),r["function"]="GetSealImage",r.params=n,r.randomId=o,t.action="invoke",t.funcInfo=r,N.SendMessage(this.browser,t)},N.prototype.getHostVersion=function(){var e=new Object,t=new Object,r=j();return t["function"]="GetVersion",t.params=null,t.randomId=r,e.action="invoke",e.funcInfo=t,N.SendMessage(this.browser,e)},N.prototype.SelectCertificate=function(e,t,r,n){var o=new Object,i=new Object,a=new Array,s=j();return a.push(e),a.push(t),a.push(r),a.push(n),i["function"]="SelectCertificate",i.params=a,i.randomId=s,o.action="invoke",o.funcInfo=i,N.SendMessage(this.browser,o)},N.prototype.GetSignCertInfo=function(e){var t=new Object,r=new Object,n=new Array,o=j();return n.push(e),r["function"]="getSignCertInfo",r.params=n,r.randomId=o,t.action="invoke",t.funcInfo=r,N.SendMessage(this.browser,t)},N.prototype.SignMsgPKCS7=function(e,t,r){var n=new Object,o=new Object,i=new Array,a=j();return i.push(e),i.push(t),i.push(r),o["function"]="SignMsgPKCS7",o.params=i,o.randomId=a,n.action="invoke",n.funcInfo=o,N.SendMessage(this.browser,n)},N.prototype.SignHashMsgPKCS7Detached=function(e,t){var r=new Object,n=new Object,o=new Array,i=j();return o.push(e),o.push(t),n["function"]="SignHashMsgPKCS7Detached",n.params=o,n.randomId=i,r.action="invoke",r.funcInfo=n,N.SendMessage(this.browser,r)},N.prototype.GetVersion=function(){var e=new Object,t=new Object,r=j();return t["function"]="GetVersion",t.params=null,t.randomId=r,e.action="invoke",e.funcInfo=t,N.SendMessage(this.browser,e)},N.prototype.GetLastErrorDesc=function(){var e=new Object,t=new Object,r=j();return t["function"]="GetLastErrorDesc",t.params=null,t.randomId=r,e.action="invoke",e.funcInfo=t,N.SendMessage(this.browser,e)};var T={methods:{BrowserInfo:function(){var e,t={name:"",version:""},r=self.navigator.userAgent;return(e=/edge\/([\d\.]+)/i.exec(r))?(t.name="Edge",t.version=e[1]):(e=/edg\/([\d\.]+)/i.exec(r))?(t.name="Edge(Chromium)",t.version=e[1]):/msie/i.test(r)?(t.name="Internet Explorer",t.version=/msie ([\d\.]+)/i.exec(r)[1]):/Trident/i.test(r)?(t.name="Internet Explorer",t.version=/rv:([\d\.]+)/i.exec(r)[1]):/chrome/i.test(r)?(t.name="Chrome",t.version=/chrome\/([\d\.]+)/i.exec(r)[1]):/safari/i.test(r)?(t.name="Safari",t.version=/version\/([\d\.]+)/i.exec(r)[1]):/firefox/i.test(r)&&(t.name="Firefox",t.version=/firefox\/([\d\.]+)/i.exec(r)[1]),t},LoadObj:function(){var e=this;try{var t,r,n=this.BrowserInfo();console.log("browser=",n),"Edge"==n.name||"Edge(Chromium)"==n.name||"Chrome"==n.name&&parseInt(n.version)>41||"Firefox"==n.name&&parseInt(n.version)>52?(this.CryptoAgent=new N(n.name),console.log(6661,this.CryptoAgent),this.CryptoAgent.init().then((function(){return console.log(6662),e.CryptoAgent.getExtensionVersion()})).then((function(r){return console.log(777),t=r.result,e.CryptoAgent.getHostVersion()})).then((function(n){console.log(888),r=n.result,console.log("extension version: ".concat(t)),console.log("host version: ".concat(r));var o=e.compareExtensionVersion(t),i=e.compareVersion(r,"3.4.0.1");console.log("extensionLevel ".concat(o)),console.log("hostLevel: ".concat(i)),i<0&&o<0?console.log("Please install host"):i<0?installHost():console.log("LoadObj success!")}))["catch"]((function(e){console.log("init error=",e)}))):console.log("Unsupported browser!")}catch(o){console.log("LoadObj error=",o)}},compareVersion:function(e,t){for(var r=e.split("."),n=t.split("."),o=Math.min(r.length,n.length),i=0;i<o;i++){if(parseInt(r[i],10)>parseInt(n[i],10))return 1;if(parseInt(r[i],10)<parseInt(n[i],10))return-1}if(o<r.length)for(var a=o;a<r.length;a++)if(0!=parseInt(r[a],10))return 1;if(o<n.length)for(a=o;a<n.length;a++)if(0!=parseInt(n[a],10))return-1;return 0},compareExtensionVersion:function(e){var t=this.BrowserInfo();return"Edge"==t.name||"Chrome"==t.name||"Firefox"==t.name?this.compareVersion(e,"3.4.0.1"):void 0},intallExtensionCallback:function(e,t){0==t?window.setTimeout("installHost()",1e3):alert("Install extension failed!")},OnUnLoad:function(){try{this.CryptoAgent.uninit().then((function(){}))}catch(e){alert(e)}},ShowErrorInfo:function(e){null!=e&&this.CryptoAgent&&this.CryptoAgent.GetLastErrorDesc?1==e.errorcode?alert(e.result):this.CryptoAgent.GetLastErrorDesc().then((function(e){alert(e.result)})):alert("不支持该功能!")}}},L={mixins:[T],data:function(){return{isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,sourceData:"",certType:"RSA",CryptoAgent:null}},props:{api:{type:Object,required:!0}},mounted:function(){this.onLoad()},methods:{onLoad:function(){if(this.CryptoAgent)return console.log(3333,this.CryptoAgent),!1;this.LoadObj()},getUkeyImage:function(){var e=this;return new Promise((function(t,r){e.CryptoAgent.GetSealImage("UyeePKCS11.Enterprise.dll").then((function(e){t(e.result)}))["catch"]((function(n){e.CryptoAgent.GetSealImage("CFCA_UKEY_P11.dll").then((function(e){t(e.result)}))["catch"]((function(t){e.ShowErrorInfo(t),r(t)}))}))}))},GetCertInfoOnClick:function(e){var t=this;return e=e||"SubjectDN",console.log("GetCertInfoOnClick:InfoTypeID ",e),this.CryptoAgent.GetSignCertInfo(e).then((function(e){return e.result}))["catch"]((function(e){console.log("GetCertInfoOnClick-WzhSign: ",e),t.ShowErrorInfo(e)}))},SignOnClick:function(){var e=this;return l(regeneratorRuntime.mark((function t(){var r,n,o,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.sourceData="".concat((new Date).getTime()),r=e.sourceData,n="",o="Attach",i="SHA-1","Attach"!==o){t.next=11;break}return t.next=8,e.CryptoAgent.SignMsgPKCS7(r,i,!0);case 8:n=t.sent,t.next=20;break;case 11:if("Detach"!==o){t.next=17;break}return t.next=14,e.CryptoAgent.SignMsgPKCS7(r,i,!1);case 14:n=t.sent,t.next=20;break;case 17:return t.next=19,e.CryptoAgent.SignMsgPKCS1(r,i);case 19:n=t.sent;case 20:return console.log("SignOnClick 签名结果:",n),t.abrupt("return",n.result);case 22:case"end":return t.stop()}}),t)})))()},SelectCertificateOnClick:function(){var e=arguments,t=this;return l(regeneratorRuntime.mark((function r(){var n,o,i,a,s;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(n=e.length>0&&void 0!==e[0]?e[0]:"",o="",i="CFCA ACS ",a="Uyee CSP v6.0 (Enterprise)||CFCA FOR UKEY CSP v1.1.0",n){r.next=17;break}return r.prev=5,r.next=8,t.CryptoAgent.GetVersion();case 8:s=r.sent,console.log(5444444,s),r.next=17;break;case 12:return r.prev=12,r.t0=r["catch"](5),console.log(44444,r.t0),t.ShowErrorInfo(r.t0),r.abrupt("return",Promise.reject());case 17:return r.abrupt("return",new Promise((function(e,r){t.CryptoAgent.SelectCertificate(o,i,n,a).then((function(t){e(t.result)}))["catch"]((function(e){console.log("SelectCertificate:",e),t.ShowErrorInfo(e),r()}))})));case 18:case"end":return r.stop()}}),r,null,[[5,12]])})))()},getHashValue:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function o(){var i;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,n.GetCertInfoOnClick("CertContent");case 2:if(i=o.sent,n.$emit("getImg",r),i){o.next=7;break}return alert("获取证书公钥失败!"),o.abrupt("return",Promise.reject());case 7:if(!t.bucketName||!t.objectKey){o.next=9;break}return o.abrupt("return",n.api.getSignHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{attachfile:"oss:".concat(t.bucketName,":").concat(t.objectKey),reason:"",location:"",signImgfileName:"",signImgfile:r,pageNo:e.pageIndex,pageX:Number(e.X),pageY:Number(e.Y),certBase64:i}}}));case 9:return alert("文件对象不合规!"),o.abrupt("return",Promise.reject());case 11:case"end":return o.stop()}}),o)})))()},getSignHashValue:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function o(){var i,a,s,c;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return i="",o.next=3,n.getHashValue(e,t,r);case 3:if(a=o.sent,s=a.code,c=a.data,0===s&&"200"==="".concat(c.bean.code)&&(i=c.bean.pdfHash),i){o.next=10;break}return alert("CFCA计算HASH值失败!( ".concat(c.bean.msg||"",")")),o.abrupt("return",!1);case 10:return o.abrupt("return",n.CryptoAgent.SignHashMsgPKCS7Detached(i,"SHA-1").then((function(e){return{signature:e.result,id:c.bean.id}}))["catch"]((function(e){n.ShowErrorInfo(e)})));case 11:case"end":return o.stop()}}),o)})))()},signFileKeyImage:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function o(){var i,a,s,c,l;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,n.getSignHashValue(e,t,r);case 2:if(i=o.sent,a="计算Hash 失败!",!i){o.next=17;break}return o.next=7,n.api.mergeHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{sigString:i.signature,id:i.id}}});case 7:if(s=o.sent,c=s.data,l=s.code,0!==l){o.next=16;break}if(!c.bean.url){o.next=13;break}return o.abrupt("return",c.bean);case 13:a=c.bean.msg,o.next=17;break;case 16:a=c.msg;case 17:return n.$message.error(a||"error计算Hash失败!"),o.abrupt("return",!1);case 19:case"end":return o.stop()}}),o)})))()},multipleSign:function(e,t,r,n){var o=arguments,i=this;return l(regeneratorRuntime.mark((function r(){var a,s,c,l,f,p;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=o.length>4&&void 0!==o[4]?o[4]:18,r.next=3,i.GetCertInfoOnClick("SerialNumber");case 3:if(s=r.sent,c="",n){r.next=8;break}return alert("印章图片缺失!"),r.abrupt("return",!1);case 8:l=0;case 9:if(!(l<e.length)){r.next=33;break}if(f=u(e[l]),"number"===typeof a&&(f.Y-=a),!(l>0)){r.next=26;break}return r.next=15,i.GetCertInfoOnClick("SerialNumber");case 15:if(p=r.sent,s===p){r.next=19;break}return alert("签署过程中,请不要更换ukey!"),r.abrupt("return",!1);case 19:if(!c){r.next=23;break}return r.next=22,i.signFileKeyImage(f,c,n);case 22:c=r.sent;case 23:console.log("iterateSign 签章结果".concat(l,"---result----"),c),r.next=30;break;case 26:return r.next=28,i.signFileKeyImage(f,t,n);case 28:c=r.sent,console.log("第一个章 签章结果",c);case 30:l++,r.next=9;break;case 33:return console.log("multipleSign 签章的结果",c),r.abrupt("return",c);case 35:case"end":return r.stop()}}),r)})))()}}},K=L,_=(r("3075"),g(K,O,G,!1,null,"74a914d1",null)),M=_.exports,U={components:{WzhSign:F,WzhSignChrome:M},data:function(){return{child:null,isIE:!1}},props:{api:{type:Object,required:!0}},created:function(){this.getBrowserInfo()},mounted:function(){this.isIE?this.child=this.$refs.signIe:this.child=this.$refs.signChrome},methods:{getBrowserInfo:function(){var e=navigator,t=e.appVersion,r=e.appName;return r.indexOf("Internet")>=0||t.indexOf("Trident")>=0?(this.isIE=!0,!1):void(t.indexOf(" WOW64")>=0&&(this.isIE=!0))}}},R=U,H=g(R,A,k,!1,null,null,null),B=H.exports,z={CfcaPdf:h,Ukey:x,WzhSign:F,WzhSignChrome:M,SignNew:B};t["default"]=z},ff64:function(e,t,r){"use strict";r("3a50")}})}));
2
- //# sourceMappingURL=ttd-common.umd.min.js.map
1
+ (function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["ttd-common"]=t():e["ttd-common"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="fb15")}({"24fb":function(e,t,r){"use strict";function n(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"===typeof btoa){var i=o(n),a=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}function o(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(r," */")}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=n(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"===typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);n&&o[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),t.push(c))}},t}},"29f3":function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".CryptoAgent-wrapper[data-v-2976751a]{height:0;width:0;position:absoute;left:-5000px}",""]),e.exports=t},3075:function(e,t,r){"use strict";r("3494")},3494:function(e,t,r){var n=r("d373");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("6f6994a3",n,!0,{sourceMap:!1,shadowMode:!1})},"3a50":function(e,t,r){var n=r("6780");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("271332fa",n,!0,{sourceMap:!1,shadowMode:!1})},"499e":function(e,t,r){"use strict";function n(e,t){for(var r=[],n={},o=0;o<t.length;o++){var i=t[o],a=i[0],s=i[1],c=i[2],l=i[3],u={id:e+":"+o,css:s,media:c,sourceMap:l};n[a]?n[a].parts.push(u):r.push(n[a]={id:a,parts:[u]})}return r}r.r(t),r.d(t,"default",(function(){return d}));var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},a=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,l=!1,u=function(){},f=null,p="data-vue-ssr-id",g="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(e,t,r,o){l=r,f=o||{};var a=n(e,t);return h(a),function(t){for(var r=[],o=0;o<a.length;o++){var s=a[o],c=i[s.id];c.refs--,r.push(c)}t?(a=n(e,t),h(a)):a=[];for(o=0;o<r.length;o++){c=r[o];if(0===c.refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}}function h(e){for(var t=0;t<e.length;t++){var r=e[t],n=i[r.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](r.parts[o]);for(;o<r.parts.length;o++)n.parts.push(C(r.parts[o]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var a=[];for(o=0;o<r.parts.length;o++)a.push(C(r.parts[o]));i[r.id]={id:r.id,refs:1,parts:a}}}}function m(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function C(e){var t,r,n=document.querySelector("style["+p+'~="'+e.id+'"]');if(n){if(l)return u;n.parentNode.removeChild(n)}if(g){var o=c++;n=s||(s=m()),t=b.bind(null,n,o,!1),r=b.bind(null,n,o,!0)}else n=m(),t=y.bind(null,n),r=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else r()}}var v=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}();function b(e,t,r,n){var o=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=v(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function y(e,t){var r=t.css,n=t.media,o=t.sourceMap;if(n&&e.setAttribute("media",n),f.ssrId&&e.setAttribute(p,t.id),o&&(r+="\n/*# sourceURL="+o.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}},6780:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".cfca-pdf{width:100%;min-height:100%;position:relative;margin-top:-1px}.cfca-pdf .fontSize1{font-size:65%}.cfca-pdf .fontSize1,.cfca-pdf .fontSize2{font-family:Verdana,Geneva,Arial,Helvetica,sans-serif}.cfca-pdf .fontSize2{font-size:70%}.cfca-pdf .fontSize3{font-size:75%;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif}.cfca-pdf .fakehlink{cursor:pointer;text-decoration:underline;font-weight:400;line-height:26px;color:#06c}.cfca-pdf .plaintext{line-height:28px}.cfca-pdf .blankline{height:5px}.cfca-pdf .remaining{width:100%;position:absolute;z-index:1;top:72px;bottom:0}.cfca-pdf .cfca-page .page-num{display:inline-block;width:auto}.cfca-pdf .cfca-page .page-num input{display:inline-block;width:48px;height:32px;border:1px solid #ccc;border-radius:2px;margin:0 5px}.cfca-pdf .cfca-pdf-wrapper{position:relative;width:560px;margin:0 auto;box-shadow:0 5px 10px 0 rgba(0,0,0,.05)}.cfca-pdf .cfca-pdf-wrapper .cfca-left,.cfca-pdf .cfca-pdf-wrapper .cfca-right{color:#dcdcdc;position:absolute;width:73px;height:130px;text-align:center;font-size:33px;cursor:pointer;border-radius:4px;top:50%;left:-72px}.cfca-pdf .cfca-pdf-wrapper .disabled{cursor:not-allowed}.cfca-pdf .cfca-pdf-wrapper .cfca-right{left:auto;right:-72px}.cfca-pdf .cfca-pdf-wrapper .cfca-content{display:flex;flex-direction:column;justify-content:space-between;position:relative;background:#fff;border:1px solid #d4d4d4;border-radius:0;padding:0;box-sizing:border-box;overflow:hidden}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-object{box-sizing:border-box;position:relative}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-object .obj-wrapper{height:758px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page{position:relative;height:48px;line-height:48px;box-sizing:border-box;overflow:hidden;padding:0 20px;text-align:left;font-size:14px;background:#fff;color:#666;border-bottom:1px solid #d4d4d4}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .cfca-title h2{max-width:340px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:18px;color:#222;line-height:48px;font-weight:400;margin:0;padding:0}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .cfca-title .sub-title{font-size:12px;color:#999;line-height:17px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .fr{position:absolute;right:20px;top:0;max-width:180px;white-space:nowrap;text-overflow:ellipsis}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-page .di{margin-left:10px}.cfca-pdf .cfca-pdf-wrapper .cfca-content .cfca-control{line-height:64px;box-sizing:border-box;overflow:hidden;padding:0 20px;text-align:right;font-size:14px;background:#f5f5f5;color:#666}",""]),e.exports=t},"6bd3":function(e,t,r){"use strict";r("c488")},8875:function(e,t,r){var n,o,i;(function(r,a){o=[],n=a,i="function"===typeof n?n.apply(t,o):n,void 0===i||(e.exports=i)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(g){var r,n,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,s=i.exec(g.stack)||a.exec(g.stack),c=s&&s[1]||!1,l=s&&s[2]||!1,u=document.location.href.replace(document.location.hash,""),f=document.getElementsByTagName("script");c===u&&(r=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=r.replace(n,"$1").trim());for(var p=0;p<f.length;p++){if("interactive"===f[p].readyState)return f[p];if(f[p].src===c)return f[p];if(c===u&&f[p].innerHTML&&f[p].innerHTML.trim()===o)return f[p]}return null}}return e}))},"890c":function(e,t,r){"use strict";r("c13c")},c13c:function(e,t,r){var n=r("29f3");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("765e63b4",n,!0,{sourceMap:!1,shadowMode:!1})},c3a0:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".CryptoAgent-wrapper[data-v-339a252e]{height:0;width:0;position:absolute;left:-5000px}",""]),e.exports=t},c488:function(e,t,r){var n=r("c3a0");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("499e").default;o("74daed76",n,!0,{sourceMap:!1,shadowMode:!1})},d373:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".CryptoAgent-wrapper[data-v-74a914d1]{height:0;width:0;position:absolute;left:-5000px}",""]),e.exports=t},fb15:function(e,t,r){"use strict";if(r.r(t),"undefined"!==typeof window){var n=window.document.currentScript,o=r("8875");n=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(r.p=i[1])}var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"cfca-pdf"},[e.isIE?[r("div",{staticClass:"cfca-pdf-wrapper",style:{visibility:e.visible}},[r("div",{class:{"cfca-left":!0,active:"left"===e.active,disabled:e.pageNo<=1},on:{click:function(t){return e.GoToPrevPage()}}},[r("span",{staticClass:"el-icon-arrow-left"})]),r("div",{staticClass:"cfca-content"},[r("div",{staticClass:"cfca-page"},[r("div",{staticClass:"fl cfca-title"},[r("h2",[e._v(e._s(e.title))])]),r("div",{staticClass:"fr"},[e._v(" "+e._s(e.pageNo)+"/"+e._s(e.pageCount)+" "),r("span",{staticClass:"di"},[e._v("第")]),r("el-input",{staticClass:"page-num",attrs:{size:"mini"},on:{change:e.GoToPage},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.GoToPage(t)}},model:{value:e.inputPage,callback:function(t){e.inputPage=t},expression:"inputPage"}}),e._v("页 ")],1)]),r("div",{ref:"PDFCtrlPlaceHolder",staticClass:"cfca-object"},[r("div",{staticClass:"obj-wrapper",on:{dragenter:e.onDragEnter,dragover:e.onDragOver,drop:e.onDrop}},[this.idstr?[r("object",{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{position:"relative","z-Index":"1"},attrs:{id:"PDFCtrl"+this.idstr,tabindex:0,codebase:e.publicPath+e.codebase,classid:"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A",width:"100%",height:"100%"}},[r("param",{attrs:{name:"wmode",value:"transparent"}}),r("param",{attrs:{name:"showToolbar",value:"false"}})])]:[r("object",{ref:"pdfCtrl",staticClass:"PDFCtrlObject",staticStyle:{position:"relative","z-Index":"1"},attrs:{tabindex:0,codebase:e.publicPath+e.codebase,classid:"clsid:6F60FE31-F827-4295-8AC4-775EF7478A6A",width:"100%",height:"100%"}},[r("param",{attrs:{name:"wmode",value:"transparent"}}),r("param",{attrs:{name:"showToolbar",value:"false"}})])]],2)]),r("div",{staticClass:"cfca-control"},[e._t("default")],2)]),r("div",{class:{"cfca-right":!0,active:"right"===e.active,disabled:e.pageNo>=e.pageCount},on:{click:function(t){return e.GoToNextPage()}}},[r("span",{staticClass:"el-icon-arrow-right"})])])]:[r("div",{staticClass:"red",staticStyle:{height:"350px",padding:"20px",position:"relative","margin-bottom":"20px"}},[e._v(" 提示:当前浏览器不支持控件预览,请切换IE浏览器进行查看 "),r("div",{staticClass:"tc",staticStyle:{position:"absolute",bottom:"0",left:"0",right:"0"}},[e._t("default")],2)])]],2)},s=[];function c(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,s,"next",e)}function s(e){c(i,n,o,a,s,"throw",e)}a(void 0)}))}}var u=function(e){var t={};return e&&(t="string"===typeof e&&/^{/.test(e)?JSON.parse(e):e),t.url&&(t.url=decodeURI(t.url)),t},f={name:"cfca-pdf",props:{action:{type:String,default:""},pdfurl:{type:String,default:""},visible:{type:[String,Boolean],default:"visible"},title:{type:String,default:""},image:{type:String,default:""},idstr:{type:[String,Number]}},data:function(){var e="";return e="x86"===window.navigator.cpuClass?"TrustSignPDFPlugin.ttd.x86.cab#version=3,2,1,4":"TrustSignPDFPlugin.ttd.x64.cab#version=3,2,1,4",{publicPath:"https://wsp.totodi.com/cfca_plug/",PDFCtrl:"",codebase:e,active:"",inputPage:"",isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,pageNo:1,pageCount:1}},beforeDestroy:function(){console.log("--cfca-pdf-beforeDestroy")},beforeRouteLeave:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log("-cfca--beforeRouteLeave---"),e.next=3,n.CloseFile();case 3:r();case 4:case"end":return e.stop()}}),e)})))()},mounted:function(){this.isIE&&(this.OnLoad(),console.log("cfca mounted =".concat(this.pdfurl)),this.pdfurl&&setTimeout(this.OpenFile,100))},methods:{OnLoad:function(){return!this.PDFCtrl&&(!!this.isIE&&(this.PDFCtrl=this.$refs.pdfCtrl,this.PDFCtrl||(console.log("使用id 加载this.PDFCtrl "),this.PDFCtrl=window["PDFCtrl".concat(this.idstr)]),void(window.OnClickPoint=this.OnClickPoint)))},OpenFile:function(e){var t=this;if(e=e||this.pdfurl,!e)return alert("未发现pdf资源路径!"),!1;try{console.log("OpenFile--src--".concat(e)),this.PDFCtrl.OpenWebFile(encodeURI(e)),this.PDFCtrl=this.$refs.pdfCtrl,setTimeout((function(){t.PDFCtrl.ZoomTo(-1),t.GetPageNo()}),100)}catch(n){if(this.PDFCtrl.GetLastErrorDesc){var r=this.PDFCtrl.GetLastErrorDesc();alert(r+n)}}},sleep:function(e){return new Promise((function(t){return setTimeout(t,e)}))},CloseFile:function(){try{this.pdfurl&&this.PDFCtrl&&(console.log("CloseFile---"),this.PDFCtrl.CloseFile())}catch(t){if(console.log("CloseFile error--",t),this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},onDragEnter:function(e){this.$emit("cfcaDragEnter",e)},onDragOver:function(e){e.preventDefault(),this.$emit("cfcaDragOver",e)},onDrop:function(e){this.$emit("cfcaDrop",e)},GoToFirstPage:function(){try{this.PDFCtrl.GoToFirstPage()}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},GoToLastPage:function(){try{this.PDFCtrl.GoToLastPage()}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},GoToPrevPage:function(){this.active="left";var e=this;try{this.PDFCtrl.GoToPrevPage(),this.inputPage="",setTimeout((function(){e.GetPageNo()}),100)}catch(r){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+r)}}},GoToNextPage:function(){this.active="right";var e=this;try{this.PDFCtrl.GoToNextPage(),this.inputPage="",setTimeout((function(){e.GetPageNo()}),100)}catch(r){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+r)}}},GetPageNo:function(){try{this.pageNo=this.PDFCtrl.GetCurrentPageNo(),this.pageCount=this.PDFCtrl.GetPageCount()}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},GoToPage:function(){var e=this;try{var t=this.inputPage.replace(/\D/,"");if(""===t)return void alert("请输入页码!");this.PDFCtrl.GoToPage(t),setTimeout((function(){e.GetPageNo()}),100)}catch(n){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var r=this.PDFCtrl.GetLastErrorDesc();alert(r+n)}}},ZoomTo:function(e){try{this.PDFCtrl.ZoomTo(e)}catch(r){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var t=this.PDFCtrl.GetLastErrorDesc();alert(t+r)}}},ZoomOut:function(){try{this.PDFCtrl.ZoomOut()}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},ZoomIn:function(){try{this.PDFCtrl.ZoomIn()}catch(t){if(this.PDFCtrl&&this.PDFCtrl.GetLastErrorDesc){var e=this.PDFCtrl.GetLastErrorDesc();alert(e+t)}}},OnClickPoint:function(e,t,r){console.log("OnClickPoint--","nPageNo=".concat(e,", x=").concat(t,", y=").concat(r));try{console.log("image2=",this.image),this.image?this.PDFCtrl.SignFile_Image(e,t,r,this.image):this.PDFCtrl.SignFile_KeyImage(e,t,r),this.$emit("cfca-point",e,t,r)}catch(o){var n=this.PDFCtrl.GetLastErrorDesc();alert(n+o)}},openDialog:function(e){var t=this;this.isIE&&(console.log(" openDialog---"),setTimeout((function(){t.OpenFile(e)}),350))},getUkeyImage:function(){var e=this.PDFCtrl.GetVersion();if(console.log(e),this.PDFCtrl.SetPKCS11Module("UyeePKCS11.Enterprise.dll|UlanPKCS11.Enterprise.dll|UlanPKCS11.dll|CFCA_UKEY_P11.dll"),"3.2.1.7"===e)return this.PDFCtrl.ReadKeyImage();alert("客户端签章控件[v=".concat(e,"],需要升级!"))},GetCertInfo:function(e){e=e||"SubjectDN";try{var t=this.PDFCtrl.GetSignCertInfo(e);if(!t){var r=this.PDFCtrl.GetLastErrorDesc();return void alert(r)}return t}catch(o){console.log("GetCertInfo :",o);var n=this.PDFCtrl.GetLastErrorDesc();alert(n+o)}},selectSignCert:function(e){try{var t="",r="CFCA ACS ",n=e||"";return console.log("证书序列号,精确匹配",n),this.PDFCtrl.SelectSignCert(t,r,"".concat(n),""),this.PDFCtrl.SetTimestampServer("http://210.74.41.195/timestamp"),!0}catch(o){return console.log("PDFCtrl.SelectSignCert ",o),alert("选择证书失败!".concat(o)),!1}},UploadFile:function(){try{var e=this.PDFCtrl.UploadCurrentFile(this.action);return e=JSON.parse(e),0===e.code?e.data.list[0]:""}catch(r){var t=this.PDFCtrl.GetLastErrorDesc();console.log("PDFCtrl 文件上传:",t),alert("PDFCtrl 文件上传:".concat(t).concat(r))}return!1},signFileKeyImage:function(e,t){var r=this.PDFCtrl.GetSignCertInfo("SerialNumber");console.log("-signFileKeyImage--certSN-".concat(r),e);try{var n="",o="";return e.height?(n=Number(e.X)+47,o=Number(e.height)-Number(e.Y)-47):(n=Number(e.X)+47,o=Number(e.Y)-47),console.log(" 参数 pageIndex = ".concat(e.pageIndex," x = ").concat(n," Y = ").concat(o)),console.log("signFileKeyImage: image=".concat(t)),t?this.PDFCtrl.SignFile_Image(e.pageIndex,n,o,t):this.PDFCtrl.SignFile_KeyImage(e.pageIndex,n,o),console.log("SignFile_KeyImage 成功"),!0}catch(a){var i=this.PDFCtrl.GetLastErrorDesc();return console.log("signFileKeyImage",a),alert("".concat(i," ").concat(a)),!1}},multipleSign7:function(e,t,r,n,o){for(var i=0;i<e.length;i++){var a=e[i];"number"===typeof o&&(a.Y-=o);try{var s="",c="";return a.height?(s=Number(a.X)+47,c=Number(a.height)-Number(a.Y)-47):(s=Number(a.X)+47,c=Number(a.Y)-47),this.PDFCtrl.AddSignaturePosition(a.pageIndex,s,c),!0}catch(u){var l=this.PDFCtrl.GetLastErrorDesc();console.log(" multipleSign7",u),alert(l+u)}}n?this.PDFCtrl.SignFile_Image(n):this.PDFCtrl.SignFile_KeyImage()},multipleSign5:function(e,t,r,n,o){console.log("multipleSign 循环签的begin ",r);var i=this.PDFCtrl.GetSignCertInfo("SerialNumber");console.log("serialNoBegin ",i);for(var a="",s=0;s<e.length;s++){var c=e[s];if(console.log("item=",c),"number"===typeof o&&(c.Y-=o),s>0){var l=this.PDFCtrl.GetSignCertInfo("SerialNumber");if(console.log("本次获得的序列号serialNoAgain:",l),i!==l)return alert("签署过程中,请不要更换ukey!"),!1;console.log("serialNo=",r),a=a&&this.signFileKeyImage(c,n),console.log("iterateSign 签章结果".concat(s,"-------"),a)}else console.log("第一个章,不用验签",s),a=this.signFileKeyImage(c,n),console.log("iterateSign 签章结果",a);if(!a)return!1}return console.log("multipleSign 签章的结果",a),a},multipleSign:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return n||this.PDFCtrl.SetPKCS11Module("UyeePKCS11.Enterprise.dll|UlanPKCS11.Enterprise.dll|UlanPKCS11.dll|CFCA_UKEY_P11.dll"),this.PDFCtrl.AddSignaturePosition?(console.log("新版插件"),this.multipleSign7(e,t,r,n,o)):this.multipleSign5(e,t,r,n,o)},GetSignatureInfo:function(){for(var e=this.PDFCtrl.GetSignatureCount(),t=[],r=0;r<e;r++){var n=this.PDFCtrl.VerifySignature(r),o=n.GetSignCertInfo("SerialNumber");t.push({SerialNumber:o})}return t}},watch:{pdfurl:function(e,t){this.inputPage=1,this.isIE&&e&&(this.PDFCtrl?(console.log("cfca watch pdfurl=="),t?t!==e&&(console.log("cfca watch oldval==",t),this.CloseFile(),setTimeout(this.OpenFile,100)):setTimeout(this.OpenFile,100)):console.log("cfca watch PDFCtrl 未加载 "))}}},p=f;r("ff64");function g(e,t,r,n,o,i,a,s){var c,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=r,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),a?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=c):o&&(c=s?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:l}}var d=g(p,a,s,!1,null,null,null),h=d.exports,m=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"CryptoAgent-wrapper"},[e.isIE?[r("object",{ref:"CryptoAgent",attrs:{codebase:e.publicPath+e.codebase,classid:e.classid}})]:[r("embed",{ref:"CryptoAgent",staticStyle:{height:"0px",width:"0px"},attrs:{type:"application/npCryptoKit.Ultimate.x86"}})]],2)},C=[];function v(){var e="";this.sourceData="".concat((new Date).getTime());try{var t=this.sourceData,r="",n="Attach",o="SHA-1";return r="Attach"===n?this.CryptoAgent.SignMsgPKCS7(t,o,!0):"Detach"===n?this.CryptoAgent.SignMsgPKCS7(t,o,!1):this.CryptoAgent.SignMsgPKCS1(t,o),r?(console.log("SignOnClick 签名结果:",r),r):(e=this.CryptoAgent.GetLastErrorDesc(),alert(e),"")}catch(i){console.log("SignOnClick error=",i),e=this.CryptoAgent.GetLastErrorDesc(),alert(e)}return""}var b={name:"ukey",data:function(){var e="",t="";return"x86"===window.navigator.cpuClass?(e="ukey/Cryptokit/x86/CryptoKit.ToToDi.x86.cab",t="clsid:5635B01D-C661-4ACE-B997-EECFA63BD388"):(e="ukey/Cryptokit/x64/CryptoKit.ToToDi.x64.cab",t="clsid:63F9892E-D854-476E-A839-C8BA79254EC1"),{isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,publicPath:"https://wsp.totodi.com/jz/",codebase:e,classid:t,sourceData:"",certType:"RSA",hashAlg:"SHA-1",singType:"Detach",CryptoAgent:"",random:"ttd"}},mounted:function(){this.onLoad()},methods:{onLoad:function(){return!this.CryptoAgent&&(!!this.isIE&&(this.CryptoAgent=this.$refs.CryptoAgent,this.CryptoAgent||alert("验签插件加载失败!"),void console.log("加载this.CryptoAgent ",this.CryptoAgent)))},SignOnClick:v,SelectCertificateOnClick:function(e){this.isIE||alert("请使用IE浏览器!");try{var t="",r="CFCA ACS ",n=e;n||console.log(" Ukye, 无序列号筛选证书, serialNo 非必传 ");var o="",i="",a="Uyee CSP v6.0 (Enterprise)||CFCA FOR UKEY CSP v1.1.0";return o=this.CryptoAgent.SelectCertificate(t,r,n,a),o||(i=this.CryptoAgent.GetLastErrorDesc(),alert(i)),o}catch(c){console.log("SelectCertificateOnClick catch",c);var s=this.CryptoAgent.GetLastErrorDesc();return alert("".concat(s,"/error")),!1}},GetSignCertInfoUkey:function(e){e=e||"SubjectDN",console.log("-Ukey-GetSignCertInfoUkey:InfoTypeID ",e);try{var t=this.CryptoAgent.GetSignCertInfo(e);if(!t){var r=this.CryptoAgent.GetLastErrorDesc();return void alert(r)}return t}catch(o){console.log("GetSignCertInfoUkey-Ukey: ",o);var n=this.CryptoAgent.GetLastErrorDesc();alert(n)}}}},y=b,S=(r("890c"),g(y,m,C,!1,null,"2976751a",null)),x=S.exports,w=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"CryptoAgent-wrapper"},[e.isIE?r("object",{ref:"CryptoAgent",attrs:{codebase:e.publicPath+e.codebase,classid:e.classid}}):r("embed",{ref:"CryptoAgent",staticStyle:{height:"0px",width:"0px"},attrs:{type:"application/npCryptoKit.ToToDi.x86"}})])},D=[],P={name:"wzh-sing",data:function(){var e="",t="";return"x86"===window.navigator.cpuClass?(e="wzh/CryptoKit.Paperless.x86.cab",t="clsid:B64B695B-348D-400D-8D58-9AAB1DA5851A"):(e="wzh/CryptoKit.Paperless.x64.cab",t="clsid:8BF7E683-630E-4B59-9E61-C996B671EBDF"),{isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,publicPath:"https://wsp.totodi.com/jz/",codebase:e,classid:t,sourceData:"",certType:"RSA",CryptoAgent:null}},props:{api:{type:Object,required:!0}},mounted:function(){this.onLoad()},methods:{onLoad:function(){if(this.CryptoAgent)return!1;this.CryptoAgent=this.$refs.CryptoAgent,this.CryptoAgent||alert("验签插件加载失败!"),console.log("加载this.CryptoAgent ",this.CryptoAgent)},getUkeyImage:function(){var e="";try{e=this.CryptoAgent.GetSealImage("CFCA_UKEY_P11.dll"),console.log("CFCA_UKEY_P11",e)}catch(t){console.log("CFCA_UKEY_P11 error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UyeePKCS11.Enterprise.dll"),console.log("UyeePKCS11",e)}catch(t){console.log("UyeePKCS11 error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UlanPKCS11.Enterprise.dll"),console.log("UlanPKCS11.Enterprise",e)}catch(t){console.log("UlanPKCS11.Enterprise error",t)}if(!e)try{e=this.CryptoAgent.GetSealImage("UlanPKCS11.dll"),console.log("UlanPKCS11",e)}catch(t){console.log("error",t)}return e||alert("读取Ukey印章图片失败!"),e},SignOnClick:function(){this.sourceData="".concat((new Date).getTime());try{var e=this.sourceData,t="",r="Attach",n="SHA-1";return t="Attach"===r?this.CryptoAgent.SignMsgPKCS7(e,n,!0):"Detach"===r?this.CryptoAgent.SignMsgPKCS7(e,n,!1):this.CryptoAgent.SignMsgPKCS1(e,n),t?(console.log("SignOnClick 签名结果:",t),t):(this.ShowErrorInfo(),"")}catch(o){console.log("SignOnClick error=",o),this.ShowErrorInfo()}return""},GetCertInfoOnClick:function(e){e=e||"SubjectDN",console.log("GetCertInfoOnClick:InfoTypeID ",e);try{var t=this.CryptoAgent.GetSignCertInfo(e);return t||(this.ShowErrorInfo(),!1)}catch(r){console.log("GetCertInfoOnClick-WzhSign: ",r),this.ShowErrorInfo(r)}},SelectCertificateOnClick:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{var t="",r="CFCA ACS",n=e,o="Uyee CSP v6.0 (Enterprise)||CFCA FOR UKEY CSP v1.1.0",i="";return console.log("无纸化 选证书 selectSignCert, serialNo(非传)=",e),i=this.CryptoAgent.SelectCertificate(t,r,n,o),i?(console.log("wzh SelectCertResult",i),!0):(console.log("wzh SelectCertResult 不存在"),this.ShowErrorInfo(),!1)}catch(a){return console.log("wzh SelectCertResult catch error: "),this.ShowErrorInfo(a),!1}},getHashValue:function(e,t,r){var n=this.CryptoAgent.GetSignCertInfo("CertContent");return this.$emit("getImg",r),n?t.bucketName&&t.objectKey?this.api.getSignHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{attachfile:"oss:".concat(t.bucketName,":").concat(t.objectKey),reason:"",location:"",signImgfileName:"",signImgfile:r,pageNo:e.pageIndex,pageX:Number(e.X),pageY:Number(e.Y),certBase64:n}}}):(alert("文件对象不合规!"),Promise.reject()):(alert("获取证书公钥失败!"),Promise.reject())},getSignHashValue:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function o(){var i,a,s,c,l;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.prev=0,i="",o.next=4,n.getHashValue(e,t,r);case 4:if(a=o.sent,s=a.code,c=a.data,0===s&&"200"==="".concat(c.bean.code)&&(i=c.bean.pdfHash),i){o.next=11;break}return alert("CFCA计算HASH值失败!( ".concat(c.bean.msg||"",")")),o.abrupt("return",!1);case 11:if(l=n.CryptoAgent.SignHashMsgPKCS7Detached(i,"SHA-1"),l){o.next=15;break}return n.ShowErrorInfo(),o.abrupt("return",!1);case 15:return o.abrupt("return",{signature:l,id:c.bean.id});case 18:o.prev=18,o.t0=o["catch"](0),console.log("getSignHashValue",o.t0),n.ShowErrorInfo(o.t0);case 22:case"end":return o.stop()}}),o,null,[[0,18]])})))()},signFileKeyImage:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function o(){var i,a,s,c,l;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,n.getSignHashValue(e,t,r);case 2:if(i=o.sent,a="计算Hash 失败!",!i){o.next=17;break}return o.next=7,n.api.mergeHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{sigString:i.signature,id:i.id}}});case 7:if(s=o.sent,c=s.data,l=s.code,0!==l){o.next=16;break}if(!c.bean.url){o.next=13;break}return o.abrupt("return",c.bean);case 13:a=c.bean.msg,o.next=17;break;case 16:a=c.msg;case 17:return n.$message.error(a||"error计算Hash失败!"),o.abrupt("return",!1);case 19:case"end":return o.stop()}}),o)})))()},multipleSign:function(e,t,r,n){var o=arguments,i=this;return l(regeneratorRuntime.mark((function r(){var a,s,c,l,f,p;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(a=o.length>4&&void 0!==o[4]?o[4]:18,s=i.CryptoAgent.GetSignCertInfo("SerialNumber"),c="",n){r.next=6;break}return alert("印章图片缺失!"),r.abrupt("return",!1);case 6:l=0;case 7:if(!(l<e.length)){r.next=29;break}if(f=u(e[l]),"number"===typeof a&&(f.Y-=a),!(l>0)){r.next=22;break}if(p=i.CryptoAgent.GetSignCertInfo("SerialNumber"),s===p){r.next=15;break}return alert("签署过程中,请不要更换ukey!"),r.abrupt("return",!1);case 15:if(!c){r.next=19;break}return r.next=18,i.signFileKeyImage(f,c,n);case 18:c=r.sent;case 19:console.log("iterateSign 签章结果".concat(l,"---result----"),c),r.next=26;break;case 22:return r.next=24,i.signFileKeyImage(f,t,n);case 24:c=r.sent,console.log("第一个章 签章结果",c);case 26:l++,r.next=7;break;case 29:return console.log("multipleSign 签章的结果",c),r.abrupt("return",c);case 31:case"end":return r.stop()}}),r)})))()}},ShowErrorInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.CryptoAgent&&this.CryptoAgent.GetLastErrorDesc){var t=this.CryptoAgent.GetLastErrorDesc();e&&(t="".concat(t,"[").concat(e,"]")),alert(t)}else alert("不支持该功能!")}},E=P,I=(r("6bd3"),g(E,w,D,!1,null,"339a252e",null)),F=I.exports,A=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[e.isIE?r("WzhSign",{ref:"signIe",attrs:{api:e.api}}):r("WzhSignChrome",{ref:"signChrome",attrs:{api:e.api}})],1)},k=[],G=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"CryptoAgent-wrapper"})},O=[];function j(e){this.browser=e}function N(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890",t=e.length,r="",n=0;n<10;n++)r+=e.charAt(Math.floor(Math.random()*t));return r}j.chromeExtension="ldpdnooafijfamkammjmhjnnfblekpno",j.edgeExtension="odpbakhphoggmefmfppocigpfppblick",j.productID="com.cfca.cryptokit.totodi",j.extensionName=j.productID+".extension",j.reqEventName=j.productID+".request",j.respEventName=j.productID+".response",j.Browser={IE:"Internet Explorer",Edge:"Edge",Edg:"Edge(Chromium)",Chrome:"Chrome",Safari:"Safari",Firefox:"Firefox"},window.nmCryptokit=j,j.SendMessageforChrome=function(e){return new Promise((function(t,r){chrome.runtime.sendMessage(j.chromeExtension,e,(function(e){if(e)0==e.errorcode?t(e):r(e);else{var n=new Object;n.errorcode=1,n.result=chrome.runtime.lastError.message,r(n)}}))}))},j.SendMessageforEdge=function(e){return new Promise((function(t,r){chrome.runtime.sendMessage(j.edgeExtension,e,(function(e){if(e)0==e.errorcode?t(e):r(e);else{var n=new Object;n.errorcode=1,n.result=chrome.runtime.lastError.message,r(n)}}))}))},j.SendMessagebyEvent=function(e){var t=new CustomEvent(j.reqEventName,{detail:e});return document.dispatchEvent(t),new Promise((function(t,r){var n=j.respEventName;void 0!=e.funcInfo&&void 0!=e.funcInfo.randomId&&(n+="."+e.funcInfo.randomId),document.addEventListener(n,(function e(n){document.removeEventListener(n.type,e);var o=JSON.parse(n.detail);null!=o&&0==o.errorcode?t(o):r(o)}),!1)}))},j.SendMessage=function(e,t){return j.Browser.Chrome==e?j.SendMessageforChrome(t):j.Browser.Edg==e?j.SendMessageforEdge(t):j.SendMessagebyEvent(t)},j.checkExtension=function(e){return new Promise((function(t,r){var n=new Object;console.log("444",e),j.Browser.Chrome==e||j.Browser.Edg==e?chrome.runtime?t(e):(n.errorcode=2,n.result="Extension does not exist!",r(n)):j.Browser.Edge==e||j.Browser.Firefox==e?document.getElementById(j.extensionName)?t(e):(n.errorcode=2,n.result="Extension does not exist!",r(n)):(n.errorcode=3,n.result="Only support Chrome/Edge/Firefox",r(n))}))},j.prototype.init=function(){var e=this.browser;return console.log("2223",e),j.checkExtension(e).then((function(e){var t=new Object;return t.action="connect",t.host=j.productID,j.SendMessage(e,t)})).then((function(){var t=new Object,r=new Object,n=N();return r["function"]="GetLastErrorDesc",r.params=null,r.randomId=n,t.action="invoke",t.funcInfo=r,j.SendMessage(e,t)}))},j.prototype.uninit=function(){var e=new Object;return e.action="disconnect",e.host=j.productID,j.SendMessage(this.browser,e)},j.prototype.getExtensionVersion=function(){var e=new Object,t=new Object;return t["function"]="getExtensionVersion",t.params=null,e.action="getExtensionVersion",e.funcInfo=t,j.SendMessage(this.browser,e)},j.prototype.GetSealImage=function(e){var t=new Object,r=new Object,n=new Array,o=N();return n.push(e),r["function"]="GetSealImage",r.params=n,r.randomId=o,t.action="invoke",t.funcInfo=r,j.SendMessage(this.browser,t)},j.prototype.getHostVersion=function(){var e=new Object,t=new Object,r=N();return t["function"]="GetVersion",t.params=null,t.randomId=r,e.action="invoke",e.funcInfo=t,j.SendMessage(this.browser,e)},j.prototype.SelectCertificate=function(e,t,r,n){var o=new Object,i=new Object,a=new Array,s=N();return a.push(e),a.push(t),a.push(r),a.push(n),i["function"]="SelectCertificate",i.params=a,i.randomId=s,o.action="invoke",o.funcInfo=i,j.SendMessage(this.browser,o)},j.prototype.GetSignCertInfo=function(e){var t=new Object,r=new Object,n=new Array,o=N();return n.push(e),r["function"]="getSignCertInfo",r.params=n,r.randomId=o,t.action="invoke",t.funcInfo=r,j.SendMessage(this.browser,t)},j.prototype.SignMsgPKCS7=function(e,t,r){var n=new Object,o=new Object,i=new Array,a=N();return i.push(e),i.push(t),i.push(r),o["function"]="SignMsgPKCS7",o.params=i,o.randomId=a,n.action="invoke",n.funcInfo=o,j.SendMessage(this.browser,n)},j.prototype.SignHashMsgPKCS7Detached=function(e,t){var r=new Object,n=new Object,o=new Array,i=N();return o.push(e),o.push(t),n["function"]="SignHashMsgPKCS7Detached",n.params=o,n.randomId=i,r.action="invoke",r.funcInfo=n,j.SendMessage(this.browser,r)},j.prototype.GetVersion=function(){var e=new Object,t=new Object,r=N();return t["function"]="GetVersion",t.params=null,t.randomId=r,e.action="invoke",e.funcInfo=t,j.SendMessage(this.browser,e)},j.prototype.GetLastErrorDesc=function(){var e=new Object,t=new Object,r=N();return t["function"]="GetLastErrorDesc",t.params=null,t.randomId=r,e.action="invoke",e.funcInfo=t,j.SendMessage(this.browser,e)};var T={methods:{BrowserInfo:function(){var e,t={name:"",version:""},r=self.navigator.userAgent;return(e=/edge\/([\d\.]+)/i.exec(r))?(t.name="Edge",t.version=e[1]):(e=/edg\/([\d\.]+)/i.exec(r))?(t.name="Edge(Chromium)",t.version=e[1]):/msie/i.test(r)?(t.name="Internet Explorer",t.version=/msie ([\d\.]+)/i.exec(r)[1]):/Trident/i.test(r)?(t.name="Internet Explorer",t.version=/rv:([\d\.]+)/i.exec(r)[1]):/chrome/i.test(r)?(t.name="Chrome",t.version=/chrome\/([\d\.]+)/i.exec(r)[1]):/safari/i.test(r)?(t.name="Safari",t.version=/version\/([\d\.]+)/i.exec(r)[1]):/firefox/i.test(r)&&(t.name="Firefox",t.version=/firefox\/([\d\.]+)/i.exec(r)[1]),t},LoadObj:function(){var e=this;try{var t,r,n=this.BrowserInfo();console.log("browser=",n),"Edge"==n.name||"Edge(Chromium)"==n.name||"Chrome"==n.name&&parseInt(n.version)>41||"Firefox"==n.name&&parseInt(n.version)>52?(this.CryptoAgent=new j(n.name),console.log(6661,this.CryptoAgent),this.CryptoAgent.init().then((function(){return console.log(6662),e.CryptoAgent.getExtensionVersion()})).then((function(r){return console.log(777),t=r.result,e.CryptoAgent.getHostVersion()})).then((function(n){console.log(888),r=n.result,console.log("extension version: ".concat(t)),console.log("host version: ".concat(r));var o=e.compareExtensionVersion(t),i=e.compareVersion(r,"3.4.0.1");console.log("extensionLevel ".concat(o)),console.log("hostLevel: ".concat(i)),i<0&&o<0?console.log("Please install host"):i<0?installHost():console.log("LoadObj success!")}))["catch"]((function(e){console.log("init error=",e)}))):console.log("Unsupported browser!")}catch(o){console.log("LoadObj error=",o)}},compareVersion:function(e,t){for(var r=e.split("."),n=t.split("."),o=Math.min(r.length,n.length),i=0;i<o;i++){if(parseInt(r[i],10)>parseInt(n[i],10))return 1;if(parseInt(r[i],10)<parseInt(n[i],10))return-1}if(o<r.length)for(var a=o;a<r.length;a++)if(0!=parseInt(r[a],10))return 1;if(o<n.length)for(a=o;a<n.length;a++)if(0!=parseInt(n[a],10))return-1;return 0},compareExtensionVersion:function(e){var t=this.BrowserInfo();return"Edge"==t.name||"Chrome"==t.name||"Firefox"==t.name?this.compareVersion(e,"3.4.0.1"):void 0},intallExtensionCallback:function(e,t){0==t?window.setTimeout("installHost()",1e3):alert("Install extension failed!")},OnUnLoad:function(){try{this.CryptoAgent.uninit().then((function(){}))}catch(e){alert(e)}},ShowErrorInfo:function(e){null!=e&&this.CryptoAgent&&this.CryptoAgent.GetLastErrorDesc?1==e.errorcode?alert(e.result):this.CryptoAgent.GetLastErrorDesc().then((function(e){alert(e.result)})):alert("不支持该功能!")}}},L={mixins:[T],data:function(){return{isIE:navigator.appName.indexOf("Internet")>=0||navigator.appVersion.indexOf("Trident")>=0,sourceData:"",certType:"RSA",CryptoAgent:null}},props:{api:{type:Object,required:!0}},mounted:function(){this.onLoad()},methods:{onLoad:function(){if(this.CryptoAgent)return console.log(3333,this.CryptoAgent),!1;this.LoadObj()},getUkeyImage:function(){var e=this;return new Promise((function(t,r){e.CryptoAgent.GetSealImage("UyeePKCS11.Enterprise.dll").then((function(e){t(e.result)}))["catch"]((function(n){e.CryptoAgent.GetSealImage("CFCA_UKEY_P11.dll").then((function(e){t(e.result)}))["catch"]((function(t){e.ShowErrorInfo(t),r(t)}))}))}))},GetCertInfoOnClick:function(e){var t=this;return e=e||"SubjectDN",console.log("GetCertInfoOnClick:InfoTypeID ",e),this.CryptoAgent.GetSignCertInfo(e).then((function(e){return e.result}))["catch"]((function(e){console.log("GetCertInfoOnClick-WzhSign: ",e),t.ShowErrorInfo(e)}))},SignOnClick:function(){var e=this;return l(regeneratorRuntime.mark((function t(){var r,n,o,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.sourceData="".concat((new Date).getTime()),r=e.sourceData,n="",o="Attach",i="SHA-1","Attach"!==o){t.next=11;break}return t.next=8,e.CryptoAgent.SignMsgPKCS7(r,i,!0);case 8:n=t.sent,t.next=20;break;case 11:if("Detach"!==o){t.next=17;break}return t.next=14,e.CryptoAgent.SignMsgPKCS7(r,i,!1);case 14:n=t.sent,t.next=20;break;case 17:return t.next=19,e.CryptoAgent.SignMsgPKCS1(r,i);case 19:n=t.sent;case 20:return console.log("SignOnClick 签名结果:",n),t.abrupt("return",n.result);case 22:case"end":return t.stop()}}),t)})))()},SelectCertificateOnClick:function(){var e=arguments,t=this;return l(regeneratorRuntime.mark((function r(){var n,o,i,a,s;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(n=e.length>0&&void 0!==e[0]?e[0]:"",o="",i="CFCA ACS ",a="Uyee CSP v6.0 (Enterprise)||CFCA FOR UKEY CSP v1.1.0",n){r.next=17;break}return r.prev=5,r.next=8,t.CryptoAgent.GetVersion();case 8:s=r.sent,console.log(5444444,s),r.next=17;break;case 12:return r.prev=12,r.t0=r["catch"](5),console.log(44444,r.t0),t.ShowErrorInfo(r.t0),r.abrupt("return",Promise.reject());case 17:return r.abrupt("return",new Promise((function(e,r){t.CryptoAgent.SelectCertificate(o,i,n,a).then((function(t){e(t.result)}))["catch"]((function(e){console.log("SelectCertificate:",e),t.ShowErrorInfo(e),r()}))})));case 18:case"end":return r.stop()}}),r,null,[[5,12]])})))()},getHashValue:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function o(){var i;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,n.GetCertInfoOnClick("CertContent");case 2:if(i=o.sent,n.$emit("getImg",r),i){o.next=7;break}return alert("获取证书公钥失败!"),o.abrupt("return",Promise.reject());case 7:if(!t.bucketName||!t.objectKey){o.next=9;break}return o.abrupt("return",n.api.getSignHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{attachfile:"oss:".concat(t.bucketName,":").concat(t.objectKey),reason:"",location:"",signImgfileName:"",signImgfile:r,pageNo:e.pageIndex,pageX:Number(e.X),pageY:Number(e.Y),certBase64:i}}}));case 9:return alert("文件对象不合规!"),o.abrupt("return",Promise.reject());case 11:case"end":return o.stop()}}),o)})))()},getSignHashValue:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function o(){var i,a,s,c;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return i="",o.next=3,n.getHashValue(e,t,r);case 3:if(a=o.sent,s=a.code,c=a.data,0===s&&"200"==="".concat(c.bean.code)&&(i=c.bean.pdfHash),i){o.next=10;break}return alert("CFCA计算HASH值失败!( ".concat(c.bean.msg||"",")")),o.abrupt("return",!1);case 10:return o.abrupt("return",n.CryptoAgent.SignHashMsgPKCS7Detached(i,"SHA-1").then((function(e){return{signature:e.result,id:c.bean.id}}))["catch"]((function(e){n.ShowErrorInfo(e)})));case 11:case"end":return o.stop()}}),o)})))()},signFileKeyImage:function(e,t,r){var n=this;return l(regeneratorRuntime.mark((function o(){var i,a,s,c,l;return regeneratorRuntime.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,n.getSignHashValue(e,t,r);case 2:if(i=o.sent,a="计算Hash 失败!",!i){o.next=17;break}return o.next=7,n.api.mergeHash({jsonData:{source:"TTDFUND",timestamp:(new Date).getTime(),msgBody:{sigString:i.signature,id:i.id}}});case 7:if(s=o.sent,c=s.data,l=s.code,0!==l){o.next=16;break}if(!c.bean.url){o.next=13;break}return o.abrupt("return",c.bean);case 13:a=c.bean.msg,o.next=17;break;case 16:a=c.msg;case 17:return n.$message.error(a||"error计算Hash失败!"),o.abrupt("return",!1);case 19:case"end":return o.stop()}}),o)})))()},multipleSign:function(e,t,r,n){var o=arguments,i=this;return l(regeneratorRuntime.mark((function r(){var a,s,c,l,f,p;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=o.length>4&&void 0!==o[4]?o[4]:18,r.next=3,i.GetCertInfoOnClick("SerialNumber");case 3:if(s=r.sent,c="",n){r.next=8;break}return alert("印章图片缺失!"),r.abrupt("return",!1);case 8:l=0;case 9:if(!(l<e.length)){r.next=33;break}if(f=u(e[l]),"number"===typeof a&&(f.Y-=a),!(l>0)){r.next=26;break}return r.next=15,i.GetCertInfoOnClick("SerialNumber");case 15:if(p=r.sent,s===p){r.next=19;break}return alert("签署过程中,请不要更换ukey!"),r.abrupt("return",!1);case 19:if(!c){r.next=23;break}return r.next=22,i.signFileKeyImage(f,c,n);case 22:c=r.sent;case 23:console.log("iterateSign 签章结果".concat(l,"---result----"),c),r.next=30;break;case 26:return r.next=28,i.signFileKeyImage(f,t,n);case 28:c=r.sent,console.log("第一个章 签章结果",c);case 30:l++,r.next=9;break;case 33:return console.log("multipleSign 签章的结果",c),r.abrupt("return",c);case 35:case"end":return r.stop()}}),r)})))()}}},K=L,_=(r("3075"),g(K,G,O,!1,null,"74a914d1",null)),M=_.exports,U={components:{WzhSign:F,WzhSignChrome:M},data:function(){return{child:null,isIE:!0}},props:{api:{type:Object,required:!0}},created:function(){},mounted:function(){this.isIE?this.child=this.$refs.signIe:this.child=this.$refs.signChrome},methods:{getBrowserInfo:function(){}}},R=U,H=g(R,A,k,!1,null,null,null),B=H.exports,z={CfcaPdf:h,Ukey:x,WzhSign:F,WzhSignChrome:M,SignNew:B};t["default"]=z},ff64:function(e,t,r){"use strict";r("3a50")}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolspack/ttd-common",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "private": false,
5
5
  "main": "lib/ttd-common.umd.min.js",
6
6
  "scripts": {
@@ -10,6 +10,7 @@
10
10
  "lint": "vue-cli-service lint --max-warnings 100"
11
11
  },
12
12
  "dependencies": {
13
+ "axios": "^1.5.0",
13
14
  "babel-cli": "^6.26.0",
14
15
  "babel-laoder": "0.0.1-security",
15
16
  "babel-polyfill": "^6.26.0",
@@ -30,6 +31,7 @@
30
31
  "eslint-plugin-node": "^11.1.0",
31
32
  "eslint-plugin-promise": "^4.2.1",
32
33
  "eslint-plugin-vue": "^6.2.2",
34
+ "sockjs-client": "^1.5.1",
33
35
  "vue-template-compiler": "^2.6.12"
34
36
  }
35
37
  }
package/src/App.vue CHANGED
@@ -1,22 +1,58 @@
1
1
  <template>
2
2
  <div id="app">
3
- <el-button @click="viewImg">预览</el-button>
4
- <img :src="pdfurl+'&w=120'" />
3
+ <form id="myForm" @submit.prevent="uploadFile">
4
+ <label for="">请上传:</label>
5
+ <input type="file" ref="fileInput" multiple name="files"><br>
6
+ <input type="hidden" name="bucketName" :value="uName">
7
+ <input type="submit" value="提交">
8
+ </form>
9
+ <PdfView :pdfurl="url" />
5
10
  </div>
6
11
  </template>
7
12
 
8
13
  <script>
14
+ import axios from 'axios'
15
+ import PdfView from './packages/pdfjs/PdfView2.vue'
16
+
17
+ const _baseUrl = 'http://peys.totodi.com:37811/'
9
18
 
10
19
  export default {
20
+ components: { PdfView },
11
21
  name: 'App',
12
22
  data() {
13
23
  return {
24
+ url: 'https://petx.totodi.com/visit/totodi-contract/20230905-e777d0d33a6f440db4b5276b397121fd-无法翻页-40.pdf?expireDataTime=1693900521328',
25
+ uName: 'totodi-contract',
26
+ action: `${_baseUrl}zuul/file-service/oos/uploadFile`,
14
27
  }
15
28
  },
29
+ mounted() {
30
+ },
16
31
  methods: {
17
- showImg(url) {
18
- },
19
- viewImg(url) {
32
+ uploadFile() {
33
+ const formData = new FormData();
34
+ const files = this.$refs.fileInput.files;
35
+
36
+ // 添加文件数据到表单中
37
+ for (let i = 0; i < files.length; i++) {
38
+ formData.append('files', files[i]);
39
+ }
40
+
41
+ // 添加其他字段数据到表单中
42
+ formData.append('u_name', this.uName);
43
+
44
+ // 发送异步请求
45
+ axios.post(this.action, formData)
46
+ .then((response) => {
47
+ // 处理上传成功的回调
48
+ console.log('上传成功');
49
+ // 执行其他操作
50
+ })
51
+ .catch((error) => {
52
+ // 处理上传失败的回调
53
+ console.error('上传失败', error);
54
+ // 执行其他操作
55
+ });
20
56
  },
21
57
  },
22
58
  }
@@ -0,0 +1,331 @@
1
+ <template>
2
+ <div class="pdf-view">
3
+ <div class="pdf-view-control" v-if="showPages">
4
+ <switch-page ref="switchPage" @page="onChangePage" :numPages="page_count"></switch-page>
5
+ </div>
6
+ <div class="pdf-view-area-wapper">
7
+ <div :style="style">
8
+ <div
9
+ class="center pdf-view-area"
10
+ @drop="onDrop"
11
+ @dragover="onDragOver"
12
+ :style="{'border': border?'1px solid #666': ''}"
13
+ v-if="pdfurl"
14
+ >
15
+ <div v-if="fileLoading" class="pdf-view-loading">文件加载中...</div>
16
+ <!-- <div v-else-if="pageRendering" class="pdf-view-rendering">内容渲染中...</div> -->
17
+ <canvas class="canvasstyle" ref="canvas"></canvas>
18
+ <div class="label-area">
19
+ <slot></slot>
20
+ </div>
21
+ </div>
22
+ <div v-else class="pdf-view-empty">未找到资源,请联系管理员!</div>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </template>
27
+ <script>
28
+
29
+ const PDFJS = require('pdfjs-dist')
30
+
31
+ const defautScale = 1.0
32
+
33
+ PDFJS.GlobalWorkerOptions.workerSrc = require('pdfjs-dist/legacy/build/pdf.worker.entry')
34
+
35
+ export default {
36
+ props: {
37
+ pdfurl: {
38
+ default: '',
39
+ },
40
+ scale: {
41
+ type: Number,
42
+ default: defautScale,
43
+ },
44
+ showPages: {
45
+ type: [String, Number, Boolean],
46
+ default: true,
47
+ },
48
+ border: {
49
+ type: [String, Number, Boolean],
50
+ default: true,
51
+ },
52
+ marginAuto: {
53
+ type: [String, Number, Boolean],
54
+ default: false,
55
+ },
56
+ page: {
57
+ type: [String, Number],
58
+ default: 1,
59
+ },
60
+ showWidth: {
61
+ type: [String, Number],
62
+ default: 0,
63
+ },
64
+ },
65
+ data() {
66
+ return {
67
+ pdfDoc: null, // pdfjs 生成的对象
68
+ pageNum: 1, // 当前页数
69
+ pageRendering: false,
70
+ fileLoading: true,
71
+ pageNumPending: null,
72
+ compuscale: defautScale, // 放大倍数
73
+ page_count: 0, // 总页数
74
+ maxscale: 1.5, // 最大放大倍数
75
+ minscale: 0.8, // 最小放大倍数
76
+ isready: false,
77
+ initPage: true, // 初始化页面
78
+ style: {
79
+ width: '860px', // 先给个默认值,当渲染后,后自动按实际值渲染,否则打标签那里,会显示异常
80
+ margin: this.marginAuto === '' || this.marginAuto ? '0 auto' : '0',
81
+ },
82
+ }
83
+ },
84
+ methods: {
85
+ async renderPage(num) {
86
+ // 渲染pdf
87
+ const vm = this
88
+ this.pageRendering = true
89
+ // Using promise to fetch the page
90
+ try {
91
+ const page = await this.pdfDoc.getPage(num)
92
+ let scaleNum = vm.compuscale
93
+ let viewport = ''
94
+ const viewboxWidth = this.showWidth
95
+ if (this.initPage && viewboxWidth) {
96
+ const desiredWidth = parseInt(viewboxWidth, 10) - 2
97
+ // 首先获得pdf 原本宽度,然后根据showWidth 计算缩放倍数
98
+ viewport = page.getViewport({ scale: 1.0 })
99
+ scaleNum = desiredWidth / viewport.width
100
+ this.initPage = false
101
+ this.compuscale = scaleNum
102
+ this.maxscale = scaleNum
103
+ }
104
+ // 重新渲染 缩放过的PDF
105
+ viewport = page.getViewport({ scale: scaleNum })
106
+
107
+ // 将 canvas 尺寸 传给父组件
108
+ this.$emit('size', viewport, num)
109
+
110
+ // Render PDF page into canvas context
111
+ vm.isready = true
112
+
113
+ const { canvas } = vm.$refs
114
+
115
+ this.style.width = `${viewport.width + 2}px`;
116
+ canvas.height = viewport.height
117
+ canvas.width = viewport.width
118
+
119
+ const renderContext = {
120
+ canvasContext: canvas.getContext('2d'),
121
+ viewport,
122
+ }
123
+ const renderTask = page.render(renderContext)
124
+
125
+ // Wait for rendering to finish
126
+ await renderTask.promise
127
+ vm.pageRendering = false
128
+ if (vm.pageNumPending !== null) {
129
+ // New page rendering is pending
130
+ vm.renderPage(vm.pageNumPending)
131
+ vm.pageNumPending = null
132
+ }
133
+ this.$emit('renderSuccess')
134
+ } catch (error) {
135
+ console.error(error)
136
+ } finally {
137
+ this.pageRendering = false
138
+ }
139
+ },
140
+ prev() {
141
+ // 上一页
142
+ if (this.pageNum <= 1) {
143
+ return
144
+ }
145
+ this.pageNum--
146
+ this.queueRenderPage(this.pageNum)
147
+ },
148
+ next() {
149
+ // 下一页
150
+ if (this.pageNum >= this.page_count) {
151
+ return
152
+ }
153
+ this.pageNum++
154
+ this.queueRenderPage(this.pageNum)
155
+ },
156
+ onChangePage(page) {
157
+ this.emitPage(page)
158
+ // switch page 改变页码
159
+ this.queueRenderPage(page)
160
+ },
161
+ emitPage(page) {
162
+ this.$emit('pageChange', page, this.page_count, page === this.page_count)
163
+ },
164
+ closepdf() {
165
+ // 关闭PDF
166
+ if (this.pdfDoc) {
167
+ this.pdfDoc.destroy();
168
+ }
169
+ this.pdfDoc = null
170
+ this.isready = false
171
+ this.compuscale = this.scale
172
+ this.$emit('closepdf')
173
+ },
174
+ queueRenderPage(num) {
175
+ if (this.pageRendering) {
176
+ this.pageNumPending = num
177
+ } else {
178
+ this.renderPage(num)
179
+ }
180
+ },
181
+ async loadUrl(url) {
182
+ if (!PDFJS) {
183
+ return false
184
+ }
185
+ this.fileLoading = true
186
+ // 此处无法确定,到底是否使用encodeURI
187
+ // var reg = /[\u4e00-\u9fa5]+/
188
+ // if (reg.test(url)) {
189
+ // url = encodeURI(url)
190
+ // console.log('-----encodeURI------', url)
191
+ // }
192
+ console.log('----PdfView---', url)
193
+ let pdfDoc_
194
+ try {
195
+ console.log('888--')
196
+ const pdfData = await fetch(
197
+ new URL(url, window.location).href,
198
+ );
199
+ const arrayBufferPdf = await pdfData.arrayBuffer(); // 转成 ArrayBuffer 塞给 pdf.js
200
+ pdfDoc_ = await PDFJS.getDocument({ data: arrayBufferPdf }).promise;
201
+ // pdfDoc_ = await PDFJS.getDocument({
202
+ // url: encodeURI(url),
203
+ // cMapUrl: 'https://unpkg.com/pdfjs-dist@2.2.228/cmaps/',
204
+ // cMapPacked: true,
205
+ // }).promise
206
+ } catch (error) {
207
+ console.log('999999--')
208
+ console.error(error)
209
+
210
+ const pdfData = await fetch(
211
+ new URL(url, window.location).href,
212
+ );
213
+ const arrayBufferPdf = await pdfData.arrayBuffer(); // 转成 ArrayBuffer 塞给 pdf.js
214
+ pdfDoc_ = await PDFJS.getDocument({ data: arrayBufferPdf }).promise;
215
+ } finally {
216
+ this.fileLoading = false
217
+ }
218
+
219
+ // 初始化pdf
220
+ if (this.pdfDoc) {
221
+ console.log('pdfDocument is ready destroy,,')
222
+ await this.pdfDoc.destroy();
223
+ this.pdfDoc = null
224
+ console.log('pdfDocument is destroy')
225
+ }
226
+ this.pdfDoc = pdfDoc_
227
+ this.page_count = pdfDoc_.numPages
228
+ console.log('this.page_count', this.page_count)
229
+ this.$emit('numPages', pdfDoc_.numPages)
230
+ this.renderPage(this.pageNum)
231
+ this.emitPage(this.pageNum)
232
+ },
233
+ onDrop(event) {
234
+ this.$emit('drop', event)
235
+ },
236
+ onDragOver(event) {
237
+ // 默认地,无法将数据/元素放置到其他元素中。如果需要设置允许放置,我们必须阻止对元素的默认处理方式。
238
+ // 这要通过调用 ondragover 事件的 event.preventDefault() 方法:
239
+ event.preventDefault()
240
+ },
241
+ },
242
+ mounted() {
243
+ this.compuscale = this.scale
244
+ // this.initPage = true
245
+ // if (this.pdfurl) {
246
+ // this.loadUrl(this.pdfurl)
247
+ // }
248
+ },
249
+ beforeDestroy() {
250
+ if (this.pdfDoc) {
251
+ this.pdfDoc.destroy();
252
+ }
253
+ },
254
+ watch: {
255
+ scale(val) {
256
+ if (val) {
257
+ this.compuscale = val
258
+ }
259
+ },
260
+ pdfurl: {
261
+ handler(val) {
262
+ this.$nextTick(() => {
263
+ if (val) {
264
+ this.pageNum = 1
265
+ this.initPage = true
266
+ this.loadUrl(val)
267
+ if (this.pdfDoc) {
268
+ this.pdfDoc.destroy();
269
+ }
270
+ }
271
+ if (this.showPages) {
272
+ this.$refs.switchPage.setPage(1)
273
+ }
274
+ })
275
+ },
276
+ immediate: true,
277
+ },
278
+ // 监听页码变化,渲染对应合同页
279
+ page(newPage, oldPage) {
280
+ this.queueRenderPage(newPage)
281
+ },
282
+ },
283
+ }
284
+ </script>
285
+
286
+ <style lang="less" scoped>
287
+ .pdf-view {
288
+ height: 100%;
289
+ width: 100%;
290
+ display: flex;
291
+ flex-direction: column;
292
+ }
293
+ .pdf-view-control {
294
+ text-align: center;
295
+ margin: 10px 0;
296
+ }
297
+ .pdf-view-area-wapper {
298
+ flex: 1 1 0%;
299
+ overflow: auto;
300
+ width: 100%;
301
+ flex-shrink: 0%;
302
+ }
303
+ .pdf-view-area {
304
+ position: relative;
305
+ min-height: 700px;
306
+ .canvasstyle {
307
+ display: block;
308
+ margin: 0 auto;
309
+ }
310
+ .label-area {
311
+ position: absolute;
312
+ right: 0;
313
+ bottom: 0;
314
+ top: 0;
315
+ left: 0;
316
+ }
317
+ }
318
+ .pdf-view-empty {
319
+ text-align: center;
320
+ line-height: 150px;
321
+ font-size: 14px;
322
+ color: #999;
323
+ }
324
+
325
+ .pdf-view-loading, .pdf-view-rendering {
326
+ margin-top: 40px;
327
+ text-align: center;
328
+ font-size: 14px;
329
+ color: #999;
330
+ }
331
+ </style>
@@ -0,0 +1,54 @@
1
+ <template>
2
+ <div>
3
+ <WzhSign :api="api" ref="signIe" v-if="isIE" />
4
+ <WzhSignChrome :api="api" ref="signChrome" v-else />
5
+ </div>
6
+ </template>
7
+ <script>
8
+ import WzhSign from './WzhSign.vue';
9
+ import WzhSignChrome from './WzhSignChrome.vue';
10
+
11
+ export default {
12
+ components: { WzhSign, WzhSignChrome },
13
+ data() {
14
+ return {
15
+ child: null,
16
+ isIE: true,
17
+ }
18
+ },
19
+ props: {
20
+ api: {
21
+ type: Object,
22
+ required: true,
23
+ },
24
+ },
25
+ created() {
26
+ // this.getBrowserInfo()
27
+ },
28
+ mounted() {
29
+ if (this.isIE) {
30
+ this.child = this.$refs.signIe
31
+ } else {
32
+ this.child = this.$refs.signChrome
33
+ }
34
+ },
35
+ methods: {
36
+ getBrowserInfo() {
37
+ const { appVersion, appName } = navigator
38
+ if (appName.indexOf('Internet') >= 0) {
39
+ this.isIE = true
40
+ return false
41
+ }
42
+ if (appVersion.indexOf('Trident') >= 0) {
43
+ this.isIE = true
44
+ return false
45
+ }
46
+
47
+ // 360的急速模式,需要使用id签署控件
48
+ // if (appVersion.indexOf(' WOW64') >= 0) {
49
+ // this.isIE = true
50
+ // }
51
+ },
52
+ },
53
+ }
54
+ </script>
@@ -13,7 +13,7 @@ export default {
13
13
  data() {
14
14
  return {
15
15
  child: null,
16
- isIE: false,
16
+ isIE: true,
17
17
  }
18
18
  },
19
19
  props: {
@@ -23,7 +23,7 @@ export default {
23
23
  },
24
24
  },
25
25
  created() {
26
- this.getBrowserInfo()
26
+ // this.getBrowserInfo()
27
27
  },
28
28
  mounted() {
29
29
  if (this.isIE) {
@@ -34,20 +34,20 @@ export default {
34
34
  },
35
35
  methods: {
36
36
  getBrowserInfo() {
37
- const { appVersion, appName } = navigator
38
- if (appName.indexOf('Internet') >= 0) {
39
- this.isIE = true
40
- return false
41
- }
42
- if (appVersion.indexOf('Trident') >= 0) {
43
- this.isIE = true
44
- return false
45
- }
37
+ // const { appVersion, appName } = navigator
38
+ // if (appName.indexOf('Internet') >= 0) {
39
+ // this.isIE = true
40
+ // return false
41
+ // }
42
+ // if (appVersion.indexOf('Trident') >= 0) {
43
+ // this.isIE = true
44
+ // return false
45
+ // }
46
46
 
47
47
  // 360的急速模式,需要使用id签署控件
48
- if (appVersion.indexOf(' WOW64') >= 0) {
49
- this.isIE = true
50
- }
48
+ // if (appVersion.indexOf(' WOW64') >= 0) {
49
+ // this.isIE = true
50
+ // }
51
51
  },
52
52
  },
53
53
  }