vue2-client 1.15.102 → 1.15.104

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 (184) hide show
  1. package/.history/public/his/editor/editor_20250606134713.html +51 -0
  2. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527173925.vue +509 -0
  3. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174316.vue +524 -0
  4. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174419.vue +524 -0
  5. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174422.vue +524 -0
  6. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172825.vue +207 -0
  7. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172945.vue +211 -0
  8. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172949.vue +212 -0
  9. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611173010.vue +212 -0
  10. package/.history/src/base-client/components/common/XForm/XFormItem_20250508134122.vue +1320 -0
  11. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171604.vue +1332 -0
  12. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171613.vue +1331 -0
  13. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171703.vue +1331 -0
  14. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171720.vue +1331 -0
  15. package/.history/src/base-client/components/common/XForm/XFormItem_20250527174327.vue +1339 -0
  16. package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612092804.vue +731 -0
  17. package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612112546.vue +748 -0
  18. package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612113808.vue +748 -0
  19. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115237.vue +1071 -0
  20. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115346.vue +1078 -0
  21. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115350.vue +1077 -0
  22. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115415.vue +1077 -0
  23. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115429.vue +1077 -0
  24. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611091619.vue +442 -0
  25. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092547.vue +442 -0
  26. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092552.vue +442 -0
  27. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092744.vue +475 -0
  28. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092955.vue +475 -0
  29. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092957.vue +475 -0
  30. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095652.vue +477 -0
  31. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095701.vue +477 -0
  32. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095704.vue +477 -0
  33. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100005.vue +473 -0
  34. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100011.vue +473 -0
  35. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100014.vue +473 -0
  36. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100833.vue +473 -0
  37. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100853.vue +473 -0
  38. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100940.vue +473 -0
  39. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101011.vue +473 -0
  40. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101013.vue +473 -0
  41. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101014.vue +473 -0
  42. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101159.vue +473 -0
  43. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101238.vue +474 -0
  44. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101240.vue +474 -0
  45. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101242.vue +474 -0
  46. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101404.vue +472 -0
  47. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101410.vue +472 -0
  48. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101459.vue +472 -0
  49. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101500.vue +472 -0
  50. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101502.vue +472 -0
  51. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101504.vue +472 -0
  52. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101610.vue +501 -0
  53. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101700.vue +501 -0
  54. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101702.vue +501 -0
  55. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101741.vue +504 -0
  56. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101749.vue +504 -0
  57. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101759.vue +504 -0
  58. package/.history/src/base-client/components/his/XHisEditor/dome_20250611091349.vue +131 -0
  59. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105854.vue +160 -0
  60. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105902.vue +160 -0
  61. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105924.vue +160 -0
  62. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105932.vue +158 -0
  63. package/.history/src/base-client/components/his/XList/XList_20250609135848.vue +173 -0
  64. package/.history/src/base-client/components/his/XList/XList_20250609141026.vue +222 -0
  65. package/.history/src/base-client/components/his/XList/XList_20250609141035.vue +229 -0
  66. package/.history/src/base-client/components/his/XList/XList_20250609141103.vue +229 -0
  67. package/.history/src/base-client/components/his/XList/XList_20250609141105.vue +229 -0
  68. package/.history/src/base-client/components/his/XList/XList_20250609141334.vue +241 -0
  69. package/.history/src/base-client/components/his/XList/XList_20250609141404.vue +241 -0
  70. package/.history/src/base-client/components/his/XList/XList_20250609141406.vue +241 -0
  71. package/.history/src/base-client/components/his/XList/XList_20250609141801.vue +245 -0
  72. package/.history/src/base-client/components/his/XList/XList_20250609142033.vue +245 -0
  73. package/.history/src/base-client/components/his/XList/XList_20250609142038.vue +245 -0
  74. package/.history/src/base-client/components/his/XList/XList_20250609142435.vue +255 -0
  75. package/.history/src/base-client/components/his/XList/XList_20250609142503.vue +255 -0
  76. package/.history/src/base-client/components/his/XList/XList_20250609142504.vue +255 -0
  77. package/.history/src/base-client/components/his/XList/XList_20250609143012.vue +270 -0
  78. package/.history/src/base-client/components/his/XList/XList_20250609143044.vue +270 -0
  79. package/.history/src/base-client/components/his/XList/XList_20250609143046.vue +270 -0
  80. package/.history/src/base-client/components/his/XList/XList_20250609143210.vue +270 -0
  81. package/.history/src/base-client/components/his/XList/XList_20250609144339.vue +294 -0
  82. package/.history/src/base-client/components/his/XList/XList_20250609144410.vue +294 -0
  83. package/.history/src/base-client/components/his/XList/XList_20250609144412.vue +294 -0
  84. package/.history/src/base-client/components/his/XList/XList_20250609144647.vue +303 -0
  85. package/.history/src/base-client/components/his/XList/XList_20250609144716.vue +303 -0
  86. package/.history/src/base-client/components/his/XList/XList_20250609144729.vue +303 -0
  87. package/.history/src/base-client/components/his/XList/XList_20250609151232.vue +288 -0
  88. package/.history/src/base-client/components/his/XList/XList_20250609151247.vue +288 -0
  89. package/.history/src/base-client/components/his/XList/XList_20250609151252.vue +288 -0
  90. package/.history/src/base-client/components/his/XList/XList_20250609161220.vue +317 -0
  91. package/.history/src/base-client/components/his/XList/XList_20250609161258.vue +306 -0
  92. package/.history/src/base-client/components/his/XList/XList_20250609161319.vue +306 -0
  93. package/.history/src/base-client/components/his/XList/XList_20250609161320.vue +306 -0
  94. package/.history/src/base-client/components/his/XList/XList_20250704142024.vue +495 -0
  95. package/.history/src/base-client/components/his/XList/XList_20250704142033.vue +495 -0
  96. package/.history/src/base-client/components/his/XList/XList_20250704142040.vue +494 -0
  97. package/.history/src/base-client/components/his/XList/XList_20250704142211.vue +494 -0
  98. package/.history/src/base-client/components/his/XList/XList_20250704142214.vue +494 -0
  99. package/.history/src/base-client/components/his/XList/XList_20250704143010.vue +495 -0
  100. package/.history/src/base-client/components/his/XList/XList_20250704143203.vue +495 -0
  101. package/.history/src/base-client/components/his/XList/XList_20250707095101.vue +492 -0
  102. package/.history/src/base-client/components/his/XList/XList_20250707100152.vue +492 -0
  103. package/.history/src/base-client/components/his/XList/XList_20250707100200.vue +485 -0
  104. package/.history/src/base-client/components/his/XList/XList_20250707100208.vue +485 -0
  105. package/.history/src/base-client/components/his/XList/XList_20250707100259.vue +488 -0
  106. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807134604.vue +263 -0
  107. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807134615.vue +302 -0
  108. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807134621.vue +301 -0
  109. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807134634.vue +311 -0
  110. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807134644.vue +330 -0
  111. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807134653.vue +330 -0
  112. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807134836.vue +330 -0
  113. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135247.vue +330 -0
  114. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135303.vue +354 -0
  115. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135316.vue +363 -0
  116. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135323.vue +363 -0
  117. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135334.vue +366 -0
  118. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135342.vue +364 -0
  119. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135349.vue +364 -0
  120. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135351.vue +346 -0
  121. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135354.vue +346 -0
  122. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135401.vue +346 -0
  123. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135406.vue +346 -0
  124. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807135424.vue +346 -0
  125. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807143043.vue +254 -0
  126. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807155506.vue +329 -0
  127. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807155535.vue +330 -0
  128. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807155543.vue +330 -0
  129. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807155926.vue +304 -0
  130. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807155928.vue +304 -0
  131. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807172548.vue +298 -0
  132. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807172609.vue +298 -0
  133. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807172623.vue +298 -0
  134. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807172631.vue +298 -0
  135. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807172701.vue +298 -0
  136. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807172704.vue +298 -0
  137. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807175937.vue +290 -0
  138. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807175942.vue +290 -0
  139. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807180210.vue +290 -0
  140. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807180424.vue +290 -0
  141. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807180448.vue +290 -0
  142. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807180915.vue +262 -0
  143. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250807180917.vue +262 -0
  144. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250808101106.vue +283 -0
  145. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250808101112.vue +289 -0
  146. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250808101118.vue +289 -0
  147. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250808101129.vue +294 -0
  148. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250808101137.vue +318 -0
  149. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250808101145.vue +320 -0
  150. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250808101154.vue +320 -0
  151. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250808101211.vue +320 -0
  152. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250808101236.vue +320 -0
  153. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250808101239.vue +320 -0
  154. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807103845.vue +142 -0
  155. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807103852.vue +142 -0
  156. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807103857.vue +142 -0
  157. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807103859.vue +142 -0
  158. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807103907.vue +142 -0
  159. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807103910.vue +142 -0
  160. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807103911.vue +142 -0
  161. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807103913.vue +142 -0
  162. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807103916.vue +142 -0
  163. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807103931.vue +142 -0
  164. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807145127.vue +85 -0
  165. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807145136.vue +81 -0
  166. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807145142.vue +81 -0
  167. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807145145.vue +81 -0
  168. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807145148.vue +81 -0
  169. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807145151.vue +81 -0
  170. package/.history/src/base-client/components/his/XShiftSchedule/dome_20250807145155.vue +81 -0
  171. package/Users/objecrt/af-vue2-client/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +213 -0
  172. package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +6 -0
  173. package/package.json +1 -1
  174. package/src/base-client/components/TreeList/TreeList.vue +91 -0
  175. package/src/base-client/components/TreeList/TreeNode.vue +81 -0
  176. package/src/base-client/components/common/XCardSet/XTiltle.vue +191 -0
  177. package/src/base-client/components/his/XHisEditor/XHisEditor.vue +51 -2
  178. package/src/base-client/components/his/XHisEditor/dome.vue +144 -0
  179. package/src/base-client/components/his/XList/XList.vue +1 -1
  180. package/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +145 -40
  181. package/src/base-client/components/his/XShiftSchedule/dome.vue +3 -3
  182. package/src/base-client/components/his/XTextCard/XTextCard.vue +207 -207
  183. package/src/base-client/components/his/threeTestOrders/editor.vue +111 -111
  184. package/src/router/async/router.map.js +1 -1
@@ -0,0 +1,270 @@
1
+ <template>
2
+ <div class="list-wrapper">
3
+ <a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
4
+ <a-list-item
5
+ slot="renderItem"
6
+ slot-scope="item, index"
7
+ class="list-item"
8
+ @click="handleClick(index)"
9
+ >
10
+ <div
11
+ class="list-item-content"
12
+ :class="{ 'hover-active': enableHoverOptions && hoveredIndex === index }"
13
+ @mouseenter="enableHoverOptions && handleMouseEnter(index)"
14
+ @mouseleave="enableHoverOptions && handleMouseLeave"
15
+ >
16
+ <i
17
+ v-if="icon"
18
+ class="icon-menu"
19
+ :style="getIconStyle(item)"
20
+ ></i>
21
+ <span
22
+ class="item-text">
23
+ {{ item.number }} {{ item.name }}
24
+ </span>
25
+
26
+ <div v-if="button" class="button-group">
27
+ <a-button
28
+ v-for="(name, idx) in buttonNames"
29
+ :key="idx"
30
+ type="link"
31
+ :class="['confirm-btn', buttonMode ? 'hover-btn' : '']"
32
+ @click.stop="click(index, idx)"
33
+ >
34
+ {{ name }}
35
+ </a-button>
36
+ </div>
37
+
38
+ <!-- 悬浮选项框 -->
39
+ <div
40
+ v-if="enableHoverOptions && hoveredIndex === index"
41
+ class="hover-options"
42
+ @mouseenter="handleOptionsEnter"
43
+ @mouseleave="handleOptionsLeave"
44
+ >
45
+ <div class="hover-options-content">
46
+ <a-button type="link" @click.stop="handleOptionClick(index, 'view')">查看</a-button>
47
+ <a-button type="link" @click.stop="handleOptionClick(index, 'edit')">编辑</a-button>
48
+ <a-button type="link" @click.stop="handleOptionClick(index, 'delete')">删除</a-button>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </a-list-item>
53
+ </a-list>
54
+ </div>
55
+ </template>
56
+
57
+ <script>
58
+
59
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
60
+
61
+ export default {
62
+ name: 'XList',
63
+ props: {
64
+ queryParamsName: {
65
+ type: Object,
66
+ default: null
67
+ },
68
+ fixedQueryForm: {
69
+ type: Object,
70
+ default: { condition: '1=1' }
71
+ },
72
+ enableHoverOptions: {
73
+ type: Boolean,
74
+ default: true
75
+ }
76
+ },
77
+ inject: ['getComponentByName'],
78
+ data () {
79
+ return {
80
+ data: [],
81
+ button: false,
82
+ icon: false,
83
+ buttonNames: [],
84
+ buttonMode: false,
85
+ hoveredIndex: -1,
86
+ isOptionsHovered: false
87
+ }
88
+ },
89
+ created () {
90
+ this.getData(this.queryParamsName, this.fixedQueryForm)
91
+ },
92
+ methods: {
93
+ async getData (config, param) {
94
+ const that = this
95
+ getConfigByName(config, 'af-his', res => {
96
+ that.button = res.button
97
+ that.icon = res.icon
98
+ that.buttonNames = res.buttonNames || []
99
+ that.buttonMode = res.buttonMode || false
100
+ runLogic(res.data, param, 'af-his').then(ress => {
101
+ that.data = ress
102
+ })
103
+ })
104
+ },
105
+ handleClick (index) {
106
+ this.$emit('listClick', this.data[index])
107
+ },
108
+ refreshList (param) {
109
+ this.getData(this.queryParamsName, param)
110
+ },
111
+ click (index, buttonIndex) {
112
+ this.$emit('click', { data: this.data[index], name: this.buttonNames[buttonIndex] })
113
+ },
114
+ getIconStyle (item) {
115
+ return item.picture
116
+ ? { backgroundImage: `url(${item.picture})` }
117
+ : {}
118
+ },
119
+ filterData (par) {
120
+ runLogic(this.queryParamsName, par, 'af-his').then(res => {
121
+ this.data = res.data
122
+ })
123
+ },
124
+ handleMouseEnter (index) {
125
+ this.hoveredIndex = index
126
+ },
127
+ handleMouseLeave () {
128
+ if (!this.isOptionsHovered) {
129
+ this.hoveredIndex = -1
130
+ }
131
+ },
132
+ handleOptionsEnter () {
133
+ this.isOptionsHovered = true
134
+ },
135
+ handleOptionsLeave () {
136
+ this.isOptionsHovered = false
137
+ this.hoveredIndex = -1
138
+ },
139
+ handleOptionClick (index, action) {
140
+ this.$emit('optionClick', { data: this.data[index], action })
141
+ }
142
+ },
143
+ watch: {
144
+ fixedQueryForm: {
145
+ deep: true,
146
+ handler (val) {
147
+ this.refreshList(val)
148
+ }
149
+ }
150
+ }
151
+ }
152
+ </script>
153
+
154
+ <style scoped>
155
+ .list-wrapper {
156
+ max-height: 240px;
157
+ overflow-y: auto;
158
+ padding-right: 2px;
159
+ }
160
+
161
+ .list-container {
162
+ width: 100%;
163
+ }
164
+
165
+ .list-item {
166
+ height: 35px;
167
+ border-radius: 6px;
168
+ background-color: #F4F4F4;
169
+ padding: 8px 15px;
170
+ font-size: 16px;
171
+ display: flex;
172
+ align-items: center;
173
+ width: 100%;
174
+ border: 1px solid #D9D9D9;
175
+ box-sizing: border-box;
176
+ margin-bottom: 8px !important;
177
+ position: relative;
178
+ }
179
+
180
+ .icon-menu {
181
+ display: inline-block;
182
+ width: 20px;
183
+ height: 20px;
184
+ background-color: #ccc;
185
+ margin-right: 8px;
186
+ }
187
+
188
+ .item-text {
189
+ flex: 1;
190
+ }
191
+
192
+ .confirm-btn {
193
+ margin-left: auto;
194
+ padding: 0 8px;
195
+ }
196
+
197
+ .confirm-btn.hover-btn {
198
+ opacity: 0;
199
+ transition: opacity 0.3s ease;
200
+ }
201
+
202
+ .button-group {
203
+ display: flex;
204
+ gap: 2px; /* 按钮之间的间距 */
205
+ }
206
+
207
+ .list-item:hover .confirm-btn.hover-btn {
208
+ opacity: 1;
209
+ }
210
+
211
+ /* 自定义滚动条样式 */
212
+ .list-wrapper::-webkit-scrollbar {
213
+ width: 6px;
214
+ }
215
+
216
+ .list-wrapper::-webkit-scrollbar-thumb {
217
+ background-color: #d9d9d9;
218
+ border-radius: 3px;
219
+ }
220
+
221
+ .list-wrapper::-webkit-scrollbar-track {
222
+ background-color: #f0f0f0;
223
+ }
224
+
225
+ .list-item-content {
226
+ position: relative;
227
+ width: 100%;
228
+ height: 100%;
229
+ display: flex;
230
+ align-items: center;
231
+ transition: background-color 0.3s ease;
232
+ }
233
+
234
+ .list-item-content.hover-active {
235
+ background-color: #e6f7ff;
236
+ }
237
+
238
+ .hover-options {
239
+ position: absolute;
240
+ left: 0;
241
+ right: 0;
242
+ top: 100%;
243
+ background: white;
244
+ border: 1px solid #d9d9d9;
245
+ border-radius: 4px;
246
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
247
+ z-index: 1000;
248
+ margin-top: 4px;
249
+ width: 100%;
250
+ box-sizing: border-box;
251
+ }
252
+
253
+ .hover-options-content {
254
+ padding: 8px;
255
+ display: flex;
256
+ flex-direction: column;
257
+ gap: 4px;
258
+ width: 100%;
259
+ }
260
+
261
+ .hover-options-content .ant-btn {
262
+ text-align: left;
263
+ padding: 4px 8px;
264
+ width: 100%;
265
+ }
266
+
267
+ .hover-options-content .ant-btn:hover {
268
+ background-color: #f5f5f5;
269
+ }
270
+ </style>
@@ -0,0 +1,294 @@
1
+ <template>
2
+ <div class="list-wrapper">
3
+ <a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
4
+ <a-list-item
5
+ slot="renderItem"
6
+ slot-scope="item, index"
7
+ class="list-item"
8
+ @click="handleClick(index)"
9
+ @mouseenter="enableHoverOptions && handleMouseEnter(index)"
10
+ @mouseleave="enableHoverOptions && handleMouseLeave"
11
+ :class="{ 'hover-active': enableHoverOptions && hoveredIndex === index }"
12
+ >
13
+ <div
14
+ class="list-item-content"
15
+ :class="{ 'hover-active': enableHoverOptions && hoveredIndex === index }"
16
+ >
17
+ <i
18
+ v-if="icon"
19
+ class="icon-menu"
20
+ :style="getIconStyle(item)"
21
+ ></i>
22
+ <span
23
+ class="item-text">
24
+ {{ item.number }} {{ item.name }}
25
+ </span>
26
+
27
+ <div v-if="button" class="button-group">
28
+ <a-button
29
+ v-for="(name, idx) in buttonNames"
30
+ :key="idx"
31
+ type="link"
32
+ :class="['confirm-btn', buttonMode ? 'hover-btn' : '']"
33
+ @click.stop="click(index, idx)"
34
+ >
35
+ {{ name }}
36
+ </a-button>
37
+ </div>
38
+
39
+ <!-- 悬浮选项框 -->
40
+ <div
41
+ v-if="enableHoverOptions && hoveredIndex === index"
42
+ class="hover-options"
43
+ @mouseenter="handleOptionsEnter"
44
+ @mouseleave="handleOptionsLeave"
45
+ >
46
+ <div class="hover-options-content">
47
+ <a-button type="link" @click.stop="handleOptionClick(index, 'view')">查看</a-button>
48
+ <a-button type="link" @click.stop="handleOptionClick(index, 'edit')">编辑</a-button>
49
+ <a-button type="link" @click.stop="handleOptionClick(index, 'delete')">删除</a-button>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ </a-list-item>
54
+ </a-list>
55
+ </div>
56
+ </template>
57
+
58
+ <script>
59
+
60
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
61
+
62
+ export default {
63
+ name: 'XList',
64
+ props: {
65
+ queryParamsName: {
66
+ type: Object,
67
+ default: null
68
+ },
69
+ fixedQueryForm: {
70
+ type: Object,
71
+ default: { condition: '1=1' }
72
+ },
73
+ enableHoverOptions: {
74
+ type: Boolean,
75
+ default: true
76
+ }
77
+ },
78
+ inject: ['getComponentByName'],
79
+ data () {
80
+ return {
81
+ data: [],
82
+ button: false,
83
+ icon: false,
84
+ buttonNames: [],
85
+ buttonMode: false,
86
+ hoveredIndex: -1,
87
+ isOptionsHovered: false,
88
+ hoverTimer: null
89
+ }
90
+ },
91
+ created () {
92
+ this.getData(this.queryParamsName, this.fixedQueryForm)
93
+ },
94
+ methods: {
95
+ async getData (config, param) {
96
+ const that = this
97
+ getConfigByName(config, 'af-his', res => {
98
+ that.button = res.button
99
+ that.icon = res.icon
100
+ that.buttonNames = res.buttonNames || []
101
+ that.buttonMode = res.buttonMode || false
102
+ runLogic(res.data, param, 'af-his').then(ress => {
103
+ that.data = ress
104
+ })
105
+ })
106
+ },
107
+ handleClick (index) {
108
+ this.$emit('listClick', this.data[index])
109
+ },
110
+ refreshList (param) {
111
+ this.getData(this.queryParamsName, param)
112
+ },
113
+ click (index, buttonIndex) {
114
+ this.$emit('click', { data: this.data[index], name: this.buttonNames[buttonIndex] })
115
+ },
116
+ getIconStyle (item) {
117
+ return item.picture
118
+ ? { backgroundImage: `url(${item.picture})` }
119
+ : {}
120
+ },
121
+ filterData (par) {
122
+ runLogic(this.queryParamsName, par, 'af-his').then(res => {
123
+ this.data = res.data
124
+ })
125
+ },
126
+ handleMouseEnter (index) {
127
+ if (this.hoverTimer) {
128
+ clearTimeout(this.hoverTimer)
129
+ }
130
+ this.hoveredIndex = index
131
+ this.isOptionsHovered = false
132
+ },
133
+ handleMouseLeave () {
134
+ this.hoverTimer = setTimeout(() => {
135
+ if (!this.isOptionsHovered) {
136
+ this.hoveredIndex = -1
137
+ }
138
+ }, 50)
139
+ },
140
+ handleOptionsEnter () {
141
+ if (this.hoverTimer) {
142
+ clearTimeout(this.hoverTimer)
143
+ }
144
+ this.isOptionsHovered = true
145
+ },
146
+ handleOptionsLeave () {
147
+ this.isOptionsHovered = false
148
+ this.hoveredIndex = -1
149
+ },
150
+ handleOptionClick (index, action) {
151
+ this.$emit('optionClick', { data: this.data[index], action })
152
+ }
153
+ },
154
+ watch: {
155
+ fixedQueryForm: {
156
+ deep: true,
157
+ handler (val) {
158
+ this.refreshList(val)
159
+ }
160
+ }
161
+ },
162
+ beforeDestroy () {
163
+ if (this.hoverTimer) {
164
+ clearTimeout(this.hoverTimer)
165
+ }
166
+ }
167
+ }
168
+ </script>
169
+
170
+ <style scoped>
171
+ .list-wrapper {
172
+ max-height: 240px;
173
+ overflow-y: auto;
174
+ padding-right: 2px;
175
+ }
176
+
177
+ .list-container {
178
+ width: 100%;
179
+ }
180
+
181
+ .list-item {
182
+ height: 35px;
183
+ border-radius: 6px;
184
+ background-color: #F4F4F4;
185
+ padding: 8px 15px;
186
+ font-size: 16px;
187
+ display: flex;
188
+ align-items: center;
189
+ width: 100%;
190
+ border: 1px solid #D9D9D9;
191
+ box-sizing: border-box;
192
+ margin-bottom: 8px !important;
193
+ position: relative;
194
+ }
195
+
196
+ .icon-menu {
197
+ display: inline-block;
198
+ width: 20px;
199
+ height: 20px;
200
+ background-color: #ccc;
201
+ margin-right: 8px;
202
+ }
203
+
204
+ .item-text {
205
+ flex: 1;
206
+ }
207
+
208
+ .confirm-btn {
209
+ margin-left: auto;
210
+ padding: 0 8px;
211
+ }
212
+
213
+ .confirm-btn.hover-btn {
214
+ opacity: 0;
215
+ transition: opacity 0.3s ease;
216
+ }
217
+
218
+ .button-group {
219
+ display: flex;
220
+ gap: 2px; /* 按钮之间的间距 */
221
+ }
222
+
223
+ .list-item:hover .confirm-btn.hover-btn {
224
+ opacity: 1;
225
+ }
226
+
227
+ /* 自定义滚动条样式 */
228
+ .list-wrapper::-webkit-scrollbar {
229
+ width: 6px;
230
+ }
231
+
232
+ .list-wrapper::-webkit-scrollbar-thumb {
233
+ background-color: #d9d9d9;
234
+ border-radius: 3px;
235
+ }
236
+
237
+ .list-wrapper::-webkit-scrollbar-track {
238
+ background-color: #f0f0f0;
239
+ }
240
+
241
+ .list-item-content {
242
+ position: relative;
243
+ width: 100%;
244
+ height: 100%;
245
+ display: flex;
246
+ align-items: center;
247
+ transition: background-color 0.3s ease;
248
+ }
249
+
250
+ .list-item-content.hover-active {
251
+ background-color: rgb(0, 87, 254) !important;
252
+ color: white;
253
+ }
254
+
255
+ .list-item.hover-active {
256
+ background-color: rgb(0, 87, 254) !important;
257
+ color: white;
258
+ border: 1px solid black;
259
+ }
260
+
261
+ .hover-options {
262
+ position: absolute;
263
+ left: 0;
264
+ right: 0;
265
+ top: 100%;
266
+ background: white;
267
+ border: 1px solid #d9d9d9;
268
+ border-radius: 4px;
269
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
270
+ z-index: 1000;
271
+ margin-top: 4px;
272
+ width: 100%;
273
+ box-sizing: border-box;
274
+ pointer-events: auto;
275
+ }
276
+
277
+ .hover-options-content {
278
+ padding: 8px;
279
+ display: flex;
280
+ flex-direction: column;
281
+ gap: 4px;
282
+ width: 100%;
283
+ }
284
+
285
+ .hover-options-content .ant-btn {
286
+ text-align: left;
287
+ padding: 4px 8px;
288
+ width: 100%;
289
+ }
290
+
291
+ .hover-options-content .ant-btn:hover {
292
+ background-color: #f5f5f5;
293
+ }
294
+ </style>