vue2-client 1.14.82 → 1.14.83

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 (117) 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/XShiftSchedule/XShiftSchedule_20250609151519.vue +222 -0
  95. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155514.vue +183 -0
  96. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155556.vue +183 -0
  97. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155600.vue +183 -0
  98. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181609.vue +206 -0
  99. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181629.vue +209 -0
  100. package/Users/objecrt/af-vue2-client/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +36 -0
  101. package/docs/Logic/345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +1 -0
  102. package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +4 -2
  103. package/package.json +1 -1
  104. package/src/base-client/components/TreeList/TreeList.vue +91 -0
  105. package/src/base-client/components/TreeList/TreeNode.vue +81 -0
  106. package/src/base-client/components/common/XCardSet/XTiltle.vue +191 -0
  107. package/src/base-client/components/common/XUploadFilesView/index.vue +485 -485
  108. package/src/base-client/components/his/XQuestionnaire/XQuestionnaire.vue +13 -236
  109. package/src/base-client/components/his/XQuestionnaire/XQuestionnaireDemo.vue +3 -14
  110. package/src/base-client/components/his/XQuestionnaire/XQuestionnaireItem.vue +280 -0
  111. package/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +32 -45
  112. package/src/base-client/components/his/XTextCard/XTextCard.vue +207 -207
  113. package/src/base-client/components/his/XTreeRows/TreeNode.vue +100 -100
  114. package/src/base-client/components/his/XTreeRows/XTreeRows.vue +197 -197
  115. package/src/base-client/components/his/threeTestOrders/editor.vue +111 -111
  116. package/src/pages/WorkflowDetail/WorkflowPageDetail/LeaveMessage.vue +388 -388
  117. package/src/router/async/router.map.js +3 -1
@@ -0,0 +1,183 @@
1
+ <template>
2
+ <a-table
3
+ :columns="columns"
4
+ :data-source="data"
5
+ :rowSelection="rowSelection"
6
+ :scroll="{ y: '75vh' }">
7
+ <span slot="time" class="time-title">
8
+ <span v-for="(item, index) in configData.timePeriod" :key="index">{{ item }}</span>
9
+ </span>
10
+ <template :slot="day.key" slot-scope="text, record" v-for="day in shiftTable">
11
+ <div class="time-title" :key="day.key">
12
+ <a-button v-for="(item, index) in record[day.key]" :key="index" @click="handleShiftChange(day.key, index, record)">{{ item === 1 || item === '1' ? '坐诊' : '休息' }}</a-button>
13
+ </div>
14
+ </template>
15
+ <template slot="sk_limit" slot-scope="text, record">
16
+ <a-input-number id="inputNumber" v-model="record.sk_limit" :min="configData.sk_limitMin" :max="configData.sk_limitMax" />
17
+ </template>
18
+ </a-table>
19
+ </template>
20
+ <script>
21
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
22
+
23
+ export default {
24
+ data () {
25
+ return {
26
+ data: [],
27
+ // 列配置
28
+ columns: [],
29
+ // 列名
30
+ columnNames: [],
31
+ // 选中的行键值集合
32
+ selectedRows: [],
33
+ // 选中的行信息集合
34
+ selectedRowKeys: [],
35
+ // 原始数据备份
36
+ originalData: [],
37
+ // 配置参数
38
+ configData: {},
39
+ // 排班时间表
40
+ shiftTable: [
41
+ ...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
42
+ const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
43
+ return {
44
+ title,
45
+ key,
46
+ dataIndex: key,
47
+ scopedSlots: { customRender: key },
48
+ align: 'center'
49
+ }
50
+ }),
51
+ {
52
+ title: '排班数',
53
+ key: 'sk_limit',
54
+ dataIndex: 'sk_limit',
55
+ scopedSlots: { customRender: 'sk_limit' },
56
+ align: 'center'
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ props: {
62
+ // 配置名
63
+ queryParamsName: {
64
+ type: String,
65
+ default: ''
66
+ },
67
+ // 服务名
68
+ serviceName: {
69
+ type: String,
70
+ default: 'af-his'
71
+ }
72
+ },
73
+ computed: {
74
+ rowSelection () {
75
+ return {
76
+ selectedRowKeys: this.selectedRowKeys,
77
+ onChange: (selectedRowKeys, selectedRows) => {
78
+ this.onSelectChange(selectedRowKeys, selectedRows)
79
+ }
80
+ }
81
+ }
82
+ },
83
+ mounted () {},
84
+ methods: {
85
+ handleShiftChange (day, index, record) {
86
+ // 找到当前记录在data中的索引
87
+ const dataIndex = this.data.findIndex(item => item.id === record.id)
88
+ if (dataIndex === -1) return
89
+ // 获取当前状态
90
+ const currentValue = record[day][index]
91
+ const newValue = currentValue === 1 || currentValue === '1' ? 0 : 1
92
+ // 更新按钮显示
93
+ this.$set(record[day], index, newValue)
94
+ // 同步更新data中的数据
95
+ this.$set(this.data[dataIndex][day], index, newValue)
96
+ },
97
+ onSelectChange (selectedRowKeys, selectedRows) {
98
+ this.selectedRowKeys = selectedRowKeys
99
+ this.selectedRows = selectedRows
100
+ },
101
+ // 获取选中的行数据
102
+ getSelectedRowData () {
103
+ return this.selectedRows
104
+ },
105
+ // 获取全部数据
106
+ getAllTable () {
107
+ return this.data
108
+ },
109
+ // 初始化数据
110
+ async init (queryParamsName) {
111
+ getConfigByName(queryParamsName, this.serviceName, result => {
112
+ this.configData = result
113
+ runLogic(result.dataSource, {}, this.serviceName).then(res => {
114
+ this.columns = []
115
+ this.columns = JSON.parse(JSON.stringify(this.configData.columns))
116
+ for (let i = 0; i < this.shiftTable.length; i++) {
117
+ this.columns.push(this.shiftTable[i])
118
+ }
119
+ if (res && Array.isArray(res)) {
120
+ const weekDays = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
121
+ const shifts = ['am', 'pm', 'evening']
122
+ let key = 0
123
+ this.data = res.map(item => {
124
+ const scheduleData = {
125
+ key: key++
126
+ }
127
+ this.configData.columnsName.forEach(columnName => { scheduleData[columnName] = item[columnName] })
128
+ weekDays.forEach(day => {
129
+ scheduleData[day.charAt(0).toUpperCase() + day.slice(1)] = shifts.map(shift => item[`f_${day}_${shift}`] === '1' ? 1 : 0)
130
+ })
131
+ return scheduleData
132
+ })
133
+ // 保存原始数据
134
+ this.originalData = JSON.parse(JSON.stringify(this.data))
135
+ }
136
+ })
137
+ })
138
+ },
139
+ // 查询数据函数
140
+ filterTableData (filters) {
141
+ if (!filters || Object.keys(filters).length === 0) {
142
+ // 如果没有过滤条件,恢复原始数据
143
+ this.data = JSON.parse(JSON.stringify(this.originalData))
144
+ return
145
+ }
146
+ // 从原始数据开始过滤
147
+ this.data = this.originalData.filter(item => {
148
+ // 检查每一项是否满足所有过滤条件
149
+ return Object.entries(filters).every(([key, value]) => {
150
+ // 如果过滤值是字符串,进行模糊匹配
151
+ if (typeof value === 'string') {
152
+ return item[key] && item[key].toString().toLowerCase().includes(value.toLowerCase())
153
+ }
154
+ // 如果过滤值是数字,进行精确匹配
155
+ return item[key] === value
156
+ })
157
+ })
158
+ }
159
+ },
160
+ watch: {
161
+ queryParamsName: {
162
+ handler (newValue) {
163
+ this.init(newValue)
164
+ },
165
+ deep: true,
166
+ immediate: true
167
+ }
168
+ }
169
+ }
170
+ </script>
171
+
172
+ <style scoped type="less">
173
+ .time-title {
174
+ display: flex !important;
175
+ flex-direction: column !important;
176
+ align-items: center !important;
177
+ }
178
+ ::v-deep .ant-table-thead > tr > th,
179
+ ::v-deep .ant-table-tbody > tr > td {
180
+ padding: 8px 16px !important;
181
+ overflow-wrap: break-word;
182
+ }
183
+ </style>
@@ -0,0 +1,206 @@
1
+ <template>
2
+ <a-table
3
+ :columns="columns"
4
+ :data-source="data"
5
+ :rowSelection="rowSelection"
6
+ :scroll="{ y: '75vh' }">
7
+ <span slot="time" class="time-title">
8
+ <span v-for="(item, index) in configData.timePeriod" :key="index">{{ item }}</span>
9
+ </span>
10
+ <a-button slot="lastWeek" icon="left" size="large" />
11
+ <div v-for="(item, index) in weekDays" :key="index" >
12
+ <span>{{item}}</span>
13
+ </div>
14
+ <template :slot="day.key" slot-scope="text, record" v-for="day in shiftTable">
15
+ <div class="time-title" :key="day.key">
16
+ <a-button v-for="(item, index) in record[day.key]" :key="index" @click="handleShiftChange(day.key, index, record)">{{ item === 1 || item === '1' ? '坐诊' : '休息' }}</a-button>
17
+ </div>
18
+ </template>
19
+ <a-button slot="nextWeek" icon="right" size="large" />
20
+ <template slot="sk_limit" slot-scope="text, record">
21
+ <a-input-number id="inputNumber" v-model="record.sk_limit" :min="configData.sk_limitMin" :max="configData.sk_limitMax" />
22
+ </template>
23
+ </a-table>
24
+ </template>
25
+ <script>
26
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
27
+
28
+ export default {
29
+ data () {
30
+ return {
31
+ data: [],
32
+ // 列配置
33
+ columns: [],
34
+ // 列名
35
+ columnNames: [],
36
+ // 选中的行键值集合
37
+ selectedRows: [],
38
+ // 选中的行信息集合
39
+ selectedRowKeys: [],
40
+ // 原始数据备份
41
+ originalData: [],
42
+ // 配置参数
43
+ configData: {},
44
+ weekDays: [...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
45
+ const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
46
+ return { title, key }
47
+ })],
48
+ // 排班时间表
49
+ shiftTable: [
50
+ {
51
+ dataIndex: 'lastWeek',
52
+ key: 'lastWeek',
53
+ slots: { title: 'lastWeek' },
54
+ scopedSlots: { customRender: 'lastWeekTitle' },
55
+ align: 'center',
56
+ width: 80
57
+ },
58
+ ...this.weekDays.map(({ title, key }) => ({
59
+ title,
60
+ key,
61
+ dataIndex: key,
62
+ scopedSlots: { customRender: key },
63
+ slots: { title: key },
64
+ align: 'center'
65
+ })),
66
+ {
67
+ dataIndex: 'nextWeek',
68
+ key: 'nextWeek',
69
+ slots: { title: 'nextWeek' },
70
+ scopedSlots: { customRender: 'nextWeekTitle' },
71
+ align: 'center',
72
+ width: 80
73
+ },
74
+ {
75
+ title: '排班数',
76
+ key: 'sk_limit',
77
+ dataIndex: 'sk_limit',
78
+ scopedSlots: { customRender: 'sk_limit' },
79
+ align: 'center'
80
+ }
81
+ ]
82
+ }
83
+ },
84
+ props: {
85
+ // 配置名
86
+ queryParamsName: {
87
+ type: String,
88
+ default: ''
89
+ },
90
+ // 服务名
91
+ serviceName: {
92
+ type: String,
93
+ default: 'af-his'
94
+ }
95
+ },
96
+ computed: {
97
+ rowSelection () {
98
+ return {
99
+ selectedRowKeys: this.selectedRowKeys,
100
+ onChange: (selectedRowKeys, selectedRows) => {
101
+ this.onSelectChange(selectedRowKeys, selectedRows)
102
+ }
103
+ }
104
+ }
105
+ },
106
+ mounted () {},
107
+ methods: {
108
+ handleShiftChange (day, index, record) {
109
+ // 找到当前记录在data中的索引
110
+ const dataIndex = this.data.findIndex(item => item.id === record.id)
111
+ if (dataIndex === -1) return
112
+ // 获取当前状态
113
+ const currentValue = record[day][index]
114
+ const newValue = currentValue === 1 || currentValue === '1' ? 0 : 1
115
+ // 更新按钮显示
116
+ this.$set(record[day], index, newValue)
117
+ // 同步更新data中的数据
118
+ this.$set(this.data[dataIndex][day], index, newValue)
119
+ },
120
+ onSelectChange (selectedRowKeys, selectedRows) {
121
+ this.selectedRowKeys = selectedRowKeys
122
+ this.selectedRows = selectedRows
123
+ },
124
+ // 获取选中的行数据
125
+ getSelectedRowData () {
126
+ return this.selectedRows
127
+ },
128
+ // 获取全部数据
129
+ getAllTable () {
130
+ return this.data
131
+ },
132
+ // 初始化数据
133
+ async init (queryParamsName) {
134
+ getConfigByName(queryParamsName, this.serviceName, result => {
135
+ this.configData = result
136
+ runLogic(result.dataSource, {}, this.serviceName).then(res => {
137
+ this.columns = []
138
+ this.columns = JSON.parse(JSON.stringify(this.configData.columns))
139
+ for (let i = 0; i < this.shiftTable.length; i++) {
140
+ this.columns.push(this.shiftTable[i])
141
+ }
142
+ if (res && Array.isArray(res)) {
143
+ const weekDays = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
144
+ const shifts = ['am', 'pm', 'evening']
145
+ let key = 0
146
+ this.data = res.map(item => {
147
+ const scheduleData = {
148
+ key: key++
149
+ }
150
+ this.configData.columnsName.forEach(columnName => { scheduleData[columnName] = item[columnName] })
151
+ weekDays.forEach(day => {
152
+ scheduleData[day.charAt(0).toUpperCase() + day.slice(1)] = shifts.map(shift => item[`f_${day}_${shift}`] === '1' ? 1 : 0)
153
+ })
154
+ return scheduleData
155
+ })
156
+ // 保存原始数据
157
+ this.originalData = JSON.parse(JSON.stringify(this.data))
158
+ }
159
+ })
160
+ })
161
+ },
162
+ // 查询数据函数
163
+ filterTableData (filters) {
164
+ if (!filters || Object.keys(filters).length === 0) {
165
+ // 如果没有过滤条件,恢复原始数据
166
+ this.data = JSON.parse(JSON.stringify(this.originalData))
167
+ return
168
+ }
169
+ // 从原始数据开始过滤
170
+ this.data = this.originalData.filter(item => {
171
+ // 检查每一项是否满足所有过滤条件
172
+ return Object.entries(filters).every(([key, value]) => {
173
+ // 如果过滤值是字符串,进行模糊匹配
174
+ if (typeof value === 'string') {
175
+ return item[key] && item[key].toString().toLowerCase().includes(value.toLowerCase())
176
+ }
177
+ // 如果过滤值是数字,进行精确匹配
178
+ return item[key] === value
179
+ })
180
+ })
181
+ }
182
+ },
183
+ watch: {
184
+ queryParamsName: {
185
+ handler (newValue) {
186
+ this.init(newValue)
187
+ },
188
+ deep: true,
189
+ immediate: true
190
+ }
191
+ }
192
+ }
193
+ </script>
194
+
195
+ <style scoped type="less">
196
+ .time-title {
197
+ display: flex !important;
198
+ flex-direction: column !important;
199
+ align-items: center !important;
200
+ }
201
+ ::v-deep .ant-table-thead > tr > th,
202
+ ::v-deep .ant-table-tbody > tr > td {
203
+ padding: 8px 16px !important;
204
+ overflow-wrap: break-word;
205
+ }
206
+ </style>
@@ -0,0 +1,209 @@
1
+ <template>
2
+ <a-table
3
+ :columns="columns"
4
+ :data-source="data"
5
+ :rowSelection="rowSelection"
6
+ :scroll="{ y: '75vh' }">
7
+ <span slot="time" class="time-title">
8
+ <span v-for="(item, index) in configData.timePeriod" :key="index">{{ item }}</span>
9
+ </span>
10
+ <a-button slot="lastWeek" icon="left" size="large" />
11
+ <div v-for="(item, index) in weekDays" :key="index" >
12
+ <span>{{item}}</span>
13
+ </div>
14
+ <template :slot="day.key" slot-scope="text, record" v-for="day in shiftTable">
15
+ <div class="time-title" :key="day.key">
16
+ <a-button v-for="(item, index) in record[day.key]" :key="index" @click="handleShiftChange(day.key, index, record)">{{ item === 1 || item === '1' ? '坐诊' : '休息' }}</a-button>
17
+ </div>
18
+ </template>
19
+ <a-button slot="nextWeek" icon="right" size="large" />
20
+ <template slot="sk_limit" slot-scope="text, record">
21
+ <a-input-number id="inputNumber" v-model="record.sk_limit" :min="configData.sk_limitMin" :max="configData.sk_limitMax" />
22
+ </template>
23
+ </a-table>
24
+ </template>
25
+ <script>
26
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
27
+
28
+ export default {
29
+ data () {
30
+ return {
31
+ data: [],
32
+ // 列配置
33
+ columns: [],
34
+ // 列名
35
+ columnNames: [],
36
+ // 选中的行键值集合
37
+ selectedRows: [],
38
+ // 选中的行信息集合
39
+ selectedRowKeys: [],
40
+ // 原始数据备份
41
+ originalData: [],
42
+ // 配置参数
43
+ configData: {},
44
+ weekDays: [...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
45
+ const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
46
+ return { title, key }
47
+ })],
48
+ // 排班时间表
49
+ shiftTable: [
50
+ {
51
+ dataIndex: 'lastWeek',
52
+ key: 'lastWeek',
53
+ slots: { title: 'lastWeek' },
54
+ scopedSlots: { customRender: 'lastWeekTitle' },
55
+ align: 'center',
56
+ width: 80
57
+ },
58
+ ...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
59
+ const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
60
+ return {
61
+ title,
62
+ key,
63
+ dataIndex: key,
64
+ scopedSlots: { customRender: key },
65
+ slots: { title: key },
66
+ align: 'center'
67
+ }
68
+ }),
69
+ {
70
+ dataIndex: 'nextWeek',
71
+ key: 'nextWeek',
72
+ slots: { title: 'nextWeek' },
73
+ scopedSlots: { customRender: 'nextWeekTitle' },
74
+ align: 'center',
75
+ width: 80
76
+ },
77
+ {
78
+ title: '排班数',
79
+ key: 'sk_limit',
80
+ dataIndex: 'sk_limit',
81
+ scopedSlots: { customRender: 'sk_limit' },
82
+ align: 'center'
83
+ }
84
+ ]
85
+ }
86
+ },
87
+ props: {
88
+ // 配置名
89
+ queryParamsName: {
90
+ type: String,
91
+ default: ''
92
+ },
93
+ // 服务名
94
+ serviceName: {
95
+ type: String,
96
+ default: 'af-his'
97
+ }
98
+ },
99
+ computed: {
100
+ rowSelection () {
101
+ return {
102
+ selectedRowKeys: this.selectedRowKeys,
103
+ onChange: (selectedRowKeys, selectedRows) => {
104
+ this.onSelectChange(selectedRowKeys, selectedRows)
105
+ }
106
+ }
107
+ }
108
+ },
109
+ mounted () {},
110
+ methods: {
111
+ handleShiftChange (day, index, record) {
112
+ // 找到当前记录在data中的索引
113
+ const dataIndex = this.data.findIndex(item => item.id === record.id)
114
+ if (dataIndex === -1) return
115
+ // 获取当前状态
116
+ const currentValue = record[day][index]
117
+ const newValue = currentValue === 1 || currentValue === '1' ? 0 : 1
118
+ // 更新按钮显示
119
+ this.$set(record[day], index, newValue)
120
+ // 同步更新data中的数据
121
+ this.$set(this.data[dataIndex][day], index, newValue)
122
+ },
123
+ onSelectChange (selectedRowKeys, selectedRows) {
124
+ this.selectedRowKeys = selectedRowKeys
125
+ this.selectedRows = selectedRows
126
+ },
127
+ // 获取选中的行数据
128
+ getSelectedRowData () {
129
+ return this.selectedRows
130
+ },
131
+ // 获取全部数据
132
+ getAllTable () {
133
+ return this.data
134
+ },
135
+ // 初始化数据
136
+ async init (queryParamsName) {
137
+ getConfigByName(queryParamsName, this.serviceName, result => {
138
+ this.configData = result
139
+ runLogic(result.dataSource, {}, this.serviceName).then(res => {
140
+ this.columns = []
141
+ this.columns = JSON.parse(JSON.stringify(this.configData.columns))
142
+ for (let i = 0; i < this.shiftTable.length; i++) {
143
+ this.columns.push(this.shiftTable[i])
144
+ }
145
+ if (res && Array.isArray(res)) {
146
+ const weekDays = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
147
+ const shifts = ['am', 'pm', 'evening']
148
+ let key = 0
149
+ this.data = res.map(item => {
150
+ const scheduleData = {
151
+ key: key++
152
+ }
153
+ this.configData.columnsName.forEach(columnName => { scheduleData[columnName] = item[columnName] })
154
+ weekDays.forEach(day => {
155
+ scheduleData[day.charAt(0).toUpperCase() + day.slice(1)] = shifts.map(shift => item[`f_${day}_${shift}`] === '1' ? 1 : 0)
156
+ })
157
+ return scheduleData
158
+ })
159
+ // 保存原始数据
160
+ this.originalData = JSON.parse(JSON.stringify(this.data))
161
+ }
162
+ })
163
+ })
164
+ },
165
+ // 查询数据函数
166
+ filterTableData (filters) {
167
+ if (!filters || Object.keys(filters).length === 0) {
168
+ // 如果没有过滤条件,恢复原始数据
169
+ this.data = JSON.parse(JSON.stringify(this.originalData))
170
+ return
171
+ }
172
+ // 从原始数据开始过滤
173
+ this.data = this.originalData.filter(item => {
174
+ // 检查每一项是否满足所有过滤条件
175
+ return Object.entries(filters).every(([key, value]) => {
176
+ // 如果过滤值是字符串,进行模糊匹配
177
+ if (typeof value === 'string') {
178
+ return item[key] && item[key].toString().toLowerCase().includes(value.toLowerCase())
179
+ }
180
+ // 如果过滤值是数字,进行精确匹配
181
+ return item[key] === value
182
+ })
183
+ })
184
+ }
185
+ },
186
+ watch: {
187
+ queryParamsName: {
188
+ handler (newValue) {
189
+ this.init(newValue)
190
+ },
191
+ deep: true,
192
+ immediate: true
193
+ }
194
+ }
195
+ }
196
+ </script>
197
+
198
+ <style scoped type="less">
199
+ .time-title {
200
+ display: flex !important;
201
+ flex-direction: column !important;
202
+ align-items: center !important;
203
+ }
204
+ ::v-deep .ant-table-thead > tr > th,
205
+ ::v-deep .ant-table-tbody > tr > td {
206
+ padding: 8px 16px !important;
207
+ overflow-wrap: break-word;
208
+ }
209
+ </style>
@@ -0,0 +1,36 @@
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>
@@ -11,6 +11,7 @@
11
11
  - ENV 对应 一个 org.json.JSONObject {tenantName:"租户名称",orgName:"分公司名称",applicationName:"应用名称",dbType:"数据库类型"}
12
12
  - logic 对应 LogicService 类,其中有方法
13
13
  * logic.run(logicName,param) 执行logic / logicName 执行的业务逻辑名称,param 参数 返回 org.json.JSONObject
14
+ * logic.remoteRun("服务名","logicName", "param")
14
15
  - sql 对应 [SqlService]() 类,其中有方法
15
16
  * sql.query(sql别名 string,sql参数 string) 执行已经注册的sql 返回 org.json.JSONArray
16
17
  * sql.query(sql别名 string,sql参数 string,页数 int,每页行数 int) 执行已经注册的sql 返回 org.json.JSONArray
@@ -10,11 +10,12 @@
10
10
  - openDialog(configName, selectedId, mixinData, outEnv, attr):打开一个对话框:
11
11
  - setColSpanByName(slotRef, colSpan):设置栅格的宽度
12
12
  - openDrawer(configName, selectedId, mixinData):打开一个对话框,例如:this.openDialog('xxx', 5, {})
13
- - openDrawer(configName, selectedId, mixinData, outEnv, attr):打开一个对话框:
13
+ - openDrawer(configName, selectedId, mixinData, outEnv, attr, showButton):打开一个对话框:
14
14
  - selectId:id号,formtable选择时,用selectId过滤数据 可以传递 json {a_id: 1} 或者 传递 1 ,传递数值会默认拼接查询条件 {selected_id:1}
15
15
  - mixinData: form表单需要的数据
16
16
  - outEnv: 传递给打开的界面的数据,在打开界面的js中通过this.outEnv可以访问
17
17
  - attr: 用于传递参数绑定到 modal 弹框上
18
+ - showButton: true/false 是否显示提交按钮 默认:true
18
19
  - getOutEnv 获取获取 outEnv
19
20
  - this.getRealKeyData(obj) 获取真实的数据 传递 {a_a:"1"} 返回 {a:"1"}
20
21
  - this.currUser.operaInfo 获取当前用户信息
@@ -60,7 +61,8 @@ this.openDialog('xxx', 5, {}, {}, {})
60
61
  afterDelete( res (删除接口返回数据)) 删除后触发
61
62
  action(record (当前记录), id (当前记录主键), actionType (操作类型)) 操作按钮触发
62
63
  - expandedGrid:"栅格名"
63
-
64
+ - json配置相关
65
+ - "pageMaxSize": (int) num,
64
66
  # x-report 插槽 使用说明
65
67
 
66
68
  - init(configName,configData) 配置名称 / 报表数据
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.14.82",
3
+ "version": "1.14.83",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",