作业渲染
This commit is contained in:
parent
fa605103f4
commit
80c5030e28
|
@ -4,9 +4,9 @@ const install = (Vue, vm) => {
|
|||
// baseUrl: 'http://2087p773d1.wicp.vip', // 请求的本域名
|
||||
// baseUrl: 'https://lchighpass.zhieasy.cn',
|
||||
// baseUrl: 'http://speaking.viphk.91tunnel.com',//测试https://speaking.iava.top/
|
||||
// baseUrl: 'http://89h83e.natappfree.cc',//
|
||||
baseUrl: 'http://yml.dev.bc3.top',//
|
||||
// baseUrl: 'https://ielts.zhieasy.cn',//正式
|
||||
baseURL: 'https://api.admin-v2.langsi.online',
|
||||
// baseURL: 'https://api.admin-v2.langsi.online',
|
||||
// baseUrl: 'http://i3qsdb.natappfree.cc',//正式
|
||||
|
||||
// baseUrl: 'http://hwihh5.natappfree.cc',
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
</view>
|
||||
<view class="class_card_right">
|
||||
<view class="class_card_right_top">
|
||||
{{item.name}}
|
||||
{{item.teacherInfo.nickname}}
|
||||
</view>
|
||||
<view class="class_card_right_bot">
|
||||
听力
|
||||
{{item.roleText}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -48,17 +48,17 @@ export default {
|
|||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
// this.classid=option.id
|
||||
this.classid=15
|
||||
this.classid=option.id
|
||||
// this.classid=15
|
||||
this.getclassteacher()
|
||||
},
|
||||
methods: {
|
||||
getclassteacher(){
|
||||
this.$u.get(`https://api.admin-v2.langsi.online/admin-api/classroom/teacher/list?classId=${this.classid}`).then(res => {
|
||||
this.$u.get(`/admin-api/classroom/teacher/list?classId=${this.classid}`).then(res => {
|
||||
|
||||
|
||||
if (res.code == 0) {
|
||||
this.teacherlist=res.data.list
|
||||
this.teacherlist=res.data
|
||||
// this.classlist = res.data.list
|
||||
// this.isloding = false
|
||||
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="card_bigbox">
|
||||
<view class="work_card" v-for="(item,index ) in work" :key="index"
|
||||
<view class="work_card" v-for="(item,index ) in workinfo" :key="index"
|
||||
:class="item.iswork === '1' ? 'act1' : (item.iswork === '2' ? 'act3' : 'default')">
|
||||
<view class="work_card_top">
|
||||
<view class="work_card_top_left">
|
||||
<view class="work_card_top_left_img">
|
||||
<image src="https://file.langsi.online/yasiimg/web/static/u07sCQb6mW6OSamVr1Va"></image>
|
||||
</view>
|
||||
课后作业
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="work_card_top_right"
|
||||
:class="isalready == true ? 'act2' : ''">
|
||||
|
@ -47,32 +47,29 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="work_card_cont_box">
|
||||
<view class="work_card_cont">
|
||||
<view class="work_card_cont" v-for="(items,indexs ) in item.infos" :key="indexs" v-if="indexs<3">
|
||||
<view class="work_card_cont_point"></view>
|
||||
<view class="work_card_cont_text">
|
||||
IELTS 18-Test 2-Part 1
|
||||
<view class="work_card_cont_text" v-if="items.classify==1||items.classify==2">
|
||||
{{items.paperName}}-{{items.testName}}
|
||||
</view>
|
||||
<view class="work_card_cont_tag">
|
||||
<view class="work_card_cont_tag" v-if="items.classify==1" style="background: rgba(27,225,178,0.1);color: #1BE1B2;">
|
||||
听力
|
||||
</view>
|
||||
<view class="work_card_cont_tag" v-if="items.classify==2" style="background: rgba(242,182,42,0.2);color: #F2AA02 ;">
|
||||
阅读
|
||||
</view>
|
||||
<view class="work_card_cont_tag" v-if="items.classify==3" style="background:rgba(63,122,242,0.2);color: #3F7AF2 ;">
|
||||
写作
|
||||
</view>
|
||||
<view class="work_card_cont_tag" v-if="items.classify==4" style="background: rgba(242,63,235,0.1);color: #F23FEB ;">
|
||||
口语
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="work_card_cont">
|
||||
<view class="work_card_cont" v-if="item.infos.length>3">
|
||||
<view class="work_card_cont_point" style="margin-right: 10rpx;"></view>
|
||||
<view class="work_card_cont_point" style="margin-right: 10rpx;"></view>
|
||||
<view class="work_card_cont_point"></view>
|
||||
<view class="work_card_cont_text">
|
||||
IELTS 18-Test 2-Part 1
|
||||
</view>
|
||||
<view class="work_card_cont_tag">
|
||||
听力
|
||||
</view>
|
||||
</view>
|
||||
<view class="work_card_cont">
|
||||
<view class="work_card_cont_point"></view>
|
||||
<view class="work_card_cont_text">
|
||||
IELTS 18-Test 2-Part 1
|
||||
</view>
|
||||
<view class="work_card_cont_tag">
|
||||
听力
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="work_card_info_box">
|
||||
|
@ -83,7 +80,7 @@
|
|||
描述
|
||||
</view>
|
||||
<view class="work_card_info_bot">
|
||||
最好在中午十二点之前完成交上作业,过期不候
|
||||
{{item.des}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="work_card_info_box">
|
||||
|
@ -97,7 +94,8 @@
|
|||
</view>
|
||||
|
||||
<view class="work_card_info_bot">
|
||||
02-12 12:00
|
||||
{{item.doneTime}}
|
||||
<!-- {{ formatTimestamp(item.createTime) }} -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -124,10 +122,40 @@ export default {
|
|||
{ "iswork": "2" },
|
||||
{ "iswork": "0" }
|
||||
],
|
||||
classid:0,
|
||||
workinfo:[]
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log(option);
|
||||
this.classid=option.classId
|
||||
// this.classid=15
|
||||
this.getworklist()
|
||||
},
|
||||
methods: {
|
||||
|
||||
formatTimestamp(timestamp) {
|
||||
const date = new Date(timestamp);
|
||||
const year = date.getFullYear();
|
||||
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = date.getDate().toString().padStart(2, '0');
|
||||
const hours = date.getHours().toString().padStart(2, '0');
|
||||
const minutes = date.getMinutes().toString().padStart(2, '0');
|
||||
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}`;
|
||||
},
|
||||
|
||||
getworklist(){
|
||||
this.$u.get(`/admin-api/classroom/work-record/list?classId=${this.classid}`).then(res => {
|
||||
|
||||
|
||||
if (res.code == 0) {
|
||||
this.workinfo=res.data
|
||||
// this.classlist = res.data.list
|
||||
// this.isloding = false
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -305,7 +333,7 @@ page {
|
|||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 22rpx;
|
||||
|
||||
width: 100%;
|
||||
.work_card_info_top {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
|
|
@ -52,9 +52,9 @@
|
|||
<u-icon name="arrow-right" color="#646D7B" size="16"></u-icon>
|
||||
</view>
|
||||
<view class="view_images" >
|
||||
<image :src="item.memberInfo.avatar" mode="" v-for="(item,index ) in classinfo.members" :key="index" v-if="index<=4"></image>
|
||||
<view class="shenlue" v-if="classinfo.members.length>4">
|
||||
{{classinfo.members.length}}
|
||||
<image src="https://file.langsi.online/user/img/headimg.png" mode="" v-for="(item,index ) in classinfo.teachers" :key="index" v-if="index<=4"></image>
|
||||
<view class="shenlue" v-if="classinfo.teachers.length>4">
|
||||
{{classinfo.teachers.length}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -62,14 +62,14 @@
|
|||
|
||||
</view>
|
||||
<view class="view_operation">
|
||||
<view class="view_class">
|
||||
<view class="view_class" >
|
||||
<text>作业安排</text>
|
||||
<u-icon name="arrow-right" color="#646D7B" size="16"></u-icon>
|
||||
</view>
|
||||
<view class="view_no" v-if="isShow">
|
||||
<view class="view_no" v-if="workinfo.length<1" @click.stop="toaddwork()">
|
||||
暂未安排作业哦!<text class="organization">去安排</text>
|
||||
</view>
|
||||
<view class="view_show" v-if="!isShow">
|
||||
<view class="view_show" v-if="workinfo.length>0" @click.stop="toworkdetail()">
|
||||
<view class="view_crossbar" v-for="(item,index) in operation" :key="index">
|
||||
<image :src="item.image" mode=""></image>
|
||||
<text>{{item.title}}</text>
|
||||
|
@ -157,8 +157,19 @@
|
|||
|
||||
});
|
||||
},
|
||||
toworkdetail(){
|
||||
let classinofs=this.classid
|
||||
console.log('跳转作业详情');
|
||||
uni.navigateTo({
|
||||
url: "/pages/Mystudent/arrange_work?classId=" +classinofs
|
||||
}).then(res => {
|
||||
|
||||
}).catch(err => {
|
||||
|
||||
});
|
||||
},
|
||||
getclassinfo() {
|
||||
this.$u.get(`https://api.admin-v2.langsi.online/admin-api/classroom/detail?id=${this.classid}`).then(res => {
|
||||
this.$u.get(`/admin-api/classroom/detail?id=${this.classid}`).then(res => {
|
||||
|
||||
|
||||
if (res.code == 0) {
|
||||
|
@ -172,7 +183,7 @@
|
|||
})
|
||||
},
|
||||
getworkinfo() {
|
||||
this.$u.get(`https://api.admin-v2.langsi.online/admin-api/classroom/work-record/list?classId=${this.classid}`).then(res => {
|
||||
this.$u.get(`/admin-api/classroom/work-record/list?classId=${this.classid}`).then(res => {
|
||||
|
||||
|
||||
if (res.code == 0) {
|
||||
|
|
|
@ -312,7 +312,7 @@
|
|||
onLoad(option) {
|
||||
uni.removeStorageSync('selectedClassInfo');
|
||||
uni.removeStorageSync('selectedStuInfo');
|
||||
uni.removeStorageSync('selectforwork');
|
||||
// uni.removeStorageSync('selectforwork');
|
||||
this.classinfo = JSON.parse(decodeURIComponent(option.classinfo))
|
||||
// let classinofs = [{
|
||||
// name: '阅读5班',
|
||||
|
@ -567,6 +567,7 @@
|
|||
workDetailsPageReqVOList:workDetailsPageReqVOList
|
||||
|
||||
}
|
||||
console.log(data,'datadata');
|
||||
this.$u.post(`https://api.admin-v2.langsi.online/admin-api/classroom/work-record/add`, data).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.uToast.show({
|
||||
|
@ -587,8 +588,7 @@
|
|||
this.fuwei()
|
||||
}
|
||||
});
|
||||
// let json = JSON.stringify(data)
|
||||
// console.log(json, 'workDetailsPageReqVOList');
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user