zdl 1 year ago
parent
commit
51bf9f92f8
2 changed files with 12 additions and 3 deletions
  1. 4 2
      src/views/search/components/ProfessionSearch.vue
  2. 8 1
      src/views/search/index.vue

+ 4 - 2
src/views/search/components/ProfessionSearch.vue

@@ -16,10 +16,12 @@
               <el-cascader
                 v-model="item.key"
                 :options="bl"
+                :show-all-levels="false"
                 :props="{
                   label: 'name',
                   value: 'key',
-                  expandTrigger: 'hover'
+                  expandTrigger: 'hover',
+                  emitPath: false
                 }">
               </el-cascader>
             </el-col>
@@ -215,7 +217,7 @@ export default {
   methods: {
     // 获取select条件
     getSelects() {
-      this.$axios3.post('/bl/serach_where', params).then(res => {
+      this.$axios3.post('/bl/serach_where', {}).then(res => {
         this.bl = res.data.bl || [];
       });
     },

+ 8 - 1
src/views/search/index.vue

@@ -2,7 +2,7 @@
   <div class="dashboard-container">
     <div class="block">
       <div class="barBtn">
-        <el-radio-group v-model="choice" class="bnts" size="medium">
+        <el-radio-group v-model="choice" class="bnts" size="medium" @change="handleRadioChange">
           <el-radio-button :label="0">普通检索</el-radio-button>
           <el-radio-button :label="1">高级检索</el-radio-button>
           <el-radio-button :label="2">专业检索</el-radio-button>
@@ -809,6 +809,13 @@ export default {
     // 重置
     handleReset() {
       this.handleProfessionSearch({})
+    },
+    // 检索类型变化
+    handleRadioChange(val) {
+      console.log(val)
+      if (val == 2) {
+        this.handleProfessionSearch({})
+      }
     }
   },
 };