|
@@ -3,24 +3,20 @@
|
|
|
<bread-crumb/>
|
|
|
<div class="w-1200px m-auto">
|
|
|
<div class="flex items-center">
|
|
|
- <el-date-picker
|
|
|
- v-model="exam_time"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- type="date"
|
|
|
- placeholder="考试时间"
|
|
|
- size="large"
|
|
|
- />
|
|
|
- <el-select class="ml-10px" v-model="exam_form" placeholder="考试形式" size="large">
|
|
|
- <el-option label="全部" value="0"
|
|
|
- />
|
|
|
- <el-option
|
|
|
- v-for="item in form_list"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
+ <div class="w-360px">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="exam_time"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始时间"
|
|
|
+ end-placeholder="结束时间"
|
|
|
+ @change="handleDateChange"
|
|
|
+ size="large"
|
|
|
/>
|
|
|
- </el-select>
|
|
|
- <el-select class="ml-20px" v-model="exam_form" placeholder="考试类型" size="large">
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-select class="ml-10px" v-model="exam_type" placeholder="考试类型" size="large" @change="filterData">
|
|
|
<el-option label="全部" value="0"
|
|
|
/>
|
|
|
<el-option
|
|
@@ -36,9 +32,11 @@
|
|
|
style="width: 200px;"
|
|
|
size="large"
|
|
|
clearable
|
|
|
+ @keyup.enter="filterData"
|
|
|
+ @clear="filterData"
|
|
|
placeholder="请输入关键字"
|
|
|
/>
|
|
|
- <el-button color="#003eee" class="ml-20px" type="primary" size="large">搜索</el-button>
|
|
|
+ <el-button color="#003eee" class="ml-20px" type="primary" size="large" @click="filterData">搜索</el-button>
|
|
|
</div>
|
|
|
<div class="flex mt-20px justify-between">
|
|
|
<button type="button" class="add-btn" @click="linkTo({name:'process-create'})">
|
|
@@ -47,222 +45,93 @@
|
|
|
</el-icon>
|
|
|
<span class="ml-5px inline-block align-middle">新建考试计划</span>
|
|
|
</button>
|
|
|
- <button type="button" class="del-btn">批量删除</button>
|
|
|
</div>
|
|
|
- <div class="mt-20px process-list-table">
|
|
|
- <div class="head">
|
|
|
- <div class="w-60px">
|
|
|
- <p class="set-check all">
|
|
|
- <input type="checkbox" id="chooseAll" @change="chooseAll" v-model="checked">
|
|
|
- <label for="chooseAll"></label>
|
|
|
- </p>
|
|
|
+ <div class="mt-20px" v-if="listData.length > 0">
|
|
|
+ <div class="process-list-table">
|
|
|
+ <div class="head">
|
|
|
+ <div class="w-340px text-left pl-20px">考试计划名称</div>
|
|
|
+ <div class="w-250px">状态</div>
|
|
|
+ <div class="w-130px">考试类型</div>
|
|
|
+ <div class="w-220px">考试时间</div>
|
|
|
+ <div class="w-300px">操作</div>
|
|
|
</div>
|
|
|
- <div class="w-150px text-left">考试计划名称</div>
|
|
|
- <div class="w-250px">状态</div>
|
|
|
- <div class="w-130px">考试形式</div>
|
|
|
- <div class="w-130px">考试类型</div>
|
|
|
- <div class="w-180px">考试时间</div>
|
|
|
- <div class="w-300px">操作</div>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <div class="line">
|
|
|
- <div class="up">
|
|
|
- <div class="w-60px">
|
|
|
- <p class="set-check single">
|
|
|
- <input type="checkbox" id="1" :value="1" v-model="chooseCheck">
|
|
|
- <label :for="1"></label>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div class="w-150px text-left">考试计划名称</div>
|
|
|
- <div class="w-250px">
|
|
|
- <span class="inline-block align-middle">进行中</span>
|
|
|
- <div class="inline-block align-middle ml-10px process-state">
|
|
|
- <h3 class="state-line">
|
|
|
- <span style="width: 11%;"></span>
|
|
|
- </h3>
|
|
|
- </div>
|
|
|
- <span class="ml-10px inline-block align-middle">11%</span>
|
|
|
- </div>
|
|
|
- <div class="w-130px text-left">线下考试</div>
|
|
|
- <div class="w-130px text-left">联考</div>
|
|
|
- <div class="w-180px text-left">2023.2.4~2023.2.17</div>
|
|
|
- <div class="w-300px">
|
|
|
- <button type="button" class="op-btn">编辑</button>
|
|
|
- <button type="button" class="op-btn ml-10px" @click="linkTo({name:'process-detail-id',params:{id:'1'}})">详情</button>
|
|
|
- <div class="ml-10px relative op-btn cursor-pointer">
|
|
|
- <span class="inline-block align-middle leading-28px">更多</span>
|
|
|
- <div class="more-list">
|
|
|
- <ul>
|
|
|
- <li>阅卷任务</li>
|
|
|
- <li>扫描批阅进度</li>
|
|
|
- <li>考试分析</li>
|
|
|
- <li>删除</li>
|
|
|
- </ul>
|
|
|
+ <div>
|
|
|
+ <div v-for="(item,index) in listData" class="line">
|
|
|
+ <div class="up">
|
|
|
+ <div class="w-340px pl-20px text-left">{{item.ykj_ksrwmc}}</div>
|
|
|
+ <div class="w-250px">
|
|
|
+ <span class="inline-block align-middle">进行中</span>
|
|
|
+ <div class="inline-block align-middle ml-10px process-state">
|
|
|
+ <h3 class="state-line">
|
|
|
+ <span style="width: 11%;"></span>
|
|
|
+ </h3>
|
|
|
</div>
|
|
|
+ <span class="ml-10px inline-block align-middle">11%</span>
|
|
|
</div>
|
|
|
- <button type="button" class="ml-10px inline-block align-middle arrow-btn up"></button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="down pt-15px pl-35px">
|
|
|
- <ul class="subject-list">
|
|
|
- <li>
|
|
|
- <div>
|
|
|
- <div class="w-140px h-195px m-auto">
|
|
|
- <img src="/images/yuwen.png" class="w-full" alt="">
|
|
|
- </div>
|
|
|
- <div class="mt-5px">
|
|
|
- <div class="inline-block align-middle process-state">
|
|
|
- <h3 class="state-line">
|
|
|
- <span style="width: 11%;"></span>
|
|
|
- </h3>
|
|
|
- </div>
|
|
|
- <span class="ml-10px text-14px inline-block align-middle">11%</span>
|
|
|
- </div>
|
|
|
- <div class="mt-5px text-center">
|
|
|
- <button type="button" class="op-btn">查看</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <div>
|
|
|
- <div class="w-140px h-195px m-auto">
|
|
|
- <img src="/images/shuxue.png" class="w-full" alt="">
|
|
|
- </div>
|
|
|
- <div class="mt-5px">
|
|
|
- <div class="inline-block align-middle process-state">
|
|
|
- <h3 class="state-line">
|
|
|
- <span style="width: 11%;"></span>
|
|
|
- </h3>
|
|
|
- </div>
|
|
|
- <span class="ml-10px text-14px inline-block align-middle">11%</span>
|
|
|
- </div>
|
|
|
- <div class="mt-5px text-center">
|
|
|
- <button type="button" class="op-btn">查看</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <div>
|
|
|
- <div class="w-140px h-195px m-auto">
|
|
|
- <img src="/images/yingyu.png" class="w-full" alt="">
|
|
|
- </div>
|
|
|
- <div class="mt-5px">
|
|
|
- <div class="inline-block align-middle process-state">
|
|
|
- <h3 class="state-line">
|
|
|
- <span style="width: 11%;"></span>
|
|
|
- </h3>
|
|
|
- </div>
|
|
|
- <span class="ml-10px text-14px inline-block align-middle">11%</span>
|
|
|
- </div>
|
|
|
- <div class="mt-5px text-center">
|
|
|
- <button type="button" class="op-btn">查看</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <div>
|
|
|
- <div class="w-140px h-195px m-auto">
|
|
|
- <img src="/images/wuli.png" class="w-full" alt="">
|
|
|
- </div>
|
|
|
- <div class="mt-5px">
|
|
|
- <div class="inline-block align-middle process-state">
|
|
|
- <h3 class="state-line">
|
|
|
- <span style="width: 11%;"></span>
|
|
|
- </h3>
|
|
|
- </div>
|
|
|
- <span class="ml-10px text-14px inline-block align-middle">11%</span>
|
|
|
- </div>
|
|
|
- <div class="mt-5px text-center">
|
|
|
- <button type="button" class="op-btn">查看</button>
|
|
|
+ <div class="w-130px text-left">
|
|
|
+ <span v-if="item.ykj_kslx === '1'">周考</span>
|
|
|
+ <span v-if="item.ykj_kslx === '2'">月考</span>
|
|
|
+ <span v-if="item.ykj_kslx === '3'">作业</span>
|
|
|
+ <span v-if="item.ykj_kslx === '4'">测验</span>
|
|
|
+ <span v-if="item.ykj_kslx === '5'">期中</span>
|
|
|
+ <span v-if="item.ykj_kslx === '6'">期末</span>
|
|
|
+ <span v-if="item.ykj_kslx === '7'">联考</span>
|
|
|
+ </div>
|
|
|
+ <div class="w-220px text-left">{{item.ykj_ksrq}}~{{item.ykj_jsrq}}</div>
|
|
|
+ <div class="w-300px">
|
|
|
+ <button type="button" class="op-btn" :disabled="item.create_user_id != user.user_id" @click="linkTo({name:'process-edit-id',params:{id:item.ykj_id}})">编辑</button>
|
|
|
+ <button type="button" class="op-btn ml-10px" @click="linkTo({name:'process-detail-id',params:{id:item.ykj_id}})">详情</button>
|
|
|
+ <div class="ml-10px relative op-btn cursor-pointer">
|
|
|
+ <span class="inline-block align-middle leading-28px">更多</span>
|
|
|
+ <div class="more-list">
|
|
|
+ <ul>
|
|
|
+ <li @click="linkTo({name:'process-smpyjd-ykj_id',params:{ykj_id:item.ykj_id}})">扫描批阅进度</li>
|
|
|
+ <li>考试分析</li>
|
|
|
+ <li v-if="item.create_user_id == user.user_id" @click="delProject(item)">删除</li>
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <div>
|
|
|
- <div class="w-140px h-195px m-auto">
|
|
|
- <img src="/images/huaxue.png" class="w-full" alt="">
|
|
|
- </div>
|
|
|
- <div class="mt-5px">
|
|
|
- <div class="inline-block align-middle process-state">
|
|
|
- <h3 class="state-line">
|
|
|
- <span style="width: 11%;"></span>
|
|
|
- </h3>
|
|
|
+ <button type="button" class="ml-10px inline-block align-middle arrow-btn" :class="item.showSub?'up':'down'" @click="toggleDown(index)"></button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="down pt-15px pl-35px" v-if="item.showSub">
|
|
|
+ <ul class="subject-list">
|
|
|
+ <li v-for="items in item.lc">
|
|
|
+ <span class="sub-del cursor-pointer" @click="del_sub(item.ykj_id,items.ykl_id)"></span>
|
|
|
+ <div>
|
|
|
+ <div class="subject-name m-auto">{{items.ykl_lc !== ''?JSON.parse(items.ykl_lc).ze_xueke_name:''}}</div>
|
|
|
+ <div class="mt-5px">
|
|
|
+ <div class="inline-block align-middle process-state">
|
|
|
+ <h3 class="state-line">
|
|
|
+ <span style="width: 11%;"></span>
|
|
|
+ </h3>
|
|
|
+ </div>
|
|
|
+ <span class="ml-10px text-14px inline-block align-middle">11%</span>
|
|
|
</div>
|
|
|
- <span class="ml-10px text-14px inline-block align-middle">11%</span>
|
|
|
- </div>
|
|
|
- <div class="mt-5px text-center">
|
|
|
- <button type="button" class="op-btn">查看</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <div>
|
|
|
- <div class="w-140px h-195px m-auto">
|
|
|
- <img src="/images/shengwu.png" class="w-full" alt="">
|
|
|
- </div>
|
|
|
- <div class="mt-5px">
|
|
|
- <div class="inline-block align-middle process-state">
|
|
|
- <h3 class="state-line">
|
|
|
- <span style="width: 11%;"></span>
|
|
|
- </h3>
|
|
|
+ <div class="mt-5px text-center">
|
|
|
+ <button type="button" class="op-btn">批阅任务</button>
|
|
|
+ <button type="button" class="ml-10px op-btn">查看</button>
|
|
|
</div>
|
|
|
- <span class="ml-10px text-14px inline-block align-middle">11%</span>
|
|
|
- </div>
|
|
|
- <div class="mt-5px text-center">
|
|
|
- <button type="button" class="op-btn">查看</button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="cursor-pointer" @click="dialogVisible = true">
|
|
|
- <div class="subject-add-btn"></div>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="line">
|
|
|
- <div class="up">
|
|
|
- <div class="w-60px">
|
|
|
- <p class="set-check single">
|
|
|
- <input type="checkbox" id="1" :value="1" v-model="chooseCheck">
|
|
|
- <label :for="1"></label>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div class="w-150px text-left">考试计划名称</div>
|
|
|
- <div class="w-250px">
|
|
|
- <span class="inline-block align-middle">进行中</span>
|
|
|
- <div class="inline-block align-middle ml-10px process-state">
|
|
|
- <h3 class="state-line">
|
|
|
- <span style="width: 11%;"></span>
|
|
|
- </h3>
|
|
|
- </div>
|
|
|
- <span class="ml-10px inline-block align-middle">11%</span>
|
|
|
- </div>
|
|
|
- <div class="w-130px text-left">线下考试</div>
|
|
|
- <div class="w-130px text-left">联考</div>
|
|
|
- <div class="w-180px text-left">2023.2.4~2023.2.17</div>
|
|
|
- <div class="w-300px">
|
|
|
- <button type="button" class="op-btn">编辑</button>
|
|
|
- <button type="button" class="op-btn ml-10px">详情</button>
|
|
|
- <div class="ml-10px relative op-btn cursor-pointer">
|
|
|
- <span class="inline-block align-middle leading-28px">更多</span>
|
|
|
- <div class="more-list">
|
|
|
- <ul>
|
|
|
- <li>阅卷任务</li>
|
|
|
- <li>扫描批阅进度</li>
|
|
|
- <li>考试分析</li>
|
|
|
- <li>删除</li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <button type="button" class="ml-10px inline-block align-middle arrow-btn down"></button>
|
|
|
+ </li>
|
|
|
+ <li class="cursor-pointer" @click="addSubject(item,index)">
|
|
|
+ <div class="subject-add-btn"></div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
|
+ <div class="mt-20px page-new flex justify-end">
|
|
|
+ <el-pagination v-model:current-page="cur_page" v-model:page-size="limit" layout="total,prev, pager, next" :total="total" :background="true" @current-change="handleSelectionChange"></el-pagination>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="mt-20px page-new flex justify-end">
|
|
|
- <el-pagination v-model:current-page="cur_page" v-model:page-size="limit" layout="total,prev, pager, next" :total="total" :background="true" @current-change="handleSelectionChange"></el-pagination>
|
|
|
+ <div v-else class="no-data">
|
|
|
+ <div>
|
|
|
+ <h3 class="no-data-img"></h3>
|
|
|
+ <h4 class="mt-25px text-18px text-hex-0048e5 text-center">暂无数据</h4>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-dialog
|
|
@@ -275,8 +144,8 @@
|
|
|
<div>
|
|
|
<el-form label-width="120px" size="large">
|
|
|
<el-form-item label="请选择学科">
|
|
|
- <el-select v-model="add_sub_id" placeholder="请选择学科">
|
|
|
- <el-option v-for="item in subject_list" :label="item.label" :value="item.value" />
|
|
|
+ <el-select v-model="add_sub" placeholder="请选择学科">
|
|
|
+ <el-option v-for="item in sub_filter_list" :label="item.subject_name" :value="{value:item.subject_id,label:item.subject_name}" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -284,7 +153,7 @@
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer text-right">
|
|
|
<el-button @click="dialogVisible = false" size="large">取消</el-button>
|
|
|
- <el-button size="large" color="#003eee" type="primary" @click="dialogVisible = false">
|
|
|
+ <el-button size="large" color="#003eee" :disabled="add_sub.value === '' || isSubmit" type="primary" @click="addSubmit">
|
|
|
确定
|
|
|
</el-button>
|
|
|
</span>
|
|
@@ -302,24 +171,18 @@
|
|
|
}
|
|
|
</route>
|
|
|
<script setup>
|
|
|
-import {process_list} from "~/pages/process/api";
|
|
|
+import {project_list,subject,add_subject} from "~/pages/process/api";
|
|
|
import { useRouter } from "vue-router";
|
|
|
+import {user} from "~/store";
|
|
|
+import request from "@/utils/request";
|
|
|
const router = useRouter();
|
|
|
-console.log(router,87)
|
|
|
+console.log(router,7)
|
|
|
const linkTo = (obj) => {
|
|
|
router.push(obj);
|
|
|
};
|
|
|
-let exam_time = $ref('')
|
|
|
-let exam_form = $ref('')
|
|
|
+let exam_time = $ref([])
|
|
|
let exam_type = $ref('')
|
|
|
let keyword = $ref('')
|
|
|
-let form_list = [{
|
|
|
- value: '1',
|
|
|
- label: '线上考试'
|
|
|
-}, {
|
|
|
- value: '2',
|
|
|
- label: '线下考试'
|
|
|
-}]
|
|
|
let type_list = [{
|
|
|
value: '1',
|
|
|
label: '周考'
|
|
@@ -328,63 +191,181 @@ let type_list = [{
|
|
|
label: '月考'
|
|
|
}, {
|
|
|
value: '3',
|
|
|
- label: '期中'
|
|
|
-},{
|
|
|
- value: '4',
|
|
|
- label: '期末'
|
|
|
-}, {
|
|
|
- value: '5',
|
|
|
label: '作业'
|
|
|
-}, {
|
|
|
- value: '6',
|
|
|
- label: '测试'
|
|
|
-}]
|
|
|
-let subject_list = [{
|
|
|
- value: '1',
|
|
|
- label: '语文'
|
|
|
-}, {
|
|
|
- value: '2',
|
|
|
- label: '数学'
|
|
|
-}, {
|
|
|
- value: '3',
|
|
|
- label: '英语'
|
|
|
},{
|
|
|
value: '4',
|
|
|
- label: '物理'
|
|
|
+ label: '测验'
|
|
|
}, {
|
|
|
value: '5',
|
|
|
- label: '生物'
|
|
|
+ label: '期中'
|
|
|
}, {
|
|
|
value: '6',
|
|
|
- label: '化学'
|
|
|
+ label: '期末'
|
|
|
+},{
|
|
|
+ value: '7',
|
|
|
+ label: '联考'
|
|
|
}]
|
|
|
-let chooseCheck = $ref([]);
|
|
|
-let checked = $ref(false);
|
|
|
-let checkedIds = $ref([]);
|
|
|
-let noData = $ref(null);
|
|
|
-let limit = $ref(10);
|
|
|
-let total = $ref(0);
|
|
|
-let cur_page = $ref(1);
|
|
|
-let listData = $ref([]);
|
|
|
+let subject_list = $ref([])
|
|
|
+let noData = $ref(null)
|
|
|
+let limit = $ref(10)
|
|
|
+let total = $ref(0)
|
|
|
+let cur_page = $ref(1)
|
|
|
+let listData = $ref([])
|
|
|
let dialogVisible = $ref(false)
|
|
|
-let add_sub_id = $ref('')
|
|
|
-function chooseAll() {
|
|
|
-
|
|
|
+let sub_filter_list = $ref([])
|
|
|
+let allSub = $ref([])
|
|
|
+let add_sub = $ref({
|
|
|
+ value:'',
|
|
|
+ label:''
|
|
|
+})
|
|
|
+let isSubmit = $ref(false)
|
|
|
+let add_ykj_id = $ref('')
|
|
|
+function getSubject() {
|
|
|
+ let data = {
|
|
|
+ for_mistake:'1'
|
|
|
+ }
|
|
|
+ if(user.value.user_role_id < 72) {
|
|
|
+ data.sm_id = user.value.sm_info.sm_id
|
|
|
+ }
|
|
|
+ subject(data).then(res =>{
|
|
|
+ if(res.code === '1') {
|
|
|
+ allSub = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
+getSubject();
|
|
|
function getListData() {
|
|
|
let data = {
|
|
|
page:cur_page,
|
|
|
limit:limit,
|
|
|
+ keyword:keyword,
|
|
|
+ ykj_ksrq:exam_time[0],
|
|
|
+ ykj_jsrq:exam_time[1],
|
|
|
+ ykj_kslx:exam_type
|
|
|
+
|
|
|
};
|
|
|
- process_list(data).then(res=>{
|
|
|
+ project_list(data).then(res=>{
|
|
|
if(res.code === '1') {
|
|
|
listData = res.data.page_data;
|
|
|
+ for(let i in listData) {
|
|
|
+ if(i == 0) {
|
|
|
+ listData[i].showSub = true;
|
|
|
+ } else {
|
|
|
+ listData[i].showSub = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ // console.log(listData,87)
|
|
|
total = Number(res.data.total_rows);
|
|
|
cur_page = Number(res.data.page_now);
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
getListData();
|
|
|
+
|
|
|
+function filterData() {
|
|
|
+ cur_page = 1;
|
|
|
+ getListData();
|
|
|
+}
|
|
|
+const handleSelectionChange = (val) => {
|
|
|
+ cur_page = val;
|
|
|
+ getListData();
|
|
|
+};
|
|
|
+const handleDateChange = (val) => {
|
|
|
+ if (val) {
|
|
|
+ exam_time = [val[0],val[1]];
|
|
|
+ } else {
|
|
|
+ exam_time = [];
|
|
|
+ }
|
|
|
+ cur_page = 1;
|
|
|
+ getListData();
|
|
|
+}
|
|
|
+function addSubject(item) {
|
|
|
+ let filter_list = item.ykj_kskm.split(',');
|
|
|
+ add_ykj_id = item.ykj_id;
|
|
|
+ dialogVisible = true;
|
|
|
+ add_sub = {
|
|
|
+ label:'',
|
|
|
+ value:''
|
|
|
+ }
|
|
|
+ for(let i in allSub) {
|
|
|
+ if(allSub[i].grade == item.ykj_ksnj) {
|
|
|
+ subject_list = allSub[i].subjects;
|
|
|
+ sub_filter_list = subject_list.filter(item=>!filter_list.some(ele=>ele === item.subject_id))
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+function addSubmit() {
|
|
|
+ isSubmit = true;
|
|
|
+ let data = {
|
|
|
+ ykj_id:add_ykj_id,
|
|
|
+ ykj_kskm:add_sub.value,
|
|
|
+ ykj_kskm_name:add_sub.label
|
|
|
+ }
|
|
|
+ add_subject(data).then(res =>{
|
|
|
+ isSubmit = false;
|
|
|
+ if(res.code === '1') {
|
|
|
+ ElMessage.success("科目添加成功!");
|
|
|
+ dialogVisible = false;
|
|
|
+ getListData();
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+function del_sub(ykj_id,ykl_id) {
|
|
|
+ ElMessageBox.confirm("确认删除该学科的考试?", "", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+
|
|
|
+ request({
|
|
|
+ url: "/yzy/ksjh/liankao_del_subject",
|
|
|
+ data: {
|
|
|
+ ykj_id: ykj_id,
|
|
|
+ ykl_id: ykl_id
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === "1") {
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: "删除成功",
|
|
|
+ });
|
|
|
+ getListData();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+}
|
|
|
+function toggleDown(index) {
|
|
|
+ if(listData[index].showSub) {
|
|
|
+ listData[index].showSub = false;
|
|
|
+ } else {
|
|
|
+ listData[index].showSub = true;
|
|
|
+ }
|
|
|
+}
|
|
|
+function delProject(item) {
|
|
|
+ ElMessageBox.confirm("删除考试计划将会清除考试计划下的所有数据,是否继续", "", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+
|
|
|
+ request({
|
|
|
+ url: "/yzy/ksjh/delete",
|
|
|
+ data: {
|
|
|
+ ykj_id: item.ykj_id,
|
|
|
+ clear: '1'
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === "1") {
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: "删除成功",
|
|
|
+ });
|
|
|
+ getListData();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
$color: #0048e5;
|
|
@@ -412,6 +393,10 @@ $color: #0048e5;
|
|
|
font-size: 14px;
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
+ &:disabled{
|
|
|
+ opacity: .45;
|
|
|
+ cursor: default;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.process-list-table {
|
|
@@ -639,6 +624,7 @@ $color: #0048e5;
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
li{
|
|
|
+ position: relative;
|
|
|
width: 205px;
|
|
|
height: 280px;
|
|
|
margin: 0 28px 23px 0;
|
|
@@ -648,10 +634,45 @@ $color: #0048e5;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+ .sub-del{
|
|
|
+ position: absolute;
|
|
|
+ right: 3px;
|
|
|
+ top: 3px;
|
|
|
+ z-index: 50;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ background: url("/images/icon-close.png") center no-repeat;
|
|
|
+ background-size: 20px 20px;
|
|
|
+ }
|
|
|
}
|
|
|
.subject-add-btn{
|
|
|
width: 57px;
|
|
|
height: 57px;
|
|
|
background: url("/images/icon-add.png") center no-repeat;
|
|
|
}
|
|
|
+.no-data {
|
|
|
+ width: 100%;
|
|
|
+ height: 450px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .no-data-img {
|
|
|
+ width: 233px;
|
|
|
+ height: 199px;
|
|
|
+ background: url("/images/no-data.png") center no-repeat;
|
|
|
+ }
|
|
|
+}
|
|
|
+.subject-name{
|
|
|
+ width: 138px;
|
|
|
+ height: 195px;
|
|
|
+ background: url("/images/subject-bg.png") center no-repeat;
|
|
|
+ background-size: 138px 195px;
|
|
|
+ padding: 20px 10px 0 10px;
|
|
|
+ font-size: 22px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+}
|
|
|
</style>
|