vue2-client 1.16.37 → 1.16.39

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.
Files changed (24) hide show
  1. package/package.json +112 -112
  2. package/src/assets/img/paymentMethod/icon1.png +0 -0
  3. package/src/assets/img/paymentMethod/icon2.png +0 -0
  4. package/src/assets/img/paymentMethod/icon3.png +0 -0
  5. package/src/assets/img/paymentMethod/icon4.png +0 -0
  6. package/src/assets/img/paymentMethod/icon5.png +0 -0
  7. package/src/assets/img/paymentMethod/icon6.png +0 -0
  8. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +364 -366
  9. package/src/base-client/components/common/HIS/HForm/HForm.vue +1 -1
  10. package/src/base-client/components/common/HIS/HFormGroup/HFormGroup.vue +120 -120
  11. package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
  12. package/src/base-client/components/common/HIS/demo.vue +61 -61
  13. package/src/base-client/components/common/XReport/XReport.vue +18 -9
  14. package/src/base-client/components/common/XReport/XReportHospitalizationDemo.vue +45 -0
  15. package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +824 -824
  16. package/src/base-client/components/common/XTable/XTable.vue +4 -0
  17. package/src/base-client/components/his/XCharge/testConfig.js +149 -0
  18. package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +61 -19
  19. package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
  20. package/src/base-client/components/his/XList/XList.vue +117 -5
  21. package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
  22. package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
  23. package/src/router/async/router.map.js +132 -129
  24. package/src/services/api/common.js +1 -0
@@ -1,15 +1,16 @@
1
1
  <template>
2
2
  <!-- 列表卡片模式 listMode: card -->
3
3
  <div
4
+ class="x-list-wrapper"
5
+ :class="wrapperClassObject"
4
6
  v-if="listMode"
5
- class="demo-infinite-container"
6
7
  ref="listRef"
7
8
  @scroll="handleInfiniteOnLoad">
8
9
  <a-list
9
10
  :grid="{ gutter: 16, xs: 1, sm: 2, md: 2, lg: 3, xl: 3, xxl: 4 }"
10
11
  :data-source="localData">
11
12
  <a-list-item slot="renderItem" slot-scope="item, index">
12
- <div class="card-a-col">
13
+ <div class="card-a-col" :class="{ 'selected-active': enableSelectRow && currentSelectedIndex === index }" @click="handleCardClick(index)">
13
14
  <a-row class="card-row">
14
15
  <a-col class="id-a-col" :span="4" v-for="(detail,idx) in item.filter(d => d.label == label)" :key="idx">
15
16
  {{ detail.value }}<span style="font-size: 16px;font-weight: 400 !important;">床</span>
@@ -59,7 +60,7 @@
59
60
  </div>
60
61
 
61
62
  <!-- 默认标签模式 -->
62
- <div class="list-wrapper" v-else>
63
+ <div class="list-wrapper x-list-wrapper" :class="wrapperClassObject" v-else>
63
64
  <a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
64
65
  <a-list-item
65
66
  slot="renderItem"
@@ -68,7 +69,7 @@
68
69
  @click="handleClick(index)"
69
70
  @mouseenter="enableHoverOptions && handleMouseEnter(index)"
70
71
  @mouseleave="handleMouseLeave"
71
- :class="{ 'hover-active': enableHoverOptions && hoveredIndex === index }">
72
+ :class="{ 'hover-active': enableHoverOptions && hoveredIndex === index, 'selected-active': enableSelectRow && currentSelectedIndex === index }">
72
73
  <i
73
74
  v-if="icon"
74
75
  class="icon-menu"
@@ -143,6 +144,16 @@ export default {
143
144
  serviceName: {
144
145
  type: String,
145
146
  default: 'af-his'
147
+ },
148
+ // 点击是否触发选中(默认不通过点击选中,仅手动控制)
149
+ selectOnClick: {
150
+ type: Boolean,
151
+ default: false
152
+ },
153
+ // 受控选中索引;不传则内部维护
154
+ selectedIndex: {
155
+ type: Number,
156
+ default: undefined
146
157
  }
147
158
  },
148
159
  inject: ['getComponentByName'],
@@ -167,7 +178,9 @@ export default {
167
178
  pageSize: 12,
168
179
  allLoaded: false,
169
180
  label: 'id',
170
- scrollTimer: null
181
+ scrollTimer: null,
182
+ // 内部选中索引(非受控时使用)
183
+ localSelectedIndex: -1
171
184
  }
172
185
  },
173
186
  created () {
@@ -175,6 +188,30 @@ export default {
175
188
  },
176
189
  mounted () {},
177
190
  computed: {
191
+ // 参考 HForm 的 wrapperClassObject 规则,支持通过组件属性动态控制样式
192
+ wrapperClassObject () {
193
+ const a = this.$attrs || {}
194
+ const classes = {}
195
+ // 多个布尔型样式开关(存在且为真则生效)
196
+ const booleanStyleKeys = [
197
+ ''
198
+ ]
199
+ booleanStyleKeys.forEach(key => {
200
+ const val = a[key]
201
+ const truthy = val === true || val === '' || val === 'true'
202
+ if (truthy) classes[`x-list-${key}`] = true
203
+ })
204
+ return classes
205
+ },
206
+ // 选择控制:受控优先
207
+ currentSelectedIndex () {
208
+ return typeof this.selectedIndex === 'number' ? this.selectedIndex : this.localSelectedIndex
209
+ },
210
+ enableSelectRow () {
211
+ const a = this.$attrs || {}
212
+ const val = a.enableSelection
213
+ return val === true || val === '' || val === 'true'
214
+ },
178
215
  forwardAllEvents () {
179
216
  return {
180
217
  // 监听所有事件并转发给父组件
@@ -239,14 +276,62 @@ export default {
239
276
  },
240
277
  // 点击列表项
241
278
  handleClick (index) {
279
+ if (this.enableSelectRow && this.selectOnClick) this.setSelectedIndex(index)
242
280
  this.$emit('listClick', this.data[index])
243
281
  },
282
+ // 卡片模式点击卡片
283
+ handleCardClick (index) {
284
+ if (this.enableSelectRow && this.selectOnClick) this.setSelectedIndex(index)
285
+ this.$emit('listClick', this.localData[index])
286
+ },
287
+ // 外部可调用:设置选中索引
288
+ setSelectedIndex (index) {
289
+ const next = typeof index === 'number' ? index : -1
290
+ if (typeof this.selectedIndex === 'number') {
291
+ // 受控:仅派发事件
292
+ this.$emit('update:selectedIndex', next)
293
+ } else {
294
+ // 非受控:更新内部并派发事件
295
+ this.localSelectedIndex = next
296
+ this.$emit('update:selectedIndex', next)
297
+ }
298
+ },
299
+ // 外部可调用:清空选中
300
+ clearSelected () { this.setSelectedIndex(-1) },
244
301
  refreshList (param) {
245
302
  this.getData(this.queryParamsName, param)
246
303
  },
247
304
  click (index, buttonIndex) {
248
305
  this.$emit('click', { data: this.data[index], name: this.buttonNames[buttonIndex] })
249
306
  },
307
+ // 根据对象字段匹配选中(默认按 id 字段)
308
+ setSelectedById (id, field = 'id') {
309
+ const list = this.listMode ? this.localData : this.data
310
+ if (!Array.isArray(list)) return
311
+ const index = list.findIndex(item => {
312
+ if (Array.isArray(item)) {
313
+ const f = item.find(d => d && d.label === field)
314
+ return f && f.value === id
315
+ }
316
+ return item && item[field] === id
317
+ })
318
+ if (index >= 0) this.setSelectedIndex(index)
319
+ },
320
+ // 根据 label/value(卡片数组数据场景)匹配选中
321
+ setSelectedByLabelValue (label, value) {
322
+ const list = this.listMode ? this.localData : this.data
323
+ if (!Array.isArray(list)) return
324
+ const index = list.findIndex(item => Array.isArray(item) && item.some(d => d && d.label === label && d.value === value))
325
+ if (index >= 0) this.setSelectedIndex(index)
326
+ },
327
+ // 通用:传入谓词函数决定选中项
328
+ setSelectedBy (predicate) {
329
+ if (typeof predicate !== 'function') return
330
+ const list = this.listMode ? this.localData : this.data
331
+ if (!Array.isArray(list)) return
332
+ const index = list.findIndex(predicate)
333
+ if (index >= 0) this.setSelectedIndex(index)
334
+ },
250
335
  getIconStyle (item) {
251
336
  return item.picture
252
337
  ? { backgroundImage: `url(${item.picture})` }
@@ -301,6 +386,13 @@ export default {
301
386
  }
302
387
  },
303
388
  watch: {
389
+ // 同步受控值变化
390
+ selectedIndex (val) {
391
+ if (typeof val === 'number') {
392
+ // 允许受控值影响内部显示
393
+ this.localSelectedIndex = val
394
+ }
395
+ },
304
396
  fixedQueryForm: {
305
397
  deep: true,
306
398
  handler (val) {
@@ -400,6 +492,26 @@ export default {
400
492
  border: 1px solid black;
401
493
  }
402
494
 
495
+ /* 选中态样式(通过 selectRow 开启) */
496
+ .selected-active { color: white; }
497
+ .list-item.selected-active {
498
+ background-color: #0057FE !important;
499
+ color: white;
500
+ border: none !important;
501
+ }
502
+ .list-item.selected-active .confirm-btn,
503
+ .list-item.selected-active .confirm-btn span,
504
+ .list-item.selected-active .ant-btn,
505
+ .list-item.selected-active .ant-btn > span { color: #ffffff !important; }
506
+ .card-a-col.selected-active {
507
+ background-color: #0057FE !important;
508
+ color: white;
509
+ border: none !important;
510
+ }
511
+ .card-a-col.selected-active .button-a-col,
512
+ .card-a-col.selected-active .button-a-col .ant-btn,
513
+ .card-a-col.selected-active .button-a-col .ant-btn > span { color: #ffffff !important; }
514
+
403
515
  .hover-options {
404
516
  position: absolute;
405
517
  left: 0;
@@ -1,113 +1,113 @@
1
- <template>
2
- <!-- 根据实际部署环境修改 editor.html 的路径 -->
3
- <iframe
4
- src="/his/editor/editor.html"
5
- width="100%"
6
- height="800"
7
- frameborder="0"
8
- @load="onIframeLoad"
9
- ref="editorIframe">
10
- </iframe>
11
- </template>
12
-
13
- <script setup>
14
-
15
- import { ref, onBeforeUnmount } from 'vue'
16
-
17
- const editorIframe = ref(null)
18
- const checkEditorTimer = ref(null)
19
- const checkCount = ref(0)
20
- const editor = ref(null)
21
- const iframeWindow = ref(null)
22
- // 对外暴露的获取editor方法
23
- const getEditor = () => {
24
- if (editor.value) {
25
- return editor.value
26
- }
27
- if (iframeWindow.value && iframeWindow.value.editor) {
28
- editor.value = iframeWindow.value.editor
29
- return editor.value
30
- }
31
- if (editorIframe.value && editorIframe.value.contentWindow && editorIframe.value.contentWindow.editor) {
32
- editor.value = editorIframe.value.contentWindow.editor
33
- return editor.value
34
- }
35
- return null
36
- }
37
- // 创建体温单方法
38
- const createVitalSigns = (data) => {
39
- const editorObj = getEditor()
40
- if (!editorObj) {
41
- throw new Error('editor对象未初始化,无法创建体温单')
42
- }
43
- if (typeof editorObj.createVitalSigns === 'function') {
44
- return editorObj.createVitalSigns(data)
45
- } else {
46
- throw new Error('editor对象未包含createVitalSigns方法')
47
- }
48
- }
49
-
50
- // 检查editor对象是否已初始化
51
- const startEditorCheck = (frameWindow, iframe) => {
52
- if (checkEditorTimer.value) {
53
- clearInterval(checkEditorTimer.value)
54
- }
55
- checkCount.value = 0
56
- checkEditorTimer.value = setInterval(() => {
57
- checkCount.value++
58
- try {
59
- const editorObj = frameWindow.editor
60
- if (editorObj && typeof editorObj.createVitalSigns === 'function') {
61
- clearInterval(checkEditorTimer.value)
62
- editor.value = editorObj
63
- // 将editor对象暴露到全局
64
- window.iframeEditor = editorObj
65
- window.iframeWindow = frameWindow
66
- // 触发事件
67
- emit('editor-ready', editorObj)
68
- emit('load', { target: iframe, editor: editorObj })
69
- // 发送消息通知
70
- window.parent.postMessage({ type: 'editorReady' }, '*')
71
- }
72
- } catch (err) {
73
- console.error('检查editor对象时出错:', err)
74
- }
75
- if (checkCount.value >= 20) {
76
- clearInterval(checkEditorTimer.value)
77
- console.error('Editor 对象加载失败')
78
- }
79
- }, 500)
80
- }
81
- // iframe加载完成的处理
82
- const onIframeLoad = (e) => {
83
- const iframe = e.target
84
- const frameWindow = iframe.contentWindow
85
- iframeWindow.value = frameWindow
86
- if (!frameWindow) {
87
- console.error('无法访问 iframe 内容')
88
- return
89
- }
90
- // 关闭文书工具栏
91
- iframe.contentWindow.editor.option.toolbar = false
92
- startEditorCheck(frameWindow, iframe)
93
- }
94
- // 组件销毁前清理
95
- onBeforeUnmount(() => {
96
- if (checkEditorTimer.value) {
97
- clearInterval(checkEditorTimer.value)
98
- }
99
- })
100
- // 暴露方法给父组件
101
- defineExpose({ getEditor, createVitalSigns })
102
-
103
- // 定义事件
104
- const emit = defineEmits(['editor-ready', 'load'])
105
- </script>
106
-
107
- <style scoped>
108
- iframe {
109
- border: none;
110
- width: 100%;
111
- min-height: 800px;
112
- }
113
- </style>
1
+ <template>
2
+ <!-- 根据实际部署环境修改 editor.html 的路径 -->
3
+ <iframe
4
+ src="/his/editor/editor.html"
5
+ width="100%"
6
+ height="800"
7
+ frameborder="0"
8
+ @load="onIframeLoad"
9
+ ref="editorIframe">
10
+ </iframe>
11
+ </template>
12
+
13
+ <script setup>
14
+
15
+ import { ref, onBeforeUnmount } from 'vue'
16
+
17
+ const editorIframe = ref(null)
18
+ const checkEditorTimer = ref(null)
19
+ const checkCount = ref(0)
20
+ const editor = ref(null)
21
+ const iframeWindow = ref(null)
22
+ // 对外暴露的获取editor方法
23
+ const getEditor = () => {
24
+ if (editor.value) {
25
+ return editor.value
26
+ }
27
+ if (iframeWindow.value && iframeWindow.value.editor) {
28
+ editor.value = iframeWindow.value.editor
29
+ return editor.value
30
+ }
31
+ if (editorIframe.value && editorIframe.value.contentWindow && editorIframe.value.contentWindow.editor) {
32
+ editor.value = editorIframe.value.contentWindow.editor
33
+ return editor.value
34
+ }
35
+ return null
36
+ }
37
+ // 创建体温单方法
38
+ const createVitalSigns = (data) => {
39
+ const editorObj = getEditor()
40
+ if (!editorObj) {
41
+ throw new Error('editor对象未初始化,无法创建体温单')
42
+ }
43
+ if (typeof editorObj.createVitalSigns === 'function') {
44
+ return editorObj.createVitalSigns(data)
45
+ } else {
46
+ throw new Error('editor对象未包含createVitalSigns方法')
47
+ }
48
+ }
49
+
50
+ // 检查editor对象是否已初始化
51
+ const startEditorCheck = (frameWindow, iframe) => {
52
+ if (checkEditorTimer.value) {
53
+ clearInterval(checkEditorTimer.value)
54
+ }
55
+ checkCount.value = 0
56
+ checkEditorTimer.value = setInterval(() => {
57
+ checkCount.value++
58
+ try {
59
+ const editorObj = frameWindow.editor
60
+ if (editorObj && typeof editorObj.createVitalSigns === 'function') {
61
+ clearInterval(checkEditorTimer.value)
62
+ editor.value = editorObj
63
+ // 将editor对象暴露到全局
64
+ window.iframeEditor = editorObj
65
+ window.iframeWindow = frameWindow
66
+ // 触发事件
67
+ emit('editor-ready', editorObj)
68
+ emit('load', { target: iframe, editor: editorObj })
69
+ // 发送消息通知
70
+ window.parent.postMessage({ type: 'editorReady' }, '*')
71
+ }
72
+ } catch (err) {
73
+ console.error('检查editor对象时出错:', err)
74
+ }
75
+ if (checkCount.value >= 20) {
76
+ clearInterval(checkEditorTimer.value)
77
+ console.error('Editor 对象加载失败')
78
+ }
79
+ }, 500)
80
+ }
81
+ // iframe加载完成的处理
82
+ const onIframeLoad = (e) => {
83
+ const iframe = e.target
84
+ const frameWindow = iframe.contentWindow
85
+ iframeWindow.value = frameWindow
86
+ if (!frameWindow) {
87
+ console.error('无法访问 iframe 内容')
88
+ return
89
+ }
90
+ // 关闭文书工具栏
91
+ iframe.contentWindow.editor.option.toolbar = false
92
+ startEditorCheck(frameWindow, iframe)
93
+ }
94
+ // 组件销毁前清理
95
+ onBeforeUnmount(() => {
96
+ if (checkEditorTimer.value) {
97
+ clearInterval(checkEditorTimer.value)
98
+ }
99
+ })
100
+ // 暴露方法给父组件
101
+ defineExpose({ getEditor, createVitalSigns })
102
+
103
+ // 定义事件
104
+ const emit = defineEmits(['editor-ready', 'load'])
105
+ </script>
106
+
107
+ <style scoped>
108
+ iframe {
109
+ border: none;
110
+ width: 100%;
111
+ min-height: 800px;
112
+ }
113
+ </style>
@@ -1,45 +1,45 @@
1
- <script>
2
- export default {
3
- name: 'ExceptionQuery',
4
- components: {
5
- XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue')
6
- },
7
- props: {
8
- currUserInfo: {
9
- type: Object,
10
- default: () => undefined
11
- }
12
- },
13
- mounted () {
14
- this.$refs.xFormTable.refresh(true)
15
- },
16
- data () {
17
- return {
18
- // 查询配置名称
19
- queryParamsName: 'ExceptionRecordQueryCRUD',
20
- fixedQueryForm: { ex_f_userfiles_id: this.currUserInfo.f_userfiles_id },
21
- // 新增表单固定值
22
- fixedAddForm: {},
23
- // 是否显示详情抽屉
24
- detailVisible: false,
25
- // 当前记录
26
- record: {}
27
- }
28
- }
29
- }
30
- </script>
31
-
32
- <template>
33
- <a-card :bordered="false">
34
- <x-form-table
35
- title="异常查询"
36
- :queryParamsName="queryParamsName"
37
- :fixedQueryForm="fixedQueryForm"
38
- ref="xFormTable">
39
- </x-form-table>
40
- </a-card>
41
- </template>
42
-
43
- <style scoped>
44
-
45
- </style>
1
+ <script>
2
+ export default {
3
+ name: 'ExceptionQuery',
4
+ components: {
5
+ XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue')
6
+ },
7
+ props: {
8
+ currUserInfo: {
9
+ type: Object,
10
+ default: () => undefined
11
+ }
12
+ },
13
+ mounted () {
14
+ this.$refs.xFormTable.refresh(true)
15
+ },
16
+ data () {
17
+ return {
18
+ // 查询配置名称
19
+ queryParamsName: 'ExceptionRecordQueryCRUD',
20
+ fixedQueryForm: { ex_f_userfiles_id: this.currUserInfo.f_userfiles_id },
21
+ // 新增表单固定值
22
+ fixedAddForm: {},
23
+ // 是否显示详情抽屉
24
+ detailVisible: false,
25
+ // 当前记录
26
+ record: {}
27
+ }
28
+ }
29
+ }
30
+ </script>
31
+
32
+ <template>
33
+ <a-card :bordered="false">
34
+ <x-form-table
35
+ title="异常查询"
36
+ :queryParamsName="queryParamsName"
37
+ :fixedQueryForm="fixedQueryForm"
38
+ ref="xFormTable">
39
+ </x-form-table>
40
+ </a-card>
41
+ </template>
42
+
43
+ <style scoped>
44
+
45
+ </style>