提交 8e38d4f8 编写于 作者: 刘英杰's avatar 刘英杰

v2024年05月16 首屏增加学生进出异常记录跳转列表,且显示列表数据。

上级 4776e137
流水线 #26088 已通过 ,包含阶段
in 1 minute 和 1 second
# Vue 3 + Vite # 宿舍出入记录大屏
### 更新日志:
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more. - 2024年05月16
- 首屏增加学生进出异常记录跳转列表,且显示列表数据。
## Recommended IDE Setup
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
import{_ as d,M as f,a as y,b as w,c,d as u,e as S,u as g,k as v,h,j as T,g as r,S as x,O as s,P as a,Q as R}from"./index-802ff849.js";const q={class:"container"},b={__name:"SSO",setup(O){const t=f();let i=y(!0);const _=async n=>{const e=await x(n);if(e.code!==1)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){s.set("large-screen-admin-token",e.response.access_token.token_content),s.set("large-screen-admin-refreshToken",e.response.refresh_token.token_content),s.set("refreshTime",e.response.refresh_token.expires),s.set("time",e.response.access_token.expires);const o=await a();s.set("user-info",o.response.card_number),await t.replace({name:"welcome"})}},p=async n=>{const e=await R(n);if(e.code!==1)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){s.set("large-screen-admin-token",e.response.access_token.token_content),s.set("large-screen-admin-refreshToken",e.response.refresh_token.token_content),s.set("refreshTime",e.response.refresh_token.expires),s.set("time",e.response.access_token.expires);const o=await a();s.set("user-info",o.response.card_number),await t.replace({name:"welcome"})}},l=async n=>{const e=await(void 0)(n);if(e.code!==1)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){s.set("admin-token",e.response.access_token.token_content),s.set("time",e.response.access_token.expires);const o=await a();s.set("user-info",o.response.card_number),await t.replace({name:"welcome"})}},m=async()=>{if(Number(t.currentRoute.value.query.type)===2){let n={token:t.currentRoute.value.query.token,userType:1};await _(n)}else if(Number(t.currentRoute.value.query.type)===1){let n={sign:t.currentRoute.value.query.sign,code:t.currentRoute.value.query.code,timestamp:t.currentRoute.value.query.timestamp};await l(n)}else if(Number(t.currentRoute.value.query.type)===3){let n={userType:t.currentRoute.value.query.userType,P:t.currentRoute.value.query.P,NO:t.currentRoute.value.query.NO};await p(n)}};return w(()=>{m()}),(n,e)=>{const o=c("Spin"),k=c("Space");return u(),S("div",q,[g(i)?(u(),v(k,{key:0,size:"large"},{default:h(()=>[r(o,{size:"small"}),r(o),r(o,{size:"large"})]),_:1})):T("",!0)])}}},A=d(b,[["__scopeId","data-v-b47a2265"]]);export{A as default}; import{_ as d,M as f,a as y,b as w,c,d as u,e as S,u as g,k as v,h,j as R,g as r,S as T,P as s,Q as a,R as x}from"./index-9113708d.js";const q={class:"container"},b={__name:"SSO",setup(N){const t=f();let i=y(!0);const _=async n=>{const e=await T(n);if(e.code!==1)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){s.set("large-screen-admin-token",e.response.access_token.token_content),s.set("large-screen-admin-refreshToken",e.response.refresh_token.token_content),s.set("refreshTime",e.response.refresh_token.expires),s.set("time",e.response.access_token.expires);const o=await a();s.set("user-info",o.response.card_number),await t.replace({name:"welcome"})}},p=async n=>{const e=await x(n);if(e.code!==1)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){s.set("large-screen-admin-token",e.response.access_token.token_content),s.set("large-screen-admin-refreshToken",e.response.refresh_token.token_content),s.set("refreshTime",e.response.refresh_token.expires),s.set("time",e.response.access_token.expires);const o=await a();s.set("user-info",o.response.card_number),await t.replace({name:"welcome"})}},l=async n=>{const e=await(void 0)(n);if(e.code!==1)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){s.set("admin-token",e.response.access_token.token_content),s.set("time",e.response.access_token.expires);const o=await a();s.set("user-info",o.response.card_number),await t.replace({name:"welcome"})}},m=async()=>{if(Number(t.currentRoute.value.query.type)===2){let n={token:t.currentRoute.value.query.token,userType:1};await _(n)}else if(Number(t.currentRoute.value.query.type)===1){let n={sign:t.currentRoute.value.query.sign,code:t.currentRoute.value.query.code,timestamp:t.currentRoute.value.query.timestamp};await l(n)}else if(Number(t.currentRoute.value.query.type)===3){let n={userType:t.currentRoute.value.query.userType,P:t.currentRoute.value.query.P,NO:t.currentRoute.value.query.NO};await p(n)}};return w(()=>{m()}),(n,e)=>{const o=c("Spin"),k=c("Space");return u(),S("div",q,[g(i)?(u(),v(k,{key:0,size:"large"},{default:h(()=>[r(o,{size:"small"}),r(o),r(o,{size:"large"})]),_:1})):R("",!0)])}}},A=d(b,[["__scopeId","data-v-b47a2265"]]);export{A as default};
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
import{M as e,d as t,e as s,f as o}from"./index-802ff849.js";const a=o("h1",null,"用户验证未通过!",-1),n=[a],u={__name:"index",setup(_){return e(),(c,r)=>(t(),s("div",null,n))}};export{u as default}; import{M as e,d as t,e as s,f as o}from"./index-9113708d.js";const a=o("h1",null,"用户验证未通过!",-1),n=[a],u={__name:"index",setup(_){return e(),(c,r)=>(t(),s("div",null,n))}};export{u as default};
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
import{s as r,K as e}from"./index-802ff849.js";function o(){return r(`${new Date}`).format("YYYY年MM月DD日 HH:mm:ss")}async function i(s){let a=await s();try{switch(a.code){case 1:return;default:e.Message.erorr("请求异常");break}}catch{e.Message.erorr("请求异常")}}export{o as g,i as m}; import{v as s,K as e}from"./index-9113708d.js";function o(){return s(`${new Date}`).format("YYYY年MM月DD日 HH:mm:ss")}async function i(a){let r=await a();try{switch(r.code){case 1:return;default:e.Message.erorr("请求异常");break}}catch{e.Message.erorr("请求异常")}}export{o as g,i as m};
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="./vite.svg" /> <link rel="icon" type="image/svg+xml" href="./vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>宿舍大屏</title> <title>宿舍大屏</title>
<script type="module" crossorigin src="./assets/index-802ff849.js"></script> <script type="module" crossorigin src="./assets/index-9113708d.js"></script>
<link rel="stylesheet" href="./assets/index-525874bf.css"> <link rel="stylesheet" href="./assets/index-cbc1a278.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
......
此差异已折叠。
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"echarts": "^5.4.3", "echarts": "^5.4.3",
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"less": "^4.2.0",
"view-ui-plus": "^1.3.14", "view-ui-plus": "^1.3.14",
"vue": "^3.3.4", "vue": "^3.3.4",
"vue-router": "^4.2.5", "vue-router": "^4.2.5",
...@@ -21,6 +22,9 @@ ...@@ -21,6 +22,9 @@
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^4.2.3", "@vitejs/plugin-vue": "^4.2.3",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"vite": "^4.4.5" "vite": "^4.4.5"
} }
} }
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
文件已添加
...@@ -87,5 +87,8 @@ export function GetBuildStoreyData(data={}) { ...@@ -87,5 +87,8 @@ export function GetBuildStoreyData(data={}) {
return requestGet(`/api/Screen/GetBuildStoreyData?building_id=${data.building_id}`, data) return requestGet(`/api/Screen/GetBuildStoreyData?building_id=${data.building_id}`, data)
} }
export function GetStudentAbnormalList(data) {
//保存标题配置
return requestPost(`/api/BedDistribution/GetStudentAbnormalList`, data)
}
此差异已折叠。
<template> <template>
<div class="container"> <div class="container1">
<div class="header"> <div class="header">
<div class="h-t"> <div class="h-t">
<div class="h-t-l"> <div class="h-t-l">
...@@ -310,23 +310,23 @@ ...@@ -310,23 +310,23 @@
</div> </div>
</div> </div>
<div class="c-f-c-f-i-r"> <div class="c-f-c-f-i-r">
<div class="c-f-c-f-i-r-title"> <div class="c-f-c-f-i-r-title ">
<div class="c-f-c-f-i-r-title-l" ></div> <div class="c-f-c-f-i-r-title-l" ></div>
<div class="c-f-c-f-i-r-title-r">截止至今天6:00({{init.data.hgqk.time}})</div> <div class="c-f-c-f-i-r-title-r">截止至今天6:00({{init.data.hgqk.time}})</div>
</div> </div>
<div class="c-f-c-f-i-r-item"> <div @click="routerTo('晚归',1)" class="c-f-c-f-i-r-item hover:cursor-pointer">
<div class="c-f-c-f-i-r-item-l"></div> <div class="c-f-c-f-i-r-item-l"></div>
<div class="c-f-c-f-i-r-item-r"> <div class="c-f-c-f-i-r-item-r">
<span>前一天晚归人数: {{init.data.hgqk.stay_out_late_count}}人</span> <span>前一天晚归人数: {{init.data.hgqk.stay_out_late_count}}人</span>
</div> </div>
</div> </div>
<div class="c-f-c-f-i-r-item"> <div @click="routerTo('未归',2)" class="c-f-c-f-i-r-item hover:cursor-pointer">
<div class="c-f-c-f-i-r-item-l"></div> <div class="c-f-c-f-i-r-item-l"></div>
<div class="c-f-c-f-i-r-item-r"> <div class="c-f-c-f-i-r-item-r">
<span>前一天未归人数: {{init.data.hgqk.no_return_count}}人</span> <span>前一天未归人数: {{init.data.hgqk.no_return_count}}人</span>
</div> </div>
</div> </div>
<div class="c-f-c-f-i-r-item"> <div @click="routerTo('48小时未归',3)" class="c-f-c-f-i-r-item hover:cursor-pointer">
<div class="c-f-c-f-i-r-item-l"></div> <div class="c-f-c-f-i-r-item-l"></div>
<div class="c-f-c-f-i-r-item-r"> <div class="c-f-c-f-i-r-item-r">
<span>48小时未归人数: {{init.data.hgqk.no_return_48hours_count}}人</span> <span>48小时未归人数: {{init.data.hgqk.no_return_48hours_count}}人</span>
...@@ -644,6 +644,16 @@ const updateTitle = ()=>{ ...@@ -644,6 +644,16 @@ const updateTitle = ()=>{
},60000) },60000)
} }
function routerTo(title,value){
//跳转异常记录列表
router.push({
path:'/exceptionRecordList',
query:{
title:title,
value:value,
}
})
}
const GetBuildData = async () => { const GetBuildData = async () => {
let res = await api.GetBuildData({building_id:init.data.building_id}) let res = await api.GetBuildData({building_id:init.data.building_id})
let array = [] let array = []
...@@ -815,7 +825,7 @@ onMounted(()=>{ ...@@ -815,7 +825,7 @@ onMounted(()=>{
--init-height:100%; --init-height:100%;
--init-size:100% --init-size:100%
} }
.container{ .container1{
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background: url("../../assets/materialImage/1.背景.png"); background: url("../../assets/materialImage/1.背景.png");
......
<template> <template>
<div class="container"> <div class="container1">
<div class="header"> <div class="header">
<div class="h-l"> <div class="h-l">
<div class="h-l-time"> <div class="h-l-time">
...@@ -642,7 +642,7 @@ onUnmounted(()=>{ ...@@ -642,7 +642,7 @@ onUnmounted(()=>{
--init-width:100%; --init-width:100%;
--init-height:100%; --init-height:100%;
} }
.container{ .container1{
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-image: url("../../assets/materialImage/1.背景.png"); background-image: url("../../assets/materialImage/1.背景.png");
......
...@@ -11,6 +11,12 @@ export let routes = [ ...@@ -11,6 +11,12 @@ export let routes = [
component:()=>import('../pages/welcomeInfo/index.vue'), component:()=>import('../pages/welcomeInfo/index.vue'),
meta:{isAuth:true,admin:true} meta:{isAuth:true,admin:true}
}, },
{
name:'exceptionRecordList',
path:'/exceptionRecordList',
component:()=>import('../pages/exceptionRecordList/index.vue'),
meta:{isAuth:true,admin:true}
},
{ {
name:'403', name:'403',
path:'/403', path:'/403',
......
@tailwind base;
@tailwind components;
@tailwind utilities;
.tableHeadItem{
@apply w-[20%] h-full flex justify-start items-center ml-[1vw] text-[1vw]
}
.tableHeadItem1{
@apply w-[20%] h-full flex justify-start items-center text-[0.8vw] ml-[1vw]
}
.BackGround1{ .BackGround1{
background-color: #006883; background-color: #006883;
} }
......
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx,vue}",
],
theme: {
extend: {},
},
plugins: [],
}
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或