vue2-client 1.15.26 → 1.15.27

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 (128) hide show
  1. package/docs/Logic/345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +0 -1
  2. package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +2 -4
  3. package/package.json +1 -1
  4. package/src/base-client/components/common/XDescriptions/XDescriptions.vue +174 -174
  5. package/src/base-client/components/common/XDescriptions/XDescriptionsGroup.vue +314 -314
  6. package/src/base-client/components/common/XSimpleDescriptions/XSimpleDescriptions.vue +166 -166
  7. package/src/base-client/components/his/XTextCard/XTextCard.vue +207 -207
  8. package/src/base-client/components/his/XTreeRows/TreeNode.vue +100 -100
  9. package/src/base-client/components/his/XTreeRows/XTreeRows.vue +197 -197
  10. package/src/base-client/components/his/threeTestOrders/editor.vue +111 -111
  11. package/src/components/HeightScanner/index.vue +54 -10
  12. package/src/config/CreateQueryConfig.js +325 -325
  13. package/src/pages/XTreeOneProExample/index.vue +67 -67
  14. package/.history/public/his/editor/editor_20250606134713.html +0 -51
  15. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527173925.vue +0 -509
  16. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174316.vue +0 -524
  17. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174419.vue +0 -524
  18. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174422.vue +0 -524
  19. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172825.vue +0 -207
  20. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172945.vue +0 -211
  21. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172949.vue +0 -212
  22. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611173010.vue +0 -212
  23. package/.history/src/base-client/components/common/XForm/XFormItem_20250508134122.vue +0 -1320
  24. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171604.vue +0 -1332
  25. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171613.vue +0 -1331
  26. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171703.vue +0 -1331
  27. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171720.vue +0 -1331
  28. package/.history/src/base-client/components/common/XForm/XFormItem_20250527174327.vue +0 -1339
  29. package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612092804.vue +0 -731
  30. package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612112546.vue +0 -748
  31. package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612113808.vue +0 -748
  32. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115237.vue +0 -1071
  33. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115346.vue +0 -1078
  34. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115350.vue +0 -1077
  35. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115415.vue +0 -1077
  36. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115429.vue +0 -1077
  37. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611091619.vue +0 -442
  38. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092547.vue +0 -442
  39. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092552.vue +0 -442
  40. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092744.vue +0 -475
  41. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092955.vue +0 -475
  42. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092957.vue +0 -475
  43. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095652.vue +0 -477
  44. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095701.vue +0 -477
  45. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095704.vue +0 -477
  46. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100005.vue +0 -473
  47. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100011.vue +0 -473
  48. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100014.vue +0 -473
  49. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100833.vue +0 -473
  50. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100853.vue +0 -473
  51. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100940.vue +0 -473
  52. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101011.vue +0 -473
  53. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101013.vue +0 -473
  54. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101014.vue +0 -473
  55. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101159.vue +0 -473
  56. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101238.vue +0 -474
  57. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101240.vue +0 -474
  58. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101242.vue +0 -474
  59. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101404.vue +0 -472
  60. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101410.vue +0 -472
  61. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101459.vue +0 -472
  62. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101500.vue +0 -472
  63. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101502.vue +0 -472
  64. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101504.vue +0 -472
  65. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101610.vue +0 -501
  66. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101700.vue +0 -501
  67. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101702.vue +0 -501
  68. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101741.vue +0 -504
  69. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101749.vue +0 -504
  70. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101759.vue +0 -504
  71. package/.history/src/base-client/components/his/XHisEditor/dome_20250611091349.vue +0 -131
  72. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105854.vue +0 -160
  73. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105902.vue +0 -160
  74. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105924.vue +0 -160
  75. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105932.vue +0 -158
  76. package/.history/src/base-client/components/his/XList/XList_20250609135848.vue +0 -173
  77. package/.history/src/base-client/components/his/XList/XList_20250609141026.vue +0 -222
  78. package/.history/src/base-client/components/his/XList/XList_20250609141035.vue +0 -229
  79. package/.history/src/base-client/components/his/XList/XList_20250609141103.vue +0 -229
  80. package/.history/src/base-client/components/his/XList/XList_20250609141105.vue +0 -229
  81. package/.history/src/base-client/components/his/XList/XList_20250609141334.vue +0 -241
  82. package/.history/src/base-client/components/his/XList/XList_20250609141404.vue +0 -241
  83. package/.history/src/base-client/components/his/XList/XList_20250609141406.vue +0 -241
  84. package/.history/src/base-client/components/his/XList/XList_20250609141801.vue +0 -245
  85. package/.history/src/base-client/components/his/XList/XList_20250609142033.vue +0 -245
  86. package/.history/src/base-client/components/his/XList/XList_20250609142038.vue +0 -245
  87. package/.history/src/base-client/components/his/XList/XList_20250609142435.vue +0 -255
  88. package/.history/src/base-client/components/his/XList/XList_20250609142503.vue +0 -255
  89. package/.history/src/base-client/components/his/XList/XList_20250609142504.vue +0 -255
  90. package/.history/src/base-client/components/his/XList/XList_20250609143012.vue +0 -270
  91. package/.history/src/base-client/components/his/XList/XList_20250609143044.vue +0 -270
  92. package/.history/src/base-client/components/his/XList/XList_20250609143046.vue +0 -270
  93. package/.history/src/base-client/components/his/XList/XList_20250609143210.vue +0 -270
  94. package/.history/src/base-client/components/his/XList/XList_20250609144339.vue +0 -294
  95. package/.history/src/base-client/components/his/XList/XList_20250609144410.vue +0 -294
  96. package/.history/src/base-client/components/his/XList/XList_20250609144412.vue +0 -294
  97. package/.history/src/base-client/components/his/XList/XList_20250609144647.vue +0 -303
  98. package/.history/src/base-client/components/his/XList/XList_20250609144716.vue +0 -303
  99. package/.history/src/base-client/components/his/XList/XList_20250609144729.vue +0 -303
  100. package/.history/src/base-client/components/his/XList/XList_20250609151232.vue +0 -288
  101. package/.history/src/base-client/components/his/XList/XList_20250609151247.vue +0 -288
  102. package/.history/src/base-client/components/his/XList/XList_20250609151252.vue +0 -288
  103. package/.history/src/base-client/components/his/XList/XList_20250609161220.vue +0 -317
  104. package/.history/src/base-client/components/his/XList/XList_20250609161258.vue +0 -306
  105. package/.history/src/base-client/components/his/XList/XList_20250609161319.vue +0 -306
  106. package/.history/src/base-client/components/his/XList/XList_20250609161320.vue +0 -306
  107. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250609151519.vue +0 -222
  108. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155514.vue +0 -183
  109. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155556.vue +0 -183
  110. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155600.vue +0 -183
  111. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181609.vue +0 -206
  112. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181629.vue +0 -209
  113. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095553.vue +0 -242
  114. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095610.vue +0 -242
  115. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095612.vue +0 -242
  116. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100041.vue +0 -251
  117. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100047.vue +0 -251
  118. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100054.vue +0 -250
  119. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100105.vue +0 -250
  120. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100107.vue +0 -250
  121. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100114.vue +0 -250
  122. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140844.vue +0 -238
  123. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140910.vue +0 -238
  124. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140912.vue +0 -238
  125. package/Users/objecrt/af-vue2-client/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +0 -36
  126. package/src/base-client/components/TreeList/TreeList.vue +0 -91
  127. package/src/base-client/components/TreeList/TreeNode.vue +0 -81
  128. package/src/base-client/components/common/XCardSet/XTiltle.vue +0 -191
@@ -1,238 +0,0 @@
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>
15
- </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>
21
- </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>
27
- </template>
28
- <script>
29
- import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
30
-
31
- export default {
32
- data () {
33
- return {
34
- data: [],
35
- // 列配置
36
- columns: [],
37
- // 列名
38
- columnNames: [],
39
- // 选中的行键值集合
40
- selectedRows: [],
41
- // 选中的行信息集合
42
- selectedRowKeys: [],
43
- // 原始数据备份
44
- originalData: [],
45
- // 配置参数
46
- configData: {},
47
- // 当前显示的周次日期
48
- currentWeekDates: [],
49
- weekDays: [...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
50
- const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
51
- return { title, key }
52
- })],
53
- // 排班时间表
54
- shiftTable: [...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
55
- const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
56
- return {
57
- key, dataIndex: key, scopedSlots: { customRender: key }, slots: { title: key }, align: 'center', width: key === 'Monday' || key === 'Sunday' ? 150 : 120
58
- }
59
- }),
60
- {
61
- title: '排班数',
62
- key: 'sk_limit',
63
- dataIndex: 'sk_limit',
64
- scopedSlots: { customRender: 'sk_limit' },
65
- align: 'center'
66
- }
67
- ]
68
- }
69
- },
70
- props: {
71
- // 配置名
72
- queryParamsName: {
73
- type: String,
74
- default: ''
75
- },
76
- // 服务名
77
- serviceName: {
78
- type: String,
79
- default: 'af-his'
80
- }
81
- },
82
- computed: {
83
- rowSelection () {
84
- return {
85
- selectedRowKeys: this.selectedRowKeys,
86
- onChange: (selectedRowKeys, selectedRows) => {
87
- this.onSelectChange(selectedRowKeys, selectedRows)
88
- }
89
- }
90
- }
91
- },
92
- mounted () {
93
- this.initWeekDates()
94
- },
95
- methods: {
96
- handleShiftChange (day, index, record) {
97
- // 找到当前记录在data中的索引
98
- const dataIndex = this.data.findIndex(item => item.id === record.id)
99
- if (dataIndex === -1) return
100
- // 获取当前状态
101
- const currentValue = record[day][index]
102
- const newValue = currentValue === 1 || currentValue === '1' ? 0 : 1
103
- // 更新按钮显示
104
- this.$set(record[day], index, newValue)
105
- // 同步更新data中的数据
106
- this.$set(this.data[dataIndex][day], index, newValue)
107
- },
108
- onSelectChange (selectedRowKeys, selectedRows) {
109
- this.selectedRowKeys = selectedRowKeys
110
- this.selectedRows = selectedRows
111
- },
112
- // 获取选中的行数据
113
- getSelectedRowData () {
114
- return this.selectedRows
115
- },
116
- // 获取全部数据
117
- getAllTable () {
118
- return this.data
119
- },
120
- // 初始化数据
121
- async init (queryParamsName) {
122
- getConfigByName(queryParamsName, this.serviceName, result => {
123
- this.configData = result
124
- runLogic(result.dataSource, {}, this.serviceName).then(res => {
125
- this.columns = []
126
- 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
134
- 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)
141
- })
142
- return scheduleData
143
- })
144
- // 保存原始数据
145
- this.originalData = JSON.parse(JSON.stringify(this.data))
146
- }
147
- })
148
- })
149
- },
150
- // 查询数据函数
151
- filterTableData (filters) {
152
- if (!filters || Object.keys(filters).length === 0) {
153
- // 如果没有过滤条件,恢复原始数据
154
- this.data = JSON.parse(JSON.stringify(this.originalData))
155
- return
156
- }
157
- // 从原始数据开始过滤
158
- this.data = this.originalData.filter(item => {
159
- // 检查每一项是否满足所有过滤条件
160
- return Object.entries(filters).every(([key, value]) => {
161
- // 如果过滤值是字符串,进行模糊匹配
162
- if (typeof value === 'string') {
163
- return item[key] && item[key].toString().toLowerCase().includes(value.toLowerCase())
164
- }
165
- // 如果过滤值是数字,进行精确匹配
166
- return item[key] === value
167
- })
168
- })
169
- },
170
- // 初始化周次日期
171
- initWeekDates () {
172
- const today = new Date()
173
- const currentDay = today.getDay() || 7 // 将周日的0转换为7
174
- const monday = new Date(today)
175
- monday.setDate(today.getDate() - currentDay + 1) // 设置为本周一
176
-
177
- this.currentWeekDates = Array.from({ length: 7 }, (_, index) => {
178
- const date = new Date(monday)
179
- date.setDate(monday.getDate() + index)
180
- return date
181
- })
182
- },
183
- // 切换到上一周
184
- handleLastWeek () {
185
- const monday = new Date(this.currentWeekDates[0])
186
- monday.setDate(monday.getDate() - 7)
187
- this.updateWeekDates(monday)
188
- },
189
- // 切换到下一周
190
- handleNextWeek () {
191
- const monday = new Date(this.currentWeekDates[0])
192
- monday.setDate(monday.getDate() + 7)
193
- this.updateWeekDates(monday)
194
- },
195
- // 更新周次日期
196
- updateWeekDates (monday) {
197
- this.currentWeekDates = Array.from({ length: 7 }, (_, index) => {
198
- const date = new Date(monday)
199
- date.setDate(monday.getDate() + index)
200
- return date
201
- })
202
- }
203
- },
204
- watch: {
205
- queryParamsName: {
206
- handler (newValue) {
207
- this.init(newValue)
208
- },
209
- deep: true,
210
- immediate: true
211
- }
212
- }
213
- }
214
- </script>
215
-
216
- <style scoped>
217
- .time-title {
218
- display: flex !important;
219
- flex-direction: column !important;
220
- align-items: center !important;
221
- gap: 12px !important;
222
- }
223
- .week_last_next_btn {
224
- display: flex;
225
- flex-direction: row;
226
- align-items: center;
227
- justify-content: center;
228
- gap: 8px;
229
- }
230
- ::v-deep .ant-table-thead > tr > th,
231
- ::v-deep .ant-table-tbody > tr > td {
232
- padding: 8px 16px !important;
233
- overflow-wrap: break-word;
234
- }
235
- ::v-deep .ant-btn {
236
- margin: 4px 0;
237
- }
238
- </style>
@@ -1,238 +0,0 @@
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>
15
- </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>
21
- </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>
27
- </template>
28
- <script>
29
- import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
30
-
31
- export default {
32
- data () {
33
- return {
34
- data: [],
35
- // 列配置
36
- columns: [],
37
- // 列名
38
- columnNames: [],
39
- // 选中的行键值集合
40
- selectedRows: [],
41
- // 选中的行信息集合
42
- selectedRowKeys: [],
43
- // 原始数据备份
44
- originalData: [],
45
- // 配置参数
46
- configData: {},
47
- // 当前显示的周次日期
48
- currentWeekDates: [],
49
- weekDays: [...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
50
- const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
51
- return { title, key }
52
- })],
53
- // 排班时间表
54
- shiftTable: [...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
55
- const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
56
- return {
57
- key, dataIndex: key, scopedSlots: { customRender: key }, slots: { title: key }, align: 'center', width: key === 'Monday' || key === 'Sunday' ? 150 : 120
58
- }
59
- }),
60
- {
61
- title: '排班数',
62
- key: 'sk_limit',
63
- dataIndex: 'sk_limit',
64
- scopedSlots: { customRender: 'sk_limit' },
65
- align: 'center'
66
- }
67
- ]
68
- }
69
- },
70
- props: {
71
- // 配置名
72
- queryParamsName: {
73
- type: String,
74
- default: ''
75
- },
76
- // 服务名
77
- serviceName: {
78
- type: String,
79
- default: 'af-his'
80
- }
81
- },
82
- computed: {
83
- rowSelection () {
84
- return {
85
- selectedRowKeys: this.selectedRowKeys,
86
- onChange: (selectedRowKeys, selectedRows) => {
87
- this.onSelectChange(selectedRowKeys, selectedRows)
88
- }
89
- }
90
- }
91
- },
92
- mounted () {
93
- this.initWeekDates()
94
- },
95
- methods: {
96
- handleShiftChange (day, index, record) {
97
- // 找到当前记录在data中的索引
98
- const dataIndex = this.data.findIndex(item => item.id === record.id)
99
- if (dataIndex === -1) return
100
- // 获取当前状态
101
- const currentValue = record[day][index]
102
- const newValue = currentValue === 1 || currentValue === '1' ? 0 : 1
103
- // 更新按钮显示
104
- this.$set(record[day], index, newValue)
105
- // 同步更新data中的数据
106
- this.$set(this.data[dataIndex][day], index, newValue)
107
- },
108
- onSelectChange (selectedRowKeys, selectedRows) {
109
- this.selectedRowKeys = selectedRowKeys
110
- this.selectedRows = selectedRows
111
- },
112
- // 获取选中的行数据
113
- getSelectedRowData () {
114
- return this.selectedRows
115
- },
116
- // 获取全部数据
117
- getAllTable () {
118
- return this.data
119
- },
120
- // 初始化数据
121
- async init (queryParamsName) {
122
- getConfigByName(queryParamsName, this.serviceName, result => {
123
- this.configData = result
124
- runLogic(result.dataSource, {}, this.serviceName).then(res => {
125
- this.columns = []
126
- 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
134
- 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)
141
- })
142
- return scheduleData
143
- })
144
- // 保存原始数据
145
- this.originalData = JSON.parse(JSON.stringify(this.data))
146
- }
147
- })
148
- })
149
- },
150
- // 查询数据函数
151
- filterTableData (filters) {
152
- if (!filters || Object.keys(filters).length === 0) {
153
- // 如果没有过滤条件,恢复原始数据
154
- this.data = JSON.parse(JSON.stringify(this.originalData))
155
- return
156
- }
157
- // 从原始数据开始过滤
158
- this.data = this.originalData.filter(item => {
159
- // 检查每一项是否满足所有过滤条件
160
- return Object.entries(filters).every(([key, value]) => {
161
- // 如果过滤值是字符串,进行模糊匹配
162
- if (typeof value === 'string') {
163
- return item[key] && item[key].toString().toLowerCase().includes(value.toLowerCase())
164
- }
165
- // 如果过滤值是数字,进行精确匹配
166
- return item[key] === value
167
- })
168
- })
169
- },
170
- // 初始化周次日期
171
- initWeekDates () {
172
- const today = new Date()
173
- const currentDay = today.getDay() || 7 // 将周日的0转换为7
174
- const monday = new Date(today)
175
- monday.setDate(today.getDate() - currentDay + 1) // 设置为本周一
176
-
177
- this.currentWeekDates = Array.from({ length: 7 }, (_, index) => {
178
- const date = new Date(monday)
179
- date.setDate(monday.getDate() + index)
180
- return date
181
- })
182
- },
183
- // 切换到上一周
184
- handleLastWeek () {
185
- const monday = new Date(this.currentWeekDates[0])
186
- monday.setDate(monday.getDate() - 7)
187
- this.updateWeekDates(monday)
188
- },
189
- // 切换到下一周
190
- handleNextWeek () {
191
- const monday = new Date(this.currentWeekDates[0])
192
- monday.setDate(monday.getDate() + 7)
193
- this.updateWeekDates(monday)
194
- },
195
- // 更新周次日期
196
- updateWeekDates (monday) {
197
- this.currentWeekDates = Array.from({ length: 7 }, (_, index) => {
198
- const date = new Date(monday)
199
- date.setDate(monday.getDate() + index)
200
- return date
201
- })
202
- }
203
- },
204
- watch: {
205
- queryParamsName: {
206
- handler (newValue) {
207
- this.init(newValue)
208
- },
209
- deep: true,
210
- immediate: true
211
- }
212
- }
213
- }
214
- </script>
215
-
216
- <style scoped>
217
- .time-title {
218
- display: flex !important;
219
- flex-direction: column !important;
220
- align-items: center !important;
221
- gap: 12px !important;
222
- }
223
- .week_last_next_btn {
224
- display: flex;
225
- flex-direction: row;
226
- align-items: center;
227
- justify-content: center;
228
- gap: 8px;
229
- }
230
- ::v-deep .ant-table-thead > tr > th,
231
- ::v-deep .ant-table-tbody > tr > td {
232
- padding: 8px 16px !important;
233
- overflow-wrap: break-word;
234
- }
235
- ::v-deep .ant-btn {
236
- margin: 4px 0;
237
- }
238
- </style>
@@ -1,36 +0,0 @@
1
- <script>
2
- export default {
3
- props: {
4
- weekDays: {
5
- type: Array,
6
- default: () => []
7
- }
8
- },
9
- computed: {
10
- columns () {
11
- const baseColumns = [
12
- { title: '序号', dataIndex: 'index', width: 60 },
13
- { title: '科室', dataIndex: 'department', width: 120 },
14
- { title: '医生', dataIndex: 'doctor', width: 100 },
15
- { title: '上/下/晚', dataIndex: 'shiftType', width: 80 },
16
- ]
17
-
18
- // 增加防御判断,确保 weekDays 存在
19
- const dayColumns = this.weekDays.length > 0
20
- ? this.weekDays.map((day, dayIndex) => ({
21
- title: `${day.label} ${day.date}`,
22
- dataIndex: `shifts-${dayIndex}`, // 改为字符串形式
23
- dayIndex: dayIndex,
24
- width: 120,
25
- }))
26
- : []
27
-
28
- const tailColumns = [
29
- { title: '排班数', dataIndex: 'count', width: 80 }
30
- ]
31
-
32
- return [...baseColumns, ...dayColumns, ...tailColumns]
33
- }
34
- }
35
- }
36
- </script>
@@ -1,91 +0,0 @@
1
- <template>
2
- <div class="tree-container">
3
- <div class="tree-list">
4
- <tree-node
5
- v-for="node in treeData"
6
- :key="node.id"
7
- :node="node"
8
- @toggle="toggleNode"/>
9
- </div>
10
- </div>
11
- </template>
12
-
13
- <script>
14
- import TreeNode from './TreeNode.vue'
15
-
16
- export default {
17
- name: 'TreeList',
18
- components: {
19
- TreeNode
20
- },
21
- data() {
22
- return {
23
- treeData: [
24
- {
25
- id: '1',
26
- title: '体征',
27
- expanded: false,
28
- children: [
29
- {
30
- id: '1-1',
31
- title: '一般情况'
32
- },
33
- {
34
- id: '1-2',
35
- title: '皮肤粘膜'
36
- },
37
- {
38
- id: '1-3',
39
- title: '头颈',
40
- expanded: false,
41
- children: [
42
- {
43
- id: '1-3-1',
44
- title: '头部'
45
- },
46
- {
47
- id: '1-3-2',
48
- title: '颈部'
49
- }
50
- ]
51
- }
52
- ]
53
- }
54
- ]
55
- }
56
- },
57
- methods: {
58
- toggleNode(node) {
59
- node.expanded = !node.expanded
60
- }
61
- }
62
- }
63
- </script>
64
-
65
- <style scoped>
66
- .tree-container {
67
- width: 240px;
68
- height: 400px;
69
- border: 1px solid #e8e8e8;
70
- overflow-y: auto;
71
- padding: 8px;
72
- }
73
-
74
- /* 自定义滚动条样式 */
75
- .tree-container::-webkit-scrollbar {
76
- width: 6px;
77
- }
78
-
79
- .tree-container::-webkit-scrollbar-thumb {
80
- background-color: #ccc;
81
- border-radius: 3px;
82
- }
83
-
84
- .tree-container::-webkit-scrollbar-track {
85
- background-color: #f5f5f5;
86
- }
87
-
88
- .tree-list {
89
- font-size: 14px;
90
- }
91
- </style>
@@ -1,81 +0,0 @@
1
- <template>
2
- <div class="tree-node">
3
- <div class="node-content" @click="handleClick">
4
- <span v-if="hasChildren" class="toggle-icon">
5
- {{ node.expanded ? '-' : '+' }}
6
- </span>
7
- <span class="node-title">{{ node.title }}</span>
8
- </div>
9
- <div v-if="hasChildren && node.expanded" class="node-children">
10
- <tree-node
11
- v-for="child in node.children"
12
- :key="child.id"
13
- :node="child"
14
- @toggle="$emit('toggle', $event)"
15
- :level="level + 1"/>
16
- </div>
17
- </div>
18
- </template>
19
-
20
- <script>
21
- export default {
22
- name: 'TreeNode',
23
- props: {
24
- node: {
25
- type: Object,
26
- required: true
27
- },
28
- level: {
29
- type: Number,
30
- default: 0
31
- }
32
- },
33
- computed: {
34
- hasChildren() {
35
- return this.node.children && this.node.children.length > 0
36
- }
37
- },
38
- methods: {
39
- handleClick() {
40
- if (this.hasChildren) {
41
- this.$emit('toggle', this.node)
42
- }
43
- }
44
- }
45
- }
46
- </script>
47
-
48
- <style scoped>
49
- .tree-node {
50
- margin: 2px 0;
51
- }
52
-
53
- .node-content {
54
- display: flex;
55
- align-items: center;
56
- padding: 4px 0;
57
- user-select: none;
58
- }
59
-
60
- .toggle-icon {
61
- width: 16px;
62
- text-align: center;
63
- font-size: 14px;
64
- color: #666;
65
- margin-right: 4px;
66
- cursor: pointer;
67
- }
68
-
69
- .node-title {
70
- flex: 1;
71
- cursor: default;
72
- }
73
-
74
- .node-content:hover {
75
- background-color: #f5f5f5;
76
- }
77
-
78
- .node-children {
79
- padding-left: 20px;
80
- }
81
- </style>