add
This commit is contained in:
parent
bcdb309b34
commit
37ae80471e
@ -136,3 +136,11 @@ export function apistatisSupervisionStatistics(params: any) {
|
|||||||
export function apistatiscost_statistics(params: any) {
|
export function apistatiscost_statistics(params: any) {
|
||||||
return request.get({ url: '/cost_project.cost_statistics/index', params })
|
return request.get({ url: '/cost_project.cost_statistics/index', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function apiManageStatistics(params: any) {
|
||||||
|
return request.get({ url: '/manage_basic.ManageStatistics/index', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
export function apimarketingStatistics(params: any) {
|
||||||
|
return request.get({ url: '/marketing.marketing_statistics/index', params })
|
||||||
|
}
|
||||||
|
@ -26,9 +26,9 @@ import ProjectFund from "./components/ProjectFund.vue"
|
|||||||
<span class="text-2xl">概况</span>
|
<span class="text-2xl">概况</span>
|
||||||
<div class="flex items-center text-sm">
|
<div class="flex items-center text-sm">
|
||||||
<span class="mr-4">时间筛选: </span>
|
<span class="mr-4">时间筛选: </span>
|
||||||
<el-date-picker v-model="startEndTime" type="daterange" range-separator="至" start-placeholder="开始日期"
|
<el-date-picker v-model="startEndTime2" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期" unlink-panels @change="getData" />
|
end-placeholder="结束日期" unlink-panels @change="getData2" />
|
||||||
<el-button type="primary" class="ml-4" @click="getData">查询</el-button>
|
<el-button type="primary" class="ml-4" @click="getData2">查询</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-wrap">
|
<div class="flex flex-wrap">
|
||||||
@ -201,8 +201,36 @@ const basicList = reactive([
|
|||||||
// percent: 0
|
// percent: 0
|
||||||
// }
|
// }
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getLastMonthRange() {
|
||||||
|
// 获取今天的日期
|
||||||
|
let today = new Date();
|
||||||
|
|
||||||
|
// 获取上个月的日期
|
||||||
|
let lastMonth = new Date(today.getFullYear(), today.getMonth() - 1, today.getDate());
|
||||||
|
|
||||||
|
// 格式化日期为 "年-月-日"
|
||||||
|
let formatDateString = (date) => {
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要+1,并且补0
|
||||||
|
let day = String(date.getDate()).padStart(2, '0'); // 补0
|
||||||
|
return `${year}-${month}-${day}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 格式化上个月和今天的日期
|
||||||
|
let lastMonthFormatted = formatDateString(lastMonth);
|
||||||
|
let todayFormatted = formatDateString(today);
|
||||||
|
|
||||||
|
// 返回结果数组
|
||||||
|
return [lastMonthFormatted, todayFormatted];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const startEndTime = ref([new Date(), new Date()]);
|
const startEndTime = ref([new Date(), new Date()]);
|
||||||
const startEndTime2 = ref([]);
|
const startEndTime2 = ref(getLastMonthRange());
|
||||||
|
|
||||||
|
|
||||||
const getData2 = () => {
|
const getData2 = () => {
|
||||||
|
@ -194,8 +194,34 @@ const basicList = reactive([
|
|||||||
// percent: 0
|
// percent: 0
|
||||||
// }
|
// }
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
function getLastMonthRange() {
|
||||||
|
// 获取今天的日期
|
||||||
|
let today = new Date();
|
||||||
|
|
||||||
|
// 获取上个月的日期
|
||||||
|
let lastMonth = new Date(today.getFullYear(), today.getMonth() - 1, today.getDate());
|
||||||
|
|
||||||
|
// 格式化日期为 "年-月-日"
|
||||||
|
let formatDateString = (date) => {
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要+1,并且补0
|
||||||
|
let day = String(date.getDate()).padStart(2, '0'); // 补0
|
||||||
|
return `${year}-${month}-${day}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 格式化上个月和今天的日期
|
||||||
|
let lastMonthFormatted = formatDateString(lastMonth);
|
||||||
|
let todayFormatted = formatDateString(today);
|
||||||
|
|
||||||
|
// 返回结果数组
|
||||||
|
return [lastMonthFormatted, todayFormatted];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const startEndTime = ref([new Date(), new Date()]);
|
const startEndTime = ref([new Date(), new Date()]);
|
||||||
const startEndTime2 = ref([]);
|
const startEndTime2 = ref(getLastMonthRange());
|
||||||
|
|
||||||
|
|
||||||
const getData2 = () => {
|
const getData2 = () => {
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="statistics_user">
|
<script lang="ts" setup name="statistics_user">
|
||||||
import { apistatismarketingStatistics } from "@/api/statistics"
|
import { apimarketingStatistics } from "@/api/statistics"
|
||||||
// import { apiGetUserBasic, apiGetUserTrend } from '@/api/workbench'
|
// import { apiGetUserBasic, apiGetUserTrend } from '@/api/workbench'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import vCharts from 'vue-echarts'
|
import vCharts from 'vue-echarts'
|
||||||
@ -178,14 +178,38 @@ const basicList = reactive([
|
|||||||
// percent: 0
|
// percent: 0
|
||||||
// }
|
// }
|
||||||
])
|
])
|
||||||
|
function getLastMonthRange() {
|
||||||
|
// 获取今天的日期
|
||||||
|
let today = new Date();
|
||||||
|
|
||||||
|
// 获取上个月的日期
|
||||||
|
let lastMonth = new Date(today.getFullYear(), today.getMonth() - 1, today.getDate());
|
||||||
|
|
||||||
|
// 格式化日期为 "年-月-日"
|
||||||
|
let formatDateString = (date) => {
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要+1,并且补0
|
||||||
|
let day = String(date.getDate()).padStart(2, '0'); // 补0
|
||||||
|
return `${year}-${month}-${day}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 格式化上个月和今天的日期
|
||||||
|
let lastMonthFormatted = formatDateString(lastMonth);
|
||||||
|
let todayFormatted = formatDateString(today);
|
||||||
|
|
||||||
|
// 返回结果数组
|
||||||
|
return [lastMonthFormatted, todayFormatted];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const startEndTime = ref([new Date(), new Date()]);
|
const startEndTime = ref([new Date(), new Date()]);
|
||||||
const startEndTime2 = ref([]);
|
const startEndTime2 = ref(getLastMonthRange());
|
||||||
|
|
||||||
|
|
||||||
const getData2 = () => {
|
const getData2 = () => {
|
||||||
let date = '';
|
let date = '';
|
||||||
if (startEndTime2.value[0] && startEndTime2.value[1]) date = moment(startEndTime2.value[0]).format('YYYY/MM/DD') + '-' + moment(startEndTime2.value[1]).format('YYYY/MM/DD');
|
if (startEndTime2.value[0] && startEndTime2.value[1]) date = moment(startEndTime2.value[0]).format('YYYY/MM/DD') + '-' + moment(startEndTime2.value[1]).format('YYYY/MM/DD');
|
||||||
apistatismarketingStatistics({
|
apimarketingStatistics({
|
||||||
date: date
|
date: date
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// 清空echarts 数据
|
// 清空echarts 数据
|
||||||
|
@ -65,7 +65,7 @@ import ProjectFund from "./components/ProjectFund.vue"
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="statistics_user">
|
<script lang="ts" setup name="statistics_user">
|
||||||
import { apistatisfinancialStatistics } from "@/api/statistics"
|
import { apiManageStatistics } from "@/api/statistics"
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import vCharts from 'vue-echarts'
|
import vCharts from 'vue-echarts'
|
||||||
|
|
||||||
@ -201,14 +201,38 @@ const basicList = reactive([
|
|||||||
// percent: 0
|
// percent: 0
|
||||||
// }
|
// }
|
||||||
])
|
])
|
||||||
|
function getLastMonthRange() {
|
||||||
|
// 获取今天的日期
|
||||||
|
let today = new Date();
|
||||||
|
|
||||||
|
// 获取上个月的日期
|
||||||
|
let lastMonth = new Date(today.getFullYear(), today.getMonth() - 1, today.getDate());
|
||||||
|
|
||||||
|
// 格式化日期为 "年-月-日"
|
||||||
|
let formatDateString = (date) => {
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要+1,并且补0
|
||||||
|
let day = String(date.getDate()).padStart(2, '0'); // 补0
|
||||||
|
return `${year}-${month}-${day}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 格式化上个月和今天的日期
|
||||||
|
let lastMonthFormatted = formatDateString(lastMonth);
|
||||||
|
let todayFormatted = formatDateString(today);
|
||||||
|
|
||||||
|
// 返回结果数组
|
||||||
|
return [lastMonthFormatted, todayFormatted];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const startEndTime = ref([new Date(), new Date()]);
|
const startEndTime = ref([new Date(), new Date()]);
|
||||||
const startEndTime2 = ref([]);
|
const startEndTime2 = ref(getLastMonthRange());
|
||||||
|
|
||||||
|
|
||||||
const getData2 = () => {
|
const getData2 = () => {
|
||||||
let date = '';
|
let date = '';
|
||||||
if (startEndTime2.value[0] && startEndTime2.value[1]) date = moment(startEndTime2.value[0]).format('YYYY/MM/DD') + '-' + moment(startEndTime2.value[1]).format('YYYY/MM/DD');
|
if (startEndTime2.value[0] && startEndTime2.value[1]) date = moment(startEndTime2.value[0]).format('YYYY/MM/DD') + '-' + moment(startEndTime2.value[1]).format('YYYY/MM/DD');
|
||||||
apistatisfinancialStatistics({
|
apiManageStatistics({
|
||||||
date: date
|
date: date
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// 清空echarts 数据
|
// 清空echarts 数据
|
||||||
|
@ -21,8 +21,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="text-info">{{ item.name }}</div>
|
<div class="text-info">{{ item.name }}</div>
|
||||||
<div class="text-6xl">{{ item.num }}</div>
|
<div class="text-6xl">{{ item.num }}</div>
|
||||||
<!-- <div class="text-info">环比增长: <span :class="item.percent > 0 ? 'text-success' : 'text-danger'">{{
|
|
||||||
item.percent }}%</span></div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -175,8 +173,32 @@ const basicList = reactive([
|
|||||||
// percent: 0
|
// percent: 0
|
||||||
// }
|
// }
|
||||||
])
|
])
|
||||||
|
function getLastMonthRange() {
|
||||||
|
// 获取今天的日期
|
||||||
|
let today = new Date();
|
||||||
|
|
||||||
|
// 获取上个月的日期
|
||||||
|
let lastMonth = new Date(today.getFullYear(), today.getMonth() - 1, today.getDate());
|
||||||
|
|
||||||
|
// 格式化日期为 "年-月-日"
|
||||||
|
let formatDateString = (date) => {
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要+1,并且补0
|
||||||
|
let day = String(date.getDate()).padStart(2, '0'); // 补0
|
||||||
|
return `${year}-${month}-${day}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 格式化上个月和今天的日期
|
||||||
|
let lastMonthFormatted = formatDateString(lastMonth);
|
||||||
|
let todayFormatted = formatDateString(today);
|
||||||
|
|
||||||
|
// 返回结果数组
|
||||||
|
return [lastMonthFormatted, todayFormatted];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const startEndTime = ref([new Date(), new Date()]);
|
const startEndTime = ref([new Date(), new Date()]);
|
||||||
const startEndTime2 = ref([]);
|
const startEndTime2 = ref(getLastMonthRange());
|
||||||
|
|
||||||
|
|
||||||
const getData2 = () => {
|
const getData2 = () => {
|
||||||
|
@ -1,24 +1,4 @@
|
|||||||
<!-- <template>
|
|
||||||
<div style="display: flex;flex-wrap: wrap;justify-content: space-between;">
|
|
||||||
<ProjectPayment></ProjectPayment>
|
|
||||||
<ProjectInvoice></ProjectInvoice>
|
|
||||||
<ProjectBid></ProjectBid>
|
|
||||||
<ProjectFund></ProjectFund>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { reactive, ref } from "vue"
|
|
||||||
import ProjectPayment from "./components/ProjectPayment.vue"
|
|
||||||
import ProjectInvoice from "./components/ProjectInvoice.vue"
|
|
||||||
import ProjectBid from "./components/ProjectBid.vue"
|
|
||||||
import ProjectFund from "./components/ProjectFund.vue"
|
|
||||||
|
|
||||||
|
|
||||||
</script> -->
|
|
||||||
<template>
|
<template>
|
||||||
<div class="workbench">
|
<div class="workbench">
|
||||||
<el-card shadow="never" class=" !border-none">
|
<el-card shadow="never" class=" !border-none">
|
||||||
@ -195,8 +175,32 @@ const basicList = reactive([
|
|||||||
// percent: 0
|
// percent: 0
|
||||||
// }
|
// }
|
||||||
])
|
])
|
||||||
|
function getLastMonthRange() {
|
||||||
|
// 获取今天的日期
|
||||||
|
let today = new Date();
|
||||||
|
|
||||||
|
// 获取上个月的日期
|
||||||
|
let lastMonth = new Date(today.getFullYear(), today.getMonth() - 1, today.getDate());
|
||||||
|
|
||||||
|
// 格式化日期为 "年-月-日"
|
||||||
|
let formatDateString = (date) => {
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要+1,并且补0
|
||||||
|
let day = String(date.getDate()).padStart(2, '0'); // 补0
|
||||||
|
return `${year}-${month}-${day}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 格式化上个月和今天的日期
|
||||||
|
let lastMonthFormatted = formatDateString(lastMonth);
|
||||||
|
let todayFormatted = formatDateString(today);
|
||||||
|
|
||||||
|
// 返回结果数组
|
||||||
|
return [lastMonthFormatted, todayFormatted];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const startEndTime = ref([new Date(), new Date()]);
|
const startEndTime = ref([new Date(), new Date()]);
|
||||||
const startEndTime2 = ref([]);
|
const startEndTime2 = ref(getLastMonthRange());
|
||||||
|
|
||||||
|
|
||||||
const getData2 = () => {
|
const getData2 = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user