vue2-client 1.12.80 → 1.12.82
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,209 +1,214 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<a-collapse
|
|
4
|
-
:activeKey="activeKey"
|
|
5
|
-
@change="handleChange"
|
|
6
|
-
>
|
|
7
|
-
<a-collapse-panel
|
|
8
|
-
v-for="(panel, panelIndex) in config.showData"
|
|
9
|
-
:key="panelIndex.toString()"
|
|
10
|
-
:show-arrow="false"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<span>{{ item.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
v-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
@
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
import
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
this.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
font-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
:deep(.ant-collapse-header) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<a-collapse
|
|
4
|
+
:activeKey="activeKey"
|
|
5
|
+
@change="handleChange"
|
|
6
|
+
>
|
|
7
|
+
<a-collapse-panel
|
|
8
|
+
v-for="(panel, panelIndex) in config.showData"
|
|
9
|
+
:key="panelIndex.toString()"
|
|
10
|
+
:show-arrow="false"
|
|
11
|
+
:disabled="config.collapsible"
|
|
12
|
+
>
|
|
13
|
+
<template #header>
|
|
14
|
+
<div class="header-content">
|
|
15
|
+
<span
|
|
16
|
+
class="header-text"
|
|
17
|
+
:style="config.titleStyle"
|
|
18
|
+
>
|
|
19
|
+
{{ panel.title }}
|
|
20
|
+
</span>
|
|
21
|
+
<!-- 当有 title2 数据时显示信息项 -->
|
|
22
|
+
<template v-if="panel.title2 && panel.title2.length">
|
|
23
|
+
<span
|
|
24
|
+
v-for="(item, headerIndex) in panel.title2"
|
|
25
|
+
:key="headerIndex"
|
|
26
|
+
class="info-item"
|
|
27
|
+
:style="config.title2Style"
|
|
28
|
+
>
|
|
29
|
+
<span>{{ item.key }}:</span>
|
|
30
|
+
<span>{{ item.value }}</span>
|
|
31
|
+
</span>
|
|
32
|
+
</template>
|
|
33
|
+
<!-- 当有 title3 数据时显示时间项 -->
|
|
34
|
+
<span
|
|
35
|
+
v-if="panel.title3"
|
|
36
|
+
class="time-item"
|
|
37
|
+
:style="config.title3Style"
|
|
38
|
+
>
|
|
39
|
+
{{ panel.title3 }}
|
|
40
|
+
</span>
|
|
41
|
+
<!-- 修改搜索框的显示条件 -->
|
|
42
|
+
<a-input-search
|
|
43
|
+
v-if="panel.search"
|
|
44
|
+
v-model="searchText[panelIndex]"
|
|
45
|
+
:placeholder="panel.searchPlace"
|
|
46
|
+
class="search-input"
|
|
47
|
+
@search="(value) => onSearch(value, panelIndex)"
|
|
48
|
+
@click.stop
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
52
|
+
<!-- 根据类型显示不同内容 -->
|
|
53
|
+
<template v-if="panel.type === 'picture'">
|
|
54
|
+
<img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
|
|
55
|
+
</template>
|
|
56
|
+
<template v-else-if="panel.type === 'cover'">
|
|
57
|
+
<x-report
|
|
58
|
+
:use-oss-for-img="false"
|
|
59
|
+
:config-name="panel.configName"
|
|
60
|
+
server-name="af-his"
|
|
61
|
+
:show-img-in-cell="true"
|
|
62
|
+
:display-only="true"
|
|
63
|
+
:edit-mode="false"
|
|
64
|
+
:show-save-button="false"
|
|
65
|
+
:no-padding="true"
|
|
66
|
+
:dont-format="true">
|
|
67
|
+
</x-report>
|
|
68
|
+
</template>
|
|
69
|
+
</a-collapse-panel>
|
|
70
|
+
</a-collapse>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<script>
|
|
75
|
+
import XReport from '@vue2-client/base-client/components/common/XReportGrid'
|
|
76
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
77
|
+
|
|
78
|
+
export default {
|
|
79
|
+
name: 'XCollapse',
|
|
80
|
+
components: {
|
|
81
|
+
XReport
|
|
82
|
+
},
|
|
83
|
+
inject: ['getConfigByName', 'getComponentByName'],
|
|
84
|
+
data () {
|
|
85
|
+
return {
|
|
86
|
+
activeKey: [],
|
|
87
|
+
config: {},
|
|
88
|
+
configName: '',
|
|
89
|
+
searchText: {}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
props: {
|
|
93
|
+
// json名
|
|
94
|
+
queryParamsName: {
|
|
95
|
+
type: Object,
|
|
96
|
+
default: 'openPrescriptionConfig'
|
|
97
|
+
},
|
|
98
|
+
parameter: {
|
|
99
|
+
type: Object,
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
created () {
|
|
103
|
+
this.searchTexts = {} // 初始化对象
|
|
104
|
+
|
|
105
|
+
this.getData(this.queryParamsName)
|
|
106
|
+
window.addEventListener('setItem', (e) => {
|
|
107
|
+
console.log('监听到sessionStorage的变化:', e)
|
|
108
|
+
if (e.key === 'klcf_id') {
|
|
109
|
+
this.newVal = sessionStorage.getItem('klcf_id')
|
|
110
|
+
// 进行业务处理
|
|
111
|
+
console.log('sessionStorage中的值发生了变化:', this.newVal)
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
},
|
|
115
|
+
beforeDestroy () {
|
|
116
|
+
window.removeEventListener('setItem', this.handleStorageChange)
|
|
117
|
+
},
|
|
118
|
+
methods: {
|
|
119
|
+
handleStorageChange (e) {
|
|
120
|
+
console.log('监听到sessionStorage的变化:', e)
|
|
121
|
+
if (e.key === 'klcf_id') {
|
|
122
|
+
this.newVal = sessionStorage.getItem('klcf_id')
|
|
123
|
+
// 进行业务处理
|
|
124
|
+
console.log('sessionStorage中的值发生了变化:', this.newVal)
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
async getData (config, parameter) {
|
|
128
|
+
this.configName = config
|
|
129
|
+
getConfigByName(config, 'af-his', res => {
|
|
130
|
+
this.config = res
|
|
131
|
+
console.warn(this.config)
|
|
132
|
+
runLogic(res.mainLogic, this.parameter, 'af-his').then(result => {
|
|
133
|
+
this.config.showData = result
|
|
134
|
+
this.activeKey = this.config.showData.map((_, panelIndex) => panelIndex.toString())
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
},
|
|
138
|
+
refreshXCollapse () {
|
|
139
|
+
this.getData(this.queryParamsName)
|
|
140
|
+
},
|
|
141
|
+
handleChange (keys) {
|
|
142
|
+
this.activeKey = keys
|
|
143
|
+
},
|
|
144
|
+
onSearch (value, panelIndex) {
|
|
145
|
+
console.log('搜索内容:', value, '面板索引:', panelIndex)
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
watch: {
|
|
149
|
+
queryParamsName: {
|
|
150
|
+
handler (newValue) {
|
|
151
|
+
this.getData(newValue, null)
|
|
152
|
+
},
|
|
153
|
+
deep: true
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
</script>
|
|
158
|
+
|
|
159
|
+
<style scoped>
|
|
160
|
+
.header-content {
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
gap: 24px;
|
|
164
|
+
white-space: nowrap;
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.header-text {
|
|
169
|
+
margin-right: 16px;
|
|
170
|
+
font-size: 16px;
|
|
171
|
+
font-weight: 800;
|
|
172
|
+
flex-shrink: 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.info-item {
|
|
176
|
+
display: inline-flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
gap: 4px;
|
|
179
|
+
font-size: 12px;
|
|
180
|
+
color: #888888;
|
|
181
|
+
flex-shrink: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.time-item {
|
|
185
|
+
margin-left: auto;
|
|
186
|
+
text-align: right;
|
|
187
|
+
flex-shrink: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:deep(.ant-collapse-header) {
|
|
191
|
+
position: relative;
|
|
192
|
+
border-bottom: v-bind('config.showLine ? "1px solid #000000" : "none"');
|
|
193
|
+
align-items: center !important;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:deep(.ant-collapse-header-text) {
|
|
197
|
+
flex: 1;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:deep(.ant-collapse-content > .ant-collapse-content-box) {
|
|
201
|
+
padding: 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:deep(.ant-card-body) {
|
|
205
|
+
padding: 8px;
|
|
206
|
+
}
|
|
207
|
+
.search-input {
|
|
208
|
+
margin-left: auto;
|
|
209
|
+
width: 100%;
|
|
210
|
+
}
|
|
211
|
+
:deep(.ant-collapse-item-disabled > .ant-collapse-header) {
|
|
212
|
+
cursor: default !important;
|
|
213
|
+
}
|
|
214
|
+
</style>
|
|
@@ -129,6 +129,9 @@ export default {
|
|
|
129
129
|
this.currentDate = res.defaultValue
|
|
130
130
|
this.baseDate = res.defaultValue
|
|
131
131
|
this.$emit('update:modelValue', res.defaultValue)
|
|
132
|
+
} else {
|
|
133
|
+
// 如果没有默认值,则设置今天日期为基准日期
|
|
134
|
+
this.modelValue = this.baseDate
|
|
132
135
|
}
|
|
133
136
|
|
|
134
137
|
// 执行配置中指定的业务逻辑
|
|
@@ -52,9 +52,9 @@ routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynami
|
|
|
52
52
|
routerResource.example = {
|
|
53
53
|
path: 'example',
|
|
54
54
|
name: '示例主页面',
|
|
55
|
-
component: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
|
|
55
|
+
// component: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
|
|
56
56
|
// component: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
|
|
57
|
-
|
|
57
|
+
component: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
|
|
58
58
|
// component: () => import('@vue2-client/base-client/components/common/XDataCard/XDataCard.vue'),
|
|
59
59
|
// component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
|
|
60
60
|
// component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|