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

1

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