vue2-client 1.15.101 → 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 (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/layouts/tabs/TabsView.vue +1 -1
@@ -0,0 +1,144 @@
1
+ <template>
2
+ <div>
3
+ <a-spin :spinning="loading">
4
+ <XHisEditor
5
+ ref="editor"
6
+ :file-url="fileUrl"
7
+ :res-id="resId"
8
+ :curr-res-data="currResData"
9
+ :bind-object="bindObject"
10
+ :save-data-logic-name="saveDataLogicName"
11
+ :service-name="serviceName"
12
+ :logic-extra-params="logicExtraParams"
13
+ :drop-down-box-params="dropDownBoxParams"
14
+ @init="handleEditorInit"
15
+ />
16
+ </a-spin>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ import XHisEditor from '@vue2-client/base-client/components/his/XHisEditor/XHisEditor.vue'
22
+
23
+ export default {
24
+ name: 'Test',
25
+ components: { XHisEditor },
26
+ data () {
27
+ return {
28
+ loading: false,
29
+ fileUrl: '/resource/af-his/html/bd40c834fcf94303a5db43e56852c6f2.html',
30
+ resId: '',
31
+ currResData: {
32
+ f_file_name: '测试文书'
33
+ },
34
+
35
+ bindObject: {
36
+ lxrdh: null,
37
+ yjs: null,
38
+ hys: null,
39
+ tw: null,
40
+ jws: null,
41
+ zyh: 381,
42
+ xbs: null,
43
+ pid: 506,
44
+ gms: null,
45
+ bq: '3楼',
46
+ hx: null,
47
+ hy: null,
48
+ mb: null,
49
+ lxrdz: null,
50
+ ssy: null,
51
+ jzys: '心血管内科医生2',
52
+ tgjc: null,
53
+ blh: 643,
54
+ ch: '13床',
55
+ ks: '心血管内科',
56
+ jlsj: null,
57
+ jts: null,
58
+ grs: null,
59
+ xb: 1,
60
+ rysj: '2025-07-01 14:36:00',
61
+ mz: '',
62
+ lxrxm: null,
63
+ hzgx: null,
64
+ szy: null,
65
+ xm: '张阿德',
66
+ csd: null,
67
+ hzxm: '张阿德',
68
+ gzdw: '',
69
+ xzz: null,
70
+ zs: null,
71
+ nl: 18,
72
+ rq: null
73
+ },
74
+ saveDataLogicName: 'saveMedicalRecordFile',
75
+ serviceName: 'af-his',
76
+ logicExtraParams: {
77
+ admissionId: 643,
78
+ templateId: 429
79
+ },
80
+ dropDownBoxParams: [],
81
+ initAttempts: 0,
82
+ maxInitAttempts: 10
83
+ }
84
+ },
85
+ mounted () {
86
+ this.$nextTick(() => {
87
+ this.waitForEditorReady().then(() => {
88
+ this.initEditor()
89
+ }).catch(error => {
90
+ console.error('编辑器初始化失败:', error)
91
+ this.loading = false
92
+ })
93
+ })
94
+ },
95
+ beforeDestroy () {
96
+ window.removeEventListener('unhandledrejection')
97
+ },
98
+ methods: {
99
+ waitForEditorReady () {
100
+ return new Promise((resolve, reject) => {
101
+ const checkInterval = setInterval(() => {
102
+ const editor = this.$refs.editor
103
+
104
+ if (editor && editor.editorRef && editor.editorRef.document) {
105
+ console.log('编辑器已完全初始化')
106
+ clearInterval(checkInterval)
107
+ resolve()
108
+ } else {
109
+ this.initAttempts++
110
+ console.log(`等待编辑器初始化...尝试次数: ${this.initAttempts}`)
111
+
112
+ if (this.initAttempts >= this.maxInitAttempts) {
113
+ clearInterval(checkInterval)
114
+ reject(new Error('编辑器初始化超时'))
115
+ }
116
+ }
117
+ }, 300)
118
+ })
119
+ },
120
+
121
+ initEditor () {
122
+ // this.loading = true
123
+ console.log('开始初始化编辑器...')
124
+
125
+ this.$refs.editor.init({
126
+ fileUrl: this.fileUrl,
127
+ resId: this.resId,
128
+ currResData: this.currResData,
129
+ bindObject: this.bindObject,
130
+ saveDataLogicName: this.saveDataLogicName,
131
+ serviceName: this.serviceName,
132
+ logicExtraParams: this.logicExtraParams,
133
+ dropDownBoxParams: this.dropDownBoxParams,
134
+ modeType: 'form'
135
+ })
136
+ },
137
+
138
+ handleEditorInit () {
139
+ this.loading = false
140
+ console.log('编辑器初始化完成,可以安全操作')
141
+ }
142
+ }
143
+ }
144
+ </script>
@@ -452,7 +452,7 @@ export default {
452
452
  .demo-infinite-container{
453
453
  overflow-x: hidden;
454
454
  overflow-y: auto;
455
- height: 80vh;
455
+ height: 85vh;
456
456
  }
457
457
  .card-row{
458
458
  height: 100%;
@@ -1,29 +1,50 @@
1
1
  <template>
2
- <a-table
3
- :columns="columns"
4
- :data-source="data"
5
- :rowSelection="rowSelection"
6
- :scroll="{ y: '70vh' }">
7
- <span slot="time" class="time-title">
8
- <span v-for="(item, index) in configData.timePeriod" :key="index">{{ item }}</span>
9
- </span>
10
- <div v-for="(item, index) in weekDays" :key="index" :slot="item.key" class="week_last_next_btn">
11
- <a-button slot="lastWeek" icon="left" size="large" @click="handleLastWeek" v-if="item.title == '周一'" />
12
- <div class="time-title">
13
- <span>{{ item.title }}</span>
14
- <span>{{ currentWeekDates[index].toLocaleDateString() }}</span>
2
+ <div v-if="pattern == 'schedule'">
3
+ <a-table
4
+ :columns="columns"
5
+ :data-source="data"
6
+ :rowSelection="rowSelection"
7
+ :scroll="{ y: '70vh' }">
8
+ <span slot="time" class="time-title">
9
+ <span v-for="(item, index) in configData.timePeriod" :key="index">{{ item }}</span>
10
+ </span>
11
+ <div v-for="(item, index) in weekDays" :key="index" :slot="item.key" class="week_last_next_btn">
12
+ <a-button slot="lastWeek" icon="left" size="large" @click="handleLastWeek" v-if="item.title == '周一'" />
13
+ <div class="time-title">
14
+ <span>{{ item.title }}</span>
15
+ <span>{{ currentWeekDates[index].toLocaleDateString() }}</span>
16
+ </div>
17
+ <a-button slot="nextWeek" icon="right" size="large" @click="handleNextWeek" v-if="item.title == '周日'"/>
15
18
  </div>
16
- <a-button slot="nextWeek" icon="right" size="large" @click="handleNextWeek" v-if="item.title == '周日'"/>
17
- </div>
18
- <template :slot="day.key" slot-scope="text, record" v-for="day in shiftTable">
19
- <div class="time-title" :key="day.key">
20
- <a-button v-for="(item, index) in record[day.key]" :key="index" @click="handleShiftChange(day.key, index, record)">{{ item === 1 || item === '1' ? '坐诊' : '休息' }}</a-button>
19
+ <template :slot="day.key" slot-scope="text, record" v-for="day in shiftTable">
20
+ <div class="time-title" :key="day.key">
21
+ <a-button v-for="(item, index) in record[day.key]" :key="index" @click="handleShiftChange(day.key, index, record)">{{ item === 1 || item === '1' ? '坐诊' : '休息' }}</a-button>
22
+ </div>
23
+ </template>
24
+ <template slot="sk_limit" slot-scope="text, record">
25
+ <a-input-number id="inputNumber" v-model="record.sk_limit" :min="configData.sk_limitMin" :max="configData.sk_limitMax" />
26
+ </template>
27
+ </a-table>
28
+ </div>
29
+ <div v-else-if="pattern == 'form'">
30
+ <a-table :columns="columns" :data-source='data' :row-selection="rowSelection" bordered>
31
+ <template v-for="(n, i) in inputColumns" :slot="n.dataIndex" slot-scope="text, record">
32
+ <div class="a-div" :key="i">
33
+ <a-input
34
+ v-for="(item, index) in n.row"
35
+ :key="index"
36
+ placeholder=""
37
+ class="ant-input"
38
+ v-model="record[n.dataIndex][index + 1]"
39
+ @input="handleInputChange(record, n.dataIndex, index + 1, $event.target.value)"
40
+ />
41
+ </div>
42
+ </template>
43
+ <div class="a-div" v-for="(n, i) in numberColumns" :slot="n.dataIndex" :key="i">
44
+ <div v-for="(item, index) in n.row" :key="index" class="number">{{item}}</div>
21
45
  </div>
22
- </template>
23
- <template slot="sk_limit" slot-scope="text, record">
24
- <a-input-number id="inputNumber" v-model="record.sk_limit" :min="configData.sk_limitMin" :max="configData.sk_limitMax" />
25
- </template>
26
- </a-table>
46
+ </a-table>
47
+ </div>
27
48
  </template>
28
49
  <script>
29
50
  import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
@@ -31,6 +52,10 @@ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
31
52
  export default {
32
53
  data () {
33
54
  return {
55
+ // 输入框数据
56
+ inputData: [],
57
+ // 模式
58
+ pattern: 'schedule',
34
59
  data: [],
35
60
  // 列配置
36
61
  columns: [],
@@ -87,6 +112,12 @@ export default {
87
112
  this.onSelectChange(selectedRowKeys, selectedRows)
88
113
  }
89
114
  }
115
+ },
116
+ inputColumns () {
117
+ return this.columns.filter(col => col.type === 'input')
118
+ },
119
+ numberColumns () {
120
+ return this.columns.filter(col => col.type === 'number')
90
121
  }
91
122
  },
92
123
  mounted () {
@@ -109,8 +140,32 @@ export default {
109
140
  this.selectedRowKeys = selectedRowKeys
110
141
  this.selectedRows = selectedRows
111
142
  },
143
+ // 处理输入框数据变化
144
+ handleInputChange (record, field, index, value) {
145
+ // 更新数据
146
+ this.$set(record[field], index, value)
147
+ },
112
148
  // 获取选中的行数据
113
149
  getSelectedRowData () {
150
+ if (this.pattern === 'form') {
151
+ // 在form模式下,返回包含输入框数据的完整信息
152
+ return this.selectedRows.map(row => {
153
+ const result = { ...row }
154
+ // 将对象格式的输入框数据转换为数组格式
155
+ this.inputColumns.forEach(col => {
156
+ if (row[col.dataIndex] && typeof row[col.dataIndex] === 'object') {
157
+ const fieldData = row[col.dataIndex]
158
+ const arrayData = []
159
+ // 将对象转换为数组,保持键的顺序
160
+ Object.keys(fieldData).forEach(key => {
161
+ arrayData.push(fieldData[key])
162
+ })
163
+ result[col.dataIndex] = arrayData
164
+ }
165
+ })
166
+ return result
167
+ })
168
+ }
114
169
  return this.selectedRows
115
170
  },
116
171
  // 获取全部数据
@@ -124,25 +179,50 @@ export default {
124
179
  runLogic(result.dataSource, {}, this.serviceName).then(res => {
125
180
  this.columns = []
126
181
  this.columns = JSON.parse(JSON.stringify(this.configData.columns))
127
- for (let i = 0; i < this.shiftTable.length; i++) {
128
- this.columns.push(this.shiftTable[i])
129
- }
130
- if (res && Array.isArray(res)) {
131
- const weekDays = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
132
- const shifts = ['am', 'pm', 'evening']
133
- let key = 0
182
+ this.pattern = result.pattern
183
+ if (this.pattern == 'schedule') {
184
+ for (let i = 0; i < this.shiftTable.length; i++) {
185
+ this.columns.push(this.shiftTable[i])
186
+ }
187
+ if (res && Array.isArray(res)) {
188
+ const weekDays = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
189
+ const shifts = ['am', 'pm', 'evening']
190
+ let key = 0
191
+ this.data = res.map(item => {
192
+ const scheduleData = {
193
+ key: key++
194
+ }
195
+ this.configData.columnsName.forEach(columnName => { scheduleData[columnName] = item[columnName] })
196
+ weekDays.forEach(day => {
197
+ scheduleData[day.charAt(0).toUpperCase() + day.slice(1)] = shifts.map(shift => item[`f_${day}_${shift}`] === '1' ? 1 : 0)
198
+ })
199
+ return scheduleData
200
+ })
201
+ // 保存原始数据
202
+ this.originalData = JSON.parse(JSON.stringify(this.data))
203
+ }
204
+ } else if (this.pattern == 'form') {
205
+ const inputFields = this.configData.columns
206
+ .filter(col => col.type === 'input')
207
+ .map(col => col.dataIndex)
134
208
  this.data = res.map(item => {
135
- const scheduleData = {
136
- key: key++
137
- }
138
- this.configData.columnsName.forEach(columnName => { scheduleData[columnName] = item[columnName] })
139
- weekDays.forEach(day => {
140
- scheduleData[day.charAt(0).toUpperCase() + day.slice(1)] = shifts.map(shift => item[`f_${day}_${shift}`] === '1' ? 1 : 0)
209
+ const newItem = { ...item }
210
+ inputFields.forEach(field => {
211
+ const column = this.configData.columns.find(col => col.dataIndex === field)
212
+ if (column && column.type === 'input' && column.row) {
213
+ const rowCount = column.row.length || 1 // 默认长度1
214
+ // 创建对象格式的数据,键为1,2,3...,值为空字符串
215
+ const fieldData = {}
216
+ for (let i = 1; i <= rowCount; i++) {
217
+ fieldData[i] = ''
218
+ }
219
+ newItem[field] = fieldData
220
+ } else {
221
+ newItem[field] = item[field] || ''
222
+ }
141
223
  })
142
- return scheduleData
224
+ return newItem
143
225
  })
144
- // 保存原始数据
145
- this.originalData = JSON.parse(JSON.stringify(this.data))
146
226
  }
147
227
  })
148
228
  })
@@ -173,7 +253,6 @@ export default {
173
253
  const currentDay = today.getDay() || 7 // 将周日的0转换为7
174
254
  const monday = new Date(today)
175
255
  monday.setDate(today.getDate() - currentDay + 1) // 设置为本周一
176
-
177
256
  this.currentWeekDates = Array.from({ length: 7 }, (_, index) => {
178
257
  const date = new Date(monday)
179
258
  date.setDate(monday.getDate() + index)
@@ -231,4 +310,30 @@ export default {
231
310
  padding: 8px 16px !important;
232
311
  overflow-wrap: break-word;
233
312
  }
313
+ .ant-input {
314
+ width: 100%;
315
+ }
316
+ .a-div{
317
+ display: flex;
318
+ flex-direction: column;
319
+ }
320
+ .number{
321
+ box-sizing: border-box;
322
+ margin: 0;
323
+ padding: 0;
324
+ font-variant: tabular-nums;
325
+ list-style: none;
326
+ font-feature-settings: 'tnum';
327
+ position: relative;
328
+ display: inline-block;
329
+ width: 100%;
330
+ height: 32px;
331
+ padding: 4px 11px;
332
+ color: rgba(0, 0, 0, 0.65);
333
+ font-size: 14px;
334
+ line-height: 1.5;
335
+ background-image: none;
336
+ border-radius: 4px;
337
+ transition: all 0.3s;
338
+ }
234
339
  </style>
@@ -1,8 +1,7 @@
1
1
  <template>
2
2
  <XShiftSchedule
3
3
  :query-params-name="queryParamsName"
4
- :service-name="serviceName"
5
- >
4
+ :service-name="serviceName">
6
5
  </XShiftSchedule>
7
6
  </template>
8
7
 
@@ -16,7 +15,8 @@ export default {
16
15
  },
17
16
  data () {
18
17
  return {
19
- queryParamsName: 'schedulingRuleConfigurationConfig',
18
+ // 排班模式:schedulingRuleConfigurationConfig, 表模式:accusationRulesConfig
19
+ queryParamsName: 'accusationRulesConfig',
20
20
  serviceName: 'af-his'
21
21
  }
22
22
  }