作业列表修改
This commit is contained in:
parent
54d4694ed5
commit
4f5952a740
@ -98,8 +98,8 @@ export function GetActivitiesStatisticsPageList(a, b, c, d,e,f) {
|
|||||||
return http.get(`/api/Activities/GetActivitiesStatisticsPageList?ActivitiesName=${a}&StartDate=${b}&EndDate=${c}&CategoryId=${d}&PageIndex=${e}&PageSize=${f}`)
|
return http.get(`/api/Activities/GetActivitiesStatisticsPageList?ActivitiesName=${a}&StartDate=${b}&EndDate=${c}&CategoryId=${d}&PageIndex=${e}&PageSize=${f}`)
|
||||||
}
|
}
|
||||||
// 作业列表
|
// 作业列表
|
||||||
export function GetHomeWorkPageList(a, b, c, d, e, f,g) {
|
export function GetHomeWorkPageList(a, b, c, d, e, f,g,h) {
|
||||||
return http.get(`/api/HomeWork/GetHomeWorkPageList?WorkType=${a}&StudentScope=${b}&WorkStatus=${c}&StartTime=${d}&EndTime=${e}&PageIndex=${f}&PageSize=${g}`)
|
return http.get(`/api/HomeWork/GetHomeWorkPageList?WorkType=${a}&StudentScope=${b}&WorkStatus=${c}&StartTime=${d}&EndTime=${e}&PageIndex=${f}&PageSize=${g}&TeacherName=${h}`)
|
||||||
}
|
}
|
||||||
// 作业下学生列表
|
// 作业下学生列表
|
||||||
export function GetHomeWorkStudents(a,b,c) {
|
export function GetHomeWorkStudents(a,b,c) {
|
||||||
|
|||||||
@ -14,8 +14,8 @@ let loadingStatus = false;
|
|||||||
console.log(process.env.NODE_ENV, 'process.env.NODE_ENV')
|
console.log(process.env.NODE_ENV, 'process.env.NODE_ENV')
|
||||||
if (process.env.NODE_ENV == 'development') {
|
if (process.env.NODE_ENV == 'development') {
|
||||||
// axios.defaults.baseURL = 'http://101.132.164.149:9991/';
|
// axios.defaults.baseURL = 'http://101.132.164.149:9991/';
|
||||||
// axios.defaults.baseURL = 'http://212.129.154.46:9991/'; //测试
|
|
||||||
axios.defaults.baseURL = 'http://8.153.108.90:9991/'; //测试
|
axios.defaults.baseURL = 'http://8.153.108.90:9991/'; //测试
|
||||||
|
// axios.defaults.baseURL = 'https://smartsports.yuedongsports.com/'; //正式
|
||||||
// axios.defaults.baseURL = 'http://192.168.0.146:9991/'; //汤龙本地
|
// axios.defaults.baseURL = 'http://192.168.0.146:9991/'; //汤龙本地
|
||||||
// axios.defaults.baseURL = 'http://47.101.60.251:9991/';
|
// axios.defaults.baseURL = 'http://47.101.60.251:9991/';
|
||||||
// axios.defaults.baseURL = 'http://localhost:9991/';
|
// axios.defaults.baseURL = 'http://localhost:9991/';
|
||||||
|
|||||||
@ -12,12 +12,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="one">
|
<div class="one">
|
||||||
<p>学生范围:</p>
|
<p>教师手机:</p>
|
||||||
<!-- <el-input v-model="data.classroomModeData.name" placeholder="请输入赛事名称" /> -->
|
<el-input v-model="data.classroomModeData.teacherPhone" placeholder="请输入教师手机" />
|
||||||
<el-select v-model="data.classroomModeData.range" class="m-2">
|
|
||||||
<el-option v-for="item in data.classroomModeData.rangeData" :key="item.id" :label="item.name"
|
|
||||||
:value="item.id" />
|
|
||||||
</el-select>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="one">
|
<div class="one">
|
||||||
<p>状态:</p>
|
<p>状态:</p>
|
||||||
@ -58,10 +54,12 @@
|
|||||||
<el-scrollbar height="400px">
|
<el-scrollbar height="400px">
|
||||||
<div class="one" v-for="(item, index) in data.detailWorkData" :key="index">
|
<div class="one" v-for="(item, index) in data.detailWorkData" :key="index">
|
||||||
<p>{{ item.studentName }}</p>
|
<p>{{ item.studentName }}</p>
|
||||||
<p v-if="item.workStatus == 2" @click="workDetail(item)">作业详情</p>
|
<!-- <p v-if="item.workStatus == 2" @click="workDetail(item)">作业详情</p> -->
|
||||||
|
<p v-if="item.workStatus == 1">未完成</p>
|
||||||
|
<p v-else-if="data.nowIsTime">用时:{{ formatTime(item.value) }}</p>
|
||||||
|
<p v-else>个数:{{ item.value }}</p>
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -107,15 +105,28 @@ const data = ref({
|
|||||||
classroomModeData: {
|
classroomModeData: {
|
||||||
refreshTable: false,
|
refreshTable: false,
|
||||||
type: '',
|
type: '',
|
||||||
|
teacherPhone: '',
|
||||||
typeData: [{
|
typeData: [{
|
||||||
id: '',
|
id: '',
|
||||||
name: '全部'
|
name: '全部'
|
||||||
}, {
|
}, {
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '跳绳作业'
|
name: '跳绳'
|
||||||
}, {
|
}, {
|
||||||
id: 2,
|
id: 2,
|
||||||
name: '体育作业'
|
name: '开合跳'
|
||||||
|
}, {
|
||||||
|
id: 3,
|
||||||
|
name: '仰卧起坐'
|
||||||
|
}, {
|
||||||
|
id: 4,
|
||||||
|
name: '俯卧撑'
|
||||||
|
}, {
|
||||||
|
id: 5,
|
||||||
|
name: '深蹲起'
|
||||||
|
}, {
|
||||||
|
id: 7,
|
||||||
|
name: '高抬腿'
|
||||||
}],
|
}],
|
||||||
range: '',
|
range: '',
|
||||||
rangeData: [{
|
rangeData: [{
|
||||||
@ -134,9 +145,12 @@ const data = ref({
|
|||||||
name: '全部'
|
name: '全部'
|
||||||
}, {
|
}, {
|
||||||
id: 1,
|
id: 1,
|
||||||
name: '进行中'
|
name: '未开始'
|
||||||
}, {
|
}, {
|
||||||
id: 2,
|
id: 2,
|
||||||
|
name: '进行中'
|
||||||
|
}, {
|
||||||
|
id: 3,
|
||||||
name: '已结束'
|
name: '已结束'
|
||||||
}],
|
}],
|
||||||
startTime: [],
|
startTime: [],
|
||||||
@ -157,7 +171,7 @@ const data = ref({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "作业类型",
|
label: "作业类型",
|
||||||
prop: "workTypeStr",
|
prop: "workTypeName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "老师",
|
label: "老师",
|
||||||
@ -169,7 +183,7 @@ const data = ref({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "年级-班级",
|
label: "年级-班级",
|
||||||
prop: "activitiesStatusName",
|
prop: "gradeAndClassName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "学生范围",
|
label: "学生范围",
|
||||||
@ -208,7 +222,7 @@ const data = ref({
|
|||||||
width: 800,
|
width: 800,
|
||||||
title: '作业详情'
|
title: '作业详情'
|
||||||
},
|
},
|
||||||
|
nowIsTime: false,
|
||||||
})
|
})
|
||||||
// 切换tab
|
// 切换tab
|
||||||
function changeTab(e) {
|
function changeTab(e) {
|
||||||
@ -231,7 +245,7 @@ function workDetail(e) {
|
|||||||
function cancle(val) {
|
function cancle(val) {
|
||||||
if (val == 0) {
|
if (val == 0) {
|
||||||
data.value.dialogData.dialogVisible = false
|
data.value.dialogData.dialogVisible = false
|
||||||
data.value.tabActive=1
|
data.value.tabActive = 1
|
||||||
} else {
|
} else {
|
||||||
data.value.detailDialogData.dialogVisible = false
|
data.value.detailDialogData.dialogVisible = false
|
||||||
}
|
}
|
||||||
@ -239,7 +253,7 @@ function cancle(val) {
|
|||||||
function confirm(val) {
|
function confirm(val) {
|
||||||
if (val == 0) {
|
if (val == 0) {
|
||||||
data.value.dialogData.dialogVisible = false
|
data.value.dialogData.dialogVisible = false
|
||||||
data.value.tabActive=1
|
data.value.tabActive = 1
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -251,12 +265,22 @@ async function toView(e) {
|
|||||||
if (e) {
|
if (e) {
|
||||||
console.log(e, 'eeeee')
|
console.log(e, 'eeeee')
|
||||||
data.value.dialogData.dialogVisible = true
|
data.value.dialogData.dialogVisible = true
|
||||||
data.value.dialogData.title = '详情'
|
data.value.dialogData.title = e.workTypeName
|
||||||
|
data.value.nowIsTime = e.workModeType == 2 ? true : false
|
||||||
GetHomeWorkStudentsApi(e)
|
GetHomeWorkStudentsApi(e)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatTime(seconds) {
|
||||||
|
// 1. 计算小时、分钟、秒
|
||||||
|
const hours = Math.floor(seconds / 3600); // 总小时数
|
||||||
|
const minutes = Math.floor((seconds % 3600) / 60); // 剩余分钟数
|
||||||
|
const secs = seconds % 60; // 剩余秒数
|
||||||
|
|
||||||
|
// 2. 补零确保两位数(使用 padStart)
|
||||||
|
return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(secs).padStart(2, '0')}`;
|
||||||
|
}
|
||||||
// 点击重置
|
// 点击重置
|
||||||
function reset() {
|
function reset() {
|
||||||
data.value.classroomModeData.refreshTable = false
|
data.value.classroomModeData.refreshTable = false
|
||||||
@ -295,7 +319,7 @@ onMounted(() => {
|
|||||||
async function GetActivitiesPageListApi() {
|
async function GetActivitiesPageListApi() {
|
||||||
let k = data.value.classroomModeData
|
let k = data.value.classroomModeData
|
||||||
try {
|
try {
|
||||||
const res = await _api.GetHomeWorkPageList(k.type, k.range, k.statu, k.startTime ? k.startTime[0] : '', k.startTime ? k.startTime[1] : '', k.tableNeed.pageIndex, k.tableNeed.pageSize);
|
const res = await _api.GetHomeWorkPageList(k.type, k.range, k.statu, k.startTime ? k.startTime[0] : '', k.startTime ? k.startTime[1] : '', k.tableNeed.pageIndex, k.tableNeed.pageSize, k.teacherPhone);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
// console.log(res.data, 'res.GetActivitiesPageListApi')
|
// console.log(res.data, 'res.GetActivitiesPageListApi')
|
||||||
@ -351,6 +375,12 @@ async function GetSubmittedAssignmentsApi(val) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.dialogManage {
|
.dialogManage {
|
||||||
.tab {
|
.tab {
|
||||||
@ -388,10 +418,11 @@ async function GetSubmittedAssignmentsApi(val) {
|
|||||||
|
|
||||||
.one {
|
.one {
|
||||||
width: calc(100% - 40px);
|
width: calc(100% - 40px);
|
||||||
height: 40px;
|
height: 45px;
|
||||||
display: flex;
|
display: grid;
|
||||||
align-items: center;
|
grid-template-columns: 1fr 1fr;
|
||||||
justify-content: space-around;
|
// align-items: center;
|
||||||
|
// justify-content: space-around;
|
||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
@ -400,6 +431,7 @@ async function GetSubmittedAssignmentsApi(val) {
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666566;
|
color: #666566;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
p:nth-of-type(2) {
|
p:nth-of-type(2) {
|
||||||
@ -449,23 +481,25 @@ async function GetSubmittedAssignmentsApi(val) {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin: 12px auto;
|
margin: 12px auto;
|
||||||
|
padding: 0 20px;
|
||||||
|
|
||||||
.one {
|
.one {
|
||||||
width: auto;
|
width: 300px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
// margin-right: 20px;
|
// margin-right: 20px;
|
||||||
margin-left: 20px;
|
// margin-left: 20px;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
width: auto;
|
width: 100px;
|
||||||
text-align: center;
|
text-align: right;
|
||||||
|
padding-right: 15px;
|
||||||
font-family: PingFangSC;
|
font-family: PingFangSC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: rgba(0, 0, 0, 0.85);
|
color: rgba(0, 0, 0, 0.85);
|
||||||
margin-right: 5px;
|
// margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-cascader) {
|
:deep(.el-cascader) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user