vue2-client 1.22.12 → 1.22.14
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/.idea/deployment.xml +14 -0
- package/.idea/misc.xml +5 -11
- package/.idea/modules.xml +1 -1
- package/.idea/{af-vue2-client.iml → vue2-client.iml} +3 -2
- package/package.json +1 -1
- package/src/base-client/components/common/AmapMarker/index.js +3 -3
- package/src/base-client/components/common/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/base-client/components/common/XFormTable/SummaryStatCard.vue +205 -0
- package/src/base-client/components/common/XFormTable/XFormTable.vue +3 -0
- package/src/base-client/components/common/XFormTable/demo.vue +1 -1
- package/tests/unit/a.log +0 -0
- package/.idea/encodings.xml +0 -6
- package/.idea/workspace.xml +0 -63
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
|
4
|
+
<serverData>
|
|
5
|
+
<paths name="50.4">
|
|
6
|
+
<serverdata>
|
|
7
|
+
<mappings>
|
|
8
|
+
<mapping local="$PROJECT_DIR$" web="/" />
|
|
9
|
+
</mappings>
|
|
10
|
+
</serverdata>
|
|
11
|
+
</paths>
|
|
12
|
+
</serverData>
|
|
13
|
+
</component>
|
|
14
|
+
</project>
|
package/.idea/misc.xml
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="
|
|
4
|
-
<option name="
|
|
5
|
-
|
|
6
|
-
<option name="localRepository" value="D:\apache-maven-3.5.2\repository" />
|
|
7
|
-
<option name="mavenHome" value="D:/apache-maven-3.5.2" />
|
|
8
|
-
<option name="userSettingsFile" value="D:\apache-maven-3.5.2\conf\settings.xml" />
|
|
9
|
-
</MavenGeneralSettings>
|
|
10
|
-
</option>
|
|
11
|
-
</component>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="JavaScriptSettings">
|
|
4
|
+
<option name="languageLevel" value="FLOW" />
|
|
5
|
+
</component>
|
|
12
6
|
</project>
|
package/.idea/modules.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="ProjectModuleManager">
|
|
4
4
|
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/vue2-client.iml" filepath="$PROJECT_DIR$/.idea/vue2-client.iml" />
|
|
6
6
|
</modules>
|
|
7
7
|
</component>
|
|
8
8
|
</project>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
4
5
|
<content url="file://$MODULE_DIR$" />
|
|
5
6
|
<orderEntry type="inheritedJdk" />
|
|
6
7
|
<orderEntry type="sourceFolder" forTests="false" />
|
package/package.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import AmapPointRendering from './AmapPointRendering'
|
|
2
|
-
|
|
3
|
-
export default AmapPointRendering
|
|
1
|
+
import AmapPointRendering from './AmapPointRendering'
|
|
2
|
+
|
|
3
|
+
export default AmapPointRendering
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import XDetailsView from './XDetailsView'
|
|
2
|
-
|
|
3
|
-
export default XDetailsView
|
|
1
|
+
import XDetailsView from './XDetailsView'
|
|
2
|
+
|
|
3
|
+
export default XDetailsView
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import XFormGroupDetails from './XFormGroupDetails'
|
|
2
|
-
|
|
3
|
-
export default XFormGroupDetails
|
|
1
|
+
import XFormGroupDetails from './XFormGroupDetails'
|
|
2
|
+
|
|
3
|
+
export default XFormGroupDetails
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<template v-if="summaryStatConfig">
|
|
4
|
+
<div v-if="loading" class="summary-stat-loading">加载中...</div>
|
|
5
|
+
<a-row v-else :gutter="16">
|
|
6
|
+
<a-col
|
|
7
|
+
style="margin-bottom: 12px"
|
|
8
|
+
v-for="(item, index) in summaryStatConfig.items"
|
|
9
|
+
:key="index"
|
|
10
|
+
:span="item.span || 6"
|
|
11
|
+
>
|
|
12
|
+
<a-card :body-style="{ padding: '16px' }" class="summary-stat-card">
|
|
13
|
+
<div class="stat-content">
|
|
14
|
+
<div class="stat-icon" :style="getItemIconStyle(item)">
|
|
15
|
+
<a-icon :type="item.icon || 'dashboard'" />
|
|
16
|
+
</div>
|
|
17
|
+
<div class="stat-info">
|
|
18
|
+
<div class="stat-title">{{ item.title }}</div>
|
|
19
|
+
<div class="stat-value" :style="getItemValueStyle(item)">
|
|
20
|
+
<span v-if="item.prefix" class="stat-prefix">{{ item.prefix }}</span>
|
|
21
|
+
<span>{{ getItemFormattedValue(item) }}</span>
|
|
22
|
+
<span v-if="item.suffix" class="stat-suffix">{{ item.suffix }}</span>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</a-card>
|
|
27
|
+
</a-col>
|
|
28
|
+
</a-row>
|
|
29
|
+
</template>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
import { runLogic } from '@vue2-client/services/api/common'
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: 'SummaryStatCard',
|
|
38
|
+
props: {
|
|
39
|
+
serviceName: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: undefined
|
|
42
|
+
},
|
|
43
|
+
summaryStatConfig: {
|
|
44
|
+
type: Object,
|
|
45
|
+
default: process.env.VUE_APP_SYSTEM_NAME
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
data() {
|
|
49
|
+
return {
|
|
50
|
+
logicResult: null,
|
|
51
|
+
loading: false,
|
|
52
|
+
error: null
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
computed: {
|
|
56
|
+
},
|
|
57
|
+
watch: {
|
|
58
|
+
summaryStatConfig: {
|
|
59
|
+
handler() {
|
|
60
|
+
if (this.summaryStatConfig && this.summaryStatConfig.dataSource) {
|
|
61
|
+
this.fetchLogicData()
|
|
62
|
+
} else {
|
|
63
|
+
this.logicResult = null
|
|
64
|
+
this.error = null
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
deep: true,
|
|
68
|
+
immediate: true
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
methods: {
|
|
72
|
+
async fetchLogicData() {
|
|
73
|
+
if (!this.summaryStatConfig || !this.summaryStatConfig.dataSource) {
|
|
74
|
+
this.logicResult = null
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
this.loading = true
|
|
78
|
+
this.error = null
|
|
79
|
+
try {
|
|
80
|
+
const res = await runLogic(this.summaryStatConfig.dataSource, {}, this.serviceName)
|
|
81
|
+
this.logicResult = res?.data || res
|
|
82
|
+
} catch (e) {
|
|
83
|
+
this.error = e
|
|
84
|
+
this.logicResult = null
|
|
85
|
+
} finally {
|
|
86
|
+
this.loading = false
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
getItemValue(item) {
|
|
90
|
+
if (!this.logicResult || !item.dataField) return null
|
|
91
|
+
return this.logicResult[item.dataField]
|
|
92
|
+
},
|
|
93
|
+
getItemFormattedValue(item) {
|
|
94
|
+
const val = this.getItemValue(item)
|
|
95
|
+
if (val === null || val === undefined) return '-'
|
|
96
|
+
const num = Number(val)
|
|
97
|
+
if (isNaN(num)) return val
|
|
98
|
+
if (num >= 10000) {
|
|
99
|
+
return (num / 10000).toFixed(1) + 'w'
|
|
100
|
+
}
|
|
101
|
+
return num.toLocaleString()
|
|
102
|
+
},
|
|
103
|
+
getItemIconStyle(item) {
|
|
104
|
+
const iconSize = item.iconSize || 32
|
|
105
|
+
return {
|
|
106
|
+
width: iconSize + 'px',
|
|
107
|
+
height: iconSize + 'px',
|
|
108
|
+
borderRadius: '8px',
|
|
109
|
+
display: 'flex',
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
justifyContent: 'center',
|
|
112
|
+
fontSize: (iconSize * 0.6) + 'px',
|
|
113
|
+
backgroundColor: (item.iconColor || '#1890ff') + '20',
|
|
114
|
+
color: item.iconColor || '#1890ff'
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
getItemValueStyle(item) {
|
|
118
|
+
return {
|
|
119
|
+
fontSize: (item.fontSize || 24) + 'px',
|
|
120
|
+
color: item.color || '#333333'
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
formattedValue() {
|
|
124
|
+
const num = Number(this.value)
|
|
125
|
+
if (isNaN(num)) return this.value
|
|
126
|
+
if (num >= 10000) {
|
|
127
|
+
return (num / 10000).toFixed(1) + 'w'
|
|
128
|
+
}
|
|
129
|
+
return num.toLocaleString()
|
|
130
|
+
},
|
|
131
|
+
iconStyle() {
|
|
132
|
+
const iconSize = this.config.iconSize || 32
|
|
133
|
+
return {
|
|
134
|
+
width: iconSize + 'px',
|
|
135
|
+
height: iconSize + 'px',
|
|
136
|
+
borderRadius: '8px',
|
|
137
|
+
display: 'flex',
|
|
138
|
+
alignItems: 'center',
|
|
139
|
+
justifyContent: 'center',
|
|
140
|
+
fontSize: (iconSize * 0.6) + 'px',
|
|
141
|
+
backgroundColor: this.config.iconColor + '20',
|
|
142
|
+
color: this.config.iconColor
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
valueStyle() {
|
|
146
|
+
return {
|
|
147
|
+
fontSize: (this.config.fontSize || 24) + 'px',
|
|
148
|
+
color: this.config.color || '#333333'
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
</script>
|
|
154
|
+
|
|
155
|
+
<style scoped lang="less">
|
|
156
|
+
.summary-stat-card {
|
|
157
|
+
border-radius: 8px;
|
|
158
|
+
transition: box-shadow 0.3s;
|
|
159
|
+
|
|
160
|
+
&:hover {
|
|
161
|
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.stat-content {
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
gap: 16px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.stat-info {
|
|
171
|
+
flex: 1;
|
|
172
|
+
min-width: 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.stat-title {
|
|
176
|
+
font-size: 14px;
|
|
177
|
+
color: #8c8c8c;
|
|
178
|
+
margin-bottom: 4px;
|
|
179
|
+
white-space: nowrap;
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
text-overflow: ellipsis;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.stat-value {
|
|
185
|
+
font-weight: 600;
|
|
186
|
+
line-height: 1.2;
|
|
187
|
+
display: flex;
|
|
188
|
+
align-items: baseline;
|
|
189
|
+
gap: 2px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.stat-prefix,
|
|
193
|
+
.stat-suffix {
|
|
194
|
+
font-size: 14px;
|
|
195
|
+
font-weight: normal;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.summary-stat-loading,
|
|
200
|
+
.summary-stat-error {
|
|
201
|
+
padding: 16px;
|
|
202
|
+
text-align: center;
|
|
203
|
+
color: #999;
|
|
204
|
+
}
|
|
205
|
+
</style>
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
<a-row style="height: 12px" v-if="xTreeConfigName"></a-row>
|
|
16
16
|
<div v-show="!loading">
|
|
17
17
|
<template v-if="!loadError">
|
|
18
|
+
<SummaryStatCard v-if="realQueryConfig.summaryStatConfig" :summaryStatConfig="realQueryConfig.summaryStatConfig" :serviceName="serviceName" />
|
|
18
19
|
<x-add-form
|
|
19
20
|
ref="xAddForm"
|
|
20
21
|
@onLocalSubmit="onLocalSubmit"
|
|
@@ -222,10 +223,12 @@ import { executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
|
|
|
222
223
|
import { getRealKeyData } from '@vue2-client/utils/util'
|
|
223
224
|
import * as util from '@vue2-client/utils/util'
|
|
224
225
|
import UserInfoDetailManage from '@vue2-client/pages/userInfoDetailManage/index.vue'
|
|
226
|
+
import SummaryStatCard from '@vue2-client/base-client/components/common/XFormTable/SummaryStatCard.vue'
|
|
225
227
|
|
|
226
228
|
export default {
|
|
227
229
|
name: 'XFormTable',
|
|
228
230
|
components: {
|
|
231
|
+
SummaryStatCard,
|
|
229
232
|
UserInfoDetailManage,
|
|
230
233
|
XTreePro,
|
|
231
234
|
XTable,
|
package/tests/unit/a.log
ADDED
|
File without changes
|
package/.idea/encodings.xml
DELETED
package/.idea/workspace.xml
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ChangeListManager">
|
|
4
|
-
<list default="true" id="a9b56467-cc7a-4aa4-b3b8-8de4daacc681" name="Changes" comment="">
|
|
5
|
-
<change beforePath="$PROJECT_DIR$/src/base-client/components/common/AfMap/map/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/base-client/components/common/AfMap/map/index.vue" afterDir="false" />
|
|
6
|
-
</list>
|
|
7
|
-
<option name="SHOW_DIALOG" value="false" />
|
|
8
|
-
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
9
|
-
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
10
|
-
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
11
|
-
</component>
|
|
12
|
-
<component name="Git.Settings">
|
|
13
|
-
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
|
14
|
-
<map>
|
|
15
|
-
<entry key="$PROJECT_DIR$" value="master" />
|
|
16
|
-
</map>
|
|
17
|
-
</option>
|
|
18
|
-
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
19
|
-
</component>
|
|
20
|
-
<component name="ProjectColorInfo"><![CDATA[{
|
|
21
|
-
"associatedIndex": 7
|
|
22
|
-
}]]></component>
|
|
23
|
-
<component name="ProjectId" id="3FTPOxG6f49MzNIl3AgtpM9cryK" />
|
|
24
|
-
<component name="ProjectViewState">
|
|
25
|
-
<option name="showLibraryContents" value="true" />
|
|
26
|
-
</component>
|
|
27
|
-
<component name="PropertiesComponent"><![CDATA[{
|
|
28
|
-
"keyToString": {
|
|
29
|
-
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
|
30
|
-
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
31
|
-
"RunOnceActivity.git.unshallow": "true",
|
|
32
|
-
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
|
33
|
-
"git-widget-placeholder": "dev",
|
|
34
|
-
"javascript.preferred.runtime.type.id": "node",
|
|
35
|
-
"node.js.detected.package.eslint": "true",
|
|
36
|
-
"node.js.selected.package.eslint": "(autodetect)",
|
|
37
|
-
"nodejs_package_manager_path": "yarn",
|
|
38
|
-
"ts.external.directory.path": "F:\\software\\webstorm\\WebStorm 2025.3.1\\plugins\\javascript-plugin\\jsLanguageServicesImpl\\external",
|
|
39
|
-
"vue.rearranger.settings.migration": "true"
|
|
40
|
-
}
|
|
41
|
-
}]]></component>
|
|
42
|
-
<component name="SharedIndexes">
|
|
43
|
-
<attachedChunks>
|
|
44
|
-
<set>
|
|
45
|
-
<option value="bundled-js-predefined-d6986cc7102b-9b0f141eb926-JavaScript-WS-253.29346.143" />
|
|
46
|
-
</set>
|
|
47
|
-
</attachedChunks>
|
|
48
|
-
</component>
|
|
49
|
-
<component name="TaskManager">
|
|
50
|
-
<task active="true" id="Default" summary="Default task">
|
|
51
|
-
<changelist id="a9b56467-cc7a-4aa4-b3b8-8de4daacc681" name="Changes" comment="" />
|
|
52
|
-
<created>1782096058058</created>
|
|
53
|
-
<option name="number" value="Default" />
|
|
54
|
-
<option name="presentableId" value="Default" />
|
|
55
|
-
<updated>1782096058058</updated>
|
|
56
|
-
<workItem from="1782096059367" duration="114000" />
|
|
57
|
-
</task>
|
|
58
|
-
<servers />
|
|
59
|
-
</component>
|
|
60
|
-
<component name="TypeScriptGeneratedFilesManager">
|
|
61
|
-
<option name="version" value="3" />
|
|
62
|
-
</component>
|
|
63
|
-
</project>
|