Commit c2d9530e authored by 罗超's avatar 罗超

1

parent 6d3e981d
......@@ -16,7 +16,13 @@
<view class="section-name"> {{ data.length }}个合同 </view>
</view>
</view>
<view v-for="(item, index) in data" :key="index" class="data-item">
<van-empty description="暂无数据" v-if="data.length === 0" />
<view
v-for="(item, index) in data"
:key="index"
class="data-item"
v-if="data.length > 0"
>
<view class="contract-name">
<van-image
width="22rpx"
......@@ -38,7 +44,6 @@
v-if="item.IsCompanySeal === 1"
/>
</view>
<van-skeleton title row="10" :loading="pageloading" />
</view>
</template>
......
......@@ -5,65 +5,117 @@
<view class="top flex flex_start_center">
<van-image
round
fit="cover"
width="55rpx"
height="55rpx"
src="https://img.yzcdn.cn/vant/cat.jpeg"
:src="userInfo.UserIcon ? userInfo.UserIcon : userInfo.GroupLogo"
style="margin-right: 20rpx"
class="flex flex_start_center"
/>
<view class="grow one_line name">{{ data.name }}的请假</view>
<view class="status">{{ data.status }}</view>
<view class="grow one_line name"
>{{ data.detail.CreateByName }}的请假</view
>
<view
class="status"
:class="{
status1: data.detail.VerifyStatus === 4,
status2: data.detail.VerifyStatus === 6,
status3: data.detail.VerifyStatus === 0,
}"
>{{ data.detail.AuditStatusName }}</view
>
</view>
<view class="flex label-next margin-t-b-15"
><view class="label">请假类型</view>{{ data.type }}</view
>
><view class="label">请假类型</view>
<text v-if="data.detail.DataObj.LeaveType === 1">事假</text>
<text v-if="data.detail.DataObj.LeaveType === 2">病假</text>
</view>
<view class="flex label-next margin-t-b-15"
><view class="label">开始时间</view>{{ data.startTime }}</view
><view class="label">开始时间</view
>{{ data.detail.DataObj.LeaveInfoList[0].ClassDate }}
{{ data.detail.DataObj.LeaveInfoList[0].StartTime }}</view
>
<view class="flex label-next margin-t-b-15"
><view class="label">结束时间</view>{{ data.endTime }}</view
><view class="label">结束时间</view
>{{
data.detail.DataObj.LeaveInfoList[
data.detail.DataObj.LeaveInfoList.length - 1
].ClassDate
}}
{{
data.detail.DataObj.LeaveInfoList[
data.detail.DataObj.LeaveInfoList.length - 1
].EndTime
}}</view
>
<view class="flex label-next margin-t-b-15"
><view class="label">课时</view>{{ data.times }}</view
><view class="label">课时</view>{{ data.detail.hours }}</view
>
<view class="flex label-next margin-t-b-15"
><view class="label">请假事由</view>{{ data.reason }}</view
><view class="label">请假事由</view
>{{ data.detail.DataObj.Remarks || "无" }}</view
>
</view>
<view class="Approval-box">
<view class="flex flex_start_center">
<view class="grow one_line name">{{ data.name }} 发起申请</view>
<view class="date">{{ data.createTime }}</view>
<van-image
round
width="55rpx"
height="55rpx"
:src="userInfo.UserIcon ? userInfo.UserIcon : userInfo.GroupLogo"
style="margin-right: 20rpx"
class="flex flex_start_center"
/>
<view class="grow one_line name"
>{{ data.detail.CreateByName }} 发起申请</view
>
<view class="date">{{ data.detail.CreateTime }}</view>
</view>
<view
v-for="(item, index) in Approval"
v-for="(item, index) in ApprovalList"
:key="index"
class="Approval-item"
>
<view class="height-line"></view>
<view class="flex flex_between_center">
<view class="flex flex_start_center">
<van-image
round
width="55rpx"
height="55rpx"
src="https://img.yzcdn.cn/vant/cat.jpeg"
style="margin-right: 20rpx"
class="flex flex_start_center"
/>
<view style="margin-right: 20rpx" class="name">
{{ item.ApprovalMan }}
</view>
<view class="status">
{{ item.status }}
v-if="index > 0"
><view
v-for="(_item, _index) in item.SubList"
:key="_index"
class="Approval-item"
>
<view class="height-line"></view>
<view class="flex flex_between_center">
<view class="flex flex_start_center">
<!-- <van-image
round
width="55rpx"
height="55rpx"
fit="cover"
src="https://img.yzcdn.cn/vant/cat.jpeg"
style="margin-right: 20rpx"
class="flex flex_start_center"
/> -->
<view class="Approval-status flex flex_center_center">{{
_item.AuditStatusName
}}</view>
<view style="margin-right: 20rpx" class="name">
{{ _item.AduitName }}
</view>
<view
class="status"
:class="{
status1: _item.AuditStatus === 3,
status2: _item.AuditStatus === 1,
}"
>
{{ _item.AuditStatusName }}
</view>
</view>
<view class="date">{{ _item.CreateTime }}</view>
</view>
<view class="date">{{ item.time }}</view>
</view>
</view>
</view>
<view class="Approval-box">
<view class="Approval-box" style="display: none">
<view class="flex flex_start_center">
<view class="title">抄送人</view>
<text class="copy-tip">(审批通过后,通知抄送人)</text>
......@@ -105,19 +157,13 @@ import {
import { getEduReceiptInfo } from "../../api/index";
export default {
setup() {
let userInfo = uni.getStorageSync("userInfo");
let data = reactive({
data: {
name: "李思思",
headerImg: "",
createTime: "2021.08.20",
type: "事假",
startTime: "2021-07-20 09:35",
endTime: "2021-07-20 09:35",
reason: "家中有事",
status: "审批已通过",
times: 2,
detail: {},
},
Approval: [
userInfo,
ApprovalList: [
{
ApprovalMan: "李琴",
img: "",
......@@ -147,6 +193,9 @@ export default {
let methods = {
async getDetail(id) {
let res = await getEduReceiptInfo({ Id: id });
if (res) {
data.ApprovalList = res.Data;
}
},
};
let that = methods;
......@@ -157,10 +206,17 @@ export default {
},
onLoad(options) {
let { ctx } = getCurrentInstance();
let data = JSON.parse(decodeURIComponent(options.data));
let n = 0;
data.DataObj.LeaveInfoList.map((item) => {
n += item.TimeHour;
});
uni.setNavigationBarTitle({
title: "请假详情",
});
ctx.getDetail(options.id);
ctx.data.detail = data;
ctx.data.detail.hours = n;
ctx.getDetail(data.Id);
},
};
</script>
......@@ -248,4 +304,22 @@ export default {
.copy-item {
margin-top: 30rpx;
}
.Approval-status {
width: 55rpx;
height: 55rpx;
border-radius: 50%;
font-size: 20rpx;
margin-right: 20rpx;
background-color: #00acf9;
color: #fff;
}
.status1 {
color: #ff3816;
}
.status2 {
color: #111111;
}
.status3 {
color: #4fc08d;
}
</style>
......@@ -9,13 +9,13 @@
v-if="data.length > 0"
>
<view v-for="(item, index) in data" :key="index" class="leave-item">
<view class="top flex flex_start_center" @click="jumpPage(item.Id)">
<view class="top flex flex_start_center" @click="jumpPage(item)">
<van-image
round
width="55rpx"
fit="cover"
height="55rpx"
src="https://img.yzcdn.cn/vant/cat.jpeg"
:src="userInfo.UserIcon ? userInfo.UserIcon : userInfo.GroupLogo"
style="margin-right: 20rpx"
class="flex flex_start_center"
/>
......@@ -96,22 +96,25 @@ export default {
Loadmore,
},
setup() {
let userInfo = uni.getStorageSync("userInfo");
let Toast = inject("$toast");
let data = reactive({
data: [],
pageState: "more",
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
pageSize: 10,
},
PageCount: 0,
userInfo,
});
let methods = {
jumpPage(id) {
jumpPage(item) {
uni.navigateTo({
url: "/pages/course/askForLeaveDetail?id=" + id,
url:
"/pages/course/askForLeaveDetail?data=" +
encodeURIComponent(JSON.stringify(item)),
});
},
lower(e) {
......@@ -127,8 +130,12 @@ export default {
},
async getList() {
let res = await getStudentLeaveList(data.msg);
data.data = res.Data.PageData;
data.PageCount = res.Data.PageCount;
if (data.msg.pageIndex === 1) {
data.data = res.Data.PageData;
} else {
data.data = [...res.Data.PageData, ...data.data];
}
if (data.msg.pageIndex === res.Data.PageCount) {
data.pageState = "none";
} else {
......
......@@ -15,7 +15,8 @@
<view class="section-name"> {{ data.length }}个章节 </view>
</view>
</view>
<view v-for="(item, index) in data" :key="index">
<van-empty description="暂无课程" v-if="data.length === 0" />
<view v-for="(item, index) in data" :key="index" v-if="data.length > 0">
<view class="chapter" v-if="item.ChildList.length > 0">
<view class="flex flex_between_center">
<view class="flex flex_between_center">
......
<template>
<view class="">
<view class="" :style="{ 'padding-top': `${statusBarHeight}px` }">
<view style="height: 100rpx"></view>
<view class="navbar">
<van-nav-bar title="课表" title-class="navTitle">
<van-nav-bar title="课表" fixed title-class="navTitle">
<view slot="left" class="chooseDate flex flex_start_center">
<van-icon
name="arrow-left"
......@@ -117,6 +118,7 @@ import {
} from "vue";
import { getWeek, getToday } from "../../utils/date.js";
import { getStundentPlanStatistical } from "../../api/index";
import { getSystemInfo } from "../../utils/index";
export default {
name: "",
props: {},
......@@ -200,6 +202,7 @@ export default {
StartTime: "",
EndTime: "",
},
statusBarHeight: 0,
dataList: [],
});
let methods = {
......@@ -227,6 +230,9 @@ export default {
activeDay.value = today.day;
}
sliceWeek(today);
getSystemInfo((res) => {
data.statusBarHeight = res.statusBarHeight;
});
});
let that = methods;
return {
......
<template>
<view>
<van-nav-bar>
<view :style="{ 'padding-top': `${statusBarHeight}px` }">
<view style="height: 100rpx"></view>
<van-nav-bar fixed>
<van-icon name="cross" slot="left" size="30rpx" @click="back" />
<view
slot="title"
......@@ -40,6 +41,7 @@ import {
computed,
onMounted,
} from "vue";
import { getSystemInfo } from "../../utils/index";
import Sub1 from "./subject1";
export default {
components: { Sub1 },
......@@ -47,6 +49,7 @@ export default {
let { refs } = getCurrentInstance();
let data = reactive({
time: 2 * 60 * 60 * 1000,
statusBarHeight: 0,
});
let methods = {
jumpPage() {
......@@ -61,7 +64,11 @@ export default {
uni.navigateBack();
},
};
onMounted(() => {});
onMounted(() => {
getSystemInfo((res) => {
data.statusBarHeight = res.statusBarHeight;
});
});
return {
...toRefs(data),
...methods,
......
......@@ -138,9 +138,7 @@ export default {
console.log(131, e);
},
};
onMounted(() => {
console.log(135, data);
});
onMounted(() => {});
return {
...toRefs(data),
...methods,
......
......@@ -11,14 +11,14 @@
width="100rpx"
height="100rpx"
fit="cover"
src="https://img.yzcdn.cn/vant/cat.jpeg"
:src="userinfo.UserIcon ? userinfo.UserIcon : userinfo.GroupLogo"
class="headimg"
@click="jumpPage('/pages/login/login')"
/>
<view class="grow">
<view class="name"> {{ userinfo.AccountName }} </view>
<view class="phone">
{{ userinfo.EnterPhone }}
{{ userinfo.Account }}
</view>
</view>
<view class="saleInfo">
......
......@@ -80,54 +80,55 @@ export default {
clearTimeout();
},
authLogin() {
that.getUserProfile();
},
getUserProfile() {
//新的获取用户资料
wx.getUserProfile({
desc: "用于完善资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (info) => {
console.log(83, info);
that.getUserInfo(info);
},
fail: () => {
uni.showToast({
title: "微信登录授权失败",
icon: "none",
});
},
});
},
getUserInfo(info) {
uni.getProvider({
service: "oauth",
success: function (res) {
if (~res.provider.indexOf("weixin")) {
uni.login({
provider: "weixin",
success: (_res) => {
console.log(107, _res);
that.getunionid(_res.code);
},
fail: () => {
uni.showToast({
title: "微信登录授权失败",
icon: "none",
});
},
});
} else {
uni.showToast({
title: "请先安装微信或升级版本",
icon: "none",
});
}
},
});
// that.getUserProfile();
},
// getUserProfile() {
// //新的获取用户资料
// wx.getUserProfile({
// desc: "用于完善资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
// success: (info) => {
// console.log(83, info);
// that.getUserInfo(info);
// },
// fail: () => {
// uni.showToast({
// title: "微信登录授权失败",
// icon: "none",
// });
// },
// });
// },
// getUserInfo(info) {
// uni.getProvider({
// service: "oauth",
// success: function (res) {
// if (~res.provider.indexOf("weixin")) {
// uni.login({
// provider: "weixin",
// success: (_res) => {
// console.log(107, _res);
// that.getunionid(_res.code);
// },
// fail: () => {
// uni.showToast({
// title: "微信登录授权失败",
// icon: "none",
// });
// },
// });
// } else {
// uni.showToast({
// title: "请先安装微信或升级版本",
// icon: "none",
// });
// }
// },
// });
// },
async login() {
let res = await login(msg);
if (res) {
res.Data.Account = msg.Account;
uni.setStorageSync("userInfo", res.Data);
Toast.success("登录成功");
setTimeout(() => {
......@@ -135,19 +136,19 @@ export default {
}, 1000);
}
},
getunionid(code) {
let appid = "wxaa108410092fd276";
let secret = "31cd99f321612f95b0006905032de7f0";
uni.request({
url: `https://api.weixin.qq.com/sns/jscode2session?appid=${appid}&secret=${secret}&js_code=${code}&grant_type=authorization_code`,
success: (res) => {
console.log(150, res);
},
fail: (err) => {
console.log(154, err);
},
});
},
// getunionid(code) {
// let appid = "wxaa108410092fd276";
// let secret = "31cd99f321612f95b0006905032de7f0";
// uni.request({
// url: `https://api.weixin.qq.com/sns/jscode2session?appid=${appid}&secret=${secret}&js_code=${code}&grant_type=authorization_code`,
// success: (res) => {
// console.log(150, res);
// },
// fail: (err) => {
// console.log(154, err);
// },
// });
// },
};
onMounted(() => {});
let that = methods;
......
......@@ -15,7 +15,8 @@
<view class="section-name"> {{ data.length }}个章节 </view>
</view>
</view>
<view v-for="(item, index) in data" :key="index">
<van-empty description="暂无数据" v-if="data.length === 0" />
<view v-for="(item, index) in data" :key="index" v-if="data.length > 0">
<view class="chapter" @click="openLayer">
<view class="flex flex_between_center">
<view class="flex flex_between_center">
......
......@@ -15,7 +15,7 @@
<view class="section-name"> {{ SurplusHours }}课时 </view>
</view>
</view>
<van-empty description="暂无内容" v-if="data.length === 0" />
<van-empty description="暂无数据" v-if="data.length === 0" />
<view v-for="(item, index) in data" :key="index" v-if="data.length > 0">
<view class="chapter" @click="openLayer">
<view class="flex flex_start_center">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment