<template>
|
<div class="classManagePage-box">
|
<div class="classManagePage-nav">
|
<el-breadcrumb :separator-icon="ArrowRight">
|
<el-breadcrumb-item>我的班级</el-breadcrumb-item>
|
<el-breadcrumb-item>{{ classInfo?.name }}</el-breadcrumb-item>
|
<el-breadcrumb-item>作业管理</el-breadcrumb-item>
|
</el-breadcrumb>
|
</div>
|
<div class="classManagePage-content">
|
<div class="cartClass">
|
<!-- <el-tabs v-model="jobState" @tab-click="tabCart">
|
<el-tab-pane label="全部" name="all"></el-tab-pane>
|
<el-tab-pane label="进行中" name="payment"></el-tab-pane>
|
<el-tab-pane label="已过期" name="complete"></el-tab-pane>
|
</el-tabs> -->
|
<div class="titleOptions">
|
<span>作业管理</span>
|
</div>
|
</div>
|
<div class="headerBox">
|
<div class="searchBox">
|
<el-input
|
v-model="searchKey"
|
clearable
|
@clear="searchTask"
|
@keydown.enter="searchTask"
|
placeholder="请输入关键字"
|
>
|
<template #append>
|
<el-button type="primary" @click="searchTask" class="searchBtn" :icon="Search" />
|
</template>
|
</el-input>
|
</div>
|
<el-button
|
style="float: right"
|
v-if="userInfo?.role == 'Teacher'"
|
@click="openWork()"
|
type="primary"
|
round
|
>
|
<el-icon size="large" style="margin-right: 3px"><Document /></el-icon>
|
新建作业
|
</el-button>
|
</div>
|
<div class="listBox">
|
<el-table
|
:data="tableData"
|
:header-cell-style="{ background: '#eee' }"
|
max-height="600px"
|
style="width: 100%"
|
v-loading="pages.loading"
|
>
|
<el-table-column label="序号" prop="id" width="70"> </el-table-column>
|
<el-table-column label="名称" prop="name"> </el-table-column>
|
<el-table-column label="作业开始日期" prop="beginDate"> </el-table-column>
|
<el-table-column label="作业结束日期" prop="endDate"> </el-table-column>
|
<el-table-column label="作业完成情况(人数)" prop="submitCount"></el-table-column>
|
<el-table-column label="操作" width="200" #default="scope">
|
<el-button
|
link
|
style="color: #409eff"
|
v-if="scope.row.state == 'Normal'"
|
@click="detail(scope.row)"
|
>详情</el-button
|
>
|
<!-- v-if="scope.row.state != 'Normal'" -->
|
<el-button
|
link
|
type="primary"
|
v-if="scope.row.state != 'Normal'"
|
@click="edit(scope.row)"
|
>编辑</el-button
|
>
|
<el-button
|
link
|
style="color: #67c23a"
|
v-if="scope.row.state == 'Waiting'"
|
@click="releaseWork(scope.row)"
|
>发布</el-button
|
>
|
<el-button link type="danger" @click="removeTaskItem(scope.row)">移除</el-button>
|
</el-table-column>
|
</el-table>
|
<div class="pageBox">
|
<el-pagination
|
v-model:current-page="pages.currentPage"
|
:page-size="pages.pageSize"
|
:size="'small'"
|
:disabled="pages.count <= 1"
|
layout="total, prev, pager, next"
|
:total="pages.count"
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
/>
|
</div>
|
</div>
|
<!-- 新建作业 -->
|
<el-dialog
|
class="customDialog"
|
destroy-on-close
|
v-model="visible"
|
:title="visibleEdit ? '更新作业' : '新建作业'"
|
width="1650"
|
:before-close="close"
|
align-center
|
>
|
<div class="stepBox">
|
<el-steps
|
style="max-width: 600px; margin: auto"
|
:active="stepActive"
|
finish-status="success"
|
align-center
|
>
|
<el-step :title="visibleEdit ? '更新作业' : '新建作业'" />
|
<el-step title="添加题目" />
|
<el-step title="设置分数" />
|
<el-step title="完成" />
|
</el-steps>
|
</div>
|
<div class="newTaskBox" v-if="stepActive == 0">
|
<el-row class="row-center">
|
<el-col :span="2" class="labelItem">
|
<div class="grid-content ep-bg-purple" />
|
名称
|
</el-col>
|
<el-col :span="20">
|
<div class="grid-content ep-bg-purple-light" />
|
<el-input
|
v-model="taskItem.homeworkName"
|
placeholder="请填写名称"
|
size="large"
|
clearable
|
style="width: 600px"
|
/>
|
</el-col>
|
</el-row>
|
<el-row class="row-center">
|
<el-col :span="2" class="labelItem">
|
<div class="grid-content ep-bg-purple" />
|
开始日期
|
</el-col>
|
<el-col :span="20">
|
<div class="grid-content ep-bg-purple-light" />
|
<!-- <el-input v-model="taskItem.beginDate" placeholder="请选择开始日期" size="large" clearable /> -->
|
<el-date-picker
|
v-model="taskItem.homeworkStartingDate"
|
type="date"
|
placeholder="请选择开始日期"
|
size="large"
|
style="width: 600px"
|
/>
|
</el-col>
|
</el-row>
|
<el-row class="row-center">
|
<el-col :span="2" class="labelItem">
|
<div class="grid-content ep-bg-purple" />
|
结束日期
|
</el-col>
|
<el-col :span="20">
|
<div class="grid-content ep-bg-purple-light" />
|
<el-date-picker
|
v-model="taskItem.homeworkSubmissionDate"
|
type="date"
|
placeholder="请选择结束日期"
|
size="large"
|
style="width: 600px"
|
/>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="2" class="labelItem">
|
<div class="grid-content ep-bg-purple" />
|
描述
|
</el-col>
|
<el-col :span="20">
|
<div class="grid-content ep-bg-purple-light" />
|
<el-input
|
v-model="taskItem.explain"
|
placeholder="请填写说明"
|
type="textarea"
|
:rows="12"
|
size="large"
|
clearable
|
style="width: 600px"
|
/>
|
</el-col>
|
</el-row>
|
</div>
|
<div class="workBox" v-if="stepActive == 1">
|
<div class="workLeft">
|
<el-tabs
|
v-model="activeTabs"
|
style="margin: auto"
|
class="demo-tabs"
|
@tab-change="handleClick"
|
>
|
<el-tab-pane label="系统" name="1"></el-tab-pane>
|
<!-- <el-tab-pane label="教材" name="2"></el-tab-pane> -->
|
</el-tabs>
|
<div class="workList" v-if="workLeftList.length > 0 && !leftLoading">
|
<!-- <div class="searchBox" v-if="activeTabs == '1'">
|
<el-input v-model="sysWorkKey" clearable @clear="searchWork" placeholder="请输入关键字">
|
<template #append>
|
<el-button type="primary" class="searchBtn" @click="searchWork" :icon="Search" />
|
</template>
|
</el-input>
|
</div> -->
|
<div class="work-list-item" v-for="(item, index) in workLeftList" :key="index">
|
<el-tooltip :content="item.name" placement="bottom-end" effect="light">
|
<p
|
:class="
|
index == sysIndex ? 'work-list-item-text leftBg' : 'work-list-item-text'
|
"
|
@click="clickRightItem(item, index)"
|
>
|
{{ item.name }}
|
</p>
|
</el-tooltip>
|
</div>
|
</div>
|
<div
|
class="workList"
|
v-if="workLeftList.length == 0 && !leftLoading"
|
style="display: flex; align-items: center; justify-content: center"
|
>
|
<el-empty image-size="100px" />
|
</div>
|
<div
|
class="workList"
|
v-if="leftLoading"
|
style="
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
background-color: none;
|
"
|
v-loading="leftLoading"
|
></div>
|
</div>
|
<div class="workRight">
|
<div class="right-list-title">
|
<span>题目列表</span>
|
<!-- <el-button type="primary" round size="small" icon="Plus">新建</el-button> -->
|
</div>
|
<div class="right-list-components">
|
<questionDom
|
v-if="workRightList.length > 0 && !rightLoading"
|
:questionList="workRightList"
|
@selectQuestion="selectQuestion"
|
:noCheckbox="true"
|
/>
|
<div v-if="rightLoading" v-loading="rightLoading"></div>
|
<el-empty v-if="workRightList.length == 0 && !rightLoading" />
|
</div>
|
</div>
|
</div>
|
<div class="workBox" v-if="stepActive == 2">
|
<div class="workLeft" style="width: 230px">
|
<div class="scoreTitle">
|
<span>题目类型</span>
|
</div>
|
<div class="workList" v-if="scoreLeftList.length > 0">
|
<div class="work-list-item" v-for="(item, index) in scoreLeftList" :key="index">
|
<p
|
:class="
|
index == scoreIndex ? 'work-list-item-text leftBg' : 'work-list-item-text'
|
"
|
@click="scoreItem(item, index)"
|
>
|
{{ item.name }} ({{ item.data.length }})
|
</p>
|
</div>
|
</div>
|
<div
|
class="workList"
|
v-if="scoreLeftList.length == 0"
|
style="display: flex; align-items: center; justify-content: center"
|
>
|
<el-empty image-size="100px" />
|
</div>
|
</div>
|
<div class="workRight">
|
<div class="right-list-title">
|
<span>题目列表</span>
|
</div>
|
<div class="right-score-components">
|
<div class="scoreBtn">
|
<!-- <el-button size="small">上移</el-button>
|
<el-button size="small">下移</el-button> -->
|
<div class="setScore" v-if="scoreLeftList.length > 0">
|
<span>批量设置分数:</span>
|
<el-input-number
|
v-model="scoreValue"
|
:min="0"
|
:max="100"
|
controls-position="right"
|
@change="changeScore"
|
/>
|
<el-button v-if="scoreValue > 0" style="margin-left: 10px" @click="setScoreArr"
|
>确认</el-button
|
>
|
</div>
|
</div>
|
<el-table
|
:data="scoreDataList"
|
max-height="500px"
|
:header-cell-style="{ background: '#eee' }"
|
style="width: 100%"
|
v-loading="selectedLoading"
|
>
|
<el-table-column prop="index" label="序号" width="100" />
|
<el-table-column prop="name" label="题目">
|
<template #default="scope">
|
<span>{{ scope.row.questionStem.stemTxt }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="分数" width="120">
|
<template #default="scope">
|
<span style="color: #ff6c00">{{ scope.row.score }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="设置" width="260">
|
<template #default="scope">
|
<el-button
|
link
|
v-if="!scope.row.isInput"
|
type="primary"
|
size="small"
|
@click="openSetScore(scope.row)"
|
>设置分数</el-button
|
>
|
<el-input-number
|
v-if="scope.row.isInput"
|
v-model="scoreItemValue"
|
:min="0"
|
:max="100"
|
:controls="false"
|
size="small"
|
@blur="setScore(scope.row)"
|
/>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
</div>
|
</div>
|
<div class="workBox" style="height: 720px" v-if="stepActive == 3">
|
<div class="finishBg">
|
<img src="@/assets//images/class/finish.png" alt="" />
|
<span>作业已创建完成</span>
|
</div>
|
</div>
|
<template #footer v-if="stepActive == 0">
|
<div style="width: 100%; display: flex; justify-content: flex-end">
|
<el-button @click="nextStep" v-if="visibleEdit"> 跳过 </el-button>
|
<el-button type="primary" :loading="newLoading" @click="newTask"> 确认 </el-button>
|
</div>
|
</template>
|
<template #footer v-if="stepActive != 3 && stepActive != 0">
|
<div class="leftFooter" :style="{ width: stepActive == 2 ? '230px' : '' }"></div>
|
<div class="dialog-footer">
|
<div class="check-list-box" v-if="stepActive == 1">
|
<el-checkbox v-model="checkAll" @change="handleCheckAllChange"> 全选 </el-checkbox>
|
</div>
|
<div class="btnGroup" v-if="stepActive == 1">
|
<el-button plain :disabled="checkData.length == 0" @click="addCmsitem">
|
加入作业
|
</el-button>
|
<el-button plain @click="selectedData"> 查看已选 </el-button>
|
<el-button type="primary" @click="nextStep"> 下一步 </el-button>
|
</div>
|
<div class="btnGroup" v-if="stepActive == 2">
|
<el-button type="primary" plain @click="preStep"> 上一步 </el-button>
|
<el-button plain @click="lookWork"> 预览作业 </el-button>
|
<el-button type="primary" @click="nextStep"> 下一步 </el-button>
|
</div>
|
</div>
|
</template>
|
<template #footer v-if="stepActive == 3">
|
<div style="width: 100%; display: flex; justify-content: flex-end">
|
<el-button type="primary" @click="close"> 完 成 </el-button>
|
</div>
|
</template>
|
</el-dialog>
|
<!-- 查看已选 -->
|
<el-dialog
|
class="customDialog"
|
align-center
|
v-model="visibleView"
|
destroy-on-close
|
width="900"
|
>
|
<template #header>
|
<div class="viewTitle">已选题目</div>
|
</template>
|
<div class="viewContent">
|
<div class="workBox">
|
<div class="workLeft" style="width: 200px">
|
<div class="workList" style="height: 100%" v-if="selectedTypeList.length > 0">
|
<div class="work-list-item" v-for="(item, index) in selectedTypeList" :key="index">
|
<p
|
:class="
|
index == selectedIndex ? 'work-list-item-text leftBg' : 'work-list-item-text'
|
"
|
@click="selectedItems(item, index)"
|
>
|
{{ item.name }}<span style="margin-left: 5px">({{ item.data.length }})</span>
|
</p>
|
</div>
|
</div>
|
<div
|
class="workList"
|
v-if="selectedTypeList.length == 0"
|
style="display: flex; align-items: center; justify-content: center"
|
>
|
<el-empty image-size="100px" />
|
</div>
|
</div>
|
<div class="workRight">
|
<div class="right-list-components">
|
<questionDom
|
v-if="selectedDataList.length > 0 && !selectedLoading"
|
:questionList="selectedDataList"
|
@selectQuestion="selectQuestion"
|
@delete-item="deleteCmsItem"
|
:noCheckbox="false"
|
:isDelete="true"
|
/>
|
<div v-if="selectedLoading" v-loading="selectedLoading"></div>
|
<el-empty v-if="selectedDataList.length == 0 && !selectedLoading" />
|
</div>
|
</div>
|
</div>
|
</div>
|
<template #footer>
|
<div class="selectedFooter">
|
<el-button type="primary" @click="visibleView = false"> 确认 </el-button>
|
</div>
|
</template>
|
</el-dialog>
|
<!-- 预览作业 -->
|
<el-dialog
|
class="customDialog"
|
align-center
|
v-model="visibleLook"
|
destroy-on-close
|
width="900"
|
>
|
<template #header>
|
<div class="viewTitle">预览作业</div>
|
</template>
|
<div class="viewContent">
|
<div class="workBox">
|
<div class="workLeft" style="width: 200px">
|
<div class="workList" style="height: 100%" v-if="lookLeftList.length > 0">
|
<div class="work-list-item" v-for="(item, index) in lookLeftList" :key="index">
|
<p
|
:class="
|
index == lookIndex ? 'work-list-item-text leftBg' : 'work-list-item-text'
|
"
|
@click="lookItems(item, index)"
|
>
|
{{ item.name }}<span style="margin-left: 5px">({{ item.data.length }})</span>
|
</p>
|
</div>
|
</div>
|
<div
|
class="workList"
|
v-if="lookLeftList.length == 0"
|
style="display: flex; align-items: center; justify-content: center"
|
>
|
<el-empty image-size="100px" />
|
</div>
|
</div>
|
<div class="workRight">
|
<div class="right-list-components">
|
<questionDom
|
v-if="lookDataList.length > 0 && !selectedLoading"
|
:questionList="lookDataList"
|
@selectQuestion="selectQuestion"
|
@delete-item="deleteCmsItem"
|
:is-preview="visibleLook"
|
/>
|
<div v-if="selectedLoading" v-loading="selectedLoading"></div>
|
<el-empty v-if="lookDataList.length == 0 && !selectedLoading" />
|
</div>
|
</div>
|
</div>
|
</div>
|
<template #footer>
|
<div class="selectedFooter">
|
<el-button type="primary" @click="visibleLook = false"> 确认 </el-button>
|
</div>
|
</template>
|
</el-dialog>
|
<!-- 发布作业 -->
|
<el-dialog
|
class="customDialog"
|
title="发布作业"
|
v-model="visiblePub"
|
destroy-on-close
|
width="500"
|
align-center
|
:before-close="close"
|
>
|
<div class="pubContent">
|
<span>发布日期:</span>
|
<el-date-picker
|
v-model="pubValue"
|
type="daterange"
|
range-separator="--"
|
start-placeholder="开始日期"
|
end-placeholder="结束日期"
|
@change="selectPubDate"
|
/>
|
</div>
|
<template #footer>
|
<div class="selectedFooter" style="padding: 0">
|
<el-button type="primary" @click="submitWork"> 确认 </el-button>
|
</div>
|
</template>
|
</el-dialog>
|
</div>
|
</div>
|
</template>
|
|
<script setup lang="ts">
|
import { reactive, ref, onMounted, inject, watch } from 'vue'
|
import { Search, ArrowRight } from '@element-plus/icons-vue'
|
import { useRoute, useRouter } from 'vue-router'
|
import questionDom from './components/questionDom.vue'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
import moment from 'moment'
|
|
const route: any = useRoute()
|
const router = useRouter()
|
const MG: any = inject('MG')
|
const config: any = inject('config')
|
const tool: any = inject('toolClass')
|
const classInfo = JSON.parse(route.query.classInfo)
|
const jobState = ref('all')
|
const searchKey = ref('')
|
const dataList = ref([])
|
const userInfo = ref()
|
const defaultCmsPath = ref('')
|
|
// 获取task参数
|
const filterData = ref([
|
{
|
value: config.taskType.homeWork,
|
field: 'Type',
|
subFilters: []
|
}
|
])
|
// task
|
const taskData = reactive({
|
id: '',
|
description: '',
|
rootCmsItemId: '',
|
name: '',
|
type: '',
|
state: '',
|
groupId: '',
|
beginDate: '',
|
endDate: ''
|
})
|
// question Key
|
const questionKey = [
|
'Name',
|
'Embedded_QuestionBank_AnalysisCon',
|
'Embedded_QuestionBank_Answer',
|
'Embedded_QuestionBank_Difficulty',
|
'Embedded_QuestionBank_KnowledgePoint',
|
'Embedded_QuestionBank_Option',
|
'Embedded_QuestionBank_OptionStyle',
|
'Embedded_QuestionBank_QuestionType',
|
'Embedded_QuestionBank_Score',
|
'Embedded_QuestionBank_Stem',
|
'Embedded_QuestionBank_StemStyle'
|
]
|
// dialognew
|
const visible = ref(false)
|
const stepActive = ref(0)
|
const activeTabs = ref('1')
|
// 新建作业
|
const newLoading = ref(false)
|
const taskItem = reactive({
|
homeworkName: '',
|
homeworkStartingDate: '',
|
homeworkSubmissionDate: '',
|
explain: ''
|
})
|
let pages = reactive({
|
currentPage: 1,
|
page: 1,
|
pageSize: 15,
|
count: 0,
|
loading: false
|
})
|
// dialogedit
|
const visibleEdit = ref(false)
|
// dialogView
|
const visibleView = ref(false)
|
// dialogLook
|
const visibleLook = ref(false)
|
// left
|
const workLeftList: any = ref([])
|
const leftLoading = ref(false)
|
const sysIndex = ref(0)
|
// 分数
|
const scoreValue = ref(0) // 批量
|
const scoreItemValue = ref('') // 单一
|
const scoreLeftList: any = ref([])
|
const scoreDataList: any = ref([])
|
const scoreIndex = ref(0)
|
const scoreData: any = ref([]) // 自存储题目分数
|
const isSet = ref(false)
|
// right
|
const workRightList: any = ref([])
|
const rightLoading = ref(false)
|
const checkAll = ref(false)
|
const selectCache: any = ref([])
|
const checkData: any = ref([])
|
// 作业列表
|
const tableData: any = ref([])
|
// 已选作业资源
|
const selectedTypeList: any = ref([])
|
const selectedDataList: any = ref([])
|
const selectedLoading = ref(false)
|
const selectedIndex = ref(0)
|
//预览作业
|
const lookLeftList: any = ref([])
|
const lookDataList: any = ref([])
|
const lookIndex = ref(0)
|
// 发布作业
|
const visiblePub = ref(false)
|
const pubValue = ref(null)
|
|
onMounted(() => {
|
const userCache: any = localStorage.getItem(config.userInfoKey)
|
if (userCache) {
|
userInfo.value = JSON.parse(userCache)
|
}
|
defaultCmsPath.value = classInfo.bookRefCode ? 'jsek_digitalTextbooks' : 'defaultGoodsStore3'
|
getTaskList()
|
})
|
|
// 发布
|
const selectPubDate = (item: any) => {
|
if (item.length > 0) {
|
taskItem.homeworkStartingDate = moment(item[0]).format('YYYY-MM-DDTHH:mm:ss')
|
taskItem.homeworkSubmissionDate = moment(item[1]).format('YYYY-MM-DDTHH:mm:ss')
|
}
|
}
|
|
// 分页
|
const handleSizeChange = (val: number) => {
|
pages.pageSize = val
|
getTaskList()
|
}
|
|
const handleCurrentChange = (val: number) => {
|
pages.page = val
|
pages.currentPage = val
|
getTaskList()
|
}
|
|
// 新建任务{Waiting:未开始,Normal:进行中,Ended:已结束}
|
const newTask = () => {
|
newLoading.value = true
|
if (!taskItem.homeworkName) {
|
ElMessage({
|
type: 'warning',
|
message: '请填写作业名称 '
|
})
|
newLoading.value = false
|
return false
|
}
|
if (!taskItem.homeworkStartingDate) {
|
ElMessage({
|
type: 'warning',
|
message: '请填写作业开始时间 '
|
})
|
newLoading.value = false
|
return false
|
}
|
if (!taskItem.homeworkSubmissionDate) {
|
ElMessage({
|
type: 'warning',
|
message: '请填写作业结束时间'
|
})
|
newLoading.value = false
|
return false
|
}
|
if (!visibleEdit.value) {
|
const data = {
|
name: taskItem.homeworkName,
|
description: taskItem.explain,
|
icon: '',
|
type: config.taskType.homeWork,
|
state: 'Waiting',
|
groupId: classInfo?.id,
|
order: 0,
|
beginDate: taskItem.homeworkStartingDate,
|
endDate: taskItem.homeworkSubmissionDate,
|
duration: 0,
|
config: JSON.stringify({ scoreData: [] })
|
}
|
MG.edu
|
.newTask(data)
|
.then((res: any) => {
|
taskData.id = res
|
})
|
.catch((e: any) => {
|
newLoading.value = false
|
console.log(e)
|
})
|
} else {
|
updateTask()
|
}
|
setTimeout(() => {
|
newLoading.value = false
|
stepActive.value++
|
getTaskList()
|
}, 600)
|
}
|
|
// 更新任务
|
const updateTask = () => {
|
const data = {
|
id: taskData.id,
|
name: taskItem.homeworkName,
|
description: taskItem.explain,
|
icon: '',
|
type: taskData.type,
|
state: taskData.state,
|
order: 0,
|
beginDate: moment(taskItem.homeworkStartingDate).format('YYYY-MM-DDTHH:mm:ss'),
|
endDate: moment(taskItem.homeworkSubmissionDate).format('YYYY-MM-DDTHH:mm:ss'),
|
duration: 0,
|
config: JSON.stringify({ scoreData: scoreData.value })
|
}
|
MG.edu
|
.updateTask(data)
|
.then((res: any) => {
|
if (res) {
|
if (stepActive.value == 2) {
|
getTaskCmsList()
|
}
|
getTaskList()
|
}
|
})
|
.catch((err: any) => {
|
console.log(err, 'updateTask')
|
})
|
}
|
|
// 获取任务列表
|
const getTaskList = (filter?: any[], search?: any[]) => {
|
const filterList = filter ?? filterData.value
|
const searchList = search ?? []
|
pages.loading = true
|
const data = {
|
start: (pages.page - 1) * pages.pageSize,
|
size: pages.pageSize,
|
sort: {
|
type: 'Desc',
|
field: 'CreateDate'
|
},
|
filterList,
|
searchList,
|
groupId: classInfo?.id
|
}
|
MG.edu
|
.getTaskList(data)
|
.then((res: any) => {
|
pages.count = res.totalSize
|
if (res.datas.length > 0) {
|
tableData.value = res.datas?.map((item: any) => {
|
// const currTime = Number(sessionStorage.currentDate);
|
// const taskTime = moment(item.endDate).valueOf()
|
// if(taskTime < currTime){
|
// console.log(taskTime,item.name,'7878')
|
// }
|
return {
|
...item,
|
beginDate: moment(item.beginDate).format('YYYY-MM-DD'),
|
endDate: moment(item.endDate).format('YYYY-MM-DD')
|
}
|
})
|
if (taskData.id) {
|
scoreData.value = []
|
const obj = res.datas.find((item: any) => item.id == taskData.id)
|
taskData.id = obj.id
|
taskData.rootCmsItemId = obj.rootCmsItemId
|
if (obj.config) {
|
scoreData.value = JSON.parse(obj.config).scoreData
|
}
|
taskData.name = obj.name
|
taskData.groupId = classInfo?.id
|
taskData.state = obj.state
|
taskData.type = obj.type
|
taskData.beginDate = moment(obj.beginDate).format('YYYY-MM-DDTHH:mm:ss')
|
taskData.endDate = moment(obj.endDate).format('YYYY-MM-DDTHH:mm:ss')
|
}
|
} else {
|
tableData.value = []
|
}
|
pages.loading = false
|
})
|
.catch((e: any) => {
|
pages.loading = false
|
console.log(e)
|
})
|
}
|
|
// 搜索任务
|
const searchTask = () => {
|
const data = [
|
{
|
compareType: 'Contains',
|
keywords: searchKey.value,
|
field: 'Name'
|
}
|
]
|
pages.page = 1
|
pages.currentPage = 1
|
getTaskList(undefined, data)
|
}
|
|
// 删除资源
|
const removeTaskItem = (item: any) => {
|
const data = {
|
ids: [item.id]
|
}
|
MG.edu
|
.delTask(data)
|
.then((res: any) => {
|
if (res) {
|
ElMessage({
|
message: '删除成功',
|
type: 'success'
|
})
|
getTaskList()
|
}
|
})
|
.catch((e: any) => {
|
ElMessage({
|
message: '删除失败',
|
type: 'error'
|
})
|
})
|
}
|
|
// 为任务添加资源
|
const addCmsitem = () => {
|
const data = {
|
taskId: taskData.id,
|
requests: checkData.value?.map((item: any) => {
|
return {
|
path: String(taskData.rootCmsItemId),
|
cmsItemId: item.id
|
}
|
})
|
}
|
MG.edu
|
.addTaskCmsItemList(data)
|
.then((res: any) => {
|
if (res) {
|
ElMessage({
|
message: '已加入',
|
type: 'success'
|
})
|
selectCache.value = []
|
checkData.value = []
|
checkAll.value = false
|
workRightList.value?.forEach((citem: any) => {
|
citem.data.forEach((titem: any) => (titem.isCheck = false))
|
})
|
}
|
})
|
.catch((e: any) => {
|
ElMessage({
|
message: '加入失败',
|
type: 'error'
|
})
|
})
|
}
|
|
// 获取任务下的资源列表
|
const getTaskCmsList = () => {
|
selectedLoading.value = true
|
const data = {
|
start: 0,
|
size: 999,
|
searchList: [],
|
taskId: taskData?.id, // taskData?.id
|
path: String(taskData?.rootCmsItemId), //taskData?.rootCmsItemId
|
type: '*',
|
keys: questionKey
|
}
|
MG.edu
|
.getTaskCmsItem(data)
|
.then((res: any) => {
|
selectedLoading.value = false
|
for (let i = 0; i < res.datas.length; i++) {
|
let item = res.datas[i]
|
item.index = i + 1
|
const scoreItem = scoreData.value.find((i: any) => i.id == item.id)
|
item.score = scoreItem?.score ?? 0
|
item.isInput = false
|
// 处理字段
|
if (questionKey != null) {
|
for (let fieldKey of questionKey) {
|
if (item.datas[fieldKey]) {
|
const values = JSON.parse(item.datas[fieldKey])
|
if (values.length > 0) {
|
// 用字段名处理返回的字段值
|
if (values[0].Value) {
|
item[fieldKey] = values[0].Value
|
} else if (values[0].Data) {
|
item[fieldKey] = values[0].Data.Value
|
} else if (!values[0].Value && values[0].FileList?.length > 0) {
|
item[fieldKey] = values[0].FileList
|
} else {
|
item[fieldKey] = '-'
|
}
|
}
|
}
|
}
|
}
|
}
|
if (stepActive.value == 2) {
|
scoreDataList.value = []
|
scoreLeftList.value = changeQuestionData(res.datas)
|
if (scoreLeftList.value.length > 0) {
|
scoreDataList.value = scoreLeftList.value[scoreIndex.value].data
|
}
|
scoreValue.value = 0
|
} else {
|
selectedDataList.value = []
|
selectedTypeList.value = changeQuestionData(res.datas)
|
if (selectedTypeList.value.length > 0) {
|
selectedDataList.value = [selectedTypeList.value[0]]
|
}
|
}
|
})
|
.catch((e: any) => {
|
ElMessage({
|
message: '列表获取失败',
|
type: 'error'
|
})
|
console.log(e)
|
})
|
}
|
|
// 删除已选的题目
|
const deleteCmsItem = (item: any) => {
|
ElMessageBox.confirm('是否确认删除?', '提示', {
|
confirmButtonText: '是',
|
cancelButtonText: '否',
|
type: 'warning'
|
}).then(() => {
|
const data = {
|
taskId: taskData.id,
|
requests: [
|
{
|
cmsItemId: item.id,
|
path: String(taskData.rootCmsItemId)
|
}
|
]
|
}
|
MG.edu
|
.removeTaskCmsItemList(data)
|
.then((res: any) => {
|
if (res) {
|
ElMessage({
|
type: 'success',
|
message: '已删除'
|
})
|
selectedIndex.value = 0
|
getTaskCmsList()
|
}
|
})
|
.catch((err: any) => {
|
ElMessage({
|
type: 'error',
|
message: '删除失败,请稍后再试'
|
})
|
})
|
})
|
}
|
|
// 题目分数列表切换
|
const scoreItem = (item: any, index: number) => {
|
scoreIndex.value = index
|
scoreDataList.value = item.data
|
}
|
|
// 打开设置文本框
|
const openSetScore = (item: any) => {
|
scoreItemValue.value = ''
|
item.isInput = true
|
}
|
|
// 预览作业
|
const lookWork = () => {
|
visibleLook.value = true
|
lookIndex.value = 0
|
lookLeftList.value = [...scoreLeftList.value]
|
lookDataList.value = [lookLeftList.value[0]]
|
}
|
|
// 批量设置分数
|
const changeScore = () => {
|
isSet.value = true
|
}
|
|
// 批量设置分数确认
|
const setScoreArr = () => {
|
let data = [...scoreData.value]
|
let idsData = scoreDataList.value.map((item: any) => {
|
return { id: item.id, score: scoreValue.value }
|
})
|
if (data.length == 0) {
|
data = [...idsData]
|
} else {
|
data = updateArr(data, idsData)
|
}
|
scoreData.value = data
|
updateTask()
|
isSet.value = false
|
}
|
|
// 题目分数设置
|
const setScore = (item: any) => {
|
item.score = Number(scoreItemValue.value)
|
const data = [...scoreData.value.filter((citem: any) => citem.id != item.id)]
|
data.push({ id: item.id, score: item.score })
|
scoreData.value = [...data]
|
item.isInput = false
|
updateTask()
|
}
|
|
// lookItems
|
const lookItems = (item: any, index: number) => {
|
lookIndex.value = index
|
lookDataList.value = [item]
|
}
|
|
// 已选题目切换
|
const selectedItems = (item: any, index: number) => {
|
selectedIndex.value = index
|
selectedDataList.value = [item]
|
}
|
|
// 表格tab事件{Waiting:未开始,Normal:进行中,Ended:已结束}
|
const tabCart = (event: Event | any) => {
|
let queryFilter: any = []
|
jobState.value = event.props.name
|
pages.page = 1
|
dataList.value = []
|
if (jobState.value == 'all') {
|
queryFilter = [...filterData.value]
|
}
|
if (jobState.value == 'payment') {
|
queryFilter = [...filterData.value, { field: 'State', value: 'Normal', subFilters: [] }]
|
}
|
if (jobState.value == 'complete') {
|
queryFilter = [...filterData.value, { field: 'State', value: 'Ended', subFilters: [] }]
|
}
|
getTaskList(queryFilter)
|
}
|
|
// 题目tab事件
|
const handleClick = (val: any) => {
|
activeTabs.value = val
|
workLeftList.value = []
|
if (val == '1') {
|
getBookQuestionList()
|
} else {
|
workLeftList.value = []
|
}
|
}
|
|
// 下一步
|
const nextStep = () => {
|
if (stepActive.value++ > 2) stepActive.value = 0
|
if (stepActive.value == 2) getTaskCmsList()
|
}
|
|
// 上一步
|
const preStep = () => {
|
if (stepActive.value-- == 0) stepActive.value = 0
|
}
|
|
// 选择题目
|
const selectQuestion = (item: any) => {
|
selectCache.value.push(item)
|
const list = selectCache.value.filter((citem: any) => citem.isCheck == true)
|
let dataT: any = []
|
workRightList.value?.forEach((citem: any) => {
|
const itemArr = citem.data
|
dataT.push(...itemArr)
|
})
|
checkData.value = [...new Set(list)]
|
if (dataT?.length > 0) {
|
checkAll.value = dataT.length == checkData.value.length
|
}
|
}
|
|
// 全选
|
const handleCheckAllChange = (val: boolean) => {
|
const data = workRightList.value
|
data.forEach((ele: any) => {
|
ele.data.forEach((item: any) => {
|
item.isCheck = val
|
})
|
})
|
let list: any = []
|
data.forEach((citem: any) => {
|
const itemArr = citem.data.filter((titem: any) => titem.isCheck == true)
|
list.push(...itemArr)
|
})
|
checkData.value = list
|
}
|
|
// 查看已选
|
const selectedData = () => {
|
visibleView.value = true
|
getTaskCmsList()
|
}
|
|
// 新建作业打开
|
const openWork = () => {
|
visible.value = true
|
checkAll.value = false
|
activeTabs.value = '1'
|
stepActive.value = 0
|
selectCache.value = []
|
workRightList.value = []
|
checkData.value = []
|
getBookQuestionList()
|
}
|
|
// 关闭新建作业
|
const close = () => {
|
taskItem.homeworkName = ''
|
taskItem.homeworkStartingDate = ''
|
taskItem.homeworkSubmissionDate = ''
|
taskItem.explain = ''
|
visible.value = false
|
visibleEdit.value = false
|
visiblePub.value = false
|
getTaskList()
|
}
|
|
// 发布作业
|
const releaseWork = (item: any) => {
|
visiblePub.value = true
|
taskData.id = item.id
|
taskData.rootCmsItemId = item.rootCmsItemId
|
if (item.config) {
|
scoreData.value = JSON.parse(item.config).scoreData
|
}
|
taskData.groupId = classInfo?.id
|
taskData.state = 'Normal'
|
taskData.type = item.type
|
taskItem.homeworkName = item.name
|
taskItem.explain = item.description
|
}
|
|
// 请确认发布
|
const submitWork = () => {
|
visiblePub.value = false
|
updateTask()
|
submitNewMessage()
|
}
|
|
// 发布作业通知
|
const submitNewMessage = () => {
|
const date = moment(taskItem.homeworkStartingDate).format('YYYY-MM-DD')
|
const content = date + ',发布作业,' + taskItem.homeworkName
|
const data = {
|
description: '',
|
icon: '',
|
state: 'Normal',
|
topicIdOrRefCode: String(sessionStorage.messageId),
|
name: '老师发布作业',
|
content,
|
type: 'Normal',
|
cmsTypeRefCode: '',
|
newDataListRequest: []
|
}
|
MG.ugc
|
.newTopicMessage(data)
|
.then((res: any) => {
|
if (res) {
|
ElMessage({
|
type: 'success',
|
message: '已发布'
|
})
|
}
|
})
|
.catch((err: any) => {
|
console.log(err)
|
})
|
}
|
|
// 编辑
|
const edit = (item: any) => {
|
scoreData.value = []
|
visibleEdit.value = true
|
taskData.id = item.id
|
taskData.rootCmsItemId = item.rootCmsItemId
|
if (item.config) {
|
scoreData.value = JSON.parse(item.config).scoreData
|
}
|
taskData.groupId = classInfo?.id
|
taskData.state = item.state
|
taskData.type = item.type
|
taskItem.homeworkName = item.name
|
taskItem.homeworkStartingDate = item.beginDate
|
taskItem.homeworkSubmissionDate = item.endDate
|
taskItem.explain = item.description
|
openWork()
|
}
|
|
// 详情
|
const detail = (item: any) => {
|
const obj = classInfo
|
obj.taskCmsId = item.rootCmsItemId
|
obj.taskWorkId = item.id
|
router.push({
|
path: '/jobDetail',
|
query: {
|
classInfo: JSON.stringify(obj)
|
}
|
})
|
}
|
|
// 作业选中left
|
const clickRightItem = (item: any, index: number) => {
|
workRightList.value = []
|
checkAll.value = false
|
sysIndex.value = index
|
getBookQuestionContentList(item.productLinkPath, item)
|
}
|
|
// 搜索题干
|
const searchWork = () => {
|
workLeftList.value = []
|
getBookQuestionList()
|
}
|
|
// 获取系统题干列表
|
const getBookQuestionList = () => {
|
leftLoading.value = true
|
let query = {
|
path: defaultCmsPath.value,
|
queryType: '*',
|
productId: String(classInfo?.bookId),
|
storeInfo: defaultCmsPath.value,
|
cmsPath: classInfo?.rootCmsItemId
|
}
|
MG.store
|
.getProductDetail(query)
|
.then(async (res: any) => {
|
const { cmsDatas } = res.datas
|
leftLoading.value = false
|
const listQusetion = cmsDatas[0]?.datas
|
const obj = listQusetion?.find((item: any) => item.type == 'questionBankFolder')
|
if (obj && obj.productLinkPath) {
|
let query = {
|
path: defaultCmsPath.value,
|
queryType: '*',
|
productId: String(classInfo?.bookId),
|
storeInfo: defaultCmsPath.value,
|
cmsPath: obj.productLinkPath
|
}
|
MG.store
|
.getProductDetail(query)
|
.then(async (cres: any) => {
|
const { cmsDatas } = cres.datas
|
const list: any = cmsDatas[0]?.datas
|
workLeftList.value = list
|
if (list?.length > 0) {
|
const cmsPath = list[0].productLinkPath
|
getBookQuestionContentList(cmsPath, list[0])
|
}
|
})
|
.catch((err: any) => {
|
leftLoading.value = false
|
workLeftList.value = []
|
console.log(err)
|
})
|
}
|
})
|
.catch((err: any) => {
|
leftLoading.value = false
|
workLeftList.value = []
|
console.log(err)
|
})
|
}
|
|
// 递归获取
|
const getDataCms = async (res: any) => {
|
for (const item of res) {
|
const data = await MG.store.getProductDetail({
|
path: defaultCmsPath.value,
|
queryType: '*',
|
productId: String(classInfo?.bookId),
|
storeInfo: defaultCmsPath.value,
|
cmsPath: item.productLinkPath,
|
itemFields: {
|
Embedded_QuestionBank_AnalysisCon: [],
|
Embedded_QuestionBank_Answer: [],
|
Embedded_QuestionBank_Difficulty: [],
|
Embedded_QuestionBank_KnowledgePoint: [],
|
Embedded_QuestionBank_Option: [],
|
Embedded_QuestionBank_OptionStyle: [],
|
Embedded_QuestionBank_QuestionType: [],
|
Embedded_QuestionBank_Score: [],
|
Embedded_QuestionBank_Stem: [],
|
Embedded_QuestionBank_StemStyle: []
|
}
|
})
|
if (item.type == 'questionBankFolder' && item.childrenFolderCount == 0) {
|
return data.datas.cmsDatas
|
} else {
|
const { cmsDatas } = data.datas
|
if (cmsDatas?.length > 0) {
|
const list: any = await getDataCms(cmsDatas[0].datas)
|
return list
|
}
|
}
|
}
|
}
|
|
// 获取系统题目列表
|
const getBookQuestionContentList = (cmsPath: string, item: any) => {
|
rightLoading.value = true
|
workRightList.value = []
|
if (item.type == 'questionBankFolder' && item.childrenFolderCount == 0) {
|
let query = {
|
path: defaultCmsPath.value,
|
queryType: '*',
|
productId: String(classInfo?.bookId),
|
storeInfo: defaultCmsPath.value,
|
cmsPath,
|
itemFields: {
|
Embedded_QuestionBank_AnalysisCon: [],
|
Embedded_QuestionBank_Answer: [],
|
Embedded_QuestionBank_Difficulty: [],
|
Embedded_QuestionBank_KnowledgePoint: [],
|
Embedded_QuestionBank_Option: [],
|
Embedded_QuestionBank_OptionStyle: [],
|
Embedded_QuestionBank_QuestionType: [],
|
Embedded_QuestionBank_Score: [],
|
Embedded_QuestionBank_Stem: [],
|
Embedded_QuestionBank_StemStyle: []
|
}
|
}
|
MG.store
|
.getProductDetail(query)
|
.then(async (cres: any) => {
|
rightLoading.value = false
|
const { cmsDatas } = cres.datas
|
const list: any = cmsDatas[0]?.datas
|
workRightList.value = changeQuestionData(list)
|
if (workRightList.value?.length > 0) {
|
const ids = workRightList.value.map((item: any) => item.id)
|
checkAll.value = getInclude3(checkData.value, ids)
|
}
|
})
|
.catch((err: any) => {
|
rightLoading.value = false
|
workRightList.value = []
|
console.log(err)
|
})
|
} else {
|
let query = {
|
path: defaultCmsPath.value,
|
queryType: '*',
|
productId: String(classInfo?.bookId),
|
storeInfo: defaultCmsPath.value,
|
cmsPath: item.productLinkPath
|
}
|
MG.store
|
.getProductDetail(query)
|
.then(async (res: any) => {
|
const { cmsDatas } = res.datas
|
const cmsList = await getDataCms(cmsDatas[0]?.datas)
|
const list = cmsList[0]?.datas
|
workRightList.value = changeQuestionData(list)
|
rightLoading.value = false
|
if (workRightList.value?.length > 0) {
|
const ids = workRightList.value.map((item: any) => item.id)
|
checkAll.value = getInclude3(checkData.value, ids)
|
}
|
})
|
.catch((err: any) => {
|
rightLoading.value = false
|
workRightList.value = []
|
console.log(err)
|
})
|
}
|
}
|
|
// // 获取教材题目章节
|
// const getChapter = async () => {
|
// const url = config.questionUrl + classInfo?.bookRefCode + '/information.json'
|
// const { data } = await axios.get(url)
|
// let dataList: any = []
|
// if (data?.data?.length > 0) {
|
// dataList = data.data.map((item: any) => {
|
// return {
|
// ...item,
|
// name: item.label
|
// }
|
// })
|
// }
|
// workLeftList.value = dataList?.filter((item: any) => item.page != '')
|
// }
|
|
// // 获取章节题目列表
|
// const getChapterQeustion = async (item: any) => {
|
// // 题库题目类型
|
// const questionTypeList = [
|
// { name: '单选题', totalScore: 0, value: 'singleChoice', data: [] },
|
// { name: '多选题', totalScore: 0, value: 'multipleChoice', data: [] },
|
// { name: '判断题', totalScore: 0, value: 'judge', data: [] },
|
// { name: '简答题', totalScore: 0, value: 'shortAnswer', data: [] },
|
// { name: '论述题', totalScore: 0, value: 'discuss', data: [] },
|
// { name: '填空题', totalScore: 0, value: 'completion', data: [] },
|
// { name: '连线题', totalScore: 0, value: 'matching', data: [] },
|
// { name: '分类题', totalScore: 0, value: 'classification', data: [] }
|
// ]
|
// try {
|
// let list: any = []
|
// const { data } = await axios.get(
|
// config.questionUrl + classInfo?.bookRefCode + '/question-' + item.chapter + '.json'
|
// )
|
// list = data.data.map((item: any) => {
|
// if (item.type == 'material') {
|
// item.questionType = 'shortAnswer'
|
// }
|
// return {
|
// ...item,
|
// analysisCon: item.Embedded_QuestionBank_AnalysisCon,
|
// questionAnswer: item.answer,
|
// questionStem: item.stem,
|
// questionOption: item.option,
|
// customAnswer: null
|
// }
|
// })
|
// console.log(list, 'list')
|
// list.forEach((item: any) => {
|
// const index = findIndexByValue(questionTypeList, item.questionType)
|
// if (index > -1) {
|
// questionTypeList[index].data.push(item)
|
// if (item.score) {
|
// questionTypeList[index].totalScore += item.score
|
// }
|
// }
|
// })
|
// console.log(questionTypeList)
|
// } catch (error) {
|
// console.log(error)
|
// }
|
// }
|
|
// 数组中是否包含另一个数组
|
const getInclude3 = (arr1: any[], arr2: any[]) => {
|
let temp = []
|
temp = arr1.filter((item) => arr2.indexOf(item.id) > -1)
|
return temp.length ? true : false
|
}
|
|
// 处理题目数据结构
|
const changeQuestionData = (res: any) => {
|
// 题库题目类型
|
const questionTypeList = [
|
{ name: '单选题', totalScore: 0, value: 'singleChoice', data: [] },
|
{ name: '多选题', totalScore: 0, value: 'multipleChoice', data: [] },
|
{ name: '判断题', totalScore: 0, value: 'judge', data: [] },
|
{ name: '简答题', totalScore: 0, value: 'shortAnswer', data: [] },
|
{ name: '论述题', totalScore: 0, value: 'discuss', data: [] },
|
{ name: '填空题', totalScore: 0, value: 'completion', data: [] },
|
{ name: '连线题', totalScore: 0, value: 'matching', data: [] },
|
{ name: '分类题', totalScore: 0, value: 'classification', data: [] }
|
]
|
try {
|
let list = []
|
list = res?.map((item: any) => {
|
try {
|
if (item.Embedded_QuestionBank_Stem) {
|
item.questionStem = JSON.parse(item.Embedded_QuestionBank_Stem)
|
}
|
if (
|
item.Embedded_QuestionBank_Option &&
|
item.Embedded_QuestionBank_Option.indexOf('[') > -1
|
) {
|
item.questionOption = JSON.parse(item.Embedded_QuestionBank_Option)
|
}
|
if (
|
item.Embedded_QuestionBank_Answer &&
|
item.Embedded_QuestionBank_Answer.indexOf('[') > -1
|
) {
|
item.Embedded_QuestionBank_Answer = JSON.parse(item.Embedded_QuestionBank_Answer)
|
}
|
const checkObj = checkData.value.find((citem: any) => citem.id == item.id)
|
item.isCheck = checkObj ? true : false
|
return {
|
...item,
|
questionType: item.Embedded_QuestionBank_QuestionType,
|
questionAnalysisCon: item.Embedded_QuestionBank_AnalysisCon,
|
questionAnswer: item.Embedded_QuestionBank_Answer,
|
customAnswer: null
|
}
|
} catch (error) {
|
console.log(item)
|
}
|
})
|
list.forEach((item: any) => {
|
const index = findIndexByValue(questionTypeList, item.questionType)
|
if (index > -1) {
|
questionTypeList[index].data.push(item)
|
if (item.score) {
|
questionTypeList[index].totalScore += item.score
|
}
|
}
|
})
|
return questionTypeList.filter((item) => item.data.length > 0)
|
} catch (error) {
|
console.log(error)
|
return []
|
}
|
}
|
|
const findIndexByValue = (res: any, type: string) => {
|
for (let i = 0; i < res.length; i++) {
|
if (res[i].value == type) {
|
return i
|
}
|
}
|
return -1 // 如果未找到,则返回 -1
|
}
|
|
// 合并更新数组
|
const updateArr = (arr: any, brr: any) => {
|
// 使用 Map 来存储合并后的结果
|
const mergedMap = new Map()
|
|
// 将第一个数组的对象加入到 Map 中
|
arr.forEach((item: any) => {
|
mergedMap.set(item.id, { ...item })
|
})
|
|
// 遍历第二个数组,更新 Map 中相同 id 的对象的 score
|
brr.forEach((item: any) => {
|
if (mergedMap.has(item.id)) {
|
mergedMap.get(item.id).score = item.score
|
} else {
|
mergedMap.set(item.id, { ...item })
|
}
|
})
|
|
// 将 Map 转换为数组
|
const mergedArray = Array.from(mergedMap.values())
|
return mergedArray
|
}
|
</script>
|
|
<style lang="less" scoped>
|
.classManagePage-box {
|
padding: 20px;
|
.classManagePage-nav {
|
padding-bottom: 20px;
|
border-bottom: 1px solid #e6e8ed;
|
}
|
.classManagePage-content {
|
.cartClass {
|
.titleOptions {
|
width: 160px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
span {
|
height: 30px;
|
font-weight: bold;
|
font-size: 16px;
|
color: #333;
|
line-height: 30px;
|
text-align: left;
|
border-left: 6px solid #ff6c00;
|
padding-left: 10px;
|
}
|
}
|
margin-top: 20px;
|
::v-deep .el-tabs__nav-wrap::after {
|
background-color: #ff6d00;
|
height: 1px;
|
}
|
|
::v-deep .el-tabs__item {
|
width: 100px;
|
padding: 0;
|
color: #545c63;
|
}
|
|
::v-deep .is-active {
|
background-color: #ff6d00;
|
color: #fff;
|
border-radius: 3px 3px 0 0;
|
}
|
}
|
.headerBox {
|
padding: 20px 0;
|
overflow: hidden;
|
.searchBox {
|
width: 300px;
|
float: left;
|
.searchBtn {
|
background-color: var(--el-color-primary);
|
color: #fff;
|
border-top-left-radius: 0;
|
border-bottom-left-radius: 0;
|
}
|
}
|
}
|
::v-deep(.customDialog) {
|
border-radius: 5px;
|
.stepBox {
|
padding: 15px 0;
|
}
|
padding-bottom: 20px;
|
.el-dialog__body {
|
padding: 0 20px;
|
}
|
.el-dialog__footer {
|
width: calc(100% - 40px);
|
margin: auto;
|
display: flex;
|
padding: 0;
|
.leftFooter {
|
height: 55px;
|
width: 286px;
|
border: 1px solid #f4f4f4;
|
background: #e0f2ff;
|
margin-right: 20px;
|
}
|
.dialog-footer {
|
flex: 1;
|
display: flex;
|
align-items: center;
|
justify-content: flex-start;
|
border: 1px solid #f4f4f4;
|
border-top: 0;
|
padding: 0 10px;
|
.check-list-box {
|
width: 220px;
|
display: flex;
|
justify-content: flex-start;
|
}
|
.btnGroup {
|
flex: 1;
|
display: flex;
|
align-items: center;
|
justify-content: flex-end;
|
}
|
}
|
.selectedFooter {
|
width: 100%;
|
display: flex;
|
justify-content: flex-end;
|
padding: 10px 0;
|
}
|
}
|
.viewTitle {
|
width: 100%;
|
text-align: center;
|
font-size: 16px;
|
}
|
}
|
.workTitle {
|
margin: 20px 0;
|
font-size: 16px;
|
color: #333;
|
}
|
.viewContent {
|
width: 100%;
|
.right-list-components {
|
height: calc(100% - 5px) !important;
|
}
|
}
|
.workBox {
|
width: 100%;
|
display: flex;
|
.workLeft {
|
width: 286px;
|
height: 700px;
|
border-radius: 10px 10px 0px 0px;
|
border: 1px solid #f4f4f4;
|
border-bottom: 0;
|
.scoreTitle {
|
display: flex;
|
align-items: center;
|
justify-content: flex-start;
|
line-height: 39px;
|
padding-left: 10px;
|
box-sizing: border-box;
|
}
|
::v-deep(.demo-tabs) {
|
.el-tabs__header {
|
margin: 0;
|
}
|
.el-tabs__nav {
|
width: 100%;
|
justify-content: center;
|
padding: 8px 0;
|
.el-tabs__item {
|
flex: 1;
|
height: 0px;
|
padding: 12px 0;
|
}
|
.el-tabs__item {
|
border-right: 1px solid #eee;
|
}
|
.el-tabs__item:last-child {
|
border: 0;
|
}
|
.el-tabs__active-bar {
|
display: none;
|
// width: 60px !important;
|
// left: 40px !important;
|
}
|
}
|
.el-tabs__nav-wrap::after {
|
height: 0px !important;
|
background: none;
|
}
|
}
|
.workList {
|
width: 100%;
|
height: calc(100% - 39px);
|
background: #e0f2ff;
|
overflow: auto;
|
padding: 10px 18px;
|
.searchBox {
|
position: sticky;
|
top: -10px;
|
z-index: 9999999;
|
}
|
.work-list-item {
|
background: #ffffff;
|
border-radius: 5px 5px 5px 5px;
|
margin: 10px 0;
|
.work-list-item-text {
|
font-family: PingFang SC;
|
font-weight: 400;
|
font-size: 13px;
|
color: #000000;
|
line-height: 22px;
|
max-width: 248px;
|
white-space: nowrap;
|
text-overflow: ellipsis;
|
overflow: hidden;
|
padding: 6px 10px;
|
}
|
.work-list-item-text:hover {
|
cursor: pointer;
|
}
|
}
|
}
|
}
|
.workRight {
|
flex: 1;
|
height: 700px;
|
margin-left: 20px;
|
border-radius: 10px 10px 0px 0px;
|
border: 1px solid #f4f4f4;
|
.right-list-title {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
width: 100%;
|
height: 39px;
|
border-bottom: 1px solid #f4f4f4;
|
line-height: 39px;
|
padding: 0 10px;
|
}
|
.right-list-components {
|
width: 100%;
|
height: calc(100% - 40px);
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
.right-score-components {
|
padding: 10px;
|
.scoreBtn {
|
margin-bottom: 20px;
|
display: flex;
|
justify-content: flex-start;
|
align-items: center;
|
// .setScore {
|
// margin-left: 20px;
|
// }
|
}
|
}
|
}
|
.finishBg {
|
width: 100%;
|
height: 100%;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
img {
|
width: 300px;
|
margin-bottom: 20px;
|
}
|
span {
|
font-family: PingFang SC;
|
font-weight: 500;
|
font-size: 18px;
|
color: #999999;
|
}
|
}
|
}
|
.newTaskBox {
|
width: 750px;
|
height: 700px;
|
font-family: PingFang SC;
|
font-weight: 400;
|
font-size: 14px;
|
color: #333333;
|
margin: auto;
|
padding-top: 60px;
|
display: flex;
|
flex-direction: column;
|
box-sizing: border-box;
|
|
.el-row {
|
margin-bottom: 20px;
|
display: flex;
|
align-items: flex-start;
|
.labelItem {
|
text-align: right;
|
margin-right: 10px;
|
padding-top: 2px;
|
}
|
.selectBox {
|
border: 1px solid #ddd;
|
border-radius: 5px;
|
padding: 20px 30px;
|
}
|
.selectMarBot {
|
margin-bottom: 10px;
|
}
|
.btngroup {
|
position: absolute;
|
top: 20px;
|
right: 27px;
|
}
|
.el-upload-list__item-name {
|
line-height: 22px;
|
}
|
}
|
|
.row-center {
|
align-items: center;
|
}
|
}
|
.leftBg {
|
background-color: rgba(255, 173, 65, 0.1);
|
border-radius: 5px 5px 5px 5px;
|
color: #ff6c00 !important;
|
}
|
.pageBox {
|
padding: 10px 0;
|
display: flex;
|
justify-content: flex-end;
|
}
|
.pubContent {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
padding: 20px 0;
|
}
|
}
|
}
|
</style>
|