vue2-client 1.14.32 → 1.14.34
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 +1 -1
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +3 -3
- package/src/base-client/components/common/XReport/print.js +186 -186
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +4 -3
- package/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +261 -0
- package/src/base-client/components/his/XShiftSchedule/dome.vue +23 -0
- package/src/pages/userInfoDetailManage/index.vue +3 -3
- package/src/utils/map-utils.js +47 -47
package/package.json
CHANGED
|
@@ -118,7 +118,7 @@ export default {
|
|
|
118
118
|
// 生成地址串中省市区街道信息禁止修改
|
|
119
119
|
readOnlyDivisions: false,
|
|
120
120
|
// cur 位置
|
|
121
|
-
curPosition:
|
|
121
|
+
curPosition: [108.878703, 34.223701],
|
|
122
122
|
searchFlag: false,
|
|
123
123
|
}
|
|
124
124
|
},
|
|
@@ -291,7 +291,7 @@ export default {
|
|
|
291
291
|
|
|
292
292
|
this.addressObj.address = addressMatch ? addressMatch[1].trim() : null
|
|
293
293
|
const label = labelMatch ? labelMatch[1].trim() : null
|
|
294
|
-
this.addressObj.address = this.mergeAddressAndLabel(this.addressObj.address, label)
|
|
294
|
+
this.addressObj.address = this.addressObj.address != null ? this.mergeAddressAndLabel(this.addressObj.address, label) : labelMatch[1].trim()
|
|
295
295
|
this.addressObj.lng_lat = coordinatesMatch ? coordinatesMatch[1] : ''
|
|
296
296
|
|
|
297
297
|
// 更新地图中心和标记位置
|
|
@@ -436,7 +436,7 @@ export default {
|
|
|
436
436
|
#addressSearchCombobox_map {
|
|
437
437
|
margin: 1% 0;
|
|
438
438
|
width: 100%;
|
|
439
|
-
height:
|
|
439
|
+
height: 50vh;
|
|
440
440
|
text-align: center
|
|
441
441
|
}
|
|
442
442
|
|
|
@@ -1,186 +1,186 @@
|
|
|
1
|
-
// print.js
|
|
2
|
-
|
|
3
|
-
export function printElement (elementToPrint) {
|
|
4
|
-
// 创建一个新的浏览器窗口
|
|
5
|
-
const printWindow = window.open('', '_blank', 'height=1024,width=768')
|
|
6
|
-
// 设置新窗口的文档内容
|
|
7
|
-
printWindow.document.write(`
|
|
8
|
-
<html>
|
|
9
|
-
<head>
|
|
10
|
-
<title>Print</title>
|
|
11
|
-
<style>
|
|
12
|
-
@page {
|
|
13
|
-
size: auto;
|
|
14
|
-
margin: 0mm;
|
|
15
|
-
}
|
|
16
|
-
html, body {
|
|
17
|
-
margin: 0;
|
|
18
|
-
padding: 0;
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
}
|
|
22
|
-
#print-container {
|
|
23
|
-
display: none
|
|
24
|
-
}
|
|
25
|
-
.img{
|
|
26
|
-
width: 95%;
|
|
27
|
-
height: 180px;
|
|
28
|
-
object-fit: cover;
|
|
29
|
-
}
|
|
30
|
-
.reportMain {
|
|
31
|
-
text-align: center;
|
|
32
|
-
margin: 0 auto;
|
|
33
|
-
font-size: 16px;
|
|
34
|
-
color: #000;
|
|
35
|
-
background-color: #fff;
|
|
36
|
-
padding: 15px;
|
|
37
|
-
border-radius: 8px;
|
|
38
|
-
|
|
39
|
-
.reportTitle {
|
|
40
|
-
font-weight: bold;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.subTitle {
|
|
44
|
-
display: flex;
|
|
45
|
-
justify-content: space-between;
|
|
46
|
-
margin-bottom: 1%;
|
|
47
|
-
|
|
48
|
-
.subTitleItems {
|
|
49
|
-
max-width: 30%;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.inputsDiv {
|
|
54
|
-
display: flex;
|
|
55
|
-
justify-content: space-between;
|
|
56
|
-
.inputsDivItem {
|
|
57
|
-
display: flex;
|
|
58
|
-
align-items: center;
|
|
59
|
-
padding: 0 4px;
|
|
60
|
-
white-space: nowrap;
|
|
61
|
-
.inputsDivItemLabel {
|
|
62
|
-
padding: 0 4px;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.reportTable {
|
|
68
|
-
width: 100%;
|
|
69
|
-
border-collapse: collapse;
|
|
70
|
-
table-layout:fixed;
|
|
71
|
-
word-break:break-all;
|
|
72
|
-
text-align: center;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
.reportMainForDisplay {
|
|
76
|
-
text-align: center;
|
|
77
|
-
margin: 10% auto;
|
|
78
|
-
font-size: 16px;
|
|
79
|
-
color: #000;
|
|
80
|
-
background-color: #fff;
|
|
81
|
-
padding: 15px;
|
|
82
|
-
border-radius: 8px;
|
|
83
|
-
|
|
84
|
-
.reportTitle {
|
|
85
|
-
font-weight: bold;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.subTitle {
|
|
89
|
-
display: flex;
|
|
90
|
-
justify-content: space-between;
|
|
91
|
-
|
|
92
|
-
.subTitleItems {
|
|
93
|
-
max-width: 30%;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.inputsDiv {
|
|
98
|
-
display: flex;
|
|
99
|
-
justify-content: space-around;
|
|
100
|
-
.inputsDivItem {
|
|
101
|
-
display: flex;
|
|
102
|
-
align-items: center;
|
|
103
|
-
padding: 0 4px;
|
|
104
|
-
white-space: nowrap;
|
|
105
|
-
.inputsDivItemLabel {
|
|
106
|
-
padding: 0 4px;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.reportTable {
|
|
112
|
-
width: 100%;
|
|
113
|
-
border-collapse: collapse;
|
|
114
|
-
table-layout:fixed;
|
|
115
|
-
word-break:break-all;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
.reportMainNoPadding {
|
|
119
|
-
text-align: center;
|
|
120
|
-
margin: 0 auto;
|
|
121
|
-
font-size: 16px;
|
|
122
|
-
color: #000;
|
|
123
|
-
background-color: #fff;
|
|
124
|
-
border-radius: 8px;
|
|
125
|
-
|
|
126
|
-
.reportTitle {
|
|
127
|
-
font-weight: bold;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.subTitle {
|
|
131
|
-
display: flex;
|
|
132
|
-
justify-content: space-between;
|
|
133
|
-
|
|
134
|
-
.subTitleItems {
|
|
135
|
-
max-width: 30%;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.inputsDiv {
|
|
140
|
-
display: flex;
|
|
141
|
-
justify-content: space-between;
|
|
142
|
-
.inputsDivItem {
|
|
143
|
-
display: flex;
|
|
144
|
-
align-items: center;
|
|
145
|
-
padding: 0 4px;
|
|
146
|
-
white-space: nowrap;
|
|
147
|
-
.inputsDivItemLabel {
|
|
148
|
-
padding: 0 4px;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.reportTable {
|
|
154
|
-
width: 100%;
|
|
155
|
-
border-collapse: collapse;
|
|
156
|
-
table-layout:fixed;
|
|
157
|
-
word-break:break-all;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
.tools{
|
|
161
|
-
position: fixed;
|
|
162
|
-
right: 2%;
|
|
163
|
-
text-align: right;
|
|
164
|
-
width: 60%;
|
|
165
|
-
cursor: pointer;
|
|
166
|
-
.toolsItem{
|
|
167
|
-
width: 15%;
|
|
168
|
-
margin-right: 3%;
|
|
169
|
-
display: inline-block;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
</style>
|
|
173
|
-
</head>
|
|
174
|
-
<body>
|
|
175
|
-
<!-- 将需要打印的元素内容复制到新窗口中 -->
|
|
176
|
-
${elementToPrint.innerHTML}
|
|
177
|
-
</body>
|
|
178
|
-
</html>
|
|
179
|
-
`)
|
|
180
|
-
// 延迟执行打印,以确保新窗口的内容已加载完成
|
|
181
|
-
printWindow.document.close() // 关闭文档流,确保内容完全加载
|
|
182
|
-
setTimeout(() => {
|
|
183
|
-
printWindow.print() // 调用打印方法
|
|
184
|
-
printWindow.close()
|
|
185
|
-
}, 500) // 延迟500毫秒后执行打印
|
|
186
|
-
}
|
|
1
|
+
// print.js
|
|
2
|
+
|
|
3
|
+
export function printElement (elementToPrint) {
|
|
4
|
+
// 创建一个新的浏览器窗口
|
|
5
|
+
const printWindow = window.open('', '_blank', 'height=1024,width=768')
|
|
6
|
+
// 设置新窗口的文档内容
|
|
7
|
+
printWindow.document.write(`
|
|
8
|
+
<html>
|
|
9
|
+
<head>
|
|
10
|
+
<title>Print</title>
|
|
11
|
+
<style>
|
|
12
|
+
@page {
|
|
13
|
+
size: auto;
|
|
14
|
+
margin: 0mm;
|
|
15
|
+
}
|
|
16
|
+
html, body {
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
}
|
|
22
|
+
#print-container {
|
|
23
|
+
display: none
|
|
24
|
+
}
|
|
25
|
+
.img{
|
|
26
|
+
width: 95%;
|
|
27
|
+
height: 180px;
|
|
28
|
+
object-fit: cover;
|
|
29
|
+
}
|
|
30
|
+
.reportMain {
|
|
31
|
+
text-align: center;
|
|
32
|
+
margin: 0 auto;
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
color: #000;
|
|
35
|
+
background-color: #fff;
|
|
36
|
+
padding: 15px;
|
|
37
|
+
border-radius: 8px;
|
|
38
|
+
|
|
39
|
+
.reportTitle {
|
|
40
|
+
font-weight: bold;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.subTitle {
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
margin-bottom: 1%;
|
|
47
|
+
|
|
48
|
+
.subTitleItems {
|
|
49
|
+
max-width: 30%;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.inputsDiv {
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: space-between;
|
|
56
|
+
.inputsDivItem {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
padding: 0 4px;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
.inputsDivItemLabel {
|
|
62
|
+
padding: 0 4px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.reportTable {
|
|
68
|
+
width: 100%;
|
|
69
|
+
border-collapse: collapse;
|
|
70
|
+
table-layout:fixed;
|
|
71
|
+
word-break:break-all;
|
|
72
|
+
text-align: center;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.reportMainForDisplay {
|
|
76
|
+
text-align: center;
|
|
77
|
+
margin: 10% auto;
|
|
78
|
+
font-size: 16px;
|
|
79
|
+
color: #000;
|
|
80
|
+
background-color: #fff;
|
|
81
|
+
padding: 15px;
|
|
82
|
+
border-radius: 8px;
|
|
83
|
+
|
|
84
|
+
.reportTitle {
|
|
85
|
+
font-weight: bold;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.subTitle {
|
|
89
|
+
display: flex;
|
|
90
|
+
justify-content: space-between;
|
|
91
|
+
|
|
92
|
+
.subTitleItems {
|
|
93
|
+
max-width: 30%;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.inputsDiv {
|
|
98
|
+
display: flex;
|
|
99
|
+
justify-content: space-around;
|
|
100
|
+
.inputsDivItem {
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
padding: 0 4px;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
.inputsDivItemLabel {
|
|
106
|
+
padding: 0 4px;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.reportTable {
|
|
112
|
+
width: 100%;
|
|
113
|
+
border-collapse: collapse;
|
|
114
|
+
table-layout:fixed;
|
|
115
|
+
word-break:break-all;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
.reportMainNoPadding {
|
|
119
|
+
text-align: center;
|
|
120
|
+
margin: 0 auto;
|
|
121
|
+
font-size: 16px;
|
|
122
|
+
color: #000;
|
|
123
|
+
background-color: #fff;
|
|
124
|
+
border-radius: 8px;
|
|
125
|
+
|
|
126
|
+
.reportTitle {
|
|
127
|
+
font-weight: bold;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.subTitle {
|
|
131
|
+
display: flex;
|
|
132
|
+
justify-content: space-between;
|
|
133
|
+
|
|
134
|
+
.subTitleItems {
|
|
135
|
+
max-width: 30%;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.inputsDiv {
|
|
140
|
+
display: flex;
|
|
141
|
+
justify-content: space-between;
|
|
142
|
+
.inputsDivItem {
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
padding: 0 4px;
|
|
146
|
+
white-space: nowrap;
|
|
147
|
+
.inputsDivItemLabel {
|
|
148
|
+
padding: 0 4px;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.reportTable {
|
|
154
|
+
width: 100%;
|
|
155
|
+
border-collapse: collapse;
|
|
156
|
+
table-layout:fixed;
|
|
157
|
+
word-break:break-all;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
.tools{
|
|
161
|
+
position: fixed;
|
|
162
|
+
right: 2%;
|
|
163
|
+
text-align: right;
|
|
164
|
+
width: 60%;
|
|
165
|
+
cursor: pointer;
|
|
166
|
+
.toolsItem{
|
|
167
|
+
width: 15%;
|
|
168
|
+
margin-right: 3%;
|
|
169
|
+
display: inline-block;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
</style>
|
|
173
|
+
</head>
|
|
174
|
+
<body>
|
|
175
|
+
<!-- 将需要打印的元素内容复制到新窗口中 -->
|
|
176
|
+
${elementToPrint.innerHTML}
|
|
177
|
+
</body>
|
|
178
|
+
</html>
|
|
179
|
+
`)
|
|
180
|
+
// 延迟执行打印,以确保新窗口的内容已加载完成
|
|
181
|
+
printWindow.document.close() // 关闭文档流,确保内容完全加载
|
|
182
|
+
setTimeout(() => {
|
|
183
|
+
printWindow.print() // 调用打印方法
|
|
184
|
+
printWindow.close()
|
|
185
|
+
}, 500) // 延迟500毫秒后执行打印
|
|
186
|
+
}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
<template v-else-if="cell.type === 'slot'">
|
|
27
27
|
<template
|
|
28
|
-
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse','x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar', 'x-time-select' ,'x-checkbox', 'x-title', 'x-select', 'x-tree-rows', 'x-three-test-orders'].includes(cell.slotType)">
|
|
28
|
+
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse','x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar', 'x-time-select' ,'x-checkbox', 'x-title', 'x-select', 'x-tree-rows', 'x-three-test-orders', 'x-shift-schedule'].includes(cell.slotType)">
|
|
29
29
|
<component
|
|
30
30
|
:is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
|
|
31
31
|
:key="cellIndex"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
</template>
|
|
64
64
|
<template v-else-if="cell.type === 'slot'">
|
|
65
65
|
<template
|
|
66
|
-
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse', 'x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar', 'x-time-select','x-checkbox', 'x-title', 'x-select', 'x-tree-rows', 'x-three-test-orders'].includes(cell.slotType)">
|
|
66
|
+
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse', 'x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar', 'x-time-select','x-checkbox', 'x-title', 'x-select', 'x-tree-rows', 'x-three-test-orders', 'x-shift-schedule'].includes(cell.slotType)">
|
|
67
67
|
<component
|
|
68
68
|
:is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
|
|
69
69
|
:key="cellIndex"
|
|
@@ -124,7 +124,8 @@ export default {
|
|
|
124
124
|
XTitle: () => import('@vue2-client/base-client/components/his/XTitle/XTitle.vue'),
|
|
125
125
|
XSelect: () => import('@vue2-client/base-client/components/his/XSelect/XSelect.vue'),
|
|
126
126
|
XTreeRows: () => import('@vue2-client/base-client/components/his/XTreeRows/XTreeRows.vue'),
|
|
127
|
-
XThreeTestOrders: () => import('@vue2-client/base-client/components/his/threeTestOrders/threeTestOrders.vue')
|
|
127
|
+
XThreeTestOrders: () => import('@vue2-client/base-client/components/his/threeTestOrders/threeTestOrders.vue'),
|
|
128
|
+
XShiftSchedule: () => import('@vue2-client/base-client/components/his/XShiftSchedule/XShiftSchedule.vue')
|
|
128
129
|
},
|
|
129
130
|
props: {
|
|
130
131
|
// 每一行的配置
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a-table
|
|
3
|
+
:columns="columns"
|
|
4
|
+
:data-source="data"
|
|
5
|
+
:rowSelection="rowSelection"
|
|
6
|
+
>
|
|
7
|
+
<span slot="time" class="time-title">
|
|
8
|
+
<span>上</span>
|
|
9
|
+
<span>下</span>
|
|
10
|
+
<span>晚</span>
|
|
11
|
+
</span>
|
|
12
|
+
<template slot="Monday" slot-scope="text, record">
|
|
13
|
+
<div class="time-title">
|
|
14
|
+
<a-button v-for="(item, index) in record.Monday" :key="index" @click="handleShiftChange('Monday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<template slot="Tuesday" slot-scope="text, record">
|
|
18
|
+
<div class="time-title">
|
|
19
|
+
<a-button v-for="(item, index) in record.Tuesday" :key="index" @click="handleShiftChange('Tuesday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
<template slot="Wednesday" slot-scope="text, record">
|
|
23
|
+
<div class="time-title">
|
|
24
|
+
<a-button v-for="(item, index) in record.Wednesday" :key="index" @click="handleShiftChange('Wednesday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
<template slot="Thursday" slot-scope="text, record">
|
|
28
|
+
<div class="time-title">
|
|
29
|
+
<a-button v-for="(item, index) in record.Thursday" :key="index" @click="handleShiftChange('Thursday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
<template slot="Friday" slot-scope="text, record">
|
|
33
|
+
<div class="time-title">
|
|
34
|
+
<a-button v-for="(item, index) in record.Friday" :key="index" @click="handleShiftChange('Friday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
<template slot="Saturday" slot-scope="text, record">
|
|
38
|
+
<div class="time-title">
|
|
39
|
+
<a-button v-for="(item, index) in record.Saturday" :key="index" @click="handleShiftChange('Saturday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
<template slot="Sunday" slot-scope="text, record">
|
|
43
|
+
<div class="time-title">
|
|
44
|
+
<a-button v-for="(item, index) in record.Sunday" :key="index" @click="handleShiftChange('Sunday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
<template slot="sk_limit" slot-scope="text, record">
|
|
48
|
+
<a-input-number id="inputNumber" v-model="record.sk_limit" :min="1" :max="100" />
|
|
49
|
+
</template>
|
|
50
|
+
</a-table>
|
|
51
|
+
</template>
|
|
52
|
+
<script>
|
|
53
|
+
import { runLogic } from '@vue2-client/services/api/common'
|
|
54
|
+
|
|
55
|
+
const columns = [
|
|
56
|
+
{
|
|
57
|
+
title: '科室',
|
|
58
|
+
dataIndex: 'dept',
|
|
59
|
+
key: 'dept',
|
|
60
|
+
scopedSlots: { customRender: 'dept' },
|
|
61
|
+
align: 'center'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: '人员',
|
|
65
|
+
dataIndex: 'personnel',
|
|
66
|
+
key: 'personnel',
|
|
67
|
+
align: 'center'
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: '职位',
|
|
71
|
+
dataIndex: 'position',
|
|
72
|
+
key: 'position',
|
|
73
|
+
align: 'center'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: '上/下/晚',
|
|
77
|
+
dataIndex: 'time',
|
|
78
|
+
key: 'time',
|
|
79
|
+
scopedSlots: { customRender: 'time' },
|
|
80
|
+
align: 'center'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
title: '周一',
|
|
84
|
+
key: 'Monday',
|
|
85
|
+
dataIndex: 'Monday',
|
|
86
|
+
scopedSlots: { customRender: 'Monday' },
|
|
87
|
+
align: 'center'
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
title: '周二',
|
|
91
|
+
key: 'Tuesday',
|
|
92
|
+
dataIndex: 'Tuesday',
|
|
93
|
+
scopedSlots: { customRender: 'Tuesday' },
|
|
94
|
+
align: 'center'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
title: '周三',
|
|
98
|
+
key: 'Wednesday',
|
|
99
|
+
dataIndex: 'Wednesday',
|
|
100
|
+
scopedSlots: { customRender: 'Wednesday' },
|
|
101
|
+
align: 'center'
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
title: '周四',
|
|
105
|
+
key: 'Thursday',
|
|
106
|
+
dataIndex: 'Thursday',
|
|
107
|
+
scopedSlots: { customRender: 'Thursday' },
|
|
108
|
+
align: 'center'
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
title: '周五',
|
|
112
|
+
key: 'Friday',
|
|
113
|
+
dataIndex: 'Friday',
|
|
114
|
+
scopedSlots: { customRender: 'Friday' },
|
|
115
|
+
align: 'center'
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
title: '周六',
|
|
119
|
+
key: 'Saturday',
|
|
120
|
+
dataIndex: 'Saturday',
|
|
121
|
+
scopedSlots: { customRender: 'Saturday' },
|
|
122
|
+
align: 'center'
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
title: '周日',
|
|
126
|
+
key: 'Sunday',
|
|
127
|
+
dataIndex: 'Sunday',
|
|
128
|
+
scopedSlots: { customRender: 'Sunday' },
|
|
129
|
+
align: 'center'
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
title: '排班数',
|
|
133
|
+
key: 'sk_limit',
|
|
134
|
+
dataIndex: 'sk_limit',
|
|
135
|
+
scopedSlots: { customRender: 'sk_limit' },
|
|
136
|
+
align: 'center'
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
|
|
140
|
+
export default {
|
|
141
|
+
data () {
|
|
142
|
+
return {
|
|
143
|
+
data: [],
|
|
144
|
+
columns,
|
|
145
|
+
weekDate: [],
|
|
146
|
+
// 选中的行键值集合
|
|
147
|
+
selectedRows: [],
|
|
148
|
+
// 选中的行信息集合
|
|
149
|
+
selectedRowKeys: []
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
computed: {
|
|
153
|
+
rowSelection () {
|
|
154
|
+
return {
|
|
155
|
+
selectedRowKeys: this.selectedRowKeys,
|
|
156
|
+
onChange: (selectedRowKeys, selectedRows) => {
|
|
157
|
+
this.onSelectChange(selectedRowKeys, selectedRows)
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
mounted () {
|
|
163
|
+
this.init()
|
|
164
|
+
},
|
|
165
|
+
methods: {
|
|
166
|
+
handleShiftChange (day, index, record) {
|
|
167
|
+
// 找到当前记录在data中的索引
|
|
168
|
+
const dataIndex = this.data.findIndex(item => item.id === record.id)
|
|
169
|
+
if (dataIndex === -1) return
|
|
170
|
+
// 获取当前状态
|
|
171
|
+
const currentValue = record[day][index]
|
|
172
|
+
const newValue = currentValue === 1 || currentValue === '1' ? 0 : 1
|
|
173
|
+
// 更新按钮显示
|
|
174
|
+
this.$set(record[day], index, newValue)
|
|
175
|
+
// 同步更新data中的数据
|
|
176
|
+
this.$set(this.data[dataIndex][day], index, newValue)
|
|
177
|
+
console.log('当前操作的行数据:', this.data[dataIndex])
|
|
178
|
+
},
|
|
179
|
+
onSelectChange (selectedRowKeys, selectedRows) {
|
|
180
|
+
this.selectedRowKeys = selectedRowKeys
|
|
181
|
+
this.selectedRows = selectedRows
|
|
182
|
+
console.log('selectedRows changed: ', selectedRows)
|
|
183
|
+
},
|
|
184
|
+
// 获取选中的行数据
|
|
185
|
+
getSelectedRowData () {
|
|
186
|
+
return this.selectedRows
|
|
187
|
+
},
|
|
188
|
+
getAllTable() {
|
|
189
|
+
return this.data
|
|
190
|
+
},
|
|
191
|
+
init () {
|
|
192
|
+
runLogic('shiftSchedulingLOGIC', {}, 'af-his').then(res => {
|
|
193
|
+
if (res && Array.isArray(res)) {
|
|
194
|
+
let key = 0
|
|
195
|
+
this.data = res.map(item => {
|
|
196
|
+
// 转换排班数据格式
|
|
197
|
+
const scheduleData = {
|
|
198
|
+
key: key++,
|
|
199
|
+
id: item.id,
|
|
200
|
+
dept: item.dept,
|
|
201
|
+
personnel: item.personnel,
|
|
202
|
+
position: item.position || '',
|
|
203
|
+
selected_id: item.selected_id,
|
|
204
|
+
sk_limit: item.sk_limit || 0,
|
|
205
|
+
Monday: [
|
|
206
|
+
item.f_monday_am === '1' ? 1 : 0,
|
|
207
|
+
item.f_monday_pm === '1' ? 1 : 0,
|
|
208
|
+
item.f_monday_evening === '1' ? 1 : 0
|
|
209
|
+
],
|
|
210
|
+
Tuesday: [
|
|
211
|
+
item.f_tuesday_am === '1' ? 1 : 0,
|
|
212
|
+
item.f_tuesday_pm === '1' ? 1 : 0,
|
|
213
|
+
item.f_tuesday_evening === '1' ? 1 : 0
|
|
214
|
+
],
|
|
215
|
+
Wednesday: [
|
|
216
|
+
item.f_wednesday_am === '1' ? 1 : 0,
|
|
217
|
+
item.f_wednesday_pm === '1' ? 1 : 0,
|
|
218
|
+
item.f_wednesday_evening === '1' ? 1 : 0
|
|
219
|
+
],
|
|
220
|
+
Thursday: [
|
|
221
|
+
item.f_thursday_am === '1' ? 1 : 0,
|
|
222
|
+
item.f_thursday_pm === '1' ? 1 : 0,
|
|
223
|
+
item.f_thursday_evening === '1' ? 1 : 0
|
|
224
|
+
],
|
|
225
|
+
Friday: [
|
|
226
|
+
item.f_friday_am === '1' ? 1 : 0,
|
|
227
|
+
item.f_friday_pm === '1' ? 1 : 0,
|
|
228
|
+
item.f_friday_evening === '1' ? 1 : 0
|
|
229
|
+
],
|
|
230
|
+
Saturday: [
|
|
231
|
+
item.f_saturday_am === '1' ? 1 : 0,
|
|
232
|
+
item.f_saturday_pm === '1' ? 1 : 0,
|
|
233
|
+
item.f_saturday_evening === '1' ? 1 : 0
|
|
234
|
+
],
|
|
235
|
+
Sunday: [
|
|
236
|
+
item.f_sunday_am === '1' ? 1 : 0,
|
|
237
|
+
item.f_sunday_pm === '1' ? 1 : 0,
|
|
238
|
+
item.f_sunday_evening === '1' ? 1 : 0
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
return scheduleData
|
|
242
|
+
})
|
|
243
|
+
}
|
|
244
|
+
})
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
</script>
|
|
249
|
+
|
|
250
|
+
<style scoped type="less">
|
|
251
|
+
.time-title {
|
|
252
|
+
display: flex !important;
|
|
253
|
+
flex-direction: column !important;
|
|
254
|
+
align-items: center !important;
|
|
255
|
+
}
|
|
256
|
+
::v-deep .ant-table-thead > tr > th,
|
|
257
|
+
::v-deep .ant-table-tbody > tr > td {
|
|
258
|
+
padding: 8px 16px !important;
|
|
259
|
+
overflow-wrap: break-word;
|
|
260
|
+
}
|
|
261
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<XShiftSchedule>
|
|
3
|
+
</XShiftSchedule>
|
|
4
|
+
</template>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
|
|
8
|
+
import XShiftSchedule from './XShiftSchedule.vue'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
components: {
|
|
12
|
+
XShiftSchedule
|
|
13
|
+
},
|
|
14
|
+
data () {
|
|
15
|
+
return {}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style scoped lang="less">
|
|
22
|
+
|
|
23
|
+
</style>
|
|
@@ -143,8 +143,8 @@ export default {
|
|
|
143
143
|
handler () {
|
|
144
144
|
if (this.userInfo) {
|
|
145
145
|
console.log('userinfo', this.userInfo)
|
|
146
|
-
this.openUserBtnShow = this.userInfo.f_meter_type.includes('物联网表')
|
|
147
|
-
this.valveBtnShow = this.userInfo.f_meter_type.includes('物联网表') && this.userInfo.f_user_state !== '停用'
|
|
146
|
+
this.openUserBtnShow = this.userInfo.f_meter_type.includes('物联网表') && this.login?.r.includes('开户权限')
|
|
147
|
+
this.valveBtnShow = this.userInfo.f_meter_type.includes('物联网表') && this.userInfo.f_user_state !== '停用' && this.login?.r.includes('开关阀权限')
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
150
|
deep: true
|
|
@@ -277,7 +277,7 @@ export default {
|
|
|
277
277
|
},
|
|
278
278
|
mounted () {},
|
|
279
279
|
computed: {
|
|
280
|
-
...mapState('account', { currUser: 'user' }),
|
|
280
|
+
...mapState('account', { currUser: 'user',login: 'login' }),
|
|
281
281
|
...mapState('setting', { isMobile: 'isMobile' })
|
|
282
282
|
}
|
|
283
283
|
}
|
package/src/utils/map-utils.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import AMapLoader from '@amap/amap-jsapi-loader'
|
|
2
|
-
let Amap
|
|
3
|
-
async function GetGDMap (secretKey, key) {
|
|
4
|
-
if (!Amap) {
|
|
5
|
-
window._AMapSecurityConfig = {
|
|
6
|
-
securityJsCode: secretKey
|
|
7
|
-
}
|
|
8
|
-
// 解决高德地图加载报错 ---> 禁止多种API加载方式混用
|
|
9
|
-
AMapLoader.reset()
|
|
10
|
-
Amap = await AMapLoader.load({
|
|
11
|
-
key: key, // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
12
|
-
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
13
|
-
plugins: ['AMap.IndexCluster', 'AMP.MarkerCluster', 'AMap.InfoWindow', 'AMap.HeatMap', 'AMap.HawkEye', 'AMap.DistrictSearch',
|
|
14
|
-
'AMap.ToolBar', 'AMap.Geolocation', 'AMap.MouseTool',
|
|
15
|
-
'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.AutoComplete', 'AMap.Scale'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
16
|
-
AMapUI: {
|
|
17
|
-
version: '1.1', // AMapUI 缺省 1.1
|
|
18
|
-
plugins: ['misc/PositionPicker'] // 需要加载的 AMapUI ui插件
|
|
19
|
-
}
|
|
20
|
-
})
|
|
21
|
-
}
|
|
22
|
-
return Amap
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async function getGDMap (address) {
|
|
26
|
-
new (await GetGDMap()).Geocoder({
|
|
27
|
-
radius: 500 // 范围,默认:500
|
|
28
|
-
}).getLocation(address, function (status, result) {
|
|
29
|
-
if (status === 'complete' && result.geocodes.length) {
|
|
30
|
-
return ({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
|
|
31
|
-
} else {
|
|
32
|
-
// eslint-disable-next-line prefer-promise-reject-errors
|
|
33
|
-
throw new Error('根据经纬度查询地址失败')
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
async function GetLocation (address) {
|
|
39
|
-
return new Promise((resolve, reject) => {
|
|
40
|
-
try {
|
|
41
|
-
resolve(getGDMap(address))
|
|
42
|
-
} catch (e) {
|
|
43
|
-
reject(e)
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
}
|
|
47
|
-
export { GetGDMap, GetLocation }
|
|
1
|
+
import AMapLoader from '@amap/amap-jsapi-loader'
|
|
2
|
+
let Amap
|
|
3
|
+
async function GetGDMap (secretKey, key) {
|
|
4
|
+
if (!Amap) {
|
|
5
|
+
window._AMapSecurityConfig = {
|
|
6
|
+
securityJsCode: secretKey
|
|
7
|
+
}
|
|
8
|
+
// 解决高德地图加载报错 ---> 禁止多种API加载方式混用
|
|
9
|
+
AMapLoader.reset()
|
|
10
|
+
Amap = await AMapLoader.load({
|
|
11
|
+
key: key, // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
12
|
+
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
13
|
+
plugins: ['AMap.IndexCluster', 'AMP.MarkerCluster', 'AMap.InfoWindow', 'AMap.HeatMap', 'AMap.HawkEye', 'AMap.DistrictSearch',
|
|
14
|
+
'AMap.ToolBar', 'AMap.Geolocation', 'AMap.MouseTool',
|
|
15
|
+
'AMap.Geocoder', 'AMap.MarkerClusterer', 'AMap.AutoComplete', 'AMap.Scale'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
16
|
+
AMapUI: {
|
|
17
|
+
version: '1.1', // AMapUI 缺省 1.1
|
|
18
|
+
plugins: ['misc/PositionPicker'] // 需要加载的 AMapUI ui插件
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
return Amap
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async function getGDMap (address) {
|
|
26
|
+
new (await GetGDMap()).Geocoder({
|
|
27
|
+
radius: 500 // 范围,默认:500
|
|
28
|
+
}).getLocation(address, function (status, result) {
|
|
29
|
+
if (status === 'complete' && result.geocodes.length) {
|
|
30
|
+
return ({ lng: result.geocodes[0].location.lng, lat: result.geocodes[0].location.lat })
|
|
31
|
+
} else {
|
|
32
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
|
33
|
+
throw new Error('根据经纬度查询地址失败')
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async function GetLocation (address) {
|
|
39
|
+
return new Promise((resolve, reject) => {
|
|
40
|
+
try {
|
|
41
|
+
resolve(getGDMap(address))
|
|
42
|
+
} catch (e) {
|
|
43
|
+
reject(e)
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
export { GetGDMap, GetLocation }
|