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

保存

上级 29fc2eb6
# 竞赛管理移动端
# 宿舍大屏-学生异常状态干预-移动端
### 安装依赖失败(冲突)尝试命令:
......
......@@ -47,22 +47,16 @@ declare module 'vue' {
TimeSelector: typeof import('./src/components/timeSelector.vue')['default']
Tree: typeof import('./src/components/tree.vue')['default']
UserHeader: typeof import('./src/components/userHeader.vue')['default']
VanBadge: typeof import('vant/es')['Badge']
VanButton: typeof import('vant/es')['Button']
VanCalendar: typeof import('vant/es')['Calendar']
VanCell: typeof import('vant/es')['Cell']
VanCellGroup: typeof import('vant/es')['CellGroup']
VanCheckbox: typeof import('vant/es')['Checkbox']
VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
VanCol: typeof import('vant/es')['Col']
VanCollapse: typeof import('vant/es')['Collapse']
VanCollapseItem: typeof import('vant/es')['CollapseItem']
VanDialog: typeof import('vant/es')['Dialog']
VanDropdownItem: typeof import('vant/es')['DropdownItem']
VanDropdownMenu: typeof import('vant/es')['DropdownMenu']
VanEmpty: typeof import('vant/es')['Empty']
VanField: typeof import('vant/es')['Field']
VanForm: typeof import('vant/es')['Form']
VanIcon: typeof import('vant/es')['Icon']
VanImage: typeof import('vant/es')['Image']
VanList: typeof import('vant/es')['List']
......@@ -70,7 +64,6 @@ declare module 'vue' {
VanNavBar: typeof import('vant/es')['NavBar']
VanPagination: typeof import('vant/es')['Pagination']
VanPicker: typeof import('vant/es')['Picker']
VanPopover: typeof import('vant/es')['Popover']
VanPopup: typeof import('vant/es')['Popup']
VanPullRefresh: typeof import('vant/es')['PullRefresh']
VanRadio: typeof import('vant/es')['Radio']
......@@ -80,14 +73,7 @@ declare module 'vue' {
VanSearch: typeof import('vant/es')['Search']
VanStep: typeof import('vant/es')['Step']
VanSteps: typeof import('vant/es')['Steps']
VanTab: typeof import('vant/es')['Tab']
VanTabbar: typeof import('vant/es')['Tabbar']
VanTabbarItem: typeof import('vant/es')['TabbarItem']
VanTabs: typeof import('vant/es')['Tabs']
VanTag: typeof import('vant/es')['Tag']
VanTextEllipsis: typeof import('vant/es')['TextEllipsis']
VanTreeSelect: typeof import('vant/es')['TreeSelect']
VanUploader: typeof import('vant/es')['Uploader']
ViewFiles: typeof import('./src/components/viewFiles.vue')['default']
}
}
......@@ -4,12 +4,12 @@
<meta charset="UTF-8"/>
<link rel="icon" type="image/svg+xml" href="/vite.svg"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>竞赛管理</title>
<title>学生异常状态干预</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/vue-office@0.0.5/lib/index.min.js"></script>
<script type="text/javascript" src="/a/manager/identify/identify.js"></script>
<!--<script defer src="https://cdn.jsdelivr.net/npm/vue-office@0.0.5/lib/index.min.js"></script>-->
<!--<script type="text/javascript" src="/a/manager/identify/identify.js"></script>-->
</body>
</html>
......@@ -3,9 +3,15 @@ import { type AxiosRequestConfig } from "axios";
* 根据条件获取人员
* /api/Common/GetPersonByCondiction
*/
export declare function getApiCommonGetPersonByCondiction(params: GetApiCommonGetPersonByCondictionParams, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any[], any>>;
export declare function getApiCommonGetPersonByCondiction(params: GetApiCommonGetPersonByCondictionParams, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<{
id: string;
idCard: string;
name: string;
depty: string;
gender: string;
}[], any>>;
export interface GetApiCommonGetPersonByCondictionParams {
/** 0-学生,1-教师 */
/** 0-学号,1-教师 */
user_type?: number;
/** 卡号或者姓名 */
keyword?: string;
......
export * from "./postApiCommonBatchSync";
export * from "./getApiCommonGetBatchList";
export * from "./postApiCommonBatchSave";
export * from "./getApiCommonBatchDel";
export * from "./getApiCommonGetBatchBySelect";
export * from "./getApiCommonGetTypeList";
export * from "./getApiCommonGetTypeBySelect";
export * from "./postApiCommonTypeSave";
export * from "./getApiCommonTypeDel";
export * from "./getApiCommonGetLevelList";
export * from "./getApiCommonGetLevelBySelect";
export * from "./postApiCommonLevelSave";
export * from "./getApiCommonLevelDel";
export * from "./getApiCommonGetHierarchyList";
export * from "./getApiCommonGetHierarchySelect";
export * from "./getApiCommonGetHierarchyNameSelect";
export * from "./postApiCommonHierarchySave";
export * from "./getApiCommonHierarchyDel";
export * from "./getApiCommonGetSubsidyTypeList";
export * from "./postApiCommonSubsidyTypeSave";
export * from "./getApiCommonSubsidyTypeDel";
export * from "./getApiCommonSubsidyTypeEnable";
export * from "./getApiCommonGetSubsidyTypeEquation";
export * from "./postApiCommonGetBonusConfigList";
export * from "./getApiCommonGetBonusConfigInfo";
export * from "./postApiCommonBonusConfigSave";
export * from "./getApiCommonBonusConfigDel";
export * from "./getApiCommonBonusConfigEnable";
export * from "./postApiCommonGetInstructionalScoreList";
export * from "./getApiCommonGetInstructionalScoreInfo";
export * from "./postApiCommonInstructionalScoreSave";
export * from "./getApiCommonInstructionalScoreDel";
export * from "./getApiCommonInstructionalScoreEnable";
export * from "./postApiCommonInstructionalScoreEquation";
export * from "./getApiCommonGetBonusRevealing";
export * from "./getApiCommonGetClassHourList";
export * from "./getApiCommonGetDeptSelect";
export * from "./getApiCommonGetTrainLevelList";
export * from "./getApiCommonGetRoomBedStatusList";
export * from "./getApiCommonGetBedStatusList";
export * from "./getApiCommonGetPersonByCondiction";
export * from "./getApiCommonGetTeacherDeptList";
export * from "./getApiCommonGetGradeList";
export * from "./getApiCommonGetClassTree";
export * from "./getApiCommonGetClassTreeRole";
export * from "./postApiSystemFileImageUpLoad";
export * from "./getApiSystemFileGetFilesInfo";
export * from "./getApiSystemFileGetImagePath";
export * from "./getApiCommonSetOpenAndClose";
export * from "./getApiCommonOpenAndCloesConfigSet";
export * from "./getApiCommonSetOrderBedRule";
export * from "./getApiCommonGetOrderBedRule";
export * from "./getApiCommonGetAllowTroopScope";
export * from "./postApiCommonUpdateTroopSetting";
export * from "./getApiCommonGetTroopSetting";
export * from "./postApiCommonUpdateNewStudentChooseBedSetting";
export * from "./getApiCommonGetNewStudentChooseBedSetting";
export * from "./getApiCommonGetClassTreeByRole";
export * from "./getApiCommonGetDepartment";
export * from "./getApiCommonGetFloorLevelList";
export * from "./postApiCommonBatchSync";
export * from "./getApiCommonGetBatchList";
export * from "./postApiCommonBatchSave";
export * from "./getApiCommonBatchDel";
export * from "./getApiCommonGetBatchBySelect";
export * from "./getApiCommonGetTypeList";
export * from "./getApiCommonGetTypeBySelect";
export * from "./postApiCommonTypeSave";
export * from "./getApiCommonTypeDel";
export * from "./getApiCommonGetLevelList";
export * from "./getApiCommonGetLevelBySelect";
export * from "./postApiCommonLevelSave";
export * from "./getApiCommonLevelDel";
export * from "./getApiCommonGetHierarchyList";
export * from "./getApiCommonGetHierarchySelect";
export * from "./getApiCommonGetHierarchyNameSelect";
export * from "./postApiCommonHierarchySave";
export * from "./getApiCommonHierarchyDel";
export * from "./getApiCommonGetSubsidyTypeList";
export * from "./postApiCommonSubsidyTypeSave";
export * from "./getApiCommonSubsidyTypeDel";
export * from "./getApiCommonSubsidyTypeEnable";
export * from "./getApiCommonGetSubsidyTypeEquation";
export * from "./postApiCommonGetBonusConfigList";
export * from "./getApiCommonGetBonusConfigInfo";
export * from "./postApiCommonBonusConfigSave";
export * from "./getApiCommonBonusConfigDel";
export * from "./getApiCommonBonusConfigEnable";
export * from "./postApiCommonGetInstructionalScoreList";
export * from "./getApiCommonGetInstructionalScoreInfo";
export * from "./postApiCommonInstructionalScoreSave";
export * from "./getApiCommonInstructionalScoreDel";
export * from "./getApiCommonInstructionalScoreEnable";
export * from "./postApiCommonInstructionalScoreEquation";
export * from "./getApiCommonGetBonusRevealing";
export * from "./getApiCommonGetClassHourList";
export * from "./getApiCommonGetDeptSelect";
export * from "./getApiCommonGetTrainLevelList";
export * from "./getApiCommonGetRoomBedStatusList";
export * from "./getApiCommonGetBedStatusList";
export * from "./getApiCommonGetPersonByCondiction";
export * from "./getApiCommonGetTeacherDeptList";
export * from "./getApiCommonGetGradeList";
export * from "./getApiCommonGetClassTree";
export * from "./getApiCommonGetClassTreeRole";
export * from "./postApiSystemFileImageUpLoad";
export * from "./getApiSystemFileGetFilesInfo";
export * from "./getApiSystemFileGetImagePath";
export * from "./getApiCommonSetOpenAndClose";
export * from "./getApiCommonOpenAndCloesConfigSet";
export * from "./getApiCommonSetOrderBedRule";
export * from "./getApiCommonGetOrderBedRule";
export * from "./getApiCommonGetAllowTroopScope";
export * from "./postApiCommonUpdateTroopSetting";
export * from "./getApiCommonGetTroopSetting";
export * from "./postApiCommonUpdateNewStudentChooseBedSetting";
export * from "./getApiCommonGetNewStudentChooseBedSetting";
export * from "./getApiCommonGetClassTreeByRole";
export * from "./getApiCommonGetDepartment";
export * from "./getApiCommonGetFloorLevelList";
......@@ -9,11 +9,16 @@ export declare function getApiGetTokenInfo(config?: AxiosRequestConfig): Promise
msg: string;
msg_detail: string;
response: {
id: string;
cardNumber: string;
name: string;
role: {
role_id: string;
organize: string;
type: any;
openId: string;
roleAndPower: {
role_name: string;
role_id: string;
powers: string[];
}[];
};
}, any>>;
export * from "./getApiLoginApiLoginCheckLoginTest";
export * from "./postApiLoginApiLoginSsopc";
export * from "./getApiLoginApiLoginSsopcwx";
export * from "./getApiLoginApiLoginRefreshToken";
export * from "./getApiLoginApiLoginGetTokenInfo";
export * from "./getTest";
export * from "./postApiSsoPc";
export * from "./postApiSsoWx";
export * from "./getApiGetTokenInfo";
export * from "./getApiRefreshToken";
export * from "./getApiSsoPcAic";
export * from "./getApiSsoSsoScreenAic";
export * from "./getTestOutSystemOne";
export * from "./getTestOutSystemSso";
export * from "./getAnalyTicket";
export * from "./getApiLoginApiLoginCheckLoginTest";
export * from "./postApiLoginApiLoginSsopc";
export * from "./getApiLoginApiLoginSsopcwx";
export * from "./getApiLoginApiLoginRefreshToken";
export * from "./getApiLoginApiLoginGetTokenInfo";
export * from "./getTest";
export * from "./postApiSsoPc";
export * from "./postApiSsoWx";
export * from "./getApiGetTokenInfo";
export * from "./getApiRefreshToken";
export * from "./getApiSsoPcAic";
export * from "./getApiSsoSsoScreenAic";
export * from "./getTestOutSystemOne";
export * from "./getTestOutSystemSso";
export * from "./getAnalyTicket";
import { type AxiosRequestConfig } from "axios";
import { type TokenRequests } from "../../interface";
import { type LoginRequest } from "../../interface";
/**
* PC单点
* PC单点登录
* /api/sso/pc
*/
export declare function postApiSsoPc(input?: TokenRequests, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<{
export declare function postApiSsoPc(input?: LoginRequest, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<{
code: number;
status: string;
msg: string;
......
import request from "@/util/axios.js";
/**
* PC单点
* PC单点登录
* /api/sso/pc
*/
export function postApiSsoPc(input, config) {
......
import { type AxiosRequestConfig } from "axios";
import { type TokenRequests } from "../../interface";
import { type LoginForWxRequst } from "../../interface";
/**
* WX单点
* 微信单点登录
* /api/sso/wx
*/
export declare function postApiSsoWx(input?: TokenRequests, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<{
export declare function postApiSsoWx(input?: LoginForWxRequst, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<{
code: number;
status: string;
msg: string;
......
import request from "@/util/axios.js";
/**
* WX单点
* 微信单点登录
* /api/sso/wx
*/
export function postApiSsoWx(input, config) {
......
export * from "./postApiRoomGetRoomList";
export * from "./postApiRoomGetRoomListBySex";
export * from "./getApiRoomGetRoomInfo";
export * from "./postApiRoomRoomIns";
export * from "./postApiRoomRoomSave";
export * from "./getApiRoomRoomDel";
export * from "./getApiRoomRoomEnable";
export * from "./getApiRoomGetRoomHourList";
export * from "./getApiRoomGetFurnitureList";
export * from "./postApiRoomModifyFurniture";
export * from "./postApiRoomAddFurniture";
export * from "./getApiRoomGetRoomList";
export * from "./getApiRoomGetDetailMessage";
export * from "./postApiRoomAdd";
export * from "./postApiRoomAddPictureForRooms";
export * from "./postApiRoomMoidfiykeyMessage";
export * from "./postApiRoomDelete";
export * from "./postApiRoomStop";
export * from "./postApiRoomUsing";
export * from "./postApiRoomSort";
export * from "./getApiRoomModifyChangeRoomBug";
export * from "./postApiRoomModifyRoomPwd";
export * from "./postApiRoomRoomPwdTemplateExport";
export * from "./postApiRoomRoomPwdImport";
export * from "./getApiRoomGetMyRoomPwd";
export * from "./postApiRoomGetRoomList";
export * from "./postApiRoomGetRoomListBySex";
export * from "./getApiRoomGetRoomInfo";
export * from "./postApiRoomRoomIns";
export * from "./postApiRoomRoomSave";
export * from "./getApiRoomRoomDel";
export * from "./getApiRoomRoomEnable";
export * from "./getApiRoomGetRoomHourList";
export * from "./getApiRoomGetFurnitureList";
export * from "./postApiRoomModifyFurniture";
export * from "./postApiRoomAddFurniture";
export * from "./getApiRoomGetRoomList";
export * from "./getApiRoomGetDetailMessage";
export * from "./postApiRoomAdd";
export * from "./postApiRoomAddPictureForRooms";
export * from "./postApiRoomMoidfiykeyMessage";
export * from "./postApiRoomDelete";
export * from "./postApiRoomStop";
export * from "./postApiRoomUsing";
export * from "./postApiRoomSort";
export * from "./getApiRoomModifyChangeRoomBug";
export * from "./postApiRoomModifyRoomPwd";
export * from "./postApiRoomRoomPwdTemplateExport";
export * from "./postApiRoomRoomPwdImport";
export * from "./getApiRoomGetMyRoomPwd";
export * from "./BonusDeclare";
export * from "./Bursary";
export * from "./Certificate";
export * from "./Abnormal";
export * from "./BedDistribution";
export * from "./Building";
export * from "./BuildingManagerDo";
export * from "./Change";
export * from "./Common";
export * from "./CompetitionReport";
export * from "./CompetitionSign";
export * from "./DataRefresh";
export * from "./DbFirst";
export * from "./Expert";
export * from "./File";
export * from "./Flow";
export * from "./FlowDesign";
export * from "./FlowUserGroup";
export * from "./FlowView";
export * from "./Foreign";
export * from "./HouseType";
export * from "./hovel";
export * from "./Login";
export * from "./Message";
export * from "./Notice";
export * from "./NoticeType";
export * from "./NoticeUserGroup";
export * from "./Score";
export * from "./SubsidyDeclare";
export * from "./Team";
export * from "./UserInfo";
export * from "./UserRole";
export * from "./WorkloadDeclare";
export * from "./LogisticsSystem";
export * from "./Operator";
export * from "./Role";
export * from "./Room";
export * from "./Screen";
export * from "./StudentDo";
export * from "./Tag";
export * from "./TagType";
export * from "./VariableArea";
export * from "./WelcomeStudentForBaseData";
export * from "./WFCommon";
export * from "./WFDefined";
export * from "./WFList";
export * from "./WFManage";
export * from "./WFRun";
export * from "./BonusDeclare";
export * from "./Bursary";
export * from "./Certificate";
export * from "./Abnormal";
export * from "./BedDistribution";
export * from "./Building";
export * from "./BuildingManagerDo";
export * from "./Change";
export * from "./Common";
export * from "./CompetitionReport";
export * from "./CompetitionSign";
export * from "./DataRefresh";
export * from "./DbFirst";
export * from "./Expert";
export * from "./File";
export * from "./Flow";
export * from "./FlowDesign";
export * from "./FlowUserGroup";
export * from "./FlowView";
export * from "./Foreign";
export * from "./HouseType";
export * from "./hovel";
export * from "./Login";
export * from "./Message";
export * from "./Notice";
export * from "./NoticeType";
export * from "./NoticeUserGroup";
export * from "./Score";
export * from "./SubsidyDeclare";
export * from "./Team";
export * from "./UserInfo";
export * from "./UserRole";
export * from "./WorkloadDeclare";
export * from "./LogisticsSystem";
export * from "./Operator";
export * from "./Role";
export * from "./Room";
export * from "./Screen";
export * from "./StudentDo";
export * from "./Tag";
export * from "./TagType";
export * from "./VariableArea";
export * from "./WelcomeStudentForBaseData";
export * from "./WFCommon";
export * from "./WFDefined";
export * from "./WFList";
export * from "./WFManage";
export * from "./WFRun";
export interface PersonResponse {
/** 0-学生,1-教师 */
user_type?: number;
/** id */
id?: string;
/** 卡号 */
card?: string;
idCard?: string;
/** 姓名 */
name?: string;
/** 部门 */
depty?: string;
/** 性别 */
gender?: string;
}
......@@ -3,6 +3,7 @@ export interface TableTitle {
field_id?: string;
show_name?: string;
show_type?: number;
type?: string;
width?: number;
order_by_flag?: number;
default_hide_flag?: number;
......
import { type RoleAndNameViewModel } from "../../interface";
import { type UserType, type RoleAndPowerResponse } from "../../interface";
export interface UserJwtViewModel {
id?: string;
cardNumber?: string;
name?: string;
role?: RoleAndNameViewModel[];
organize?: string;
type?: UserType;
openId?: string;
roleAndPower?: RoleAndPowerResponse[];
}
此差异已折叠。
此差异已折叠。
{
"docsUrl": "https://asc.hnasct.cn/competition/swagger/competition/swagger.json",
"docsUrl": "https://asc.hnasct.cn/dormmanage/swagger/Dorm/swagger.json",
"axiosInstanceUrl": "@/util/axios.js"
}
......@@ -30,33 +30,28 @@ function switchPermission(curRole) {
//切换权限
init.userInfo.roleArray.forEach(cur => {
if (cur.value === curRole) userInfo.setUserCurrentRole({
role_id: cur.value,
role_name: cur.label,
id: cur.value,
name: cur.label,
})
})
router.go(0)
}
onMounted(() => {
init.userInfo.roleArray = init.userInfo.formData.role.map(cur => {
init.userInfo.roleArray = userInfo.getUserRole().map(cur => {
//遍历用户权限格式
return {
value: cur.role_id,
label: cur.role_name,
value: cur.id,
label: cur.name,
}
})
init.userInfo.formData.curRole = userInfo.getUserCurrentRole().role_id;//获取当前权限
init.userInfo.formData.curRole = userInfo.getUserCurrentRole().id;//获取当前权限
})
</script>
<template>
<div class=" flex items-center w-full h-[50px] rounded-[8px] ">
<!-- <div class="w-1/2 h-full mt-1 ml-1">
<div @click="back" style="background: white" class="child flex justify-center items-center">
<van-icon style="font-size: 30px;font-weight: bold" name="wap-home-o"/>
</div>
</div>-->
<div class="w-1/3 mt-1 ml-1 h-[50px] ">
<div class=" flex w-12 bg-white h-full justify-center items-center text-[18px] text-[#323233]"
style="height: 50px;border-radius: 8px"
......@@ -71,7 +66,7 @@ onMounted(() => {
</div>
<span
class="text-[16px] text-neutral-400"> {{
init.userInfo.formData.card_number + ' ' + userInfo.getUserCurrentRole().role_name
init.userInfo.formData.card_number + ' ' + userInfo.getUserCurrentRole().name
}}
</span>
</div>
......
export const baseURL = '/competition'
export const baseURL = '/dormmanage'
export const versionNumber = '20240731 v0.0.1'
......@@ -9,6 +9,7 @@ import {onMounted} from 'vue';
import * as api from '@/api/dist/controller/index.js'
import {useUserInfo} from "@/store/modules/user.js";
import {useDomainInfo} from "@/store/modules/domian.js";
import {getTest} from "@/api/dist/controller/Login/getTest.js";
const userInfo = useUserInfo()
const domainInfo = useDomainInfo()
......@@ -16,15 +17,15 @@ const router = useRouter()
function setUserInfo() { //获取用户信息
api.getApiLoginApiLoginGetTokenInfo().then(user => {
if (user.response.role.some(cur => cur.role_name === '管理员')) {
userInfo.setUserCurrentRole(user.response.role[user.response.role.findIndex(cur => cur.role_name === '管理员')])
} else {
userInfo.setUserCurrentRole(user.response.role[0])
}
api.getApiGetTokenInfo().then(user => {
userInfo.setUserInfo({...user.response})
router.replace({
name: 'welcome'
api.getApiAbnormalGetTeacherRoleNameSelect().then(roleInfo=>{
//获取权限信息
userInfo.setUserRole(roleInfo.response);
userInfo.setUserCurrentRole(roleInfo.response.find(cur=>cur.selected === 1));
router.replace({
name: 'welcome'
})
})
})
}
......@@ -50,7 +51,7 @@ const getToken = async () => {
},
"asc": async () => {
//ASC单点
api.postApiLoginApiLoginSsopc({token: router.currentRoute.value.query.token}).then(res => {
api.postApiSsoPc({token: router.currentRoute.value.query.token,user_type:1}).then(res => {
if (res.code !== 1) goTo403()
else {
userInfo.setToken(res.response)
......@@ -61,11 +62,11 @@ const getToken = async () => {
"first": () => {
//AIC单点
let date = {
sign: router.currentRoute.value.query.sign,
code: router.currentRoute.value.query.code,
timestamp: router.currentRoute.value.query.timestamp,
userType: router.currentRoute.value.query.userType,
P: router.currentRoute.value.query.P,
NO: router.currentRoute.value.query.NO,
}
api.getApiLoginApiLoginSsopcwx(date).then(res => {
api.getApiSsoPcAic(date).then(res => {
if (res.code !== 1) goTo403()
else {
userInfo.setToken(res.response)
......@@ -75,7 +76,14 @@ const getToken = async () => {
},
"test": () => {
//测试token
api.getApiLoginApiLoginCheckLoginTest({name: 'asc666'}).then(res => {
let date = {
userType:1,
card: 'asc666',
}
console.log("🚀🚀date🚀,",date)
api.getTest(date).then(res => {
if (res.code !== 1) goTo403();
else {
userInfo.setToken(res.response)
......
......@@ -88,20 +88,17 @@ function message() {
}
function setUserInfo() {
console.log("🚀🚀🚀,进入setUserInfo",)
//获取用户信息
api.getApiLoginApiLoginGetTokenInfo().then(user => {
if (user.response.role.some(cur => cur.role_name === '管理员')) {
userInfo.setUserCurrentRole(user.response.role[user.response.role.findIndex(cur => cur.role_name === '管理员')])
} else {
userInfo.setUserCurrentRole(user.response.role[0])
}
function setUserInfo() { //获取用户信息
api.getApiGetTokenInfo().then(user => {
userInfo.setUserInfo({...user.response})
message()
/* router.replace({
name: 'welcome'
})*/
api.getApiAbnormalGetTeacherRoleNameSelect().then(roleInfo=>{
//获取权限信息
userInfo.setUserRole(roleInfo.response);
userInfo.setUserCurrentRole(roleInfo.response.find(cur=>cur.selected === 1));
router.replace({
name: 'welcome'
})
})
})
}
......@@ -126,9 +123,7 @@ const getToken = async () => {
},
"asc": async () => {
//ASC单点
api.postApiLoginApiLoginSsopc({token: router.currentRoute.value.query.token}).then(res => {
if (res.code !== 1) goTo403()
else {
userInfo.setToken(res.response)
......@@ -139,11 +134,11 @@ const getToken = async () => {
"first": () => {
//AIC单点
let date = {
sign: router.currentRoute.value.query.sign,
code: router.currentRoute.value.query.code,
timestamp: router.currentRoute.value.query.timestamp,
userType: router.currentRoute.value.query.userType,
P: router.currentRoute.value.query.P,
NO: router.currentRoute.value.query.NO,
}
api.getApiLoginApiLoginSsopcwx(date).then(res => {
api.getApiSsoPcAic(date).then(res => {
if (res.code !== 1) goTo403()
else {
userInfo.setToken(res.response)
......@@ -168,7 +163,6 @@ const getToken = async () => {
onMounted(() => {
init.formData = router.currentRoute.value.query
getToken()
})
</script>
......@@ -4,12 +4,12 @@ import {defineAsyncComponent, getCurrentInstance, nextTick, onMounted, reactive,
import router from "@/router/index.js";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
import {getImage} from "@/hooks/index.js";
import ConfigDict from '@/config/modules/dict.js'
import dayjs from "dayjs";
import commonDataRequest from "@/api/commonDataRequest/index.js";
const card = defineAsyncComponent(() => import('@/pages/flowApproval/components/card.vue'))
import {useUserInfo} from "@/store/modules/user.js";
const userInfo = useUserInfo()
const init = reactive({
ApplicationType: {
......@@ -60,23 +60,13 @@ const init = reactive({
columns: [],
showPicker: false,
},
data: {
array: []
date:{
show:false,
showDate:dayjs().format('YYYY年MM月DD日')
},
params: {
"page_index": 1,
"page_size": 10,
"flow_id": [103, 111],
"key_name": "",
"action_type": "",
"status": "",
"flow_name": "",
"competitionsubitem_name": "",
"competition_level_id": "",
"competition_type_id": "",
"sponsor": "",
"way": ''
params:{
"role_name": userInfo.getUserCurrentRole().id,
"date": dayjs().format('YYYY-MM-DD')
},
advancedfilter: {
show: false,
......@@ -90,7 +80,7 @@ const refreshing = ref(false);
const onLoad = () => {
//初始化数据
api.postApiFlowViewApiFlowViewGetFlowTaskList(init.params).then(res => {
api.postApiAbnormalGetAbnormalStateInfoList(init.params).then(res => {
if (refreshing.value) {
list.value = []
refreshing.value = false;
......@@ -104,13 +94,10 @@ const onLoad = () => {
res.response.data.forEach(cur => {
list.value.push({
...cur,
imageKey: ConfigDict.flowActionType[cur.action_type],
actionTypeText: ConfigDict.flowState[cur.status]
});
})
loading.value = false;
init.params.page_index++
refreshing.value = false;
})
};
......@@ -456,29 +443,42 @@ function eltDetails(){
//详情
hooks.go2Router('abnormalStateOfStudentDetail')
}
function getData(){
hooks.myEncapsulationFunction(()=>{
return api.postApiAbnormalGetAbnormalStateInfoList(init.params).then(res => {
list.value = res.response
return res
})
},true,'加载中...')
}
function onConfirm(e){
//日期
init.date.showDate =dayjs(e).format('YYYY年MM月DD日')
init.params.date =dayjs(e).format('YYYY-MM-DD')
getData()
init.date.show =false
}
onMounted(() => {
routerCarryConditionQuery()
searchCommonData()
otherReset()
// routerCarryConditionQuery()
// searchCommonData()
// otherReset()
getData()
document.title = '学生异常状态预警列表'
})
</script>
<template>
<!-- 日期查询 -->
<!-- <cs-pop-up :height="83" :show="init.date.show" :closeable="true" @close="()=>init.date.show = false">
<cs-pop-up :height="83" :show="init.date.show" :closeable="true" @close="()=>init.date.show = false">
<template #content>
<div class="w-full h-[90%] bg-gray-100 overflow-y-auto ">
<van-calendar
:allow-same-day="true"
:close-on-click-overlay="true"
:maxDate="init.maxDate"
:minDate="init.minDate"
:poppable="false"
type="range"
@confirm="onConfirm"/>
</div>
</template>
</cs-pop-up>-->
</cs-pop-up>
<div class="w-screen h-screen bg-gray-100 box-border relative">
<!-- header h-54px-->
<!-- 顶部栏目 -->
......@@ -495,9 +495,7 @@ onMounted(() => {
<div class="w-[45%] h-full ccFlex">
<div class="text-[14px] h-[48px] flex justify-center items-center bg-white"
@click="init.date.show = true">
<span>{{
'2024年11月24日'
}}<van-icon class="ml-1" name="setting"/></span>
<span>{{init.date.showDate}}<van-icon class="ml-1" name="setting"/></span>
</div>
</div>
</div>
......@@ -506,44 +504,35 @@ onMounted(() => {
<!-- content-->
<div class="w-full h-[calc(100%-65px)] p-3 overflow-y-auto ">
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div v-for="item in list" :key="item" :title="item" class="w-full min-h-[100px]">
<div @click="eltDetails(item)" class="w-full min-h-[100px] bg-white rounded-[8px] mb-4 ">
<div class=" p-3 w-full min-h-[60%]">
<div class="w-full min-h-[30px] flex">
<div class="w-full h-full">
<span class="text-gray-600">异常状态:未归</span>
</div>
</div>
<div class="w-full min-h-[30px] flex">
<div class="w-fullh-full">
<span class="text-gray-600">时间区间:2024年11月24日 7:00-23:00</span>
</div>
</div>
<div class="w-full min-h-[30px] flex">
<div class="w-full h-full">
<span class="text-gray-600">异常人数:30人</span>
</div>
</div>
<div class="w-full min-h-[30px] flex">
<div class="w-full h-full">
<span class="text-gray-600">干预统计:已干预10人,未干预20人</span>
</div>
</div>
<div v-for="item in list" :key="item" :title="item" class="w-full min-h-[100px]">
<div @click="eltDetails(item)" class="w-full min-h-[100px] bg-white rounded-[8px] mb-4 ">
<div class=" p-3 w-full min-h-[60%]">
<div class="w-full min-h-[30px] flex">
<div class="w-full h-full">
<span class="text-gray-600">异常状态:未归</span>
</div>
<div class=" text-blue-600 p-3 w-full h-[22%] border-t-[1px] flex justify-center">
查看
</div>
<div class="w-full min-h-[30px] flex">
<div class="w-fullh-full">
<span class="text-gray-600">时间区间:2024年11月24日 7:00-23:00</span>
</div>
</div>
<div class="w-full min-h-[30px] flex">
<div class="w-full h-full">
<span class="text-gray-600">异常人数:30人</span>
</div>
</div>
<div class="w-full min-h-[30px] flex">
<div class="w-full h-full">
<span class="text-gray-600">干预统计:已干预10人,未干预20人</span>
</div>
</div>
</div>
</van-list>
</van-pull-refresh>
<div class=" text-blue-600 p-3 w-full h-[22%] border-t-[1px] flex justify-center">
查看
</div>
</div>
</div>
<div class="w-full h-[60px] bg-gray-100"></div>
</div>
......
......@@ -3,15 +3,15 @@
import {getImage, go2Router} from "@/hooks/index.js";
import {ref, defineEmits, onMounted, reactive} from "vue";
import router from "@/router/index.js";
import CommonDataRequest from "@/api/commonDataRequest/systemSelf/index.js";
import * as api from '@/api/dist/controller/index.js'
import * as hooks from '@/hooks/index.js'
import * as config from "@/config/index.js";
import VersionValue from "@/config/modules/version.js";
import dayjs from "dayjs";
import {useUserInfo} from "@/store/modules/user.js";
const userInfo = useUserInfo()
const emit = defineEmits(['getTabBarIndex'])
const active = ref(0);
const init = reactive({
dataCount:{},
roomType: {
value: '',
columns: [],
......@@ -29,12 +29,10 @@ const init = reactive({
data: {
array: []
},
params: {
"room_name": "",
"room_type_id": "",
"sex": "",
"page_index": 1,
"page_size": 10,
showDate:dayjs().format('YYYY年MM月DD日'),
params:{
"role_name": userInfo.getUserCurrentRole().id,
"date": dayjs().format('YYYY-MM-DD')
},
advancedfilter: {
show: false,
......@@ -48,7 +46,7 @@ const refreshing = ref(false);
const onLoad = () => {
//初始化数据
api.postApiRoomGetRoomList(init.params).then(res => {
api.postApiAbnormalGetAbnormalCount(init.params).then(res => {
if (refreshing.value) {
list.value = []
refreshing.value = false;
......@@ -158,9 +156,17 @@ function go2(routerPath) {
name: routerPath
})
}
function getData(){
hooks.myEncapsulationFunction(()=>{
return api.postApiAbnormalGetAbnormalCount(init.params).then(res => {
//获取数据看板 数据
init.dataCount = res.response
return res
})
},true,'加载中')
}
onMounted(() => {
getData()
})
</script>
......@@ -252,8 +258,7 @@ onMounted(() => {
<div class="w-full p-3 h-[calc(100%-66px)] relative box-border">
<p v-font:{size:17,family:`黑体`,color:`#323233`} class="my-3">2024年11月24日数据看板</p>
<p v-font:{size:17,family:`黑体`,color:`#323233`} class="my-3">{{init.showDate}}数据看板</p>
<div
class="mb-3 w-full flex flex-nowrap justify-between">
<van-cell-group
......@@ -262,19 +267,22 @@ onMounted(() => {
inset>
<div class=" text-white h-full ">
<div v-font:{size:18,family:`黑体`,color:`#3D9DE8`} class="font-bold">
{{ 66 }}人
{{ init.dataCount.wg_num }}人
</div>
<div v-font:{size:16,family:`黑体`,color:`#323233`}>未归</div>
</div>
<img :src="getImage('hb19')" class="ml-5 w-[30px] h-[30px]">
</van-cell-group>
<van-cell-group
:style="{'margin':'0 !important'}"
class="w-[48.5%] p-3 min-h-[75px] flex items-center justify-between "
inset>
<div class=" text-white h-full ">
<div v-font:{size:18,family:`黑体`,color:`#9190EF`} class="font-bold">
{{ 66 }}人
{{ init.dataCount.wwg_num }}人
</div>
<div v-font:{size:16,family:`黑体`,color:`#323233`}>晚归</div>
</div>
......@@ -289,7 +297,8 @@ onMounted(() => {
inset>
<div class=" text-white h-full ">
<div v-font:{size:18,family:`黑体`,color:`#F8B55B`} class="font-bold">
{{ 66 }}人
{{ init.dataCount.zywg_num }}人
</div>
<div v-font:{size:16,family:`黑体`,color:`#323233`}>整夜未归</div>
</div>
......@@ -301,7 +310,7 @@ onMounted(() => {
inset>
<div class=" text-white h-full ">
<div v-font:{size:18,family:`黑体`,color:`#4DD88F`} class="font-bold">
{{ 66 }}人
{{ init.dataCount.wjc_num }}人
</div>
<div v-font:{size:16,family:`黑体`,color:`#323233`}>24小时未进出</div>
</div>
......@@ -316,7 +325,7 @@ onMounted(() => {
inset>
<div class=" text-white h-full ">
<div v-font:{size:18,family:`黑体`,color:`#5DC2FF`} class="font-bold">
{{ 66 }}人
{{ init.dataCount.zc_num }}人
</div>
<div v-font:{size:16,family:`黑体`,color:`#323233`}>早出</div>
</div>
......
......@@ -6,7 +6,7 @@ import * as crypt from '@/crypto/index.js'
* 用户状态管理
* */
export const useUserInfo = defineStore({
id: 'competitionUserInfo',
id: 'dormitoryLargeScreenStudentInterventionWXUserInfo',
state: () => ({
tokenInfo: {
access_token: {
......@@ -19,6 +19,7 @@ export const useUserInfo = defineStore({
}
},
userInfo: {},
role:[],
currentRole: {}
}),
actions: {
......@@ -47,6 +48,14 @@ export const useUserInfo = defineStore({
//设置用户信息
this.currentRole = response
},
getUserRole() {
//获取用户信息
return this.role
},
setUserRole(response) {
//设置用户信息
this.role = response
},
getUserInfo() {
//获取用户信息
return this.userInfo
......@@ -54,7 +63,7 @@ export const useUserInfo = defineStore({
},
getters: {},
persist: {
paths: ["tokenInfo", "userInfo", "currentRole"]
paths: ["tokenInfo", "userInfo", "currentRole","role"]
}
})
......
......@@ -115,7 +115,7 @@ export default defineConfig({
port: 8991,
open: true, //自动打开
proxy: {
'/competition': {
'/dormmanage': {
target: "https://asc.hnasct.cn/", // 真实接口地址, 后端给的基地址
changeOrigin: true, // 允许跨域
},
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或