vue2-client 1.14.33 → 1.14.35

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.14.33",
3
+ "version": "1.14.35",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -118,7 +118,7 @@ export default {
118
118
  // 生成地址串中省市区街道信息禁止修改
119
119
  readOnlyDivisions: false,
120
120
  // cur 位置
121
- curPosition: null,
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: 600px;
439
+ height: 50vh;
440
440
  text-align: center
441
441
  }
442
442
 
@@ -1,261 +1,252 @@
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>
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="Monday" slot-scope="text, record">
11
+ <div class="time-title">
12
+ <a-button v-for="(item, index) in record.Monday" :key="index" @click="handleShiftChange('Monday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
13
+ </div>
14
+ </template>
15
+ <template slot="Tuesday" slot-scope="text, record">
16
+ <div class="time-title">
17
+ <a-button v-for="(item, index) in record.Tuesday" :key="index" @click="handleShiftChange('Tuesday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
18
+ </div>
19
+ </template>
20
+ <template slot="Wednesday" slot-scope="text, record">
21
+ <div class="time-title">
22
+ <a-button v-for="(item, index) in record.Wednesday" :key="index" @click="handleShiftChange('Wednesday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
23
+ </div>
24
+ </template>
25
+ <template slot="Thursday" slot-scope="text, record">
26
+ <div class="time-title">
27
+ <a-button v-for="(item, index) in record.Thursday" :key="index" @click="handleShiftChange('Thursday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
28
+ </div>
29
+ </template>
30
+ <template slot="Friday" slot-scope="text, record">
31
+ <div class="time-title">
32
+ <a-button v-for="(item, index) in record.Friday" :key="index" @click="handleShiftChange('Friday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
33
+ </div>
34
+ </template>
35
+ <template slot="Saturday" slot-scope="text, record">
36
+ <div class="time-title">
37
+ <a-button v-for="(item, index) in record.Saturday" :key="index" @click="handleShiftChange('Saturday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
38
+ </div>
39
+ </template>
40
+ <template slot="Sunday" slot-scope="text, record">
41
+ <div class="time-title">
42
+ <a-button v-for="(item, index) in record.Sunday" :key="index" @click="handleShiftChange('Sunday', index, record)">{{item === 1 || item === '1' ? '坐诊' : '休息'}}</a-button>
43
+ </div>
44
+ </template>
45
+ <template slot="sk_limit" slot-scope="text, record">
46
+ <a-input-number id="inputNumber" v-model="record.sk_limit" :min="configData.sk_limitMin" :max="configData.sk_limitMax" />
47
+ </template>
48
+ </a-table>
49
+ </template>
50
+ <script>
51
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
52
+
53
+ export default {
54
+ data () {
55
+ return {
56
+ data: [],
57
+ // 列配置
58
+ columns: [],
59
+ // 列名
60
+ columnNames: [],
61
+ // 选中的行键值集合
62
+ selectedRows: [],
63
+ // 选中的行信息集合
64
+ selectedRowKeys: [],
65
+ // 原始数据备份
66
+ originalData: [],
67
+ // 配置参数
68
+ configData: {},
69
+ // 排班时间表
70
+ shiftTable: [
71
+ {
72
+ title: '周一',
73
+ key: 'Monday',
74
+ dataIndex: 'Monday',
75
+ scopedSlots: { customRender: 'Monday' },
76
+ align: 'center'
77
+ },
78
+ {
79
+ title: '周二',
80
+ key: 'Tuesday',
81
+ dataIndex: 'Tuesday',
82
+ scopedSlots: { customRender: 'Tuesday' },
83
+ align: 'center'
84
+ },
85
+ {
86
+ title: '周三',
87
+ key: 'Wednesday',
88
+ dataIndex: 'Wednesday',
89
+ scopedSlots: { customRender: 'Wednesday' },
90
+ align: 'center'
91
+ },
92
+ {
93
+ title: '周四',
94
+ key: 'Thursday',
95
+ dataIndex: 'Thursday',
96
+ scopedSlots: { customRender: 'Thursday' },
97
+ align: 'center'
98
+ },
99
+ {
100
+ title: '周五',
101
+ key: 'Friday',
102
+ dataIndex: 'Friday',
103
+ scopedSlots: { customRender: 'Friday' },
104
+ align: 'center'
105
+ },
106
+ {
107
+ title: '周六',
108
+ key: 'Saturday',
109
+ dataIndex: 'Saturday',
110
+ scopedSlots: { customRender: 'Saturday' },
111
+ align: 'center'
112
+ },
113
+ {
114
+ title: '周日',
115
+ key: 'Sunday',
116
+ dataIndex: 'Sunday',
117
+ scopedSlots: { customRender: 'Sunday' },
118
+ align: 'center'
119
+ },
120
+ {
121
+ title: '排班数',
122
+ key: 'sk_limit',
123
+ dataIndex: 'sk_limit',
124
+ scopedSlots: { customRender: 'sk_limit' },
125
+ align: 'center'
126
+ }
127
+ ]
128
+ }
129
+ },
130
+ props: {
131
+ // 配置名
132
+ queryParamsName: {
133
+ type: String,
134
+ default: ''
135
+ },
136
+ // 服务名
137
+ serviceName: {
138
+ type: String,
139
+ default: 'af-his'
140
+ }
141
+ },
142
+ computed: {
143
+ rowSelection () {
144
+ return {
145
+ selectedRowKeys: this.selectedRowKeys,
146
+ onChange: (selectedRowKeys, selectedRows) => {
147
+ this.onSelectChange(selectedRowKeys, selectedRows)
148
+ }
149
+ }
150
+ }
151
+ },
152
+ mounted () {},
153
+ methods: {
154
+ handleShiftChange (day, index, record) {
155
+ // 找到当前记录在data中的索引
156
+ const dataIndex = this.data.findIndex(item => item.id === record.id)
157
+ if (dataIndex === -1) return
158
+ // 获取当前状态
159
+ const currentValue = record[day][index]
160
+ const newValue = currentValue === 1 || currentValue === '1' ? 0 : 1
161
+ // 更新按钮显示
162
+ this.$set(record[day], index, newValue)
163
+ // 同步更新data中的数据
164
+ this.$set(this.data[dataIndex][day], index, newValue)
165
+ },
166
+ onSelectChange (selectedRowKeys, selectedRows) {
167
+ this.selectedRowKeys = selectedRowKeys
168
+ this.selectedRows = selectedRows
169
+ },
170
+ // 获取选中的行数据
171
+ getSelectedRowData () {
172
+ return this.selectedRows
173
+ },
174
+ // 获取全部数据
175
+ getAllTable () {
176
+ return this.data
177
+ },
178
+ // 初始化数据
179
+ async init (queryParamsName) {
180
+ getConfigByName(queryParamsName, this.serviceName, result => {
181
+ this.configData = result
182
+ runLogic(result.dataSource, {}, this.serviceName).then(res => {
183
+ this.columns = []
184
+ this.columns = JSON.parse(JSON.stringify(this.configData.columns))
185
+ for (let i = 0; i < this.shiftTable.length; i++) {
186
+ this.columns.push(this.shiftTable[i])
187
+ }
188
+ if (res && Array.isArray(res)) {
189
+ const weekDays = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
190
+ const shifts = ['am', 'pm', 'evening']
191
+ let key = 0
192
+ this.data = res.map(item => {
193
+ const scheduleData = {
194
+ key: key++
195
+ }
196
+ this.configData.columnsName.forEach(columnName => { scheduleData[columnName] = item[columnName] })
197
+ weekDays.forEach(day => {
198
+ scheduleData[day.charAt(0).toUpperCase() + day.slice(1)] = shifts.map(shift => item[`f_${day}_${shift}`] === '1' ? 1 : 0)
199
+ })
200
+ return scheduleData
201
+ })
202
+ // 保存原始数据
203
+ this.originalData = JSON.parse(JSON.stringify(this.data))
204
+ }
205
+ })
206
+ })
207
+ },
208
+ // 查询数据函数
209
+ filterTableData (filters) {
210
+ if (!filters || Object.keys(filters).length === 0) {
211
+ // 如果没有过滤条件,恢复原始数据
212
+ this.data = JSON.parse(JSON.stringify(this.originalData))
213
+ return
214
+ }
215
+ // 从原始数据开始过滤
216
+ this.data = this.originalData.filter(item => {
217
+ // 检查每一项是否满足所有过滤条件
218
+ return Object.entries(filters).every(([key, value]) => {
219
+ // 如果过滤值是字符串,进行模糊匹配
220
+ if (typeof value === 'string') {
221
+ return item[key] && item[key].toString().toLowerCase().includes(value.toLowerCase())
222
+ }
223
+ // 如果过滤值是数字,进行精确匹配
224
+ return item[key] === value
225
+ })
226
+ })
227
+ }
228
+ },
229
+ watch: {
230
+ queryParamsName: {
231
+ handler (newValue) {
232
+ this.init(newValue)
233
+ },
234
+ deep: true,
235
+ immediate: true
236
+ }
237
+ }
238
+ }
239
+ </script>
240
+
241
+ <style scoped type="less">
242
+ .time-title {
243
+ display: flex !important;
244
+ flex-direction: column !important;
245
+ align-items: center !important;
246
+ }
247
+ ::v-deep .ant-table-thead > tr > th,
248
+ ::v-deep .ant-table-tbody > tr > td {
249
+ padding: 8px 16px !important;
250
+ overflow-wrap: break-word;
251
+ }
252
+ </style>
@@ -1,23 +1,29 @@
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>
1
+ <template>
2
+ <XShiftSchedule
3
+ :query-params-name="queryParamsName"
4
+ :service-name="serviceName"
5
+ >
6
+ </XShiftSchedule>
7
+ </template>
8
+
9
+ <script>
10
+
11
+ import XShiftSchedule from './XShiftSchedule.vue'
12
+
13
+ export default {
14
+ components: {
15
+ XShiftSchedule
16
+ },
17
+ data () {
18
+ return {
19
+ queryParamsName: 'schedulingRuleConfigurationConfig',
20
+ serviceName: 'af-his'
21
+ }
22
+ }
23
+ }
24
+
25
+ </script>
26
+
27
+ <style scoped lang="less">
28
+
29
+ </style>
@@ -0,0 +1,17 @@
1
+ <script>
2
+ import ThreeTestOrders from './threeTestOrders.vue'
3
+ export default {
4
+ components: {
5
+ ThreeTestOrders
6
+ }
7
+ }
8
+ </script>
9
+
10
+ <template>
11
+ <three-test-orders>
12
+ </three-test-orders>
13
+ </template>
14
+
15
+ <style scoped lang="less">
16
+
17
+ </style>