对比新文件 |
| | |
| | | import {getToken} from "../utils/auth"; |
| | | import request from '@/utils/request' |
| | | |
| | | const remote = 'http://222.92.213.21:8006' |
| | | |
| | | export function classificationList(params) { |
| | | return request({ |
| | | headers: { |
| | | 'Access-Control-Allow-Origin': '*', |
| | | }, |
| | | url: 'http://127.0.0.1:8083' + '/nanoweb/foreground/system/getMeta.do', |
| | | method: 'POST', |
| | | params:params |
| | | }) |
| | | } |
| | | |
| | | |
| | | export function currentExamList(data) { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: remote + '/nanoweb/foreground/currentExam/query.do', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
对比新文件 |
| | |
| | | <template> |
| | | <div > |
| | | <button |
| | | class="filter-btn" |
| | | v-for="(item,index) in array" |
| | | v-bind:class="{'active':index === num}" |
| | | :key="item.id" |
| | | @click="activeClick(item.id,index)">{{item.value}}</button> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "classification", |
| | | props: { |
| | | array: { |
| | | type: Array, |
| | | default: () => [], |
| | | required: true |
| | | }, |
| | | }, |
| | | data(){ |
| | | return { |
| | | num:'', |
| | | isActive:false |
| | | } |
| | | }, |
| | | methods:{ |
| | | activeClick(id,index){ |
| | | this.num = index |
| | | this.$emit("setId",id) |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .filter-btn{ |
| | | cursor: pointer; |
| | | min-width: 112px; |
| | | height: 32px; |
| | | border-radius: 15px; |
| | | border: 1px solid #e5e5e5; |
| | | background-color: #fff; |
| | | color: #000; |
| | | font-size: 14px; |
| | | margin-right: 20px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .filter-btn:hover{ |
| | | border-color: #fff; |
| | | background-color: #b2d8ff; |
| | | color: #fff; |
| | | } |
| | | |
| | | .active{ |
| | | background-color: #5dadff; |
| | | border-color: #5dadff; |
| | | color: #fff; |
| | | } |
| | | |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | |
| | | <div class="filter-container"> |
| | | <div class="basic_search" > |
| | | <div style="display: inline-block"> |
| | | <span class="span-filter-label">考试名称:</span> |
| | | <el-input v-model="filter.keyword" style="width: 200px" placeholder="请输入内容"></el-input> |
| | | </div> |
| | | <div style="display: inline-block;margin-left: 15px"> |
| | | <span class="span-filter-label">考试时间:</span> |
| | | <el-date-picker |
| | | v-model="rangeTime" |
| | | type="datetimerange" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :default-time="['00:00:00','23:59:59']"> |
| | | </el-date-picker> |
| | | </div> |
| | | <div style="display: inline-block;margin-left: 15px"> |
| | | <el-button |
| | | style="margin-left: 10px;" |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="queryHandle"> |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="basic_search"> |
| | | <div> |
| | | <classification :array="list" v-model="filter.type" @setId="setId"></classification> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import classification from "./component/classification"; |
| | | |
| | | import {currentExamList,classificationList} from '@/api/nanoexam' |
| | | export default { |
| | | name: "current", |
| | | components:{ |
| | | classification |
| | | }, |
| | | created(){ |
| | | this.classificationList() |
| | | this.currentExamList() |
| | | }, |
| | | data(){ |
| | | return { |
| | | rangeTime:[], |
| | | filter:{ |
| | | type:"", |
| | | keyword:"", |
| | | startExamTime:"", |
| | | endExamTime:"", |
| | | current:1, |
| | | rowCount:4, |
| | | }, |
| | | list:[ |
| | | {id:1,value:"全部"}, |
| | | {id:2,value:"4526465"}, |
| | | {id:3,value:"asdsad"}, |
| | | ] |
| | | } |
| | | }, |
| | | methods:{ |
| | | queryHandle(){ |
| | | console.log(this.filter.type) |
| | | }, |
| | | currentExamList(){ |
| | | |
| | | }, |
| | | classificationList(){ |
| | | classificationList({groupId: 2}).then(res=>{ |
| | | console.log(res.data) |
| | | }) |
| | | }, |
| | | setId(id){ |
| | | this.filter.type = id |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .span-filter-label{ |
| | | font-size: 15px; |
| | | color: #606266; |
| | | margin-right: 4px; |
| | | margin-left: 7px; |
| | | } |
| | | |
| | | .basic_search{ |
| | | margin-bottom: 15px; |
| | | } |
| | | </style> |