日期选择组件更改--选择年之后才有月,选择月之后才有日

This commit is contained in:
张宁 2024-06-13 14:31:40 +08:00
parent 73bc207eea
commit adb30490e8
11 changed files with 49 additions and 59 deletions

View File

@ -1,10 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<link rel="icon" href="/screen.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>迎新系统数据大屏</title>
<script type="module" src="/public/config.js"></script>
</head>
<body>
<div id="app"></div>

5
public/config.js Normal file
View File

@ -0,0 +1,5 @@
//南理
// window.baseURL = 'https://yxxt.nut.edu.cn:90/'
// 目前放测试地址 发布后放到正是地址---待修改
window.baseURL = 'http://api.nclg.yx.zheke.com/'
// window.baseURL = 'http://192.168.2.121:5090/'

BIN
public/screen.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -1,7 +1,13 @@
<script setup lang="ts">
import "virtual:svg-icons-register";
import { RouterView } from 'vue-router'
import { getLocalStorage,setToken } from "@/utils";
// setInterval(()=>{
// console.log('1111111','token');
// setToken(1111111111)
// },60000)
</script>
<template>

View File

@ -1,22 +1,11 @@
/*
* @Author: 18339727226@163.com
* @Date: 2024-05-22 08:40:55
* @LastEditors: 18339727226@163.com
* @LastEditTime: 2024-06-03 13:59:14
* @FilePath: \welcome-system-screen\src\api\api.ts
* @Description: ,`customMade`, koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/*
* @LastEditors: 18339727226@163.com
* @LastEditTime: 2024-06-03 11:39:31
*/
import axios from "axios";
import type { AxiosRequestConfig, AxiosResponse } from "axios";
import { StorageEnum, RequestEnum } from "@/enums";
import { getLocalStorage,getToken } from "@/utils";
import UtilVar from "../config/UtilVar";
let baseUrl = UtilVar.baseUrl;
let baseUrl = window.baseURL;
const CancelToken = axios.CancelToken;
export { baseUrl };

View File

@ -1,14 +1,14 @@
import { GET, POST, FILE, FILEPOST, PUT, GETNOBASE } from "../api";
export const AdminPCIndex = (param: any = {}) => {
return GET("/api/TeacherManagement/AdminPCIndex", param);
return GET("api/TeacherManagement/AdminPCIndex", param);
};
//主页 今日缴费情况
export const WeekPay = (param: any = {}) => {
return GET("/api/TeacherManagement/WeekPay", param);
return GET("api/TeacherManagement/WeekPay", param);
};
// 专业报道
export const StatisticsReportedRanking = (param: any = {}) => {
return GET("/api/TeacherManagement/StatisticsReportedRanking", param);
return GET("api/TeacherManagement/StatisticsReportedRanking", param);
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -1,11 +1,4 @@
<!--
* @Author: 张宁 18339727226@163.com
* @Date: 2024-05-27 14:46:17
* @LastEditors: 张宁 18339727226@163.com
* @LastEditTime: 2024-05-29 16:31:43
* @FilePath: \welcome-system-screen\src\components\datePicker\datePicker.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div ref="datePickerRef" class="datePicker">
<el-config-provider :locale="zhCn">
@ -64,21 +57,29 @@ const myDay = ref(props.myDate.day);
// tabs
const activeTab = ref(0);
const tabs = computed(() => {
return [
{ title: '年', content: myYear.value },
{ title: '月', content: myMonth.value },
{ title: '日', content: myDay.value },
let items = [
{ title: '年', content: myYear.value }
];
})
//
if (myYear.value) {
items.push({ title: '月', content: myMonth.value });
//
if (myMonth.value) {
items.push({ title: '日', content: myDay.value });
}
}
return items;
});
const changeTab = (index: number) => {
activeTab.value = index;
};
// Select an option from the datePicker
const confirmDate = () => {
//
if (myDay.value !== 0) {
/* if (myDay.value !== 0) {
if (myYear.value === 0) {
ElMessage.error('请选择年份')
return
@ -94,12 +95,15 @@ const confirmDate = () => {
ElMessage.error('请选择年份')
return
}
}
} */
//
if (myYear.value === 0) {
ElMessage.error('请选择年份')
return
}
if (myMonth.value === 0) {
myDay.value = 0
}
isOpen.value = false; // Close the datePicker
//
let dates = {

View File

@ -1,11 +1,3 @@
<!--
* @Author: 张宁 18339727226@163.com
* @Date: 2024-05-28 11:55:39
* @LastEditors: 张宁 18339727226@163.com
* @LastEditTime: 2024-05-29 15:38:56
* @FilePath: \welcome-system-screen\src\components\datePicker\dayPane.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="box">
<!-- 日历主体 -->

View File

@ -25,14 +25,14 @@ const getMapChart = (data) => {
borderColor: '#2BEDF6', //tooltip
borderWidth: 0, //
formatter: function (params) { // tooltip
var html = '<div style="width:120px;background:rgba(0, 0, 0, .5); font-size: 14px; padding-bottom: 3px;">';
html += '<span style="display:block;width:100%;text-align:center;padding:5px 0; color: #ffffff;border-bottom:1px solid #fff;font-weight:bold">' + (params.name) + '</span>'; //
html += '<span style="margin:3px 0 0 0;padding:0;display:block;width:100%;padding-left:14px;color: #fff;font-size: 12px;">' + '统招本科:' + (params.num3 || 0) + '</span>'; //
html += '<span style="margin:0;padding:0;display:block;width:100%;padding-left:14px;color: #fff;font-size: 12px;">' + '统招专科:' + (params.num1 || 0) + '</span>'; //
var html = '<div style="width:180px;background:rgba(0, 0, 0, .5); font-size: 20px;">';
html += '<span style="display:block;width:100%;text-align:left;padding:10px 10px 5px 14px; color: #ffffff;border-bottom:1px solid #fff;">' + (params.name) + '</span>'; //
html += '<span style="margin:3px 0 0 0;padding:20px 0 5px 14px ;display:block;width:100%;color: rgba(255, 255, 255, 0.68);font-size: 16px;">' + '统招本科:' + (params.num3 || 0) + '</span>'; //
html += '<span style="margin:0;padding:5px 0 5px 14px ;display:block;width:100%;padding-left:14px;color: rgba(255, 255, 255, 0.68);font-size: 16px;">' + '统招专科:' + (params.num1 || 0) + '</span>'; //
// html += '<span style="margin:0;padding:0;display:block;width:100%;padding-left:14px;color: #fff;font-size: 12px;">'+'' + (params.data.num2 || 0) + '</span>'; //
if (params.num2) {
html += '<span style="margin:0;padding:0;display:block;width:100%;padding-left:14px;color: #fff;font-size: 12px;">' + '统招专升本:' + (params.num2 || 0) + '</span>';
}
// if (params.num2) {
html += '<span style="margin:0;padding:5px 0 20px 14px;display:block;width:100%;color: rgba(255, 255, 255, 0.68);font-size: 16px;">' + '统招专升本:' + (params.num2 || 0) + '</span>';
// }
html += '</div>';
return html;
}
@ -119,11 +119,11 @@ const getMapChart = (data) => {
colorStops: [
{
offset: 0.5,
color: '#0D59C1', // 0%
color: '#b3d0ff', // 0%
},
{
offset: 1,
color: '#b4d9c7', // 100%
color: '#b3d0ff', // 100%
},
],
global: true, // false

View File

@ -1,11 +1,3 @@
<!--
* @Author: 张宁 18339727226@163.com
* @Date: 2024-05-23 20:42:55
* @LastEditors: 张宁 18339727226@163.com
* @LastEditTime: 2024-06-03 15:28:11
* @FilePath: \welcome-system-screen\src\views\index\left-bottom.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup lang="ts">
import { useDataStore } from "@/stores/index";
const dataStore = useDataStore();