代码
This commit is contained in:
parent
d14a5676f3
commit
0dcb9779eb
@ -1,6 +1,6 @@
|
||||
import Axios from 'axios'
|
||||
|
||||
const host = "http://192.168.3.159"
|
||||
const host = "http://192.168.3.10"
|
||||
|
||||
const config = {}
|
||||
export interface res<T> { code: number, msg: string, data: T }
|
||||
|
51
src/api/schoolquery.ts
Normal file
51
src/api/schoolquery.ts
Normal file
@ -0,0 +1,51 @@
|
||||
import { res, schoolquery } from "./base";
|
||||
|
||||
export interface allProvince {
|
||||
area_id: number,
|
||||
area_name: string,
|
||||
area_level: number,
|
||||
area_parent: number
|
||||
}
|
||||
|
||||
export async function getAllProvince() {
|
||||
const res = await schoolquery.post<res<allProvince[]>>("/getAllProvince")
|
||||
return res.data
|
||||
}
|
||||
|
||||
|
||||
export async function getAllCityVByArea_parent({ area_parent }: { area_parent: number }) {
|
||||
const res = await schoolquery.post<res<allProvince[]>>("/getAllCityVByArea_parent",{area_parent})
|
||||
return res.data
|
||||
}
|
||||
|
||||
|
||||
interface UniversityByConditio{
|
||||
area_names:string[],
|
||||
gongban: number,
|
||||
minban: number,
|
||||
benke: number,
|
||||
zhuanke: number,
|
||||
is985: number,
|
||||
is211: number,
|
||||
yiliuxveke: number,
|
||||
yiliudaxve: number
|
||||
|
||||
}
|
||||
|
||||
export interface getUniversityByConditionres{
|
||||
university_code: string,
|
||||
university_name: string,
|
||||
province: string,
|
||||
city: string,
|
||||
university_level: number,
|
||||
university_attribute: number,
|
||||
is985: number,
|
||||
is211: number,
|
||||
is_first_class_university: number,
|
||||
is_first_class_subject: number
|
||||
}
|
||||
|
||||
export async function getUniversityByCondition(info: UniversityByConditio) {
|
||||
const res = await schoolquery.post<res<getUniversityByConditionres>>("/getUniversityByCondition",info)
|
||||
return res.data
|
||||
}
|
58
src/api/voluntary.ts
Normal file
58
src/api/voluntary.ts
Normal file
@ -0,0 +1,58 @@
|
||||
import { voluntary } from "./base"
|
||||
|
||||
|
||||
export async function getAllApplicationByQujian({upper_limit,lower_limit}:{upper_limit: number,lower_limit:number}){
|
||||
let info:any = localStorage.getItem("token")
|
||||
info = JSON.parse(info)
|
||||
const res = await voluntary.post<any>("/getAllApplicationByQujian",{upper_limit,lower_limit,student:info.student})
|
||||
return res.data
|
||||
}
|
||||
|
||||
|
||||
export async function addApplication(application_id:number) {
|
||||
let info:any = localStorage.getItem("token")
|
||||
info = JSON.parse(info)
|
||||
const res = await voluntary.post<any>("/addApplication",{shunxu: new Date().getTime() % 94,student_id: info.student.student_id,application:{application_id}})
|
||||
return res.data
|
||||
}
|
||||
|
||||
export async function zhiyuanqingdan() {
|
||||
let info:any = localStorage.getItem("token")
|
||||
info=JSON.parse(info)
|
||||
const res=await voluntary.post<any>("/getStudentApplicationByStudent_id",{student_id:info.student.student_id})
|
||||
console.log(res)
|
||||
return res.data
|
||||
}
|
||||
|
||||
export async function removeStudentApplicationByStudent_idAndIndex({shuxu}:{shuxu: number}){
|
||||
let info:any = localStorage.getItem("token")
|
||||
info=JSON.parse(info)
|
||||
const res=await voluntary.post<any>("/removeStudentApplicationByStudent_idAndIndex",{shuxu,student_id:info.student.student_id})
|
||||
console.log(res)
|
||||
return res.data
|
||||
}
|
||||
|
||||
export async function gerenxinxi(data:any,lesson:any) {
|
||||
let info:any = localStorage.getItem("token")
|
||||
info=JSON.parse(info)
|
||||
data.student_id=info.student.student_id
|
||||
// for(let i in lesson){
|
||||
// if(lesson[i]==1){
|
||||
// data.subject_one=1
|
||||
// }else if(lesson[i]==2){
|
||||
// data.subject_one=2
|
||||
// }else if(lesson[i]==3){
|
||||
// data.subject_two=3
|
||||
// }else if(lesson[i]==4){
|
||||
// data.subject_two=4
|
||||
// }else if()
|
||||
// }
|
||||
data.subject_one=lesson[0]
|
||||
data.subject_two=lesson[1]
|
||||
data.subject_three=lesson[2]
|
||||
console.log(data)
|
||||
console.log(lesson)
|
||||
const res=await voluntary.post("/completeInformation",data)
|
||||
console.log(res)
|
||||
return res.data
|
||||
}
|
@ -30,12 +30,12 @@
|
||||
<div class="rigth">
|
||||
<a-button type="link" @click="navto({key: '/login'})">登录</a-button>
|
||||
<a-button type="link">注册</a-button>
|
||||
<a-button type="primary">
|
||||
<a-button type="primary" @click="navto({key: '/gerenxinxi'})">
|
||||
<template #icon>
|
||||
<UserOutlined />
|
||||
</template>
|
||||
</a-button>
|
||||
<a-button type="text">
|
||||
<a-button type="text" @click="navto({key: '/zhiyuanqingdan'})">
|
||||
<template #icon>
|
||||
<UnorderedListOutlined />
|
||||
</template>
|
||||
|
@ -22,6 +22,12 @@ const routes: RouteRecordRaw[] = [{
|
||||
}, {
|
||||
path: "fillout",
|
||||
component: () => import('./pages/fillout.vue')
|
||||
},{
|
||||
path: "zhiyuanqingdan",
|
||||
component: () => import('./pages/zhiyuanqingdan.vue')
|
||||
},{
|
||||
path: "gerenxinxi",
|
||||
component: () => import('./pages/gerenxinxi.vue')
|
||||
}]
|
||||
|
||||
}]
|
||||
|
@ -1,149 +1,253 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="select">
|
||||
<div>
|
||||
院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />
|
||||
</div>
|
||||
<div>
|
||||
院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<a-table :columns="columns" :data-source="data">
|
||||
<template v-slot:name="text">{{ text }}</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div>
|
||||
<div class="select">
|
||||
<div style="width: 100%">
|
||||
院校省份:
|
||||
<a-radio-group v-model:value="shengfen">
|
||||
<a-radio-button
|
||||
:value="index"
|
||||
v-for="item,index in shengfenlist"
|
||||
:key="item.area_id"
|
||||
>{{ item.area_name }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
<br />城市:
|
||||
<a-radio-group v-model:value="chengshi">
|
||||
<a-radio-button
|
||||
:value="index"
|
||||
v-for="item,index in chengshilist"
|
||||
:key="item.area_id"
|
||||
>{{ item.area_name }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
<br />已选择:
|
||||
<a-button
|
||||
v-for="item,index in xaunzelist"
|
||||
:key="index"
|
||||
@click="removexuanzhong(index)"
|
||||
>{{ item }}</a-button>
|
||||
<br />
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
学历层次:
|
||||
<a-button
|
||||
@click="shaixuan.benke == 1 ? shaixuan.benke = 0 : shaixuan.benke = 1"
|
||||
:type="shaixuan.benke == 1 ? 'primary' : 'link'"
|
||||
>本科</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.zhuanke == 1 ? shaixuan.zhuanke = 0 : shaixuan.zhuanke = 1"
|
||||
:type="shaixuan.zhuanke == 1 ? 'primary' : 'link'"
|
||||
>专科</a-button>
|
||||
<br />学院层次:
|
||||
<a-button
|
||||
@click="shaixuan.is985 == 1 ? shaixuan.is985 = 0 : shaixuan.is985 = 1"
|
||||
:type="shaixuan.is985 == 1 ? 'primary' : 'link'"
|
||||
>985</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.is211 == 1 ? shaixuan.is211 = 0 : shaixuan.is211 = 1"
|
||||
:type="shaixuan.is211 == 1 ? 'primary' : 'link'"
|
||||
>211</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.yiliuxveke == 1 ? shaixuan.yiliuxveke = 0 : shaixuan.yiliuxveke = 1"
|
||||
:type="shaixuan.yiliuxveke == 1 ? 'primary' : 'link'"
|
||||
>一流学科建设</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.yiliudaxve == 1 ? shaixuan.yiliudaxve = 0 : shaixuan.yiliudaxve = 1"
|
||||
:type="shaixuan.yiliudaxve == 1 ? 'primary' : 'link'"
|
||||
>一流大学建设</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.gongban == 1 ? shaixuan.gongban = 0 : shaixuan.gongban = 1"
|
||||
:type="shaixuan.gongban == 1 ? 'primary' : 'link'"
|
||||
>公办</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.minban == 1 ? shaixuan.minban = 0 : shaixuan.minban = 1"
|
||||
:type="shaixuan.minban == 1 ? 'primary' : 'link'"
|
||||
>民办</a-button>
|
||||
<br />已选择:
|
||||
<a-button
|
||||
v-if="shaixuan.benke == 1"
|
||||
@click="shaixuan.benke == 1 ? shaixuan.benke = 0 : shaixuan.benke = 1"
|
||||
:type="shaixuan.benke == 1 ? 'primary' : 'link'"
|
||||
>本科</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.zhuanke == 1"
|
||||
@click="shaixuan.zhuanke == 1 ? shaixuan.zhuanke = 0 : shaixuan.zhuanke = 1"
|
||||
:type="shaixuan.zhuanke == 1 ? 'primary' : 'link'"
|
||||
>专科</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.is985 == 1"
|
||||
@click="shaixuan.is985 == 1 ? shaixuan.is985 = 0 : shaixuan.is985 = 1"
|
||||
:type="shaixuan.is985 == 1 ? 'primary' : 'link'"
|
||||
>985</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.is211 == 1"
|
||||
@click="shaixuan.is211 == 1 ? shaixuan.is211 = 0 : shaixuan.is211 = 1"
|
||||
:type="shaixuan.is211 == 1 ? 'primary' : 'link'"
|
||||
>211</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.yiliuxveke == 1"
|
||||
@click="shaixuan.yiliuxveke == 1 ? shaixuan.yiliuxveke = 0 : shaixuan.yiliuxveke = 1"
|
||||
:type="shaixuan.yiliuxveke == 1 ? 'primary' : 'link'"
|
||||
>一流学科建设</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.yiliudaxve == 1"
|
||||
@click="shaixuan.yiliudaxve == 1 ? shaixuan.yiliudaxve = 0 : shaixuan.yiliudaxve = 1"
|
||||
:type="shaixuan.yiliudaxve == 1 ? 'primary' : 'link'"
|
||||
>一流大学建设</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.gongban == 1"
|
||||
@click="shaixuan.gongban == 1 ? shaixuan.gongban = 0 : shaixuan.gongban = 1"
|
||||
:type="shaixuan.gongban == 1 ? 'primary' : 'link'"
|
||||
>公办</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.minban == 1"
|
||||
@click="shaixuan.minban == 1 ? shaixuan.minban = 0 : shaixuan.minban = 1"
|
||||
:type="shaixuan.minban == 1 ? 'primary' : 'link'"
|
||||
>民办</a-button>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<a-table :columns="columns" :data-source="data">
|
||||
<template v-slot:name>50%</template>
|
||||
<!-- <template v-slot:province="text">{{ text.record.area.area_name }}</template> -->
|
||||
<!-- <template v-slot:university_level="text">{{ text.record.university_level == 0 ? "专科": "本科" }}</template> -->
|
||||
<template v-slot:tianbao="text">
|
||||
|
||||
|
||||
<a-button @click="tianbao(text.record.application_id)">填报</a-button>
|
||||
</template>
|
||||
<template v-slot:is985="text">{{ text.record.is985 == 0 ? "X" : "√" }}</template>
|
||||
<template v-slot:is211="text">{{ text.record.is211 == 0 ? "X" : "√" }}</template>
|
||||
<template
|
||||
v-slot:is_first_class_university="text"
|
||||
>{{ text.record.is_first_class_university == 0 ? "X" : "√" }}</template>
|
||||
<template
|
||||
v-slot:is_first_class_subject="text"
|
||||
>{{ text.record.is_first_class_subject == 0 ? "X" : "√" }}</template>
|
||||
<template
|
||||
v-slot:university_attribute="text"
|
||||
>{{ text.record.university_attribute == 0 ? "民办" : "公办" }}</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue"
|
||||
const value = ref<string[]>([])
|
||||
const options = ref([
|
||||
{ label: 'Apple', value: 'Apple' },
|
||||
{ label: 'Pear', value: 'Pear' },
|
||||
{ label: 'Orange', value: 'Orange' },
|
||||
]);
|
||||
const plainOptions = ref(['Apple', 'Pear', 'Orange']);
|
||||
function onChange(checkedValues: string) {
|
||||
console.log('checked = ', checkedValues);
|
||||
console.log('value = ', value.value);
|
||||
}
|
||||
import { message } from "ant-design-vue";
|
||||
import { ref, watch } from "vue"
|
||||
import { allProvince, getAllCityVByArea_parent, getAllProvince, getUniversityByConditionres } from "../api/schoolquery"
|
||||
import {addApplication, getAllApplicationByQujian} from "../api/voluntary";
|
||||
|
||||
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: 'Name',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
scopedSlots: { customRender: 'name' },
|
||||
dataIndex: 'area_names',
|
||||
title: "录取概率",
|
||||
key: 'area_names',
|
||||
slots: { customRender: 'name' },
|
||||
},
|
||||
{
|
||||
title: 'Age',
|
||||
dataIndex: 'age',
|
||||
key: 'age',
|
||||
width: 80,
|
||||
title: '专业',
|
||||
dataIndex: 'application_major',
|
||||
key: 'application_major',
|
||||
},
|
||||
{
|
||||
title: 'Address',
|
||||
dataIndex: 'address',
|
||||
key: 'address 1',
|
||||
ellipsis: true,
|
||||
title: '院校',
|
||||
dataIndex: 'application_university',
|
||||
key: 'application_university',
|
||||
},
|
||||
{
|
||||
title: 'Long Column Long Column Long Column',
|
||||
dataIndex: 'address',
|
||||
key: 'address 2',
|
||||
ellipsis: true,
|
||||
title: '招生情况',
|
||||
key: 'application_plan',
|
||||
dataIndex: 'application_plan',
|
||||
},
|
||||
{
|
||||
title: 'Long Column Long Column',
|
||||
dataIndex: 'address',
|
||||
key: 'address 3',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: 'Long Column',
|
||||
dataIndex: 'address',
|
||||
key: 'address 4',
|
||||
ellipsis: true,
|
||||
title: '填报',
|
||||
slots: { customRender: 'tianbao' },
|
||||
},
|
||||
];
|
||||
|
||||
const data = [
|
||||
{
|
||||
key: '1',
|
||||
name: 'John Brown',
|
||||
age: 32,
|
||||
address: 'New York No. 1 Lake Park, New York No. 1 Lake Park',
|
||||
tags: ['nice', 'developer'],
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: 'Jim Green',
|
||||
age: 42,
|
||||
address: 'London No. 2 Lake Park, London No. 2 Lake Park',
|
||||
tags: ['loser'],
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
name: 'Joe Black',
|
||||
age: 32,
|
||||
address: 'Sidney No. 1 Lake Park, Sidney No. 1 Lake Park',
|
||||
tags: ['cool', 'teacher'],
|
||||
},
|
||||
];
|
||||
const data = ref<getUniversityByConditionres | []>()
|
||||
const shengfen = ref(0)
|
||||
const chengshi = ref<number>(-1)
|
||||
|
||||
function tianbao(id: number){
|
||||
console.log(id)
|
||||
addApplication(id).then(()=>{
|
||||
message.success("添加成功")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function getlist() {
|
||||
data.value = []
|
||||
getAllApplicationByQujian({
|
||||
upper_limit: 800,
|
||||
lower_limit: 1200
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
data.value = res.data
|
||||
})
|
||||
}
|
||||
const shaixuan = ref({
|
||||
gongban: 0,
|
||||
minban: 0,
|
||||
benke: 0,
|
||||
zhuanke: 0,
|
||||
is985: 0,
|
||||
is211: 0,
|
||||
yiliuxveke: 0,
|
||||
yiliudaxve: 0
|
||||
})
|
||||
watch(shaixuan.value, getlist)
|
||||
|
||||
|
||||
const xaunzelist = ref<string[]>([])
|
||||
watch(xaunzelist.value, getlist)
|
||||
getlist()
|
||||
|
||||
function removexuanzhong(index: number) {
|
||||
xaunzelist.value.splice(index, 1)
|
||||
}
|
||||
function addxuanze() {
|
||||
if (chengshi.value == -1 || xaunzelist.value.includes(`${shengfenlist.value[shengfen.value].area_name}/${chengshilist.value[chengshi.value].area_name}`)) {
|
||||
return
|
||||
}
|
||||
|
||||
xaunzelist.value.push(`${shengfenlist.value[shengfen.value].area_name}/${chengshilist.value[chengshi.value].area_name}`)
|
||||
}
|
||||
|
||||
watch(shengfen, getchengshi)
|
||||
|
||||
const shengfenlist = ref<allProvince[]>([])
|
||||
getAllProvince().then((res) => {
|
||||
shengfenlist.value = res.data
|
||||
shengfen.value = 0
|
||||
getchengshi()
|
||||
})
|
||||
watch(chengshi, addxuanze)
|
||||
|
||||
|
||||
|
||||
const chengshilist = ref<allProvince[]>([])
|
||||
function getchengshi() {
|
||||
|
||||
getAllCityVByArea_parent({ area_parent: shengfenlist.value[shengfen.value].area_id }).then((res) => {
|
||||
chengshilist.value = res.data
|
||||
chengshi.value = -1
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.table {
|
||||
margin-top: 60px;
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
157
src/pages/gerenxinxi.vue
Normal file
157
src/pages/gerenxinxi.vue
Normal file
@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<div class="infos">
|
||||
<div class="top">
|
||||
<img src="../static/img/logo.jpg" class="logo" />
|
||||
<h1>高考志愿填报</h1>
|
||||
</div>
|
||||
<a-form>
|
||||
<a-form-item has-feedback name="pass">
|
||||
<a-input
|
||||
type="text"
|
||||
v-model:value="uinfo.student_name"
|
||||
autocomplete="off"
|
||||
placeholder="请输入真实姓名"
|
||||
class="shuru"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item has-feedback name="checkPass">
|
||||
<a-input type="text" autocomplete="off" placeholder="请输入身份证号" class="shuru" />
|
||||
<!-- v-model:value="password" -->
|
||||
</a-form-item>
|
||||
<a-form-item has-feedback name="checkPass">
|
||||
<div class="weici">
|
||||
<a-input
|
||||
type="text"
|
||||
autocomplete="off"
|
||||
placeholder="请输入高考分数"
|
||||
class="shuru1"
|
||||
v-model:value="uinfo.score"
|
||||
/>
|
||||
<a-input
|
||||
type="text"
|
||||
autocomplete="off"
|
||||
placeholder="请输入高考位次"
|
||||
class="shuru1"
|
||||
v-model:value="uinfo.ranking"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- v-model:value="password" -->
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item has-feedback name="checkPass">
|
||||
<h2>请选择高考科目</h2>
|
||||
<!-- <div :style="{ borderBottom: '1px solid #E9E9E9' }">
|
||||
<a-checkbox
|
||||
v-model:checked="checkAll"
|
||||
:indeterminate="indeterminate"
|
||||
@change="onCheckAllChange"
|
||||
>Check all</a-checkbox>
|
||||
</div>-->
|
||||
<br />
|
||||
<a-checkbox :checked="xuanzhong.includes(1)" @click="xuan(1)">物理</a-checkbox>
|
||||
<a-checkbox :checked="xuanzhong.includes(2)" @click="xuan(2)">历史</a-checkbox>
|
||||
<a-checkbox :checked="xuanzhong.includes(3)" @click="xuan(3)">化学</a-checkbox>
|
||||
<a-checkbox :checked="xuanzhong.includes(4)" @click="xuan(4)">生物</a-checkbox>
|
||||
<a-checkbox :checked="xuanzhong.includes(5)" @click="xuan(5)">地理</a-checkbox>
|
||||
<a-checkbox :checked="xuanzhong.includes(6)" @click="xuan(6)">政治</a-checkbox>
|
||||
<!-- <a-checkbox-group v-model:value="checkedList" :options="plainOptions" /> -->
|
||||
<!-- v-model:value="password" -->
|
||||
</a-form-item>
|
||||
<a-button type="primary" class="shuru" @click="save">保存</a-button>
|
||||
</a-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { listItemMetaProps } from 'ant-design-vue/lib/list/ItemMeta';
|
||||
import { ref } from 'vue';
|
||||
import { defineComponent, reactive, toRefs, watch } from 'vue';
|
||||
import { gerenxinxi } from '../api/voluntary';
|
||||
// const checkedList = ref([false,false,false,false,false,false])
|
||||
const xuanzhong = ref<number[]>([])
|
||||
function xuan(i: number){
|
||||
xuanzhong.value.push(i)
|
||||
if(xuanzhong.value.length > 3){
|
||||
if(xuanzhong.value[0] == 1 || xuanzhong.value[0] == 2){
|
||||
xuanzhong.value.splice(1,1)
|
||||
|
||||
}else{
|
||||
xuanzhong.value.splice(0,1)
|
||||
}
|
||||
}
|
||||
if(xuanzhong.value.includes(1) && xuanzhong.value.includes(2)){
|
||||
for(let index in xuanzhong.value){
|
||||
if( xuanzhong.value[index] == 1 || xuanzhong.value[index] == 2){
|
||||
xuanzhong.value.splice( parseInt(index) ,1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const uinfo = ref({
|
||||
student_name: "",
|
||||
ranking: "",
|
||||
score: "",
|
||||
|
||||
})
|
||||
// const checked1=ref(false)
|
||||
// const checked2=ref(false)
|
||||
// const checked3=ref(false)
|
||||
// const checked4=ref(false)
|
||||
// const checked5=ref(false)
|
||||
// const checked6=ref(false)
|
||||
|
||||
|
||||
// const onCheckAllChange = (e: any) => {
|
||||
// Object.assign(state, {
|
||||
// checkedList: e.target.checked ? plainOptions : [],
|
||||
// indeterminate: false,
|
||||
// });
|
||||
// };
|
||||
|
||||
|
||||
function save(){
|
||||
gerenxinxi(uinfo.value,xuanzhong.value)
|
||||
}
|
||||
// gerenxinxi(uinfo.value,checkedList.value)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.login {
|
||||
height: 80vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.top {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
line-height: 70px;
|
||||
margin-bottom: 30px;
|
||||
.logo {
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
.infos {
|
||||
margin: 0 auto;
|
||||
.shuru {
|
||||
width: 400px;
|
||||
}
|
||||
.shuru1 {
|
||||
width: 150px;
|
||||
}
|
||||
}
|
||||
.weici {
|
||||
width: 400px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,149 +1,250 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="select">
|
||||
<div>
|
||||
院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />
|
||||
</div>
|
||||
<div>
|
||||
院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />院校省份:
|
||||
<a-checkbox-group
|
||||
v-model="value"
|
||||
name="checkboxgroup"
|
||||
:options="plainOptions"
|
||||
@change="onChange"
|
||||
/>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<a-table :columns="columns" :data-source="data">
|
||||
<template v-slot:name="text">{{ text }}</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div>
|
||||
<div class="select">
|
||||
<div style="width: 100%">
|
||||
院校省份:
|
||||
<a-radio-group v-model:value="shengfen">
|
||||
<a-radio-button
|
||||
:value="index"
|
||||
v-for="item,index in shengfenlist"
|
||||
:key="item.area_id"
|
||||
>{{ item.area_name }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
<br />城市:
|
||||
<a-radio-group v-model:value="chengshi">
|
||||
<a-radio-button
|
||||
:value="index"
|
||||
v-for="item,index in chengshilist"
|
||||
:key="item.area_id"
|
||||
>{{ item.area_name }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
<br />已选择:
|
||||
<a-button
|
||||
v-for="item,index in xaunzelist"
|
||||
:key="index"
|
||||
@click="removexuanzhong(index)"
|
||||
>{{ item }}</a-button>
|
||||
<br />
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
学历层次:
|
||||
<a-button
|
||||
@click="shaixuan.benke == 1 ? shaixuan.benke = 0 : shaixuan.benke = 1"
|
||||
:type="shaixuan.benke == 1 ? 'primary' : 'link'"
|
||||
>本科</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.zhuanke == 1 ? shaixuan.zhuanke = 0 : shaixuan.zhuanke = 1"
|
||||
:type="shaixuan.zhuanke == 1 ? 'primary' : 'link'"
|
||||
>专科</a-button>
|
||||
<br />学院层次:
|
||||
<a-button
|
||||
@click="shaixuan.is985 == 1 ? shaixuan.is985 = 0 : shaixuan.is985 = 1"
|
||||
:type="shaixuan.is985 == 1 ? 'primary' : 'link'"
|
||||
>985</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.is211 == 1 ? shaixuan.is211 = 0 : shaixuan.is211 = 1"
|
||||
:type="shaixuan.is211 == 1 ? 'primary' : 'link'"
|
||||
>211</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.yiliuxveke == 1 ? shaixuan.yiliuxveke = 0 : shaixuan.yiliuxveke = 1"
|
||||
:type="shaixuan.yiliuxveke == 1 ? 'primary' : 'link'"
|
||||
>一流学科建设</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.yiliudaxve == 1 ? shaixuan.yiliudaxve = 0 : shaixuan.yiliudaxve = 1"
|
||||
:type="shaixuan.yiliudaxve == 1 ? 'primary' : 'link'"
|
||||
>一流大学建设</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.gongban == 1 ? shaixuan.gongban = 0 : shaixuan.gongban = 1"
|
||||
:type="shaixuan.gongban == 1 ? 'primary' : 'link'"
|
||||
>公办</a-button>
|
||||
<a-button
|
||||
@click="shaixuan.minban == 1 ? shaixuan.minban = 0 : shaixuan.minban = 1"
|
||||
:type="shaixuan.minban == 1 ? 'primary' : 'link'"
|
||||
>民办</a-button>
|
||||
<br />已选择:
|
||||
<a-button
|
||||
v-if="shaixuan.benke == 1"
|
||||
@click="shaixuan.benke == 1 ? shaixuan.benke = 0 : shaixuan.benke = 1"
|
||||
:type="shaixuan.benke == 1 ? 'primary' : 'link'"
|
||||
>本科</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.zhuanke == 1"
|
||||
@click="shaixuan.zhuanke == 1 ? shaixuan.zhuanke = 0 : shaixuan.zhuanke = 1"
|
||||
:type="shaixuan.zhuanke == 1 ? 'primary' : 'link'"
|
||||
>专科</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.is985 == 1"
|
||||
@click="shaixuan.is985 == 1 ? shaixuan.is985 = 0 : shaixuan.is985 = 1"
|
||||
:type="shaixuan.is985 == 1 ? 'primary' : 'link'"
|
||||
>985</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.is211 == 1"
|
||||
@click="shaixuan.is211 == 1 ? shaixuan.is211 = 0 : shaixuan.is211 = 1"
|
||||
:type="shaixuan.is211 == 1 ? 'primary' : 'link'"
|
||||
>211</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.yiliuxveke == 1"
|
||||
@click="shaixuan.yiliuxveke == 1 ? shaixuan.yiliuxveke = 0 : shaixuan.yiliuxveke = 1"
|
||||
:type="shaixuan.yiliuxveke == 1 ? 'primary' : 'link'"
|
||||
>一流学科建设</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.yiliudaxve == 1"
|
||||
@click="shaixuan.yiliudaxve == 1 ? shaixuan.yiliudaxve = 0 : shaixuan.yiliudaxve = 1"
|
||||
:type="shaixuan.yiliudaxve == 1 ? 'primary' : 'link'"
|
||||
>一流大学建设</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.gongban == 1"
|
||||
@click="shaixuan.gongban == 1 ? shaixuan.gongban = 0 : shaixuan.gongban = 1"
|
||||
:type="shaixuan.gongban == 1 ? 'primary' : 'link'"
|
||||
>公办</a-button>
|
||||
<a-button
|
||||
v-if="shaixuan.minban == 1"
|
||||
@click="shaixuan.minban == 1 ? shaixuan.minban = 0 : shaixuan.minban = 1"
|
||||
:type="shaixuan.minban == 1 ? 'primary' : 'link'"
|
||||
>民办</a-button>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<a-table :columns="columns" :data-source="data">
|
||||
<template v-slot:name="text">{{ text.record.university_name }}</template>
|
||||
<template v-slot:province="text">{{ text.record.area.area_name }}</template>
|
||||
<template v-slot:university_level="text">{{ text.record.university_level == 0 ? "专科": "本科" }}</template>
|
||||
<template v-slot:is985="text">{{ text.record.is985 == 0 ? "X": "√" }}</template>
|
||||
<template v-slot:is211="text">{{ text.record.is211 == 0 ? "X": "√" }}</template>
|
||||
<template v-slot:is_first_class_university="text">{{ text.record.is_first_class_university == 0 ? "X": "√" }}</template>
|
||||
<template v-slot:is_first_class_subject="text">{{ text.record.is_first_class_subject == 0 ? "X": "√" }}</template>
|
||||
<template v-slot:university_attribute="text">{{ text.record.university_attribute == 0 ? "民办": "公办" }}</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue"
|
||||
const value = ref<string[]>([])
|
||||
const options = ref([
|
||||
{ label: 'Apple', value: 'Apple' },
|
||||
{ label: 'Pear', value: 'Pear' },
|
||||
{ label: 'Orange', value: 'Orange' },
|
||||
]);
|
||||
const plainOptions = ref(['Apple', 'Pear', 'Orange']);
|
||||
function onChange(checkedValues: string) {
|
||||
console.log('checked = ', checkedValues);
|
||||
console.log('value = ', value.value);
|
||||
}
|
||||
import { ref, watch } from "vue"
|
||||
import { allProvince, getAllCityVByArea_parent, getAllProvince, getUniversityByCondition, getUniversityByConditionres } from "../api/schoolquery"
|
||||
|
||||
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: 'Name',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
scopedSlots: { customRender: 'name' },
|
||||
dataIndex: 'area_names',
|
||||
title: "院校名称",
|
||||
key: 'area_names',
|
||||
slots: { customRender: 'name' },
|
||||
},
|
||||
{
|
||||
title: 'Age',
|
||||
dataIndex: 'age',
|
||||
key: 'age',
|
||||
width: 80,
|
||||
title: '院校所在地',
|
||||
dataIndex: 'province',
|
||||
key: 'province',
|
||||
slots: { customRender: 'province' },
|
||||
},
|
||||
{
|
||||
title: 'Address',
|
||||
dataIndex: 'address',
|
||||
key: 'address 1',
|
||||
ellipsis: true,
|
||||
title: '学历层次',
|
||||
dataIndex: 'university_level',
|
||||
key: 'university_level',
|
||||
slots: { customRender: 'university_level' },
|
||||
},
|
||||
{
|
||||
title: 'Long Column Long Column Long Column',
|
||||
dataIndex: 'address',
|
||||
key: 'address 2',
|
||||
ellipsis: true,
|
||||
title: '985',
|
||||
key: 'is985',
|
||||
dataIndex: 'is985',
|
||||
slots: { customRender: 'is985' },
|
||||
},
|
||||
{
|
||||
title: 'Long Column Long Column',
|
||||
dataIndex: 'address',
|
||||
key: 'address 3',
|
||||
ellipsis: true,
|
||||
title: '211',
|
||||
key: 'is211',
|
||||
slots: { customRender: 'is211' },
|
||||
},
|
||||
{
|
||||
title: 'Long Column',
|
||||
dataIndex: 'address',
|
||||
key: 'address 4',
|
||||
ellipsis: true,
|
||||
title: '一流大学',
|
||||
key: 'is_first_class_university',
|
||||
slots: { customRender: 'is_first_class_university' },
|
||||
},
|
||||
{
|
||||
title: '一流学科',
|
||||
key: 'is_first_class_subject',
|
||||
slots: { customRender: 'is_first_class_subject' }
|
||||
},
|
||||
{
|
||||
title: '办学类型',
|
||||
key: 'university_attribute',
|
||||
slots: { customRender: 'university_attribute' },
|
||||
},
|
||||
];
|
||||
|
||||
const data = [
|
||||
{
|
||||
key: '1',
|
||||
name: 'John Brown',
|
||||
age: 32,
|
||||
address: 'New York No. 1 Lake Park, New York No. 1 Lake Park',
|
||||
tags: ['nice', 'developer'],
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: 'Jim Green',
|
||||
age: 42,
|
||||
address: 'London No. 2 Lake Park, London No. 2 Lake Park',
|
||||
tags: ['loser'],
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
name: 'Joe Black',
|
||||
age: 32,
|
||||
address: 'Sidney No. 1 Lake Park, Sidney No. 1 Lake Park',
|
||||
tags: ['cool', 'teacher'],
|
||||
},
|
||||
];
|
||||
const data = ref<getUniversityByConditionres>()
|
||||
const shengfen = ref(0)
|
||||
const chengshi = ref<number>(-1)
|
||||
|
||||
|
||||
function getlist() {
|
||||
getUniversityByCondition({
|
||||
area_names: xaunzelist.value,
|
||||
...shaixuan.value
|
||||
}).then((res) => {
|
||||
data.value = res.data
|
||||
})
|
||||
}
|
||||
const shaixuan = ref({
|
||||
gongban: 0,
|
||||
minban: 0,
|
||||
benke: 0,
|
||||
zhuanke: 0,
|
||||
is985: 0,
|
||||
is211: 0,
|
||||
yiliuxveke: 0,
|
||||
yiliudaxve: 0
|
||||
})
|
||||
watch(shaixuan.value, getlist)
|
||||
|
||||
|
||||
const xaunzelist = ref<string[]>([])
|
||||
watch(xaunzelist.value,getlist)
|
||||
getlist()
|
||||
|
||||
function removexuanzhong(index: number) {
|
||||
xaunzelist.value.splice(index, 1)
|
||||
}
|
||||
function addxuanze() {
|
||||
if (chengshi.value == -1 || xaunzelist.value.includes(`${shengfenlist.value[shengfen.value].area_name}/${chengshilist.value[chengshi.value].area_name}`)) {
|
||||
return
|
||||
}
|
||||
|
||||
xaunzelist.value.push(`${shengfenlist.value[shengfen.value].area_name}/${chengshilist.value[chengshi.value].area_name}`)
|
||||
}
|
||||
|
||||
watch(shengfen, getchengshi)
|
||||
|
||||
const shengfenlist = ref<allProvince[]>([])
|
||||
getAllProvince().then((res) => {
|
||||
shengfenlist.value = res.data
|
||||
shengfen.value = 0
|
||||
getchengshi()
|
||||
})
|
||||
watch(chengshi, addxuanze)
|
||||
|
||||
|
||||
|
||||
const chengshilist = ref<allProvince[]>([])
|
||||
function getchengshi() {
|
||||
|
||||
getAllCityVByArea_parent({ area_parent: shengfenlist.value[shengfen.value].area_id }).then((res) => {
|
||||
chengshilist.value = res.data
|
||||
chengshi.value = -1
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.table {
|
||||
margin-top: 60px;
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
115
src/pages/zhiyuanqingdan.vue
Normal file
115
src/pages/zhiyuanqingdan.vue
Normal file
@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="table">
|
||||
<a-button type="primary" @click="daochu">导出</a-button>
|
||||
<a-table :columns="columns" :data-source="zhiyuanlist">
|
||||
<!-- <template v-slot:province="text">{{ text.record.area.area_name }}</template> -->
|
||||
<!-- <template v-slot:university_level="text">{{ text.record.university_level == 0 ? "专科": "本科" }}</template> -->
|
||||
<template v-slot:tianbao="text">
|
||||
<a-button @click="yichu(text.record.shunxu)">填报</a-button>
|
||||
</template>
|
||||
<template v-slot:is985="text">{{ text.record.is985 == 0 ? "X" : "√" }}</template>
|
||||
<template v-slot:is211="text">{{ text.record.is211 == 0 ? "X" : "√" }}</template>
|
||||
<template
|
||||
v-slot:is_first_class_university="text"
|
||||
>{{ text.record.is_first_class_university == 0 ? "X" : "√" }}</template>
|
||||
<template
|
||||
v-slot:is_first_class_subject="text"
|
||||
>{{ text.record.is_first_class_subject == 0 ? "X" : "√" }}</template>
|
||||
<template
|
||||
v-slot:university_attribute="text"
|
||||
>{{ text.record.university_attribute == 0 ? "民办" : "公办" }}</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { message } from "ant-design-vue";
|
||||
import { ref, watch } from "vue"
|
||||
import { addApplication, getAllApplicationByQujian, removeStudentApplicationByStudent_idAndIndex, zhiyuanqingdan } from "../api/voluntary";
|
||||
|
||||
|
||||
|
||||
const columns = [
|
||||
{
|
||||
dataIndex: 'item',
|
||||
title: "编号",
|
||||
key: 'item',
|
||||
},
|
||||
{
|
||||
dataIndex: 'fengxian',
|
||||
title: "录取概率",
|
||||
key: 'fengxian',
|
||||
},
|
||||
{
|
||||
title: '专业',
|
||||
dataIndex: 'application_major',
|
||||
key: 'application_major',
|
||||
},
|
||||
{
|
||||
title: '院校',
|
||||
dataIndex: 'application_university',
|
||||
key: 'application_university',
|
||||
},
|
||||
{
|
||||
title: '招生情况',
|
||||
key: 'application_plan',
|
||||
dataIndex: 'application_plan',
|
||||
},
|
||||
{
|
||||
title: '移除',
|
||||
slots: { customRender: 'tianbao' },
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function daochu(){
|
||||
let info:any = localStorage.getItem("token")
|
||||
info=JSON.parse(info)
|
||||
location.href = "http://192.168.3.10:9003/daochu?student_id=" + info.student.student_id
|
||||
}
|
||||
|
||||
|
||||
function yichu (shuxu: number){
|
||||
removeStudentApplicationByStudent_idAndIndex({shuxu}).then((res)=>{
|
||||
message.success("删除成功")
|
||||
getlist()
|
||||
})
|
||||
}
|
||||
|
||||
const zhiyuanlist = ref<any>()
|
||||
|
||||
function getlist(){
|
||||
zhiyuanqingdan().then((res) => {
|
||||
console.log(res)
|
||||
|
||||
for (let i in res.data) {
|
||||
res.data[i] = {
|
||||
...res.data[i].application,
|
||||
...res.data[i],
|
||||
item: parseInt(i) + 1
|
||||
}
|
||||
}
|
||||
zhiyuanlist.value = res.data
|
||||
console.log(zhiyuanlist.value)
|
||||
})
|
||||
}
|
||||
getlist()
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.table {
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user