vue2-client 1.12.87 → 1.12.89
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
|
@@ -2,17 +2,20 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<a-collapse
|
|
4
4
|
:activeKey="activeKey"
|
|
5
|
-
@change="handleChange"
|
|
5
|
+
@change="handleChange"
|
|
6
|
+
>
|
|
6
7
|
<a-collapse-panel
|
|
7
8
|
v-for="(panel, panelIndex) in config.showData"
|
|
8
9
|
:key="panelIndex.toString()"
|
|
9
10
|
:show-arrow="false"
|
|
10
|
-
:disabled="config.collapsible"
|
|
11
|
+
:disabled="config.collapsible"
|
|
12
|
+
>
|
|
11
13
|
<template #header>
|
|
12
14
|
<div class="header-content">
|
|
13
15
|
<span
|
|
14
16
|
class="header-text"
|
|
15
|
-
:style="config.titleStyle"
|
|
17
|
+
:style="config.titleStyle"
|
|
18
|
+
>
|
|
16
19
|
{{ panel.title }}
|
|
17
20
|
</span>
|
|
18
21
|
<!-- 当有 title2 数据时显示信息项 -->
|
|
@@ -21,7 +24,8 @@
|
|
|
21
24
|
v-for="(item, headerIndex) in panel.title2"
|
|
22
25
|
:key="headerIndex"
|
|
23
26
|
class="info-item"
|
|
24
|
-
:style="config.title2Style"
|
|
27
|
+
:style="config.title2Style"
|
|
28
|
+
>
|
|
25
29
|
<!-- 根据showTitle是否显示键名 -->
|
|
26
30
|
<span v-if="config.showTitle">{{ item.key }}:</span>
|
|
27
31
|
<span>{{ item.value }}</span>
|
|
@@ -31,7 +35,8 @@
|
|
|
31
35
|
<span
|
|
32
36
|
v-if="panel.title3"
|
|
33
37
|
class="time-item"
|
|
34
|
-
:style="config.title3Style"
|
|
38
|
+
:style="config.title3Style"
|
|
39
|
+
>
|
|
35
40
|
{{ panel.title3 }}
|
|
36
41
|
</span>
|
|
37
42
|
<!-- 修改搜索框的显示条件 -->
|
|
@@ -41,7 +46,8 @@
|
|
|
41
46
|
:placeholder="panel.searchPlace"
|
|
42
47
|
class="search-input"
|
|
43
48
|
@search="(value) => onSearch(value, panelIndex)"
|
|
44
|
-
@click.stop
|
|
49
|
+
@click.stop
|
|
50
|
+
/>
|
|
45
51
|
</div>
|
|
46
52
|
</template>
|
|
47
53
|
<!-- 根据类型显示不同内容 -->
|
|
@@ -99,6 +105,11 @@ export default {
|
|
|
99
105
|
}
|
|
100
106
|
},
|
|
101
107
|
props: {
|
|
108
|
+
// 环境
|
|
109
|
+
env: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: 'prod'
|
|
112
|
+
},
|
|
102
113
|
// json名
|
|
103
114
|
queryParamsName: {
|
|
104
115
|
type: Object,
|
|
@@ -106,20 +117,33 @@ export default {
|
|
|
106
117
|
},
|
|
107
118
|
parameter: {
|
|
108
119
|
type: Object,
|
|
120
|
+
default: () => {
|
|
121
|
+
return {}
|
|
122
|
+
}
|
|
109
123
|
}
|
|
110
124
|
},
|
|
111
125
|
created () {
|
|
112
|
-
this.getData(this.queryParamsName)
|
|
126
|
+
this.getData(this.queryParamsName, this.parameter)
|
|
113
127
|
},
|
|
114
128
|
beforeDestroy () {
|
|
115
129
|
},
|
|
116
130
|
methods: {
|
|
117
|
-
|
|
131
|
+
getComponentName (componentName) {
|
|
132
|
+
return componentName
|
|
133
|
+
},
|
|
134
|
+
listClick (data) {
|
|
135
|
+
this.$emit('listClick', data)
|
|
136
|
+
},
|
|
137
|
+
getConfigByName (componentName) {
|
|
138
|
+
const refKey = `dynamicComponent_${componentName}`
|
|
139
|
+
return this.$refs[refKey]
|
|
140
|
+
},
|
|
141
|
+
async getData (config, parameter) {
|
|
118
142
|
this.configName = config
|
|
119
143
|
getConfigByName(config, 'af-his', res => {
|
|
120
144
|
this.config = res
|
|
121
145
|
console.warn(this.config)
|
|
122
|
-
runLogic(res.mainLogic,
|
|
146
|
+
runLogic(res.mainLogic, parameter, 'af-his').then(result => {
|
|
123
147
|
this.config.showData = result
|
|
124
148
|
// 更具timeType更改时间类型
|
|
125
149
|
if (this.config.timeType && this.config.timeType === '.') {
|
|
@@ -135,7 +159,7 @@ export default {
|
|
|
135
159
|
})
|
|
136
160
|
},
|
|
137
161
|
refreshXCollapse () {
|
|
138
|
-
this.getData(this.queryParamsName)
|
|
162
|
+
this.getData(this.queryParamsName, this.parameter)
|
|
139
163
|
},
|
|
140
164
|
convertToCustomFormat (dateString) {
|
|
141
165
|
// 创建一个新的 Date 对象
|
|
@@ -151,13 +175,13 @@ export default {
|
|
|
151
175
|
this.activeKey = keys
|
|
152
176
|
},
|
|
153
177
|
onSearch (value, panelIndex) {
|
|
154
|
-
|
|
178
|
+
console.log('搜索内容:', value, '面板索引:', panelIndex)
|
|
155
179
|
},
|
|
156
180
|
},
|
|
157
181
|
watch: {
|
|
158
182
|
queryParamsName: {
|
|
159
183
|
handler (newValue) {
|
|
160
|
-
this.getData(newValue,
|
|
184
|
+
this.getData(newValue, this.parameter)
|
|
161
185
|
},
|
|
162
186
|
deep: true
|
|
163
187
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
<div class="drawer-content" v-if="isOpen">
|
|
14
14
|
<x-report
|
|
15
|
+
ref="x_report"
|
|
15
16
|
:configName="queryParamsName"
|
|
16
17
|
:server-name="serverName"
|
|
17
18
|
:show-img-in-cell="true"
|
|
@@ -57,7 +58,6 @@ export default {
|
|
|
57
58
|
this.updateLayout(this.isOpen)
|
|
58
59
|
},
|
|
59
60
|
methods: {
|
|
60
|
-
|
|
61
61
|
toggleDrawer () {
|
|
62
62
|
this.isOpen = !this.isOpen
|
|
63
63
|
this.$emit('on-drawer-change', this.isOpen)
|