vue2-client 1.9.116 → 1.9.118

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.116",
3
+ "version": "1.9.118",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -138,7 +138,7 @@ export default {
138
138
  // 初始是否加载数据
139
139
  createdQuery: {
140
140
  type: Boolean,
141
- default: true
141
+ default: false
142
142
  }
143
143
  },
144
144
  data () {
@@ -214,11 +214,12 @@ export default {
214
214
  }
215
215
  }
216
216
 
217
+ console.log('我的初始之', this.createdQuery)
217
218
  // 数据初始化
218
219
  if (this.cardData) {
219
- if (this.createdQuery) {
220
- this.loadData()
221
- }
220
+ // if (this.createdQuery) {
221
+ // this.loadData()
222
+ // }
222
223
  } else {
223
224
  this.data = {
224
225
  one: '无数据',
@@ -9,6 +9,7 @@
9
9
  <XReportDesign
10
10
  @updateImg="updateImg"
11
11
  @selectRow="selectRow"
12
+ @slotRendered="slotRendered"
12
13
  v-if="scanFinish"
13
14
  :show-img-in-cell="showImgInCell"
14
15
  :img-prefix="imgPrefix"
@@ -55,6 +56,7 @@
55
56
  v-if="scanFinish"
56
57
  @updateImg="updateImg"
57
58
  @selectRow="selectRow"
59
+ @slotRendered="slotRendered"
58
60
  :show-img-in-cell="showImgInCell"
59
61
  :img-prefix="imgPrefix"
60
62
  :use-oss-for-img="useOssForImg"
@@ -278,6 +280,15 @@ export default {
278
280
  }
279
281
  },
280
282
  methods: {
283
+ slotRendered () {
284
+ if (this.config?.mountedFunction) {
285
+ let func = this.config.mountedFunction
286
+ if (func && func.startsWith('function')) {
287
+ func = func.replace('function', 'async function')
288
+ executeStrFunctionByContext(this, func, [])
289
+ }
290
+ }
291
+ },
281
292
  // 把组件注册到refs中,方便调用
282
293
  registerComponent (componentName, component) {
283
294
  console.log('内部注册', this.$options.name, componentName)
@@ -5,7 +5,7 @@
5
5
  ref="main"
6
6
  :use-oss-for-img="false"
7
7
  :config-name="configName"
8
- server-name="af-his"
8
+ server-name="af-system"
9
9
  :show-img-in-cell="true"
10
10
  :display-only="true"
11
11
  :edit-mode="false"
@@ -37,7 +37,8 @@ export default {
37
37
  data () {
38
38
  return {
39
39
  // configName: 'medicalRecordCover'
40
- configName: 'threeHealthCenterCover'
40
+ // configName: 'physicianOrderEntryCover'
41
+ configName: '测试栅格配置'
41
42
  // configName: 'medOrderManaActCover'
42
43
  }
43
44
  },
@@ -110,6 +110,7 @@
110
110
  <x-report-tr-group
111
111
  @updateImg="updateImg"
112
112
  @selectRow="selectRow"
113
+ @slotRendered="slotRendered"
113
114
  :show-img-in-cell="showImgInCell"
114
115
  :img-prefix="imgPrefix"
115
116
  :server-name="serverName"
@@ -370,6 +371,9 @@ export default {
370
371
  }
371
372
  },
372
373
  methods: {
374
+ slotRendered () {
375
+ this.$emit('slotRendered')
376
+ },
373
377
  updateImg (data) {
374
378
  this.$emit('updateImg', data)
375
379
  },
@@ -551,6 +551,26 @@ export default {
551
551
  default: undefined
552
552
  }
553
553
  },
554
+ computed: {
555
+ allSlotSum () {
556
+ // 计算总共有多少个Slot
557
+ let sum = 0
558
+ this.columns.forEach((item) => {
559
+ console.log('item', item)
560
+ if (Array.isArray(item)) {
561
+ item.forEach((cell) => {
562
+ if (cell.type === 'slot') {
563
+ sum++
564
+ }
565
+ })
566
+ } else if (item.type && item.type === 'slot') {
567
+ sum++
568
+ }
569
+ })
570
+ console.log(`=总共有 ${sum} 个插槽栅格`)
571
+ return sum
572
+ }
573
+ },
554
574
  data () {
555
575
  return {
556
576
  gutter: [8, { xs: 8, sm: 16, md: 24, lg: 32 }], // 设置水槽大小
@@ -562,7 +582,9 @@ export default {
562
582
  pathKey: 'cs'
563
583
  },
564
584
  mixinData: {},
565
- flexItemBodyState: {}
585
+ flexItemBodyState: {},
586
+ // 已经渲染得插槽得数量
587
+ slotRendered: 0,
566
588
  // tableConfig: {}
567
589
  }
568
590
  },
@@ -574,6 +596,10 @@ export default {
574
596
  getMicroData,
575
597
  getRealKeyData,
576
598
  onComponentMounted (h, cell, cellIndex) {
599
+ this.slotRendered += 1
600
+ if (this.slotRendered >= this.allSlotSum) {
601
+ this.$emit('slotRendered')
602
+ }
577
603
  if (this.getMixinData && this.getMixinData()) {
578
604
  this.mixinData = this.getMixinData()
579
605
  }
@@ -466,7 +466,7 @@ export default {
466
466
  // 定义主键
467
467
  primaryKey: '',
468
468
  // 是否进行初始化查询
469
- createdQuery: true,
469
+ createdQuery: false,
470
470
  // 允许看板模式
471
471
  allowedCardMode: false,
472
472
  // 看板模式配置
@@ -687,6 +687,7 @@ export default {
687
687
  cardModeConfig,
688
688
  summaryUpdate
689
689
  } = params
690
+ console.log('我的table', createdQuery)
690
691
  this.showSummary = Object.keys(tableSummaryMap).length > 0
691
692
  if (this.showSummary) {
692
693
  Object.keys(tableSummaryMap).forEach(item => {
@@ -967,7 +968,7 @@ export default {
967
968
  // 导出选中或本页数据
968
969
  handleExport (isSelected) {
969
970
  const tHeader = this.tableColumns.filter(res => res.slotType !== 'action').map(res => res.title)
970
- const filterVal = this.tableColumns.map(res => res.dataIndex)
971
+ const filterVal = this.tableColumns.filter(res => res.slotType !== 'action').map(res => res.dataIndex)
971
972
  let exportData
972
973
  if (isSelected) {
973
974
  exportData = this.selectedRows
@@ -84,12 +84,12 @@ routerResource.example = {
84
84
  path: 'default',
85
85
  name: '示例页面',
86
86
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
87
- component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
87
+ // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
88
88
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
89
89
  // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
90
90
  // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
91
91
  // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
92
- // component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
92
+ component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
93
93
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
94
94
  // component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
95
95
  // component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),