vue2-client 1.16.59 → 1.16.61

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 (26) hide show
  1. package/package.json +112 -112
  2. package/src/assets/svg/female.svg +1 -1
  3. package/src/assets/svg/male.svg +1 -1
  4. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +6 -17
  5. package/src/base-client/components/common/HIS/HFormGroup/HFormGroup.vue +22 -4
  6. package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
  7. package/src/base-client/components/common/HIS/HFormTable/HFormTable.vue +379 -379
  8. package/src/base-client/components/common/HIS/HTab/HTab.vue +9 -15
  9. package/src/base-client/components/common/HIS/demo.vue +61 -61
  10. package/src/base-client/components/common/XCollapse/XCollapse.vue +708 -461
  11. package/src/base-client/components/common/XFormGroup/XFormGroup.vue +11 -2
  12. package/src/base-client/components/common/XFormTable/demo.vue +46 -4
  13. package/src/base-client/components/common/XInput/XInput.vue +147 -147
  14. package/src/base-client/components/common/XReport/print.js +186 -186
  15. package/src/base-client/components/common/XTable/XTable.vue +1610 -1610
  16. package/src/base-client/components/common/XTimeline/XTimeline.vue +454 -454
  17. package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +95 -1
  18. package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
  19. package/src/base-client/components/his/XList/XList.vue +829 -829
  20. package/src/base-client/components/his/XSidebar/XSidebar.vue +22 -31
  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 +129 -129
  24. package/src/utils/map-utils.js +47 -47
  25. package/src-base-client/components/common/XCollapse/XCollapse.vue +0 -0
  26. package/vue.config.js +0 -10
@@ -127,6 +127,7 @@ export default {
127
127
  },
128
128
  // 更新card-body的padding
129
129
  updateCardBodyPadding () {
130
+ if (this.widthMode) { return }
130
131
  this.$nextTick(() => {
131
132
  const cardBody = this.$el.querySelector('.ant-card-body')
132
133
  if (cardBody) {
@@ -176,7 +177,6 @@ export default {
176
177
  updateLayout (isOpen) {
177
178
  this.$nextTick(() => {
178
179
  try {
179
- // 获取所有同级a-col(仅筛选出 .ant-col-12)
180
180
  const otherCols = this.getSiblingCols()
181
181
  if (otherCols.length > 0) {
182
182
  let currentCol = this.$el.parentNode
@@ -184,7 +184,6 @@ export default {
184
184
  currentCol = currentCol.parentNode
185
185
  }
186
186
  if (currentCol) {
187
- // 触发XTab组件重新计算宽度
188
187
  const triggerResize = () => {
189
188
  this.$nextTick(() => {
190
189
  const tabComponent = this.$el.querySelector('.ant-tabs')
@@ -196,40 +195,34 @@ export default {
196
195
  }
197
196
 
198
197
  if (isOpen) {
199
- // 展开:仅当显式允许时才改变布局;否则恢复默认宽度
200
198
  if (this.affectLayout) {
201
199
  if (this.widthMode === 'px') {
202
- // px模式:使用固定像素宽度
203
200
  const drawerWidth = this.expandedWidth || 584
204
- currentCol.style.cssText = `
205
- flex: 0 0 ${drawerWidth}px !important;
206
- max-width: ${drawerWidth}px !important;
207
- transition: all 0.3s;`
201
+ // 使用 style 对象逐个设置属性,保留其他样式
202
+ currentCol.style.flex = `0 0 ${drawerWidth}px`
203
+ currentCol.style.maxWidth = `${drawerWidth}px`
204
+ currentCol.style.transition = 'all 0.3s'
208
205
  if (otherCols.length === 1) {
209
206
  const mainCol = otherCols[0]
210
- mainCol.style.cssText = `
211
- flex: 1 1 auto !important;
212
- max-width: calc(${this.totalWidth} - ${drawerWidth}px) !important;
213
- transition: all 0.3s;`
207
+ mainCol.style.flex = '1 1 auto'
208
+ mainCol.style.maxWidth = `calc(${this.totalWidth} - ${drawerWidth}px)`
209
+ mainCol.style.transition = 'all 0.3s'
214
210
  }
215
211
  } else {
216
- // percent模式:使用百分比宽度(原有逻辑)
217
212
  const drawerWidth = (this.expandedWidthPercent || 33.3)
218
- currentCol.style.cssText = `
219
- flex: 0 0 ${drawerWidth}% !important;
220
- max-width: ${drawerWidth}% !important;
221
- transition: all 0.3s;`
213
+ currentCol.style.flex = `0 0 ${drawerWidth}%`
214
+ currentCol.style.maxWidth = `${drawerWidth}%`
215
+ currentCol.style.transition = 'all 0.3s'
222
216
  if (otherCols.length === 1) {
223
217
  const mainCol = otherCols[0]
224
218
  const mainWidth = Math.max(0, Math.min(this.totalWidth, 100) - drawerWidth)
225
- mainCol.style.cssText = `
226
- flex: 0 0 ${mainWidth}% !important;
227
- max-width: ${mainWidth}% !important;
228
- transition: all 0.3s;`
219
+ mainCol.style.flex = `0 0 ${mainWidth}%`
220
+ mainCol.style.maxWidth = `${mainWidth}%`
221
+ mainCol.style.transition = 'all 0.3s'
229
222
  }
230
223
  }
231
224
  } else {
232
- // 恢复默认(移除我们加的内联样式)
225
+ // 恢复默认:只移除我们设置的属性
233
226
  currentCol.style.removeProperty('flex')
234
227
  currentCol.style.removeProperty('max-width')
235
228
  if (otherCols.length === 1) {
@@ -240,17 +233,15 @@ export default {
240
233
  }
241
234
  triggerResize()
242
235
  } else {
243
- // 收缩:为了消除空白,始终把侧栏压到 26px,并让相邻主列占满剩余
244
- currentCol.style.cssText = `
245
- flex: 0 0 26px !important;
246
- max-width: 26px !important;
247
- transition: all 0.3s;`
236
+ // 收缩状态
237
+ currentCol.style.flex = '0 0 26px'
238
+ currentCol.style.maxWidth = '26px'
239
+ currentCol.style.transition = 'all 0.3s'
248
240
  if (otherCols.length === 1) {
249
241
  const mainCol = otherCols[0]
250
- mainCol.style.cssText = `
251
- flex: 1 1 auto !important;
252
- max-width: calc(100% - 26px) !important;
253
- transition: all 0.3s;`
242
+ mainCol.style.flex = '1 1 auto'
243
+ mainCol.style.maxWidth = 'calc(100% - 26px)'
244
+ mainCol.style.transition = 'all 0.3s'
254
245
  }
255
246
  triggerResize()
256
247
  }
@@ -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>