vue2-client 1.16.45 → 1.16.47
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 +112 -112
- package/src/base-client/components/common/HIS/HForm/HForm.vue +27 -6
- package/src/base-client/components/common/HIS/HFormGroup/HFormGroup.vue +120 -120
- package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
- package/src/base-client/components/common/HIS/HFormTable/HFormTable.vue +256 -244
- package/src/base-client/components/common/HIS/demo.vue +61 -61
- package/src/base-client/components/common/XCollapse/XCollapse.vue +461 -460
- package/src/base-client/components/common/XInput/XInput.vue +147 -128
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +824 -824
- package/src/base-client/components/common/XTable/XTable.vue +1610 -1612
- package/src/base-client/components/common/XTimeline/XTimeline.vue +454 -358
- package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +13 -0
- package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
- package/src/base-client/components/his/XTitle/XTitle.vue +37 -6
- package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
- package/src/pages/WorkflowDetail/WorkFlowDemo3.vue +203 -225
- package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
- package/src/router/async/router.map.js +129 -129
@@ -1,128 +1,147 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="x-input-wrapper">
|
3
|
-
<div class="input-container">
|
4
|
-
<span v-if="config?.label" class="input-label">{{ config.label }}</span>
|
5
|
-
<div class="input-wrapper">
|
6
|
-
<a-input
|
7
|
-
v-model="innerValue"
|
8
|
-
v-bind="$attrs"
|
9
|
-
:placeholder="config?.placeholder"
|
10
|
-
:size="config?.size"
|
11
|
-
:maxLength="config?.maxLength"
|
12
|
-
:disabled="config?.disabled"
|
13
|
-
:allowClear="config?.allowClear"
|
14
|
-
@change="handleInput"
|
15
|
-
@pressEnter="handleSearch"
|
16
|
-
>
|
17
|
-
<template v-if="config?.prefix" #prefix>
|
18
|
-
<a-icon :type="config.prefix" @click="handleSearch" class="clickable-icon" />
|
19
|
-
</template>
|
20
|
-
<template v-if="config?.suffix" #suffix>
|
21
|
-
<a-icon :type="config.suffix" @click="handleSearch" class="clickable-icon" />
|
22
|
-
</template>
|
23
|
-
</a-input>
|
24
|
-
</div>
|
25
|
-
<span v-if="config?.tail" class="input-tail">{{ config.tail }}</span>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
</template>
|
29
|
-
|
30
|
-
<script>
|
31
|
-
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
32
|
-
|
33
|
-
export default {
|
34
|
-
name: 'XInput',
|
35
|
-
inheritAttrs: false,
|
36
|
-
props: {
|
37
|
-
value: {
|
38
|
-
type: [String, Number],
|
39
|
-
default: ''
|
40
|
-
},
|
41
|
-
queryParamsName: {
|
42
|
-
type: String,
|
43
|
-
default: ''
|
44
|
-
}
|
45
|
-
},
|
46
|
-
data () {
|
47
|
-
return {
|
48
|
-
innerValue: this.value || '',
|
49
|
-
config: null
|
50
|
-
}
|
51
|
-
},
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
}
|
64
|
-
})
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
}
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
}
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
:
|
126
|
-
|
127
|
-
}
|
128
|
-
|
1
|
+
<template>
|
2
|
+
<div class="x-input-wrapper" :class="wrapperClassObject">
|
3
|
+
<div class="input-container">
|
4
|
+
<span v-if="config?.label" class="input-label">{{ config.label }}</span>
|
5
|
+
<div class="input-wrapper">
|
6
|
+
<a-input
|
7
|
+
v-model="innerValue"
|
8
|
+
v-bind="$attrs"
|
9
|
+
:placeholder="config?.placeholder"
|
10
|
+
:size="config?.size"
|
11
|
+
:maxLength="config?.maxLength"
|
12
|
+
:disabled="config?.disabled"
|
13
|
+
:allowClear="config?.allowClear"
|
14
|
+
@change="handleInput"
|
15
|
+
@pressEnter="handleSearch"
|
16
|
+
>
|
17
|
+
<template v-if="config?.prefix" #prefix>
|
18
|
+
<a-icon :type="config.prefix" @click="handleSearch" class="clickable-icon" />
|
19
|
+
</template>
|
20
|
+
<template v-if="config?.suffix" #suffix>
|
21
|
+
<a-icon :type="config.suffix" @click="handleSearch" class="clickable-icon" />
|
22
|
+
</template>
|
23
|
+
</a-input>
|
24
|
+
</div>
|
25
|
+
<span v-if="config?.tail" class="input-tail">{{ config.tail }}</span>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</template>
|
29
|
+
|
30
|
+
<script>
|
31
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
32
|
+
|
33
|
+
export default {
|
34
|
+
name: 'XInput',
|
35
|
+
inheritAttrs: false,
|
36
|
+
props: {
|
37
|
+
value: {
|
38
|
+
type: [String, Number],
|
39
|
+
default: ''
|
40
|
+
},
|
41
|
+
queryParamsName: {
|
42
|
+
type: String,
|
43
|
+
default: ''
|
44
|
+
}
|
45
|
+
},
|
46
|
+
data () {
|
47
|
+
return {
|
48
|
+
innerValue: this.value || '',
|
49
|
+
config: null
|
50
|
+
}
|
51
|
+
},
|
52
|
+
computed: {
|
53
|
+
// 动态样式开关:布尔开关 + size 派生类
|
54
|
+
wrapperClassObject () {
|
55
|
+
const attrs = this.$attrs || {}
|
56
|
+
const classes = {}
|
57
|
+
const booleanStyleKeys = [
|
58
|
+
|
59
|
+
]
|
60
|
+
booleanStyleKeys.forEach(key => {
|
61
|
+
const val = attrs[key]
|
62
|
+
const truthy = val === true || val === '' || val === 'true'
|
63
|
+
if (truthy) classes[`xinput-${key}`] = true
|
64
|
+
})
|
65
|
+
const size = attrs.size
|
66
|
+
if (size && typeof size === 'string') classes[`xinput-size-${size}`] = true
|
67
|
+
return classes
|
68
|
+
}
|
69
|
+
},
|
70
|
+
created () {
|
71
|
+
this.getData(this.queryParamsName)
|
72
|
+
},
|
73
|
+
emits: ['search'],
|
74
|
+
methods: {
|
75
|
+
runLogic,
|
76
|
+
async getData (data) {
|
77
|
+
getConfigByName(data, 'af-his', res => {
|
78
|
+
this.config = res
|
79
|
+
if (res.defaultValue !== undefined) {
|
80
|
+
this.innerValue = res.defaultValue
|
81
|
+
}
|
82
|
+
})
|
83
|
+
},
|
84
|
+
handleInput (e) {
|
85
|
+
const value = e.target.value
|
86
|
+
this.innerValue = value
|
87
|
+
this.$emit('search', value)
|
88
|
+
},
|
89
|
+
handleSearch () {
|
90
|
+
// 统一的搜索事件:将当前输入值发送给父组件
|
91
|
+
this.$emit('search', this.innerValue)
|
92
|
+
}
|
93
|
+
},
|
94
|
+
watch: {
|
95
|
+
value: {
|
96
|
+
handler (newValue) {
|
97
|
+
this.innerValue = newValue
|
98
|
+
},
|
99
|
+
immediate: true
|
100
|
+
},
|
101
|
+
queryParamsName: {
|
102
|
+
handler (newValue) {
|
103
|
+
this.getData(newValue)
|
104
|
+
},
|
105
|
+
deep: true
|
106
|
+
}
|
107
|
+
}
|
108
|
+
}
|
109
|
+
</script>
|
110
|
+
|
111
|
+
<style scoped lang="less">
|
112
|
+
.x-input-wrapper {
|
113
|
+
position: relative;
|
114
|
+
display: inline-block;
|
115
|
+
width: 100%;
|
116
|
+
}
|
117
|
+
|
118
|
+
.input-container {
|
119
|
+
display: flex;
|
120
|
+
align-items: center;
|
121
|
+
}
|
122
|
+
|
123
|
+
.input-label {
|
124
|
+
white-space: nowrap;
|
125
|
+
color: rgba(0, 0, 0, 0.85);
|
126
|
+
padding-right: 8px; /* 标签右侧固定间距 */
|
127
|
+
}
|
128
|
+
|
129
|
+
.input-label {
|
130
|
+
white-space: nowrap;
|
131
|
+
color: rgba(0, 0, 0, 0.85);
|
132
|
+
padding-left: 4px; /* 标签左侧固定间距 */
|
133
|
+
}
|
134
|
+
|
135
|
+
.input-wrapper {
|
136
|
+
flex: 1; /* 输入框占据剩余空间 */
|
137
|
+
}
|
138
|
+
|
139
|
+
:deep(.clickable-icon) {
|
140
|
+
cursor: pointer;
|
141
|
+
}
|
142
|
+
|
143
|
+
:deep(.clickable-icon:hover) {
|
144
|
+
color: #1890ff;
|
145
|
+
}
|
146
|
+
|
147
|
+
</style>
|