vue2-client 1.15.111 → 1.15.114

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 (17) hide show
  1. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250813154330.vue +389 -0
  2. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250813154338.vue +389 -0
  3. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250813154402.vue +389 -0
  4. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250813154425.vue +389 -0
  5. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250813154428.vue +389 -0
  6. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250813171922.vue +391 -0
  7. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250813171957.vue +391 -0
  8. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250813172004.vue +391 -0
  9. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250813172012.vue +391 -0
  10. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250813172241.vue +391 -0
  11. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250813172242.vue +391 -0
  12. package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +0 -6
  13. package/package.json +1 -1
  14. package/src/base-client/components/his/XChart/XChart.vue +13 -11
  15. package/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +54 -17
  16. package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +12 -10
  17. package/src/router/async/router.map.js +1 -1
@@ -0,0 +1,391 @@
1
+ <template>
2
+ <div v-if="pattern == 'schedule'">
3
+ <a-table
4
+ :columns="columns"
5
+ :data-source="data"
6
+ :rowSelection="rowSelection"
7
+ :scroll="{ y: configData.height == null? '70%' : configData.height }">
8
+ <span slot="time" class="time-title">
9
+ <span v-for="(item, index) in configData.timePeriod" :key="index">{{ item }}</span>
10
+ </span>
11
+ <div v-for="(item, index) in weekDays" :key="index" :slot="item.key" class="week_last_next_btn">
12
+ <a-button slot="lastWeek" icon="left" size="large" @click="handleLastWeek" v-if="item.title == '周一'" />
13
+ <div class="time-title">
14
+ <span>{{ item.title }}</span>
15
+ <span>{{ currentWeekDates[index].toLocaleDateString() }}</span>
16
+ </div>
17
+ <a-button slot="nextWeek" icon="right" size="large" @click="handleNextWeek" v-if="item.title == '周日'"/>
18
+ </div>
19
+ <template :slot="day.key" slot-scope="text, record" v-for="day in shiftTable">
20
+ <div class="time-title" :key="day.key">
21
+ <a-button v-for="(item, index) in record[day.key]" :key="index" @click="handleShiftChange(day.key, index, record)">{{ item === 1 || item === '1' ? '坐诊' : '休息' }}</a-button>
22
+ </div>
23
+ </template>
24
+ <template slot="sk_limit" slot-scope="text, record">
25
+ <a-input-number id="inputNumber" v-model="record.sk_limit" :min="configData.sk_limitMin" :max="configData.sk_limitMax" />
26
+ </template>
27
+ </a-table>
28
+ </div>
29
+ <div v-else-if="pattern == 'form'">
30
+ <a-table :columns="columns" :data-source="data" :row-selection="rowSelection" bordered :scroll="{ y: configData.height == null? '70%' : configData.height }">
31
+ <template v-for="(n, i) in inputColumns" :slot="n.dataIndex" slot-scope="text, record">
32
+ <div class="a-div" :key="i">
33
+ <a-input
34
+ v-for="(item, index) in (Array.isArray(n.row) ? n.row : Array(Number(n.row) || 1).fill(1))"
35
+ :key="index"
36
+ placeholder=""
37
+ class="ant-input"
38
+ v-model="record[n.dataIndex][index + 1]"
39
+ @input="handleInputChange(record, n.dataIndex, index + 1, $event.target.value)"
40
+ :disabled="!isRowSelected(record.key)"/>
41
+ </div>
42
+ </template>
43
+ <div class="a-div" v-for="(n, i) in numberColumns" :slot="n.dataIndex" :key="i">
44
+ <div v-for="(item, index) in (Array.isArray(n.row) ? n.row : Array(Number(n.row) || 1).fill(index + 1))" :key="index" class="number">{{ item }}</div>
45
+ </div>
46
+ </a-table>
47
+ </div>
48
+ </template>
49
+ <script>
50
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
51
+
52
+ export default {
53
+ data () {
54
+ return {
55
+ // 高度
56
+ height: '70%',
57
+ // 输入框数据
58
+ inputData: [],
59
+ // 模式
60
+ pattern: 'schedule',
61
+ data: [],
62
+ // 列配置
63
+ columns: [],
64
+ // 列名
65
+ columnNames: [],
66
+ // 选中的行键值集合
67
+ selectedRows: [],
68
+ // 选中的行信息集合
69
+ selectedRowKeys: [],
70
+ // 原始数据备份
71
+ originalData: [],
72
+ // 配置参数
73
+ configData: {},
74
+ // 当前显示的周次日期
75
+ currentWeekDates: [],
76
+ weekDays: [...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
77
+ const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
78
+ return { title, key }
79
+ })],
80
+ // 排班时间表
81
+ shiftTable: [...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
82
+ const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
83
+ return {
84
+ key, dataIndex: key, scopedSlots: { customRender: key }, slots: { title: key }, align: 'center', width: key === 'Monday' || key === 'Sunday' ? 170 : 120
85
+ }
86
+ }),
87
+ {
88
+ title: '排班数',
89
+ key: 'sk_limit',
90
+ dataIndex: 'sk_limit',
91
+ scopedSlots: { customRender: 'sk_limit' },
92
+ align: 'center'
93
+ }
94
+ ]
95
+ }
96
+ },
97
+ props: {
98
+ // 配置名
99
+ queryParamsName: {
100
+ type: String,
101
+ default: ''
102
+ },
103
+ // 服务名
104
+ serviceName: {
105
+ type: String,
106
+ default: 'af-his'
107
+ }
108
+ },
109
+ computed: {
110
+ rowSelection () {
111
+ return {
112
+ selectedRowKeys: this.selectedRowKeys,
113
+ onChange: (selectedRowKeys, selectedRows) => {
114
+ this.onSelectChange(selectedRowKeys, selectedRows)
115
+ }
116
+ }
117
+ },
118
+ inputColumns () {
119
+ return this.columns.filter(col => col.type === 'input')
120
+ },
121
+ numberColumns () {
122
+ return this.columns.filter(col => col.type === 'number')
123
+ }
124
+ },
125
+ mounted () {
126
+ this.initWeekDates()
127
+ },
128
+ methods: {
129
+ handleShiftChange (day, index, record) {
130
+ // 找到当前记录在data中的索引
131
+ const dataIndex = this.data.findIndex(item => item.id === record.id)
132
+ if (dataIndex === -1) return
133
+ // 获取当前状态
134
+ const currentValue = record[day][index]
135
+ const newValue = currentValue === 1 || currentValue === '1' ? 0 : 1
136
+ // 更新按钮显示
137
+ this.$set(record[day], index, newValue)
138
+ // 同步更新data中的数据
139
+ this.$set(this.data[dataIndex][day], index, newValue)
140
+ },
141
+ onSelectChange (selectedRowKeys, selectedRows) {
142
+ this.selectedRowKeys = selectedRowKeys
143
+ this.selectedRows = selectedRows
144
+ },
145
+ // 处理输入框数据变化
146
+ handleInputChange (record, field, index, value) {
147
+ // 更新数据
148
+ this.$set(record[field], index, value)
149
+ },
150
+ // 获取选中的行数据
151
+ getSelectedRowData () {
152
+ if (this.pattern === 'form') {
153
+ // 在form模式下,返回包含输入框数据的完整信息
154
+ return this.selectedRows.map(row => {
155
+ const result = { ...row }
156
+ // 将对象格式的输入框数据转换为数组格式
157
+ this.inputColumns.forEach(col => {
158
+ if (row[col.dataIndex] && typeof row[col.dataIndex] === 'object') {
159
+ const fieldData = row[col.dataIndex]
160
+ const arrayData = []
161
+ // 将对象转换为数组,保持键的顺序
162
+ Object.keys(fieldData).forEach(key => {
163
+ arrayData.push(fieldData[key])
164
+ })
165
+ result[col.dataIndex] = arrayData
166
+ }
167
+ })
168
+ return result
169
+ })
170
+ }
171
+ return this.selectedRows
172
+ },
173
+ // 获取全部数据
174
+ getAllTable () {
175
+ return this.data
176
+ },
177
+ // 初始化数据
178
+ async init (queryParamsName, parameter) {
179
+ getConfigByName(queryParamsName, this.serviceName, result => {
180
+ this.configData = result
181
+ runLogic(result.dataSource, parameter, this.serviceName).then(res => {
182
+ this.columns = []
183
+ this.columns = JSON.parse(JSON.stringify(this.configData.columns))
184
+ this.pattern = result.pattern
185
+ if (this.pattern == 'schedule') {
186
+ for (let i = 0; i < this.shiftTable.length; i++) {
187
+ this.columns.push(this.shiftTable[i])
188
+ }
189
+ if (res && Array.isArray(res)) {
190
+ const weekDays = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
191
+ const shifts = ['am', 'pm', 'evening']
192
+ let key = 0
193
+ this.data = res.map(item => {
194
+ const scheduleData = {
195
+ key: key++
196
+ }
197
+ this.configData.columnsName.forEach(columnName => { scheduleData[columnName] = item[columnName] })
198
+ weekDays.forEach(day => {
199
+ scheduleData[day.charAt(0).toUpperCase() + day.slice(1)] = shifts.map(shift => item[`f_${day}_${shift}`] === '1' ? 1 : 0)
200
+ })
201
+ return scheduleData
202
+ })
203
+ // 保存原始数据
204
+ this.originalData = JSON.parse(JSON.stringify(this.data))
205
+ }
206
+ } else if (this.pattern == 'form') {
207
+ const inputFields = this.configData.columns.filter(col => col.type === 'input').map(col => col.dataIndex)
208
+
209
+ // 处理项目数据,将参数数据关联到对应的项目
210
+ this.data = res.project.map((projectItem, index) => {
211
+ const newItem = {
212
+ ...projectItem,
213
+ key: projectItem.id || `form_row_${index}_${Date.now()}` // 确保每行有唯一的key
214
+ }
215
+
216
+ // 查找当前项目对应的参数数据
217
+ const projectParameters = res.parameter.filter(param => param.id === projectItem.id)
218
+ const parameterByMaterialId = new Map(projectParameters.map(p => [p.material_id, p]))
219
+
220
+ inputFields.forEach(field => {
221
+ const column = this.configData.columns.find(col => col.dataIndex === field)
222
+ if (column && column.type === 'input' && column.row) {
223
+ const rowCount = Array.isArray(column.row) ? column.row.length : Number(column.row) || 1 // 支持数字或数组
224
+ // 创建对象格式的数据,键为1,2,3...,值为空字符串
225
+ const fieldData = {}
226
+ for (let i = 1; i <= rowCount; i++) {
227
+ const matchedParam = parameterByMaterialId.get(i)
228
+ // 如果有对应的参数数据,则填充对应的值
229
+ if (matchedParam) {
230
+ // 根据字段名映射到参数数据中的对应字段
231
+ let paramValue = ''
232
+ switch (field) {
233
+ case 'targetValue':
234
+ paramValue = matchedParam.target_value || ''
235
+ break
236
+ case 'SD':
237
+ paramValue = matchedParam.sd || ''
238
+ break
239
+ case 'reagent':
240
+ paramValue = matchedParam.reagent || ''
241
+ break
242
+ case 'wavelength':
243
+ paramValue = matchedParam.wavelength || ''
244
+ break
245
+ case 'method':
246
+ paramValue = matchedParam.method || ''
247
+ break
248
+ case 'batchNumber':
249
+ paramValue = matchedParam.lot_number || ''
250
+ break
251
+ default:
252
+ paramValue = matchedParam[field] || ''
253
+ }
254
+ fieldData[i] = paramValue
255
+ } else fieldData[i] = ''
256
+ }
257
+ newItem[field] = fieldData
258
+ } else {
259
+ newItem[field] = projectItem[field] || ''
260
+ }
261
+ })
262
+ return newItem
263
+ })
264
+ // 备份原始数据以便筛选/重置使用
265
+ this.originalData = JSON.parse(JSON.stringify(this.data))
266
+ }
267
+ })
268
+ })
269
+ },
270
+ // 查询数据函数
271
+ filterTableData (filters) {
272
+ if (!filters || Object.keys(filters).length === 0) {
273
+ // 如果没有过滤条件,恢复原始数据
274
+ this.data = JSON.parse(JSON.stringify(this.originalData))
275
+ return
276
+ }
277
+ // 从原始数据开始过滤
278
+ this.data = this.originalData.filter(item => {
279
+ // 检查每一项是否满足所有过滤条件
280
+ return Object.entries(filters).every(([key, value]) => {
281
+ // 如果过滤值是字符串,进行模糊匹配
282
+ if (typeof value === 'string') {
283
+ return item[key] && item[key].toString().toLowerCase().includes(value.toLowerCase())
284
+ }
285
+ // 如果过滤值是数字,进行精确匹配
286
+ return item[key] === value
287
+ })
288
+ }).map((item, index) => ({
289
+ ...item,
290
+ key: item.key || item.id || `filtered_row_${index}_${Date.now()}` // 确保过滤后的数据也有唯一key
291
+ }))
292
+ },
293
+ // 初始化周次日期
294
+ initWeekDates () {
295
+ const today = new Date()
296
+ const currentDay = today.getDay() || 7 // 将周日的0转换为7
297
+ const monday = new Date(today)
298
+ monday.setDate(today.getDate() - currentDay + 1) // 设置为本周一
299
+ this.currentWeekDates = Array.from({ length: 7 }, (_, index) => {
300
+ const date = new Date(monday)
301
+ date.setDate(monday.getDate() + index)
302
+ return date
303
+ })
304
+ },
305
+ // 切换到上一周
306
+ handleLastWeek () {
307
+ const monday = new Date(this.currentWeekDates[0])
308
+ monday.setDate(monday.getDate() - 7)
309
+ this.updateWeekDates(monday)
310
+ },
311
+ // 切换到下一周
312
+ handleNextWeek () {
313
+ const monday = new Date(this.currentWeekDates[0])
314
+ monday.setDate(monday.getDate() + 7)
315
+ this.updateWeekDates(monday)
316
+ },
317
+ // 更新周次日期
318
+ updateWeekDates (monday) {
319
+ this.currentWeekDates = Array.from({ length: 7 }, (_, index) => {
320
+ const date = new Date(monday)
321
+ date.setDate(monday.getDate() + index)
322
+ return date
323
+ })
324
+ },
325
+ // 判断某行是否被选中
326
+ isRowSelected (rowKey) {
327
+ return this.selectedRowKeys.includes(rowKey)
328
+ }
329
+ },
330
+ watch: {
331
+ queryParamsName: {
332
+ handler (newValue) {
333
+ this.init(newValue)
334
+ },
335
+ deep: true,
336
+ immediate: true
337
+ }
338
+ }
339
+ }
340
+ </script>
341
+
342
+ <style scoped>
343
+ .time-title {
344
+ display: flex !important;
345
+ flex-direction: column !important;
346
+ align-items: center !important;
347
+ }
348
+ .week_last_next_btn {
349
+ display: flex;
350
+ flex-direction: row;
351
+ align-items: center;
352
+ justify-content: center;
353
+ gap: 16px;
354
+ }
355
+ ::v-deep .ant-table-thead > tr > th,
356
+ ::v-deep .ant-table-tbody > tr > td {
357
+ padding: 8px 16px !important;
358
+ overflow-wrap: break-word;
359
+ }
360
+ .ant-input {
361
+ width: 100%;
362
+ }
363
+ .ant-input[disabled] {
364
+ background-color: #f5f5f5;
365
+ color: #999;
366
+ cursor: not-allowed;
367
+ }
368
+ .a-div{
369
+ display: flex;
370
+ flex-direction: column;
371
+ }
372
+ .number{
373
+ box-sizing: border-box;
374
+ margin: 0;
375
+ padding: 0;
376
+ font-variant: tabular-nums;
377
+ list-style: none;
378
+ font-feature-settings: 'tnum';
379
+ position: relative;
380
+ display: inline-block;
381
+ width: 100%;
382
+ height: 32px;
383
+ padding: 4px 11px;
384
+ color: rgba(0, 0, 0, 0.65);
385
+ font-size: 14px;
386
+ line-height: 1.5;
387
+ background-image: none;
388
+ border-radius: 4px;
389
+ transition: all 0.3s;
390
+ }
391
+ </style>
@@ -19,12 +19,6 @@
19
19
  - getOutEnv 获取获取 outEnv
20
20
  - this.getRealKeyData(obj) 获取真实的数据 传递 {a_a:"1"} 返回 {a:"1"}
21
21
  - this.currUser.operaInfo 获取当前用户信息
22
- - 返回:{
23
- f_operator: "心血管内科医生2", f_operatorid: "387280281096290306",
24
- f_orgid: "387184994751217666", f_orgname: "门诊部",
25
- f_depid: "387185267599081474", f_depname: "心血管内科"
26
- }
27
-
28
22
 
29
23
  ```js
30
24
  this.openDialog('xxx', 5, {}, {}, {})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.15.111",
3
+ "version": "1.15.114",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -32,18 +32,23 @@ export default {
32
32
  sd: 0
33
33
  }
34
34
  },
35
- mounted () {},
35
+ mounted () {
36
+ },
36
37
  methods: {
37
38
  initDome (queryParamsName, parameter) {
38
39
  getConfigByName(queryParamsName, 'af-his', async (res) => {
39
40
  this.config = res
40
41
  console.log('res', res)
41
42
  runLogic(res.data, parameter, 'af-his').then(result => {
42
- this.standardValue = result[0][this.config.standardValue]
43
- this.sd = result[0].sd
44
- const listData = result.map(item => [item.x, item.y])
45
- this.data = listData
46
- this.renderChart()
43
+ if (result != 0) {
44
+ this.standardValue = result[0][this.config.standardValue] != null ? result[0][this.config.standardValue] : 0
45
+ this.sd = result[0].sd
46
+ const listData = result.map(item => [item.x, item.y])
47
+ this.data = listData
48
+ this.renderChart()
49
+ } else {
50
+ this.$message.warn('没有获取到结果数据')
51
+ }
47
52
  })
48
53
  })
49
54
  },
@@ -62,11 +67,8 @@ export default {
62
67
  const sd3Lower = centerLine - 3 * this.sd
63
68
 
64
69
  // 计算y轴范围,让靶值居中
65
- const dataMin = Math.min(...this.data.map(item => item[1]))
66
- const dataMax = Math.max(...this.data.map(item => item[1]))
67
- const range = Math.max(dataMax - centerLine, centerLine - dataMin, this.sd * 4)
68
- const yMin = centerLine - range
69
- const yMax = centerLine + range
70
+ const yMin = centerLine - this.sd * 4
71
+ const yMax = centerLine + this.sd * 4
70
72
 
71
73
  const option = {
72
74
  title: {
@@ -27,18 +27,18 @@
27
27
  </a-table>
28
28
  </div>
29
29
  <div v-else-if="pattern == 'form'">
30
- <a-table :columns="columns" :data-source='data' :row-selection="rowSelection" bordered :scroll="{ y: configData.height == null? '70%' : configData.height }">
30
+ <a-table :columns="columns" :data-source="data" :row-selection="rowSelection" bordered :scroll="{ y: configData.height == null? '70%' : configData.height }">
31
31
  <template v-for="(n, i) in inputColumns" :slot="n.dataIndex" slot-scope="text, record">
32
- <div class="a-div" :key="i">
33
- <a-input
34
- v-for="(item, index) in n.row"
35
- :key="index"
36
- placeholder=""
37
- class="ant-input"
38
- v-model="record[n.dataIndex][index + 1]"
39
- @input="handleInputChange(record, n.dataIndex, index + 1, $event.target.value)"
40
- :disabled="!isRowSelected(record.key)"/>
41
- </div>
32
+ <div class="a-div" :key="i">
33
+ <a-input
34
+ v-for="(item, index) in (Array.isArray(n.row) ? n.row : Array(Number(n.row) || 1).fill(1))"
35
+ :key="index"
36
+ placeholder=""
37
+ class="ant-input"
38
+ v-model="record[n.dataIndex][index + 1]"
39
+ @input="handleInputChange(record, n.dataIndex, index + 1, $event.target.value)"
40
+ :disabled="!isRowSelected(record.key)"/>
41
+ </div>
42
42
  </template>
43
43
  <div class="a-div" v-for="(n, i) in numberColumns" :slot="n.dataIndex" :key="i">
44
44
  <div v-for="(item, index) in n.row" :key="index" class="number">{{item}}</div>
@@ -205,27 +205,64 @@ export default {
205
205
  }
206
206
  } else if (this.pattern == 'form') {
207
207
  const inputFields = this.configData.columns.filter(col => col.type === 'input').map(col => col.dataIndex)
208
- this.data = res.map((item, index) => {
208
+
209
+ // 处理项目数据,将参数数据关联到对应的项目
210
+ this.data = res.project.map((projectItem, index) => {
209
211
  const newItem = {
210
- ...item,
211
- key: item.id || `form_row_${index}_${Date.now()}` // 确保每行有唯一的key
212
+ ...projectItem,
213
+ key: projectItem.id || `form_row_${index}_${Date.now()}` // 确保每行有唯一的key
212
214
  }
215
+
216
+ // 查找当前项目对应的参数数据
217
+ const projectParameters = res.parameter.filter(param => param.id === projectItem.id)
218
+ const parameterByMaterialId = new Map(projectParameters.map(p => [p.material_id, p]))
219
+
213
220
  inputFields.forEach(field => {
214
221
  const column = this.configData.columns.find(col => col.dataIndex === field)
215
222
  if (column && column.type === 'input' && column.row) {
216
- const rowCount = column.row.length || 1 // 默认长度1
223
+ const rowCount = Array.isArray(column.row) ? column.row.length : Number(column.row) || 1 // 支持数字或数组
217
224
  // 创建对象格式的数据,键为1,2,3...,值为空字符串
218
225
  const fieldData = {}
219
226
  for (let i = 1; i <= rowCount; i++) {
220
- fieldData[i] = ''
227
+ const matchedParam = parameterByMaterialId.get(i)
228
+ // 如果有对应的参数数据,则填充对应的值
229
+ if (matchedParam) {
230
+ // 根据字段名映射到参数数据中的对应字段
231
+ let paramValue = ''
232
+ switch (field) {
233
+ case 'targetValue':
234
+ paramValue = matchedParam.target_value || ''
235
+ break
236
+ case 'SD':
237
+ paramValue = matchedParam.sd || ''
238
+ break
239
+ case 'reagent':
240
+ paramValue = matchedParam.reagent || ''
241
+ break
242
+ case 'wavelength':
243
+ paramValue = matchedParam.wavelength || ''
244
+ break
245
+ case 'method':
246
+ paramValue = matchedParam.method || ''
247
+ break
248
+ case 'batchNumber':
249
+ paramValue = matchedParam.lot_number || ''
250
+ break
251
+ default:
252
+ paramValue = matchedParam[field] || ''
253
+ }
254
+ fieldData[i] = paramValue
255
+ } else fieldData[i] = ''
221
256
  }
222
257
  newItem[field] = fieldData
223
258
  } else {
224
- newItem[field] = item[field] || ''
259
+ newItem[field] = projectItem[field] || ''
225
260
  }
226
261
  })
227
262
  return newItem
228
263
  })
264
+ // 备份原始数据以便筛选/重置使用
265
+ this.originalData = JSON.parse(JSON.stringify(this.data))
229
266
  }
230
267
  })
231
268
  })
@@ -60,7 +60,7 @@ export default {
60
60
  data () {
61
61
  return {
62
62
  dateRange: [],
63
- label: '',
63
+ label: '请选择日期',
64
64
  type: 'range'
65
65
  }
66
66
  },
@@ -99,15 +99,17 @@ export default {
99
99
  this.$emit('change', dateStrings)
100
100
  },
101
101
  async getData (data) {
102
- getConfigByName(data, 'af-his', res => {
103
- if (['date', 'range'].includes(res.type)) {
104
- this.type = res.type
105
- }
106
- if (res.label !== undefined) {
107
- this.label = res.label
108
- }
109
- this.convertValueToMoment(this.value)
110
- })
102
+ if (data) {
103
+ getConfigByName(data, 'af-his', res => {
104
+ if (['date', 'range'].includes(res.type)) {
105
+ this.type = res.type
106
+ }
107
+ if (res.label !== undefined) {
108
+ this.label = res.label
109
+ }
110
+ this.convertValueToMoment(this.value)
111
+ })
112
+ }
111
113
  }
112
114
  }
113
115
  }
@@ -66,7 +66,7 @@ path: 'example',
66
66
  // component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
67
67
  // component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
68
68
  // component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelectDemo.vue'),
69
- component: () => import('@vue2-client/base-client/components/his/XChart/dome.vue'),
69
+ component: () => import('@vue2-client/base-client/components/his/XShiftSchedule/dome.vue'),
70
70
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
71
71
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
72
72
  // component: () => import('@vue2-client/pages/XPageViewExample/index.vue'),