@zscreate/form-component 1.1.676 → 1.1.678

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.
@@ -8244,25 +8244,25 @@ div {
8244
8244
  background: rgba(24, 144, 255, 0.6);
8245
8245
  }
8246
8246
 
8247
- .ai-fill-form .form-item[data-v-8c9a5f54] {
8247
+ .ai-fill-form .form-item[data-v-f25b50a8] {
8248
8248
  margin-bottom: 20px;
8249
8249
  }
8250
- .ai-fill-form .form-item .label[data-v-8c9a5f54] {
8250
+ .ai-fill-form .form-item .label[data-v-f25b50a8] {
8251
8251
  font-size: 14px;
8252
8252
  color: #333;
8253
8253
  margin-bottom: 8px;
8254
8254
  font-weight: 500;
8255
8255
  }
8256
- .ai-fill-form .progress-info[data-v-8c9a5f54] {
8256
+ .ai-fill-form .progress-info[data-v-f25b50a8] {
8257
8257
  margin-bottom: 20px;
8258
8258
  }
8259
- .ai-fill-form .progress-info .progress-text[data-v-8c9a5f54] {
8259
+ .ai-fill-form .progress-info .progress-text[data-v-f25b50a8] {
8260
8260
  margin-top: 8px;
8261
8261
  font-size: 13px;
8262
8262
  color: #666;
8263
8263
  text-align: center;
8264
8264
  }
8265
- .ai-fill-form .result-list[data-v-8c9a5f54] {
8265
+ .ai-fill-form .result-list[data-v-f25b50a8] {
8266
8266
  margin-bottom: 20px;
8267
8267
  padding: 16px;
8268
8268
  background: #f5f5f5;
@@ -8270,33 +8270,33 @@ div {
8270
8270
  max-height: 300px;
8271
8271
  overflow-y: auto;
8272
8272
  }
8273
- .ai-fill-form .result-list .result-title[data-v-8c9a5f54] {
8273
+ .ai-fill-form .result-list .result-title[data-v-f25b50a8] {
8274
8274
  font-size: 14px;
8275
8275
  font-weight: 500;
8276
8276
  color: #333;
8277
8277
  margin-bottom: 12px;
8278
8278
  }
8279
- .ai-fill-form .result-list .result-item[data-v-8c9a5f54] {
8279
+ .ai-fill-form .result-list .result-item[data-v-f25b50a8] {
8280
8280
  padding: 8px 0;
8281
8281
  border-bottom: 1px dashed #e0e0e0;
8282
8282
  font-size: 13px;
8283
8283
  }
8284
- .ai-fill-form .result-list .result-item[data-v-8c9a5f54]:last-child {
8284
+ .ai-fill-form .result-list .result-item[data-v-f25b50a8]:last-child {
8285
8285
  border-bottom: none;
8286
8286
  }
8287
- .ai-fill-form .result-list .result-item .field-name[data-v-8c9a5f54] {
8287
+ .ai-fill-form .result-list .result-item .field-name[data-v-f25b50a8] {
8288
8288
  color: #666;
8289
8289
  margin-right: 8px;
8290
8290
  }
8291
- .ai-fill-form .result-list .result-item .field-value[data-v-8c9a5f54] {
8291
+ .ai-fill-form .result-list .result-item .field-value[data-v-f25b50a8] {
8292
8292
  color: #1890ff;
8293
8293
  font-weight: 500;
8294
8294
  }
8295
- .ai-fill-form .result-list .result-item .field-value.empty-value[data-v-8c9a5f54] {
8295
+ .ai-fill-form .result-list .result-item .field-value.empty-value[data-v-f25b50a8] {
8296
8296
  color: #999;
8297
8297
  font-style: italic;
8298
8298
  }
8299
- .ai-fill-form .footer-btns[data-v-8c9a5f54] {
8299
+ .ai-fill-form .footer-btns[data-v-f25b50a8] {
8300
8300
  display: flex;
8301
8301
  justify-content: flex-end;
8302
8302
  gap: 10px;
@@ -6820,7 +6820,7 @@ if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIO
6820
6820
  /***/ ((module) => {
6821
6821
 
6822
6822
  "use strict";
6823
- module.exports = {"rE":"1.1.676"};
6823
+ module.exports = {"rE":"1.1.678"};
6824
6824
 
6825
6825
  /***/ }),
6826
6826
 
@@ -186967,9 +186967,9 @@ function useSsoStatus(options) {
186967
186967
  }
186968
186968
  };
186969
186969
  }
186970
- ;// ./node_modules/_vue-loader@15.11.1@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_vue-loader@15.11.1@vue-loader/lib/index.js??vue-loader-options!./src/components/AIAutoFillForm/AIAutoFillForm.vue?vue&type=template&id=8c9a5f54&scoped=true
186971
- var AIAutoFillFormvue_type_template_id_8c9a5f54_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a-modal',{attrs:{"width":"800px","title":"AI填表","ok-text":"确认","cancel-text":"取消","maskClosable":false,"footer":null},on:{"ok":_vm.handleOk,"cancel":_vm.handleCancel},model:{value:(_vm.visible),callback:function ($$v) {_vm.visible=$$v},expression:"visible"}},[_c('a-spin',{attrs:{"spinning":_vm.loading,"tip":_vm.tips}},[_c('div',{staticClass:"ai-fill-form"},[_c('div',{staticClass:"form-item"},[_c('div',{staticClass:"label"},[_vm._v("请输入或粘贴内容:")]),_c('a-textarea',{attrs:{"rows":6,"placeholder":"请输入或粘贴需要识别的内容,例如:张三 男 合肥大学","disabled":_vm.loading},model:{value:(_vm.contentText),callback:function ($$v) {_vm.contentText=$$v},expression:"contentText"}})],1),(_vm.recognizeProgress.total > 0)?_c('div',{staticClass:"progress-info"},[_c('a-progress',{attrs:{"percent":_vm.progressPercent,"status":_vm.recognizeProgress.current === _vm.recognizeProgress.total ? 'success' : 'active'}})],1):_vm._e(),(_vm.resultList.length > 0)?_c('div',{staticClass:"result-list"},[_c('div',{staticClass:"result-title"},[_vm._v("识别结果:")]),_vm._l((_vm.resultList),function(item,index){return _c('div',{key:index,staticClass:"result-item"},[_c('span',{staticClass:"field-name"},[_vm._v(_vm._s(item.fieldName)+":")]),_c('span',{staticClass:"field-value",class:{ 'empty-value': item.value === undefined }},[_vm._v(" "+_vm._s(item.value === undefined ? '未识别成功' : item.value)+" ")])])})],2):_vm._e(),_c('div',{staticClass:"footer-btns"},[_c('a-button',{attrs:{"disabled":_vm.loading},on:{"click":_vm.handleCancel}},[_vm._v("取消")]),_c('a-button',{attrs:{"type":"primary","loading":_vm.loading,"disabled":!_vm.contentText.trim()},on:{"click":_vm.startRecognize}},[_vm._v(" 开始识别 ")]),(_vm.resultList.length > 0)?_c('a-button',{attrs:{"type":"primary","disabled":_vm.loading || _vm.resultList.length === 0 || !_vm.hasSuccessResult},on:{"click":_vm.handleOk}},[_vm._v(" 确认填入 ")]):_vm._e()],1)])])],1)}
186972
- var AIAutoFillFormvue_type_template_id_8c9a5f54_scoped_true_staticRenderFns = []
186970
+ ;// ./node_modules/_vue-loader@15.11.1@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_vue-loader@15.11.1@vue-loader/lib/index.js??vue-loader-options!./src/components/AIAutoFillForm/AIAutoFillForm.vue?vue&type=template&id=f25b50a8&scoped=true
186971
+ var AIAutoFillFormvue_type_template_id_f25b50a8_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a-modal',{directives:[{name:"drag-modal",rawName:"v-drag-modal"}],attrs:{"width":"800px","title":"AI填表","ok-text":"确认","cancel-text":"取消","maskClosable":!_vm.loading,"closable":!_vm.loading,"keyboard":!_vm.loading,"footer":null},on:{"ok":_vm.handleOk,"cancel":_vm.handleCancel},model:{value:(_vm.visible),callback:function ($$v) {_vm.visible=$$v},expression:"visible"}},[_c('a-spin',{attrs:{"spinning":_vm.loading,"tip":_vm.tips}},[_c('div',{staticClass:"ai-fill-form"},[_c('div',{staticClass:"form-item"},[_c('div',{staticClass:"label"},[_vm._v("请输入或粘贴内容:")]),_c('a-textarea',{attrs:{"rows":6,"placeholder":"请输入或粘贴需要识别的内容,例如:张三 男 合肥大学","disabled":_vm.loading},model:{value:(_vm.contentText),callback:function ($$v) {_vm.contentText=$$v},expression:"contentText"}})],1),(_vm.recognizeProgress.total > 0)?_c('div',{staticClass:"progress-info"},[_c('a-progress',{attrs:{"percent":_vm.progressPercent,"status":_vm.recognizeProgress.current === _vm.recognizeProgress.total ? 'success' : 'active'}})],1):_vm._e(),(_vm.resultList.length > 0)?_c('div',{staticClass:"result-list"},[_c('div',{staticClass:"result-title"},[_vm._v("识别结果:")]),_vm._l((_vm.resultList),function(item,index){return _c('div',{key:index,staticClass:"result-item"},[_c('span',{staticClass:"field-name"},[_vm._v(_vm._s(item.fieldName)+":")]),_c('span',{staticClass:"field-value",class:{ 'empty-value': item.value === undefined }},[_vm._v(" "+_vm._s(item.value === undefined ? '未识别成功' : item.value)+" ")])])})],2):_vm._e(),_c('div',{staticClass:"footer-btns"},[_c('a-button',{attrs:{"disabled":_vm.loading},on:{"click":_vm.handleCancel}},[_vm._v("取消")]),_c('a-button',{attrs:{"type":"primary","loading":_vm.loading,"disabled":!_vm.contentText.trim()},on:{"click":_vm.startRecognize}},[_vm._v(" 开始识别 ")]),(_vm.resultList.length > 0)?_c('a-button',{attrs:{"type":"primary","disabled":_vm.loading || _vm.resultList.length === 0 || !_vm.hasSuccessResult},on:{"click":_vm.handleOk}},[_vm._v(" 确认填入 ")]):_vm._e()],1)])])],1)}
186972
+ var AIAutoFillFormvue_type_template_id_f25b50a8_scoped_true_staticRenderFns = []
186973
186973
 
186974
186974
 
186975
186975
  ;// ./node_modules/_thread-loader@3.0.4@thread-loader/dist/cjs.js!./node_modules/_babel-loader@8.4.1@babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/_vue-loader@15.11.1@vue-loader/lib/index.js??vue-loader-options!./src/components/AIAutoFillForm/AIAutoFillForm.vue?vue&type=script&lang=js
@@ -187046,6 +187046,9 @@ var AIAutoFillFormvue_type_template_id_8c9a5f54_scoped_true_staticRenderFns = []
187046
187046
  //
187047
187047
  //
187048
187048
  //
187049
+ //
187050
+ //
187051
+ //
187049
187052
 
187050
187053
 
187051
187054
  /* harmony default export */ const AIAutoFillFormvue_type_script_lang_js = ({
@@ -187094,8 +187097,12 @@ var AIAutoFillFormvue_type_template_id_8c9a5f54_scoped_true_staticRenderFns = []
187094
187097
  if (['grid'].includes(item.type)) {
187095
187098
  //栅格
187096
187099
  item.columns.forEach(el => {
187097
- if (el.list && el.list[0]) {
187098
- this.formList.push(el.list[0]);
187100
+ if (el.list && el.list.length) {
187101
+ el.list.forEach(el2 => {
187102
+ if (['input', 'textarea', 'number', 'date', 'time'].includes(el2.type)) {
187103
+ this.formList.push(el2);
187104
+ }
187105
+ });
187099
187106
  }
187100
187107
  });
187101
187108
  } else if (['input', 'textarea', 'number', 'date', 'time'].includes(item.type)) {
@@ -187118,6 +187125,11 @@ var AIAutoFillFormvue_type_template_id_8c9a5f54_scoped_true_staticRenderFns = []
187118
187125
  this.visible = true;
187119
187126
  },
187120
187127
  handleCancel() {
187128
+ // 识别进行中时禁止关闭
187129
+ if (this.loading) {
187130
+ this.$message.warning('识别进行中,请稍候...');
187131
+ return;
187132
+ }
187121
187133
  this.visible = false;
187122
187134
  this.contentText = '';
187123
187135
  this.recognizeProgress = {
@@ -187245,10 +187257,10 @@ var AIAutoFillFormvue_type_template_id_8c9a5f54_scoped_true_staticRenderFns = []
187245
187257
  });
187246
187258
  ;// ./src/components/AIAutoFillForm/AIAutoFillForm.vue?vue&type=script&lang=js
187247
187259
  /* harmony default export */ const AIAutoFillForm_AIAutoFillFormvue_type_script_lang_js = (AIAutoFillFormvue_type_script_lang_js);
187248
- ;// ./node_modules/_mini-css-extract-plugin@2.9.4@mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/_css-loader@6.11.0@css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/_vue-loader@15.11.1@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_postcss-loader@6.2.1@postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/_less-loader@5.0.0@less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/_vue-loader@15.11.1@vue-loader/lib/index.js??vue-loader-options!./src/components/AIAutoFillForm/AIAutoFillForm.vue?vue&type=style&index=0&id=8c9a5f54&prod&lang=less&scoped=true
187260
+ ;// ./node_modules/_mini-css-extract-plugin@2.9.4@mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/_css-loader@6.11.0@css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/_vue-loader@15.11.1@vue-loader/lib/loaders/stylePostLoader.js!./node_modules/_postcss-loader@6.2.1@postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/_less-loader@5.0.0@less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/_vue-loader@15.11.1@vue-loader/lib/index.js??vue-loader-options!./src/components/AIAutoFillForm/AIAutoFillForm.vue?vue&type=style&index=0&id=f25b50a8&prod&lang=less&scoped=true
187249
187261
  // extracted by mini-css-extract-plugin
187250
187262
 
187251
- ;// ./src/components/AIAutoFillForm/AIAutoFillForm.vue?vue&type=style&index=0&id=8c9a5f54&prod&lang=less&scoped=true
187263
+ ;// ./src/components/AIAutoFillForm/AIAutoFillForm.vue?vue&type=style&index=0&id=f25b50a8&prod&lang=less&scoped=true
187252
187264
 
187253
187265
  ;// ./src/components/AIAutoFillForm/AIAutoFillForm.vue
187254
187266
 
@@ -187261,11 +187273,11 @@ var AIAutoFillFormvue_type_template_id_8c9a5f54_scoped_true_staticRenderFns = []
187261
187273
 
187262
187274
  var AIAutoFillForm_component = (0,componentNormalizer/* default */.A)(
187263
187275
  AIAutoFillForm_AIAutoFillFormvue_type_script_lang_js,
187264
- AIAutoFillFormvue_type_template_id_8c9a5f54_scoped_true_render,
187265
- AIAutoFillFormvue_type_template_id_8c9a5f54_scoped_true_staticRenderFns,
187276
+ AIAutoFillFormvue_type_template_id_f25b50a8_scoped_true_render,
187277
+ AIAutoFillFormvue_type_template_id_f25b50a8_scoped_true_staticRenderFns,
187266
187278
  false,
187267
187279
  null,
187268
- "8c9a5f54",
187280
+ "f25b50a8",
187269
187281
  null
187270
187282
 
187271
187283
  )
@@ -187273,6 +187285,83 @@ var AIAutoFillForm_component = (0,componentNormalizer/* default */.A)(
187273
187285
  /* harmony default export */ const AIAutoFillForm = (AIAutoFillForm_component.exports);
187274
187286
  // EXTERNAL MODULE: ./src/flow/fonts/iconfont.js
187275
187287
  var iconfont = __webpack_require__(71931);
187288
+ ;// ./src/utils/drag.js
187289
+
187290
+
187291
+ // 自定义指令使弹窗可拖动
187292
+ // 使用方式: <a-modal v-drag-modal destroyOnClose V-model="a"></a-modal>
187293
+ // 加上v-drag-modal 一定要加上destroyoncLose属性,否则弹窗不会回到初始位置
187294
+ external_commonjs_vue_commonjs2_vue_root_Vue_default().directive('drag-modal', (el, bindings, vnode) => {
187295
+ external_commonjs_vue_commonjs2_vue_root_Vue_default().nextTick(() => {
187296
+ let {
187297
+ visible,
187298
+ destroyOnClose
187299
+ } = vnode.componentInstance;
187300
+ // 防止未定义 destroyOnClose 关闭弹窗时dom未被销毁,指令被重复调用
187301
+ if (!visible) return;
187302
+ let modal = el.getElementsByClassName('ant-modal')[0];
187303
+ let header = el.getElementsByClassName('ant-modal-header')[0];
187304
+ // let footer = el.getElementsByClassName('ant-modal-footer')[0]
187305
+ header.style.cursor = 'move';
187306
+ // footer.style.cursor = 'move';
187307
+
187308
+ let left = 0;
187309
+ let top = 0;
187310
+
187311
+ // 未定义 destroyOnClose 时,dom未被销毁,关闭弹窗再次打开,弹窗会停留在上一次拖动的位置
187312
+ if (!destroyOnClose) {
187313
+ left = modal.left || 0;
187314
+ top = modal.top || 0;
187315
+ }
187316
+ // top 初始值为 offsetTop
187317
+ top = top || modal.offsetTop;
187318
+ header.onmousedown = e => {
187319
+ let startX = e.clientX;
187320
+ let startY = e.clientY;
187321
+ header.left = header.offsetLeft;
187322
+ header.top = header.offsetTop;
187323
+ el.onmousemove = event => {
187324
+ let endX = event.clientX;
187325
+ let endY = event.clientY;
187326
+ modal.left = header.left + (endX - startX) + left;
187327
+ modal.top = header.top + (endY - startY) + top;
187328
+ modal.style.left = modal.left + 'px';
187329
+ modal.style.top = modal.top + 'px';
187330
+ };
187331
+ el.onmouseup = event => {
187332
+ left = modal.left;
187333
+ top = modal.top;
187334
+ el.onmousemove = null;
187335
+ el.onmouseup = null;
187336
+ header.releaseCapture && header.releaseCapture();
187337
+ };
187338
+ header.setCapture && header.setCapture();
187339
+ };
187340
+ // ,
187341
+ // footer.onmousedown = e => {
187342
+ // let startX = e.clientX;
187343
+ // let startY = e.clientY;
187344
+ // footer.left = footer.offsetLeft;
187345
+ // footer.top = footer.offsetTop;
187346
+ // el.onmousemove = event => {
187347
+ // let endX = event.clientX;
187348
+ // let endY = event.clientY;
187349
+ // modal.left = footer.left + (endX - startX) + left;
187350
+ // modal.top = (endY - startY) + top;
187351
+ // modal.style.left = modal.left + 'px'
187352
+ // modal.style.top = modal.top + 'px'
187353
+ // }
187354
+ // el.onmouseup = event => {
187355
+ // left = modal.left
187356
+ // top = modal.top
187357
+ // el.onmousemove = null;
187358
+ // el.onmouseup = null;
187359
+ // footer.releaseCapture && footer.releaseCapture();
187360
+ // }
187361
+ // footer.setCapture && footer.setCapture();
187362
+ // }
187363
+ });
187364
+ });
187276
187365
  ;// ./src/utils/watermark/index.js
187277
187366
 
187278
187367
  const watermark = __webpack_require__(79600);
@@ -189505,6 +189594,8 @@ window.formVersion = version;
189505
189594
 
189506
189595
 
189507
189596
 
189597
+ //引入拖拽自定义指令
189598
+
189508
189599
 
189509
189600
 
189510
189601
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/form-component",
3
- "version": "1.1.676",
3
+ "version": "1.1.678",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "main": "dist/form-component.umd.js",