修改后台

This commit is contained in:
zpc 2024-12-09 01:49:30 +08:00
parent f3a9acb0ca
commit 6811afe714
17 changed files with 351 additions and 147 deletions

View File

@ -1,2 +1,5 @@
VUE_APP_BASE=/ #打包路径 VUE_APP_ 开头的变量会被 webpack.DefinePlugin 静态嵌入到客户端侧的包中。你可以在应用的代码中这样访问它们 VUE_APP_BASE=/ #打包路径 VUE_APP_ 开头的变量会被 webpack.DefinePlugin 静态嵌入到客户端侧的包中。你可以在应用的代码中这样访问它们
VITE_API_URL=https://steamcloud.shhuanmeng.com # VITE_API_URL=https://steamcloud.shhuanmeng.com
VITE_API_URL=http://192.168.1.23:91
VITE_EXTAPI_URL=http://192.168.1.23:83

View File

@ -1,4 +1,5 @@
VUE_APP_BASE=/ #打包路径 VUE_APP_BASE=/ #打包路径
VITE_API_URL=http://127.0.0.1:802 VITE_API_URL=http://127.0.0.1:802
# VITE_API_URL=http://192.168.1.23:91
VITE_EXTAPI_URL=http://192.168.1.23:83 VITE_EXTAPI_URL=http://192.168.1.23:83
# VITE_API_URL=https://steamcloud.shhuanmeng.com # VITE_API_URL=https://steamcloud.shhuanmeng.com

View File

@ -57,31 +57,29 @@ function jumpPro() {
<template> <template>
<a-layout-header class="hzy-layout-header"> <a-layout-header class="hzy-layout-header">
<div class="hzy-header-btn" @click="menuStore.onChangeCollapse(!menuStore.state.isCollapse)"> <div
class="hzy-header-btn"
@click="menuStore.onChangeCollapse(!menuStore.state.isCollapse)"
>
<!-- <a-tooltip> <!-- <a-tooltip>
<template #title>菜单收展</template> <template #title>菜单收展</template>
<AppIcon :name="menuStore.state.isCollapse ? 'MenuUnfoldOutlined' : 'MenuFoldOutlined'" :size="iconSize" /> <AppIcon :name="menuStore.state.isCollapse ? 'MenuUnfoldOutlined' : 'MenuFoldOutlined'" :size="iconSize" />
</a-tooltip> --> </a-tooltip> -->
<AppIcon :name="menuStore.state.isCollapse ? 'MenuUnfoldOutlined' : 'MenuFoldOutlined'" :size="iconSize" /> <AppIcon
:name="
menuStore.state.isCollapse ? 'MenuUnfoldOutlined' : 'MenuFoldOutlined'
"
:size="iconSize"
/>
</div> </div>
<div style="flex: 1 1 0%; height: 100%; display: flex" v-if="menuStore.state.menuMode == EMenuMode.top"> <div
style="flex: 1 1 0%; height: 100%; display: flex"
v-if="menuStore.state.menuMode == EMenuMode.top"
>
<LayoutOneLevelMenu /> <LayoutOneLevelMenu />
</div> </div>
<div style="flex: 1 1 0%" v-else></div> <div style="flex: 1 1 0%" v-else></div>
<!-- Pro -->
<div class="hzy-header-btn text-danger" @click="jumpPro()" style="font-weight: bold"
v-if="!coreStore.state.isMobile">
Pro By React</div>
<!-- HzyAdmin 文档 -->
<a-tooltip>
<template #title>HzyAdmin 文档</template>
<div class="hzy-header-btn" @click="jumpDoc" v-if="!coreStore.state.isMobile">
<a-badge status="success" dot>
<AppIcon name="rocket-outlined" :size="iconSize" />
</a-badge>
</div>
</a-tooltip>
<!-- 刷新当前选项卡 --> <!-- 刷新当前选项卡 -->
<a-tooltip> <a-tooltip>
<template #title>刷新当前选项卡</template> <template #title>刷新当前选项卡</template>
@ -93,16 +91,31 @@ function jumpPro() {
<!-- 全屏 --> <!-- 全屏 -->
<a-tooltip> <a-tooltip>
<template #title>全屏</template> <template #title>全屏</template>
<div class="hzy-header-btn" @click="toggle" v-if="!coreStore.state.isMobile"> <div
<AppIcon :name="isFullscreen ? 'FullscreenExitOutlined' : 'FullscreenOutlined'" :size="iconSize" /> class="hzy-header-btn"
@click="toggle"
v-if="!coreStore.state.isMobile"
>
<AppIcon
:name="isFullscreen ? 'FullscreenExitOutlined' : 'FullscreenOutlined'"
:size="iconSize"
/>
</div> </div>
</a-tooltip> </a-tooltip>
<!-- 白昼 / 黑夜 --> <!-- 白昼 / 黑夜 -->
<a-tooltip> <a-tooltip>
<template #title>白昼 / 黑夜</template> <template #title>白昼 / 黑夜</template>
<div class="hzy-header-btn" @click="themeStore.changeTheme(!themeStore.state.isDark)"> <div
<AppIcon name="MoonNight" :size="iconSize + 5" style="color:white" v-if="themeStore.state.isDark" /> class="hzy-header-btn"
@click="themeStore.changeTheme(!themeStore.state.isDark)"
>
<AppIcon
name="MoonNight"
:size="iconSize + 5"
style="color: white"
v-if="themeStore.state.isDark"
/>
<AppIcon name="Sunny" :size="iconSize + 5" v-else /> <AppIcon name="Sunny" :size="iconSize + 5" v-else />
</div> </div>
</a-tooltip> </a-tooltip>
@ -118,7 +131,11 @@ function jumpPro() {
<div class="hzy-header-btn"> <div class="hzy-header-btn">
<AppIcon name="UserOutlined" :size="iconSize" /> <AppIcon name="UserOutlined" :size="iconSize" />
&nbsp;&nbsp; &nbsp;&nbsp;
<span>{{ appStore.state.userInfo.name ? appStore.state.userInfo.name : "未知用户" }}</span> <span>{{
appStore.state.userInfo.name
? appStore.state.userInfo.name
: "未知用户"
}}</span>
</div> </div>
<template #overlay> <template #overlay>
<a-menu> <a-menu>
@ -143,7 +160,6 @@ function jumpPro() {
<style lang="less"> <style lang="less">
.hzy-layout { .hzy-layout {
// //
.ant-layout-header { .ant-layout-header {
position: relative; position: relative;

View File

@ -29,5 +29,12 @@ export default class AppMonitorService {
static GetActiveUserCount() { static GetActiveUserCount() {
return Http.get(`${this.urlPrefix}/GetActiveUserCount`, {}, false) return Http.get(`${this.urlPrefix}/GetActiveUserCount`, {}, false)
} }
/**
*
* @returns
*/
static GetAppMonitorHour() {
return Http.get(`${this.urlPrefix}/GetAppMonitorHour`, {}, false)
}
} }

View File

@ -194,7 +194,7 @@ function exportExcel() {
<a-row :gutter="[16, 0]"> <a-row :gutter="[16, 0]">
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12"> <a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
<a-form-item <a-form-item
label="系统标识" label="系统标识"
name="tenantId" name="tenantId"
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
> >
@ -211,7 +211,11 @@ function exportExcel() {
name="name" name="name"
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
> >
<a-input v-model:value="state.vm.form.name" :readonly="readonly" placeholder="请输入" /> <a-input
v-model:value="state.vm.form.name"
:readonly="readonly"
placeholder="请输入"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12"> <a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
@ -240,6 +244,33 @@ function exportExcel() {
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
<a-form-item
label="隐私协议地址"
name="privacyAgreement"
:readonly="readonly"
>
<a-input
v-model:value="state.vm.form.privacyAgreement"
:readonly="readonly"
placeholder="请输入"
/>
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
<a-form-item
label="用户协议地址"
name="userAgreement"
:readonly="readonly"
>
<a-input
v-model:value="state.vm.form.userAgreement"
:readonly="readonly"
placeholder="请输入"
/>
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12"> <a-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
<a-form-item <a-form-item
label="app版本" label="app版本"
@ -254,7 +285,6 @@ function exportExcel() {
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"> <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
<a-form-item <a-form-item
label="缓存数据" label="缓存数据"
@ -325,9 +355,12 @@ function exportExcel() {
</a-row> </a-row>
</a-form> </a-form>
<a-space :size="15"> <a-space :size="15">
<a-button type="primary" v-if="power.update" @click="readonly = !readonly">{{ <a-button
readonly ? "修改" : "取消修改" type="primary"
}}</a-button> v-if="power.update"
@click="readonly = !readonly"
>{{ readonly ? "修改" : "取消修改" }}</a-button
>
<a-button <a-button
type="primary" type="primary"
:loading="state.loading" :loading="state.loading"

View File

@ -15,7 +15,7 @@ defineOptions({ name: "t_User_Phone_AccountIndex" });
{ {
dataIndex: "userId", dataIndex: "userId",
title: "用户Id", title: "用户Id",
show: false, show: true,
width: 80, width: 80,
sorter: true, sorter: true,
}, },
@ -23,7 +23,7 @@ defineOptions({ name: "t_User_Phone_AccountIndex" });
{ {
dataIndex: "phoneNum", dataIndex: "phoneNum",
title: "手机号", title: "手机号",
show: false, show: true,
width: 60, width: 60,
sorter: true, sorter: true,
}, },
@ -31,7 +31,7 @@ defineOptions({ name: "t_User_Phone_AccountIndex" });
{ {
dataIndex: "createdAt", dataIndex: "createdAt",
title: "修改时间", title: "修改时间",
show: false, show: true,
width: 80, width: 80,
sorter: true, sorter: true,
}, },
@ -39,7 +39,7 @@ defineOptions({ name: "t_User_Phone_AccountIndex" });
{ {
dataIndex: "updatedAt", dataIndex: "updatedAt",
title: "创建时间", title: "创建时间",
show: false, show: true,
width: 80, width: 80,
sorter: true, sorter: true,
}, },
@ -47,7 +47,7 @@ defineOptions({ name: "t_User_Phone_AccountIndex" });
{ {
dataIndex: "nikeName", dataIndex: "nikeName",
title: "用户昵称", title: "用户昵称",
show: false, show: true,
width: 80, width: 80,
sorter: true, sorter: true,
}, },
@ -55,7 +55,7 @@ defineOptions({ name: "t_User_Phone_AccountIndex" });
{ {
dataIndex: "isLogout", dataIndex: "isLogout",
title: "是否注销", title: "是否注销",
show: false, show: true,
width: 80, width: 80,
sorter: true, sorter: true,
}, },
@ -64,6 +64,8 @@ const state = reactive({
search: { search: {
state: true, state: true,
vm: { vm: {
phonenum: undefined,
userid: undefined,
}, },
sort: [] as any[], sort: [] as any[],
}, },
@ -169,6 +171,16 @@ function exportExcel() {
<template #search> <template #search>
<a-form ref="refSearchForm" :model="state.search.vm" v-if="power.search"> <a-form ref="refSearchForm" :model="state.search.vm" v-if="power.search">
<a-row :gutter="[16, 0]"> <a-row :gutter="[16, 0]">
<a-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
<a-form-item class="mb-0" name="name" label="手机号">
<a-input v-model:value="state.search.vm.phonenum" placeholder="手机号" />
</a-form-item>
</a-col>
<a-col :xs="4" :sm="4" :md="4" :lg="4" :xl="4">
<a-form-item class="mb-0" name="name" label="用户Id">
<a-input v-model:value="state.search.vm.userid" placeholder="用户Id" />
</a-form-item>
</a-col>
<!--button--> <!--button-->
<a-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2" class="text-right"> <a-col :xs="2" :sm="2" :md="2" :lg="2" :xl="2" class="text-right">

View File

@ -1,22 +1,28 @@
<script lang="ts" setup> <script lang="ts" setup>
import {ref} from "vue"; import { ref } from "vue";
import WorkOrder from "./components/WorkOrder.vue"; import WorkOrder from "./components/WorkOrder.vue";
import WorkOrderStatistics from "./components/WorkOrderStatistics.vue"; import WorkOrderStatistics from "./components/WorkOrderStatistics.vue";
import UserSignStatistics from "./components/UserSignStatistics.vue"; import UserSignStatistics from "./components/UserSignStatistics.vue";
import PlayGameTimeStatistics from "./components/PlayGameTimeStatistics.vue"; import PlayGameTimeStatistics from "./components/PlayGameTimeStatistics.vue";
import PlayGameStatistics from "./components/PlayGameStatistics.vue";
import HomeChart1 from "./components/HomeChart1.vue";
import HomeChart2 from "./components/HomeChart2.vue";
import HomeChart3 from "./components/HomeChart3.vue";
import Home1 from "./Index1.vue"; import Home1 from "./Index1.vue";
import image1 from "@/assets/images/img1.png";
import image2 from "@/assets/images/img2.png";
import image3 from "@/assets/images/img3.png";
import PageContainer from "@/core/components/PageContainer.vue"; import PageContainer from "@/core/components/PageContainer.vue";
import AppMonitorService from "@/services/Apps/Ext/AppMonitorService";
defineOptions({name: "HomeIndexCom"}); defineOptions({ name: "HomeIndexCom" });
let login = ref([]);
let registr = ref([]);
let playTimeGame = ref([]);
let playGame = ref([]);
AppMonitorService.GetAppMonitorHour().then((data) => {
// console.log(data);
login.value.splice(0, login.value.length);
login.value = data.login;
registr.value = data.registr;
playTimeGame.value = data.playTimeGame;
playGame.value = data.playGame;
// console.log(login.value);
});
let visible = ref(false); let visible = ref(false);
</script> </script>
@ -24,27 +30,37 @@ let visible = ref(false);
<PageContainer :show="false" class="p-16"> <PageContainer :show="false" class="p-16">
<!-- 基础统计数据 --> <!-- 基础统计数据 -->
<div @click="visible = !visible"> <div @click="visible = !visible">
<WorkOrder/> <WorkOrder />
</div> </div>
<!-- 近一年设备销售量 --> <!-- 近一年设备销售量 -->
<div class="mt-16"> <div class="mt-16">
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :xs="24" :sm="24" :md="12" :lg="16" :xl="12"> <a-col :xs="24" :sm="24" :md="12" :lg="16" :xl="12">
<WorkOrderStatistics/> <WorkOrderStatistics
:data="login"
v-if="login != null && login.length > 0"
/>
</a-col> </a-col>
<a-col :xs="24" :sm="24" :md="12" :lg="16" :xl="12"> <a-col :xs="24" :sm="24" :md="12" :lg="16" :xl="12">
<UserSignStatistics /> <UserSignStatistics
:data="registr"
v-if="registr != null && registr.length > 0"
/>
</a-col> </a-col>
<a-col :xs="24" :sm="24" :md="12" :lg="16" :xl="12"> <a-col :xs="24" :sm="24" :md="12" :lg="16" :xl="12">
<PlayGameTimeStatistics /> <PlayGameStatistics :data="playGame" />
</a-col>
<a-col :xs="24" :sm="24" :md="12" :lg="16" :xl="12">
<PlayGameTimeStatistics :data="playTimeGame" />
</a-col> </a-col>
</a-row> </a-row>
<!-- PlayGameTimeStatistics --> <!-- PlayGameTimeStatistics -->
</div> </div>
<!-- 抽屉 --> <!-- 抽屉 -->
<a-drawer v-model:open="visible" title="更多" placement="right" width="90%"> <a-drawer v-model:open="visible" title="更多" placement="right" width="90%">
<Home1/> <Home1 />
</a-drawer> </a-drawer>
</PageContainer> </PageContainer>
</template> </template>

View File

@ -0,0 +1,72 @@
<script lang="ts" setup>
import { onMounted, ref, onBeforeUnmount } from "vue";
import { Line } from "@antv/g2plot";
let line = null;
const props = withDefaults(
defineProps<{
data: any;
}>(),
{}
);
watch(
() => props.data,
(newValue) => {
console.log("23213123linelinelineline");
if (props.data != null && props.data.length > 0) {
var tempData = [];
for (let index = 0; index < props.data.length; index++) {
const element = props.data[index];
tempData.push(Object.assign({}, element));
}
line.changeData(tempData);
console.log(tempData);
}
}
);
let data = [];
onMounted(() => {
document.getElementById("PlayGameContainer")!.innerHTML = "";
line = new Line("PlayGameContainer", {
data,
xField: "timeStamp",
yField: "value",
seriesField: "category",
yAxis: {
label: {
//
formatter: (v) =>
`${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, (s) => `${s},`),
},
},
color: ["#1979C9", "#D62A0D", "#FAA219"],
});
line.render();
});
</script>
<template>
<a-card
title="近24小时玩游戏人数统计"
:bordered="false"
:headStyle="{ 'border-bottom': 0 }"
>
<template #extra>
<a
href="https://g2plot.antv.vision/zh/docs/manual/getting-started"
target="_black"
>更多数据</a
>
</template>
<div id="PlayGameContainer"></div>
</a-card>
</template>
<style lang="less">
.work-order {
.icon-size {
font-size: 70px;
}
}
</style>

View File

@ -1,34 +1,43 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref, onBeforeUnmount } from "vue"; import { onMounted, ref, onBeforeUnmount } from "vue";
import { Line } from "@antv/g2plot"; import { Line } from "@antv/g2plot";
let line = null;
const props = withDefaults(
defineProps<{
data: any;
}>(),
{}
);
watch(
() => props.data,
(newValue) => {
console.log("23213123linelinelineline");
if (props.data != null && props.data.length > 0) {
// data.splice(0, data.length);
// data = props.data;
var tempData = [];
for (let index = 0; index < props.data.length; index++) {
const element = props.data[index];
tempData.push(Object.assign({}, element));
}
line.changeData(tempData);
console.log(tempData);
}
}
);
// //
let data = []; let data = [];
for (let i = 0; i < 30; i++) {
data.push({
type: i + 1 + "号",
sales: Math.floor(Math.random() * 400),
category: "总数",
});
data.push({
type: i + 1 + "号",
sales: Math.floor(Math.random() * 200),
category: "华为渠道",
});
data.push({
type: i + 1 + "号",
sales: Math.floor(Math.random() * 200),
category: "小米渠道",
});
}
let timer = ref(); let timer = ref();
onMounted(() => { onMounted(() => {
document.getElementById("PlayGameTimeContainer")!.innerHTML = ""; document.getElementById("PlayGameTimeContainer")!.innerHTML = "";
const line = new Line("PlayGameTimeContainer", { line = new Line("PlayGameTimeContainer", {
data, data,
xField: "type", xField: "timeStamp",
yField: "sales", yField: "value",
seriesField: "category", seriesField: "category",
yAxis: { yAxis: {
label: { label: {
@ -46,7 +55,7 @@ onMounted(() => {
<template> <template>
<a-card <a-card
title="近一月玩游戏时长统计" title="近24小时玩游戏时长统计"
:bordered="false" :bordered="false"
:headStyle="{ 'border-bottom': 0 }" :headStyle="{ 'border-bottom': 0 }"
> >

View File

@ -1,34 +1,53 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref, onBeforeUnmount } from "vue"; import {
import { Line } from "@antv/g2plot"; onMounted,
// ref,
let data = []; onBeforeUnmount,
for (let i = 0; i < 30; i++) { defineProps,
data.push({ defineEmits,
type: i + 1 + "号", watch,
sales: Math.floor(Math.random() * 400), } from "vue";
category: "总数", import { Column, Line } from "@antv/g2plot";
});
data.push({
type: i + 1 + "号",
sales: Math.floor(Math.random() * 200),
category: "华为渠道",
});
data.push({
type: i + 1 + "号",
sales: Math.floor(Math.random() * 200),
category: "小米渠道",
});
}
let timer = ref(); let data = [];
const props = withDefaults(
defineProps<{
data: any;
}>(),
{}
);
if (props.data != null && props.data.length > 0) {
data = props.data;
}
watch(
() => props.data,
(newValue) => {
if (props.data != null && props.data.length > 0) {
// data.splice(0, data.length);
// data = props.data;
for (let index = 0; index < props.data.length; index++) {
const element = props.data[index];
data[index].value = element.value;
// data[index].timeStamp = element.timeStamp;
data[index].category = element.category;
}
// console.log(data);
}
}
);
onMounted(() => { onMounted(() => {
console.log("aaaa");
document.getElementById("UserSignStatisticsContainer")!.innerHTML = ""; document.getElementById("UserSignStatisticsContainer")!.innerHTML = "";
// console.log(data);
const line = new Line("UserSignStatisticsContainer", { const line = new Line("UserSignStatisticsContainer", {
data, data,
xField: "type", xField: "timeStamp",
yField: "sales", yField: "value",
seriesField: "category", seriesField: "category",
yAxis: { yAxis: {
label: { label: {
@ -46,7 +65,7 @@ onMounted(() => {
<template> <template>
<a-card <a-card
title="近一月注册人数统计" title="近24小时注册人数统计"
:bordered="false" :bordered="false"
:headStyle="{ 'border-bottom': 0 }" :headStyle="{ 'border-bottom': 0 }"
> >

View File

@ -64,7 +64,7 @@ const cards = ref<CardData[]>([
}, },
{ {
title: "今日充值金额", title: "今日充值金额",
unit: "", unit: "",
value: 5, value: 5,
icon: "AccountBookOutlined", icon: "AccountBookOutlined",
color: "#FF6347", color: "#FF6347",
@ -97,7 +97,7 @@ const updateValues = async () => {
} }
}; };
timer.value = setInterval(updateValues, 2000); timer.value = setInterval(updateValues, 10000);
onBeforeUnmount(() => { onBeforeUnmount(() => {
if (timer.value) { if (timer.value) {

View File

@ -1,35 +1,54 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref, onBeforeUnmount } from "vue"; import {
onMounted,
ref,
onBeforeUnmount,
defineProps,
defineEmits,
watch,
} from "vue";
import { Column, Line } from "@antv/g2plot"; import { Column, Line } from "@antv/g2plot";
let data = []; let data = [];
for (let i = 0; i < 30; i++) {
data.push({ const props = withDefaults(
type: i + 1 + "号", defineProps<{
sales: Math.floor(Math.random() * 400), data: any;
category: "总数", }>(),
}); {}
data.push({ );
type: i + 1 + "号", if (props.data != null && props.data.length > 0) {
sales: Math.floor(Math.random() * 200), data = props.data;
category: "华为渠道",
});
data.push({
type: i + 1 + "号",
sales: Math.floor(Math.random() * 200),
category: "小米渠道",
});
} }
console.log(data); watch(
() => props.data,
(newValue) => {
console.log("aaaaaaaaa23432");
let timer = ref(); if (props.data != null && props.data.length > 0) {
// data.splice(0, data.length);
// data = props.data;
for (let index = 0; index < props.data.length; index++) {
const element = props.data[index];
data[index].value = element.value;
// data[index].timeStamp = element.timeStamp;
data[index].category = element.category;
}
// console.log(data);
}
}
);
onMounted(() => { onMounted(() => {
console.log("aaaa");
document.getElementById("WorkOrderStatisticsContainer")!.innerHTML = ""; document.getElementById("WorkOrderStatisticsContainer")!.innerHTML = "";
// console.log(data);
const line = new Line("WorkOrderStatisticsContainer", { const line = new Line("WorkOrderStatisticsContainer", {
data, data,
xField: "type", xField: "timeStamp",
yField: "sales", yField: "value",
seriesField: "category", seriesField: "category",
yAxis: { yAxis: {
label: { label: {
@ -47,7 +66,7 @@ onMounted(() => {
<template> <template>
<a-card <a-card
title="近一月活跃人数统计" title="24小时登录人数统计"
:bordered="false" :bordered="false"
:headStyle="{ 'border-bottom': 0 }" :headStyle="{ 'border-bottom': 0 }"
> >

View File

@ -17,6 +17,12 @@ public class T_User_Phone_AccountService(IServiceProvider serviceProvider)
public async override Task<PagingView> FindListAsync(PagingSearchInput<T_User_Phone_Account> pagingSearchInput) public async override Task<PagingView> FindListAsync(PagingSearchInput<T_User_Phone_Account> pagingSearchInput)
{ {
var query = this.Repository.Select var query = this.Repository.Select
//手机号
.WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.PhoneNum),
w => w.PhoneNum.Contains(pagingSearchInput.Search.PhoneNum ?? ""))
//用户Id
.WhereIf(pagingSearchInput.Search?.UserId!=null&&pagingSearchInput.Search?.UserId>0,
w => w.UserId== pagingSearchInput.Search.UserId)
.OrderByDescending(w => w.Id) .OrderByDescending(w => w.Id)
.Select(w => new .Select(w => new
{ {
@ -31,8 +37,8 @@ public class T_User_Phone_AccountService(IServiceProvider serviceProvider)
//result.GetColumn(query, w => w. !).SetColumn<SysUser>(w => w.Name!); //result.GetColumn(query, w => w. !).SetColumn<SysUser>(w => w.Name!);
result result
.FormatValue(query, w => w.CreatedAt, (oldValue) => oldValue.ToString("yyyy-MM-dd")) .FormatValue(query, w => w.CreatedAt, (oldValue) => oldValue.ToString("yyyy-MM-dd HH:mm:ss"))
.FormatValue(query, w => w.UpdatedAt, (oldValue) => oldValue.ToString("yyyy-MM-dd")) .FormatValue(query, w => w.UpdatedAt, (oldValue) => oldValue.ToString("yyyy-MM-dd HH:mm:ss"))
; ;
return result; return result;

View File

@ -94,7 +94,7 @@ public class @(className)Service(IServiceProvider serviceProvider)
result result
@foreach (var x in dateList) @foreach (var x in dateList)
{ {
<pre>.FormatValue(query, w => w.@(x.ColumnName), (oldValue) => oldValue?.ToString("yyyy-MM-dd"))</pre> <pre>.FormatValue(query, w => w.@(x.ColumnName), (oldValue) => oldValue.ToString("yyyy-MM-dd HH:mm:ss"))</pre>
} }
; ;
</pre> </pre>

View File

@ -94,7 +94,7 @@ public class @(className)Service(IServiceProvider serviceProvider)
result result
@foreach (var x in dateList) @foreach (var x in dateList)
{ {
<pre>.FormatValue(query, w => w.@(x.ColumnName), (oldValue) => oldValue?.ToString("yyyy-MM-dd"))</pre> <pre>.FormatValue(query, w => w.@(x.ColumnName), (oldValue) => oldValue.ToString("yyyy-MM-dd HH:mm:ss"))</pre>
} }
; ;
</pre> </pre>

View File

@ -93,8 +93,8 @@ public static class AppConfigExtend
appConfig.UserConfig = _appConfig.UserConfig; appConfig.UserConfig = _appConfig.UserConfig;
appConfig.Payment = _appConfig.Payment; appConfig.Payment = _appConfig.Payment;
appConfig.GameConfig = _appConfig.GameConfig; appConfig.GameConfig = _appConfig.GameConfig;
appConfig.UserAgreement = _appConfig.UserAgreement;
appConfig.PrivacyAgreement = _appConfig.PrivacyAgreement;
} }
/// <summary> /// <summary>

View File

@ -14,23 +14,14 @@ public static class CrossOriginConfig
// 跨域配置 配置跨域处理 // 跨域配置 配置跨域处理
webApplicationBuilder.Services.AddCors(options => webApplicationBuilder.Services.AddCors(options =>
{ {
options.AddPolicy("_myAllowSpecificOrigins", options.AddDefaultPolicy(builder =>
builder => {
{ builder
builder .SetIsOriginAllowed(_ => true)
.AllowAnyOrigin() .AllowAnyMethod()
.AllowAnyHeader() .AllowAnyHeader()
.AllowAnyMethod(); .AllowCredentials();
}); });
//options.AddDefaultPolicy(builder =>
//{
// builder
// .SetIsOriginAllowed(_ => true)
// .AllowAnyMethod()
// .AllowAnyHeader()
// .AllowCredentials();
//});
}); });
} }
@ -40,7 +31,7 @@ public static class CrossOriginConfig
public static void UseCrossOrigin(this WebApplication webApplication) public static void UseCrossOrigin(this WebApplication webApplication)
{ {
// 使用跨域 警告: 通过终结点路由CORS 中间件必须配置为在对UseRouting和UseEndpoints的调用之间执行。 配置不正确将导致中间件停止正常运行。 // 使用跨域 警告: 通过终结点路由CORS 中间件必须配置为在对UseRouting和UseEndpoints的调用之间执行。 配置不正确将导致中间件停止正常运行。
webApplication.UseCors("_myAllowSpecificOrigins"); webApplication.UseCors();
} }
} }