|
@@ -12,10 +12,11 @@
|
|
|
style="display: flex; padding: 30rpx; justify-content: space-between"
|
|
|
>
|
|
|
<input
|
|
|
- v-model="provice.name"
|
|
|
+ readonly
|
|
|
+ v-model="provice.province"
|
|
|
@click="
|
|
|
() => {
|
|
|
- areaShow = true;
|
|
|
+ proviceShow = true;
|
|
|
}
|
|
|
"
|
|
|
placeholder="省份"
|
|
@@ -23,39 +24,56 @@
|
|
|
type="text"
|
|
|
/>
|
|
|
<input
|
|
|
+ readonly
|
|
|
@click="
|
|
|
() => {
|
|
|
- areaShow = true;
|
|
|
+ cityShow = true;
|
|
|
}
|
|
|
"
|
|
|
- v-model="city.name"
|
|
|
+ v-model="city.city"
|
|
|
placeholder="地市"
|
|
|
class="header-city"
|
|
|
type="text"
|
|
|
/>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <van-popup round position="bottom" :show="areaShow">
|
|
|
- <van-area
|
|
|
+ <van-popup round position="bottom" :show="proviceShow">
|
|
|
+ <van-picker
|
|
|
+ show-toolbar
|
|
|
+ title="考场省份"
|
|
|
+ :columns="examProviceList"
|
|
|
+ value-key="province"
|
|
|
+ @confirm="getExamCityAndProviceName"
|
|
|
@cancel="
|
|
|
() => {
|
|
|
- areaShow = false;
|
|
|
+ proviceShow = false;
|
|
|
}
|
|
|
"
|
|
|
- @confirm="confirmArea"
|
|
|
- :value="provice.code"
|
|
|
- :area-list="areaList"
|
|
|
- columns-num="2" ></van-area>
|
|
|
+ />
|
|
|
+ </van-popup>
|
|
|
+ <van-popup round position="bottom" :show="cityShow">
|
|
|
+ <van-picker
|
|
|
+ show-toolbar
|
|
|
+ title="考场地市"
|
|
|
+ :columns="examCityList"
|
|
|
+ value-key="city"
|
|
|
+ @confirm="getCityName"
|
|
|
+ @cancel="
|
|
|
+ () => {
|
|
|
+ cityShow = false;
|
|
|
+ }
|
|
|
+ "
|
|
|
+ />
|
|
|
</van-popup>
|
|
|
</view>
|
|
|
<view class="content">
|
|
|
<view class="list">
|
|
|
- <view class="list-item">
|
|
|
- <image
|
|
|
- mode="widthFx"
|
|
|
- src="https://ct.zzxcx.net/ctjk/mp-wx/buyVideo/course1.png"
|
|
|
- class="list-item-image"
|
|
|
- >
|
|
|
+ <view
|
|
|
+ class="list-item"
|
|
|
+ v-for="(item, index) in examRoomList"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <image mode="widthFx" :src="item.image" class="list-item-image">
|
|
|
</image>
|
|
|
<view
|
|
|
style="
|
|
@@ -65,7 +83,7 @@
|
|
|
width: 355rpx;
|
|
|
"
|
|
|
>
|
|
|
- <view class="list-item-text1">福州 | 华威科目三考场</view>
|
|
|
+ <view class="list-item-text1">{{ item.name }}</view>
|
|
|
<view class="list-item-text2">共3节</view>
|
|
|
</view>
|
|
|
<view class="list-item-border"></view>
|
|
@@ -76,22 +94,60 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { areaList } from "@vant/area-data";
|
|
|
+import api from "@/api";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- areaShow: false,
|
|
|
- provice: { code: "", name: "" },
|
|
|
- city: { code: "", name: "" },
|
|
|
- areaList: areaList,
|
|
|
+ query: {},
|
|
|
+ cityShow: false,
|
|
|
+ proviceShow: false,
|
|
|
+ examProviceList: [],
|
|
|
+ examCityList: [],
|
|
|
+ examRoomList: [],
|
|
|
+ provice: { provinceId: "", province: "" },
|
|
|
+ city: { cityId: "", city: "" },
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
confirmArea(e) {
|
|
|
this.provice = e.detail.values[0];
|
|
|
this.city = e.detail.values[1];
|
|
|
- this.areaShow=false
|
|
|
+ this.areaShow = false;
|
|
|
+ },
|
|
|
+ getCityName(e) {
|
|
|
+ this.city = e.detail.value;
|
|
|
+ this.cityShow = false;
|
|
|
+ api.exam
|
|
|
+ .studentExamInfoList({
|
|
|
+ ...this.city,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.examRoomList = res.rows;
|
|
|
+ });
|
|
|
},
|
|
|
+ getExamCityAndProviceName(e) {
|
|
|
+ this.proviceShow = false;
|
|
|
+ this.provice = e.detail.value;
|
|
|
+ api.exam
|
|
|
+ .studentExamInfoCityProviceId(e.detail.value.provinceId)
|
|
|
+ .then((res) => {
|
|
|
+ this.examCityList = res.data;
|
|
|
+ });
|
|
|
+ console.log(e);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ onLoad(query) {
|
|
|
+ this.query = query;
|
|
|
+ api.exam.studentExamInfoGetProvice().then((res) => {
|
|
|
+ this.examProviceList = res.data;
|
|
|
+ });
|
|
|
+ api.exam
|
|
|
+ .studentExamInfoList({
|
|
|
+ ...this.city,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.examRoomList = res.rows;
|
|
|
+ });
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -135,6 +191,7 @@ export default {
|
|
|
width: 100%;
|
|
|
padding: 0rpx 30rpx;
|
|
|
transform: translateY(-80px);
|
|
|
+
|
|
|
.list {
|
|
|
width: 100%;
|
|
|
background: #edf4ff;
|