From 0b0876c987aee5e7b8c8537c0ea2013a1d1ad8fc Mon Sep 17 00:00:00 2001
From: lyfO_o <764716047@qq.com>
Date: 星期三, 20 四月 2022 23:15:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'remotes/origin/lyf' into master
---
config/dev.env.js | 16 --
src/api/nanoexam.js | 27 ++++
src/views/exam/current.vue | 107 +++++++++++++++++
src/api/exam.js | 14 ++
config/prod.env.js | 7 -
src/views/exam/component/classification.vue | 65 ++++++++++
src/views/exam/index.vue | 70 +++++++++++
7 files changed, 287 insertions(+), 19 deletions(-)
diff --git a/config/dev.env.js b/config/dev.env.js
index 69bbb53..1b5d1ba 100644
--- a/config/dev.env.js
+++ b/config/dev.env.js
@@ -18,19 +18,9 @@
// IMG_API: '"http://220.171.99.118:4100/upload/"',
// BASE_API: '"http://192.168.0.35:8006"',
// IMG_API: '"http://192.168.0.35:8006/upload/"',
-
- // BASE_API: '"http://222.92.213.21:8006/zhongtai"',
- // IMG_API: '"http://222.92.213.21:8006/zhongtai/upload/"',
-
- BASE_API: '"http://112.86.23.91:8006"',
- IMG_API: '"http://112.86.23.91:8006/upload/"',
-
- // BASE_API: '"http://222.92.213.21:8006/zhongtai_demo"',
- // IMG_API: '"http://222.92.213.21:8006/zhongtai_demo/upload/"',
-
- //
- // BASE_API: '"http://222.92.213.21:8006/zhongtai"',
- // IMG_API: '"http://222.92.213.21:8006/zhongtai/upload/"',
+ BASE_API: '"http://222.92.213.21:8006/zhongtai"',
+ IMG_API: '"http://222.92.213.21:8006/zhongtai/upload/"',
+ NANO_API: '"http://127.0.0.1:8081/zhongtaiexam"',
// BASE_API: '"http://220.171.99.118:4101/api"',
// IMG_API: '"http://220.171.99.118:4101/api/upload/"',
};
diff --git a/config/prod.env.js b/config/prod.env.js
index cce9e42..6951368 100644
--- a/config/prod.env.js
+++ b/config/prod.env.js
@@ -17,10 +17,5 @@
BASE_API: '"http://222.92.213.21:8006/zhongtai"',
IMG_API: '"http://222.92.213.21:8006/zhongtai/upload/"',
-
- // BASE_API: '"http://222.92.213.21:8006/zhongtai_demo"',
- // IMG_API: '"http://222.92.213.21:8006/zhongtai_demo/upload/"',
-
- // BASE_API: '"http://222.92.213.21:8006/zhongtai_demo"',
- // IMG_API: '"http://222.92.213.21:8006/zhongtai_demo/upload/"',
+ NANO_API: '"http://222.92.213.21:8006/nanoweb"',
}
diff --git a/src/api/exam.js b/src/api/exam.js
new file mode 100644
index 0000000..2ef30c3
--- /dev/null
+++ b/src/api/exam.js
@@ -0,0 +1,14 @@
+import {getToken} from "../utils/auth";
+import request from '@/utils/request'
+
+export function getExamAuth(params) {
+ return request({
+ headers:{
+ 'Access-Control-Allow-Origin':'*',
+ 'Authorization':getToken()
+ },
+ url:process.env.NANO_API+ '/foreground/system/auth/verify.do',
+ method:'get',
+ params:params
+ })
+}
diff --git a/src/api/nanoexam.js b/src/api/nanoexam.js
new file mode 100644
index 0000000..4f92996
--- /dev/null
+++ b/src/api/nanoexam.js
@@ -0,0 +1,27 @@
+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
+ })
+}
diff --git a/src/views/exam/component/classification.vue b/src/views/exam/component/classification.vue
new file mode 100644
index 0000000..ce8c06f
--- /dev/null
+++ b/src/views/exam/component/classification.vue
@@ -0,0 +1,65 @@
+<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>
diff --git a/src/views/exam/current.vue b/src/views/exam/current.vue
new file mode 100644
index 0000000..c419bda
--- /dev/null
+++ b/src/views/exam/current.vue
@@ -0,0 +1,107 @@
+<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>
diff --git a/src/views/exam/index.vue b/src/views/exam/index.vue
new file mode 100644
index 0000000..283a7aa
--- /dev/null
+++ b/src/views/exam/index.vue
@@ -0,0 +1,70 @@
+<template>
+ <div class="app-container">
+ <el-alert
+ :title="message"
+ :type="flag?'success':'error'">
+ </el-alert>
+
+ </div>
+
+</template>
+
+<script>
+ import {getExamAuth} from '@/api/exam'
+ import {getToken} from "@/utils/auth"
+ import Cookies from 'js-cookie'
+ import request from '@/utils/request'
+ export default {
+ name: "current",
+
+ created(){
+ this.getExamAuth()
+ },
+ data(){
+ return {
+ pass:false,
+ message: ''
+ }
+ },
+ methods:{
+ queryHandle(){
+ },
+ getExamAuth(){
+ getExamAuth({token:getToken()})
+ .then(res=>{
+ if (res.data.code === 'failure') {
+ this.flag = false
+ this.message = res.data.message;
+ }
+ if (res.data.code === 'success') {
+ this.flag = true
+ this.message = res.data.message
+ Cookies.set('JSESSIONID',res.data.data.ssid)
+ window.open(process.env.NANO_API + "/foreground/system/noLogin/redirect?sessionId="+res.data.data.ssid )
+
+ }
+ })
+ .catch(err=>{
+ console.log(err)
+ this.flag = false
+ this.message = '请求出现问题,请联系管理员'
+ })
+
+ }
+
+ }
+ }
+</script>
+
+<style scoped>
+ .span-filter-label{
+ font-size: 15px;
+ color: #606266;
+ margin-right: 4px;
+ margin-left: 7px;
+ }
+
+ .basic_search{
+ margin-bottom: 15px;
+ }
+</style>
--
Gitblit v1.9.2