|
|
@@ -1,14 +1,11 @@
|
|
|
<template>
|
|
|
<div class="edit-view">
|
|
|
<el-form :model="form" inline size="mini">
|
|
|
- <el-form-item label="备案筛选">
|
|
|
- <el-select clearable placeholder="请选择备案信息"></el-select>
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="考级地址">
|
|
|
- <el-select style="margin-right: 10px" v-model="city" placeholder="请选择市">
|
|
|
+ <!-- <el-select style="margin-right: 10px" v-model="city" placeholder="请选择市">
|
|
|
<el-option value="南京市" label="南京市"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-select v-model="district" clearable placeholder="请选择区县">
|
|
|
+ </el-select> -->
|
|
|
+ <el-select v-model="district" clearable placeholder="请选择区县" @change="districtSelect">
|
|
|
<el-option
|
|
|
v-for="item in districts"
|
|
|
:key="item.id"
|
|
|
@@ -17,6 +14,22 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="备案筛选">
|
|
|
+ <el-select
|
|
|
+ v-model="recordId"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择备案信息"
|
|
|
+ style="width: 300px"
|
|
|
+ @change="getRecord"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in records"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="" style="margin-left:20px">
|
|
|
<span>{{ time }}</span>
|
|
|
</el-form-item>
|
|
|
@@ -47,36 +60,56 @@ export default {
|
|
|
token: '',
|
|
|
form: {},
|
|
|
list: [],
|
|
|
- time: ''
|
|
|
+ time: '',
|
|
|
+ recordId: '',
|
|
|
+ records: [],
|
|
|
+ districts: [],
|
|
|
+ district: '',
|
|
|
+ city: ''
|
|
|
};
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.getTime();
|
|
|
+ created() {
|
|
|
this.$http
|
|
|
- .get('ezvizToken/getToken')
|
|
|
+ .get('/district/NJ')
|
|
|
.then(res => {
|
|
|
- this.token = res;
|
|
|
- return this.$http.post('/examRoom/byToday');
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- this.list = res;
|
|
|
- this.$nextTick(() => {
|
|
|
- res.forEach((item, index) => {
|
|
|
- if (index == 0) {
|
|
|
- this.$refs.video[index].init();
|
|
|
- } else {
|
|
|
- let _index = this.randomNum(0, 4);
|
|
|
- console.log(_index);
|
|
|
- this.$refs.video[index].initVideo(index);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
+ this.districts = res;
|
|
|
})
|
|
|
.catch(e => {
|
|
|
console.log(e);
|
|
|
this.$message.error(e.error);
|
|
|
});
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.getTime();
|
|
|
+ // this.$http
|
|
|
+ // .get('ezvizToken/getToken')
|
|
|
+ // .then(res => {
|
|
|
+ // this.token = res;
|
|
|
+ // return this.$http.post('/examRoom/byToday', { recordId: this.recordId, district: this.district });
|
|
|
+ // })
|
|
|
+ // .then(res => {
|
|
|
+ // this.list = res;
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // if (res.length > 0) {
|
|
|
+ // res.forEach((item, index) => {
|
|
|
+ // if (index == 0) {
|
|
|
+ // this.$refs.video[index].init();
|
|
|
+ // } else {
|
|
|
+ // let _index = this.randomNum(0, 4);
|
|
|
+ // console.log(_index);
|
|
|
+ // this.$refs.video[index].initVideo(index);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+ // .catch(e => {
|
|
|
+ // console.log(e);
|
|
|
+ // this.$message.error(e.error);
|
|
|
+ // });
|
|
|
+ this.getVideo();
|
|
|
+ this.getRecord();
|
|
|
+ },
|
|
|
methods: {
|
|
|
getTime() {
|
|
|
this.time = format(new Date(), 'yyyy/MM/dd hh:mm:ss');
|
|
|
@@ -96,6 +129,57 @@ export default {
|
|
|
return 0;
|
|
|
break;
|
|
|
}
|
|
|
+ },
|
|
|
+ getRecord() {
|
|
|
+ this.records = [];
|
|
|
+ this.$http
|
|
|
+ .post('/record/byToday', { district: this.district })
|
|
|
+ .then(res => {
|
|
|
+ if (res.length > 0) {
|
|
|
+ res.forEach(item => {
|
|
|
+ this.records.push({
|
|
|
+ label: item.examinationName,
|
|
|
+ value: item.id
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getVideo() {
|
|
|
+ this.$http
|
|
|
+ .get('ezvizToken/getToken')
|
|
|
+ .then(res => {
|
|
|
+ this.token = res;
|
|
|
+ return this.$http.post('/examRoom/byToday', { recordId: this.recordId, district: this.district });
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.list = res;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (res.length > 0) {
|
|
|
+ res.forEach((item, index) => {
|
|
|
+ if (index == 0) {
|
|
|
+ this.$refs.video[index].init();
|
|
|
+ } else {
|
|
|
+ let _index = this.randomNum(0, 4);
|
|
|
+ console.log(_index);
|
|
|
+ this.$refs.video[index].initVideo(index);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ districtSelect() {
|
|
|
+ this.getVideo();
|
|
|
+ this.getRecord();
|
|
|
}
|
|
|
}
|
|
|
};
|