vue2-client 1.16.49 → 1.16.52

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 (46) hide show
  1. package/package.json +1 -1
  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/assets/svg/female.svg +1 -0
  9. package/src/assets/svg/male.svg +1 -0
  10. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +10 -1
  11. package/src/base-client/components/common/HIS/HForm/HForm.vue +9 -0
  12. package/src/base-client/components/common/HIS/HFormTable/HFormTable.vue +124 -2
  13. package/src/base-client/components/common/HIS/HTab/HTab.vue +120 -31
  14. package/src/base-client/components/common/XReport/XReportHospitalizationDemo.vue +45 -0
  15. package/src/base-client/components/common/XTab/XTab.vue +4 -0
  16. package/src/base-client/components/his/XCharge/testConfig.js +149 -0
  17. package/src/base-client/components/his/XList/XList.vue +237 -15
  18. package/src/base-client/components/his/XTitle/XTitle.vue +46 -2
  19. package/src/pages/WorkflowDetail/WorkFlowDemo3.vue +203 -225
  20. package/src/router/async/router.map.js +4 -1
  21. package/src/services/api/common.js +0 -2
  22. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926145434.vue +0 -641
  23. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926145453.vue +0 -641
  24. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926145610.vue +0 -647
  25. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926145629.vue +0 -647
  26. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926145901.vue +0 -645
  27. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926145907.vue +0 -651
  28. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926145920.vue +0 -651
  29. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926150047.vue +0 -651
  30. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926151820.vue +0 -646
  31. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926151827.vue +0 -646
  32. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926152115.vue +0 -646
  33. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926152212.vue +0 -653
  34. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926152215.vue +0 -653
  35. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926152337.vue +0 -657
  36. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926152341.vue +0 -657
  37. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926152826.vue +0 -657
  38. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926152828.vue +0 -646
  39. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926153121.vue +0 -654
  40. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926153242.vue +0 -654
  41. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926153318.vue +0 -646
  42. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926153415.vue +0 -646
  43. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926153435.vue +0 -655
  44. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926153606.vue +0 -655
  45. package/.history/src/base-client/components/common/XDataCard/XDataCard_20250926153653.vue +0 -655
  46. package/src/base-client/components/common/XDataCard/test.vue +0 -367
@@ -10,16 +10,38 @@
10
10
  :grid="{ gutter: 16, xs: 1, sm: 2, md: 2, lg: 3, xl: 3, xxl: 4 }"
11
11
  :data-source="localData">
12
12
  <a-list-item slot="renderItem" slot-scope="item, index">
13
- <div class="card-a-col" :class="{ 'selected-active': enableSelectRow && currentSelectedIndex === index }" @click="handleCardClick(index)">
13
+ <div class="card-a-col" :class="{ 'selected-active': enableSelectRow && currentSelectedIndex === index }" :style="getCardStyle(currentTitleValue(index))" @click="handleCardClick(index)">
14
14
  <a-row class="card-row">
15
15
  <a-col class="id-a-col" :span="4" v-for="(detail,idx) in item.filter(d => d.label == label)" :key="idx">
16
- {{ detail.value }}<span style="font-size: 16px;font-weight: 400 !important;">床</span>
16
+ {{ detail.value }}
17
+ <div class="gender-icon" v-if="getHasPatient(item) && getGender(item)">
18
+ <img :src="getGender(item) === '男' ? maleIcon : femaleIcon" :alt="getGender(item)" class="gender-img" />
19
+ </div>
17
20
  </a-col>
18
21
  <a-col :span="20" class="id-a-col-2">
19
22
  <template v-for="(detail,idx) in item">
20
- <span class="describe-list-a-col" :class="{name: detail.bold}" :key="idx" v-if="detail.type == 'title'">{{ detail.value }}</span>
21
- <span :key="idx" class="component-a-col" v-else-if="detail.type == 'component' && detail.label != label">
22
- {{ `${detail.label}:` }}
23
+ <div :key="`title_${idx}`" class="title-row" v-if="detail.type == 'title'">
24
+ <a-tooltip :title="detail.value" placement="topLeft">
25
+ <span class="describe-list-a-col" :class="{name: detail.bold}">{{ detail.value }}</span>
26
+ </a-tooltip>
27
+ <div class="title-actions" v-if="getTitleOptions && getTitleOptions.length">
28
+ <span class="title-select-label">{{ getDisplayTitleLabel(index) }}</span>
29
+ <a-dropdown placement="bottomRight" trigger="['click']">
30
+ <a class="arrow-btn" @click.prevent>
31
+ <a-icon type="down" />
32
+ </a>
33
+ <a-menu slot="overlay" :selectedKeys="[String(currentTitleValue(index))]" @click="info => handleTitleMenuClick(info, index)">
34
+ <a-menu-item v-for="opt in getTitleOptions" :key="String(opt && opt.value !== undefined ? opt.value : opt)">
35
+ {{ opt && opt.label !== undefined ? opt.label : opt }}
36
+ </a-menu-item>
37
+ </a-menu>
38
+ </a-dropdown>
39
+ </div>
40
+ </div>
41
+ <span :key="idx" class="component-a-col" v-else-if="getHasPatient(item) && detail.type == 'component' && detail.label != label">
42
+ <a-tooltip :title="detail.label" placement="topLeft">
43
+ <span class="label-text">{{ `${detail.label}:` }}</span>
44
+ </a-tooltip>
23
45
  <component
24
46
  :is="detail.slotType"
25
47
  :key="idx"
@@ -30,13 +52,18 @@
30
52
  :countVisible="false"
31
53
  />
32
54
  </span>
33
- <span :key="idx" class="component-a-col" v-else-if="detail.type == 'date'">
34
- {{ `${detail.label}:` }}
55
+ <span :key="idx" class="component-a-col" v-else-if="getHasPatient(item) && detail.type == 'date'">
56
+ <a-tooltip :title="detail.label" placement="topLeft">
57
+ <span class="label-text">{{ `${detail.label}:` }}</span>
58
+ </a-tooltip>
35
59
  <a-date-picker @change="onChange" />
36
60
  </span>
37
- <span class="describe-list-a-col" :class="{name: detail.bold}" :key="idx" v-else-if="detail.label != label">{{ `${detail.label}:${detail.value}` }}</span>
61
+ <a-tooltip :key="idx" :title="`${detail.label}:${detail.value}`" placement="topLeft" v-else-if="getHasPatient(item) && detail.label != label">
62
+ <span class="describe-list-a-col" :class="{name: detail.bold}">{{ `${detail.label}:${detail.value}` }}</span>
63
+ </a-tooltip>
38
64
  </template>
39
65
  <a-button
66
+ v-if="getHasPatient(item) && showCardButtons"
40
67
  v-for="(btn, i) in buttonNames"
41
68
  :key="i"
42
69
  icon="search"
@@ -154,9 +181,22 @@ export default {
154
181
  selectedIndex: {
155
182
  type: Number,
156
183
  default: undefined
184
+ },
185
+ // 卡片按钮显示控制(默认隐藏,可通过属性或配置开启)
186
+ showCardButtons: {
187
+ type: Boolean,
188
+ default: false
189
+ },
190
+ // 标题右侧下拉选项与受控值
191
+ titleSelectOptions: {
192
+ type: Array,
193
+ default: () => []
194
+ },
195
+ titleSelectValue: {
196
+ type: [String, Number],
197
+ default: undefined
157
198
  }
158
199
  },
159
- inject: ['getComponentByName'],
160
200
  data () {
161
201
  return {
162
202
  data: [], // 数据源
@@ -180,9 +220,18 @@ export default {
180
220
  label: 'id',
181
221
  scrollTimer: null,
182
222
  // 内部选中索引(非受控时使用)
183
- localSelectedIndex: -1
223
+ localSelectedIndex: -1,
224
+ maleIcon: require('@vue2-client/assets/svg/male.svg'),
225
+ femaleIcon: require('@vue2-client/assets/svg/female.svg'),
226
+ // 下拉配置
227
+ internalTitleOptions: [],
228
+ titleValueByIndex: {},
229
+ // 选择请求的轻量防抖
230
+ selectDebounceTimer: null
184
231
  }
185
232
  },
233
+ inject: ['getComponentByName'],
234
+
186
235
  created () {
187
236
  this.getData(this.queryParamsName, this.fixedQueryForm)
188
237
  },
@@ -203,6 +252,27 @@ export default {
203
252
  })
204
253
  return classes
205
254
  },
255
+ // 标题下拉:优先使用外部 props,否则使用内部配置
256
+ getTitleOptions () {
257
+ if (Array.isArray(this.titleSelectOptions) && this.titleSelectOptions.length) return this.titleSelectOptions
258
+ return this.internalTitleOptions
259
+ },
260
+ currentTitleValue () {
261
+ return (index) => {
262
+ if (this.titleSelectValue !== undefined) return this.titleSelectValue
263
+ const local = this.titleValueByIndex[index]
264
+ if (local !== undefined) return local
265
+ // 二次回退:若模板标题提供了 titleRightValue,则用于首屏渲染颜色与文案
266
+ const row = Array.isArray(this.localData) ? this.localData[index] : null
267
+ if (Array.isArray(row)) {
268
+ const title = row.find(d => d && d.type === 'title')
269
+ if (title && title.titleRightValue !== undefined) return title.titleRightValue
270
+ }
271
+ // 最终回退:使用 options 的第一个
272
+ const def = this.internalTitleOptions && this.internalTitleOptions.length ? (this.internalTitleOptions[0].value !== undefined ? this.internalTitleOptions[0].value : this.internalTitleOptions[0]) : undefined
273
+ return def
274
+ }
275
+ },
206
276
  // 选择控制:受控优先
207
277
  currentSelectedIndex () {
208
278
  return typeof this.selectedIndex === 'number' ? this.selectedIndex : this.localSelectedIndex
@@ -263,6 +333,15 @@ export default {
263
333
  that.label = await res.label // 标签
264
334
  that.buttonNames = await res.buttonNames || []// 按钮文本
265
335
  that.buttonMode = await res.buttonMode || false// 按钮模式
336
+ that.cardButtonsVisible = await res.cardButtonsVisible || false// 卡片按钮
337
+ // 标题下拉:从配置拿 options: [{label,value,color}]
338
+ if (Array.isArray(res.titleOptions)) {
339
+ this.internalTitleOptions = res.titleOptions
340
+ if (res.titleDefaultValue !== undefined && Array.isArray(this.localData)) {
341
+ // 初始化每个卡片的默认值
342
+ this.titleValueByIndex = {}
343
+ }
344
+ }
266
345
  this.enableHoverOptions = await res.enableHoverOptions || false// 悬浮选项框
267
346
  if (this.enableHoverOptions) {
268
347
  this.select_options = await res.select_options
@@ -270,10 +349,96 @@ export default {
270
349
  if (that.listMode) { param.condition = `Limit ${that.nowPage}, ${that.pageSize}` }
271
350
  runLogic(res.data, param, 'af-his').then(result => {
272
351
  that.data = result
273
- if (that.nowPage == 0) { this.localData = result }
352
+ if (that.nowPage === 0) { this.localData = result }
353
+ // 初始化每张卡片的 title 选中值:优先读取模板 titleRightValue,否则使用配置默认或第一项
354
+ if (Array.isArray(this.localData)) {
355
+ this.localData.forEach((row, idx) => {
356
+ if (this.titleValueByIndex[idx] !== undefined) return
357
+ if (Array.isArray(row)) {
358
+ const title = row.find(d => d && d.type === 'title')
359
+ if (title && title.titleRightValue !== undefined) {
360
+ this.$set(this.titleValueByIndex, idx, title.titleRightValue)
361
+ return
362
+ }
363
+ }
364
+ // fallback:配置默认或第一项
365
+ const def = (this.internalTitleOptions && this.internalTitleOptions.length)
366
+ ? (this.internalTitleOptions[0].value !== undefined ? this.internalTitleOptions[0].value : this.internalTitleOptions[0])
367
+ : undefined
368
+ if (def !== undefined) this.$set(this.titleValueByIndex, idx, def)
369
+ })
370
+ }
274
371
  })
275
372
  })
276
373
  },
374
+ // 提取性别:从数组数据中查找 label 含“性别”的项
375
+ getGender (item) {
376
+ if (!Array.isArray(item)) return null
377
+ const g = item.find(d => d && typeof d.label === 'string' && d.label.indexOf('性别') > -1)
378
+ const val = g && (g.value || g.text)
379
+ if (!val) return null
380
+ if (String(val).includes('男')) return '男'
381
+ if (String(val).includes('女')) return '女'
382
+ return null
383
+ },
384
+ // 读取标题项上的 hasPatient 布尔值
385
+ getHasPatient (item) {
386
+ if (!Array.isArray(item)) return true
387
+ const title = item.find(d => d && d.type === 'title')
388
+ if (!title || typeof title.hasPatient === 'undefined') return true
389
+ return !!title.hasPatient
390
+ },
391
+ // 标题右侧下拉选择
392
+ handleTitleSelectChange (val, index) {
393
+ // 重复值拦截:若值未变化则直接返回
394
+ const prev = this.normalizeValue(this.currentTitleValue(index))
395
+ const next = this.normalizeValue(val)
396
+ if (prev === next) return
397
+
398
+ this.$set(this.titleValueByIndex, index, val)
399
+ this.$emit('update:titleSelectValue', val)
400
+ this.$emit('titleSelectChange', { index, value: val })
401
+ // 变更后仅通知后端更新,不处理返回值;支持从标题项读取 extraParams 合并(如住院号)
402
+ const extra = this.getTitleExtraParams(index)
403
+ if (this.selectDebounceTimer) clearTimeout(this.selectDebounceTimer)
404
+ this.selectDebounceTimer = setTimeout(() => {
405
+ runLogic(this.logicName, Object.assign({ type: 'select', value: val }, extra), 'af-his').catch(() => {})
406
+ }, 200)
407
+ },
408
+ // 读取标题项中额外需要传递的参数(可选),例如 { inpatientNo: row.t_id }
409
+ getTitleExtraParams (index) {
410
+ const row = Array.isArray(this.localData) ? this.localData[index] : null
411
+ if (!Array.isArray(row)) return {}
412
+ const title = row.find(d => d && d.type === 'title') || {}
413
+ if (title && title.extraParams && typeof title.extraParams === 'object') return title.extraParams
414
+ return {}
415
+ },
416
+ handleTitleMenuClick ({ key }, index) {
417
+ const v = isNaN(Number(key)) ? key : Number(key)
418
+ this.handleTitleSelectChange(v, index)
419
+ },
420
+ // 根据当前选择项的 color 设置卡片背景色
421
+ normalizeValue (v) { return String(v) },
422
+ getCardStyle (val) {
423
+ const target = this.normalizeValue(val)
424
+ const opt = (this.getTitleOptions || []).find(o => this.normalizeValue(o && (o.value !== undefined ? o.value : o)) === target)
425
+ const color = opt && (opt.color || (opt.style && opt.style.background))
426
+ return color ? { backgroundColor: color } : {}
427
+ },
428
+ getTitleLabel (val) {
429
+ const target = this.normalizeValue(val)
430
+ const opt = (this.getTitleOptions || []).find(o => this.normalizeValue(o && (o.value !== undefined ? o.value : o)) === target)
431
+ return opt && (opt.label !== undefined ? opt.label : opt)
432
+ },
433
+ getDisplayTitleLabel (index) {
434
+ // 优先展示“当前选中值”的 label,未选中再回退到模板提供的 titleRightLabel
435
+ const current = this.getTitleLabel(this.currentTitleValue(index))
436
+ if (current) return current
437
+ const title = Array.isArray(this.localData && this.localData[index])
438
+ ? this.localData[index].find(d => d && d.type === 'title')
439
+ : null
440
+ return title && title.titleRightLabel ? title.titleRightLabel : ''
441
+ },
277
442
  // 点击列表项
278
443
  handleClick (index) {
279
444
  if (this.enableSelectRow && this.selectOnClick) this.setSelectedIndex(index)
@@ -576,22 +741,75 @@ export default {
576
741
  font-size: 22px;
577
742
  font-weight: 700;
578
743
  display: flex;
579
- justify-content: space-evenly;
744
+ flex-direction: column;
580
745
  align-items: center;
746
+ justify-content: center;
747
+ gap: 4px;
748
+ }
749
+ .id-a-col-2{
750
+ padding: 8px;
751
+ height: 100%;
752
+ overflow: hidden;
753
+ display: flex;
754
+ flex-direction: column;
755
+ justify-content: space-between;
581
756
  }
582
- .id-a-col-2{}
583
757
  .describe-list-a-col{
584
758
  display: block;
759
+ font-family: Source Han Sans;
585
760
  font-size: 16px;
761
+ font-weight: normal;
762
+ line-height: normal;
763
+ overflow: hidden;
764
+ text-overflow: ellipsis;
765
+ white-space: nowrap;
766
+ max-width: 100%;
586
767
  }
587
768
  .name{
588
- font-size: 18px;
589
- font-weight: 700;
769
+ font-family: Source Han Sans;
770
+ font-size: 22px;
771
+ font-weight: bold;
772
+ line-height: normal;
590
773
  }
591
774
  .component-a-col{
592
775
  display: flex;
593
776
  align-items: center;
777
+ overflow: hidden;
594
778
  }
779
+ .label-text{
780
+ overflow: hidden;
781
+ text-overflow: ellipsis;
782
+ white-space: nowrap;
783
+ max-width: 120px;
784
+ display: inline-block;
785
+ }
786
+ .gender-icon{
787
+ margin-top: 2px;
788
+ }
789
+ .gender-icon .male{ color: #2f54eb; font-size: 14px; }
790
+ .gender-icon .female{ color: #eb2f96; font-size: 14px; }
791
+ .gender-img{ width: 100%; height: 100%; opacity: 1; display: inline-block; }
792
+ .title-row{
793
+ display: flex;
794
+ align-items: center;
795
+ justify-content: space-between;
796
+ gap: 8px;
797
+ }
798
+ /* 标题文本占满剩余空间,确保箭头贴右 */
799
+ .title-row .describe-list-a-col{ flex: 1; }
800
+ .title-actions{ display: inline-flex; align-items: center; gap: 6px; }
801
+ .title-select-label{
802
+ font-family: Source Han Sans;
803
+ font-size: 16px;
804
+ font-weight: normal;
805
+ line-height: normal;
806
+ color: #595959;
807
+ }
808
+ .title-select{ min-width: 96px; }
809
+ .arrow-btn{ display: inline-flex; align-items: center; color: #8C8C8C; }
810
+ .arrow-btn .anticon{ font-size: 18px; }
811
+ /* 放大下拉箭头的 svg 尺寸以符合 UI(scoped 深度选择) */
812
+ ::v-deep .arrow-btn .anticon svg{ width: 2em; height: 2em; }
595
813
  .button-a-col{
596
814
  position: absolute;
597
815
  top: 245px;
@@ -603,5 +821,9 @@ export default {
603
821
  width: auto;
604
822
  border-radius: 6px;
605
823
  border: 1px solid #E5E9F0;
824
+ overflow: hidden;
825
+ position: relative;
826
+ box-sizing: border-box;
827
+ margin: 10px;
606
828
  }
607
829
  </style>
@@ -4,7 +4,10 @@
4
4
  v-if="config.type === 'title'"
5
5
  class="x-title"
6
6
  :class="{ 'with-underline': config.line === 'line' }">
7
- <span>{{ config.label }}</span>
7
+ <div class="title-content">
8
+ <div class="title-dot"></div>
9
+ <span>{{ config.label }}</span>
10
+ </div>
8
11
  <div
9
12
  v-if="config.line === 'line'"
10
13
  class="underline"
@@ -55,7 +58,7 @@ const attrs = useAttrs()
55
58
  const wrapperClassObject = computed(() => {
56
59
  const classes = {}
57
60
  const booleanStyleKeys = [
58
- 'center', 'littlefont'
61
+ 'center', 'littlefont', 'dot', 'nodot'
59
62
  ]
60
63
  booleanStyleKeys.forEach(key => {
61
64
  const val = attrs[key]
@@ -151,4 +154,45 @@ onMounted(() => {
151
154
  }
152
155
  }
153
156
  }
157
+
158
+ // dot 和 nodot 样式的公共部分
159
+ .x-title-dot,
160
+ .x-title-nodot {
161
+ &.x-title-container,
162
+ .x-title-container {
163
+ :deep(.title-content) {
164
+ display: flex;
165
+ align-items: center;
166
+ gap: 8px;
167
+ }
168
+
169
+ :deep(.title-dot) {
170
+ width: 14px;
171
+ height: 14px;
172
+ flex-shrink: 0;
173
+ }
174
+ }
175
+ }
176
+
177
+ // dot 样式特有部分
178
+ .x-title-dot {
179
+ &.x-title-container,
180
+ .x-title-container {
181
+ :deep(.title-dot) {
182
+ border-radius: 50%;
183
+ background-color: #3362DA;
184
+ }
185
+ }
186
+ }
187
+
188
+ // nodot 样式特有部分
189
+ .x-title-nodot {
190
+ &.x-title-container,
191
+ .x-title-container {
192
+ :deep(.title-dot) {
193
+ /* 透明圆点,保持占位但不显示 */
194
+ background-color: transparent;
195
+ }
196
+ }
197
+ }
154
198
  </style>