@zscreate/form-component 1.1.165 → 1.1.167

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.
@@ -85739,7 +85739,7 @@ function getBase64(file) {
85739
85739
  async created() {
85740
85740
  if (this.widget.options.uploadEncrypt) {
85741
85741
  const [err, res] = await (0,util/* toAwait */.WP)((0,manage/* getAction */.s7)('/sys/user/getUserPublicOpenId'));
85742
- this.openId = await (0,aesEncrypt/* encryption */.y)(res.result);
85742
+ this.openId = await (0,aesEncrypt/* encryption */.yc)(res.result);
85743
85743
  if (this.openId) {
85744
85744
  this.openId = this.openId.replaceAll("+", "%2B").replaceAll("=", "%3D");
85745
85745
  }
@@ -113248,7 +113248,8 @@ function convertFileSize(fileSizeInKB, digits = 2) {
113248
113248
 
113249
113249
  "use strict";
113250
113250
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
113251
- /* harmony export */ y: () => (/* binding */ encryption)
113251
+ /* harmony export */ iv: () => (/* binding */ encryption_v1),
113252
+ /* harmony export */ yc: () => (/* binding */ encryption)
113252
113253
  /* harmony export */ });
113253
113254
  /* unused harmony export getEncryptedString */
113254
113255
  /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9211);
@@ -113323,6 +113324,21 @@ async function encryption(word) {
113323
113324
  // console.log("-=-=-=-", encrypted.ciphertext)
113324
113325
  return CryptoJS.enc.Base64.stringify(encrypted.ciphertext);
113325
113326
  }
113327
+ /**
113328
+ * AES加密 :字符串 key iv 返回base64
113329
+ */
113330
+ function encryption_v1(word) {
113331
+ let key = CryptoJS.enc.Utf8.parse('It9d2GJURVJfzFrW');
113332
+ let iv = CryptoJS.enc.Utf8.parse('tPBNkx0sSO3aIBZI');
113333
+ let srcs = CryptoJS.enc.Utf8.parse(word);
113334
+ var encrypted = CryptoJS.AES.encrypt(srcs, key, {
113335
+ iv: iv,
113336
+ mode: CryptoJS.mode.CBC,
113337
+ padding: CryptoJS.pad.ZeroPadding
113338
+ });
113339
+ // console.log("-=-=-=-", encrypted.ciphertext)
113340
+ return CryptoJS.enc.Base64.stringify(encrypted.ciphertext);
113341
+ }
113326
113342
  var CryptoJS = CryptoJS || function (Math, undefined) {
113327
113343
  /*
113328
113344
  * Local polyfil of Object.create
@@ -119977,7 +119993,7 @@ var util = __webpack_require__(4948);
119977
119993
  const openId = res.result;
119978
119994
  // alert('2: '+ open_unionId)
119979
119995
  // if (!openId) return this.$message.error(res.message || '获取openId失败')
119980
- let en_openId = await (0,aesEncrypt/* encryption */.y)(openId);
119996
+ let en_openId = await (0,aesEncrypt/* encryption */.yc)(openId);
119981
119997
  window.opener.postMessage({
119982
119998
  type: 'openId',
119983
119999
  data: en_openId
@@ -122538,7 +122554,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__7203__;
122538
122554
  /***/ ((module) => {
122539
122555
 
122540
122556
  "use strict";
122541
- module.exports = {"i8":"1.1.165"};
122557
+ module.exports = {"i8":"1.1.167"};
122542
122558
 
122543
122559
  /***/ })
122544
122560
 
@@ -122671,6 +122687,56 @@ if (typeof window !== 'undefined') {
122671
122687
  // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
122672
122688
  var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(7203);
122673
122689
  var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
122690
+ // EXTERNAL MODULE: ./node_modules/_core-js@3.32.1@core-js/modules/es.json.stringify.js
122691
+ var es_json_stringify = __webpack_require__(3108);
122692
+ // EXTERNAL MODULE: ./src/utils/encryption/aesEncrypt.js
122693
+ var aesEncrypt = __webpack_require__(3488);
122694
+ ;// CONCATENATED MODULE: ./src/utils/encryption/encry_http.js
122695
+
122696
+
122697
+ function encry_http_v1(config) {
122698
+ if (localStorage.getItem('http_debug') === '1') {
122699
+ console.log('%c' + config.url + '', 'color: green;', config.params, config.data, JSON.parse(JSON.stringify(config)));
122700
+ }
122701
+ const _t = +new Date();
122702
+ // const { key, iv } = Vue.prototype['ENCRYPTED_KEY'] || {}
122703
+ if (!config.params || Object.keys(config.params).length === 0) config.params = {
122704
+ _t
122705
+ };
122706
+ if (!config.data || Object.keys(config.data).length === 0) config.data = {
122707
+ _t
122708
+ };
122709
+ if (config.method === 'get') {
122710
+ const jsonStr = JSON.stringify({
122711
+ ...config.params,
122712
+ _t
122713
+ });
122714
+ config.params = {
122715
+ requestParams: (0,aesEncrypt/* encryption_v1 */.iv)(jsonStr)
122716
+ };
122717
+ }
122718
+ if (config.method === 'post') {
122719
+ const jsonStr = JSON.stringify({
122720
+ ...config.data,
122721
+ _t
122722
+ });
122723
+ config.data = {
122724
+ requestParams: (0,aesEncrypt/* encryption_v1 */.iv)(jsonStr)
122725
+ };
122726
+ }
122727
+ config.params = {
122728
+ _t,
122729
+ ...config.params
122730
+ };
122731
+ return config;
122732
+ }
122733
+ ;// CONCATENATED MODULE: ./src/utils/encryption/index.js
122734
+
122735
+
122736
+ /* harmony default export */ const encryption = ({
122737
+ encry_http_v1: encry_http_v1,
122738
+ encryption_v1: aesEncrypt/* encryption_v1 */.iv
122739
+ });
122674
122740
  ;// CONCATENATED MODULE: ./node_modules/_vue-loader@15.10.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_vue-loader@15.10.2@vue-loader/lib/index.js??vue-loader-options!./src/form/modules/layout/layoutForPaper.vue?vue&type=template&id=1a4e1e90&scoped=true&
122675
122741
  var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a-spin',{staticClass:"layout layout-input-all-setting",class:{ 'no-border': !_vm.data.config.border, 'save-pdf': _vm.showLine, 'ant-form-noBorder': _vm.data.config.componentsNoBorder },style:({ 'overflow-x': _vm.data.config.layout === 'horizontal' ? 'auto' : 'initial' }),attrs:{"spinning":_vm.formLoading,"tip":_vm.formLoadingTip}},[(_vm.pageLoading && _vm.showLayoutLoading)?_c('div',{class:{ form_skeleton: _vm.pageLoading }},[(_vm.pageLoading)?_c('a-skeleton',{attrs:{"active":"","loading":_vm.pageLoading,"paragraph":{ rows: 12 }}}):_vm._e()],1):_vm._e(),_c('a-form-model',{ref:"Form",attrs:{"hideRequiredMark":true,"model":_vm.models,"rules":_vm.rules,"wrapper-col":{}},on:{"update:rules":function($event){_vm.rules=$event},"validate":_vm.validate}},_vm._l((_vm.widgetList),function(list,listindex){return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.widgetList[0].length > 0),expression:"widgetList[0].length > 0"}],key:listindex,staticClass:"paper",style:(_vm.contentStyle)},[(listindex == 0)?_vm._t("default"):_vm._e(),(listindex == 0)?_c('div',{staticClass:"form-title",style:(Object.assign({}, {height: _vm.formNameHeight}, _vm.formNameStyle))},[_c('span',{staticStyle:{"font-size":"inherit"},domProps:{"innerHTML":_vm._s(_vm.data.config.formNameLeftContent || '')}}),_vm._v(_vm._s(_vm.data.config.formName)),_c('span',{staticStyle:{"font-size":"inherit"},domProps:{"innerHTML":_vm._s(_vm.data.config.formNameRightContent || '')}})]):_vm._e(),(_vm.value && _vm.value.formIndex)?_c('div',{staticStyle:{"text-align":"right","font-weight":"bold"}},[_vm._v(_vm._s(_vm.value.formIndex))]):_vm._e(),(_vm.data.config.pageHeader && listindex === 0)?_c('div',{style:(_vm.data.config.headerHeight),domProps:{"innerHTML":_vm._s(_vm.data.config.pageHeader)}}):_vm._e(),_c('div',{staticClass:"page-border",style:({ borderColor: _vm.data.config.borderColor })},[_vm._l((list),function(widget,index){return [(widget.type == 'table')?[(
122676
122742
  widget.options.layoutModel === 'auto' ||
@@ -122750,8 +122816,6 @@ var Containervue_type_template_id_cae183dc_staticRenderFns = []
122750
122816
 
122751
122817
  // EXTERNAL MODULE: ./node_modules/_core-js@3.32.1@core-js/modules/web.dom-exception.stack.js
122752
122818
  var web_dom_exception_stack = __webpack_require__(2413);
122753
- // EXTERNAL MODULE: ./node_modules/_core-js@3.32.1@core-js/modules/es.json.stringify.js
122754
- var es_json_stringify = __webpack_require__(3108);
122755
122819
  ;// CONCATENATED MODULE: ./node_modules/_vue-loader@15.10.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_vue-loader@15.10.2@vue-loader/lib/index.js??vue-loader-options!./src/form/modules/widgetList.vue?vue&type=template&id=e51c1984&scoped=true&
122756
122820
  var widgetListvue_type_template_id_e51c1984_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"components-list"},[_c('div',{staticClass:"tabs"},[_c('div',[_c('span',{class:{ activeTab: _vm.activeTab == 0 },on:{"click":function($event){return _vm.triggertab(0)}}},[_vm._v("基础控件")]),_c('span',{class:{ activeTab: _vm.activeTab == 1 },on:{"click":function($event){return _vm.triggertab(1)}}},[_vm._v("高级控件")]),_c('span',{class:{ activeTab: _vm.activeTab == 2 },on:{"click":function($event){return _vm.triggertab(2)}}},[_vm._v("布局控件")]),_c('span',{class:{ activeTab: _vm.activeTab == 3 },on:{"click":function($event){return _vm.triggertab(3)}}},[_vm._v("公文相关")]),_c('span',{class:{ activeTab: _vm.activeTab == 4 },on:{"click":function($event){return _vm.triggertab(4)}}},[_vm._v("个性化")])]),_c('div',[_vm._t("default")],2)]),(_vm.basicFields.length && _vm.activeTab == 0)?[_c('draggable',_vm._b({attrs:{"setData":function () {},"tag":"ul","list":_vm.basicComponents,"move":_vm.handleMove},on:{"end":_vm.handleMoveEnd,"start":_vm.handleMoveStart}},'draggable',_vm.draggableOptions,false),[_vm._l((_vm.basicComponents),function(item,index){return [_c('li',{key:index,staticClass:"widget-control",class:{ 'no-put': item.type == 'divider' }},[_c('a',[_c('i',{staticClass:"icon iconfont",class:item.icon}),_c('span',[_vm._v(_vm._s(item.name))])])])]})],2)]:_vm._e(),(_vm.advanceFields.length && _vm.activeTab == 1)?[_c('draggable',_vm._b({attrs:{"setData":function () {},"tag":"ul","list":_vm.advanceComponents,"move":_vm.handleMove},on:{"end":_vm.handleMoveEnd,"start":_vm.handleMoveStart}},'draggable',_vm.draggableOptions,false),[_vm._l((_vm.advanceComponents),function(item,index){return [(_vm.advanceFields.indexOf(item.type) >= 0)?_c('li',{key:index,staticClass:"widget-control",class:{ 'no-put': item.type == 'table' }},[_c('a',[_c('i',{staticClass:"icon iconfont",class:item.icon}),_c('span',[_vm._v(_vm._s(item.name))])])]):_vm._e()]})],2)]:_vm._e(),(_vm.layoutFields.length && _vm.activeTab == 2)?[_c('draggable',_vm._b({attrs:{"setData":function () {},"tag":"ul","list":_vm.layoutComponents,"move":_vm.handleMove},on:{"end":_vm.handleMoveEnd,"start":_vm.handleMoveStart}},'draggable',_vm.draggableOptions,false),[_vm._l((_vm.layoutComponents),function(item,index){return [(_vm.layoutFields.indexOf(item.type) >= 0)?_c('li',{key:index,staticClass:"widget-control no-put"},[_c('a',[_c('i',{staticClass:"icon iconfont",class:item.icon}),_c('span',[_vm._v(_vm._s(item.name))])])]):_vm._e()]})],2)]:_vm._e(),(_vm.specFields.length && _vm.activeTab == 3)?[_c('draggable',_vm._b({attrs:{"setData":function () {},"tag":"ul","list":_vm.specComponents,"move":_vm.handleMove},on:{"end":_vm.handleMoveEnd,"start":_vm.handleMoveStart}},'draggable',_vm.draggableOptions,false),[_vm._l((_vm.specComponents),function(item,index){return [(_vm.specFields.indexOf(item.type) >= 0)?_c('li',{key:index,staticClass:"widget-control no-put"},[_c('a',[_c('i',{staticClass:"icon iconfont",class:item.icon}),_c('span',[_vm._v(_vm._s(item.name))])])]):_vm._e()]})],2)]:_vm._e(),(_vm.hnkjComponentsConfig.length && _vm.activeTab == 4)?[_c('draggable',_vm._b({attrs:{"setData":function () {},"tag":"ul","list":_vm.hnkjComponentsConfig,"move":_vm.handleMove},on:{"end":_vm.handleMoveEnd,"start":_vm.handleMoveStart}},'draggable',_vm.draggableOptions,false),[_vm._l((_vm.hnkjComponentsConfig),function(item,index){return [_c('li',{key:index,staticClass:"widget-control no-put"},[_c('a',[_c('i',{staticClass:"icon iconfont",class:item.icon}),_c('span',[_vm._v(_vm._s(item.name))])])])]})],2)]:_vm._e(),(_vm.isView)?_c('div',{staticClass:"preview-options"},[_c('a-button',{class:{'btn-active': _vm.previewDesktop },attrs:{"type":"link","icon":"desktop"},on:{"click":function($event){return _vm.$emit('update:previewDesktop', true)}}},[_vm._v(" 桌面端 ")]),_c('a-divider',{attrs:{"type":"vertical"}}),_c('a-button',{class:{'btn-active': !_vm.previewDesktop },attrs:{"type":"link","icon":"mobile"},on:{"click":function($event){return _vm.$emit('update:previewDesktop', false)}}},[_vm._v(" 移动端 ")])],1):_vm._e()],2)}
122757
122821
  var widgetListvue_type_template_id_e51c1984_scoped_true_staticRenderFns = []
@@ -127962,7 +128026,9 @@ Print.prototype = {
127962
128026
  /* harmony default export */ const print = (Print);
127963
128027
  ;// CONCATENATED MODULE: ./src/main.js
127964
128028
 
128029
+
127965
128030
  const version = (__webpack_require__(4147)/* .version */ .i8);
128031
+ window.formVersion = version;
127966
128032
  console.log("version:", version);
127967
128033
 
127968
128034
 
@@ -127977,6 +128043,7 @@ console.log("version:", version);
127977
128043
  const main_components = [layoutForPaper, Container, layoutItem["default"], FilePreview/* default */.Z];
127978
128044
  const install = function (Vue, opts = {}, router = undefined) {
127979
128045
  __webpack_require__.g.Vue = Vue;
128046
+ opts.common_encrypt = encryption;
127980
128047
  Vue.prototype = Object.assign(Vue.prototype, opts);
127981
128048
  (external_commonjs_vue_commonjs2_vue_root_Vue_default()).prototype = Object.assign((external_commonjs_vue_commonjs2_vue_root_Vue_default()).prototype, opts);
127982
128049
  main_components.forEach(component => {
@@ -127998,7 +128065,8 @@ if (typeof window !== 'undefined' && window.Vue) {
127998
128065
  install,
127999
128066
  Print: print,
128000
128067
  ...components/* default */.Z.componentList,
128001
- MessageBox: components_MessageBox
128068
+ MessageBox: components_MessageBox,
128069
+ encrypt: encryption
128002
128070
  });
128003
128071
  ;// CONCATENATED MODULE: ./node_modules/_@vue_cli-service@5.0.8@@vue/cli-service/lib/commands/build/entry-lib.js
128004
128072
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/form-component",
3
- "version": "1.1.165",
3
+ "version": "1.1.167",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "main": "dist/form-component.umd.js",