lsc 2 年之前
父節點
當前提交
659c8222e7
共有 1 個文件被更改,包括 63 次插入99 次删除
  1. 63 99
      src/components/pages/munAdmin/anliList.vue

+ 63 - 99
src/components/pages/munAdmin/anliList.vue

@@ -13,23 +13,11 @@
             <el-option value="0" label="所有分类"></el-option>
           </el-select>
         </div> -->
-        <div
-          class="all_choose"
-          v-for="(item, index) in CourseType[0]"
-          :key="index"
-        >
+        <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
           <span>{{ item.name }}</span>
-          <el-select
-            v-model="courseTypeId[item.id]"
-            placeholder="请选择"
-          >
+          <el-select v-model="courseTypeId[item.id]" placeholder="请选择" @change="search">
             <el-option label="全部" value="1">全部</el-option>
-            <el-option
-              v-for="item1 in CourseTypeJson[item.id]"
-              :key="item1.id"
-              :label="item1.name"
-              :value="item1.id"
-            >
+            <el-option v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.name" :value="item1.id">
             </el-option>
           </el-select>
         </div>
@@ -72,64 +60,33 @@
       </div>
     </div>
     <div class="student_page">
-      <el-pagination
-        background
-        layout="prev, pager, next"
-        :page-size="10"
-        :total="total"
-        v-if="page && tableData.length"
-        style="padding-bottom: 20px"
-        @current-change="handleCurrentChange"
-      >
+      <el-pagination background layout="prev, pager, next" :page-size="10" :total="total"
+        v-if="page && tableData.length" style="padding-bottom: 20px" @current-change="handleCurrentChange">
       </el-pagination>
     </div>
-    <el-dialog
-      title="分配案例"
-      :visible.sync="dialogVisibleMember"
-      :append-to-body="true"
-      width="25%"
-      height="80%"
-      :before-close="handleClose"
-      class="dialog_diy1 customWidth"
-    >
+    <el-dialog title="分配案例" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
+      :before-close="handleClose" class="dialog_diy1 customWidth">
       <div class="people">
         <div class="people_top">
           <div class="people_top_right">
             <div class="people_search">
               <div>选择评委</div>
               <el-select v-model="reviewer" placeholder="请选择评委">
-                <el-option
-                  v-for="item in reviewerBox"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                ></el-option>
+                <el-option v-for="item in reviewerBox" :key="item.id" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </div>
           </div>
         </div>
-        <el-checkbox
-          :indeterminate="isIndeterminate"
-          v-model="checkAll"
-          @change="handleCheckAllChange"
-          style="padding: 15px 0 0 15px"
-          >全选</el-checkbox
-        >
-        <el-checkbox-group
-          v-model="checkboxList"
-          class="people_name"
-          v-if="anliBox1.length"
-          @change="handleCheckedAnliChange"
-        >
+        <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange"
+          style="padding: 15px 0 0 15px">全选</el-checkbox>
+        <el-checkbox-group v-model="checkboxList" class="people_name" v-if="anliBox1.length"
+          @change="handleCheckedAnliChange">
           <el-checkbox v-for="item in anliBox1" :key="item.id" :label="item.id">
             <div class="t_j_box">
               <div>案例名称:</div>
-              <el-tooltip
-                placement="top"
-                :content="item.info.title ? item.info.title : '暂无姓名'"
-              >
+              <el-tooltip placement="top" :content="item.info.title ? item.info.title : '暂无姓名'">
                 <span>{{
-                  item.info.title ? item.info.title : "暂无姓名"
+                item.info.title ? item.info.title : "暂无姓名"
                 }}</span>
               </el-tooltip>
             </div>
@@ -198,28 +155,21 @@ export default {
     getAnliList() {
       var typeE = [];
       var typea, typeb, typec, typed;
-      if (this.isChoose == 1) {
-        for (var i = 0; i < this.CourseType[0].length; i++) {
-          if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
-            typeE.push(this.CourseType[0][i].id);
-          } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
-            if (this.CourseType[0][i].name == "年级") {
-              typea = this.courseTypeId[this.CourseType[0][i].id];
-            } else if (this.CourseType[0][i].name == "专栏") {
-              typeb = this.courseTypeId[this.CourseType[0][i].id];
-            } else if (this.CourseType[0][i].name == "栏目") {
-              typeb = this.courseTypeId[this.CourseType[0][i].id];
-            } else if (this.CourseType[0][i].name == "学院") {
-              typeb = this.courseTypeId[this.CourseType[0][i].id];
-            } else if (this.CourseType[0][i].name == "新技能") {
-              typec = this.courseTypeId[this.CourseType[0][i].id];
-            } else if (this.CourseType[0][i].name == "学科") {
-              typed = this.courseTypeId[this.CourseType[0][i].id];
-            }
-            this.courseTypeSon.push(
-              this.courseTypeId[this.CourseType[0][i].id]
-            );
-          }
+      this.tableData = []
+      for (var i = 0; i < this.CourseType[0].length; i++) {
+        if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
+          typeE.push(this.CourseType[0][i].id);
+        } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
+          if (this.CourseType[0][i].name == "案例组别") {
+            typea = this.courseTypeId[this.CourseType[0][i].id];
+          } else if (this.CourseType[0][i].name == "年级") {
+            typeb = this.courseTypeId[this.CourseType[0][i].id];
+          } else if (this.CourseType[0][i].name == "学科") {
+            typec = this.courseTypeId[this.CourseType[0][i].id];
+          } 
+          this.courseTypeSon.push(
+            this.courseTypeId[this.CourseType[0][i].id]
+          );
         }
       }
       let params = {
@@ -264,6 +214,7 @@ export default {
               }
             }
           }
+          this.getAnliList()
         })
         .catch((err) => {
           console.error(err);
@@ -304,7 +255,7 @@ export default {
     },
   },
   created() {
-    this.getAnliList();
+    // this.getAnliList();
     this.getAdmin();
     this.selectType();
     this.getAnliBox();
@@ -320,32 +271,34 @@ export default {
 </style>
 
 <style scoped>
-.dialog_diy1 >>> .el-dialog__header {
+.dialog_diy1>>>.el-dialog__header {
   background: #3d67bd !important;
   padding: 15px 20px;
   text-align: center;
 }
-.dialog_diy1 >>> .el-dialog__title {
+
+.dialog_diy1>>>.el-dialog__title {
   color: #fff;
 }
 
-.dialog_diy1 >>> .el-dialog__headerbtn {
+.dialog_diy1>>>.el-dialog__headerbtn {
   top: 19px;
 }
 
-.dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close {
+.dialog_diy1>>>.el-dialog__headerbtn .el-dialog__close {
   color: #fff;
 }
 
-.dialog_diy1 >>> .el-dialog__headerbtn .el-dialog__close:hover {
+.dialog_diy1>>>.el-dialog__headerbtn .el-dialog__close:hover {
   color: #fff;
 }
 
-.dialog_diy1 >>> .el-dialog__body,
-.dialog_diy1 >>> .el-dialog__footer {
+.dialog_diy1>>>.el-dialog__body,
+.dialog_diy1>>>.el-dialog__footer {
   background: #fafafa;
 }
-.disUoloadSty >>> .el-upload--picture-card {
+
+.disUoloadSty>>>.el-upload--picture-card {
   display: none;
   /* 上传按钮隐藏 */
 }
@@ -373,18 +326,18 @@ export default {
   align-items: center;
 }
 
-.touLeft > div {
+.touLeft>div {
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
   align-items: center;
 }
 
-.touLeft > div > div {
+.touLeft>div>div {
   margin-right: 10px;
 }
 
-.touRight > div:nth-child(2) > .el-button {
+.touRight>div:nth-child(2)>.el-button {
   background: #2268bd;
   color: #fff;
 }
@@ -415,7 +368,7 @@ export default {
   height: 170px;
 }
 
-.anliImg > img {
+.anliImg>img {
   width: 100%;
   height: 100%;
 }
@@ -432,7 +385,7 @@ export default {
   box-sizing: border-box;
 }
 
-.detailBox > div:nth-child(1) {
+.detailBox>div:nth-child(1) {
   font-size: 20px;
   width: 250px;
   white-space: nowrap;
@@ -441,7 +394,7 @@ export default {
   word-break: break-word;
 }
 
-.detailBox > div:nth-child(2) {
+.detailBox>div:nth-child(2) {
   color: #999;
   margin-top: 5px;
   font-size: 14px;
@@ -456,19 +409,21 @@ export default {
   padding: 10px 0 0 0;
 }
 
-.anliButton > div {
+.anliButton>div {
   margin-right: 5px;
 }
 
-.anliButton > div > .el-button {
+.anliButton>div>.el-button {
   background: #409efe;
   color: #fff;
   width: 80px;
   border-radius: 5px;
 }
-.customWidth >>> .el-dialog {
+
+.customWidth>>>.el-dialog {
   min-width: 500px !important;
 }
+
 .people {
   border: 1px solid rgb(229 229 229);
   height: 495px;
@@ -478,6 +433,7 @@ export default {
   background: #fff;
   box-shadow: 0px 0px 10px 8px #ededed;
 }
+
 .people::-webkit-scrollbar {
   /*滚动条整体样式*/
   width: 6px;
@@ -497,6 +453,7 @@ export default {
   -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
   background-color: rgba(0, 0, 0, 0.1);
 }
+
 .people_top {
   display: flex;
   width: 100%;
@@ -517,13 +474,16 @@ export default {
   flex-wrap: nowrap;
   align-items: center;
 }
-.people_search > div:nth-child(1) {
+
+.people_search>div:nth-child(1) {
   font-size: 20px;
   margin-right: 10px;
 }
+
 .t_j_box {
   display: flex;
 }
+
 .t_j_box span:nth-child(1) {
   width: 15%;
   overflow: hidden;
@@ -531,17 +491,20 @@ export default {
   text-overflow: ellipsis;
   white-space: nowrap;
 }
+
 .t_j_box span:nth-child(2) {
   width: 30%;
   overflow: hidden;
   text-overflow: ellipsis;
   margin-right: 10px;
 }
+
 .t_j_box span:nth-child(3) {
   width: calc(55% - 20px);
   overflow: hidden;
   text-overflow: ellipsis;
 }
+
 .people_name {
   display: flex;
   flex-direction: column;
@@ -549,7 +512,8 @@ export default {
   align-items: flex-start;
   padding: 15px 0 0 15px;
 }
-.people_name >>> .el-checkbox {
+
+.people_name>>>.el-checkbox {
   margin-bottom: 10px;
 }
 </style>