Skip to content

Commit fd694b2

Browse files
feat: application
1 parent 70b5782 commit fd694b2

File tree

13 files changed

+441
-283
lines changed

13 files changed

+441
-283
lines changed

ui/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
"axios": "^1.8.4",
2424
"cropperjs": "^2.0.0-rc.2",
2525
"dingtalk-jsapi": "^3.1.0",
26+
"echarts": "^5.6.0",
2627
"element-plus": "^2.9.10",
2728
"file-saver": "^2.0.5",
2829
"highlight.js": "^11.11.1",
2930
"katex": "^0.16.22",
3031
"md-editor-v3": "^5.6.1",
3132
"mermaid": "^11.6.0",
33+
"moment": "^2.30.1",
3234
"nprogress": "^0.2.0",
3335
"pinia": "^3.0.1",
3436
"screenfull": "^6.0.2",
1.85 KB
Loading
12.2 KB
Loading
240 Bytes
Loading
24.5 KB
Loading
11.3 KB
Loading
9.13 KB
Loading

ui/src/components/app-icon/icons/application.ts

Lines changed: 183 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default {
9090
])
9191
},
9292
},
93-
'app-operation': {
93+
'app-operation': {
9494
iconReader: () => {
9595
return h('i', [
9696
h(
@@ -99,16 +99,197 @@ export default {
9999
style: { height: '100%', width: '100%' },
100100
viewBox: '0 0 16 16',
101101
version: '1.1',
102-
xmlns: 'http://www.w3.org/2000/svg'
102+
xmlns: 'http://www.w3.org/2000/svg',
103103
},
104104
[
105105
h('path', {
106106
d: 'M11.0002 11.3333H14.2395C14.3881 11.3333 14.442 11.3487 14.4963 11.3778C14.5506 11.4068 14.5933 11.4495 14.6223 11.5038C14.6514 11.5581 14.6668 11.612 14.6668 11.7606V12.2393C14.6668 12.3879 14.6514 12.4417 14.6223 12.4961C14.5933 12.5504 14.5506 12.593 14.4963 12.6221C14.442 12.6511 14.3881 12.6666 14.2395 12.6666H11.0002V14.2393C11.0002 14.3879 10.9847 14.4417 10.9556 14.4961C10.9266 14.5504 10.884 14.593 10.8296 14.6221C10.7753 14.6511 10.7214 14.6666 10.5728 14.6666H10.0941C9.94556 14.6666 9.89168 14.6511 9.83736 14.6221C9.78304 14.593 9.7404 14.5504 9.71135 14.4961C9.6823 14.4417 9.66683 14.3879 9.66683 14.2393V12.6666H1.76081C1.61222 12.6666 1.55834 12.6511 1.50402 12.6221C1.4497 12.593 1.40707 12.5504 1.37802 12.4961C1.34897 12.4417 1.3335 12.3879 1.3335 12.2393V11.7606C1.3335 11.612 1.34897 11.5581 1.37802 11.5038C1.40707 11.4495 1.4497 11.4068 1.50402 11.3778C1.55834 11.3487 1.61222 11.3333 1.76081 11.3333H9.66683V9.76057C9.66683 9.61198 9.6823 9.5581 9.71135 9.50378C9.7404 9.44946 9.78304 9.40683 9.83736 9.37778C9.89168 9.34872 9.94556 9.33325 10.0941 9.33325H10.5728C10.7214 9.33325 10.7753 9.34872 10.8296 9.37778C10.884 9.40683 10.9266 9.44946 10.9556 9.50378C10.9847 9.5581 11.0002 9.61198 11.0002 9.76057V11.3333ZM5.00016 3.33325V1.76057C5.00016 1.61198 5.01563 1.5581 5.04469 1.50378C5.07374 1.44946 5.11637 1.40683 5.17069 1.37777C5.22501 1.34872 5.27889 1.33325 5.42748 1.33325H5.90618C6.05477 1.33325 6.10865 1.34872 6.16297 1.37777C6.21729 1.40683 6.25992 1.44946 6.28897 1.50378C6.31803 1.5581 6.3335 1.61198 6.3335 1.76057V3.33325H14.2395C14.3881 3.33325 14.442 3.34872 14.4963 3.37777C14.5506 3.40683 14.5933 3.44946 14.6223 3.50378C14.6514 3.5581 14.6668 3.61198 14.6668 3.76057V4.23927C14.6668 4.38786 14.6514 4.44174 14.6223 4.49606C14.5933 4.55038 14.5506 4.59301 14.4963 4.62206C14.442 4.65111 14.3881 4.66659 14.2395 4.66659H6.3335V6.23927C6.3335 6.38786 6.31803 6.44174 6.28897 6.49606C6.25992 6.55038 6.21729 6.59301 6.16297 6.62206C6.10865 6.65111 6.05477 6.66659 5.90618 6.66659H5.42748C5.27889 6.66659 5.22501 6.65111 5.17069 6.62206C5.11637 6.59301 5.07374 6.55038 5.04469 6.49606C5.01563 6.44174 5.00016 6.38786 5.00016 6.23927V4.66659H1.76081C1.61222 4.66659 1.55834 4.65111 1.50402 4.62206C1.4497 4.59301 1.40707 4.55038 1.37802 4.49606C1.34897 4.44174 1.3335 4.38786 1.3335 4.23927V3.76057C1.3335 3.61198 1.34897 3.5581 1.37802 3.50378C1.40707 3.44946 1.4497 3.40683 1.50402 3.37777C1.55834 3.34872 1.61222 3.33325 1.76081 3.33325H5.00016Z',
107+
fill: 'currentColor',
108+
}),
109+
],
110+
),
111+
])
112+
},
113+
},
114+
'app-user': {
115+
iconReader: () => {
116+
return h('i', [
117+
h(
118+
'svg',
119+
{
120+
style: { height: '100%', width: '100%' },
121+
viewBox: '0 0 24 24',
122+
version: '1.1',
123+
xmlns: 'http://www.w3.org/2000/svg',
124+
},
125+
[
126+
h('path', {
127+
d: 'M15 13H9C6.23858 13 3 14.9314 3 18.4V21.1C3 21.597 3.44772 22 4 22H20C20.5523 22 21 21.597 21 21.1V18.4C21 14.9285 17.7614 13 15 13Z',
128+
fill: 'currentColor',
129+
}),
130+
h('path', {
131+
d: 'M7 6.99997C7 9.76139 9.23858 12 12 12C14.7614 12 17 9.76139 17 6.99997C17 4.23855 14.7614 1.99997 12 1.99997C9.23858 1.99997 7 4.23855 7 6.99997Z',
132+
fill: 'currentColor',
133+
}),
134+
],
135+
),
136+
])
137+
},
138+
},
139+
140+
'app-question': {
141+
iconReader: () => {
142+
return h('i', [
143+
h(
144+
'svg',
145+
{
146+
style: { height: '100%', width: '100%' },
147+
viewBox: '0 0 24 24',
148+
version: '1.1',
149+
xmlns: 'http://www.w3.org/2000/svg',
150+
},
151+
[
152+
h('path', {
153+
d: 'M12.7071 22.2009L17 18.5111H21.5C22.0523 18.5111 22.5 18.0539 22.5 17.4899V2.52112C22.5 1.95715 22.0523 1.49997 21.5 1.49997H2C1.44772 1.49997 1 1.95715 1 2.52112V17.4899C1 18.0539 1.44772 18.5111 2 18.5111H7L11.2929 22.2009C11.6834 22.5997 12.3166 22.5997 12.7071 22.2009ZM6.5 8.49997H7.5C8.05228 8.49997 8.5 8.94768 8.5 9.49997V10.5C8.5 11.0523 8.05228 11.5 7.5 11.5H6.5C5.94772 11.5 5.5 11.0523 5.5 10.5V9.49997C5.5 8.94768 5.94772 8.49997 6.5 8.49997ZM10.5 9.49997C10.5 8.94768 10.9477 8.49997 11.5 8.49997H12.5C13.0523 8.49997 13.5 8.94768 13.5 9.49997V10.5C13.5 11.0523 13.0523 11.5 12.5 11.5H11.5C10.9477 11.5 10.5 11.0523 10.5 10.5V9.49997ZM16.5 8.49997H17.5C18.0523 8.49997 18.5 8.94768 18.5 9.49997V10.5C18.5 11.0523 18.0523 11.5 17.5 11.5H16.5C15.9477 11.5 15.5 11.0523 15.5 10.5V9.49997C15.5 8.94768 15.9477 8.49997 16.5 8.49997Z',
154+
fill: 'currentColor',
155+
}),
156+
],
157+
),
158+
])
159+
},
160+
},
161+
'app-tokens': {
162+
iconReader: () => {
163+
return h('i', [
164+
h(
165+
'svg',
166+
{
167+
style: { height: '100%', width: '100%' },
168+
viewBox: '0 0 24 24',
169+
version: '1.1',
170+
xmlns: 'http://www.w3.org/2000/svg',
171+
},
172+
[
173+
h('path', {
174+
d: 'M15.6 2.39996C12.288 2.39996 9.60002 5.08796 9.60002 8.39996C9.60002 9.11996 9.74402 9.79196 9.97202 10.428L2.47325 17.9267C2.42636 17.9736 2.40002 18.0372 2.40002 18.1035V21.1C2.40002 21.3761 2.62388 21.6 2.90002 21.6H4.30002C4.57617 21.6 4.80002 21.3761 4.80002 21.1V20.4H6.70003C6.97617 20.4 7.20002 20.1761 7.20002 19.9V18H8.40002L10.8 15.6H12L13.572 14.028C14.208 14.256 14.88 14.4 15.6 14.4C18.912 14.4 21.6 11.712 21.6 8.39996C21.6 5.08796 18.912 2.39996 15.6 2.39996ZM17.4 8.39996C16.404 8.39996 15.6 7.59596 15.6 6.59996C15.6 5.60396 16.404 4.79996 17.4 4.79996C18.396 4.79996 19.2 5.60396 19.2 6.59996C19.2 7.59596 18.396 8.39996 17.4 8.39996Z',
175+
fill: 'currentColor',
176+
}),
177+
],
178+
),
179+
])
180+
},
181+
},
182+
'app-user-stars': {
183+
iconReader: () => {
184+
return h('i', [
185+
h(
186+
'svg',
187+
{
188+
style: { height: '100%', width: '100%' },
189+
viewBox: '0 0 24 24',
190+
version: '1.1',
191+
xmlns: 'http://www.w3.org/2000/svg',
192+
},
193+
[
194+
h('path', {
195+
d: 'M12 23C18.0751 23 23 18.0751 23 12C23 5.92484 18.0751 0.999969 12 0.999969C5.92487 0.999969 1 5.92484 1 12C1 18.0751 5.92487 23 12 23ZM8.5 10.5C7.67157 10.5 7 9.8284 7 8.99997C7 8.17154 7.67157 7.49997 8.5 7.49997C9.32843 7.49997 10 8.17154 10 8.99997C10 9.8284 9.32843 10.5 8.5 10.5ZM17 8.99997C17 9.8284 16.3284 10.5 15.5 10.5C14.6716 10.5 14 9.8284 14 8.99997C14 8.17154 14.6716 7.49997 15.5 7.49997C16.3284 7.49997 17 8.17154 17 8.99997ZM16.9779 13.4994C16.7521 16.0264 14.8169 18 12 18C9.18312 18 7.24789 16.0264 7.02213 13.4994C6.99756 13.2244 7.22386 13 7.5 13H16.5C16.7761 13 17.0024 13.2244 16.9779 13.4994Z',
196+
fill: 'currentColor',
197+
}),
198+
],
199+
),
200+
])
201+
},
202+
},
203+
'app-like': {
204+
iconReader: () => {
205+
return h('i', [
206+
h(
207+
'svg',
208+
{
209+
style: { height: '100%', width: '100%' },
210+
viewBox: '0 0 16 16',
211+
version: '1.1',
212+
xmlns: 'http://www.w3.org/2000/svg'
213+
},
214+
[
215+
h('path', {
216+
d: 'M2.00518 14.6608H0.666612C0.666097 14.6874 0.666707 5.33317 0.666612 5.29087H2.00518C2.00004 5.33317 1.98014 14.6874 2.00518 14.6608ZM9.70096 5.28984H12.5717C14.5687 5.28984 15.0274 7.05264 14.5687 8.37353L12.5717 13.6308C12.4029 14.2423 11.8409 14.6665 11.1995 14.6665H3.33882C3.154 14.6665 3.00418 14.5167 3.00418 14.3319V5.62448C3.00418 5.43966 3.154 5.28984 3.33882 5.28984H4.02656C4.24449 5.28984 4.44877 5.18374 4.5741 5.00545L7.35254 1.05296C7.5406 0.753754 8.04824 0.52438 8.5893 0.770777C9.40089 1.14037 10.3724 1.94718 10.3724 3.28394C10.3724 3.78809 10.1486 4.45673 9.70096 5.28984ZM12.5717 6.62841H7.46215L8.52183 4.65626C8.87422 4.00045 9.03388 3.52351 9.03388 3.28394C9.03388 2.89556 8.9524 2.45627 8.25544 2.09612L5.26934 6.34402C5.14401 6.5223 4.93973 6.62841 4.72181 6.62841H4.34275V13.3279H11.1995C11.2411 13.3279 11.2734 13.3035 11.2813 13.2747L11.298 13.2142L13.3098 7.91815C13.5743 7.13902 13.3105 6.62841 12.5717 6.62841Z',
107217
fill: 'currentColor'
108218
})
109219
]
110220
)
111221
])
112222
}
113223
},
224+
'app-like-color': {
225+
iconReader: () => {
226+
return h('i', [
227+
h(
228+
'svg',
229+
{
230+
style: { height: '100%', width: '100%' },
231+
viewBox: '0 0 16 16',
232+
version: '1.1',
233+
xmlns: 'http://www.w3.org/2000/svg'
234+
},
235+
[
236+
h('path', {
237+
d: 'M2.00497 14.6608H2.00518C2.00511 14.6609 2.00504 14.6609 2.00497 14.6608H0.666612C0.666097 14.6874 0.666707 5.33317 0.666612 5.29087H2.00518C2.00006 5.33305 1.98026 14.6344 2.00497 14.6608Z',
238+
fill: '#FFC60A'
239+
}),
240+
h('path', {
241+
d: 'M12.5717 5.28984H9.70096C10.1486 4.45673 10.3724 3.78809 10.3724 3.28394C10.3724 1.94718 9.40089 1.14037 8.5893 0.770777C8.04824 0.52438 7.5406 0.753754 7.35254 1.05296L4.5741 5.00545C4.44877 5.18374 4.24449 5.28984 4.02656 5.28984H3.33882C3.154 5.28984 3.00418 5.43966 3.00418 5.62448V14.3319C3.00418 14.5167 3.154 14.6665 3.33882 14.6665H11.1995C11.8409 14.6665 12.4029 14.2423 12.5717 13.6308L14.5687 8.37353C15.0274 7.05264 14.5687 5.28984 12.5717 5.28984Z',
242+
fill: '#FFC60A'
243+
})
244+
]
245+
)
246+
])
247+
}
248+
},
249+
'app-oppose': {
250+
iconReader: () => {
251+
return h('i', [
252+
h(
253+
'svg',
254+
{
255+
style: { height: '100%', width: '100%' },
256+
viewBox: '0 0 16 16',
257+
version: '1.1',
258+
xmlns: 'http://www.w3.org/2000/svg'
259+
},
260+
[
261+
h('path', {
262+
d: 'M2.00518 1.28008H0.666616C0.666616 1.33341 0.666504 10.6667 0.666616 10.65H2.00518C1.99984 10.6667 1.99984 1.33341 2.00518 1.28008ZM9.70097 10.6511H12.5717C14.5687 10.6511 15.0274 8.88828 14.5687 7.56739L12.5717 2.3101C12.4029 1.69862 11.8409 1.27441 11.1996 1.27441H3.33883C3.15401 1.27441 3.00418 1.42424 3.00418 1.60906V10.3164C3.00418 10.5013 3.15401 10.6511 3.33883 10.6511H4.02656C4.24449 10.6511 4.44877 10.7572 4.5741 10.9355L7.35254 14.888C7.5406 15.1872 8.04825 15.4165 8.58931 15.1701C9.40089 14.8005 10.3724 13.9937 10.3724 12.657C10.3724 12.1528 10.1486 11.4842 9.70097 10.6511ZM12.5717 9.31251H7.46216L8.52184 11.2847C8.87422 11.9405 9.03388 12.4174 9.03388 12.657C9.03388 13.0454 8.95241 13.4846 8.25545 13.8448L5.26935 9.5969C5.14402 9.41861 4.93974 9.31251 4.72181 9.31251H4.34275V2.61298H11.1996C11.2411 2.61298 11.2734 2.63737 11.2813 2.6662L11.298 2.72673L13.3098 8.02277C13.5743 8.8019 13.3105 9.31251 12.5717 9.31251Z',
263+
fill: 'currentColor'
264+
})
265+
]
266+
)
267+
])
268+
}
269+
},
270+
'app-oppose-color': {
271+
iconReader: () => {
272+
return h('i', [
273+
h(
274+
'svg',
275+
{
276+
style: { height: '100%', width: '100%' },
277+
viewBox: '0 0 16 16',
278+
version: '1.1',
279+
xmlns: 'http://www.w3.org/2000/svg'
280+
},
281+
[
282+
h('path', {
283+
d: 'M9.70106 10.7102H12.5718C14.5688 10.7102 15.0275 8.94736 14.5688 7.62647L12.5718 2.36918C12.403 1.7577 11.841 1.3335 11.1996 1.3335H3.33891C3.1541 1.3335 3.00427 1.48332 3.00427 1.66814V10.3755C3.00427 10.5603 3.1541 10.7102 3.33891 10.7102H4.02665C4.24458 10.7102 4.44886 10.8163 4.57419 10.9945L7.35263 14.947C7.54069 15.2462 8.04834 15.4756 8.58939 15.2292C9.40098 14.8596 10.3725 14.0528 10.3725 12.7161C10.3725 12.2119 10.1487 11.5433 9.70106 10.7102Z',
284+
fill: '#F54A45'
285+
}),
286+
h('path', {
287+
d: 'M2.00004 1.3335H0.661473C0.661473 1.3335 0.660982 10.7764 0.661473 10.7035H2.00001C1.99469 10.6868 1.9947 1.38674 2.00004 1.3335Z',
288+
fill: '#F54A45'
289+
})
290+
]
291+
)
292+
])
293+
}
294+
},
114295
}

ui/src/utils/time.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
import moment from 'moment'
2+
import 'moment/dist/locale/zh-cn'
3+
moment.locale('zh-cn')
4+
import { t } from '@/locales'
5+
6+
// 当天日期 YYYY-MM-DD
7+
export const nowDate = moment().format('YYYY-MM-DD')
8+
9+
// 当前时间的前n天
10+
export function beforeDay(n: number | string) {
11+
return moment().subtract(n, 'days').format('YYYY-MM-DD')
12+
}
13+
114
const getCheckDate = (timestamp: any) => {
215
if (!timestamp) return false
316
const dt = new Date(timestamp)

ui/src/views/application-overview/component/EmbedDialog.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<p class="title p-16 bold">
1414
{{ $t('views.applicationOverview.appInfo.EmbedDialog.fullscreenModeTitle') }}
1515
</p>
16-
<img src="@/assets/window1.png" alt="" class="ml-8" height="150" />
16+
<img src="@/assets/application/window1.png" alt="" class="ml-8" height="150" />
1717
<div class="code layout-bg border-t p-8">
1818
<div class="flex-between p-8">
1919
<span class="bold">{{
@@ -36,7 +36,7 @@
3636
<p class="title p-16 bold">
3737
{{ $t('views.applicationOverview.appInfo.EmbedDialog.mobileModeTitle') }}
3838
</p>
39-
<img src="@/assets/window3.png" alt="" class="ml-8" height="150" />
39+
<img src="@/assets/application/window3.png" alt="" class="ml-8" height="150" />
4040
<div class="code layout-bg border-t p-8">
4141
<div class="flex-between p-8">
4242
<span class="bold">{{
@@ -59,7 +59,7 @@
5959
<p class="title p-16 bold">
6060
{{ $t('views.applicationOverview.appInfo.EmbedDialog.floatingModeTitle') }}
6161
</p>
62-
<img src="@/assets/window2.png" alt="" class="ml-8" height="150" />
62+
<img src="@/assets/application/window2.png" alt="" class="ml-8" height="150" />
6363
<div class="code layout-bg border-t p-8">
6464
<div class="flex-between p-8">
6565
<span class="bold">{{

0 commit comments

Comments
 (0)