vue2-client 1.15.61 → 1.15.63
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.
- package/package.json +110 -110
- package/src/base-client/components/common/XButtons/XButtons.vue +3 -12
- package/src/base-client/components/his/XTextCard/XTextCard.vue +207 -207
- package/src/base-client/components/his/threeTestOrders/editor.vue +111 -111
- package/src/components/FileImageItem/FileItem.vue +321 -305
- package/src/pages/WorkflowDetail/WorkflowDetail.vue +391 -379
- package/src/pages/WorkflowDetail/WorkflowPageDetail/worklog.vue +97 -0
- package/.history/public/his/editor/editor_20250606134713.html +0 -51
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527173925.vue +0 -509
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174316.vue +0 -524
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174419.vue +0 -524
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174422.vue +0 -524
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172825.vue +0 -207
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172945.vue +0 -211
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172949.vue +0 -212
- package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611173010.vue +0 -212
- package/.history/src/base-client/components/common/XForm/XFormItem_20250508134122.vue +0 -1320
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171604.vue +0 -1332
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171613.vue +0 -1331
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171703.vue +0 -1331
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171720.vue +0 -1331
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527174327.vue +0 -1339
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612092804.vue +0 -731
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612112546.vue +0 -748
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612113808.vue +0 -748
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115237.vue +0 -1071
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115346.vue +0 -1078
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115350.vue +0 -1077
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115415.vue +0 -1077
- package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115429.vue +0 -1077
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611091619.vue +0 -442
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092547.vue +0 -442
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092552.vue +0 -442
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092744.vue +0 -475
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092955.vue +0 -475
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092957.vue +0 -475
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095652.vue +0 -477
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095701.vue +0 -477
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095704.vue +0 -477
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100005.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100011.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100014.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100833.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100853.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100940.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101011.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101013.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101014.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101159.vue +0 -473
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101238.vue +0 -474
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101240.vue +0 -474
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101242.vue +0 -474
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101404.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101410.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101459.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101500.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101502.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101504.vue +0 -472
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101610.vue +0 -501
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101700.vue +0 -501
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101702.vue +0 -501
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101741.vue +0 -504
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101749.vue +0 -504
- package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101759.vue +0 -504
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611091349.vue +0 -131
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105854.vue +0 -160
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105902.vue +0 -160
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105924.vue +0 -160
- package/.history/src/base-client/components/his/XHisEditor/dome_20250611105932.vue +0 -158
- package/.history/src/base-client/components/his/XList/XList_20250609135848.vue +0 -173
- package/.history/src/base-client/components/his/XList/XList_20250609141026.vue +0 -222
- package/.history/src/base-client/components/his/XList/XList_20250609141035.vue +0 -229
- package/.history/src/base-client/components/his/XList/XList_20250609141103.vue +0 -229
- package/.history/src/base-client/components/his/XList/XList_20250609141105.vue +0 -229
- package/.history/src/base-client/components/his/XList/XList_20250609141334.vue +0 -241
- package/.history/src/base-client/components/his/XList/XList_20250609141404.vue +0 -241
- package/.history/src/base-client/components/his/XList/XList_20250609141406.vue +0 -241
- package/.history/src/base-client/components/his/XList/XList_20250609141801.vue +0 -245
- package/.history/src/base-client/components/his/XList/XList_20250609142033.vue +0 -245
- package/.history/src/base-client/components/his/XList/XList_20250609142038.vue +0 -245
- package/.history/src/base-client/components/his/XList/XList_20250609142435.vue +0 -255
- package/.history/src/base-client/components/his/XList/XList_20250609142503.vue +0 -255
- package/.history/src/base-client/components/his/XList/XList_20250609142504.vue +0 -255
- package/.history/src/base-client/components/his/XList/XList_20250609143012.vue +0 -270
- package/.history/src/base-client/components/his/XList/XList_20250609143044.vue +0 -270
- package/.history/src/base-client/components/his/XList/XList_20250609143046.vue +0 -270
- package/.history/src/base-client/components/his/XList/XList_20250609143210.vue +0 -270
- package/.history/src/base-client/components/his/XList/XList_20250609144339.vue +0 -294
- package/.history/src/base-client/components/his/XList/XList_20250609144410.vue +0 -294
- package/.history/src/base-client/components/his/XList/XList_20250609144412.vue +0 -294
- package/.history/src/base-client/components/his/XList/XList_20250609144647.vue +0 -303
- package/.history/src/base-client/components/his/XList/XList_20250609144716.vue +0 -303
- package/.history/src/base-client/components/his/XList/XList_20250609144729.vue +0 -303
- package/.history/src/base-client/components/his/XList/XList_20250609151232.vue +0 -288
- package/.history/src/base-client/components/his/XList/XList_20250609151247.vue +0 -288
- package/.history/src/base-client/components/his/XList/XList_20250609151252.vue +0 -288
- package/.history/src/base-client/components/his/XList/XList_20250609161220.vue +0 -317
- package/.history/src/base-client/components/his/XList/XList_20250609161258.vue +0 -306
- package/.history/src/base-client/components/his/XList/XList_20250609161319.vue +0 -306
- package/.history/src/base-client/components/his/XList/XList_20250609161320.vue +0 -306
- package/.history/src/base-client/components/his/XList/XList_20250704142024.vue +0 -495
- package/.history/src/base-client/components/his/XList/XList_20250704142033.vue +0 -495
- package/.history/src/base-client/components/his/XList/XList_20250704142040.vue +0 -494
- package/.history/src/base-client/components/his/XList/XList_20250704142211.vue +0 -494
- package/.history/src/base-client/components/his/XList/XList_20250704142214.vue +0 -494
- package/.history/src/base-client/components/his/XList/XList_20250704143010.vue +0 -495
- package/.history/src/base-client/components/his/XList/XList_20250704143203.vue +0 -495
- package/.history/src/base-client/components/his/XList/XList_20250707095101.vue +0 -492
- package/.history/src/base-client/components/his/XList/XList_20250707100152.vue +0 -492
- package/.history/src/base-client/components/his/XList/XList_20250707100200.vue +0 -485
- package/.history/src/base-client/components/his/XList/XList_20250707100208.vue +0 -485
- package/.history/src/base-client/components/his/XList/XList_20250707100259.vue +0 -488
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250609151519.vue +0 -222
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155514.vue +0 -183
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155556.vue +0 -183
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155600.vue +0 -183
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181609.vue +0 -206
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181629.vue +0 -209
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095553.vue +0 -242
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095610.vue +0 -242
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095612.vue +0 -242
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100041.vue +0 -251
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100047.vue +0 -251
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100054.vue +0 -250
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100105.vue +0 -250
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100107.vue +0 -250
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100114.vue +0 -250
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140844.vue +0 -238
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140910.vue +0 -238
- package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140912.vue +0 -238
- package/Users/objecrt/af-vue2-client/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +0 -36
- package/src/base-client/components/TreeList/TreeList.vue +0 -91
- package/src/base-client/components/TreeList/TreeNode.vue +0 -81
- package/src/base-client/components/common/XCardSet/XTiltle.vue +0 -191
package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155514.vue
DELETED
@@ -1,183 +0,0 @@
|
|
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>
|
package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155556.vue
DELETED
@@ -1,183 +0,0 @@
|
|
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>
|
package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155600.vue
DELETED
@@ -1,183 +0,0 @@
|
|
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>
|