vue2-client 1.9.78 → 1.9.80

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.78",
3
+ "version": "1.9.80",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -40,7 +40,7 @@ export default {
40
40
  inputMessage: '', // 用户输入的内容
41
41
  additionalInfo: {},
42
42
  messages: [ // 消息列表
43
- { type: 'bot', text: 'Hello! How can I assist you today?' },
43
+ { type: 'bot', text: '你好! 今天有什么能帮到您的?' },
44
44
  ],
45
45
  }
46
46
  },
@@ -54,6 +54,7 @@ export default {
54
54
  // 配置内容
55
55
  value
56
56
  } = params
57
+ console.log('=========')
57
58
  this.renderConfig = value
58
59
  this.loading = true
59
60
  this.serviceName = serviceName
@@ -73,7 +74,7 @@ export default {
73
74
  question: userMessage,
74
75
  additionalInfo: this.additionalInfo
75
76
  }, this.serviceName)
76
- this.messages.push({ type: 'bot', text: response })
77
+ this.messages.push({ type: 'bot', text: response.value })
77
78
  },
78
79
  },
79
80
  }
@@ -615,10 +615,11 @@
615
615
  <x-form-col
616
616
  v-else-if="attr.type === 'recording' && show"
617
617
  :flex="attr.flex">
618
- <recoding
618
+ <recording
619
619
  ref="recording"
620
+ @stop="emitFunc('recording',attr)"
620
621
  >
621
- </recoding>
622
+ </recording>
622
623
  </x-form-col>
623
624
  </template>
624
625
  <script>
@@ -642,7 +643,7 @@ export default {
642
643
  name: 'XFormItem',
643
644
  components: {
644
645
  XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'),
645
- Recoding: () => import('@vue2-client/base-client/components/common/Recording/Recoding.vue'),
646
+ Recording: () => import('@vue2-client/base-client/components/common/Recording/Recording.vue'),
646
647
  XLicensePlate,
647
648
  XTreeSelect,
648
649
  XFormCol,
@@ -274,6 +274,37 @@ export default {
274
274
  this.$refs[componentName] = component
275
275
  console.log('内部注册完成', this.$refs)
276
276
  },
277
+
278
+ transformArray (data) {
279
+ const result = []
280
+ const currentRow = []
281
+ let tempGroup = [] // Temporary group for combining cells
282
+
283
+ data.forEach(row => {
284
+ row.forEach(cell => {
285
+ // Check if the current cell should be part of the temporary group
286
+ if (cell.rowSpan === 1) {
287
+ tempGroup.push(cell) // Add to temporary group
288
+ } else {
289
+ // Push the temporary group if it has accumulated cells
290
+ if (tempGroup.length > 0) {
291
+ currentRow.push(tempGroup)
292
+ tempGroup = []
293
+ }
294
+ currentRow.push(cell)
295
+ }
296
+ })
297
+ })
298
+
299
+ // Add remaining temporary group to the row
300
+ if (tempGroup.length > 0) {
301
+ currentRow.push(tempGroup)
302
+ }
303
+
304
+ result.push(currentRow)
305
+ return result
306
+ },
307
+
277
308
  // 根据名字从注册到组件中获取组件
278
309
  getComponentByName (componentName) {
279
310
  console.log('内部取组件', this.$options.name, componentName)
@@ -859,6 +890,11 @@ export default {
859
890
  this.$nextTick(() => {
860
891
  this.scanFinish = true
861
892
  })
893
+
894
+ // 对配置进行转换
895
+ console.log('转换前配置', this.config)
896
+ const newColumns = this.transformArray(this.config.columns)
897
+ console.log('转换后的列描述', newColumns)
862
898
  },
863
899
  // 初始化JSON配置
864
900
  jsonConfigInit () {
@@ -4,8 +4,8 @@
4
4
  <XReport
5
5
  ref="main"
6
6
  :use-oss-for-img="false"
7
- config-name="medicalRecordCover"
8
- server-name="af-his"
7
+ config-name="测试栅格配置"
8
+ server-name="af-system"
9
9
  :show-img-in-cell="true"
10
10
  :display-only="true"
11
11
  :edit-mode="false"
@@ -27,7 +27,7 @@ export default {
27
27
  XReport, XAddReport
28
28
  },
29
29
  mounted () {
30
- this.$refs.main.openDialog('surgerySchedCover', -1, {})
30
+ // this.$refs.main.openDialog('surgerySchedCover', -1, {})
31
31
  },
32
32
  data () {
33
33
  return {
@@ -15,7 +15,7 @@
15
15
  <!-- 插槽渲染 -->
16
16
  <template v-if="cell.type === 'slot'">
17
17
  <template
18
- v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons'].includes(cell.slotType)">
18
+ v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-conversation'].includes(cell.slotType)">
19
19
  <component
20
20
  :is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
21
21
  :key="cellIndex"
@@ -416,7 +416,8 @@ export default {
416
416
  XHisEditor: () => import('@vue2-client/base-client/components/his/XHisEditor/XHisEditor.vue'),
417
417
  XTab: () => import('@vue2-client/base-client/components/common/XTab/XTab.vue'),
418
418
  XReport: () => import('@vue2-client/base-client/components/common/XReport/XReport.vue'),
419
- XButtons: () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue')
419
+ XButtons: () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
420
+ XConversation: () => import('@vue2-client/base-client/components/common/XConversation/XConversation.vue'),
420
421
  },
421
422
  props: {
422
423
  // 每一行的配置
@@ -582,6 +583,14 @@ export default {
582
583
  const param = { ...this.mixinData }
583
584
  this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init(param)
584
585
  }
586
+ if (cell.slotType === 'x-conversation') {
587
+ getConfigByName(cell.slotConfig, cell.serviceName, (res) => {
588
+ this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
589
+ serviceName: cell.serviceName,
590
+ ...res,
591
+ })
592
+ }, this.env === 'dev')
593
+ }
585
594
  },
586
595
  getEventHandlers (cell) {
587
596
  const handlers = {}
@@ -0,0 +1,76 @@
1
+ <template>
2
+ <div id="test" v-if="showReport">
3
+ <XReport
4
+ @updateImg="updateImg"
5
+ ref="main"
6
+ :use-oss-for-img="false"
7
+ config-name="medicineMouldCover"
8
+ server-name="af-his"
9
+ :show-img-in-cell="true"
10
+ :display-only="displayOnly"
11
+ :edit-mode="false"
12
+ :show-save-button="false"
13
+ :dont-format="true"/>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import XReport from '@vue2-client/base-client/components/common/XReportGrid/XReport'
19
+ // eslint-disable-next-line no-unused-vars
20
+ import { exportHTMLNodeToPDF } from '@vue2-client/utils/htmlToPDFApi'
21
+
22
+ export default {
23
+ name: 'Example',
24
+ components: {
25
+ XReport
26
+ },
27
+ mounted () {
28
+ console.log(this.$route)
29
+ },
30
+ data () {
31
+ return {
32
+ test: {
33
+ title: {
34
+ type: 'titleKey',
35
+ value: 'f_type'
36
+ },
37
+ designMode: 'json',
38
+ },
39
+ total: 1,
40
+ registerMap: [],
41
+ displayOnly: true,
42
+ showReport: true
43
+ }
44
+ },
45
+ methods: {
46
+ updateImg (data) {
47
+ console.warn('demo', data)
48
+ },
49
+ testExport () {
50
+ this.showReport = false
51
+ this.displayOnly = true
52
+ this.$nextTick(() => {
53
+ this.showReport = true
54
+ setTimeout(() => {
55
+ exportHTMLNodeToPDF('123', '#test')
56
+ this.showReport = false
57
+ this.displayOnly = false
58
+ this.$nextTick(() => {
59
+ this.showReport = true
60
+ })
61
+ }, 500)
62
+ })
63
+ },
64
+ testSave () {
65
+ const result = []
66
+ this.registerMap.forEach(item => {
67
+ result.push(item.exportData())
68
+ })
69
+ console.warn('save', result)
70
+ }
71
+ }
72
+ }
73
+ </script>
74
+ <style scoped>
75
+
76
+ </style>
@@ -9,6 +9,7 @@ const routesConfig = [
9
9
  'dynamicStatistics',
10
10
  'newDynamicStatistics',
11
11
  'XReportGrid',
12
+ 'example',
12
13
  'settings',
13
14
  'createQuery',
14
15
  'root',
@@ -89,9 +89,9 @@ routerResource.example = {
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
- component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
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'),
96
96
  meta: {
97
97
  // 菜单中不显示