vue2-client 1.9.55 → 1.9.56

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.
@@ -13,6 +13,8 @@
13
13
  * outEnv: 传递给打开的界面的数据,在打开界面的js中通过this.outEnv可以访问
14
14
  * attr: 用于传递参数绑定到 modal 弹框上
15
15
  - getOutEnv 获取获取 outEnv
16
+ - this.getRealKeyData(obj) 获取真实的数据 传递 {a_a:"1"} 返回 {a:"1"}
17
+
16
18
  ```js
17
19
  this.openDialog('xxx', 5, {}, {}, {})
18
20
  ```
@@ -52,7 +54,8 @@ this.openDialog('xxx', 5, {}, {}, {})
52
54
  # form 简易表单
53
55
 
54
56
  - asyncSubmit().then(res=>{}) 手动提交表单
55
- - setForm({}) 手动设置表单内容
57
+ - setForm({}) 手动设置表单内容 传参:{a:'aa'} 如果表单配置 {a:''} 会合并到表单项目a中
58
+ - setFormWithKey({}) 手动设置表单内容 传参:{a_a:'aa'} 如果表单配置 {b_a:''} 或者 {c_a:'''} 会合并到表单项目b_a,c_a中
56
59
  - 事件相关
57
60
  - onSubmit(form) 表单提交事件
58
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.9.55",
3
+ "version": "1.9.56",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -851,6 +851,9 @@ export default {
851
851
  setForm (obj) {
852
852
  this.form = Object.assign(this.form, obj)
853
853
  },
854
+ setFormWithKey (obj) {
855
+ setDataByRealKey(this.form, obj)
856
+ },
854
857
  emitFunc (func, data) {
855
858
  // 打开列表选择框逻辑
856
859
  if (func === 'openSelectCRUDFrom') {
@@ -30,6 +30,7 @@ import { mapState } from 'vuex'
30
30
  import { executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
31
31
  import { runLogic } from '@vue2-client/services/api/common'
32
32
  import { getMicroData, getWindow, isMicroAppEnv, microDispatch } from '@vue2-client/utils/microAppUtils'
33
+ import { getRealKeyData } from '@vue2-client/utils/util'
33
34
 
34
35
  export default {
35
36
  name: 'XAddReport',
@@ -98,6 +99,7 @@ export default {
98
99
  microDispatch,
99
100
  getMicroData,
100
101
  runLogic,
102
+ getRealKeyData,
101
103
  init (params) {
102
104
  console.log('params', params)
103
105
  const {
@@ -124,7 +124,7 @@ import {
124
124
  import { mapState } from 'vuex'
125
125
  import XTreePro from '@vue2-client/base-client/components/common/XTree/XTreePro.vue'
126
126
  import { executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
127
- import util from '@vue2-client/utils/util'
127
+ import util, { getRealKeyData } from '@vue2-client/utils/util'
128
128
 
129
129
  export default {
130
130
  name: 'XFormTable',
@@ -316,6 +316,7 @@ export default {
316
316
  },
317
317
  methods: {
318
318
  runLogic,
319
+ getRealKeyData,
319
320
  getConfigByNameAsync,
320
321
  getConfigByName,
321
322
  columnClick (key, value, record) {
@@ -25,6 +25,7 @@ import { mapState } from 'vuex'
25
25
  import { executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
26
26
  import { runLogic } from '@vue2-client/services/api/common'
27
27
  import { getMicroData, getWindow, isMicroAppEnv, microDispatch } from '@vue2-client/utils/microAppUtils'
28
+ import { getRealKeyData } from '@vue2-client/utils/util'
28
29
 
29
30
  export default {
30
31
  name: 'XReportDrawer',
@@ -91,6 +92,7 @@ export default {
91
92
  isMicroAppEnv,
92
93
  microDispatch,
93
94
  getMicroData,
95
+ getRealKeyData,
94
96
  runLogic,
95
97
  init (params) {
96
98
  console.log('params', params)
@@ -27,7 +27,7 @@ export default {
27
27
  XReport, XAddReport
28
28
  },
29
29
  mounted () {
30
- this.$refs.main.openDrawer('medicalTestCover', -1, {})
30
+ this.$refs.main.openDialog('medicalTestCover', -1, {})
31
31
  },
32
32
  data () {
33
33
  return {
@@ -388,7 +388,7 @@
388
388
 
389
389
  <script>
390
390
  import Upload from '@vue2-client/base-client/components/common/Upload'
391
- import { formatDate } from '@vue2-client/utils/util'
391
+ import { formatDate, getRealKeyData } from '@vue2-client/utils/util'
392
392
  import { nanoid } from 'nanoid'
393
393
  import { executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
394
394
  import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
@@ -497,6 +497,7 @@ export default {
497
497
  isMicroAppEnv,
498
498
  microDispatch,
499
499
  getMicroData,
500
+ getRealKeyData,
500
501
  onComponentMounted (h, cell, cellIndex) {
501
502
  if (this.getMixinData && this.getMixinData()) {
502
503
  this.mixinData = this.getMixinData()
@@ -28,6 +28,7 @@
28
28
  <script>
29
29
  import { getConfigByName, getConfigByNameAsync, runLogic } from '@vue2-client/services/api/common'
30
30
  import { executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
31
+ import { getRealKeyData } from '@vue2-client/utils/util'
31
32
  import { getMicroData, getWindow, isMicroAppEnv, microDispatch } from '@vue2-client/utils/microAppUtils'
32
33
 
33
34
  export default {
@@ -52,6 +53,7 @@ export default {
52
53
  isMicroAppEnv,
53
54
  microDispatch,
54
55
  getMicroData,
56
+ getRealKeyData,
55
57
  getConfigByName,
56
58
  getConfigByNameAsync,
57
59
  tabPaneChange (newKey) {
@@ -70,7 +70,7 @@
70
70
  {{ button.buttonName }}
71
71
  </a-button>
72
72
 
73
- <a-button v-if="allowCardMode" @click="changeViewMode" :type="isTableMode ? '' : 'primary'">
73
+ <a-button v-if="allowedCardMode" @click="changeViewMode" :type="isTableMode ? '' : 'primary'">
74
74
  看板模式
75
75
  </a-button>
76
76
  <slot name="button" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
@@ -404,7 +404,7 @@ export default {
404
404
  // 是否进行初始化查询
405
405
  createdQuery: true,
406
406
  // 允许看板模式
407
- allowCardMode: false,
407
+ allowedCardMode: false,
408
408
  // 看板模式配置
409
409
  cardModeConfig: undefined,
410
410
  // 暂存行编辑前数据 用于比较哪些变化了才需要保存
@@ -86,8 +86,8 @@ routerResource.example = {
86
86
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
87
87
  // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
88
88
  // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
89
- component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
90
- // component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
89
+ // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
90
+ component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
91
91
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
92
92
  meta: {
93
93
  // 菜单中不显示