Merge branch 'dev' into test
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -122,7 +122,7 @@ steps:
|
||||
- tar -xzvf dist.tar -C /www/builder/jdt-mer-prod
|
||||
- rm -rf dist.tar
|
||||
- cd jdt-mer-prod
|
||||
- cd docker build -t jdt-mer-prod .
|
||||
- docker build -t jdt-mer-prod .
|
||||
- docker stop jdt-mer-prod
|
||||
- docker rm jdt-mer-prod
|
||||
- docker run -d -p 8083:80 --restart=always --name jdt-mer-prod jdt-mer-prod
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
<template>
|
||||
<CommonPage show-footer :title="$route.title">
|
||||
<n-grid mb-10 flex items-center x-gap="10" :y-gap="8" :cols="3">
|
||||
<n-gi>
|
||||
<!-- {{ queryData }} -->
|
||||
<div flex items-center>
|
||||
<span w-120>时间筛选:</span>
|
||||
<n-date-picker
|
||||
v-model:formatted-value="queryData.time"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<div>
|
||||
<n-button type="primary" @click="get_data">搜索</n-button>
|
||||
<n-button ml-10 @click="clear">重置</n-button>
|
||||
</div>
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
<n-card mb-5 rounded-5 title="营业额汇总">
|
||||
<n-grid x-gap="10" :y-gap="8" :cols="4">
|
||||
<n-gi>
|
||||
@@ -67,6 +87,10 @@ const cardData = ref({})
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
const queryData = ref({
|
||||
time: null,
|
||||
})
|
||||
|
||||
const option = ref({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
@@ -91,6 +115,7 @@ const option = ref({
|
||||
{
|
||||
data: [],
|
||||
type: 'bar',
|
||||
barWidth: '10%',
|
||||
name: '金额(元)',
|
||||
label: {
|
||||
show: true,
|
||||
@@ -119,7 +144,11 @@ const get_data = async () => {
|
||||
loading.value = true
|
||||
option.value.xAxis.data = []
|
||||
option.value.series[0].data = []
|
||||
const res = await api.getData()
|
||||
const query_data = {
|
||||
StartTime: queryData.value.time === null ? '' : queryData.value.time[0] || '',
|
||||
EndTime: queryData.value.time === null ? '' : queryData.value.time[1] || '',
|
||||
}
|
||||
const res = await api.getData(query_data)
|
||||
cardData.value = res.data
|
||||
for (let i = 0; i < res.data.data.length; i++) {
|
||||
option.value.xAxis.data.push(res.data.data[i].Name)
|
||||
@@ -128,6 +157,11 @@ const get_data = async () => {
|
||||
console.log(cardData.value)
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
const clear = async () => {
|
||||
queryData.value.time = null
|
||||
get_data()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user