sys5923812@126.com 3 dni temu
rodzic
commit
dff33b306e

+ 18 - 11
src/views/xjc-integratedmachine/environment/contrast_university.vue

@@ -133,16 +133,18 @@
                 <div class="two-page" v-show="twoPage">
                     <!--对比 孙一石 -->
                     <select v-model="dbForm.area">
-                        <option v-for="dict in gk_province" :key="dict.value" :value="dict.value" >{{dict.label}}</option>
+                        <option v-for="dict in gk_province" :key="dict.value" :value="dict.value">{{dict.label}}
+                        </option>
                     </select>
                     <select v-model="dbForm.category">
-                        <option v-for="dict in candidate_category" :key="dict.value" :value="dict.value">{{dict.label}}</option>
+                        <option v-for="dict in candidate_category" :key="dict.value" :value="dict.value">
+                            {{dict.label}}
+                        </option>
                     </select>
                     <button @click="dbResult">对比结果</button>
                 </div>
 
 
-
             </div>
             <drag_component></drag_component>
         </div>
@@ -191,7 +193,7 @@
     import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
     import Drag_component from "@/views/xjc-integratedmachine/components/drag_component.vue";
     import {ref} from "vue";
-    import {getUniversityByKeyword,getScoreInfo} from "@/api/xjc-integratedmachine/environment/university.js";
+    import {getUniversityByKeyword, getScoreInfo} from "@/api/xjc-integratedmachine/environment/university.js";
 
 
     const router = useRouter()
@@ -328,7 +330,7 @@
         school_category,
         property,
         candidate_category
-    } = proxy.useDict('gk_province', 'educationlevel', 'school_category', 'characteristic', 'property','candidate_category')
+    } = proxy.useDict('gk_province', 'educationlevel', 'school_category', 'characteristic', 'property', 'candidate_category')
 
 
     function showAreaChooseHandler() {
@@ -350,7 +352,6 @@
         form.value.educationlevelName = item.label
         showEducationlevel.value = false
     }
-
     function showCharacteristicHandler() {
         showCharacteristic.value = true
     }
@@ -360,20 +361,26 @@
         form.value.characteristicName = item.label
         showCharacteristic.value = false
     }
-
     function search() {
         router.push({
             path: '/xjc-integratedmachine/environment/university_list',
             query: form.value
         })
     }
-
     //对比 孙一石 2025-08-15
     const dbForm = ref({})
 
-    function dbResult(e){
-        console.log("ssss:",dbForm)
-        getScoreInfo(dbForm.value)
+    function dbResult(e) {
+        let univercity = JSON.parse(sessionStorage.getItem("contrastList"))
+        if (univercity.length != 2) {
+            alert("选择2个学校啊,现在是" + univercity.length)
+        } else {
+            dbForm.value.university0 = univercity[0].oldid
+            dbForm.value.university1 = univercity[1].oldid
+        }
+        getScoreInfo(dbForm.value).then(resp => {
+            console.log(resp)
+        })
     }
 
     onMounted(() => {