vue2-client 1.9.13 → 1.9.15

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.9.13",
3
+ "version": "1.9.15",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -151,9 +151,9 @@ export default {
151
151
  treeDatas[name] = values
152
152
  }
153
153
  // 移除默认的表单项,将组织好后的表单项合并进表单
154
- // this.form[this.model] = undefined
155
- // Object.assign(this.form, treeDatas)
156
- this.$emit('onChange', treeDatas)
154
+ this.form[this.model] = undefined
155
+ Object.assign(this.form, treeDatas)
156
+ // this.$emit('onChange', treeDatas)
157
157
  } else {
158
158
  // 从单一数据源组成的树可以直接赋值
159
159
  // this.form[this.model] = value
@@ -173,6 +173,10 @@ export default {
173
173
  emitFunc (func, data) {
174
174
  this.$emit('x-form-item-emit-func', func, data)
175
175
  },
176
+ // 提交表单
177
+ asyncSubmit () {
178
+ return this.asyncSubmit()
179
+ },
176
180
  async onSubmit () {
177
181
  let pass = true
178
182
  const promises = this.groups.map((item, index) => {
@@ -12,7 +12,7 @@
12
12
  :span="cell.colSpan ? cell.colSpan * 2 : undefined">
13
13
  <!-- 插槽渲染 -->
14
14
  <template v-if="cell.type === 'slot'">
15
- <template v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab'].includes(cell.slotType)">
15
+ <template v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group'].includes(cell.slotType)">
16
16
  <component
17
17
  :is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
18
18
  :key="cellIndex"
@@ -503,8 +503,8 @@ export default {
503
503
  console.log(`插槽组件已经初始化 slotType ${cell.slotType},ref= dynamicComponent_${cell.slotRef || cellIndex} , serviceName = ${cell.serviceName}`)
504
504
  const shouldInit = cell.shouldInit == null ? true : cell.shouldInit
505
505
  if (shouldInit) {
506
- if (cell.slotType === 'x-add-native-form' && shouldInit) {
507
- // 建议表单需要主动调用初始化方法
506
+ if (cell.slotType === 'x-add-native-form') {
507
+ // 简易表单需要主动调用初始化方法
508
508
  getConfigByName(cell.slotConfig, cell.serviceName, async (res) => {
509
509
  // 如果配置了 表单初始化logic
510
510
  // 调用 logic 获取参数
@@ -533,6 +533,21 @@ export default {
533
533
  }
534
534
  })
535
535
  }, this.env === 'dev')
536
+ } else if (cell.soltType === 'x-form-group') {
537
+ // 简易表单需要主动调用初始化方法
538
+ getConfigByName(cell.slotConfig, cell.serviceName, (res) => {
539
+ // 如果配置了 表单初始化logic
540
+ // 调用 logic 获取参数
541
+ const param = { ...this.mixinData }
542
+ this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
543
+ ...res,
544
+ serviceName: cell.serviceName,
545
+ showSubmitBtn: !this.isInAModal,
546
+ businessType: param.businessType || '新增',
547
+ modifyModelData: param,
548
+ showLeftTab: true,
549
+ })
550
+ }, this.env === 'dev')
536
551
  }
537
552
  }
538
553
  },