Jelajahi Sumber

题库管理编辑时科级组级取值bug

shenqilong 10 bulan lalu
induk
melakukan
a70645c43a
1 mengubah file dengan 7 tambahan dan 1 penghapusan
  1. 7 1
      src/views/platform/examination/questionBank/edit.vue

+ 7 - 1
src/views/platform/examination/questionBank/edit.vue

@@ -76,7 +76,7 @@
                         <i class="el-icon-question question-icon">:</i>
                     </el-tooltip>
                 </template>
-                <el-radio-group v-model="form.suo_shu_fan_wei_" :disabled="readonly">
+                <el-radio-group v-model="form.suo_shu_fan_wei_" :disabled="readonly" @change="chageFanwei">
                     <el-radio label="科级">科级</el-radio>
                     <el-radio label="组级">组级</el-radio>
                 </el-radio-group>
@@ -527,6 +527,12 @@ export default {
         changeLimit (e) {
             this.form.xian_kao_ci_shu_ = e === '1' ? 1 : '不限'
         },
+        chageFanwei (e) {
+            console.log(e, 'aaaaa')
+
+            const { deptList = [] } = this.$store.getters || {}
+            this.form.bian_zhi_bu_men_ = e === '组级' ? '' : deptList.filter(i => !i.path_id.split('.')[1])[0].positionId
+        },
         getRaterOptions () {
             const { userList = [], deptList = [] } = this.$store.getters || {}
             const depts = deptList.filter(i => i.depth > 2)