Commit 8e75e5cc authored by 罗超's avatar 罗超

1

parent 2749788b
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
<view style="padding-left: 10rpx"> <view style="padding-left: 10rpx">
<van-uploader <van-uploader
multiple multiple
accept="all" accept="media"
:file-list="fileList" :file-list="fileList"
image-fit="aspectFill" image-fit="aspectFill"
preview-size="120rpx" preview-size="120rpx"
...@@ -173,7 +173,6 @@ import { ...@@ -173,7 +173,6 @@ import {
import { getdate } from "../../utils/date"; import { getdate } from "../../utils/date";
import { uploadFile } from "../../utils/index"; import { uploadFile } from "../../utils/index";
import { getStundentPlanStatistical, setStudentLeave } from "../../api/index"; import { getStundentPlanStatistical, setStudentLeave } from "../../api/index";
let { ClassId } = uni.getStorageSync("indexData");
export default { export default {
setup() { setup() {
let Toast = inject("$toast"); let Toast = inject("$toast");
...@@ -208,7 +207,7 @@ export default { ...@@ -208,7 +207,7 @@ export default {
// url: "https://img.yzcdn.cn/vant/leaf.jpg", // url: "https://img.yzcdn.cn/vant/leaf.jpg",
// }, // },
], ],
totalLeaveTimes: 0, totalLeaveTimes: 0, //总课时
leaveMsg: { leaveMsg: {
Id: 0, Id: 0,
ClassId: 0, ClassId: 0,
...@@ -296,7 +295,7 @@ export default { ...@@ -296,7 +295,7 @@ export default {
let msg = { let msg = {
StartTime: data.data.startTime, StartTime: data.data.startTime,
EndTime: data.data.endTime, EndTime: data.data.endTime,
ClassId: ClassId, ClassId: data.leaveMsg.ClassId,
}; };
let res = await getStundentPlanStatistical(msg); let res = await getStundentPlanStatistical(msg);
data.isShowAllCheck = true; data.isShowAllCheck = true;
...@@ -310,9 +309,7 @@ export default { ...@@ -310,9 +309,7 @@ export default {
}, },
customUpload(event) { customUpload(event) {
const { file } = event.detail; const { file } = event.detail;
console.log("295", file);
uploadFile("stuLeave", file, (res) => { uploadFile("stuLeave", file, (res) => {
console.log("297", res);
data.fileList.push(res); data.fileList.push(res);
}); });
}, },
...@@ -369,10 +366,11 @@ export default { ...@@ -369,10 +366,11 @@ export default {
...methods, ...methods,
}; };
}, },
onLoad() { onLoad(options) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "请假", title: "请假",
}); });
this.leaveMsg.ClassId = parseInt(options.classId);
}, },
}; };
</script> </script>
......
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
<view class="btn-box"> <view class="btn-box">
<van-button <van-button
custom-class="leave-btn" custom-class="leave-btn"
@click="jumpPage('/pages/course/askForLeave')" @click="
jumpPage(`/pages/course/askForLeave?classId=${data.ClassId} `)
"
v-if="item.IsLeave === 1" v-if="item.IsLeave === 1"
>请假</van-button >请假</van-button
> >
......
...@@ -49,8 +49,9 @@ export function UploadSelfFile(path, file, callback, configObj) { ...@@ -49,8 +49,9 @@ export function UploadSelfFile(path, file, callback, configObj) {
uploadConfig = cacheInfo.UploadConfig; uploadConfig = cacheInfo.UploadConfig;
} }
//获取文件扩展名 //获取文件扩展名
var index = file.name.lastIndexOf("."); console.log(52, file)
var suffix = file.name.substr(index); var index = file.url.lastIndexOf(".");
var suffix = file.url.substr(index);
var timestamp1 = Date.parse(new Date()) + "_" + (Math.ceil(Math.random() * 1000)); var timestamp1 = Date.parse(new Date()) + "_" + (Math.ceil(Math.random() * 1000));
let str = '/Test'; let str = '/Test';
var newPath = "/EduSystem" + str + '/Upload/' + path; var newPath = "/EduSystem" + str + '/Upload/' + path;
......
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