提交 1801a486 编写于 作者: 刘英杰's avatar 刘英杰

V20240515 保存项目框架

上级 26c0dba7
......@@ -8,7 +8,7 @@ stages:
build:
stage: publish
script:
- remove-item -Force -Recurse D:\ASC_web\A00051\placeManagement\wx*
- xcopy "dist" "D:\ASC_web\A00051\placeManagement\wx\" /s/e/y/
- remove-item -Force -Recurse D:\ASC_web\A00051\occupancyManagement\wx*
- xcopy "dist" "D:\ASC_web\A00051\occupancyManagement\wx\" /s/e/y/
only:
- wx
# Vue 3 + Vite
# HY占座系统移动端
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.
### 项目成员
应洁;梁嘉显;刘英杰;
### 系统业务设计相关文档
![img.png](src/static/markdownImage/img.png)
### 前端相关技术栈:
Vue 3 + Vite + Pinia + TailwindCss +Vant4 + nodejs:20.11.1 + npm
### 安装依赖失败(冲突)尝试命令:
npm install --force
或
npm install --legacy-peer-deps
### swagger接口自动爬取命令:
zerone api -js -d -p src/api
### 157部署文件存放地址:
D:\ASC_web\A00051\occupancyManagement\wx
## 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).
此差异已折叠。
{
"name": "site-management",
"name": "occcupancy-management",
"private": true,
"version": "0.0.0",
"type": "module",
......@@ -10,7 +10,6 @@
},
"dependencies": {
"@ysx-libs/vue-virtual-tree": "^0.0.5",
"@zeronejs/cli": "^2.15.0",
"animate.css": "^4.1.1",
"axios": "^1.5.0",
"dayjs": "^1.11.9",
......@@ -19,7 +18,6 @@
"jweixin-module": "^1.6.0",
"liquor-tree": "^0.2.70",
"lodash": "^4.17.21",
"mitt": "^3.0.1",
"vant": "^4.6.6",
"vconsole": "^3.15.1",
"view-ui-plus": "^1.3.15",
......@@ -27,7 +25,10 @@
"vue-cookies": "^1.8.3",
"vue-qr": "^4.0.9",
"vue-router": "^4.2.4",
"weixin-js-sdk": "^1.6.0"
"weixin-js-sdk": "^1.6.0",
"@zeronejs/cli": "^3.2.2",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.2.3",
......@@ -37,6 +38,6 @@
"postcss": "^8.4.32",
"tailwindcss": "^3.4.0",
"unplugin-vue-components": "^0.25.1",
"vite": "^4.4.5"
"vite": "^5.1.4"
}
}
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";
/**
* 获取 整体框架 文件
* /api/DbFirst/GetFrameFiles
*/
export declare function getApiDbFirstGetFrameFiles(config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeepRequired<boolean>, any>>;
import request from "@/util/axios.js";
/**
* 获取 整体框架 文件
* /api/DbFirst/GetFrameFiles
*/
export function getApiDbFirstGetFrameFiles(config) {
return request.get(`/api/DbFirst/GetFrameFiles`, config);
}
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";
/**
* 获取 IRepository 层文件
* /api/DbFirst/GetIRepositoryFiles
*/
export declare function getApiDbFirstGetIRepositoryFiles(config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeepRequired<boolean>, any>>;
import request from "@/util/axios.js";
/**
* 获取 IRepository 层文件
* /api/DbFirst/GetIRepositoryFiles
*/
export function getApiDbFirstGetIRepositoryFiles(config) {
return request.get(`/api/DbFirst/GetIRepositoryFiles`, config);
}
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";
/**
* 获取 IService 层文件
* /api/DbFirst/GetIServiceFiles
*/
export declare function getApiDbFirstGetIServiceFiles(config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeepRequired<boolean>, any>>;
import request from "@/util/axios.js";
/**
* 获取 IService 层文件
* /api/DbFirst/GetIServiceFiles
*/
export function getApiDbFirstGetIServiceFiles(config) {
return request.get(`/api/DbFirst/GetIServiceFiles`, config);
}
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";
/**
* 获取 Model 层文件
* /api/DbFirst/GetModelFiles
*/
export declare function getApiDbFirstGetModelFiles(config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeepRequired<boolean>, any>>;
import request from "@/util/axios.js";
/**
* 获取 Model 层文件
* /api/DbFirst/GetModelFiles
*/
export function getApiDbFirstGetModelFiles(config) {
return request.get(`/api/DbFirst/GetModelFiles`, config);
}
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";
/**
* 获取 Repository 层文件
* /api/DbFirst/GetRepositoryFiles
*/
export declare function getApiDbFirstGetRepositoryFiles(config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeepRequired<boolean>, any>>;
import request from "@/util/axios.js";
/**
* 获取 Repository 层文件
* /api/DbFirst/GetRepositoryFiles
*/
export function getApiDbFirstGetRepositoryFiles(config) {
return request.get(`/api/DbFirst/GetRepositoryFiles`, config);
}
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";
/**
* 获取 Services 层文件
* /api/DbFirst/GetServicesFiles
*/
export declare function getApiDbFirstGetServicesFiles(config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeepRequired<boolean>, any>>;
import request from "@/util/axios.js";
/**
* 获取 Services 层文件
* /api/DbFirst/GetServicesFiles
*/
export function getApiDbFirstGetServicesFiles(config) {
return request.get(`/api/DbFirst/GetServicesFiles`, config);
}
export * from "./getApiDbFirstGetFrameFiles";
export * from "./getApiDbFirstGetModelFiles";
export * from "./getApiDbFirstGetIRepositoryFiles";
export * from "./getApiDbFirstGetIServiceFiles";
export * from "./getApiDbFirstGetRepositoryFiles";
export * from "./getApiDbFirstGetServicesFiles";
export * from "./getApiDbFirstGetFrameFiles";
export * from "./getApiDbFirstGetModelFiles";
export * from "./getApiDbFirstGetIRepositoryFiles";
export * from "./getApiDbFirstGetIServiceFiles";
export * from "./getApiDbFirstGetRepositoryFiles";
export * from "./getApiDbFirstGetServicesFiles";
......@@ -9,19 +9,12 @@ export declare function getApiGetTokenInfo(config?: AxiosRequestConfig): Promise
msg: string;
msg_detail: string;
response: {
userid: string;
cardNumber: string;
name: string;
organize: string;
role: any[];
type: any;
roleAndPower: {
role_name: string;
role_id: string;
powers: string[];
menus: {
menuid: string;
menu_name: string;
menu_path: string;
}[];
}[];
openId: string;
phone: string;
};
}, any>>;
import request from "../../../../axios.js";
import request from "@/util/axios.js";
/**
* Token解析
* /api/GetTokenInfo
......
import request from "../../../../axios.js";
import request from "@/util/axios.js";
/**
* 刷新Token
* /api/RefreshToken
......
export * from "./getApiGetTokenInfo";
export * from "./getApiRefreshToken";
export * from "./getApiGetTokenInfo";
export * from "./getApiRefreshToken";
export * from "./DbFirst";
export * from "./Login";
export * from "./DbFirst";
export * from "./Login";
import {requestGet, requestPost} from '../util/request.js'
import axios from 'axios'
export function ImageUpLoad(data) {
//照片上传
return requestPost(`/api/Attendance/ImageUpLoad`, data)
}
/**
* 单点
* **/
export function wxsan(data) {
//单点
return requestGet(`/api/sso/wxsan?&code=${data.code}&sign=${data.sign}&timestamp=${data.timestamp}`, data)
}
export function wx(data) {
//单点
return requestGet(`/api/sso/wx?token=${data.token}`, data)
}
export function SSOPC(data) {
//单点
return requestGet(`/api/sso/pc?token=${data.token}`, data)
}
export function GetTokenInfo(data) {
//获取用户信息
return requestGet(`/api/GetTokenInfo`, data)
}
export function RefreshToken(data) {
//刷新token
return requestGet(`/api/RefreshToken`, data)
}
export function CheckLoginTest(data) {
//test token
return requestGet(`/api/Login/CheckLoginTest?card=asc666`, data)
}
// syjs516
export function GetWxConfig(data) {
//微信扫码初始化
return requestGet(
`${window.location.protocol + "//" + window.location.host}/wx/eicrs/api/GetJSSDK/GetWxConfig?url=${data.url}`,
data
);
}
import { type UserType, type RoleAndPowerViewModel } from "../../interface";
import { type ScoreRoleType, type UserType } from "../../interface";
export interface UserJwtViewModel {
userid?: string;
cardNumber?: string;
name?: string;
organize?: string;
role?: ScoreRoleType[];
type?: UserType;
roleAndPower?: RoleAndPowerViewModel[];
openId?: string;
phone?: string;
}
export * from "./apiTypes/ScoreRoleType";
export * from "./apiTypes/UserType";
export * from "./apiTypes/UserJwtViewModel";
export * from "./apiTypes/UserJwtViewModelMessageModel";
export * from "./apiTypes/TokenViewModel";
export * from "./apiTypes/TokenViewModelMessageModel";
export type Primitive = undefined | null | boolean | string | number | symbol;
export type DeepRequired<T> = T extends Primitive ? T : keyof T extends never ? T : {
[K in keyof T]-?: DeepRequired<T[K]>;
};
export * from "./apiTypes/ScoreRoleType";
export * from "./apiTypes/UserType";
export * from "./apiTypes/UserJwtViewModel";
export * from "./apiTypes/UserJwtViewModelMessageModel";
export * from "./apiTypes/TokenViewModel";
export * from "./apiTypes/TokenViewModelMessageModel";
{
"docsUrl": "https://asc.hnasct.cn/occupyseat/swagger/Dormitoryscore/swagger.json",
"axiosInstanceUrl": "@/util/axios.js"
}
......@@ -24,7 +24,7 @@
</template>
<script setup>
import {onMounted, reactive} from "vue";
import * as api from "../../util/request/dist/controller/index.js";
import * as api from "../../api/dist/controller/index.js";
const init = reactive({
timeRange: false,
......
......@@ -165,7 +165,7 @@
</template>
<script setup>
import {computed, getCurrentInstance, onMounted, reactive, ref, watch} from "vue";
import * as api from "../../util/request/dist/controller/index.js";
import * as api from "../../api/dist/controller/index.js";
import {showNotify} from "vant";
import dayjs from "dayjs";
import * as _ from "lodash";
......
......@@ -32,7 +32,7 @@
import {ref, defineProps, reactive, defineEmits} from 'vue'
import {getImage} from "../../hooks/index.js";
import Cookies from "js-cookie";
import * as api from '../../util/request/dist/controller/index.js'
import * as api from '../../api/dist/controller/index.js'
import * as hooks from '../../hooks/index.js'
const checked = reactive({
......
import router from "../router/index.js";
import * as images from '../states/index.js'
import router from "@/router/index.js";
import * as images from '@/static/index.js'
import {showConfirmDialog, showNotify} from "vant";
import 'vant/lib/index.css';
import Cookies from "js-cookie";
import * as api from '../util/request/dist/controller/index.js'
import * as api from '@/api/dist/controller/index.js'
export const getImage = (imageName) => {
//通过 imageName 参数 获取图片
......
......@@ -5,48 +5,46 @@ import router from "./router/index.js";
import 'animate.css' //引入
import VueCookies from 'vue-cookies'
import VConsole from 'vconsole';
import mitt from "mitt";
import '@ysx-libs/vue-virtual-tree/style.css';
import vueQr from 'vue-qr/src/packages/vue-qr.vue'
//活动管理各状态 头部、分页、弹窗、卡片
import csHeader from '../src/components/header.vue'
import csCard from '../src/components/card.vue'
import csPage from '../src/components/page.vue'
import csPopUp from '../src/components/popup.vue'
import csSiteCard from './components/siteCard.vue'
import csSiteSelectHeader from './components/siteSelectHeader.vue'
import csFlowCard from './components/flowCard.vue'
import csBorrowingAndReturningListCard from '../src/components/key/borrowingAndReturningListCard.vue'
import csHeader from '@/components/header.vue'
import csCard from '@/components/card.vue'
import csPage from '@/components/page.vue'
import csPopUp from '@/components/popup.vue'
import csSiteCard from '@/components/siteCard.vue'
import csSiteSelectHeader from '@/components/siteSelectHeader.vue'
import csFlowCard from '@/components/flowCard.vue'
import csBorrowingAndReturningListCard from '@/components/key/borrowingAndReturningListCard.vue'
//活动管理详情页 栏目
import csActivityData from '../src/pages/welcome/compontes/detail/components/activityData.vue'
import csComment from '../src/pages/welcome/compontes/detail/components/comment.vue'
import csPlayers from '../src/pages/welcome/compontes/detail/components/players.vue'
import csTrack from '../src/pages/welcome/compontes/detail/components/track.vue'
import csKey from '../src/pages/welcome/compontes/detail/components/key.vue'
import csKeyQrCode from '../src/pages/keyManagement/components/keyQrcode.vue'
import dtCard from '../src/components/activityManagementDetail/detailCard.vue'
import csChooseImage from '../src/pages/welcome/compontes/wxChooseImage/indx.vue'
import csActivityData from '@/pages/welcome/compontes/detail/components/activityData.vue'
import csComment from '@/pages/welcome/compontes/detail/components/comment.vue'
import csPlayers from '@/pages/welcome/compontes/detail/components/players.vue'
import csTrack from '@/pages/welcome/compontes/detail/components/track.vue'
import csKey from '@/pages/welcome/compontes/detail/components/key.vue'
import dtCard from '@/components/activityManagementDetail/detailCard.vue'
import csChooseImage from '@/pages/welcome/compontes/wxChooseImage/indx.vue'
//统一封装和解耦的文件供全局使用 图片、自定义hooks、接口
import * as images from './states/index.js'
import * as hooks from './hooks/index.js'
import * as api from "../src/util/request/dist/controller/index.js"
import csKeyCard from '../src/components/key/keyCard.vue'
import * as images from '@/static/index.js'
import * as hooks from '@/hooks/index.js'
import * as api from "@/api/dist/controller/index.js"
import csKeyCard from '@/components/key/keyCard.vue'
const backAscHome = () => {
//基于用户权限返回对应OA主页
hooks.getRole() ? window.location.href = "/TeacherMobOA" : window.location.href = "/StudentMobileOA"
}
export const app = createApp(App)
import LiquorTree from 'liquor-tree'
initStore(app)
app.component('LiquorTree', LiquorTree)
import {Tree} from 'view-ui-plus';
import 'view-ui-plus/dist/styles/viewuiplus.css'
import {initStore} from "@/store/index.js";
app.component('Tree', Tree);
//使用测试按钮Vxonsole
......@@ -68,8 +66,6 @@ app.config.globalProperties.images = images
//封装hooks 文件 挂载全局
app.config.globalProperties.hooks = hooks
//通过mitt 实现全局事件总线
app.config.globalProperties.$bus = new mitt()
app.component('csHeader', csHeader)
app.component('csCard', csCard)
......@@ -79,11 +75,9 @@ app.component('csSiteCard', csSiteCard)
app.component('csSiteSelectHeader', csSiteSelectHeader)
app.component('csFlowCard', csFlowCard)
app.component('csKeyCard', csKeyCard)
app.component('csKeyQrCode', csKeyQrCode)
app.component('csBorrowingAndReturningListCard', csBorrowingAndReturningListCard)
app.component('csChooseImage', csChooseImage)
// 活动管理卡片列表详情页
app.component('csActivityData', csActivityData) //活动数据
app.component('csComment', csComment) //评价
......
......@@ -2,16 +2,12 @@
<div style="display: flex; justify-content: center; margin-top: 50%">
<van-loading size="38px" color="#1989fa" vertical> 登录中</van-loading>
</div>
<!-- {{router.currentRoute.value.query.token}}-->
</template>
<script setup>
// import router from "../router/index.js";
import Cookies from 'js-cookie'
import {useRouter} from 'vue-router'
import {onMounted} from 'vue'
import * as api from '../api/index.js'
import {CheckLoginTest} from "../api/index.js";
import * as api from '@/api/dist/controller/index.js'
const router = useRouter()
const getTokenAction = async (date) => {
......@@ -109,7 +105,6 @@ const getToken = async () => {
}
onMounted(() => {
getToken()
})
</script>
......@@ -3,10 +3,9 @@
<div style="display: flex; justify-content: center; margin-top: 50%">
<van-loading size="38px" color="#1989fa" vertical> 登录中</van-loading>
</div>
<!-- {{router.currentRoute.value.query.token}}-->
</template>
<script setup>
// import router from "../router/index.js";
import Cookies from 'js-cookie'
import {useRouter} from 'vue-router'
import {onMounted} from 'vue'
......@@ -119,10 +118,8 @@ const getToken = async () => {
//使用策略
policyObject[router.currentRoute.value.query.type]()
}
onMounted(() => {
getToken()
})
</script>
<script setup>
import {onMounted, ref} from "vue";
onMounted(() => {
// window.location.href = 'https://asc.hnasct.cn/flow/WF/MyFlow.htm?FK_Flow=439&flowtype=newflow'
})
const src = ref('https://asc.hnasct.cn/flow/WF/MyFlow.htm?FK_Flow=439&flowtype=newflow')
</script>
<template>
<div>
<!-- <iframe :src="src"-->
<!-- class="w-screen h-screen"></iframe>-->
</div>
</template>
<style scoped>
</style>
<!--扫码跳转的钥匙详细页 用于选中钥匙 借出 或归还-->
<template>
<div class="w-screen h-screen bg-gray-100 box-border relative">
<!-- header h-54px-->
<!-- <cs-header :path="'myActivity'" @search-fun="searchFun"></cs-header>-->
<div class="w-full h-[54px] flex bg-white">
<div class=" w-full h-full flex items-center justify-center">
<span>钥匙借还记录详情 </span>
</div>
</div>
<!-- content-->
<div class="w-full h-[calc(100vh-109px)] overflow-y-auto">
<div v-for="(item,index) in init.array" :key="index">
<!-- 钥匙详情-->
<dt-card :array="item"></dt-card>
</div>
</div>
<!-- footer h-55px-->
<div class="w-full h-[55px] bg-white flex items-center justify-around shadow shadow-gray-600">
<van-button v-if="init.key.state !==2" @click="keyOut" type="primary" round class="w-[45%] text-gray-600" plain>
{{ ['借出', '归还',][init.key.state] }}
</van-button>
<van-button class="w-[45%]" round @click="router.push({name:'keyManagement'})">取消</van-button>
</div>
</div>
<cs-pop-up :show="init.key.show" :height="90">
<template #content>
<!-- //钥匙卡片-->
<div class="w-full h-[90%] bg-gray-100 overflow-y-auto p-3">
<cs-key-card ref="lendOrReturnKeysRef"
:array="init.key.array"
:keyTrackId="init.key.key_track_id"
:lenOrReturnKeyStateValue="init.key.lenOrReturnKeyStateValue"
@keyOut="keyOut"
@getData="getData"
></cs-key-card>
</div>
<div class="w-full h-[10%] flex items-center justify-between p-3 shadow-gray-600 shadow">
<van-button style="width: 48%" round block @click="init.key.show = false;">关闭</van-button>
<van-button style="width: 48%" round block type="primary" @click="lendOrReturnKeys">提交</van-button>
</div>
</template>
</cs-pop-up>
</template>
<script setup>
import spzlogo from '../../../../states/icon/ing.png'
import {ref, defineAsyncComponent, getCurrentInstance, reactive, onMounted, inject} from 'vue'
import router from "../../../../router/index.js";
import * as api from '../../../../../src/util/request/dist/controller/index.js'
import * as hooks from "../../../../hooks/index.js";
import {getImage} from "../../../../hooks/index.js";
import CsKeyCard from "../../../../components/key/keyCard.vue";
const asc = getCurrentInstance().appContext.config.globalProperties
const checked = ref('1');
function back() {
router.push({
name: 'welcome'
})
}
const init = reactive({
data: {
array: []
},
place: {
id: ''
},
key: {
lenOrReturnKeyStateValue: '',
state: '',
key_track_id: '',
array: [],
show: false,
init: {
"code_name": "",
"place_id": asc.$route.query.place_id,
"state": "",
"page_index": 1,
"page_size": 10
}
}
})
const detail = (e) => {
router.push({
name: 'indexDetail',
query: {
id: e
}
})
}
function cancel(id) {
//取消活动
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(async () => {
const res = await api.getApiActivityActivityCancel({id: id})
if (res.code === 1) getData()
return res
})
})
}
const searchCondition = reactive({
data: {
"name": "",
"state": 1,
"page_index": 1,
"page_size": 10,
'total': 0,
}
})
let lendOrReturnKeysRef = ref(null)
function lendOrReturnKeys() {
//借出钥匙
lendOrReturnKeysRef.value.lendOrReturnKeys()
}
function keyOut() {
//获取钥匙场地列表 用于借出
init.key.show = true
hooks.getInitListRequest(() => {
api.postApiKeyGetKeyList(init.key.init).then(res => {
init.key.array = res.response.data
})
})
}
function searchFun(e) {
//搜索框事件回调 点击icon 提供searchValue
searchCondition.data.name = e
getData()
}
function pageChange(e) {
//分页 通过组件获取当前页
searchCondition.data.page_index = e
getData()
}
function getData() {
//初始化数据
hooks.getInitListRequest(() => {
api.getApiKeyGetKeyTrackInfoByActivity({
activity_id: asc.$route.query.activity_id,
}).then(res => {
if (res.response) {
let array = []
//获取此项相关输入 插入数组
array.push(
[
{label: '活动申请人姓名', value: res.response.name},
{label: '活动申请人卡号', value: res.response.card},
{label: '钥匙编号', value: res.response.key_code},
{label: '钥匙名称', value: res.response.key_name},
{label: '借用状态', tag: hooks.store.activityKey(res.response.state)},
],
[
{label: '借用人', value: res.response.borrow_card},
{label: '借用人卡号', value: res.response.borrow_name},
{label: '借出时间', value: res.response.borrow_time},
{label: '借出操作人', value: res.response.borrow_operate_card},
],
[
{label: '归还人', value: res.response.return_card},
{label: '归还人卡号', value: res.response.return_name},
{label: '归还时间', value: res.response.return_time},
{label: '归还操作人', value: res.response.return_operate_card},
],
)
//获取处理完的数组
init.array = array
//获取钥匙轨迹id
init.key.key_track_id = res.response.id
//获取钥匙状态 进行借还判断 state === 1 传2 表 归还 state === 0 传1 表 借用
init.key.state = res.response.state //按钮鉴别
//借出归还状态
if (res.response.state === 0) init.key.lenOrReturnKeyStateValue = 1
if (res.response.state === 1) init.key.lenOrReturnKeyStateValue = 2
}
})
})
}
onMounted(() => {
getData()
})
</script>
<style scoped>
</style>
<template>
<div class="w-screen h-screen bg-gray-200">
<div class="w-full h-[54px] flex bg-white">
<div class=" w-full h-full flex items-center justify-center">
<span>借还钥匙详情</span>
</div>
</div>
<div class="
w-full
min-h-[calc(100%-109px)]
overflow-y-auto
flex content-start
flex-wrap
bg-gray-200
">
<dt-card v-for="(item,index) in init.array" :key="index" :array="item"></dt-card>
</div>
<div class="w-full h-[55px] shadow bg-white shadow-gray-600 flex justify-center items-center">
<van-button type="default" round class="w-[48%]" @click="$router.back()">返回</van-button>
</div>
</div>
</template>
<script setup>
import {onMounted, defineProps, getCurrentInstance, reactive} from "vue";
import * as api from '../../../../util/request/dist/controller/index.js'
import * as hooks from '../../../../hooks/index.js'
const asc = getCurrentInstance().appContext.config.globalProperties
const init = reactive({
data: {
initDataKeys: [
//决定插入数据顺序
],
values: [],
title: [],
},
useKeys: [
//想要的数据key 数组 标识作用 不决定插入数据顺序
[],
],
array: [
//处理完的完整数组,给到组件输出
]
})
function getData() {
//初始化数据
hooks.getInitListRequest(() => {
api.getApiKeyGetKeyTrackInfo({
id: asc.$route.query.id
}).then(res => {
if (res.response) {
return init.array.push([
{label: '钥匙名称', value: res.response.key_name},
{label: '钥匙编号', value: res.response.key_code},
{label: '可接状态', tag: ['', '借出', '归还'][res.response.state]},
],
[
{label: '借用人名称', value: res.response.borrow_name},
{label: '借用用卡号', value: res.response.borrow_card},
{label: '借出时间', value: res.response.borrow_time},
{label: '借出操作人', value: res.response.borrow_operate_card},
],
[
{label: '归还人名称', value: res.response.return_name},
{label: '归还人卡号', value: res.response.return_card},
{label: '归还时间', value: res.response.return_time},
{label: '归还操作人', value: res.response.return_operate_card},
]
)
}
})
})
}
onMounted(() => {
getData()
})
</script>
<style scoped>
</style>
<template>
<div class="w-full h-full flex items-center justify-center flex-wrap ">
<div @click="handleScanQR" class="w-[180px] h-[180px]
bg-blue-400 rounded-full
flex justify-center items-center
active:bg-blue-400
active:scale-[1.2]
">
<img :src="hooks.getImage('sys')" class="w-1/2 h-1/2">
</div>
<div>
点击“按钮”,进行钥匙二维码扫描
</div>
</div>
</template>
<script>
import * as api from '../../../api/index.js';
import wx from "weixin-js-sdk";
import {showDialog, showSuccessToast} from "vant";
import * as hooks from "../../../hooks/index.js";
export default {
computed: {
hooks() {
return hooks
}
},
data() {
return {
searchValue: "",
loading: false,
timer: '',
};
},
mounted() {
this.wxScanCode();
},
methods: {
onClickLeft() {
window.location.href = '/WX/eicrs/home/teacenter'
},
getData() {
},
// 微信初始化配置
wxScanCode() {
const params = {
url: window.location.href.replace(window.location.hash, ""),
};
api.GetWxConfig(params).then((result) => {
let data = result;
wx.config({
debug: false,
appId: data.appId, // 必填,公众号的唯一标识
timestamp: data.timeStamp, // 必填,生成签名的时间戳
nonceStr: data.nonceStr, // 必填,生成签名的随机串
signature: data.signature, // 必填,签名,见附录1
jsApiList: ["scanQRCode", "checkJsApi"],
});
wx.ready(() => {
console.log("设备已经可以使用");
});
wx.error(function (res) {
console.log("设备已经无法使用");
});
});
},
// 扫码
async handleScanQR() {
wx.scanQRCode({
needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
scanType: ["qrCode"], // 可以指定扫二维码
success: async (res) => {
window.location.href = res.resultStr
},
fail: (err) => {
alert(JSON.stringify(err))
}
});
},
},
};
</script>
<style>
</style>
<!--借用钥匙-->
<template>
<div class="w-screen h-screen bg-gray-100 box-border">
<!-- header-->
<cs-header :path="'keyManagement'" @search-fun="searchFun"></cs-header>
<!-- content-->
<div class="w-full h-[calc(100vh-109px)] p-3 overflow-y-auto">
<div v-for="(item,index) in init.data.array" :key="index">
<cs-card :item="item">
<template v-slot:image>
<img :src="dsy">
</template>
<template v-slot:default>
<div class="w-full flex justify-between items-center">
<van-button @click="inKey(item)" class="w-[48%]" plain size="small"
:type="['primary','success','warning'][item.key_state]">
{{ ['生成借用钥匙二维码', '生成归还钥匙二维码', '已归还'][item.key_state] }}
</van-button>
<van-button @click="detail(item.id)" class="w-[48%] text-gray-600" plain size="small">详情</van-button>
</div>
</template>
</cs-card>
</div>
</div>
<!-- footer-->
<cs-page :total="searchCondition.data.total" @pageChange="pageChange"></cs-page>
</div>
<!-- 须知-->
<van-dialog v-model:show="init.key.show" title="钥匙信息二维码">
<div class="flex justify-center items-center w-full ">
<vue-qr
:text="init.key.src"
:size="200"></vue-qr>
</div>
<template #footer>
<div class="w-full h-[60px] flex justify-center items-center border border-solid">
<van-button style="width: 90%" type="primary" round block
@click="init.key.show = false;">关闭
</van-button>
</div>
</template>
</van-dialog>
</template>
<script setup>
import dsy from '../../states/icon/await.png'
import {ref, defineAsyncComponent, getCurrentInstance, reactive, onMounted} from 'vue'
import router from "../../router/index.js";
import * as api from "../../util/request/dist/controller/index.js";
import * as hooks from "../../hooks/index.js";
import CsKeyCard from "../../components/key/keyCard.vue";
import CsKeyQrCode from "./components/keyQrcode.vue";
import {showNotify} from "vant";
const asc = getCurrentInstance().appContext.config.globalProperties
function back() {
router.push({
name: 'welcome'
})
}
const init = reactive({
key: {
show: false,
src: '',
},
notice: {
//须知
show: false,
close: true,
s: 5,
timer: '',
content: '',
id: '',
},
page: {
//活动列表
page_index: 1,
page_size: 10,
total: 0,
},
people: {
//邀请
timer: '',
id: '',
show: false,
activeIds: [],
activeIndex: 0,
items: [
{
text: '学生',
children: [],
},
{
text: '教师',
children: [],
},
],
init: {
user_type: 0,
keyword: '',
}
},
data: {
array: []
},
adjust: {
//调动
show: false,
id: '',
formValidate: {}
},
timeRange: false,
placeType: false,
place: false,
beginTime: false,
endTime: false,
commodity: false,
date: false,
timeRangeText: '',
dateText: "",
placeTypeText: '',
placeText: '',
beginTimeText: '',
endTimeText: '',
commodityText: '',
placeTypeArray: '',
placeArray: '',
beginTimeArray: '',
endTimeArray: '',
commodityArray: [],
minDateStart: '',
maxDateStart: '',
})
const detail = (e) => {
router.push({
name: 'indexDetail',
query: {
id: e
}
})
}
function inKey(item) {
//拼接二维码链接
if (item.key_state !== 2) {
init.key.src = `/placemanage/wx/#/keyDetailInAndReturn?activity_id=${item.id}&place_id=${item.place_id}`
init.key.show = true
} else {
showNotify({type: 'danger', message: '已归还钥匙'});
}
// console.log("🚀🚀 init.key.src🚀,", init.key.src)
}
function cancel(id) {
//取消活动
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(async () => {
const res = await api.getApiActivityActivityCancel({id: id})
if (res.code === 1) getData()
return res
})
})
}
const searchCondition = reactive({
data: {
"name": "",
"state": 14,
"page_index": 1,
"page_size": 10,
'total': 0,
}
})
function searchFun(e) {
//搜索框事件回调 点击icon 提供searchValue
searchCondition.data.name = e
getData()
}
function pageChange(e) {
//分页 通过组件获取当前页
searchCondition.data.page_index = e
getData()
}
function getData() {
//初始化方法查询
hooks.getInitListRequest(() => {
api.postApiActivityGetActivityListByWxUser(searchCondition.data).then(res => {
init.data.array = res.response.data
searchCondition.data.total = res.response.data_count
})
})
}
onMounted(() => {
getData()
document.title = '借还钥匙'
})
</script>
<style scoped>
</style>
<template>
<div class="container1">
<div class="header flex justify-center content-start flex-wrap ">
<div class="mb-3 flex 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: 22px;font-weight: bold" name="wap-home-o"/>
</div>
</div>
<div class="w-1/2 h-full flex justify-end items-center">
<div class="mx-2">
<div class="font-bold ml flex justify-end">{{ hooks.getUserInfo().name }}</div>
<div class="text-[14px] text-neutral-400">{{ hooks.getUserInfo().card_number }}</div>
</div>
<div>
<van-image
round
width="40px"
height="40px"
:src="getImage('tx')"
/>
</div>
</div>
</div>
<!-- 钥匙借用-->
<div class="mb-3 w-full flex flex-nowrap justify-between">
<van-cell-group v-if="!hooks.getRole()" @click="keyManagement('borrowAKey')" inset
class="w-full h-[70px] eee flex items-center ">
<img :src="getImage('jieyongyaoshi')" class="ml-5 w-[35px] h-[35px]">
<div class="ml-3 text-white font-bold">借还钥匙</div>
</van-cell-group>
<van-cell-group v-if="hooks.getRole()" @click="keyManagement('borrowAKey')" inset
class="w-[48%] h-[70px] aaa flex items-center ">
<img :src="getImage('jieyongyaoshi')" class="ml-5 w-[35px] h-[35px]">
<div class="ml-3 text-white font-bold">借还钥匙</div>
</van-cell-group>
<!-- <van-cell-group @click="keyManagement('returnTheKey')" v-if="true" inset-->
<!-- class="w-[48%] h-[70px] bbb flex items-center ">-->
<!-- <img :src="getImage('guihuanyaoshi')" class="ml-5 w-[35px] h-[35px]">-->
<!-- <div class="ml-3 text-white font-bold">归还钥匙</div>-->
<!-- </van-cell-group>-->
<van-cell-group v-if="hooks.getRole()" @click="keyManagement('keyScanCode')" inset
class="w-[48%] h-[70px] bbb flex items-center ">
<img :src="getImage('guihuanyaoshi')" class="ml-5 w-[35px] h-[35px]">
<div class="ml-3 text-white font-bold">钥匙扫码</div>
</van-cell-group>
</div>
<!-- 钥匙借还记录-->
<div v-if="hooks.getRole()" @click="asc.hooks.go2Router('keyLoanAndReturnRecord')"
class="mb-3 ccc w-full bg h-[70px] flex items-center bg-white rounded-[9px] bg-cover">
<img :src="getImage('yaoshilogo')" class="ml-5 w-[40px] h-[40px]">
<div class="w-[220px] h-full flex items-center">
<div class=" h-[40px]">
<span class="ml-3 text-white text-[15px] font-bold">钥匙借还记录</span>
<div class=" ml-3 text-yellow-50 opacity-[0.7] text-[12px]">
<span>
钥匙借出记录 | 钥匙归还记录
</span>
</div>
</div>
</div>
<div class="w-[calc(100%-280px)]">
<div class="ml-3 text-white font-bold">
<div class="w-[45px] h-[20px] bg-yellow-100 rounded-[15px] flex items-center justify-center">
<span class="text-[11px] text-yellow-600 font-serif">去查看</span>
</div>
</div>
</div>
</div>
<!-- 我的借还记录-->
<div @click="asc.hooks.go2Router('myKeyLoanAndReturnRecord')"
class="mb-3 ddd w-full bg h-[70px] flex items-center bg-white rounded-[9px] bg-cover">
<img :src="getImage('wodejiehuanjilulogo')" class="ml-5 w-[40px] h-[40px]">
<div class="w-[220px] h-full flex items-center">
<div class=" h-[40px]">
<span class="ml-3 text-white text-[15px] font-bold">我的借还记录</span>
<div class=" ml-3 text-blue-50 text-[12px] opacity-[0.7]">
<span class="">
我的钥匙借用记录 | 我的归还钥匙记录
</span>
</div>
</div>
</div>
<div class="w-[calc(100%-280px)]">
<div class="ml-3 text-white font-bold">
<div class="w-[45px] h-[20px] bg-blue-100 rounded-[15px] flex items-center justify-center">
<span class="text-[11px] text-blue-600 font-serif">去查看</span>
</div>
</div>
</div>
</div>
</div>
<!-- 底部菜单-->
<div class="footer ">
<van-tabbar v-model="active" @change="tabChange">
<van-tabbar-item icon="home-o">我的活动
<template #icon>
<img :src="getImage('fm')" class="w-[20px] h-[20px]"/>
</template>
</van-tabbar-item>
<van-tabbar-item icon="search">钥匙
<template #icon>
<img :src="getImage('tc')" class="w-[20px] h-[20px]"/>
</template>
</van-tabbar-item>
<van-tabbar-item icon="home-o" v-if="hooks.getRole()">活动管理
<template #icon>
<img :src="getImage('fl')" class="w-[20px] h-[20px]"/>
</template>
</van-tabbar-item>
<van-tabbar-item icon="friends-o" v-if="hooks.getRole()">场地管理
<template #icon>
<img :src="getImage('fr')" class="w-[20px] h-[20px]"/>
</template>
</van-tabbar-item>
</van-tabbar>
</div>
</div>
<!-- <van-popup-->
<!-- v-model:show="show"-->
<!-- closeable-->
<!-- position="bottom"-->
<!-- :style="{ height: '80%' }"-->
<!-- >-->
<!-- <template #default>-->
<!-- <slot name="content"></slot>-->
<!-- </template>-->
<!-- </van-popup>-->
<cs-pop-up v-if="objKey.data.borrowAKey" @borrowAKeyFalse="(e)=> objKey.data.borrowAKey = false">
<template v-slot:default>
1231
</template>
</cs-pop-up>
<cs-pop-up :show="init.keyQrcode.show" :height="70">
<!-- 钥匙扫码-->
<template #content>
<!-- //钥匙卡片-->
<div class="w-full h-[90%] bg-gray-100 overflow-y-auto p-3">
<cs-key-qr-code></cs-key-qr-code>
</div>
<div class="w-full h-[10%] flex items-center justify-center p-3 shadow-gray-600 shadow">
<van-button style="width: 48%" round block @click="init.keyQrcode.show = false;">关闭</van-button>
</div>
</template>
</cs-pop-up>
</template>
<script setup>
import router from "../../router/index.js";
import * as hooks from '../../hooks/index.js'
import tc from '../../states/icon/16.png'
import fl from '../../states/icon/18.png'
import fr from '../../states/icon/20.png'
import {getCurrentInstance, inject, nextTick, onMounted, provide, reactive, ref, watch,} from "vue"
import CsKeyQrCode from "./components/keyQrcode.vue";
function go2(name) {
router.push({
name: name
})
}
const show = ref(true)
const keyStrategy = {
// 钥匙策略
'borrowAKey': () => {
// return objKey.data.borrowAKey = !objKey.data.borrowAKey
go2('inKey')
},
'returnTheKey': () => {
},
'keyScanCode': () => {
init.keyQrcode.show = true
},
}
const init = reactive({
keyQrcode: {
show: false,
},
data: {
admin: '',
user: '',
}
})
const active = ref(1);
const asc = getCurrentInstance().appContext.config.globalProperties
const objKey = reactive({
data: {
borrowAKey: false,
}
})
//钥匙操作管理
const keyManagement = (key) => keyStrategy[key]()
const tabChange = (e) => {
// 底部菜单切换
asc.tabChange(e)
}
const getImage = (imageKey) => {
return asc.hooks.getImage(imageKey)
}
const backAscHome = inject('backAscHome')
const back = () => {
//返回asc 主界面
backAscHome()
}
function getRole() {
let array = []
hooks.getUserInfo().role_and_power.map(cur => {
array.push(cur.role_id)
})
init.data.admin = array.includes("2") //场地管理员
}
onMounted(() => {
document.title = "钥匙管理"
getRole()
})
</script>
<style scoped>
.aaa {
background-image: url("../../states/icon/zose.png");
background-size: cover;
}
.bbb {
background-image: url("../../states/icon/lanse.png");
background-size: cover;
}
.ccc {
background-image: url("../../states/icon/changhuangse.png");
background-size: cover;
}
.ddd {
background-image: url("../../states/icon/changlanse.png");
background-size: cover;
}
.eee {
background-image: url("../../states/icon/zisechangbeijing.png");
background-size: cover;
}
.child {
width: 40px;
height: 40px;
background: #f2f3f5;
border-radius: 4px;
}
>>> .van-cell-group--inset {
margin: 0;
border-radius: var(--van-cell-group-inset-radius);
overflow: hidden;
}
>>> .van-tabbar {
z-index: var(--van-tabbar-z-index);
display: flex;
box-sizing: content-box;
width: 100%;
height: 80px;
background: var(--van-tabbar-background);
}
</style>
<!--借还记录列表-->
<template>
<div class="container1">
<!-- header-->
<cs-site-select-header @change-select="changeSelect" @search-fun="searchFun"
:selectDefaultValue="searchCondition.data.state"
:option="init.key.array"></cs-site-select-header>
<!-- content-->
<div class="w-full h-[calc(100vh-109px)] p-3 overflow-y-auto">
<div v-for="(item,index) in init.data.array" :key="index">
<cs-borrowing-and-returning-list-card :item="item">
<template v-slot:image>
<img :src="getImage(`${ ['kejie','jiechu','guihuan'][item.state]}`)">
</template>
<template v-slot:default>
<div class="w-full h-full flex justify-end items-center ">
<van-button @click="detail(item.id)" class="w-[48%] text-gray-600" plain size="small">详情</van-button>
</div>
</template>
</cs-borrowing-and-returning-list-card>
</div>
</div>
<!-- footer-->
<cs-page :total="searchCondition.data.total" @pageChange="pageChange"></cs-page>
</div>
</template>
<script setup>
import {getImage} from "../../hooks/index.js";
import router from "../../router/index.js";
import * as hooks from "../../hooks/index.js";
import * as api from "../../util/request/dist/controller/index.js";
import {onMounted, reactive} from "vue";
const detail = (e) => {
router.push({
name: 'loanAndReturnDetail',
query: {
id: e
}
})
}
const init = reactive({
keyQrcode: {
show: false,
},
placeType: {
array: []
},
data: {
array: []
},
key: {
array: [
{text: '借出', value: 1},
{text: '归还', value: 2},
]
}
})
function getPlaceType() {
//获取场地类型
hooks.getInitListRequest(() => {
api.getApiCommonGetPlaceTypeSelect().then(res => {
let array = []
res.response.map(cur => {
array.push({text: cur.name, value: cur.id})
})
init.placeType.array = array
})
})
}
const searchCondition = reactive({
//场地初始化
data: {
// JSON.parse(Cookies.get('site-user-info')).role_and_power.role_id,
"key_code_name": "",
"card_name": "",
"state": 1,
"page_index": 1,
"page_size": 10,
'total': 0,
}
})
function searchFun(e) {
//搜索框事件回调 点击icon 提供searchValue
searchCondition.data.card_name = e
getData()
}
function changeSelect(e) {
//下拉框
searchCondition.data.state = e
getData()
}
function pageChange(e) {
//分页 通过组件获取当前页
searchCondition.data.page_index = e
getData()
}
function getData() {
//初始化方法查询
hooks.getInitListRequest(() => {
api.postApiKeyGetKeyTrackListByPlaceAdmin(searchCondition.data).then(res => {
init.data.array = res.response.data
searchCondition.data.total = res.response.data_count
})
})
}
onMounted(() => {
document.title = "钥匙借还记录"
getData()
getPlaceType()
})
</script>
<style scoped>
</style>
<!--我的借还记录列表-->
<template>
<div class="container1">
<!-- header-->
<cs-site-select-header @change-select="changeSelect" @search-fun="searchFun"
:selectDefaultValue="searchCondition.data.state"
:option="init.key.array"></cs-site-select-header>
<!-- content-->
<div class="w-full h-[calc(100vh-109px)] p-3 overflow-y-auto">
<div v-for="(item,index) in init.data.array" :key="index">
<cs-borrowing-and-returning-list-card :item="item">
<template v-slot:image>
<img :src="getImage(`${ ['kejie','jiechu','guihuan'][item.state]}`)">
</template>
<template v-slot:default>
<div class="w-full h-full flex justify-end items-center ">
<van-button @click="detail(item.id)" class="w-[48%] text-gray-600" plain size="small">详情</van-button>
</div>
</template>
</cs-borrowing-and-returning-list-card>
</div>
</div>
<!-- footer-->
<cs-page :total="searchCondition.data.total" @pageChange="pageChange"></cs-page>
</div>
</template>
<script setup>
import {getImage} from "../../hooks/index.js";
import router from "../../router/index.js";
import * as hooks from "../../hooks/index.js";
import * as api from "../../util/request/dist/controller/index.js";
import {onMounted, reactive} from "vue";
const detail = (e) => {
router.push({
name: 'loanAndReturnDetail',
query: {
id: e
}
})
}
const init = reactive({
keyQrcode: {
show: false,
},
placeType: {
array: []
},
data: {
array: []
},
key: {
array: [
{text: '借出', value: 1},
{text: '归还', value: 2},
]
}
})
function getPlaceType() {
//获取场地类型
hooks.getInitListRequest(() => {
api.getApiCommonGetPlaceTypeSelect().then(res => {
let array = []
res.response.map(cur => {
array.push({text: cur.name, value: cur.id})
})
init.placeType.array = array
})
})
}
const searchCondition = reactive({
//场地初始化
data: {
"key_code_name": "",
"card_name": "",
"state": 1,
"page_index": 1,
"page_size": 10,
'total': 0,
}
})
function searchFun(e) {
//搜索框事件回调 点击icon 提供searchValue
searchCondition.data.card_name = e
getData()
}
function changeSelect(e) {
//下拉框
searchCondition.data.state = e
getData()
}
function pageChange(e) {
//分页 通过组件获取当前页
searchCondition.data.page_index = e
getData()
}
function getData() {
//初始化方法查询
hooks.getInitListRequest(() => {
api.postApiKeyGetKeyTrackListMySelf(searchCondition.data).then(res => {
init.data.array = res.response.data
searchCondition.data.total = res.response.data_count
})
})
}
onMounted(() => {
document.title = "我的钥匙借还记录"
getData()
getPlaceType()
})
</script>
<style scoped>
</style>
<script setup>
</script>
<template>
</template>
<style scoped>
</style>
<template>
<van-nav-bar
title="值班信息"
left-text="返回"
left-arrow
@click-left="onClickLeft"
/>
<div class="container">
<!-- v-for="(dutyObject.data,index) in dutyObject.data" :key="index"-->
<van-cell-group class="cardContainer" inset>
<van-cell class="cardContent" :title="dutyObject.data.username">
<template #extra>
<van-tag type="primary" plain><span>{{ dutyObject.data.card_name }}</span></van-tag>
<van-tag color="#7232dd" type="primary" plain style="margin-left: 10px">{{
['值班教师', '值班领导'][dutyObject.data.is_lead]
}}
</van-tag>
<!-- <van-tag :color="['','#7232dd'][dutyObject.data.is_lead]" type="primary" plain style="margin-left: 10px">-->
<!-- <span>{{ ['值班教师', '值班领导'][dutyObject.data.is_lead] }}</span></van-tag>-->
</template>
</van-cell>
<van-cell class="cardContent" title="手机号">
<template #extra>
<van-tag type="primary" plain><span>{{ dutyObject.data.mobile }}</span></van-tag>
</template>
</van-cell>
<van-cell class="cardContent" title="日期">
<template #extra>
<van-tag type="primary" plain><span>{{ dutyObject.data.watch_date }}</span></van-tag>
</template>
</van-cell>
<van-cell class="cardContent" title="时段">
<template #extra>
<van-tag type="primary" plain style="margin-left: 10px"><span>{{ dutyObject.data.watch_hour_time }}</span>
</van-tag>
</template>
</van-cell>
<van-cell class="cardContent" title="类型">
<template #extra>
<van-tag type="primary" plain>
<span>{{
dutyObject.data.watchtypename + '-' + dutyObject.data.dept_name + '-' + dutyObject.data.campusname
}}</span>
</van-tag>
</template>
</van-cell>
</van-cell-group>
</div>
</template>
<script setup>
import dayjs from 'dayjs';
import * as api from '../../api/index.js';
import {ref, reactive, onMounted, watch} from 'vue';
import {useRouter} from "vue-router";
import {showToast} from "vant";
const router = useRouter()
let dutyObject = reactive({
data: {}
})
const getDutyMessage = async () => {
let data = {
id: router.currentRoute.value.query.id
}
const res = await api.GetWatchInfo(data)
dutyObject.data = res.response
}
onMounted(() => {
getDutyMessage()
})
const onClickLeft = () => router.push({
name: 'signList'
});
</script>
<style>
.container {
.cardContainer {
margin-top: 10px;
width: 95%;
background-color: #ffffff;
height: 20%;
.cardContent {
//height: 150px;
}
}
}
</style>
<template>
<div class="w-screen h-screen bg-gray-100 box-border">
<!-- header h-54px-->
<cs-header :path="'myActivity'" @search-fun="searchFun"></cs-header>
<!-- content-->
<div class="w-full h-[calc(100vh-109px)] p-3 overflow-y-auto">
<div v-for="(item,index) in init.data.array" :key="index">
<cs-card :item="item">
<template v-slot:image>
<img :src="spzlogo">
</template>
<template v-slot:default>
<van-button :disabled="hooks.getUserInfo().card_number !== item.card" class="w-[48%]" plain size="small"
type="primary" @click="cancel(item.id)">取消
</van-button>
<van-button @click="detail(item.id)" class="w-[48%] text-gray-600" plain size="small">详情</van-button>
</template>
</cs-card>
</div>
</div>
<!-- footer h-55px-->
<cs-page :total="searchCondition.data.total" @pageChange="pageChange"></cs-page>
</div>
</template>
<script setup>
import spzlogo from '../../../states/icon/ing.png'
import {ref, defineAsyncComponent, getCurrentInstance, reactive, onMounted, inject} from 'vue'
import router from "../../../router/index.js";
import * as api from '../../../../src/util/request/dist/controller/index.js'
import * as hooks from "../../../hooks/index.js";
const asc = getCurrentInstance().appContext.config.globalProperties
let search = ref('')
function back() {
router.push({
name: 'welcome'
})
}
const init = reactive({
data: {
array: []
}
})
const detail = (e) => {
router.push({
name: 'indexDetail',
query: {
id: e
}
})
}
function cancel(id) {
//取消活动
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(async () => {
const res = await api.getApiActivityActivityCancel({id: id})
if (res.code === 1) getData()
return res
})
})
}
const searchCondition = reactive({
data: {
"name": "",
"state": 1,
"page_index": 1,
"page_size": 10,
'total': 0,
}
})
function searchFun(e) {
//搜索框事件回调 点击icon 提供searchValue
searchCondition.data.name = e
getData()
}
function pageChange(e) {
//分页 通过组件获取当前页
searchCondition.data.page_index = e
getData()
}
function getData() {
//初始化方法查询
hooks.getInitListRequest(() => {
api.postApiActivityGetActivityListByWxUser(searchCondition.data).then(res => {
init.data.array = res.response.data
searchCondition.data.total = res.response.data_count
})
})
}
onMounted(() => {
getData()
document.title = '审批中'
})
</script>
<style scoped>
</style>
此差异已折叠。
<template>
<div class="w-screen h-screen bg-gray-100 box-border">
<!-- header-->
<cs-header :path="'myActivity'"></cs-header>
<!-- content-->
<div class="w-full h-[calc(100vh-109px)] p-3 overflow-y-auto">
<div v-for="(item,index) in init.data.array" :key="index">
<cs-card :item="item">
<template v-slot:image>
<img :src="getImage('byqlogo')">
</template>
<template v-slot:default>
<van-button @click="notice(item);" class="w-[31%]" plain size="small" type="primary">同意
</van-button>
<van-button @click="invitation(item,2)" class="w-[31%] text-gray-600" plain size="small">拒绝
</van-button>
<van-button @click="detail(item.id)" class="w-[31%] text-gray-600" plain size="small">详情</van-button>
</template>
</cs-card>
</div>
</div>
<!-- footer-->
<cs-page></cs-page>
</div>
<!-- 须知-->
<van-dialog v-model:show="init.notice.show" title="活动须知">
<div class="w-full h-[500px]">
<div class="overflow-y-auto w-full h-full p-3">{{ init.notice.content }}</div>
</div>
<template #footer>
<div class="w-full h-[60px] flex justify-center items-center border border-solid">
<van-button :disabled="init.notice.close" style="width: 90%" type="primary" round block
@click="consentNotice">已确认知晓<span v-if="init.notice.close ">({{
init.notice.s
}})</span>
</van-button>
</div>
</template>
</van-dialog>
</template>
<script setup>
import spzlogo from '../../../states/icon/ing.png'
import {ref, defineAsyncComponent, getCurrentInstance, reactive, onMounted} from 'vue'
import router from "../../../router/index.js";
import {getImage} from "../../../hooks/index.js";
import * as api from "../../../util/request/dist/controller/index.js";
import * as hooks from "../../../hooks/index.js";
const asc = getCurrentInstance().appContext.config.globalProperties
function back() {
router.push({
name: 'welcome'
})
}
const init = reactive({
notice: {
//须知
show: false,
close: true,
s: 5,
readTime: '',
timer: '',
content: '',
id: '',
formValidate: {
activity_id: '',
userid: '',
is_agree: 1,
}
},
page: {
//活动列表
page_index: 1,
page_size: 10,
total: 0,
},
people: {
//邀请
timer: '',
id: '',
show: false,
activeIds: [],
activeIndex: 0,
items: [
{
text: '学生',
children: [],
},
{
text: '教师',
children: [],
},
],
init: {
user_type: 0,
keyword: '',
}
},
data: {
array: []
},
adjust: {
//调动
show: false,
id: '',
formValidate: {}
},
timeRange: false,
placeType: false,
place: false,
beginTime: false,
endTime: false,
commodity: false,
date: false,
timeRangeText: '',
dateText: "",
placeTypeText: '',
placeText: '',
beginTimeText: '',
endTimeText: '',
commodityText: '',
placeTypeArray: '',
placeArray: '',
beginTimeArray: '',
endTimeArray: '',
commodityArray: [],
minDateStart: '',
maxDateStart: '',
})
function notice(item) {
//须知倒计时
init.notice.close = true
init.notice.timer = setInterval(() => {
init.notice.s = init.notice.s - 1
if (init.notice.s === 0) {
//倒计时结束 解开禁用 清空计时器 初始化倒计时为始态
clearInterval(init.notice.timer)
init.notice.close = false
init.notice.s = init.notice.readTime
}
}, 1000)
//须知Id
init.notice.id = item.place_type_id
getNoticeContent()
init.notice.show = true
//中转同意数据
init.notice.formValidate = {
activity_id: item.id,
userid: item.userid,
is_agree: 1,
}
}
function consentNotice() {
//确认须知 同意邀请
init.notice.show = false
invitation(1, init.notice.formValidate)
}
function invitation(value, item) {
//同意||拒绝邀请
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(async () => {
const res = await api.getApiActivityParticipantOperate({
activity_id: item.activity_id,
userid: item.userid,
is_agree: value,
})
if (res.code === 1) getData()
return res
})
})
}
function getNoticeContent() {
//获取须知内容
hooks.getInitListRequest(async () => {
const res = await api.getApiCommonGetPlaceTypeRead({place_type_id: init.notice.id}).then(res => {
init.notice.content = res.response.instructions
init.notice.s = res.response.read_time
init.notice.readTime = res.response.read_time
})
if (res.code === 1) getData()
})
}
const detail = (e) => {
router.push({
name: 'indexDetail',
query: {
id: e
}
})
}
function cancel(id) {
//取消活动
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(async () => {
const res = await api.getApiActivityActivityCancel({id: id})
if (res.code === 1) getData()
return res
})
})
}
const searchCondition = reactive({
data: {
"name": "",
"state": 13,
"page_index": 1,
"page_size": 10,
'total': 0,
}
})
function searchFun(e) {
//搜索框事件回调 点击icon 提供searchValue
searchCondition.data.name = e
getData()
}
function pageChange(e) {
//分页 通过组件获取当前页
searchCondition.data.page_index = e
getData()
}
function getData() {
//初始化方法查询
hooks.getInitListRequest(() => {
api.postApiActivityGetActivityListByWxUser(searchCondition.data).then(res => {
init.data.array = res.response.data
searchCondition.data.total = res.response.data_count
})
})
}
onMounted(() => {
getData()
document.title = '邀请我的'
})
</script>
<style scoped>
</style>
<!--活动数据-->
<template>
<div class="
w-full
min-h-[calc(100%-54px)]
overflow-y-auto
flex content-start
flex-wrap
bg-gray-200
">
<div class="w-full h-auto bg-white box-border mt-3">
<div class="w-full h-[50px] flex p-3 ">
<div class="w-[30%] h-full flex items-center">
<span>申请人名称</span>
</div>
<div class="w-[70%] h-full flex items-center ">
<span class="ml-1">周老师</span>
</div>
</div>
<div class="w-full h-1/5 flex p-3 ">
<div class="w-[30%] h-full flex items-center">
<span>申请人卡号</span>
</div>
<div class="w-[70%] h-full flex items-center ">
<span class="ml-1">132132132</span>
</div>
</div>
<div class="w-full h-1/5 flex p-3 ">
<div class="w-[30%] h-full flex items-center">
<span>联系方式</span>
</div>
<div class="w-[70%] h-full flex items-center ">
<span class="ml-1">17000000000</span>
</div>
</div>
<div class="w-full h-1/5 flex p-3 ">
<div class="w-[30%] h-full flex items-center">
<span>班级</span>
</div>
<div class="w-[70%] h-full flex items-center ">
<span class="ml-1">2023级电子班</span>
</div>
</div>
<div class="w-full h-1/5 flex p-3 ">
<div class="w-[30%] h-full flex items-center">
<span>学院</span>
</div>
<div class="w-[70%] h-full flex items-center ">
<span class="ml-1">物理与电子信息工程系</span>
</div>
</div>
</div>
<dt-card :array="[
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
]"></dt-card>
<dt-card :array="[
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
]"></dt-card>
<dt-card :nmb="true" :array="[
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
]"></dt-card>
</div>
</template>
<script setup>
</script>
<style scoped>
</style>
<!--评价-->
<template>
<div class="
w-full
min-h-[calc(100%-54px)]
overflow-y-auto
flex content-start
flex-wrap
bg-gray-200
">
<dt-card :array="[
{label:'评论人',value:'周老师'},
{label:'星级',level:5},
{label:'评论',value:'男'},
{label:'班级',value:'2023级电子版'},
{label:'活动照片',image:'计算机系'},
]"></dt-card>
<dt-card :array="[
{label:'评论人',value:'周老师'},
{label:'星级',level:5},
{label:'评论',value:'男'},
{label:'班级',value:'2023级电子版'},
{label:'活动照片',image:'计算机系'},
]"></dt-card>
<dt-card :array="[
{label:'评论人',value:'周老师'},
{label:'星级',level:5},
{label:'评论',value:'男'},
{label:'班级',value:'2023级电子版'},
{label:'活动照片',image:'计算机系'},
]"></dt-card>
</div>
</template>
<script setup>
</script>
<style scoped>
</style>
<!--评价-->
<template>
<div class="
w-full
min-h-[calc(100%-54px)]
overflow-y-auto
flex content-start
flex-wrap
bg-gray-200
">
<dt-card :array="[
{label:'钥匙名称',value:'一号楼钥匙'},
{label:'钥匙编号',value:5123},
{label:'地址',value:'2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版'},
{label:'可借状态',tag:'可接'},
{label:'钥匙照片',image:'计算机系'},
]"></dt-card>
<dt-card :array="[
{label:'钥匙名称',value:'一号楼钥匙'},
{label:'钥匙编号',value:5123},
{label:'地址',value:'2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版'},
{label:'可借状态',tag:'可接'},
{label:'钥匙照片',image:'计算机系'},
]"></dt-card>
<dt-card :array="[
{label:'钥匙名称',value:'一号楼钥匙'},
{label:'钥匙编号',value:5123},
{label:'地址',value:'2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版'},
{label:'可借状态',tag:'可接'},
{label:'钥匙照片',image:'计算机系'},
]"></dt-card>
</div>
</template>
<script setup>
</script>
<style scoped>
</style>
<!--参与人-->
<template>
<div class="
w-full
min-h-[calc(100%-54px)]
overflow-y-auto
flex content-start
flex-wrap
bg-gray-200
">
<div class="w-full h-[55px] flex items-center justify-center">
<div class="
w-[92%] h-[70%]
bg-white border
border-[#6BB5EA]
border-dashed
flex justify-center items-center
active:bg-blue-50
active:text-[50px]
rounded-[2px]
">
<div class="text-[10px] mx-1 text-blue-400">
<van-icon name="plus"></van-icon>
</div>
<span class="text-[16px] text-[#6BB5EA]">新增参与人</span>
</div>
</div>
<dt-card :nmt="true" :array="[
{label:'参与人姓名',value:'周老师'},
{label:'参与人卡号',value:'2023级电子版'},
{label:'性别',value:'男'},
{label:'班级',value:'2023级电子版'},
{label:'学院',value:'计算机系'},
]"></dt-card>
<dt-card :array="[
{label:'参与人姓名',value:'周老师'},
{label:'参与人卡号',value:'asc202312128'},
{label:'性别',value:'男'},
{label:'班级',value:'2023级电子版'},
{label:'学院',value:'计算机系'},
]"></dt-card>
</div>
</template>
<script setup>
</script>
<style scoped>
</style>
<!--轨迹-->
<template>
<div class="
w-full
min-h-[calc(100%-54px)]
overflow-y-auto
flex content-start
flex-wrap
bg-gray-200
">
<van-steps class="w-full" direction="vertical" :active="0">
<van-step>
<h3>王同学使用场地记录</h3>
<p>2016-07-12 12:40 使用该场地</p>
</van-step>
<van-step>
<h3>王同学申请场地通过</h3>
<p>2016-07-12 12:40 申请场地通过</p>
</van-step>
<van-step>
<h3>王同学申请场地记录</h3>
<p>2016-07-12 12:40 申请场地</p>
</van-step>
</van-steps>
</div>
</template>
<script setup>
</script>
<style scoped>
</style>
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或