提交 1e299f4b 编写于 作者: 刘英杰's avatar 刘英杰

整合签到列表代码

上级 63515242
......@@ -17,6 +17,8 @@ dist-ssr
!.vscode/extensions.json
.idea
.DS_Store
/node_modules
#/dist
*.suo
*.ntvs*
*.njsproj
......
default:
before_script:
- chcp 65001
stages:
- publish
build:
stage: publish
script:
- remove-item -Force -Recurse D:\ASC_web\A00051\dutyManagement\wx*
- xcopy "dist" "D:\ASC_web\A00051\dutyManagement\wx\" /s/e/y/
only:
- wx
import { createApp } from 'vue'
import {createApp} from 'vue'
import './style.css'
import App from './App.vue'
import router from "./router/index.js";
import 'animate.css' //引入
import VueCookies from 'vue-cookies'
import VConsole from 'vconsole';
const app = createApp(App)
// const vConsole = new VConsole();
app.config.globalProperties.$cookies = VueCookies
app.use(router)
app.mount('#app')
......@@ -49,10 +49,10 @@ const getTokenActionWx = async (date) => {
}
const getToken = async () => {
if (Number(router.currentRoute.value.query.type) === 2) {
Cookies.set('token', router.currentRoute.value.query.token)
// Cookies.set('token', router.currentRoute.value.query.token)
// localStorage.setItem('token', router.currentRoute.value.query.token)
let date = {
token: Cookies.get('token')
token: router.currentRoute.value.query.token
}
await getTokenAction(date)
} else if (Number(router.currentRoute.value.query.type) === 1) {
......
......@@ -39,12 +39,12 @@ const getTokenActionWx = async (date) => {
Cookies.set('admin-token', res.response.access_token.token_content)
Cookies.set('time', res.response.access_token.expires)
let links = router.currentRoute.value.query.links
let id = router.currentRoute.value.query.id
// let id = router.currentRoute.value.query.id
await router.push({
path: `/${links}`,
query: {
id: id
}
// query: {
// id: id
// }
})
}
}
......@@ -54,8 +54,8 @@ const getToken = async () => {
let date = {
token: Cookies.get('token')
}
console.log("🚀🚀🚀,ASC的data", date)
console.log("🚀🚀🚀,ASC的token", Cookies.get('token'))
// console.log("🚀🚀🚀,ASC的data", date)
// console.log("🚀🚀🚀,ASC的token", Cookies.get('token'))
await getTokenAction(date)
} else if (Number(router.currentRoute.value.query.type) === 1) {
let date = {
......
......@@ -71,7 +71,7 @@ onMounted(() => {
getDutyMessage()
})
const onClickLeft = () => router.push({
name: 'welcome'
name: 'signList'
});
</script>
<style>
......
......@@ -37,7 +37,8 @@
<van-dropdown-menu :overlay="false">
<van-dropdown-item @close="closeMenu" :key="myDuty.menuKey" @open="openMenu" title="日期">
<template #default>
<van-calendar v-model:show="myDuty.show" type="range" @confirm="dateRange"/>
<van-calendar :minDate="myDuty.minDate"
:maxDate="myDuty.maxDate" v-model:show="myDuty.show" type="range" @confirm="dateRange"/>
</template>
</van-dropdown-item>
<van-dropdown-item v-model="myDuty[item[2]]" v-for="(item,index) in myDuty.addDutySelectList" :key="index"
......@@ -96,21 +97,21 @@
<van-popup v-model:show="changeShiftsPickerShow" round position="bottom">
<!-- 搜索框 -->
<van-search
v-model="changeSftInput"
placeholder="请输入姓名或工号"
@update:model-value="searchChange"/>
v-model="changeSftInput"
placeholder="请输入姓名或工号"
@update:model-value="searchChange"/>
<!-- 选择器 -->
<van-picker
:columns="userList"
:loading="pickerLoading"
@cancel="pickerCancel"
@confirm="pickerConfirm"
:columns="userList"
:loading="pickerLoading"
@cancel="pickerCancel"
@confirm="pickerConfirm"
/>
</van-popup>
</template>
<style scoped lang="less">
.container {
//box-sizing: border-box; //background-color: #706c6c; //width: 100%; //height: 100%; //min-height: 896px; //display: flex; //flex-wrap: wrap; //justify-content: center; //align-content: flex-start;
//box-sizing: border-box; //background-color: #706c6c; //width: 100%; //height: 100%; //min-height: 896px; //display: flex; //flex-wrap: wrap; //justify-content: center; //align-content: flex-start;
.cardContainer {
......@@ -141,6 +142,8 @@ import Cookies from 'js-cookie'
const onClickLeft = () => history.back();
let myDuty = reactive({
minDate: new Date(dayjs().year(), dayjs().month() - 1, 1),
maxDate: new Date(dayjs().year(), dayjs().month() + 1, 1),
addDutySelectList: [],
DatePickerKey: 1,
showCenter: false,
......@@ -243,6 +246,7 @@ const onLoad = async () => {
"page_size": myDuty.page_size,
}
const res = await api.GetWatchList(data)
// showToast('刷新成功!')
list.value = res.response.data
myDuty.total = res.response.data_count
// 异步更新数据
......@@ -254,7 +258,7 @@ const onLoad = async () => {
// 数据全部加载完成
if (list.value.length >= Number(myDuty.total)) {
finished.value = true;
showToast('加载完成!')
// showToast('加载完成!')
} else if (list.value.length < Number(myDuty.total)) {
myDuty.page_size = myDuty.page_size + 10
......@@ -304,6 +308,7 @@ function pickerChgSftOpen(obj) {
changeShiftsPickerShow.value = true
attendanceObj.value = obj
}
// 搜索值改变
function searchChange(val) {
pickerLoading.value = true
......@@ -324,6 +329,7 @@ function searchChange(val) {
pickerLoading.value = false
})
}
// 换班选择器确认
function pickerConfirm(val) {
// console.log('选择器确认', val)
......@@ -352,6 +358,7 @@ function pickerConfirm(val) {
})
}
// 换班选择器取消
function pickerCancel() {
changeShiftsPickerShow.value = false
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -15,7 +15,16 @@
<!-- <router-link to="/messageDetails">-->
<!-- <van-button>123123</van-button>-->
<!-- </router-link>-->
<van-cell-group style="width: 100%;margin-top: 10px">
<!-- <van-swipe @change="swiperNext" class="my-swipe" indicator-color="white">-->
<!-- <van-swipe-item>1</van-swipe-item>-->
<!-- <van-swipe-item>2</van-swipe-item>-->
<!-- <van-swipe-item>3</van-swipe-item>-->
<!-- <van-swipe-item style="color: red;">-->
<!-- </van-swipe-item>-->
<!-- </van-swipe>-->
<div class="dateContainer">
<div class="left" @click="reductionDate">
<span class="SlideButton"><van-icon name="arrow-left"/></span>
......@@ -38,7 +47,7 @@
<van-cell icon="manager-o" @click="myDuty" is-link class="cardTitle" title="我的值班" value="个人值班记录"/>
<van-cell icon="label-o" @click="signList" is-link class="cardTitle" title="签到列表" value="教师签到"/>
</van-cell-group>
<van-cell-group v-for="(item,index) in GetWatchListObject.GetWatchListInitArray" :key="index" inset
style="width: 100%" class="cardContainer">
<van-cell class="cardContent" :title="item.username">
......@@ -58,7 +67,6 @@
<template #extra>
<van-tag type="primary" plain>
<span>{{ item.watchtypename + '-' + item.dept_name + '-' + item.campusname }}</span></van-tag>
</template>
</van-cell>
</van-cell-group>
......@@ -105,6 +113,12 @@ let GetWatchListObject = reactive({
GetWatchListInitArray: [],
})
const swiperPrev = () => {
console.log("🚀swiperPrev🚀🚀,",)
}
const swiperNext = (e) => {
console.log("🚀🚀swiperNext🚀,", e)
}
const onRefresh = async () => {
dateArray.loading = true
GetWatchListObject.startTime = dayjs().format('YYYY-MM-DD')
......@@ -263,6 +277,14 @@ onMounted(() => {
})
</script>
<style scoped lang="less">
.my-swipe .van-swipe-item {
width: 100px;
color: #fff;
font-size: 20px;
line-height: 150px;
text-align: center;
background-color: #39ed81;
}
.container {
.dateContainer {
......@@ -294,7 +316,7 @@ onMounted(() => {
.content {
width: 11.42%;
height: 50px;
//border-radius:150%; //background-color: red;
//border-radius:150%; //background-color: red;
}
......@@ -316,7 +338,7 @@ onMounted(() => {
height: 20%;
.cardContent {
//height: 150px;
//height: 150px;
}
}
......
......@@ -15,9 +15,8 @@ export default defineConfig({
],
base: './',
server: {
// host: "127.0.0.1",
// host: "0.0.0.0",
// cors: true,
// port: 8991,
// open: true, //自动打开
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或