From d1e5f96ad319e7ab035317b0f1e9a03e83d5de4f Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期四, 15 六月 2023 14:33:35 +0800
Subject: [PATCH] 修改课目列表

---
 src/views/exam/paper/list.vue                    |    2 +-
 src/views/exam/question/edit/single-choice.vue   |    2 +-
 src/views/exam/question/edit/true-false.vue      |    2 +-
 src/store/modules/exam.js                        |    2 +-
 src/views/task/edit.vue                          |    2 +-
 src/views/education/subject/edit.vue             |   14 +++++++-------
 src/views/exam/question/list.vue                 |    2 +-
 src/views/exam/question/edit/multiple-choice.vue |    2 +-
 src/views/exam/question/edit/short-answer.vue    |    2 +-
 src/views/education/subject/list.vue             |    2 +-
 src/views/exam/question/edit/gap-filling.vue     |    2 +-
 src/views/exam/paper/edit.vue                    |   19 ++++++++++---------
 12 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/src/store/modules/exam.js b/src/store/modules/exam.js
index a8f8c3d..b96a649 100644
--- a/src/store/modules/exam.js
+++ b/src/store/modules/exam.js
@@ -12,7 +12,7 @@
       for (let k of key) {
         // console.log(j,k)
             if (j.id ==k){
-              str+= j.name + ' ( ' + j.levelName + ' )'+'  /'
+              str+= j.name + '  /'
             }
       }
     }
diff --git a/src/views/education/subject/edit.vue b/src/views/education/subject/edit.vue
index 3961f61..5521100 100644
--- a/src/views/education/subject/edit.vue
+++ b/src/views/education/subject/edit.vue
@@ -5,11 +5,11 @@
       <el-form-item label="璇剧洰锛�" required>
         <el-input v-model="form.name"></el-input>
       </el-form-item>
-      <el-form-item label="閮ㄩ棬锛�" required>
-        <el-select  ref="departRef" v-model="form.level" placeholder="閮ㄩ棬">
-          <el-option v-for="item in depart" :key="item.id" :value="item.id" :label="item.name"></el-option>
-        </el-select>
-      </el-form-item>
+<!--      <el-form-item label="閮ㄩ棬锛�" required>-->
+<!--        <el-select  ref="departRef" v-model="form.level" placeholder="閮ㄩ棬">-->
+<!--          <el-option v-for="item in depart" :key="item.id" :value="item.id" :label="item.name"></el-option>-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
       <el-form-item>
         <el-button type="primary" @click="submitForm">鎻愪氦</el-button>
         <el-button @click="resetForm">閲嶇疆</el-button>
@@ -66,9 +66,9 @@
     submitForm () {
       let _this = this
       this.formLoading = true
-      console.log(_this.$refs.departRef.selected.label)
+      // console.log(_this.$refs.departRef.selected.label)
       // this.form.levelName = this.enumFormat(this.levelEnum, this.form.level)
-      this.form.levelName = _this.$refs.departRef.selected.label
+      // this.form.levelName = _this.$refs.departRef.selected.label
       subjectApi.edit(this.form).then(data => {
         if (data.code === 1) {
           _this.$message.success(data.message)
diff --git a/src/views/education/subject/list.vue b/src/views/education/subject/list.vue
index 8025b88..39ac2b6 100644
--- a/src/views/education/subject/list.vue
+++ b/src/views/education/subject/list.vue
@@ -18,7 +18,7 @@
     <el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
       <el-table-column prop="id" label="Id" />
       <el-table-column prop="name" label="璇剧洰"/>
-      <el-table-column prop="levelName" label="閮ㄩ棬" />
+<!--      <el-table-column prop="levelName" label="閮ㄩ棬" />-->
       <el-table-column width="220px" label="鎿嶄綔" align="center">
         <template slot-scope="{row}">
           <router-link :to="{path:'/education/subject/edit', query:{id:row.id}}" class="link-left">
diff --git a/src/views/exam/paper/edit.vue b/src/views/exam/paper/edit.vue
index 29e8a43..fbb451a 100644
--- a/src/views/exam/paper/edit.vue
+++ b/src/views/exam/paper/edit.vue
@@ -11,7 +11,7 @@
         <el-select ref="subjectIdRef" v-model="form.subjectId" placeholder="璇剧洰" multiple
                    collapse-tags  @visible-change="subjectIdEvent" >
           <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id"
-                     :label="item.name+' ( '+item.levelName+' )'"></el-option>
+                     :label="item.name+' '"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="璇曞嵎绫诲瀷锛�" prop="paperType" required>
@@ -269,14 +269,15 @@
       // this.subjectFilter = this.subjects.filter(data =>{
       //   return this.form.departmentIds.forEach(item=>{data.level == item})
       // })
-      this.subjectFilter = []
-      this.form.departmentIds.forEach(item=>{
-        this.subjects.forEach(jectitem=>{
-          if (item==jectitem.level){
-            this.subjectFilter.push(jectitem)
-          }
-        })
-      })
+      //
+      // this.subjectFilter = []
+      // this.form.departmentIds.forEach(item=>{
+      //   this.subjects.forEach(jectitem=>{
+      //     if (item==jectitem.level){
+      //       this.subjectFilter.push(jectitem)
+      //     }
+      //   })
+      // })
       console.log(this.subjects,this.form.departmentIds)
       // this.subjectFilter = this.subjects
     },
diff --git a/src/views/exam/paper/list.vue b/src/views/exam/paper/list.vue
index e737035..f2458b6 100644
--- a/src/views/exam/paper/list.vue
+++ b/src/views/exam/paper/list.vue
@@ -11,7 +11,7 @@
       </el-form-item>
       <el-form-item label="璇剧洰锛�" >
         <el-select v-model="queryParam.subjectId"  clearable>
-          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' ( '+item.levelName+' )'"></el-option>
+          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' '"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
diff --git a/src/views/exam/question/edit/gap-filling.vue b/src/views/exam/question/edit/gap-filling.vue
index cc5d0ac..5e2160e 100644
--- a/src/views/exam/question/edit/gap-filling.vue
+++ b/src/views/exam/question/edit/gap-filling.vue
@@ -9,7 +9,7 @@
       <el-form-item label="璇剧洰锛�" prop="subjectIds" required>
         <el-select v-model="form.subjectIds" placeholder="璇剧洰"  multiple
                    collapse-tags>
-          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' ( '+item.levelName+' )'"></el-option>
+          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' '"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="棰樺共锛�" prop="title" required>
diff --git a/src/views/exam/question/edit/multiple-choice.vue b/src/views/exam/question/edit/multiple-choice.vue
index 97b5da8..8f859e9 100644
--- a/src/views/exam/question/edit/multiple-choice.vue
+++ b/src/views/exam/question/edit/multiple-choice.vue
@@ -9,7 +9,7 @@
       <el-form-item label="璇剧洰锛�" prop="subjectIds" required>
         <el-select v-model="form.subjectIds" placeholder="璇剧洰"  multiple
                    collapse-tags>
-          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' ( '+item.levelName+' )'"></el-option>
+          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' '"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="棰樺共锛�" prop="title" required>
diff --git a/src/views/exam/question/edit/short-answer.vue b/src/views/exam/question/edit/short-answer.vue
index 62fdcfd..9df5928 100644
--- a/src/views/exam/question/edit/short-answer.vue
+++ b/src/views/exam/question/edit/short-answer.vue
@@ -9,7 +9,7 @@
       <el-form-item label="璇剧洰锛�" prop="subjectIds" required>
         <el-select v-model="form.subjectIds" placeholder="璇剧洰"  multiple
                    collapse-tags>
-          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' ( '+item.levelName+' )'"></el-option>
+          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' '"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="棰樺共锛�" prop="title" required>
diff --git a/src/views/exam/question/edit/single-choice.vue b/src/views/exam/question/edit/single-choice.vue
index 59bb544..4042019 100644
--- a/src/views/exam/question/edit/single-choice.vue
+++ b/src/views/exam/question/edit/single-choice.vue
@@ -9,7 +9,7 @@
       <el-form-item label="璇剧洰锛�" prop="subjectIds" required>
         <el-select v-model="form.subjectIds" placeholder="璇剧洰"  multiple
                    collapse-tags>
-          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' ( '+item.levelName+' )'"></el-option>
+          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' '"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="棰樺共锛�" prop="title" required>
diff --git a/src/views/exam/question/edit/true-false.vue b/src/views/exam/question/edit/true-false.vue
index 16649ac..7756919 100644
--- a/src/views/exam/question/edit/true-false.vue
+++ b/src/views/exam/question/edit/true-false.vue
@@ -9,7 +9,7 @@
       <el-form-item label="璇剧洰锛�" prop="subjectIds" required>
         <el-select v-model="form.subjectIds" placeholder="璇剧洰"  multiple
                    collapse-tags>
-          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' ( '+item.levelName+' )'"></el-option>
+          <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' '"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="棰樺共锛�" prop="title" required>
diff --git a/src/views/exam/question/list.vue b/src/views/exam/question/list.vue
index 2eb909b..af7f2bb 100644
--- a/src/views/exam/question/list.vue
+++ b/src/views/exam/question/list.vue
@@ -16,7 +16,7 @@
       <el-form-item label="璇剧洰锛�">
         <el-select v-model="queryParam.subjectId" clearable>
           <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id"
-                     :label="item.name+' ( '+item.levelName+' )'"></el-option>
+                     :label="item.name+' '"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="棰樺瀷锛�">
diff --git a/src/views/task/edit.vue b/src/views/task/edit.vue
index 4967d4e..9b5f374 100644
--- a/src/views/task/edit.vue
+++ b/src/views/task/edit.vue
@@ -33,7 +33,7 @@
       <el-form :model="paperPage.queryParam" ref="queryForm" :inline="true">
         <el-form-item label="璇剧洰锛�" >
           <el-select v-model="paperPage.queryParam.subjectId"  clearable>
-            <el-option v-for="item in paperPage.subjectFilter" :key="item.id" :value="item.id" :label="item.name+' ( '+item.levelName+' )'"></el-option>
+            <el-option v-for="item in paperPage.subjectFilter" :key="item.id" :value="item.id" :label="item.name+' '"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>

--
Gitblit v1.8.0