-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
2,677 additions
and
669 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import request from 'axios' | ||
|
||
export function searchUser(name) { | ||
return request({ | ||
url: '/vue3-admin-plus/search/user', | ||
method: 'get', | ||
params: { name } | ||
}) | ||
} | ||
|
||
export function transactionList(query) { | ||
return request({ | ||
url: '/vue3-admin-plus/transaction/list', | ||
method: 'get', | ||
params: query | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
<template> | ||
<div :id="id" :class="className" :style="{ height: height, width: width }" /> | ||
</template> | ||
|
||
<script setup> | ||
import * as echarts from 'echarts' | ||
const props = defineProps({ | ||
className: { | ||
type: String, | ||
default: 'chart' | ||
}, | ||
id: { | ||
type: String, | ||
default: 'chart' | ||
}, | ||
width: { | ||
type: String, | ||
default: '200px' | ||
}, | ||
height: { | ||
type: String, | ||
default: '200px' | ||
} | ||
}) | ||
const state = reactive({ | ||
chart: null | ||
}) | ||
onMounted(() => { | ||
initChart() | ||
}) | ||
onBeforeUnmount(() => { | ||
if (!state.chart) { | ||
return | ||
} | ||
state.chart.dispose() | ||
state.chart = null | ||
}) | ||
const initChart = () => { | ||
// eslint-disable-next-line unicorn/prefer-query-selector | ||
state.chart = echarts.init(document.getElementById(props.id)) | ||
const xAxisData = [] | ||
const data = [] | ||
const data2 = [] | ||
for (let i = 0; i < 50; i++) { | ||
xAxisData.push(i) | ||
data.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5) | ||
data2.push((Math.sin(i / 5) * (i / 5 + 10) + i / 6) * 3) | ||
} | ||
state.chart.setOption({ | ||
backgroundColor: '#08263a', | ||
grid: { | ||
left: '5%', | ||
right: '5%' | ||
}, | ||
xAxis: [ | ||
{ | ||
show: false, | ||
data: xAxisData | ||
}, | ||
{ | ||
show: false, | ||
data: xAxisData | ||
} | ||
], | ||
visualMap: { | ||
show: false, | ||
min: 0, | ||
max: 50, | ||
dimension: 0, | ||
inRange: { | ||
color: ['#4a657a', '#308e92', '#b1cfa5', '#f5d69f', '#f5898b', '#ef5055'] | ||
} | ||
}, | ||
yAxis: { | ||
axisLine: { | ||
show: false | ||
}, | ||
axisLabel: { | ||
textStyle: { | ||
color: '#4a657a' | ||
} | ||
}, | ||
splitLine: { | ||
show: true, | ||
lineStyle: { | ||
color: '#08263f' | ||
} | ||
}, | ||
axisTick: { | ||
show: false | ||
} | ||
}, | ||
series: [ | ||
{ | ||
name: 'back', | ||
type: 'bar', | ||
data: data2, | ||
z: 1, | ||
itemStyle: { | ||
normal: { | ||
opacity: 0.4, | ||
barBorderRadius: 5, | ||
shadowBlur: 3, | ||
shadowColor: '#111' | ||
} | ||
} | ||
}, | ||
{ | ||
name: 'Simulate Shadow', | ||
type: 'line', | ||
data, | ||
z: 2, | ||
showSymbol: false, | ||
animationDelay: 0, | ||
animationEasing: 'linear', | ||
animationDuration: 1200, | ||
lineStyle: { | ||
normal: { | ||
color: 'transparent' | ||
} | ||
}, | ||
areaStyle: { | ||
normal: { | ||
color: '#08263a', | ||
shadowBlur: 50, | ||
shadowColor: '#000' | ||
} | ||
} | ||
}, | ||
{ | ||
name: 'front', | ||
type: 'bar', | ||
data, | ||
xAxisIndex: 1, | ||
z: 3, | ||
itemStyle: { | ||
normal: { | ||
barBorderRadius: 5 | ||
} | ||
} | ||
} | ||
], | ||
animationEasing: 'elasticOut', | ||
animationEasingUpdate: 'elasticOut', | ||
animationDelay(idx) { | ||
return idx * 20 | ||
}, | ||
animationDelayUpdate(idx) { | ||
return idx * 20 | ||
} | ||
}) | ||
} | ||
</script> | ||
|
||
<style scoped lang="scss"></style> |
Oops, something went wrong.