create-young-proj 1.7.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +95 -1
- package/README.md +6 -1
- package/dist/index.mjs +19 -19
- package/package.json +1 -1
- package/src/index.ts +6 -1
- package/template-admin-server/src/service/role.service.ts +5 -3
- package/template-big-screen/.editorconfig +14 -0
- package/template-big-screen/.nvmrc +1 -0
- package/template-big-screen/.vscode/extensions.json +12 -0
- package/template-big-screen/.vscode/settings.json +39 -0
- package/template-big-screen/Dockerfile +49 -0
- package/template-big-screen/README.md +20 -0
- package/template-big-screen/_gitignore +23 -0
- package/template-big-screen/_npmrc +2 -0
- package/template-big-screen/_nvmrc +1 -0
- package/template-big-screen/boot.mjs +16 -0
- package/template-big-screen/config/.devrc +1 -0
- package/template-big-screen/config/.onlinerc +1 -0
- package/template-big-screen/config/.testrc +1 -0
- package/template-big-screen/eslint.config.js +34 -0
- package/template-big-screen/index.html +48 -0
- package/template-big-screen/nitro.config.ts +23 -0
- package/template-big-screen/package.json +66 -0
- package/template-big-screen/plugins/init.ts +57 -0
- package/template-big-screen/public/favicon.svg +3 -0
- package/template-big-screen/routes/api/[...all].ts +19 -0
- package/template-big-screen/routes/get/env.ts +13 -0
- package/template-big-screen/src/App.vue +24 -0
- package/template-big-screen/src/apis/get.ts +77 -0
- package/template-big-screen/src/apis/index.ts +53 -0
- package/template-big-screen/src/apis/post.ts +14 -0
- package/template-big-screen/src/assets/data/china.json +1 -0
- package/template-big-screen/src/components/YoungCountUp.vue +29 -0
- package/template-big-screen/src/components/YoungECharts/config.ts +56 -0
- package/template-big-screen/src/components/YoungECharts/index.vue +111 -0
- package/template-big-screen/src/components/YoungHeader.vue +54 -0
- package/template-big-screen/src/components/YoungSectionContainer.vue +55 -0
- package/template-big-screen/src/components/YoungSectionHeader.vue +23 -0
- package/template-big-screen/src/composables/breakPoint.ts +20 -0
- package/template-big-screen/src/composables/dark.ts +52 -0
- package/template-big-screen/src/composables/echarts.ts +17 -0
- package/template-big-screen/src/composables/loadData.ts +38 -0
- package/template-big-screen/src/directives/ellipsis.ts +20 -0
- package/template-big-screen/src/directives/index.ts +13 -0
- package/template-big-screen/src/enums/breakpointEnum.ts +9 -0
- package/template-big-screen/src/layouts/404.vue +19 -0
- package/template-big-screen/src/layouts/blank.vue +9 -0
- package/template-big-screen/src/layouts/default.vue +17 -0
- package/template-big-screen/src/main.ts +59 -0
- package/template-big-screen/src/modules/index.ts +8 -0
- package/template-big-screen/src/modules/pinia.ts +11 -0
- package/template-big-screen/src/modules/router.ts +28 -0
- package/template-big-screen/src/pages/[...all].vue +16 -0
- package/template-big-screen/src/pages/electricity/build.vue +135 -0
- package/template-big-screen/src/pages/electricity/reliability.vue +137 -0
- package/template-big-screen/src/pages/electricity/sale-and-cost.vue +158 -0
- package/template-big-screen/src/pages/index.vue +59 -0
- package/template-big-screen/src/pages/kpi.vue +129 -0
- package/template-big-screen/src/pages/manage-improve.vue +114 -0
- package/template-big-screen/src/pages/social/condition.vue +202 -0
- package/template-big-screen/src/pages/social/electricity-usage.vue +140 -0
- package/template-big-screen/src/styles/index.scss +82 -0
- package/template-big-screen/tsconfig.json +38 -0
- package/template-big-screen/types/auto-imports.d.ts +949 -0
- package/template-big-screen/types/components.d.ts +19 -0
- package/template-big-screen/types/echarts.d.ts +36 -0
- package/template-big-screen/types/index.d.ts +45 -0
- package/template-big-screen/types/type.d.ts +38 -0
- package/template-big-screen/uno.config.ts +68 -0
- package/template-big-screen/vite.config.ts +131 -0
- package/template-big-screen/yarn.lock +7443 -0
- package/template-nuxt-admin/README.md +3 -3
- package/template-nuxt-admin/boot.mjs +4 -1
- package/template-nuxt-admin/composables/config.ts +2 -2
- package/template-nuxt-admin/config/.devrc +1 -1
- package/template-nuxt-admin/config/.onlinerc +1 -1
- package/template-nuxt-admin/config/.testrc +1 -1
- package/template-nuxt-admin/nuxt.config.ts +14 -5
- package/template-nuxt-admin/package.json +12 -11
- package/template-nuxt-admin/pages/system/api.vue +6 -6
- package/template-nuxt-admin/pages/system/role.vue +4 -4
- package/template-nuxt-admin/pages/system/user.vue +4 -4
- package/template-nuxt-admin/server/api/[...all].ts +10 -3
- package/template-nuxt-admin/server/plugins/env.ts +5 -4
- package/template-nuxt-admin/uno.config.ts +1 -9
- package/template-nuxt-admin/yarn.lock +3659 -3363
- package/template-nuxt-mobile/package.json +1 -0
- package/template-nuxt-mobile/server/utils/proxy.ts +1 -30
- package/template-nuxt-mobile/yarn.lock +9 -0
- package/template-nuxt-website/package.json +1 -0
- package/template-nuxt-website/server/utils/proxy.ts +1 -30
- package/template-nuxt-website/yarn.lock +9 -0
- package/template-nuxt-admin/server/utils/index.ts +0 -36
@@ -0,0 +1,202 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: zhangyang
|
3
|
+
* @Date: 2024-02-02 14:32:40
|
4
|
+
* @LastEditTime: 2024-02-02 14:32:40
|
5
|
+
* @Description:
|
6
|
+
-->
|
7
|
+
<script setup lang='ts'>
|
8
|
+
import echarts from '~/components/YoungECharts/config'
|
9
|
+
|
10
|
+
const { data, options } = useLoadData<ISocialCondition>(apis.get.getSocialCondition, (res) => {
|
11
|
+
return {
|
12
|
+
grid: {
|
13
|
+
left: '0%',
|
14
|
+
right: '0%',
|
15
|
+
top: ' 0%',
|
16
|
+
bottom: '0%',
|
17
|
+
containLabel: true,
|
18
|
+
},
|
19
|
+
tooltip: {
|
20
|
+
trigger: 'item',
|
21
|
+
},
|
22
|
+
title: [
|
23
|
+
{
|
24
|
+
text: '国内生产总值',
|
25
|
+
left: 'center',
|
26
|
+
top: '0',
|
27
|
+
textStyle: {
|
28
|
+
fontSize: 12,
|
29
|
+
color: '#aed3dd',
|
30
|
+
},
|
31
|
+
},
|
32
|
+
{
|
33
|
+
text: `${res?.increment?.reduce((pre, current) => (pre + current), 0).toFixed(2)}%`,
|
34
|
+
left: 'center',
|
35
|
+
top: 'center',
|
36
|
+
textStyle: {
|
37
|
+
fontSize: 14,
|
38
|
+
color: '#aed3dd',
|
39
|
+
},
|
40
|
+
subtextStyle: {
|
41
|
+
fontSize: 12,
|
42
|
+
color: '#afcfdc',
|
43
|
+
},
|
44
|
+
itemGap: 0,
|
45
|
+
},
|
46
|
+
],
|
47
|
+
legend: {
|
48
|
+
bottom: '0%',
|
49
|
+
textStyle: {
|
50
|
+
color: '#90acb9',
|
51
|
+
fontSize: '12px',
|
52
|
+
},
|
53
|
+
itemWidth: 12,
|
54
|
+
itemHeight: 12,
|
55
|
+
itemGap: 4,
|
56
|
+
},
|
57
|
+
series: [
|
58
|
+
{
|
59
|
+
name: '国内生产总值',
|
60
|
+
type: 'pie',
|
61
|
+
radius: ['30%', '50%'],
|
62
|
+
avoidLabelOverlap: false,
|
63
|
+
labelLine: {
|
64
|
+
show: true,
|
65
|
+
length: 6,
|
66
|
+
length2: 6,
|
67
|
+
},
|
68
|
+
label: {
|
69
|
+
color: '#afcfdc',
|
70
|
+
fontSize: 12,
|
71
|
+
overflow: 'break',
|
72
|
+
position: 'outside',
|
73
|
+
formatter: '{d} %',
|
74
|
+
},
|
75
|
+
emphasis: {
|
76
|
+
label: {
|
77
|
+
show: true,
|
78
|
+
fontSize: 10,
|
79
|
+
fontWeight: 'bold',
|
80
|
+
},
|
81
|
+
},
|
82
|
+
data: [
|
83
|
+
{
|
84
|
+
name: '第一产业',
|
85
|
+
value: res?.industry?.[0],
|
86
|
+
itemStyle: {
|
87
|
+
color: new echarts.graphic.LinearGradient(
|
88
|
+
0,
|
89
|
+
1,
|
90
|
+
0,
|
91
|
+
0,
|
92
|
+
[
|
93
|
+
{
|
94
|
+
offset: 0,
|
95
|
+
color: '#08d8d8', // 0% 处的颜色
|
96
|
+
},
|
97
|
+
{
|
98
|
+
offset: 1,
|
99
|
+
color: '#7affff', // 100% 处的颜色
|
100
|
+
},
|
101
|
+
],
|
102
|
+
false,
|
103
|
+
),
|
104
|
+
},
|
105
|
+
},
|
106
|
+
{
|
107
|
+
name: '第二产业',
|
108
|
+
value: res?.industry?.[1],
|
109
|
+
itemStyle: {
|
110
|
+
color: new echarts.graphic.LinearGradient(
|
111
|
+
0,
|
112
|
+
1,
|
113
|
+
0,
|
114
|
+
0,
|
115
|
+
[
|
116
|
+
{
|
117
|
+
offset: 0,
|
118
|
+
color: '#fa53fa', // 0% 处的颜色
|
119
|
+
},
|
120
|
+
{
|
121
|
+
offset: 1,
|
122
|
+
color: '#e793f8', // 100% 处的颜色
|
123
|
+
},
|
124
|
+
],
|
125
|
+
false,
|
126
|
+
),
|
127
|
+
},
|
128
|
+
},
|
129
|
+
{
|
130
|
+
name: '第三产业',
|
131
|
+
value: res?.industry?.[2],
|
132
|
+
itemStyle: {
|
133
|
+
color: new echarts.graphic.LinearGradient(
|
134
|
+
0,
|
135
|
+
1,
|
136
|
+
0,
|
137
|
+
0,
|
138
|
+
[
|
139
|
+
{
|
140
|
+
offset: 0,
|
141
|
+
color: '#7161fe', // 0% 处的颜色
|
142
|
+
},
|
143
|
+
{
|
144
|
+
offset: 1,
|
145
|
+
color: '#e388f2', // 100% 处的颜色
|
146
|
+
},
|
147
|
+
|
148
|
+
],
|
149
|
+
false,
|
150
|
+
),
|
151
|
+
},
|
152
|
+
},
|
153
|
+
],
|
154
|
+
},
|
155
|
+
],
|
156
|
+
}
|
157
|
+
})
|
158
|
+
</script>
|
159
|
+
|
160
|
+
<template>
|
161
|
+
<div v-if="data" class="h-full flex flex-col">
|
162
|
+
<YoungSectionHeader index="1" title="社会状况" />
|
163
|
+
<div class="h-full flex flex-1 py-4">
|
164
|
+
<YoungSectionContainer>
|
165
|
+
<div class="h-full between">
|
166
|
+
<div class="w-full text-left">
|
167
|
+
<div class="between">
|
168
|
+
<div>
|
169
|
+
<div v-ellipsis>
|
170
|
+
铁路货物运输量(万吨)
|
171
|
+
</div>
|
172
|
+
<YoungCountUp :count="data?.values?.[0]" />
|
173
|
+
</div>
|
174
|
+
<YoungCountUp :count="data?.increment?.[`0`]" showfix :decimal-places="1" />
|
175
|
+
</div>
|
176
|
+
<div class="between py-2">
|
177
|
+
<div>
|
178
|
+
<div v-ellipsis>
|
179
|
+
银行中长期贷款(亿元)
|
180
|
+
</div>
|
181
|
+
<YoungCountUp :count="data?.values?.[1]" />
|
182
|
+
</div>
|
183
|
+
<YoungCountUp :count="data?.increment?.[`1`]" showfix :decimal-places="1" />
|
184
|
+
</div>
|
185
|
+
<div class="between">
|
186
|
+
<div>
|
187
|
+
<div v-ellipsis>
|
188
|
+
耗电量(万千瓦时)
|
189
|
+
</div>
|
190
|
+
<YoungCountUp :count="data?.values?.[2]" />
|
191
|
+
</div>
|
192
|
+
<YoungCountUp :count="data?.increment?.[`2`]" showfix :decimal-places="1" />
|
193
|
+
</div>
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
</YoungSectionContainer>
|
197
|
+
<div class="h-full w-50% center">
|
198
|
+
<YoungECharts :options="options" width="250px" height="200px" />
|
199
|
+
</div>
|
200
|
+
</div>
|
201
|
+
</div>
|
202
|
+
</template>
|
@@ -0,0 +1,140 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: zhangyang
|
3
|
+
* @Date: 2024-02-02 14:43:35
|
4
|
+
* @LastEditTime: 2024-02-02 14:43:36
|
5
|
+
* @Description:
|
6
|
+
-->
|
7
|
+
<script setup lang='ts'>
|
8
|
+
import echarts from '~/components/YoungECharts/config'
|
9
|
+
|
10
|
+
const { data, options } = useLoadData(apis.get.getElectricityUsage, (res) => {
|
11
|
+
return {
|
12
|
+
grid: {
|
13
|
+
left: '2%',
|
14
|
+
right: '4%',
|
15
|
+
top: '30%',
|
16
|
+
bottom: '0%',
|
17
|
+
containLabel: true,
|
18
|
+
},
|
19
|
+
title: {
|
20
|
+
text: '全社会用电量',
|
21
|
+
left: 'center',
|
22
|
+
top: '0',
|
23
|
+
textStyle: {
|
24
|
+
fontSize: '12px',
|
25
|
+
width: 250,
|
26
|
+
overflow: 'break',
|
27
|
+
color: '#aed3dd',
|
28
|
+
},
|
29
|
+
},
|
30
|
+
tooltip: {
|
31
|
+
trigger: 'axis',
|
32
|
+
axisPointer: {
|
33
|
+
type: 'cross',
|
34
|
+
crossStyle: {
|
35
|
+
color: '#999',
|
36
|
+
},
|
37
|
+
},
|
38
|
+
},
|
39
|
+
legend: {
|
40
|
+
show: false,
|
41
|
+
},
|
42
|
+
xAxis: [
|
43
|
+
{
|
44
|
+
type: 'category',
|
45
|
+
data: ['福建', '浙江', '安徽', '上海', '江苏'],
|
46
|
+
axisPointer: {
|
47
|
+
type: 'shadow',
|
48
|
+
},
|
49
|
+
},
|
50
|
+
],
|
51
|
+
yAxis: [
|
52
|
+
{
|
53
|
+
type: 'value',
|
54
|
+
name: '用电量',
|
55
|
+
min: 0,
|
56
|
+
max: 4000,
|
57
|
+
},
|
58
|
+
{
|
59
|
+
type: 'value',
|
60
|
+
name: '增长率',
|
61
|
+
min: 0,
|
62
|
+
max: 8,
|
63
|
+
},
|
64
|
+
],
|
65
|
+
series: [
|
66
|
+
{
|
67
|
+
name: '用电量',
|
68
|
+
type: 'bar',
|
69
|
+
tooltip: {
|
70
|
+
valueFormatter(value) {
|
71
|
+
return `${value as number}`
|
72
|
+
},
|
73
|
+
},
|
74
|
+
data: res.electricity,
|
75
|
+
itemStyle: {
|
76
|
+
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
77
|
+
{
|
78
|
+
offset: 0,
|
79
|
+
color: '#db8195',
|
80
|
+
},
|
81
|
+
{
|
82
|
+
offset: 1,
|
83
|
+
color: '#603969',
|
84
|
+
},
|
85
|
+
]),
|
86
|
+
},
|
87
|
+
},
|
88
|
+
{
|
89
|
+
name: '增长率',
|
90
|
+
type: 'line',
|
91
|
+
yAxisIndex: 1,
|
92
|
+
tooltip: {
|
93
|
+
valueFormatter(value) {
|
94
|
+
return `${value as number}`
|
95
|
+
},
|
96
|
+
},
|
97
|
+
itemStyle: {
|
98
|
+
color: '#855661',
|
99
|
+
},
|
100
|
+
data: res.electricity.map(item => Math.ceil((item / 500))),
|
101
|
+
},
|
102
|
+
],
|
103
|
+
}
|
104
|
+
})
|
105
|
+
</script>
|
106
|
+
|
107
|
+
<template>
|
108
|
+
<div class="h-full flex flex-col">
|
109
|
+
<YoungSectionHeader index="3" title="全社会用电量" />
|
110
|
+
<div v-if="data" class="h-full flex flex-1 py-4">
|
111
|
+
<YoungSectionContainer>
|
112
|
+
<div class="h-full w-full center">
|
113
|
+
<div class="h-60% w-full between flex-col">
|
114
|
+
<div class="w-full between">
|
115
|
+
<div>
|
116
|
+
<div v-ellipsis>
|
117
|
+
本月全网用电量(亿千瓦时)
|
118
|
+
</div>
|
119
|
+
<YoungCountUp :count="data?.values?.[0]" :decimal-places="2" />
|
120
|
+
</div>
|
121
|
+
<YoungCountUp :count="data?.increment?.[0]" :decimal-places="1" showfix />
|
122
|
+
</div>
|
123
|
+
<div class="w-full between">
|
124
|
+
<div>
|
125
|
+
<div v-ellipsis>
|
126
|
+
本年用电负荷(万千瓦时)
|
127
|
+
</div>
|
128
|
+
<YoungCountUp :count="data?.values?.[1]" />
|
129
|
+
</div>
|
130
|
+
<YoungCountUp :count="data?.increment?.[1]" :decimal-places="1" showfix />
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
</div>
|
134
|
+
</YoungSectionContainer>
|
135
|
+
<div class="h-full w-50% center">
|
136
|
+
<YoungECharts :options="options" height="200px" width="250px" />
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
</template>
|
@@ -0,0 +1,82 @@
|
|
1
|
+
:root{
|
2
|
+
--text-color:#92b1bb
|
3
|
+
}
|
4
|
+
|
5
|
+
html,
|
6
|
+
body,
|
7
|
+
#app {
|
8
|
+
height: 100%;
|
9
|
+
margin: 0;
|
10
|
+
padding: 0;
|
11
|
+
color:#07cfc2;
|
12
|
+
}
|
13
|
+
|
14
|
+
html.light{
|
15
|
+
background: #f9f9f9;
|
16
|
+
color-scheme: light;
|
17
|
+
}
|
18
|
+
|
19
|
+
html.dark {
|
20
|
+
background: #101521;
|
21
|
+
color-scheme: dark;
|
22
|
+
}
|
23
|
+
|
24
|
+
#nprogress {
|
25
|
+
pointer-events: none;
|
26
|
+
}
|
27
|
+
|
28
|
+
#nprogress .bar {
|
29
|
+
background: rgb(13,148,136);
|
30
|
+
opacity: 0.75;
|
31
|
+
position: fixed;
|
32
|
+
z-index: 1031;
|
33
|
+
top: 0;
|
34
|
+
left: 0;
|
35
|
+
width: 100%;
|
36
|
+
height: 2px;
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
//dark transition
|
41
|
+
::view-transition-old(root),
|
42
|
+
::view-transition-new(root) {
|
43
|
+
animation: none;
|
44
|
+
mix-blend-mode: normal;
|
45
|
+
}
|
46
|
+
::view-transition-old(root) {
|
47
|
+
z-index: 1;
|
48
|
+
}
|
49
|
+
::view-transition-new(root) {
|
50
|
+
z-index: 2147483646;
|
51
|
+
}
|
52
|
+
.dark::view-transition-old(root) {
|
53
|
+
z-index: 2147483646;
|
54
|
+
}
|
55
|
+
.dark::view-transition-new(root) {
|
56
|
+
z-index: 1;
|
57
|
+
}
|
58
|
+
|
59
|
+
.ellipsis-container {
|
60
|
+
width: 200px; /* 设置文本容器的宽度 */
|
61
|
+
overflow: hidden; /* 隐藏溢出的文本内容 */
|
62
|
+
white-space: nowrap; /* 防止文本换行 */
|
63
|
+
}
|
64
|
+
|
65
|
+
.scrolling-text {
|
66
|
+
display: inline-block; /* 将文本作为内联块元素显示 */
|
67
|
+
animation: scrollText 10s linear infinite; /* 应用滚动动画 */
|
68
|
+
}
|
69
|
+
|
70
|
+
@keyframes scrollText {
|
71
|
+
0% {
|
72
|
+
transform: translateX(0%); /* 开始位置:文本在容器右侧 */
|
73
|
+
}
|
74
|
+
30% {
|
75
|
+
transform: translateX(0%); /* 开始位置:文本在容器右侧 */
|
76
|
+
}
|
77
|
+
100% {
|
78
|
+
transform: translateX(-100%); /* 结束位置:文本在容器左侧 */
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"target": "ESNext",
|
4
|
+
"jsx": "preserve",
|
5
|
+
"lib": ["DOM", "ESNext"],
|
6
|
+
"baseUrl": ".",
|
7
|
+
"module": "ESNext",
|
8
|
+
"moduleResolution": "node",
|
9
|
+
"paths": {
|
10
|
+
"~/*": ["src/*"]
|
11
|
+
},
|
12
|
+
"resolveJsonModule": true,
|
13
|
+
"types": [
|
14
|
+
"vite/client",
|
15
|
+
"vite-plugin-pages/client",
|
16
|
+
"vite-plugin-vue-layouts/client",
|
17
|
+
"types/*.d.ts"
|
18
|
+
],
|
19
|
+
"allowJs": true,
|
20
|
+
"strict": true,
|
21
|
+
"strictNullChecks": true,
|
22
|
+
"noUnusedLocals": true,
|
23
|
+
"esModuleInterop": true,
|
24
|
+
"forceConsistentCasingInFileNames": true,
|
25
|
+
"isolatedModules": true,
|
26
|
+
"skipLibCheck": true
|
27
|
+
},
|
28
|
+
"include": [
|
29
|
+
"src/**/*.ts",
|
30
|
+
"src/**/*.d.ts",
|
31
|
+
"src/**/*.tsx",
|
32
|
+
"src/**/*.vue",
|
33
|
+
"types/**/*.d.ts",
|
34
|
+
"types/**/*.ts",
|
35
|
+
"vite.config.ts"
|
36
|
+
],
|
37
|
+
"exclude": ["dist", "node_modules"]
|
38
|
+
}
|