提交 3381a0dd 编写于 作者: 刘英杰's avatar 刘英杰

添加值班角色、添加签到状态的查询、更改消息推送返回路由,增加已签到标识、

上级 63515242
...@@ -49,10 +49,10 @@ const getTokenActionWx = async (date) => { ...@@ -49,10 +49,10 @@ const getTokenActionWx = async (date) => {
} }
const getToken = async () => { const getToken = async () => {
if (Number(router.currentRoute.value.query.type) === 2) { 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) // localStorage.setItem('token', router.currentRoute.value.query.token)
let date = { let date = {
token: Cookies.get('token') token: router.currentRoute.value.query.token
} }
await getTokenAction(date) await getTokenAction(date)
} else if (Number(router.currentRoute.value.query.type) === 1) { } else if (Number(router.currentRoute.value.query.type) === 1) {
......
...@@ -71,7 +71,7 @@ onMounted(() => { ...@@ -71,7 +71,7 @@ onMounted(() => {
getDutyMessage() getDutyMessage()
}) })
const onClickLeft = () => router.push({ const onClickLeft = () => router.push({
name: 'welcome' name: 'signList'
}); });
</script> </script>
<style> <style>
......
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
<van-dropdown-menu :overlay="false"> <van-dropdown-menu :overlay="false">
<van-dropdown-item @close="closeMenu" :key="myDuty.menuKey" @open="openMenu" title="日期"> <van-dropdown-item @close="closeMenu" :key="myDuty.menuKey" @open="openMenu" title="日期">
<template #default> <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> </template>
</van-dropdown-item> </van-dropdown-item>
<van-dropdown-item v-model="myDuty[item[2]]" v-for="(item,index) in myDuty.addDutySelectList" :key="index" <van-dropdown-item v-model="myDuty[item[2]]" v-for="(item,index) in myDuty.addDutySelectList" :key="index"
...@@ -110,7 +111,7 @@ ...@@ -110,7 +111,7 @@
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.container { .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 { .cardContainer {
...@@ -141,6 +142,8 @@ import Cookies from 'js-cookie' ...@@ -141,6 +142,8 @@ import Cookies from 'js-cookie'
const onClickLeft = () => history.back(); const onClickLeft = () => history.back();
let myDuty = reactive({ let myDuty = reactive({
minDate: new Date(dayjs().year(), dayjs().month() - 1, 1),
maxDate: new Date(dayjs().year(), dayjs().month() + 1, 1),
addDutySelectList: [], addDutySelectList: [],
DatePickerKey: 1, DatePickerKey: 1,
showCenter: false, showCenter: false,
...@@ -243,6 +246,7 @@ const onLoad = async () => { ...@@ -243,6 +246,7 @@ const onLoad = async () => {
"page_size": myDuty.page_size, "page_size": myDuty.page_size,
} }
const res = await api.GetWatchList(data) const res = await api.GetWatchList(data)
// showToast('刷新成功!')
list.value = res.response.data list.value = res.response.data
myDuty.total = res.response.data_count myDuty.total = res.response.data_count
// 异步更新数据 // 异步更新数据
...@@ -254,7 +258,7 @@ const onLoad = async () => { ...@@ -254,7 +258,7 @@ const onLoad = async () => {
// 数据全部加载完成 // 数据全部加载完成
if (list.value.length >= Number(myDuty.total)) { if (list.value.length >= Number(myDuty.total)) {
finished.value = true; finished.value = true;
showToast('加载完成!') // showToast('加载完成!')
} else if (list.value.length < Number(myDuty.total)) { } else if (list.value.length < Number(myDuty.total)) {
myDuty.page_size = myDuty.page_size + 10 myDuty.page_size = myDuty.page_size + 10
...@@ -304,6 +308,7 @@ function pickerChgSftOpen(obj) { ...@@ -304,6 +308,7 @@ function pickerChgSftOpen(obj) {
changeShiftsPickerShow.value = true changeShiftsPickerShow.value = true
attendanceObj.value = obj attendanceObj.value = obj
} }
// 搜索值改变 // 搜索值改变
function searchChange(val) { function searchChange(val) {
pickerLoading.value = true pickerLoading.value = true
...@@ -324,6 +329,7 @@ function searchChange(val) { ...@@ -324,6 +329,7 @@ function searchChange(val) {
pickerLoading.value = false pickerLoading.value = false
}) })
} }
// 换班选择器确认 // 换班选择器确认
function pickerConfirm(val) { function pickerConfirm(val) {
// console.log('选择器确认', val) // console.log('选择器确认', val)
...@@ -352,6 +358,7 @@ function pickerConfirm(val) { ...@@ -352,6 +358,7 @@ function pickerConfirm(val) {
}) })
} }
// 换班选择器取消 // 换班选择器取消
function pickerCancel() { function pickerCancel() {
changeShiftsPickerShow.value = false changeShiftsPickerShow.value = false
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
</van-floating-bubble> </van-floating-bubble>
<div style="position: fixed;z-index: 2;width: 100%"> <div style="position: fixed;z-index: 2;width: 100%">
<!-- &lt;!&ndash; 圆角弹窗(居中) &ndash;&gt;--> <!-- &lt;!&ndash; 圆角弹窗(居中) &ndash;&gt;-->
<van-popup v-model:show="signList.showCenter" round style="width: 100%; padding: 10px;"> <van-popup v-model:show="signList.showCenter" round style="width: 100%; padding: 10px;">
<template v-slot:default> <template v-slot:default>
...@@ -56,7 +54,24 @@ ...@@ -56,7 +54,24 @@
left-text="返回" left-text="返回"
left-arrow left-arrow
@click-left="onClickLeft" @click-left="onClickLeft"
></van-nav-bar> >
<template v-slot:title><span style="margin-right: 20vw">签到列表</span></template>
<template v-slot:right>
<van-tabs v-model:active="signList.is_lead" shrink type="card" @click-tab="tabs">
<van-tab title="教师">
<template v-slot:title>
<span style="">值班教师</span>
</template>
</van-tab>
<van-tab title="领导">
<template v-slot:title>
<span style="">值班领导</span>
</template>
</van-tab>
</van-tabs>
</template>
</van-nav-bar>
<van-search <van-search
v-model="searchValue" v-model="searchValue"
shape="round" shape="round"
...@@ -64,13 +79,19 @@ ...@@ -64,13 +79,19 @@
/> />
<van-dropdown-menu :overlay="false"> <van-dropdown-menu :overlay="false">
<van-dropdown-item v-model="signList.sign" title="状态"
:options="signList.signClass"></van-dropdown-item>
<van-dropdown-item @close="closeMenu" :key="signList.menuKey" @open="openMenu" title="日期"> <van-dropdown-item @close="closeMenu" :key="signList.menuKey" @open="openMenu" title="日期">
<template #default> <template #default>
<van-calendar v-model:show="signList.show" type="range" @confirm="dateRange"/> <van-calendar :max-date="signList.maxDate" :minDate="signList.minDate" v-model:show="signList.show"
type="range" @confirm="dateRange"/>
</template> </template>
</van-dropdown-item> </van-dropdown-item>
<van-dropdown-item v-model="signList[item[2]]" v-for="(item,index) in signList.addDutySelectList" :key="index" <van-dropdown-item v-model="signList[item[2]]" v-for="(item,index) in signList.addDutySelectList" :key="index"
:title="item[1]" :options="item[0]"/> :title="item[1]" :options="item[0]"/>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
...@@ -136,6 +157,15 @@ ...@@ -136,6 +157,15 @@
<van-icon name="edit" /> <van-icon name="edit" />
{{ `${item.sign == 0 ? '签到' : '签退'}` }} {{ `${item.sign == 0 ? '签到' : '签退'}` }}
</van-button> --> </van-button> -->
<van-button
v-if="item.sign !== 0 && item.sign !==2"
size="small"
:disabled="true"
style="margin-right: 10px;"
>
<van-icon name="edit"/>
{{ `${item.sign == 1 ? '已签到' : ''}` }}
</van-button>
<van-button <van-button
v-if="item.sign < 2" v-if="item.sign < 2"
size="small" size="small"
...@@ -143,7 +173,7 @@ ...@@ -143,7 +173,7 @@
:type="item.sign == 0 ? 'success' : 'primary'" :type="item.sign == 0 ? 'success' : 'primary'"
:disabled="signBtDis(item)" :disabled="signBtDis(item)"
@click="locSignIn(item)"> @click="locSignIn(item)">
<van-icon name="edit" /> <van-icon name="edit"/>
{{ `${item.sign == 0 ? '签到' : '签退'}` }} {{ `${item.sign == 0 ? '签到' : '签退'}` }}
</van-button> </van-button>
<span v-else>签到完成</span> <span v-else>签到完成</span>
...@@ -256,7 +286,7 @@ ...@@ -256,7 +286,7 @@
} }
.container { .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 { .cardContainer {
...@@ -285,9 +315,32 @@ import {showToast, showDialog, ActionSheet, closeToast, showSuccessToast, showFa ...@@ -285,9 +315,32 @@ import {showToast, showDialog, ActionSheet, closeToast, showSuccessToast, showFa
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import wx from "weixin-js-sdk" import wx from "weixin-js-sdk"
import $ from "jquery"; import $ from "jquery";
import {useRouter} from "vue-router";
const onClickLeft = () => history.back(); let active = ref(1)
let signList = reactive({ let signList = reactive({
minDate: new Date(dayjs().year(), dayjs().month() - 1, 1),
maxDate: new Date(dayjs().year(), dayjs().month() + 1, 1),
sign: 9,
signClass: [
{
text: '全部状态',
value: 9
},
{
text: '待签到',
value: "0"
},
{
text: '已签到',
value: 1
},
{
text: '已签退',
value: 2
},
],
addDutySelectList: [], addDutySelectList: [],
DatePickerKey: 1, DatePickerKey: 1,
showCenter: false, showCenter: false,
...@@ -305,7 +358,13 @@ let signList = reactive({ ...@@ -305,7 +358,13 @@ let signList = reactive({
checked: [], checked: [],
floatingBubble: false, floatingBubble: false,
logId: '', logId: '',
is_lead: 0,
}) })
const router = useRouter();
const onClickLeft = () => router.push({
name: 'welcome'
});
const list = ref([]); const list = ref([]);
const loading = ref(false); const loading = ref(false);
const finished = ref(false); const finished = ref(false);
...@@ -351,13 +410,21 @@ const logAcStShow = ref(false) ...@@ -351,13 +410,21 @@ const logAcStShow = ref(false)
// 领导获取的教师日志 // 领导获取的教师日志
const allLog = ref('') const allLog = ref('')
watch([searchValue, () => signList.watchtypeid, () => signList.watch_hour_id, () => signList.campusid, () => signList.dept_id, () => signList.checked], (newValue, oldValue) => { watch([
searchValue,
() => signList.watchtypeid,
// () => signList.watch_hour_id,
() => signList.campusid,
() => signList.dept_id,
() => signList.sign,
() => signList.checked,
], (newValue, oldValue) => {
// console.log("🚀🚀🚀,", newValue[5]) // console.log("🚀🚀🚀,", newValue[5])
if (newValue[0] || newValue[1] || newValue[2] || newValue[3] || newValue[4]) { if (newValue[0] || newValue[1] || newValue[2] || newValue[3] || newValue[4]) {
clearTimeout(signList.deleteSetTimeOut) clearTimeout(signList.deleteSetTimeOut)
signList.deleteSetTimeOut = setTimeout(async () => { signList.deleteSetTimeOut = setTimeout(async () => {
await search() await search()
showToast('操作成功!') // showToast('操作成功!')
}, 500) }, 500)
} }
...@@ -366,7 +433,10 @@ watch([searchValue, () => signList.watchtypeid, () => signList.watch_hour_id, () ...@@ -366,7 +433,10 @@ watch([searchValue, () => signList.watchtypeid, () => signList.watch_hour_id, ()
signList.floatingBubble = !!signList.checked.length signList.floatingBubble = !!signList.checked.length
} }
}, {deep: true}) }, {deep: true})
const tabs = (e) => {
signList.is_lead = e.name
onLoad()
}
const batch = async (value) => { const batch = async (value) => {
let data = [] let data = []
signList.checked.map((cur, index) => { signList.checked.map((cur, index) => {
...@@ -390,6 +460,11 @@ const onRefresh = async () => { ...@@ -390,6 +460,11 @@ const onRefresh = async () => {
signList.loading = true signList.loading = true
signList.startTime = dayjs().format('YYYY-MM-DD') signList.startTime = dayjs().format('YYYY-MM-DD')
signList.endTime = dayjs().format('YYYY-MM-DD') signList.endTime = dayjs().format('YYYY-MM-DD')
signList.sign = 9
signList.is_lead = 0
// signList.page_size = 5
list.value = []
await onLoad() await onLoad()
signList.loading = false signList.loading = false
...@@ -417,7 +492,8 @@ const search = async () => { ...@@ -417,7 +492,8 @@ const search = async () => {
"end_time": signList.endTime, "end_time": signList.endTime,
"type_id": signList.watchtypeid, "type_id": signList.watchtypeid,
"watchhour_time": signList.watch_hour_id, "watchhour_time": signList.watch_hour_id,
"is_lead": 3, "is_lead": signList.is_lead,
sign: Number(signList.sign),
"campus_id": signList.campusid, "campus_id": signList.campusid,
"page_index": signList.page_index, "page_index": signList.page_index,
"page_size": signList.page_size, "page_size": signList.page_size,
...@@ -436,12 +512,14 @@ const onLoad = async () => { ...@@ -436,12 +512,14 @@ const onLoad = async () => {
"end_time": signList.endTime, "end_time": signList.endTime,
"type_id": "", "type_id": "",
"watchhour_time": "", "watchhour_time": "",
"is_lead": 3, "is_lead": signList.is_lead,
sign: Number(signList.sign),
"campus_id": "", "campus_id": "",
"page_index": signList.page_index, "page_index": signList.page_index,
"page_size": signList.page_size, "page_size": signList.page_size,
} }
const res = await api.GetSignRecordList(data) const res = await api.GetSignRecordList(data)
list.value = res.response.data list.value = res.response.data
signList.total = res.response.data_count signList.total = res.response.data_count
// 异步更新数据 // 异步更新数据
...@@ -453,10 +531,10 @@ const onLoad = async () => { ...@@ -453,10 +531,10 @@ const onLoad = async () => {
// 数据全部加载完成 // 数据全部加载完成
if (list.value.length >= Number(signList.total)) { if (list.value.length >= Number(signList.total)) {
finished.value = true; finished.value = true;
showToast('操作成功!') // showToast('操作成功!')
} else if (list.value.length < Number(signList.total)) { } else if (list.value.length < Number(signList.total)) {
signList.page_size = signList.page_size + 10 signList.page_size = signList.page_size + 10
// signList.page_index = signList.page_index + 1
} }
}, 100) }, 100)
} }
...@@ -476,13 +554,13 @@ const openMenu = () => { ...@@ -476,13 +554,13 @@ const openMenu = () => {
const addDutySearchSelectList = () => { const addDutySearchSelectList = () => {
Promise.all([ Promise.all([
getSearchSelectListPromiseAllAction("dutyType", '类型', "watchtypeid", api.GetWatchTypeSelect), getSearchSelectListPromiseAllAction("dutyType", '类型', "watchtypeid", api.GetWatchTypeSelect),
getSearchSelectListPromiseAllAction("dutyHourTime", '时段', "watch_hour_id", api.GetWatchHourTime), // getSearchSelectListPromiseAllAction("dutyHourTime", '时段', "watch_hour_id", api.GetWatchHourTime),
getSearchSelectListPromiseAllAction("campusname", '校区', "campusid", api.GetWatchCampusSelect), getSearchSelectListPromiseAllAction("campusname", '校区', "campusid", api.GetWatchCampusSelect),
getSearchSelectListPromiseAllAction("dept_name", '部门', "dept_id", api.GetWatchDepSelect), getSearchSelectListPromiseAllAction("dept_name", '部门', "dept_id", api.GetWatchDepSelect),
]) ])
.then(res => { .then(res => {
signList.addDutySelectList = res signList.addDutySelectList = res
signList.DatePickerKey++ signList.DatePickerKey++
}) })
} }
...@@ -506,6 +584,7 @@ function initWxPosition() { ...@@ -506,6 +584,7 @@ function initWxPosition() {
const params = { const params = {
url: window.location.href.replace(window.location.hash, ""), url: window.location.href.replace(window.location.hash, ""),
}; };
// var urla = `https://asc.hnasct.cn/wx/eicrs/api/GetJSSDK/GetWxConfig`
var urla = `${window.location.origin}/wx/eicrs/api/GetJSSDK/GetWxConfig` var urla = `${window.location.origin}/wx/eicrs/api/GetJSSDK/GetWxConfig`
api.GetWxInfo(urla, params).then((result) => { api.GetWxInfo(urla, params).then((result) => {
let data = result; let data = result;
...@@ -541,6 +620,7 @@ function initWxPosition() { ...@@ -541,6 +620,7 @@ function initWxPosition() {
}); });
}); });
} }
//获取定位 //获取定位
function getAddress() { function getAddress() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -582,6 +662,7 @@ function getAddress() { ...@@ -582,6 +662,7 @@ function getAddress() {
}) })
} }
// 地址解析 // 地址解析
function geocoder(latitude, longitude) { function geocoder(latitude, longitude) {
// var that = this; // var that = this;
...@@ -627,12 +708,12 @@ function geocoder(latitude, longitude) { ...@@ -627,12 +708,12 @@ function geocoder(latitude, longitude) {
} }
}); });
} }
//GCJ02 转换为 WGS84 //GCJ02 转换为 WGS84
function gcj02towgs84(lng, lat) { function gcj02towgs84(lng, lat) {
if (out_of_china(lng, lat)) { if (out_of_china(lng, lat)) {
return [lng, lat] return [lng, lat]
} } else {
else {
var dlat = transformlat(lng - 105.0, lat - 35.0); var dlat = transformlat(lng - 105.0, lat - 35.0);
var dlng = transformlng(lng - 105.0, lat - 35.0); var dlng = transformlng(lng - 105.0, lat - 35.0);
var radlat = lat / 180.0 * PI.value; var radlat = lat / 180.0 * PI.value;
...@@ -646,10 +727,12 @@ function gcj02towgs84(lng, lat) { ...@@ -646,10 +727,12 @@ function gcj02towgs84(lng, lat) {
return [(lng * 2) - mglng, (lat * 2) - mglat]; return [(lng * 2) - mglng, (lat * 2) - mglat];
} }
} }
//判断是否在国内,不在国内则不做偏移 //判断是否在国内,不在国内则不做偏移
function out_of_china(lng, lat) { function out_of_china(lng, lat) {
return (lng < 72.004 || lng > 137.8347) || ((lat < 0.8293 || lat > 55.8271) || false); return (lng < 72.004 || lng > 137.8347) || ((lat < 0.8293 || lat > 55.8271) || false);
} }
function transformlat(lng, lat) { function transformlat(lng, lat) {
var ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * Math.sqrt(Math.abs(lng)); var ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * Math.sqrt(Math.abs(lng));
ret += (20.0 * Math.sin(6.0 * lng * PI.value) + 20.0 * Math.sin(2.0 * lng * PI.value)) * 2.0 / 3.0; ret += (20.0 * Math.sin(6.0 * lng * PI.value) + 20.0 * Math.sin(2.0 * lng * PI.value)) * 2.0 / 3.0;
...@@ -657,6 +740,7 @@ function transformlat(lng, lat) { ...@@ -657,6 +740,7 @@ function transformlat(lng, lat) {
ret += (160.0 * Math.sin(lat / 12.0 * PI.value) + 320 * Math.sin(lat * PI.value / 30.0)) * 2.0 / 3.0; ret += (160.0 * Math.sin(lat / 12.0 * PI.value) + 320 * Math.sin(lat * PI.value / 30.0)) * 2.0 / 3.0;
return ret return ret
} }
function transformlng(lng, lat) { function transformlng(lng, lat) {
var ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * Math.sqrt(Math.abs(lng)); var ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * Math.sqrt(Math.abs(lng));
ret += (20.0 * Math.sin(6.0 * lng * PI.value) + 20.0 * Math.sin(2.0 * lng * PI.value)) * 2.0 / 3.0; ret += (20.0 * Math.sin(6.0 * lng * PI.value) + 20.0 * Math.sin(2.0 * lng * PI.value)) * 2.0 / 3.0;
...@@ -664,6 +748,7 @@ function transformlng(lng, lat) { ...@@ -664,6 +748,7 @@ function transformlng(lng, lat) {
ret += (150.0 * Math.sin(lng / 12.0 * PI.value) + 300.0 * Math.sin(lng / 30.0 * PI.value)) * 2.0 / 3.0; ret += (150.0 * Math.sin(lng / 12.0 * PI.value) + 300.0 * Math.sin(lng / 30.0 * PI.value)) * 2.0 / 3.0;
return ret return ret
} }
//根据经纬度计算两点之间的距离 //根据经纬度计算两点之间的距离
function latlngDiff(lat1, lng1, lat2, lng2) { function latlngDiff(lat1, lng1, lat2, lng2) {
var s = 999999999; var s = 999999999;
...@@ -688,6 +773,7 @@ function latlngDiff(lat1, lng1, lat2, lng2) { ...@@ -688,6 +773,7 @@ function latlngDiff(lat1, lng1, lat2, lng2) {
// console.log('定位距离',s); // console.log('定位距离',s);
return s; return s;
} }
function Rad(d) { function Rad(d) {
return (d * Math.PI) / 180.0; return (d * Math.PI) / 180.0;
} }
...@@ -732,6 +818,7 @@ function locSignIn(obj) { ...@@ -732,6 +818,7 @@ function locSignIn(obj) {
}) })
} }
} }
// 微信图片上传到本地 // 微信图片上传到本地
function getWxImgX(localId, date) { function getWxImgX(localId, date) {
showToast({ showToast({
...@@ -762,8 +849,8 @@ function getWxImgX(localId, date) { ...@@ -762,8 +849,8 @@ function getWxImgX(localId, date) {
const name = `image.${localData.split(";")[0].split(":")[1].split("/")[1]}`; const name = `image.${localData.split(";")[0].split(":")[1].split("/")[1]}`;
let fileBlob = new Blob([new Uint8Array(data)], { type: type }); let fileBlob = new Blob([new Uint8Array(data)], {type: type});
const file = new File([fileBlob], name, { type: type }); const file = new File([fileBlob], name, {type: type});
afterRead(file, localId, date); afterRead(file, localId, date);
}, },
error: function (e) { error: function (e) {
...@@ -771,6 +858,7 @@ function getWxImgX(localId, date) { ...@@ -771,6 +858,7 @@ function getWxImgX(localId, date) {
}, },
}); });
} }
// 文件读取完成后的回调函数 // 文件读取完成后的回调函数
function afterRead(file, localIds, date) { function afterRead(file, localIds, date) {
// console.log(localIds); // console.log(localIds);
...@@ -792,6 +880,7 @@ function afterRead(file, localIds, date) { ...@@ -792,6 +880,7 @@ function afterRead(file, localIds, date) {
} }
}) })
} }
// 签到按钮 // 签到按钮
function signBt(obj) { function signBt(obj) {
if (obj.sign != 2) { if (obj.sign != 2) {
...@@ -823,6 +912,7 @@ function signBt(obj) { ...@@ -823,6 +912,7 @@ function signBt(obj) {
}) })
} }
} }
// 测试用,修改签到时间限制 // 测试用,修改签到时间限制
// function changeSignTimeTest(obj) { // function changeSignTimeTest(obj) {
// if (obj.sign == 0) { // if (obj.sign == 0) {
...@@ -853,6 +943,7 @@ function leadLog(obj) { ...@@ -853,6 +943,7 @@ function leadLog(obj) {
} }
}) })
} }
// 复制教师日志 // 复制教师日志
function copyLog() { function copyLog() {
// 创建input元素 // 创建input元素
...@@ -873,11 +964,9 @@ function copyLog() { ...@@ -873,11 +964,9 @@ function copyLog() {
onMounted(() => { onMounted(() => {
addDutySearchSelectList() addDutySearchSelectList()
signList.authUserInfo = Cookies.get('user-info').split('"').indexOf('值班领导') === -1 ? -1 : 1 signList.authUserInfo = Cookies.get('user-info').split('"').indexOf('值班领导') === -1 ? -1 : 1
api.GetAttendanceList().then(res => { api.GetAttendanceList().then(res => {
// console.log('获取考勤列表', res.response) // console.log('获取考勤列表', res.response)
attendanceList.value = res.response attendanceList.value = res.response
// 微信初始化 // 微信初始化
initWxPosition() initWxPosition()
}) })
......
...@@ -15,7 +15,16 @@ ...@@ -15,7 +15,16 @@
<!-- <router-link to="/messageDetails">--> <!-- <router-link to="/messageDetails">-->
<!-- <van-button>123123</van-button>--> <!-- <van-button>123123</van-button>-->
<!-- </router-link>--> <!-- </router-link>-->
<van-cell-group style="width: 100%;margin-top: 10px"> <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="dateContainer">
<div class="left" @click="reductionDate"> <div class="left" @click="reductionDate">
<span class="SlideButton"><van-icon name="arrow-left"/></span> <span class="SlideButton"><van-icon name="arrow-left"/></span>
...@@ -58,7 +67,6 @@ ...@@ -58,7 +67,6 @@
<template #extra> <template #extra>
<van-tag type="primary" plain> <van-tag type="primary" plain>
<span>{{ item.watchtypename + '-' + item.dept_name + '-' + item.campusname }}</span></van-tag> <span>{{ item.watchtypename + '-' + item.dept_name + '-' + item.campusname }}</span></van-tag>
</template> </template>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
...@@ -105,6 +113,12 @@ let GetWatchListObject = reactive({ ...@@ -105,6 +113,12 @@ let GetWatchListObject = reactive({
GetWatchListInitArray: [], GetWatchListInitArray: [],
}) })
const swiperPrev = () => {
console.log("🚀swiperPrev🚀🚀,",)
}
const swiperNext = (e) => {
console.log("🚀🚀swiperNext🚀,", e)
}
const onRefresh = async () => { const onRefresh = async () => {
dateArray.loading = true dateArray.loading = true
GetWatchListObject.startTime = dayjs().format('YYYY-MM-DD') GetWatchListObject.startTime = dayjs().format('YYYY-MM-DD')
...@@ -263,6 +277,14 @@ onMounted(() => { ...@@ -263,6 +277,14 @@ onMounted(() => {
}) })
</script> </script>
<style scoped lang="less"> <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 { .container {
.dateContainer { .dateContainer {
......
...@@ -15,9 +15,8 @@ export default defineConfig({ ...@@ -15,9 +15,8 @@ export default defineConfig({
], ],
base: './', base: './',
server: { server: {
// host: "127.0.0.1", // host: "0.0.0.0",
// cors: true, // cors: true,
// port: 8991, // port: 8991,
// open: true, //自动打开 // open: true, //自动打开
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或