vue2-client 1.15.102 → 1.15.103

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 (183) 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
@@ -0,0 +1,731 @@
1
+ <template>
2
+ <a-row id="has_row" type="flex" :gutter="gutter" :style="isWidget ? {margin: '0px'} : {'margin-bottom': '.5rem'}">
3
+ <template v-for="(cell, cellIndex) in columns">
4
+ <a-col
5
+ name="trGroup"
6
+ v-if="Array.isArray(cell) || !cell.dontShowRow"
7
+ :key="cellIndex"
8
+ :ref="`trGroup_${ cell.slotRef || cellIndex}`"
9
+ @hook:mounted="(h)=>applyAllStyles(cell,cellIndex)"
10
+ :span="calculateColSpan(cell)">
11
+ <div id="report_widget" v-if="isWidget">
12
+ <!-- 插槽渲染 -->
13
+ <template v-if="Array.isArray(cell)">
14
+ <!-- 处理 cell 是数组的情况 -->
15
+ <div v-for="(item, index) in cell" :key="index">
16
+ <x-report-tr-group
17
+ :env="env"
18
+ :key="index"
19
+ :columns="recalculateItem(item)"
20
+ :config-data="configData"
21
+ :config="config"
22
+ :display="true">
23
+ </x-report-tr-group>
24
+ </div>
25
+ </template>
26
+ <template v-else-if="cell.type === 'slot'">
27
+ <template
28
+ v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse','x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar', 'x-time-select' ,'x-checkbox', 'x-title', 'x-select', 'x-tree-rows', 'x-three-test-orders', 'x-shift-schedule','x-charge','x-questionnaire'].includes(cell.slotType)">
29
+ <component
30
+ :is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
31
+ :key="cellIndex"
32
+ :ref="`dynamicComponent_${ cell.slotRef || cellIndex}`"
33
+ :serviceName="cell.serviceName"
34
+ :serverName="cell.serviceName"
35
+ v-on="getEventHandlers(cell)"
36
+ @hook:mounted="(h)=>onComponentMounted(h,cell,cellIndex)"
37
+ @beforeDataChange="beforeDataChange"
38
+ @rowClick="handleRowClick"
39
+ @onExpand="onExpand"
40
+ :queryParamsName="cell.slotConfig"
41
+ :configName="cell.slotConfig"
42
+ :countVisible="false"
43
+ :env="env"
44
+ />
45
+ </template>
46
+ </template>
47
+ </div>
48
+ <a-card v-else class="flexItem" :bordered="false">
49
+ <!-- 插槽渲染 -->
50
+ <template v-if="Array.isArray(cell)">
51
+ <!-- 处理 cell 是数组的情况 -->
52
+ <div v-for="(item, index) in cell" :key="index">
53
+ <x-report-tr-group
54
+ :server-name="serverName"
55
+ :env="env"
56
+ :key="index"
57
+ :columns="recalculateItem(item)"
58
+ :config-data="configData"
59
+ :config="config"
60
+ :display="true">
61
+ </x-report-tr-group>
62
+ </div>
63
+ </template>
64
+ <template v-else-if="cell.type === 'slot'">
65
+ <template
66
+ v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse', 'x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar', 'x-time-select','x-checkbox', 'x-title', 'x-select', 'x-tree-rows', 'x-three-test-orders', 'x-shift-schedule','x-charge','x-questionnaire'].includes(cell.slotType)">
67
+ <component
68
+ :is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
69
+ :key="cellIndex"
70
+ :ref="`dynamicComponent_${ cell.slotRef || cellIndex}`"
71
+ :serviceName="cell.serviceName"
72
+ :serverName="cell.serviceName"
73
+ v-on="getEventHandlers(cell)"
74
+ @hook:mounted="(h)=>onComponentMounted(h,cell,cellIndex)"
75
+ @beforeDataChange="beforeDataChange"
76
+ @rowClick="handleRowClick"
77
+ @onExpand="onExpand"
78
+ :queryParamsName="cell.slotConfig"
79
+ :configName="cell.slotConfig"
80
+ :countVisible="false"
81
+ :env="env"
82
+ />
83
+ </template>
84
+ </template>
85
+ </a-card>
86
+ </a-col>
87
+ </template>
88
+ </a-row>
89
+ </template>
90
+
91
+ <script>
92
+ import Upload from '@vue2-client/base-client/components/common/Upload'
93
+ import { getRealKeyData } from '@vue2-client/utils/util'
94
+ import { executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
95
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
96
+ import { getMicroData, getWindow, isMicroAppEnv, microDispatch } from '@vue2-client/utils/microAppUtils'
97
+
98
+ export default {
99
+ name: 'XReportTrGroup',
100
+ components: {
101
+ Upload,
102
+ XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'),
103
+ XAddNativeForm: () => import('@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'),
104
+ XFormGroup: () => import('@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'),
105
+ XTreePro: () => import('@vue2-client/base-client/components/common/XTree/XTreePro.vue'),
106
+ XHisEditor: () => import('@vue2-client/base-client/components/his/XHisEditor/XHisEditor.vue'),
107
+ XTab: () => import('@vue2-client/base-client/components/common/XTab/XTab.vue'),
108
+ XReport: () => import('@vue2-client/base-client/components/common/XReport/XReport.vue'),
109
+ XButtons: () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
110
+ XLabelSelect: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelect.vue'),
111
+ XConversation: () => import('@vue2-client/base-client/components/common/XConversation/XConversation.vue'),
112
+ XCheckList: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
113
+ XCardSet: () => import('@vue2-client/base-client/components/common/XCardSet/XCardSet.vue'),
114
+ XCollapse: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
115
+ XHDescriptions: () => import('@vue2-client/base-client/components/his/XHDescriptions/XHDescriptions.vue'),
116
+ XSidebar: () => import('@vue2-client/base-client/components/his/XSidebar/XSidebar.vue'),
117
+ XList: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
118
+ XInput: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
119
+ XTimeLine: () => import('@vue2-client/base-client/components/common/XTimeline/XTimeline.vue'),
120
+ XRadio: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
121
+ XCalendar: () => import('@vue2-client/base-client/components/common/XCalendar/XCalendar.vue'),
122
+ XTimeSelect: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelect.vue'),
123
+ XCheckbox: () => import('@vue2-client/base-client/components/his/XCheckbox/XCheckbox.vue'),
124
+ XTitle: () => import('@vue2-client/base-client/components/his/XTitle/XTitle.vue'),
125
+ XSelect: () => import('@vue2-client/base-client/components/his/XSelect/XSelect.vue'),
126
+ XTreeRows: () => import('@vue2-client/base-client/components/his/XTreeRows/XTreeRows.vue'),
127
+ XThreeTestOrders: () => import('@vue2-client/base-client/components/his/threeTestOrders/threeTestOrders.vue'),
128
+ XShiftSchedule: () => import('@vue2-client/base-client/components/his/XShiftSchedule/XShiftSchedule.vue'),
129
+ XCharge: () => import('@vue2-client/base-client/components/his/XCharge/XCharge.vue'),
130
+ XQuestionnaire: () => import('@vue2-client/base-client/components/his/XQuestionnaire/XQuestionnaire.vue')
131
+ },
132
+ props: {
133
+ // 每一行的配置
134
+ columns: {
135
+ type: Array,
136
+ required: true
137
+ },
138
+ showImgInCell: {
139
+ type: Boolean,
140
+ default: false
141
+ },
142
+ config: {
143
+ type: Object,
144
+ default: function () {
145
+ return {}
146
+ }
147
+ },
148
+ // 命名空间
149
+ serverName: {
150
+ type: String,
151
+ default: 'af-system'
152
+ },
153
+ // 环境
154
+ env: {
155
+ type: String,
156
+ default: 'prod'
157
+ },
158
+ // 原始配置
159
+ configData: {
160
+ type: Object,
161
+ required: true
162
+ },
163
+ // 是否为展示行
164
+ display: {
165
+ type: Boolean,
166
+ default: false
167
+ },
168
+ },
169
+ computed: {
170
+ allSlotSum () {
171
+ // 计算总共有多少个Slot
172
+ let sum = 0
173
+ this.columns.forEach((item) => {
174
+ console.log('item', item)
175
+ if (Array.isArray(item)) {
176
+ item.forEach((cell) => {
177
+ if (cell.type === 'slot') {
178
+ sum++
179
+ }
180
+ })
181
+ } else if (item.type && item.type === 'slot') {
182
+ sum++
183
+ }
184
+ })
185
+ console.log(`=总共有 ${sum} 个插槽栅格`)
186
+ return sum
187
+ }
188
+ },
189
+ data () {
190
+ return {
191
+ gutter: [8, { xs: 8, sm: 16, md: 24, lg: 32 }], // 设置水槽大小
192
+ maxColSpan: 12,
193
+ uploadParams: {
194
+ type: 'image',
195
+ accept: ['*'],
196
+ resUploadStock: 1,
197
+ pathKey: 'cs'
198
+ },
199
+ mixinData: {},
200
+ flexItemBodyState: {},
201
+ // 已经渲染得插槽得数量
202
+ slotRendered: 0,
203
+ // tableConfig: {}
204
+ }
205
+ },
206
+ watch: {
207
+ columns: {
208
+ deep: true,
209
+ immediate: true,
210
+ handler (newVal) {
211
+ console.log('columns变化:', JSON.parse(JSON.stringify(newVal)))
212
+ // 使用nextTick确保DOM更新
213
+ this.$nextTick(() => {
214
+ this.$forceUpdate()
215
+ })
216
+ }
217
+ }
218
+ },
219
+ inject: ['openDialog', 'emitEvent', 'registerComponent', 'setColSpanByName', 'setGlobalData', 'getGlobalData', 'getComponentByName', 'runLogic', 'getMixinData', 'getSelectedId', 'isInAModal', 'getConfigByName', 'getSelectedData', 'getOutEnv', 'currUser', 'isWidget', 'findComponentByName', 'closeAddReport'],
220
+ methods: {
221
+ getWindow,
222
+ isMicroAppEnv,
223
+ microDispatch,
224
+ getMicroData,
225
+ getRealKeyData,
226
+ handleRowClick (record) {
227
+ this.$emit('rowClick', record)
228
+ },
229
+ beforeDataChange (record) {
230
+ this.$emit('beforeDataChange', record)
231
+ },
232
+ onExpand (expanded, record) {
233
+ this.$emit('expand', expanded, record)
234
+ },
235
+ listClick (data) {
236
+ this.$emit('listClick', data)
237
+ },
238
+ calculateColSpan (cell) {
239
+ return Array.isArray(cell)
240
+ ? cell[0][0]?.colSpan * 2
241
+ : (cell?.colSpan ?? cell?.def?.colSpan ?? 1) * 2
242
+ },
243
+ applyAllStyles (cell, cellIndex) {
244
+ // 应用组件样式
245
+ const component = this.$refs[`trGroup_${ cell.slotRef || cellIndex}`][0]
246
+ // 确保组件已经完全挂载
247
+ this.$nextTick(() => {
248
+ this.applyComponentStyles(component, cell, cellIndex)
249
+ })
250
+ },
251
+ onComponentMounted (h, cell, cellIndex) {
252
+ this.slotRendered += 1
253
+ if (this.slotRendered >= this.allSlotSum) {
254
+ this.$emit('slotRendered')
255
+ }
256
+ if (this.getMixinData && this.getMixinData()) {
257
+ this.mixinData = this.getMixinData()
258
+ }
259
+ if (cell.slotRef) {
260
+ this.registerComponent(cell.slotRef, this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0])
261
+ }
262
+ // 传递给祖先组件
263
+ console.log(`插槽组件已经初始化 slotType ${cell.slotType},ref= dynamicComponent_${cell.slotRef || cellIndex} , serviceName = ${cell.serviceName}`)
264
+ const shouldInit = cell.shouldInit == null ? true : cell.shouldInit
265
+ if (shouldInit) {
266
+ if (cell.slotType === 'x-add-native-form') {
267
+ // 简易表单需要主动调用初始化方法
268
+ getConfigByName(cell.slotConfig, cell.serviceName, async (res) => {
269
+ // 如果配置了 表单初始化logic
270
+ // 调用 logic 获取参数
271
+ let param = { ...this.mixinData }
272
+ let selectedId
273
+ if (res.paramLogicName) {
274
+ if (!!this.getSelectedId) {
275
+ selectedId = this.getSelectedId()
276
+ if (typeof selectedId !== 'object') {
277
+ selectedId = { selectedId: selectedId }
278
+ }
279
+ }
280
+ param = Object.assign(param, await runLogic(res.paramLogicName, selectedId, cell.serviceName))
281
+ }
282
+ console.info('给表单赋值', res)
283
+ this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
284
+ serviceName: cell.serviceName,
285
+ configName: cell.slotConfig,
286
+ formItems: res.formJson,
287
+ showSubmitBtn: !this.isInAModal,
288
+ businessType: param.businessType || '新增',
289
+ layout: res.xAddFormLayout,
290
+ primaryKey: res.primaryKey,
291
+ ...res,
292
+ fixedAddForm: param,
293
+ modifyModelData: {
294
+ files: param.files,
295
+ images: param.images
296
+ }
297
+ })
298
+ }, this.env === 'dev')
299
+ } else if (cell.slotType === 'x-form-group') {
300
+ // 简易表单需要主动调用初始化方法
301
+ getConfigByName(cell.slotConfig, cell.serviceName, (res) => {
302
+ // 如果配置了 表单初始化logic
303
+ // 调用 logic 获取参数
304
+ const param = { ...this.mixinData }
305
+ this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
306
+ ...res,
307
+ serviceName: cell.serviceName,
308
+ showSubmitBtn: !this.isInAModal,
309
+ businessType: param.businessType || '新增',
310
+ modifyModelData: param,
311
+ showLeftTab: true,
312
+ })
313
+ }, this.env === 'dev')
314
+ } else if (cell.slotType === 'x-buttons') {
315
+ // 按钮组需要主动调用初始化方法
316
+ getConfigByName(cell.slotConfig, cell.serviceName, (res) => {
317
+ this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
318
+ ...res,
319
+ serviceName: cell.serviceName,
320
+ })
321
+ }, this.env === 'dev')
322
+ } else if (cell.slotType === 'x-label-select') {
323
+ // 按钮组需要主动调用初始化方法
324
+ getConfigByName(cell.slotConfig, cell.serviceName, (res) => {
325
+ this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
326
+ ...res,
327
+ serviceName: cell.serviceName,
328
+ })
329
+ }, this.env === 'dev')
330
+ }
331
+ }
332
+ if (cell.slotType === 'x-report') {
333
+ const param = { ...this.mixinData }
334
+ this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init(param)
335
+ }
336
+ if (cell.slotType === 'x-conversation') {
337
+ getConfigByName(cell.slotConfig, cell.serviceName, (res) => {
338
+ this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
339
+ serviceName: cell.serviceName,
340
+ ...res,
341
+ })
342
+ }, this.env === 'dev')
343
+ }
344
+ if (cell.slotType === 'x-check-list') {
345
+ getConfigByName(cell.slotConfig, cell.serviceName, (res) => {
346
+ this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
347
+ serviceName: cell.serviceName,
348
+ ...res,
349
+ })
350
+ }, this.env === 'dev')
351
+ }
352
+ },
353
+ recalculateItem (item) {
354
+ const totalColSpan = item.reduce((sum, cell) => {
355
+ // 保留手动设置的colSpan
356
+ return sum + (cell._isManualColSpan ? 0 : (cell.colSpan || 1))
357
+ }, 0)
358
+ return item.map(cell => {
359
+ // 跳过已手动设置的单元格
360
+ if (cell._isManualColSpan) return cell
361
+ const newColSpan = Math.round((cell.colSpan || 1) / totalColSpan * 12)
362
+ return {
363
+ ...cell,
364
+ colSpan: newColSpan,
365
+ // 标记自动计算的单元格
366
+ _isAutoCalculated: true
367
+ }
368
+ })
369
+ },
370
+
371
+ getEventHandlers (cell) {
372
+ const handlers = {}
373
+ if (!cell?.events || cell?.events?.length === 0) {
374
+ return handlers
375
+ }
376
+ cell.events.forEach(event => {
377
+ handlers[event.type] = async (...args) => {
378
+ console.info('Event handled:', event.type, args)
379
+ let func = event.customFunction
380
+ if (func && func.startsWith('function')) {
381
+ func = func.replace('function', 'async function')
382
+ }
383
+ const result = await executeStrFunctionByContext(this, func, args)
384
+ if (result instanceof Promise) {
385
+ result.then((res) => {
386
+ if (!res) return
387
+ let messageType = 'success'
388
+ // 如果传递了组件名字 自动调用刷新
389
+ if (res?.name) {
390
+ const waitRefreshRef = this.getComponentByName(res.name)
391
+ if (waitRefreshRef) {
392
+ waitRefreshRef.refresh()
393
+ } else {
394
+ console.warn(`未找到组件${res.name}无法刷新`)
395
+ }
396
+ }
397
+ // 如果传递消息类型 自动调用消息
398
+ if (res?.messageType) {
399
+ messageType = res.messageType
400
+ }
401
+ // 如果传递了提示信息自动调用提示
402
+ if (res?.message) {
403
+ this.$message[messageType](res?.message)
404
+ }
405
+ })
406
+ }
407
+ }
408
+ })
409
+ return handlers
410
+ },
411
+ getComponentName (queryParamsName, serviceName, componentName) {
412
+ return componentName
413
+ },
414
+ // 判断单元格样式
415
+ determineCellStyle (cell, color = '#000', borderWidth = '1px') {
416
+ // 如果声明了borderColor
417
+ if (this.config.style.borderColor) {
418
+ color = this.config.style.borderColor
419
+ }
420
+ let result = {}
421
+ // 如果表格也声明了样式,用表格样式将样式覆盖
422
+ if (cell.style) {
423
+ if (cell.noBorder) {
424
+ result = { ...cell.style }
425
+ } else {
426
+ if (this.noTopBorder) {
427
+ result = { ...cell.style }
428
+ } else {
429
+ result = { ...cell.style }
430
+ }
431
+ }
432
+ return result
433
+ }
434
+ return result
435
+ },
436
+ // 把用户定义的组件,传递到整个杉格中,方便调用
437
+ passComponentNamesToAncestor (refs) {
438
+ console.log('组件的keys', Object.entries(refs), refs)
439
+ // 遍历所有 refs
440
+ Object.entries(refs).forEach(([refKey, refValue]) => {
441
+ // 检查 ref 是否以 dynamicComponent_ 开头
442
+ if (refKey.startsWith('dynamicComponent_')) {
443
+ console.log('组件名存在')
444
+ const componentRef = refValue[0]
445
+ if (componentRef) {
446
+ // 去掉前缀并获取组件名字
447
+ const index = refKey.replace('dynamicComponent_', '') // 去掉前缀
448
+ console.log('注册组件', index)
449
+ // 传递给祖先组件
450
+ this.registerComponent(index, componentRef)
451
+ }
452
+ }
453
+ })
454
+ },
455
+ // 获取组件样式配置
456
+ async getComponentStyleConfig (componentType) {
457
+ try {
458
+ // 从配置中获取样式定义
459
+ const styleConfig = this.$appdata.getStylesByKey(componentType)
460
+ return styleConfig || {}
461
+ } catch (error) {
462
+ console.error('获取组件样式配置失败:', error)
463
+ return {}
464
+ }
465
+ },
466
+
467
+ // 解析组件样式配置
468
+ async parseComponentStyles (cell) {
469
+ if (!cell.class) return { rootStyles: {}, childStyles: {} }
470
+
471
+ const styleConfig = await this.getComponentStyleConfig(cell.slotType)
472
+ if (!styleConfig) return { rootStyles: {}, childStyles: {} }
473
+
474
+ const rootStyles = {}
475
+ const childStyles = new Map()
476
+
477
+ // 处理每个class配置
478
+ cell.class.split(' ').forEach(className => {
479
+ const classConfig = styleConfig[className]
480
+ if (!classConfig) return
481
+
482
+ // 处理根节点样式
483
+ Object.entries(classConfig).forEach(([key, value]) => {
484
+ if (!key.startsWith('*') && typeof key !== 'object') {
485
+ rootStyles[key] = value
486
+ }
487
+ })
488
+
489
+ // 处理子节点样式
490
+ this.parseNestedStyles(classConfig, childStyles)
491
+ })
492
+
493
+ console.warn('样式配置', rootStyles, childStyles)
494
+ return {
495
+ rootStyles,
496
+ childStyles
497
+ }
498
+ },
499
+
500
+ // 递归解析嵌套的样式配置
501
+ parseNestedStyles (config, styleMap, parentKey = '') {
502
+ Object.entries(config).forEach(([key, value]) => {
503
+ if (!key.startsWith('*')) return
504
+
505
+ const className = key.replace('*', '.')
506
+
507
+ // 如果值是对象,检查是否包含样式和子节点
508
+ if (typeof value === 'object') {
509
+ const { style = {}, children = {} } = this.separateStyleAndChildren(value)
510
+
511
+ // 创建或获取当前节点的样式配置
512
+ if (!styleMap.has(className)) {
513
+ styleMap.set(className, {
514
+ styles: {},
515
+ children: new Map()
516
+ })
517
+ }
518
+
519
+ const nodeData = styleMap.get(className)
520
+
521
+ // 合并样式
522
+ Object.assign(nodeData.styles, style)
523
+
524
+ // 递归处理子节点
525
+ this.parseNestedStyles(children, nodeData.children, className)
526
+ }
527
+ })
528
+ },
529
+
530
+ // 分离样式属性和子节点配置
531
+ separateStyleAndChildren (obj) {
532
+ const style = {}
533
+ const children = {}
534
+
535
+ Object.entries(obj).forEach(([key, value]) => {
536
+ if (key.startsWith('*')) {
537
+ // 子节点配置
538
+ children[key] = value
539
+ } else {
540
+ // 样式属性
541
+ style[key] = value
542
+ }
543
+ })
544
+
545
+ return { style, children }
546
+ },
547
+
548
+ // 应用组件样式
549
+ async applyComponentStyles (component, cell, cellIndex) {
550
+ if (!component || !component.$el) return
551
+
552
+ const { rootStyles, childStyles } = await this.parseComponentStyles(cell)
553
+
554
+ // 应用根节点样式
555
+ if (Object.keys(rootStyles).length > 0) {
556
+ Object.entries(rootStyles).forEach(([property, value]) => {
557
+ component.$el.style.setProperty(property, value, 'important')
558
+ })
559
+ }
560
+
561
+ // 如果没有子节点样式,直接返回
562
+ if (childStyles.size === 0) return
563
+
564
+ let retryCount = 0
565
+ const maxRetries = 5
566
+ const retryInterval = 100 // 100ms
567
+
568
+ const applyStyles = () => {
569
+ this.applyChildStylesOptimized(component.$el, childStyles)
570
+ }
571
+
572
+ // 首次应用样式
573
+ applyStyles()
574
+
575
+ // 创建重试机制
576
+ const retryApplyStyles = () => {
577
+ if (retryCount >= maxRetries) return
578
+
579
+ setTimeout(() => {
580
+ applyStyles()
581
+ retryCount++
582
+ retryApplyStyles()
583
+ }, retryInterval)
584
+ }
585
+
586
+ // 开始重试
587
+ retryApplyStyles()
588
+
589
+ // 创建 MutationObserver 用于动态内容
590
+ const observer = new MutationObserver((mutations) => {
591
+ // 检查是否有新增节点
592
+ const hasNewNodes = mutations.some(mutation =>
593
+ mutation.type === 'childList' && mutation.addedNodes.length > 0
594
+ )
595
+
596
+ if (hasNewNodes) {
597
+ applyStyles()
598
+ }
599
+ })
600
+
601
+ // 配置 observer
602
+ observer.observe(component.$el, {
603
+ childList: true,
604
+ subtree: true,
605
+ attributes: false
606
+ })
607
+
608
+ // 3秒后停止观察
609
+ // setTimeout(() => {
610
+ // observer.disconnect()
611
+ // }, 3000)
612
+
613
+ // 组件销毁时清理
614
+ this.$once('hook:beforeDestroy', () => {
615
+ observer.disconnect()
616
+ })
617
+ },
618
+
619
+ // 优化后的子节点样式应用方法
620
+ applyChildStylesOptimized (rootElement, styleMap, parentSelector = '') {
621
+ if (!rootElement) return
622
+
623
+ // 处理样式映射
624
+ for (const [selector, data] of styleMap.entries()) {
625
+ const currentSelector = parentSelector ? `${parentSelector} ${selector}` : selector
626
+
627
+ try {
628
+ // 查找匹配的元素
629
+ const elements = Array.from(rootElement.querySelectorAll(currentSelector))
630
+
631
+ if (!elements.length) continue
632
+
633
+ // 应用当前层级样式
634
+ if (data.styles) {
635
+ elements.forEach(element => {
636
+ if (!element) return
637
+
638
+ // 应用每个样式属性
639
+ Object.entries(data.styles).forEach(([property, value]) => {
640
+ try {
641
+ element.style.setProperty(property, value, 'important')
642
+ } catch (err) {
643
+ console.warn(`设置样式失败: ${property}=${value}`, err)
644
+ }
645
+ })
646
+ })
647
+ }
648
+
649
+ // 处理子层级
650
+ if (data.children && data.children.size > 0) {
651
+ elements.forEach(element => {
652
+ if (element) {
653
+ this.applyChildStylesOptimized(element, data.children, currentSelector)
654
+ }
655
+ })
656
+ }
657
+ } catch (err) {
658
+ console.warn(`处理选择器失败: ${currentSelector}`, err)
659
+ continue
660
+ }
661
+ }
662
+ }
663
+ },
664
+ beforeMount () {
665
+ if (this.useOssForImg) {
666
+ this.uploadParams.resUploadMode = 'oss'
667
+ }
668
+ },
669
+ mounted () {
670
+ },
671
+ }
672
+
673
+ </script>
674
+
675
+ <style scoped lang="less">
676
+ .inputsDiv {
677
+ display: flex;
678
+ justify-content: space-between;
679
+
680
+ .inputsDivItem {
681
+ display: flex;
682
+ align-items: center;
683
+ padding: 0 4px;
684
+ white-space: nowrap;
685
+
686
+ .inputsDivItemLabel {
687
+ padding: 0 4px;
688
+ }
689
+ }
690
+ }
691
+
692
+ .tdNoBorder {
693
+ border-left: 1px solid #000;
694
+ border-right: 1px solid #000;
695
+ padding: 8px;
696
+ }
697
+
698
+ .tdWithBorder {
699
+ border: 1px solid #000;
700
+ padding: 8px;
701
+ }
702
+
703
+ .tdWithNoTopBorder {
704
+ border-top-style: none;
705
+ border-left: 1px solid #000;
706
+ border-right: 1px solid #000;
707
+ border-bottom: 1px solid #000;
708
+ padding: 8px;
709
+ }
710
+
711
+ .grid-content {
712
+ border-radius: 4px;
713
+ min-height: 36px;
714
+ text-align: center;
715
+ color: #fff;
716
+ background-color: #606266;
717
+ }
718
+
719
+ .bg-purple {
720
+ background: #9254de;
721
+ }
722
+
723
+ .bg-purple-light {
724
+ background: #b37feb;
725
+ }
726
+
727
+ .flexItem {
728
+ border-radius: 8px;
729
+ height: 100%;
730
+ }
731
+ </style>