根据学历层次更改
This commit is contained in:
		
							parent
							
								
									f2faa9560f
								
							
						
					
					
						commit
						bd9b42d6c6
					
				
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 11 KiB | 
|  | @ -29,13 +29,20 @@ const resize = () => { | |||
| const init = (max: any, value: any) => { | ||||
|     chartMax.value = max ? max : 0; | ||||
|     chartValues.value = value ? value : 0; | ||||
|     // chartMax.value = 50 | ||||
|     // chartValues.value = 5 | ||||
|     chartRate.value = 0 | ||||
| 
 | ||||
|     if (chartMax && chartValues) { | ||||
|         chartRate.value = (chartValues.value / chartMax.value * 100).toFixed(1) | ||||
|     } | ||||
|     if (chartRate.value === "100.0") { | ||||
|         chartRate.value = "100"; // 如果百分比等于100,则更新为整数形式 | ||||
|     } | ||||
|     if (isNaN(chartRate.value)) { | ||||
|         chartRate.value = "0"; | ||||
|     } | ||||
|     console.log('打印', chartValues.value, chartMax.value); | ||||
| 
 | ||||
|     let option = { | ||||
|         title: { | ||||
|  | @ -111,18 +118,19 @@ const init = (max: any, value: any) => { | |||
|             }, | ||||
|             { | ||||
|                 type: 'bar', | ||||
|                 data: [{ name: "预报到填写总数", value: chartMax.value }], | ||||
|                 startAngle: 0, | ||||
|                 // data: [{ name: "预报到填写总数", value: chartMax.value }], | ||||
|                 data: { name: "预报到填写总数", value: chartMax.value }, | ||||
|                 z: 1, | ||||
|                 // silent: true, | ||||
|                 coordinateSystem: 'polar', | ||||
|                 barMaxWidth: 35, | ||||
|                 roundCap: 1, | ||||
|                 color: '#00214d', | ||||
|                 barGap: '-100%', | ||||
|             }, | ||||
|             { | ||||
|            /*  { | ||||
|                 type: 'bar', | ||||
|                 data: [{ name: "预报到填写总数", value: chartMax.value }], | ||||
|                 data: [1], | ||||
|                 z: 0, | ||||
|                 silent: true, | ||||
|                 coordinateSystem: 'polar', | ||||
|  | @ -130,7 +138,7 @@ const init = (max: any, value: any) => { | |||
|                 roundCap: true, | ||||
|                 color: '#00214d', | ||||
|                 barGap: '-100%', | ||||
|             }, | ||||
|             }, */ | ||||
|         ], | ||||
|     } | ||||
|     myChart.value.setOption(option); | ||||
|  |  | |||
|  | @ -102,7 +102,7 @@ const init=(max, value) =>{ | |||
|                 } | ||||
|                 ]) | ||||
|             }, | ||||
|             { | ||||
|             /* { | ||||
|                 type: 'bar', | ||||
|                 data: [{ name: "新生总人数", value: chartMax.value }], | ||||
|                 startAngle: 0, | ||||
|  | @ -112,12 +112,12 @@ const init=(max, value) =>{ | |||
|                 roundCap: 1, | ||||
|                 color: '#00214d', | ||||
|                 barGap: '-100%', | ||||
|             }, | ||||
|             }, */ | ||||
|             { | ||||
|                 type: 'bar', | ||||
|                 data: [{ name: "新生总人数", value: chartMax.value }], | ||||
|                 z: 0, | ||||
|                 silent: true, | ||||
|                 // silent: true, | ||||
|                 coordinateSystem: 'polar', | ||||
|                 barMaxWidth: 35, | ||||
|                 roundCap: true, | ||||
|  |  | |||
|  | @ -11,72 +11,104 @@ import { defineStore } from "pinia"; | |||
| // import { storeToRefs } from 'pinia';
 | ||||
| 
 | ||||
| export const useDataStore = defineStore("data", () => { | ||||
|   const allData:Ref<any>  = ref({ | ||||
|   const allData: Ref<any> = ref({ | ||||
|     degreeDto: [], | ||||
|     forecast:{}, | ||||
|     forecastFill:{}, | ||||
|     nationStudent:[], | ||||
|     payDto:{}, | ||||
|     provinceDto:[], | ||||
|     rankingDto:[], | ||||
|     sexDto:{}, | ||||
|     today:{}, | ||||
|     totalDto:{} | ||||
|     forecast: {}, | ||||
|     forecastFill: {}, | ||||
|     nationStudent: [], | ||||
|     payDto: {}, | ||||
|     provinceDto: [], | ||||
|     rankingDto: [], | ||||
|     sexDto: {}, | ||||
|     today: {}, | ||||
|     totalDto: {}, | ||||
|   }); | ||||
|   const degreeDto=computed(() => allData.value.degreeDto); | ||||
|   const forecast=computed(() => allData.value.forecast); | ||||
|   const forecastFill=computed(() => allData.value.forecastFill); | ||||
|   const nationStudent=computed(() => allData.value.nationStudent); | ||||
|   const payDto=computed(() => allData.value.payDto); | ||||
|   const provinceDto=computed(() => allData.value.provinceDto); | ||||
|   const rankingDto=computed(() => allData.value.rankingDto); | ||||
|   const sexDto=computed(()=> allData.value.sexDto); | ||||
|   const today=computed(() => allData.value.today); | ||||
|   const totalDto=computed(() => allData.value.totalDto); | ||||
|   const degreeDto = computed(() => allData.value.degreeDto); | ||||
|   const forecast = computed(() => allData.value.forecast); | ||||
|   const forecastFill = computed(() => allData.value.forecastFill); | ||||
|   const nationStudent = computed(() => allData.value.nationStudent); | ||||
|   const payDto = computed(() => allData.value.payDto); | ||||
|   const provinceDto = computed(() => allData.value.provinceDto); | ||||
|   const rankingDto = computed(() => allData.value.rankingDto); | ||||
|   const sexDto = computed(() => allData.value.sexDto); | ||||
|   const today = computed(() => allData.value.today); | ||||
|   const totalDto = computed(() => allData.value.totalDto); | ||||
| 
 | ||||
|   // 当日预报到报到率
 | ||||
|   const forecastRate = computed(() => { | ||||
|     forecast.value.reported / forecast.value.total | ||||
|   });  | ||||
|     forecast.value.reported / forecast.value.total; | ||||
|   }); | ||||
|   // 当日预报到总人数报到率
 | ||||
|   const totalRate = computed(() => { | ||||
|     totalDto.value.reportNumber / totalDto.value.totalNumber | ||||
|     totalDto.value.reportNumber / totalDto.value.totalNumber; | ||||
|   }); | ||||
| 
 | ||||
|   // 选中的学院id
 | ||||
|   const collageId = ref() | ||||
|   const collageId = ref(); | ||||
|   // 切换选中的学院
 | ||||
|   const setCollageId = (data:any)=>{ | ||||
|     collageId.value = data | ||||
|   } | ||||
|   const setCollageId = (data: any) => { | ||||
|     collageId.value = data; | ||||
|   }; | ||||
|   // 学院对应的专业报到人数
 | ||||
|   const professionRank = ref() | ||||
|   const setProfessionRank = (data:any) => { | ||||
|   const professionRank = ref(); | ||||
|   const setProfessionRank = (data: any) => { | ||||
|     professionRank.value = data; | ||||
|   }; | ||||
| 
 | ||||
|   const setData = (data:any) => { | ||||
|   const setData = (data: any) => { | ||||
|     allData.value = data; | ||||
|   }; | ||||
| 
 | ||||
|   // 本科缴费人数
 | ||||
|   const bkPay= ref() | ||||
|   const setBkPay = (data:any) => { | ||||
|     console.log('data',data); | ||||
|      | ||||
|   const bkPay = ref(); | ||||
|   const setBkPay = (data: any) => { | ||||
|     console.log("data", data); | ||||
| 
 | ||||
|     bkPay.value = data; | ||||
|   }; | ||||
|   // 专科缴费人数
 | ||||
|   const zkPay= ref() | ||||
|   const setZkPay = (data:any) => { | ||||
|   const zkPay = ref(); | ||||
|   const setZkPay = (data: any) => { | ||||
|     zkPay.value = data; | ||||
|   }; | ||||
|   // 专升本缴费人数
 | ||||
|   const zsbPay= ref() | ||||
|   const setZsbPay = (data:any) => { | ||||
|   const zsbPay = ref(); | ||||
|   const setZsbPay = (data: any) => { | ||||
|     zsbPay.value = data; | ||||
|   }; | ||||
| 
 | ||||
|   // 缴费总人数
 | ||||
|   const totalPay = ref(); | ||||
|   const setTotalPay = (data: any) => { | ||||
|     totalPay.value = data; | ||||
|   }; | ||||
| 
 | ||||
|   return { allData,degreeDto,forecast,forecastFill,nationStudent,payDto,provinceDto,rankingDto,sexDto,today,totalDto,setData,bkPay,zkPay,zsbPay,setBkPay,setZkPay,setZsbPay,setCollageId,collageId,professionRank,setProfessionRank,forecastRate,totalRate}; | ||||
|   return { | ||||
|     allData, | ||||
|     degreeDto, | ||||
|     forecast, | ||||
|     forecastFill, | ||||
|     nationStudent, | ||||
|     payDto, | ||||
|     provinceDto, | ||||
|     rankingDto, | ||||
|     sexDto, | ||||
|     today, | ||||
|     totalDto, | ||||
|     setData, | ||||
|     bkPay, | ||||
|     zkPay, | ||||
|     zsbPay, | ||||
|     setBkPay, | ||||
|     setZkPay, | ||||
|     setZsbPay, | ||||
|     setCollageId, | ||||
|     collageId, | ||||
|     professionRank, | ||||
|     setProfessionRank, | ||||
|     forecastRate, | ||||
|     totalRate, | ||||
|     totalPay, | ||||
|     setTotalPay | ||||
|   }; | ||||
| }); | ||||
|  |  | |||
|  | @ -1,19 +1,22 @@ | |||
| <script setup lang="ts"> | ||||
| import { AdminPCIndex ,WeekPay} from "@/api"; | ||||
| import { AdminPCIndex, WeekPay } from "@/api"; | ||||
| import { useTimeStore } from "@/stores/index"; | ||||
| const timeStore = useTimeStore(); | ||||
| import { useDataStore } from "@/stores/index"; | ||||
| const dataStore = useDataStore(); | ||||
| 
 | ||||
| // 获取整体数据 | ||||
| const getAdminPCIndex = (params:any) => { | ||||
| const getAdminPCIndex = (params: any) => { | ||||
|   AdminPCIndex(params).then((res: any) => { | ||||
|     dataStore.setData(res.data); | ||||
|   }) | ||||
| }; | ||||
| // 获取缴费人数 | ||||
| // 缴费人数-- 本科 专科 专升本 | ||||
| const payData = () => { | ||||
| /*  | ||||
|  缴费人数---根据学历层次EducationalLevel 获取 | ||||
| */ | ||||
| /* const payData = () => { | ||||
|   let params: any = [{ | ||||
|     "EducationalLevel": 3, | ||||
|     "Year": myDate.value.year || void 0, | ||||
|  | @ -42,8 +45,30 @@ const payData = () => { | |||
|       } | ||||
|     }) | ||||
|   } | ||||
| 
 | ||||
| } */ | ||||
| /*  | ||||
|  缴费人数---根据批次去区分 | ||||
| */ | ||||
| const payData = () => { | ||||
|   let params: any = { | ||||
|     "EducationalLevel": 3, | ||||
|     "Year": myDate.value.year || void 0, | ||||
|     "Month": myDate.value.month || void 0, | ||||
|     "Day": myDate.value.day || void 0, | ||||
|   } | ||||
|   WeekPay(params).then((res: any) => { | ||||
|     const bk = res.data.todayPayDto.batchTodayPays?.find((item:any) => item.name === "统招本科"); | ||||
|     const zk = res.data.todayPayDto.batchTodayPays?.find((item:any) => item.name === "统招专科"); | ||||
|     const zsb = res.data.todayPayDto.batchTodayPays?.find((item:any) => item.name === "统招专升本"); | ||||
|     dataStore.setBkPay(bk) | ||||
|     dataStore.setZkPay(zk) | ||||
|     dataStore.setZsbPay(zsb) | ||||
|     dataStore.setTotalPay(res.data.todayPayDto.batchTodayPays?.payNum) | ||||
|   }) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // const returnHome = () => { | ||||
| //   history.go(-1) | ||||
| // }; | ||||
|  | @ -51,7 +76,7 @@ const currentDate = new Date() | |||
| // 当前选择的日期 | ||||
| const myDate = ref({ | ||||
|   year: currentDate.getFullYear(), | ||||
|   month:currentDate.getMonth() + 1, | ||||
|   month: currentDate.getMonth() + 1, | ||||
|   day: currentDate.getDate(), | ||||
| }) | ||||
| // 获取选择的日期(年 || 月 ||日) | ||||
|  | @ -62,15 +87,15 @@ const getDate = (val: any) => { | |||
|   timeStore.setMounths(val.month) | ||||
|   timeStore.setDays(val.day) | ||||
|   let params = { | ||||
|     "Year":val.year || void 0, | ||||
|     "Month":val.month || void 0, | ||||
|     "Day":val.day || void 0, | ||||
|     "Year": val.year || void 0, | ||||
|     "Month": val.month || void 0, | ||||
|     "Day": val.day || void 0, | ||||
|   } | ||||
|   getAdminPCIndex(params) | ||||
|   payData() | ||||
| } | ||||
| const dateTitle = computed(()=>{ | ||||
|   let {year, month, day} = myDate.value | ||||
| const dateTitle = computed(() => { | ||||
|   let { year, month, day } = myDate.value | ||||
|   return formatDate(year, month, day) | ||||
| }) | ||||
| /** | ||||
|  |  | |||
|  | @ -1,11 +1,3 @@ | |||
| <!-- | ||||
|  * @Author: 张宁 18339727226@163.com | ||||
|  * @Date: 2024-05-22 08:40:56 | ||||
|  * @LastEditors: 张宁 18339727226@163.com | ||||
|  * @LastEditTime: 2024-06-04 09:34:34 | ||||
|  * @FilePath: \welcome-system-screen\src\views\index\center-top.vue | ||||
|  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
| --> | ||||
| <script setup lang="ts"> | ||||
| import { useTimeStore } from "@/stores/index"; | ||||
| const timeStore = useTimeStore(); | ||||
|  | @ -13,7 +5,7 @@ const { computDate } = storeToRefs(timeStore) | |||
| import { ElMessage } from "element-plus"; | ||||
| import { useDataStore } from "@/stores/index"; | ||||
| const dataStore = useDataStore(); | ||||
| const { today, forecastRate,totalRate } = storeToRefs(dataStore) | ||||
| const { today, forecastRate, totalRate } = storeToRefs(dataStore) | ||||
| 
 | ||||
| </script> | ||||
| 
 | ||||
|  | @ -21,7 +13,7 @@ const { today, forecastRate,totalRate } = storeToRefs(dataStore) | |||
|   <div class="center-top"> | ||||
|     <div class="top-item-img"> | ||||
|       <div class="top-item-icon"> | ||||
|         <img src="@/assets/img/zheke/center_top1.png"> | ||||
|         <img src="@/assets/img/zheke/center_top0.png"> | ||||
|       </div> | ||||
|       <div class="top-item"> | ||||
|         <div class="top-item-title">{{ computDate }}迎新人数</div> | ||||
|  | @ -29,23 +21,35 @@ const { today, forecastRate,totalRate } = storeToRefs(dataStore) | |||
|       </div> | ||||
| 
 | ||||
|     </div> | ||||
|     <div class="top-item"> | ||||
|       <div class="top-item-title">{{ computDate }}预报到人数</div> | ||||
|       <div class="top-item-content">{{ today.forecastStuden ?? '0' }}</div> | ||||
|     </div> | ||||
|     <div class="top-item"> | ||||
|       <div class="top-item-title">{{ computDate }}预报到报到率</div> | ||||
|       <div class="top-item-content"> {{ forecastRate ?? '0' }}% </div> | ||||
|     <div class="top-item-img"> | ||||
|       <div class="top-item-icon"> | ||||
|         <img src="@/assets/img/zheke/center_top1.png"> | ||||
|       </div> | ||||
|       <div class="top-item"> | ||||
|         <div class="top-item-title">{{ computDate }}预报到人数</div> | ||||
|         <div class="top-item-content">{{ today.forecastStuden ?? '0' }}</div> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="top-item-img"> | ||||
|       <div class="top-item-icon"> | ||||
|         <img src="@/assets/img/zheke/center_top2.png"> | ||||
|       </div> | ||||
|       <div class="top-item"> | ||||
|         <div class="top-item-title">预报到总人数报到率</div> | ||||
|         <div class="top-item-content"> {{totalRate ?? '0'}}% </div> | ||||
|         <div class="top-item-title">{{ computDate }}预报到报到率</div> | ||||
|         <div class="top-item-content"> {{ forecastRate ?? '0' }}% </div> | ||||
|       </div> | ||||
|     </div> | ||||
| 
 | ||||
| 
 | ||||
|     <!-- <div class="top-item-img"> | ||||
|       <div class="top-item-icon"> | ||||
|         <img src="@/assets/img/zheke/center_top2.png"> | ||||
|       </div> | ||||
|       <div class="top-item"> | ||||
|         <div class="top-item-title">预报到总人数报到率</div> | ||||
|         <div class="top-item-content"> {{ totalRate ?? '0' }}% </div> | ||||
|       </div> | ||||
|     </div> --> | ||||
|   </div> | ||||
| </template> | ||||
| 
 | ||||
|  |  | |||
|  | @ -120,7 +120,7 @@ const getAdminPCIndex = () => { | |||
| }; | ||||
| 
 | ||||
| // 缴费人数-- 本科 专科 专升本 | ||||
| const payData = () => { | ||||
| /* const payData = () => { | ||||
|   let params: any = [{ | ||||
|     "EducationalLevel": 3, | ||||
|     "Year": years.value, | ||||
|  | @ -155,6 +155,31 @@ const payData = () => { | |||
|     } | ||||
|   }); | ||||
| 
 | ||||
| } */ | ||||
| /*  | ||||
|  缴费人数---根据批次去区分 | ||||
| */ | ||||
| const payData = () => { | ||||
|   let params: any = { | ||||
|     "EducationalLevel": 3, | ||||
|     "Year": years.value, | ||||
|     "Month": months.value || void 0, | ||||
|     "Day": days.value || void 0, | ||||
|   } | ||||
|   WeekPay(params).then((res: any) => { | ||||
|     const bk = res.data.todayPayDto.batchTodayPays?.find((item: any) => item.name === "统招本科"); | ||||
|     const zk = res.data.todayPayDto.batchTodayPays?.find((item: any) => item.name === "统招专科"); | ||||
|     const zsb = res.data.todayPayDto.batchTodayPays?.find((item: any) => item.name === "统招专升本"); | ||||
|     dataStore.setBkPay(bk) | ||||
|     dataStore.setZkPay(zk) | ||||
|     dataStore.setZsbPay(zsb) | ||||
|     dataStore.setTotalPay(res.data.todayPayDto.batchTodayPays?.payNum) | ||||
|     setTimeout(() => { | ||||
|       if (rightCenterRef) { | ||||
|         rightCenterRef.value.getData() | ||||
|       } | ||||
|     }); | ||||
|   }) | ||||
| } | ||||
| const timer: any = ref(null) | ||||
| const startTimer = () => { | ||||
|  |  | |||
|  | @ -6,7 +6,7 @@ const timeStore = useTimeStore() | |||
| const { nowTitle } = storeToRefs(timeStore) | ||||
| 
 | ||||
| const dataStore = useDataStore() | ||||
| const { bkPay, zkPay, zsbPay } = storeToRefs(dataStore) | ||||
| const { bkPay, zkPay, zsbPay,totalPay } = storeToRefs(dataStore) | ||||
| const activeTab = ref(0); | ||||
| const tabs = ref([ | ||||
|   { title: '本科', value: 0, dateList: ['05-30', '05-31', '06-01', '06-02', '06-03', "06-04"], numList: [0, 0, 0, 0, 0, 0] }, | ||||
|  | @ -183,13 +183,18 @@ defineExpose({getData}) | |||
|   <div class="tabs"> | ||||
|     <div class="no-tab"> | ||||
|       <p>{{ nowTitle }}缴费总人数</p> | ||||
|       <p> {{ bkPay?.todayPayDto?.payNum }} </p> | ||||
|       <!-- <p> {{ bkPay?.todayPayDto?.payNum }} </p> --> | ||||
|       <p> {{ totalPay??'0' }} </p> | ||||
|     </div> | ||||
|     <div v-for="(tab, index) in tabs" :key="index" :class="{ active: activeTab === index }" @click="changeTab(index)"> | ||||
|       <p>{{ tab.title }}</p> | ||||
|       <p v-if="index == 0">{{ bkPay?.todayPayDto?.bkPayNum }}</p> | ||||
|       <!-- <p v-if="index == 0">{{ bkPay?.todayPayDto?.bkPayNum }}</p> | ||||
|       <p v-if="index == 1">{{ bkPay?.todayPayDto?.zkPayNum }}</p> | ||||
|       <p v-if="index == 2">{{ bkPay?.todayPayDto?.zsbPayNum }}</p> | ||||
|       <p v-if="index == 2">{{ bkPay?.todayPayDto?.zsbPayNum }}</p> --> | ||||
|       <p v-if="index == 0">{{ bkPay?.num }}</p> | ||||
|       <p v-if="index == 1">{{ zkPay?.num }}</p> | ||||
|       <p v-if="index == 2">{{ zsbPay?.num }}</p> | ||||
| 
 | ||||
|     </div> | ||||
|   </div> | ||||
|   <!-- <div class="tab-content"> --> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue