vue2-client 1.22.39 → 1.22.46

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 (39) hide show
  1. package/.env.iot +1 -0
  2. package/.idea/af-vue2-client.iml +2 -3
  3. package/.idea/inspectionProfiles/Project_Default.xml +17 -0
  4. package/1yarn.lock +11850 -0
  5. package/logs/afgit.config.log +12 -0
  6. package/logs/afgit.config.log.2026-02-27 +7 -0
  7. package/logs/afgit.config_error.log +6 -0
  8. package/logs/afgit.config_error.log.2026-02-27 +3 -0
  9. package/package.json +1 -1
  10. package/pnpm-workspace.yaml +4 -0
  11. package/public/his/editor/mock/bind_data_with_images.html +78 -0
  12. package/public/his/editor/mock/blank.html +645 -0
  13. package/src/assets/img/80359c35a5465167cb25ff87bab49035d041a65558b35-YJOr3x.png +0 -0
  14. package/src/assets/img/hisLogo.png +0 -0
  15. package/src/assets/svg/unknown-icon.svg +3 -3
  16. package/src/base-client/components/common/AfMap/InfoWindowComponent.vue +141 -141
  17. package/src/base-client/components/common/AfMap/demo.vue +492 -492
  18. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +89 -1
  19. package/src/base-client/components/common/HIS/HButtons/HButtonsSuffixDemo.vue +141 -0
  20. package/src/base-client/components/common/Upload/Upload.vue +2 -2
  21. package/src/base-client/components/common/XInspectionDetailDrawer/components/DeviceStatus.vue +1 -1
  22. package/src/base-client/components/his/XHisEditor/ImageReportDemo.vue +156 -0
  23. package/src/base-client/components/his/XHisEditor/XDocTree.vue +529 -529
  24. package/src/base-client/plugins/GetLoginInfoService.js +26 -1
  25. package/src/components/ImagePreview/ImagePreview.vue +323 -323
  26. package/src/constants/crypto.js +9 -1
  27. package/src/pages/login/Login.vue +107 -3
  28. package/src/router/async/router.map.js +6 -1
  29. package/src/services/user.js +7 -3
  30. package/src/utils/EncryptUtil.js +7 -2
  31. package/src/utils/login.js +29 -14
  32. package/src/utils/request.js +14 -3
  33. package/src/utils/util.js +27 -4
  34. package/vue.config.js +10 -0
  35. package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -7
  36. package/.idea/deployment.xml +0 -14
  37. package/.idea/encodings.xml +0 -6
  38. package/.idea/gradle.xml +0 -7
  39. package/.idea/misc.xml +0 -6
@@ -39,6 +39,7 @@ const wrapperClassObject = computed(() => {
39
39
  'fill-container',
40
40
  'no-boder-style',
41
41
  'form-inline',
42
+ 'width-auto', // 宽度自适应
42
43
  'one-button-style', // 一个按钮样式,占满整个宽度
43
44
  'useStyle10', // 左侧蓝色圆点指示器样式
44
45
  'custom-icon-style', // 自定义图标边框样式
@@ -87,6 +88,75 @@ const clearAllActiveStyles = () => {
87
88
  })
88
89
  }
89
90
 
91
+ // 按钮后缀状态
92
+ const suffixState = {}
93
+
94
+ // 同步后缀到 DOM
95
+ const applyButtonSuffixes = () => {
96
+ const buttons = getButtonElements()
97
+
98
+ buttons.forEach((btn, index) => {
99
+ const existing = btn.querySelector('.h-button-suffix')
100
+ const state = suffixState[index]
101
+
102
+ if (!state || state.text == null || state.text === '') {
103
+ if (existing) {
104
+ existing.remove()
105
+ }
106
+ return
107
+ }
108
+
109
+ if (!existing) {
110
+ const span = document.createElement('span')
111
+ span.className = 'h-button-suffix'
112
+ btn.appendChild(span)
113
+ }
114
+
115
+ const target = btn.querySelector('.h-button-suffix')
116
+ target.textContent = state.text
117
+ target.style.color = state.color || ''
118
+ })
119
+ }
120
+
121
+ // 设置指定按钮的后缀
122
+ const setButtonSuffix = (index, text, color) => {
123
+ if (text == null || text === '') {
124
+ delete suffixState[index]
125
+ } else {
126
+ suffixState[index] = { text, color }
127
+ }
128
+ applyButtonSuffixes()
129
+ }
130
+
131
+ // 批量设置按钮后缀
132
+ const setButtonSuffixes = (list) => {
133
+ if (!Array.isArray(list)) return
134
+
135
+ list.forEach((item, index) => {
136
+ if (typeof item === 'string') {
137
+ suffixState[index] = { text: item, color: '' }
138
+ } else if (item && typeof item === 'object') {
139
+ suffixState[index] = { text: item.text || '', color: item.color || '' }
140
+ }
141
+ })
142
+
143
+ applyButtonSuffixes()
144
+ }
145
+
146
+ // 清除指定按钮后缀
147
+ const clearButtonSuffix = (index) => {
148
+ delete suffixState[index]
149
+ applyButtonSuffixes()
150
+ }
151
+
152
+ // 清除所有按钮后缀
153
+ const clearAllButtonSuffixes = () => {
154
+ Object.keys(suffixState).forEach(key => {
155
+ delete suffixState[key]
156
+ })
157
+ applyButtonSuffixes()
158
+ }
159
+
90
160
  // 设置指定索引按钮为激活状态
91
161
  const setActiveButton = (index) => {
92
162
  const buttons = getButtonElements()
@@ -160,6 +230,7 @@ const initUseStyle10 = (retryCount = 0) => {
160
230
  const handleConfigEnd = async () => {
161
231
  await nextTick()
162
232
  initUseStyle10()
233
+ applyButtonSuffixes()
163
234
  emit('configEnd')
164
235
  }
165
236
 
@@ -167,6 +238,7 @@ const handleConfigEnd = async () => {
167
238
  onMounted(() => {
168
239
  setTimeout(() => {
169
240
  initUseStyle10()
241
+ applyButtonSuffixes()
170
242
  }, 300)
171
243
  })
172
244
 
@@ -186,7 +258,15 @@ defineExpose({
186
258
  getActiveButton: () => {
187
259
  const buttons = getButtonElements()
188
260
  return buttons[activeIndex.value]
189
- }
261
+ },
262
+ /** 设置指定按钮的后缀,支持动态设置颜色 */
263
+ setButtonSuffix,
264
+ /** 批量设置按钮后缀,支持字符串或对象配置 */
265
+ setButtonSuffixes,
266
+ /** 清除指定按钮后缀 */
267
+ clearButtonSuffix,
268
+ /** 清除所有按钮后缀 */
269
+ clearAllButtonSuffixes
190
270
  })
191
271
  </script>
192
272
 
@@ -231,6 +311,14 @@ defineExpose({
231
311
  height: 32px;
232
312
  }
233
313
  }
314
+ // width auto样式
315
+ &.h-buttons-width-auto {
316
+ :deep(.ant-btn-group) {
317
+ .ant-btn {
318
+ width: auto !important;
319
+ }
320
+ }
321
+ }
234
322
  // button24样式
235
323
  &.h-buttons-button24 {
236
324
  :deep(.ant-btn-group) {
@@ -0,0 +1,141 @@
1
+ <template>
2
+ <div class="h-buttons-suffix-demo">
3
+ <a-row :gutter="16">
4
+ <a-col :span="18">
5
+ <a-card title="HButtons 后缀配置演示" style="margin-bottom: 16px;">
6
+ <template #extra>
7
+ <a-space>
8
+ <a-button type="primary" @click="loadCommonButtons">
9
+ 加载通用按钮配置
10
+ </a-button>
11
+ <a-button @click="loadWorkflowButtons">
12
+ 加载流程按钮配置
13
+ </a-button>
14
+ </a-space>
15
+ </template>
16
+
17
+ <HButtons
18
+ button-style="button24"
19
+ :queryParamsName="buttonConfigName"
20
+ ref="hButtonsRef"
21
+ @configEnd="onConfigEnd"
22
+ />
23
+
24
+ <div style="margin-top: 16px;">
25
+ <a-space>
26
+ <a-button type="primary" @click="applyBasicSuffixes">
27
+ 追加基础后缀
28
+ </a-button>
29
+ <a-button @click="applyStatusSuffixes">
30
+ 追加状态后缀
31
+ </a-button>
32
+ <a-button @click="clearAllSuffixes">
33
+ 清除所有后缀
34
+ </a-button>
35
+ </a-space>
36
+ </div>
37
+ </a-card>
38
+ </a-col>
39
+
40
+ <a-col :span="6">
41
+ <a-card title="说明" style="margin-bottom: 16px;">
42
+ <p>1. 点击顶部按钮切换配置名称,按钮组通过 <code>getConfigByName</code> 渲染。</p>
43
+ <p>2. 配置渲染完成后,可通过 ref 动态设置后缀和颜色。</p>
44
+ <p>3. 下方展示当前按钮组和后缀状态。</p>
45
+ </a-card>
46
+
47
+ <a-card title="当前配置名称" style="margin-bottom: 16px;">
48
+ <a-tag color="blue">{{ buttonConfigName || '未设置' }}</a-tag>
49
+ </a-card>
50
+
51
+ <a-card title="当前后缀状态">
52
+ <pre>{{ suffixStateJson }}</pre>
53
+ </a-card>
54
+ </a-col>
55
+ </a-row>
56
+ </div>
57
+ </template>
58
+
59
+ <script setup>
60
+ import { ref, reactive } from 'vue'
61
+ import HButtons from './HButtons.vue'
62
+ import { message } from 'ant-design-vue'
63
+
64
+ const hButtonsRef = ref(null)
65
+ const buttonConfigName = ref('bloodTransfusionButtonGroup')
66
+ const suffixState = reactive({})
67
+
68
+ const suffixStateJson = ref('{}')
69
+
70
+ const updateSuffixStateJson = () => {
71
+ suffixStateJson.value = JSON.stringify(suffixState, null, 2)
72
+ }
73
+
74
+ const onConfigEnd = () => {
75
+ console.log('[HButtonsSuffixDemo] configEnd', buttonConfigName.value)
76
+ }
77
+
78
+ const loadCommonButtons = () => {
79
+ buttonConfigName.value = 'bloodTransfusionButtonGroup'
80
+ message.success('已加载通用按钮配置')
81
+ }
82
+
83
+ const loadWorkflowButtons = () => {
84
+ buttonConfigName.value = 'bloodTransfusionButtonGroup'
85
+ message.success('已加载流程按钮配置')
86
+ }
87
+
88
+ const applyBasicSuffixes = () => {
89
+ const ref = hButtonsRef.value
90
+ if (!ref) return
91
+
92
+ ref.setButtonSuffix(0, '(最新)', '#FF4D4F')
93
+ ref.setButtonSuffix(1, '(草稿)', '#FAAD14')
94
+ ref.setButtonSuffix(2, '(已作废)', '#bfbfbf')
95
+
96
+ Object.assign(suffixState, {
97
+ 0: { text: '(最新)', color: '#FF4D4F' },
98
+ 1: { text: '(草稿)', color: '#FAAD14' },
99
+ 2: { text: '(已作废)', color: '#bfbfbf' }
100
+ })
101
+ updateSuffixStateJson()
102
+ message.success('已追加基础后缀')
103
+ }
104
+
105
+ const applyStatusSuffixes = () => {
106
+ const ref = hButtonsRef.value
107
+ if (!ref) return
108
+
109
+ ref.setButtonSuffixes([
110
+ { text: '(待审核)', color: '#0057FE' },
111
+ { text: '(已驳回)', color: '#FF4D4F' },
112
+ { text: '(已完成)', color: '#34C76E' },
113
+ { text: '(已关闭)', color: '#bfbfbf' }
114
+ ])
115
+
116
+ Object.assign(suffixState, {
117
+ 0: { text: '(待审核)', color: '#0057FE' },
118
+ 1: { text: '(已驳回)', color: '#FF4D4F' },
119
+ 2: { text: '(已完成)', color: '#34C76E' },
120
+ 3: { text: '(已关闭)', color: '#bfbfbf' }
121
+ })
122
+ updateSuffixStateJson()
123
+ message.success('已追加状态后缀')
124
+ }
125
+
126
+ const clearAllSuffixes = () => {
127
+ const ref = hButtonsRef.value
128
+ if (!ref) return
129
+
130
+ ref.clearAllButtonSuffixes()
131
+ Object.keys(suffixState).forEach(key => delete suffixState[key])
132
+ updateSuffixStateJson()
133
+ message.success('已清除所有后缀')
134
+ }
135
+ </script>
136
+
137
+ <style scoped lang="less">
138
+ .h-buttons-suffix-demo {
139
+ padding: 20px;
140
+ }
141
+ </style>
@@ -239,9 +239,9 @@ export default {
239
239
  },
240
240
 
241
241
  confirmPhoto (img) {
242
- const fileName = `GaoPaiYi_${moment().format('YYYYMMDDHHmmss')}.png`
242
+ const fileName = `GaoPaiYi_${moment().format('YYYYMMDDHHmmss')}`
243
243
  const file = base64ToFile(img, fileName)
244
- file.uid = fileName
244
+ file.uid = file.name
245
245
  const info = {
246
246
  file
247
247
  }
@@ -101,7 +101,7 @@
101
101
  :ref="el => registerFig(el)"
102
102
  />
103
103
  </div>
104
- <!-- 隐患照片 -->
104
+ <!-- 隐患照片 -->
105
105
  <div class="hazard-photos-section" v-if="device.hazardPhotos && device.hazardPhotos.length > 0">
106
106
  <div class="section-title">隐患照片</div>
107
107
  <!-- 隐患照片使用FileImageGroup -->
@@ -0,0 +1,156 @@
1
+ <template>
2
+ <div class="image-report-demo">
3
+ <a-row :gutter="16">
4
+ <a-col :span="18">
5
+ <a-card title="XHisEditor 图片报告演示" style="margin-bottom: 16px;">
6
+ <template #extra>
7
+ <a-space>
8
+ <a-button type="primary" @click="loadMedicalRecord">
9
+ 加载真实病历
10
+ </a-button>
11
+ <a-button @click="refreshEditor">
12
+ 刷新编辑器
13
+ </a-button>
14
+ </a-space>
15
+ </template>
16
+
17
+ <XHisEditor
18
+ ref="hisEditorRef"
19
+ :image-report-fields="imageReportFields"
20
+ :bind-object="editorBindObject"
21
+ :save-data-logic-name="saveDataLogicName"
22
+ :logic-extra-params="logicExtraParams"
23
+ :hide-editor-toolbar="false"
24
+ service-name="af-his"
25
+ :show-mode-choose="false"
26
+ mode-type="data"
27
+ @init="onEditorInit"
28
+ @saveafter="onSaveAfter"
29
+ />
30
+ </a-card>
31
+ </a-col>
32
+
33
+ <a-col :span="6">
34
+ <a-card title="说明" style="margin-bottom: 16px;">
35
+ <p>1. 点击“加载真实病历”后会调用 <code>getFileInformation</code>。</p>
36
+ <p>2. 接口返回的 <code>bindObject</code> 若带 <code>ctImages</code>,会自动渲染。</p>
37
+ <p>3. 保存逻辑为 <code>saveMedicalRecordFile</code>。</p>
38
+ </a-card>
39
+
40
+ <a-card title="当前文书信息" style="margin-bottom: 16px;">
41
+ <pre>{{ JSON.stringify(editorInfo, null, 2) }}</pre>
42
+ </a-card>
43
+
44
+ <a-card title="当前 bindObject">
45
+ <pre>{{ JSON.stringify(editorBindObject, null, 2) }}</pre>
46
+ </a-card>
47
+ </a-col>
48
+ </a-row>
49
+ </div>
50
+ </template>
51
+
52
+ <script>
53
+ import XHisEditor from '@vue2-client/base-client/components/his/XHisEditor/XHisEditor.vue'
54
+ import { runLogic } from '@vue2-client/services/api/common'
55
+
56
+ export default {
57
+ name: 'ImageReportDemo',
58
+ components: {
59
+ XHisEditor
60
+ },
61
+ data () {
62
+ return {
63
+ editorBindObject: {},
64
+ imageReportFields: ['ctImages'],
65
+ saveDataLogicName: 'saveMedicalRecordFile',
66
+ editorInfo: {
67
+ loaded: false,
68
+ fileId: null,
69
+ templateId: 409,
70
+ registrationNumber: 1
71
+ }
72
+ }
73
+ },
74
+ computed: {
75
+ logicExtraParams () {
76
+ const user = this.$store.state.account?.user || {}
77
+ return {
78
+ description: '保存需要传递的参数',
79
+ admissionId: this.editorBindObject.id,
80
+ templateId: 409,
81
+ userInfo: user,
82
+ checkNum: this.editorInfo.registrationNumber
83
+ }
84
+ }
85
+ },
86
+ methods: {
87
+ onEditorInit (main) {
88
+ console.log('[ImageReportDemo] editor init', main)
89
+ },
90
+ onSaveAfter (dataObject) {
91
+ console.log('[ImageReportDemo] saveafter', dataObject)
92
+ },
93
+ async loadMedicalRecord () {
94
+ try {
95
+ const registrationNumber = '1'
96
+ const res = await runLogic('getFileInformation', {
97
+ RegistrationNumber: registrationNumber,
98
+ f_template_id: 409
99
+ }, 'af-his')
100
+
101
+ console.info('返回的电子病历数据:', res)
102
+
103
+ this.editorInfo = {
104
+ loaded: true,
105
+ fileId: res.id,
106
+ templateId: 409,
107
+ registrationNumber
108
+ }
109
+
110
+ const bindObject = res.bindObject || {}
111
+ this.editorBindObject = bindObject
112
+
113
+ const editorInstance = this.$refs.hisEditorRef
114
+ if (editorInstance && editorInstance.init) {
115
+
116
+ editorInstance.init({
117
+ fileUrl: res.url,
118
+ resId: res.id,
119
+ currResData: bindObject,
120
+ bindObject: bindObject,
121
+ saveDataLogicName: 'saveMedicalRecordFile',
122
+ serviceName: 'af-his',
123
+ hideToolbar: true,
124
+ treeQueryParams: { description: '查询树结构的参数' },
125
+ docQueryParams: { description: '切换文档的查询条件' },
126
+ logicExtraParams: {
127
+ description: '保存需要传递的参数',
128
+ admissionId: res.bindObject?.id,
129
+ templateId: 409,
130
+ userInfo: this.$store.state.account?.user || {},
131
+ checkNum: registrationNumber
132
+ }
133
+ })
134
+ }
135
+
136
+ this.$message.success(res.id == null ? '新建文书成功' : '加载文书完成')
137
+ } catch (error) {
138
+ console.error('加载失败:', error)
139
+ this.$message.error('加载失败: ' + (error.message || error))
140
+ }
141
+ },
142
+ refreshEditor () {
143
+ const editorInstance = this.$refs.hisEditorRef
144
+ if (editorInstance && editorInstance.refresh) {
145
+ editorInstance.refresh()
146
+ }
147
+ }
148
+ }
149
+ }
150
+ </script>
151
+
152
+ <style scoped lang="less">
153
+ .image-report-demo {
154
+ padding: 20px;
155
+ }
156
+ </style>