From 5f00696dfb25bc90034448ceb634ed1ef256681a Mon Sep 17 00:00:00 2001 From: qiyunfeng-create <1940665526@qq.com> Date: 星期四, 21 八月 2025 21:13:35 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/xiehe_website --- src/views/classManage/jobManage.vue | 1895 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 1,895 insertions(+), 0 deletions(-) diff --git a/src/views/classManage/jobManage.vue b/src/views/classManage/jobManage.vue new file mode 100644 index 0000000..63d705f --- /dev/null +++ b/src/views/classManage/jobManage.vue @@ -0,0 +1,1895 @@ +<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> -- Gitblit v1.9.1