vue2-client 1.14.46 → 1.14.48
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 +20 -6
- package/src/base-client/components/common/XForm/XFormItem.vue +2 -2
- package/src/base-client/components/common/XReportGrid/XReportDemo.vue +1 -1
- package/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +3 -33
- package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +27 -5
- package/src/base-client/components/his/XTimeSelect/XTimeSelectDemo.vue +23 -0
- package/src/base-client/components/his/XTitle/README.md +8 -5
- package/src/pages/ReportGrid/index.vue +1 -5
- package/src/router/async/router.map.js +4 -5
- package/src/utils/common.js +0 -32
- package/vue.config.js +1 -1
package/package.json
CHANGED
|
@@ -75,10 +75,9 @@
|
|
|
75
75
|
:column="{ xxl: 2, xl: 2, lg: 2, md: 2, sm: 1, xs: 1 }"
|
|
76
76
|
>
|
|
77
77
|
<a-descriptions-item label="坐标" span="2"><span>{{ addressObj.lng_lat }}</span></a-descriptions-item>
|
|
78
|
-
<a-descriptions-item label="地址" span="2"><span>{{ addressObj.address }}</span></a-descriptions-item>
|
|
78
|
+
<a-descriptions-item label="地址" span="2" v-if="attr.type != 'coordinateSearch'"><span>{{ addressObj.address }}</span></a-descriptions-item>
|
|
79
79
|
</a-descriptions>
|
|
80
80
|
</a-modal>
|
|
81
|
-
<!-- -->
|
|
82
81
|
</div>
|
|
83
82
|
</template>
|
|
84
83
|
<script>
|
|
@@ -315,18 +314,33 @@ export default {
|
|
|
315
314
|
let result
|
|
316
315
|
if (this.searchResultType !== 'Default') {
|
|
317
316
|
if (this.searchResultType === 'Array') {
|
|
318
|
-
|
|
317
|
+
// 如果是坐标搜索,只返回坐标
|
|
318
|
+
if (this.attr.type === 'coordinateSearch') {
|
|
319
|
+
result = [this.addressObj.lng_lat]
|
|
320
|
+
} else {
|
|
321
|
+
result = [_addstr || this.addressObj.address, this.addressObj.lng_lat]
|
|
322
|
+
}
|
|
319
323
|
} else {
|
|
320
324
|
result = {}
|
|
321
|
-
|
|
322
|
-
|
|
325
|
+
// 如果是坐标搜索,只返回坐标
|
|
326
|
+
if (this.attr.type === 'coordinateSearch') {
|
|
327
|
+
result[this.resultKeys.coords] = this.addressObj.lng_lat
|
|
328
|
+
} else {
|
|
329
|
+
result[this.resultKeys.address] = _addstr || this.addressObj.address
|
|
330
|
+
result[this.resultKeys.coords] = this.addressObj.lng_lat
|
|
331
|
+
}
|
|
323
332
|
}
|
|
324
333
|
}
|
|
325
334
|
this.visible = false
|
|
326
335
|
this.$emit('onSelect', JSON.stringify(result))
|
|
327
336
|
// 如果传递了地址 是为了更新上级 不做省市区检验处理
|
|
328
337
|
if (!_addstr) {
|
|
329
|
-
|
|
338
|
+
// 如果是坐标搜索,输入框显示坐标
|
|
339
|
+
if (this.attr.type === 'coordinateSearch') {
|
|
340
|
+
this.addressInput = this.addressObj.lng_lat
|
|
341
|
+
} else {
|
|
342
|
+
this.addressInput = this.addressObj.address
|
|
343
|
+
}
|
|
330
344
|
this.$emit('onDivisionsChange', Object.assign({}, result, { divisions: this.divisions, vm: this }))
|
|
331
345
|
}
|
|
332
346
|
},
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
</x-form-col>
|
|
436
436
|
<!-- 地点搜索框 -->
|
|
437
437
|
<x-form-col
|
|
438
|
-
v-else-if="attr.type === 'addressSearch' && show"
|
|
438
|
+
v-else-if="(attr.type === 'addressSearch' || attr.type === 'coordinateSearch') && show"
|
|
439
439
|
:labelCol="labelCol"
|
|
440
440
|
:occupyCol="attr.occupyCol"
|
|
441
441
|
:flex="attr.flex">
|
|
@@ -898,7 +898,7 @@ export default {
|
|
|
898
898
|
this.debouncedShowQueryFormItemFunc()
|
|
899
899
|
}
|
|
900
900
|
// 地址搜索框赋值
|
|
901
|
-
if (this.attr.type === 'addressSearch') {
|
|
901
|
+
if (this.attr.type === 'addressSearch' || this.attr.type === 'coordinateSearch') {
|
|
902
902
|
this.$refs.addressSearchCombobox.addressInput = this.form[this.attr.model]
|
|
903
903
|
}
|
|
904
904
|
// 数据源来自人员联动时更新数据
|
|
@@ -7,39 +7,9 @@
|
|
|
7
7
|
<span slot="time" class="time-title">
|
|
8
8
|
<span v-for="(item, index) in configData.timePeriod" :key="index">{{ item }}</span>
|
|
9
9
|
</span>
|
|
10
|
-
<template slot="
|
|
11
|
-
<div class="time-title">
|
|
12
|
-
<a-button v-for="(item, index) in record.
|
|
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>
|
|
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>
|
|
43
13
|
</div>
|
|
44
14
|
</template>
|
|
45
15
|
<template slot="sk_limit" slot-scope="text, record">
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
<div class="x-time-select">
|
|
3
3
|
<div class="time-select-container">
|
|
4
4
|
<span v-if="label" class="time-select-label">{{ label }}</span>
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
<div v-if="type === 'range'" class="picker-wrapper">
|
|
6
7
|
<a-range-picker
|
|
7
8
|
:value="dateRange"
|
|
8
|
-
:placeholder="['开始日期', '结束日期']"
|
|
9
|
+
:placeholder="['开始日期', '结束日期 ']"
|
|
9
10
|
separator="至"
|
|
10
11
|
:disabled="disabled"
|
|
11
12
|
:allowClear="allowClear"
|
|
@@ -13,15 +14,26 @@
|
|
|
13
14
|
@change="handleDateChange"
|
|
14
15
|
/>
|
|
15
16
|
</div>
|
|
17
|
+
<div v-if="type === 'date'" class="picker-wrapper">
|
|
18
|
+
<a-date-picker
|
|
19
|
+
:format="format"
|
|
20
|
+
:disabled="disabled"
|
|
21
|
+
:allowClear="allowClear"
|
|
22
|
+
@change="handleDateChange"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
16
26
|
</div>
|
|
17
27
|
</div>
|
|
18
28
|
</template>
|
|
19
29
|
|
|
20
30
|
<script>
|
|
21
31
|
import moment from 'moment'
|
|
32
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
22
33
|
|
|
23
34
|
export default {
|
|
24
35
|
name: 'XTimeSelect',
|
|
36
|
+
inject: ['getComponentByName'],
|
|
25
37
|
props: {
|
|
26
38
|
queryParamsName: {
|
|
27
39
|
type: String,
|
|
@@ -47,7 +59,8 @@ export default {
|
|
|
47
59
|
data () {
|
|
48
60
|
return {
|
|
49
61
|
dateRange: [],
|
|
50
|
-
label: ''
|
|
62
|
+
label: '',
|
|
63
|
+
type: 'range'
|
|
51
64
|
}
|
|
52
65
|
},
|
|
53
66
|
watch: {
|
|
@@ -58,6 +71,8 @@ export default {
|
|
|
58
71
|
newVal[0] ? moment(newVal[0]) : null,
|
|
59
72
|
newVal[1] ? moment(newVal[1]) : null
|
|
60
73
|
]
|
|
74
|
+
} else if (newVal && this.type === 'date' && newVal.length === 1) {
|
|
75
|
+
this.dateRange = [newVal[0] ? moment(newVal[0]) : null]
|
|
61
76
|
} else {
|
|
62
77
|
this.dateRange = []
|
|
63
78
|
}
|
|
@@ -75,8 +90,15 @@ export default {
|
|
|
75
90
|
console.warn(dateStrings)
|
|
76
91
|
this.$emit('change', dateStrings)
|
|
77
92
|
},
|
|
78
|
-
getData (data) {
|
|
79
|
-
|
|
93
|
+
async getData (data) {
|
|
94
|
+
getConfigByName(data, 'af-his', res => {
|
|
95
|
+
if (['date', 'range'].includes(res.type)) {
|
|
96
|
+
this.type = res.type
|
|
97
|
+
}
|
|
98
|
+
if (res.label !== undefined) {
|
|
99
|
+
this.label = res.label
|
|
100
|
+
}
|
|
101
|
+
})
|
|
80
102
|
}
|
|
81
103
|
}
|
|
82
104
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import XTimeSelect from '@/base-client/components/his/XTimeSelect/XTimeSelect.vue'
|
|
3
|
+
export default {
|
|
4
|
+
name: 'XTimeSelectDemo',
|
|
5
|
+
components: {
|
|
6
|
+
XTimeSelect,
|
|
7
|
+
},
|
|
8
|
+
data () {
|
|
9
|
+
return {
|
|
10
|
+
queryParamsName: 'expenseManagementDatePicker'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<x-time-select :queryParamsName="queryParamsName">
|
|
18
|
+
</x-time-select>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<style scoped>
|
|
22
|
+
|
|
23
|
+
</style>
|
|
@@ -22,7 +22,7 @@ XTitle 是一个多功能的标题组件,可以显示标题文本或按钮,
|
|
|
22
22
|
|
|
23
23
|
### 配置参数格式
|
|
24
24
|
|
|
25
|
-
XTitle 组件通过一个字符串参数进行配置
|
|
25
|
+
XTitle 组件通过一个字符串参数进行配置
|
|
26
26
|
|
|
27
27
|
各部分说明:
|
|
28
28
|
|
|
@@ -37,9 +37,6 @@ XTitle 组件通过一个字符串参数进行配置
|
|
|
37
37
|
|
|
38
38
|
### 1. 基本标题
|
|
39
39
|
|
|
40
|
-
```vue
|
|
41
|
-
<x-title query-params-name="患者信息"></x-title>
|
|
42
|
-
```
|
|
43
40
|
```vue
|
|
44
41
|
<x-title query-params-name="患者信息-title"></x-title>
|
|
45
42
|
```
|
|
@@ -47,7 +44,7 @@ XTitle 组件通过一个字符串参数进行配置
|
|
|
47
44
|
### 2. 带下划线的标题
|
|
48
45
|
|
|
49
46
|
```vue
|
|
50
|
-
<x-title query-params-name="患者信息-title
|
|
47
|
+
<x-title query-params-name="患者信息-title--line"></x-title>
|
|
51
48
|
```
|
|
52
49
|
|
|
53
50
|
### 3. 自定义下划线颜色和宽度
|
|
@@ -56,6 +53,12 @@ XTitle 组件通过一个字符串参数进行配置
|
|
|
56
53
|
<x-title query-params-name="患者信息-title--line-red-800"></x-title>
|
|
57
54
|
```
|
|
58
55
|
|
|
56
|
+
### 4. 带点击事件的标题
|
|
57
|
+
|
|
58
|
+
```vue
|
|
59
|
+
<x-title query-params-name="患者信息-title-showPatient-line" @showPatient="handleShowPatient"></x-title>
|
|
60
|
+
```
|
|
61
|
+
|
|
59
62
|
### 5. 按钮模式
|
|
60
63
|
|
|
61
64
|
```vue
|
|
@@ -4,14 +4,13 @@
|
|
|
4
4
|
@updateImg="updateImg"
|
|
5
5
|
ref="main"
|
|
6
6
|
:use-oss-for-img="false"
|
|
7
|
-
config-name="
|
|
7
|
+
config-name="outpatientWait"
|
|
8
8
|
server-name="af-his"
|
|
9
9
|
:show-img-in-cell="true"
|
|
10
10
|
:display-only="displayOnly"
|
|
11
11
|
:edit-mode="false"
|
|
12
12
|
:show-save-button="false"
|
|
13
13
|
:dont-format="true"/>
|
|
14
|
-
<button @click="clickButton()"></button>
|
|
15
14
|
</div>
|
|
16
15
|
</template>
|
|
17
16
|
|
|
@@ -68,9 +67,6 @@ export default {
|
|
|
68
67
|
result.push(item.exportData())
|
|
69
68
|
})
|
|
70
69
|
console.warn('save', result)
|
|
71
|
-
},
|
|
72
|
-
clickButton () {
|
|
73
|
-
this.findComponentByName(this, 'aaa', 10, 'parent')
|
|
74
70
|
}
|
|
75
71
|
}
|
|
76
72
|
}
|
|
@@ -55,17 +55,16 @@ routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynami
|
|
|
55
55
|
routerResource.example = {
|
|
56
56
|
path: 'example',
|
|
57
57
|
name: '示例主页面',
|
|
58
|
-
// component: () => import('@vue2-client/base-client/components/common/
|
|
59
|
-
// component: () => import('@vue2-client/base-client/components/his/XTitle/XTitle.vue'),
|
|
60
|
-
// component: () => import('@vue2-client/base-client/components/his/XCharge/XCharge.vue'),
|
|
58
|
+
// component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
|
|
61
59
|
// component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|
|
62
60
|
// component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
|
|
63
|
-
component: () => import('@vue2-client/base-client/components/common/
|
|
64
|
-
// component: () => import('@vue2-client/base-client/components/common/XFormTable/
|
|
61
|
+
// component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
|
|
62
|
+
// component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
|
65
63
|
// component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
|
|
66
64
|
// component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
|
|
67
65
|
// component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
|
|
68
66
|
// component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
|
|
67
|
+
component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelectDemo.vue'),
|
|
69
68
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
|
70
69
|
// component: () => import('@vue2-client/base-client/components/common/XConversation/XConversationDemo.vue'),
|
|
71
70
|
// component: () => import('@vue2-client/base-client/components/common/XButtons/XButtonDemo.vue'),
|
package/src/utils/common.js
CHANGED
|
@@ -8,35 +8,3 @@ export async function blobValidate (data) {
|
|
|
8
8
|
return true
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
export function findComponentByName (instance, componentName, maxDepth = 50) {
|
|
12
|
-
// 基础判断:如果实例不存在或者已经超过最大深度,返回null
|
|
13
|
-
if (!instance || maxDepth <= 0) {
|
|
14
|
-
return null
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// 检查当前实例是否有目标组件
|
|
18
|
-
try {
|
|
19
|
-
if (instance.getComponentByName && instance.getComponentByName(componentName)) {
|
|
20
|
-
return instance.getComponentByName(componentName)
|
|
21
|
-
}
|
|
22
|
-
} catch (e) {
|
|
23
|
-
console.warn('查找组件时发生错误:', e)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// 递归查找子组件
|
|
27
|
-
if (instance.$children && instance.$children.length) {
|
|
28
|
-
for (const child of instance.$children) {
|
|
29
|
-
const result = findComponentByName(child, componentName, maxDepth - 1)
|
|
30
|
-
if (result) {
|
|
31
|
-
return result
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// 向上查找父组件
|
|
37
|
-
if (instance.$parent) {
|
|
38
|
-
return findComponentByName(instance.$parent, componentName, maxDepth - 1)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return null
|
|
42
|
-
}
|