|
@@ -45,33 +45,20 @@
|
|
|
</el-icon>
|
|
|
<span class="ml-5px inline-block align-middle">新建考试计划</span>
|
|
|
</button>
|
|
|
- <button type="button" class="del-btn" :disabled="chooseCheck.length === 0">批量删除</button>
|
|
|
</div>
|
|
|
<div class="mt-20px" v-if="listData.length > 0">
|
|
|
<div class="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>
|
|
|
- <div class="w-280px text-left">考试计划名称</div>
|
|
|
+ <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>
|
|
|
- <div v-for="item in listData" class="line">
|
|
|
+ <div v-for="(item,index) in listData" class="line">
|
|
|
<div class="up">
|
|
|
- <div class="w-60px">
|
|
|
- <p class="set-check single">
|
|
|
- <input type="checkbox" :id="item.ykj_id" :value="item.ykj_id" v-model="chooseCheck">
|
|
|
- <label :for="item.ykj_id"></label>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div class="w-280px text-left">{{item.ykj_ksrwmc}}</div>
|
|
|
+ <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">
|
|
@@ -93,7 +80,7 @@
|
|
|
<div class="w-220px text-left">{{item.ykj_ksrq}}~{{item.ykj_jsrq}}</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>
|
|
|
+ <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">
|
|
@@ -104,16 +91,15 @@
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <button type="button" class="ml-10px inline-block align-middle arrow-btn up"></button>
|
|
|
+ <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">
|
|
|
+ <div class="down pt-15px pl-35px" v-if="item.showSub">
|
|
|
<ul class="subject-list">
|
|
|
- <li>
|
|
|
+ <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="w-140px h-195px m-auto">
|
|
|
- <img src="/images/yuwen.png" class="w-full" alt="">
|
|
|
- </div>
|
|
|
+ <div class="subject-name m-auto">{{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">
|
|
@@ -123,101 +109,12 @@
|
|
|
<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>
|
|
|
+ <button type="button" class="op-btn">批阅任务</button>
|
|
|
+ <button type="button" class="ml-10px 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>
|
|
|
- </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>
|
|
|
- </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>
|
|
|
- <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">
|
|
|
+ <li class="cursor-pointer" @click="addSubject(item,index)">
|
|
|
<div class="subject-add-btn"></div>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -247,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>
|
|
@@ -256,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>
|
|
@@ -274,8 +171,10 @@
|
|
|
}
|
|
|
</route>
|
|
|
<script setup>
|
|
|
-import {project_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)
|
|
|
const linkTo = (obj) => {
|
|
@@ -306,20 +205,35 @@ let type_list = [{
|
|
|
value: '7',
|
|
|
label: '联考'
|
|
|
}]
|
|
|
-let subject_list = []
|
|
|
-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.user_role_id < 72) {
|
|
|
+ data.sm_id = user.sm_info.sm_id
|
|
|
+ }
|
|
|
+ subject(data).then(res =>{
|
|
|
+ if(res.code === '1') {
|
|
|
+ allSub = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
+getSubject();
|
|
|
function getListData() {
|
|
|
let data = {
|
|
|
page:cur_page,
|
|
@@ -333,7 +247,15 @@ function getListData() {
|
|
|
project_list(data).then(res=>{
|
|
|
if(res.code === '1') {
|
|
|
listData = res.data.page_data;
|
|
|
- console.log(listData,87)
|
|
|
+ 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);
|
|
|
}
|
|
@@ -357,6 +279,68 @@ const handleDateChange = (val) => {
|
|
|
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;
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
$color: #0048e5;
|
|
@@ -615,6 +599,7 @@ $color: #0048e5;
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
li{
|
|
|
+ position: relative;
|
|
|
width: 205px;
|
|
|
height: 280px;
|
|
|
margin: 0 28px 23px 0;
|
|
@@ -624,6 +609,16 @@ $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;
|
|
@@ -643,4 +638,16 @@ $color: #0048e5;
|
|
|
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>
|