yujialong 4 years ago
parent 7581d38bd1
commit 44077cee02
  1. 10
      src/api/index.js
  2. 2
      src/pages/account/login/index.vue
  3. 5
      src/pages/client/add/index.vue
  4. 6
      src/pages/client/list/index.vue
  5. 5
      src/pages/exception/error/403/index.vue
  6. 5
      src/pages/exception/error/404/index.vue
  7. 2
      src/pages/quesBank/list/globalQuesBank.vue
  8. 9
      src/pages/quesBank/list/myQuesBank.vue
  9. 13
      src/pages/quesBank/list/quesDialog.vue
  10. 4
      src/pages/user/list/index.vue
  11. 2
      src/plugins/requests/index.js
  12. 4
      src/router/permission.js

@ -42,8 +42,8 @@ export default {
getStaff: `management/staff/getStaff`, getStaff: `management/staff/getStaff`,
queryStaff: `management/staff/enterpriseList`, queryStaff: `management/staff/enterpriseList`,
updateStaff: `management/staff/updateStaff`, updateStaff: `management/staff/updateStaff`,
exportFailureStaff: `management/staff/exportFailure`, exportFailureStaff: `${Setting.apiBaseURL}/management/staff/exportFailure`,
uploadFileStaff: `management/staff/uploadFile`, uploadFileStaff: `${Setting.apiBaseURL}/management/staff/uploadFile`,
downloadStaffTemp: `http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658763812.xlsx`, downloadStaffTemp: `http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658763812.xlsx`,
// 角色管理 // 角色管理
@ -70,8 +70,8 @@ export default {
deleteUser: `cjEnterprise/user/deleteUser`, deleteUser: `cjEnterprise/user/deleteUser`,
queryUser: `cjEnterprise/user/list`, queryUser: `cjEnterprise/user/list`,
updateUser: `cjEnterprise/user/updateUser`, updateUser: `cjEnterprise/user/updateUser`,
uploadFileUser: `cjEnterprise/user/uploadFile`, uploadFileUser: `${Setting.apiBaseURL}/cjEnterprise/user/uploadFile`,
exportFailureUser: `cjEnterprise/user/exportFailure`, exportFailureUser: `${Setting.apiBaseURL}/cjEnterprise/user/exportFailure`,
downloadUserTemp: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658619702.xlsx', downloadUserTemp: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658619702.xlsx',
// 题库分类 // 题库分类
@ -92,7 +92,7 @@ export default {
pageByCondition:`cjEnterprise/questions/pageByCondition`, pageByCondition:`cjEnterprise/questions/pageByCondition`,
updateQuestions:`cjEnterprise/questions/update`, updateQuestions:`cjEnterprise/questions/update`,
getExcel:`cjEnterprise/questions/getExcel`, getExcel:`cjEnterprise/questions/getExcel`,
impExcel:`cjEnterprise/questions/impExcel`, impExcel:`${Setting.apiBaseURL}/cjEnterprise/questions/impExcel`,
// 共享相关 // 共享相关
batchSave:`cjEnterprise/questionSharing/batchSave`, batchSave:`cjEnterprise/questionSharing/batchSave`,

@ -92,7 +92,7 @@ export default {
password: this.loginForm.password password: this.loginForm.password
} }
this.login(data).then(() => { this.login(data).then(() => {
let redirect = decodeURIComponent(this.$route.query.redirect || '/') let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : '/index'
this.$router.replace(redirect) this.$router.replace(redirect)
}).catch(() => {}) }).catch(() => {})
} }

@ -1,7 +1,5 @@
<template> <template>
<div> <div>
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex j-between a-center"> <div class="flex j-between a-center">
<div class="per_title" v-throttle @click="goback()"> <div class="per_title" v-throttle @click="goback()">
@ -62,9 +60,6 @@
</div> </div>
</div> </div>
</el-card> </el-card>
</el-col>
</el-row>
</div> </div>
</template> </template>

@ -1,7 +1,5 @@
<template> <template>
<div> <div>
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="p-title m-b-20">筛选</div> <div class="p-title m-b-20">筛选</div>
@ -38,9 +36,7 @@
</div> </div>
</div> </div>
</el-card> </el-card>
</el-col>
<el-col :span="24">
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex j-between m-b-20"> <div class="flex j-between m-b-20">
<div class="p-title">客户列表</div> <div class="p-title">客户列表</div>
@ -88,8 +84,6 @@
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
</el-col>
</el-row>
</div> </div>
</template> </template>

@ -4,7 +4,7 @@
<div class="error-desc">啊哦~ 你没有权限访问该页面哦</div> <div class="error-desc">啊哦~ 你没有权限访问该页面哦</div>
<div class="error-handle"> <div class="error-handle">
<router-link to="/"> <router-link to="/">
<el-button type="primary" size="large">返回首页</el-button> <el-button type="primary" size="large" @click="toIndex">返回首页</el-button>
</router-link> </router-link>
<el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button> <el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button>
</div> </div>
@ -14,6 +14,9 @@
<script> <script>
export default { export default {
methods: { methods: {
toIndex(){
this.$router.push('/')
},
goBack(){ goBack(){
this.$router.go(-1); this.$router.go(-1);
} }

@ -4,7 +4,7 @@
<div class="error-desc">啊哦~ 你所访问的页面不存在</div> <div class="error-desc">啊哦~ 你所访问的页面不存在</div>
<div class="error-handle"> <div class="error-handle">
<router-link to="/"> <router-link to="/">
<el-button type="primary" size="large">返回首页</el-button> <el-button type="primary" size="large" @click="toIndex">返回首页</el-button>
</router-link> </router-link>
<el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button> <el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button>
</div> </div>
@ -14,6 +14,9 @@
<script> <script>
export default { export default {
methods: { methods: {
toIndex(){
this.$router.push('/')
},
goBack(){ goBack(){
this.$router.go(-1); this.$router.go(-1);
} }

@ -23,7 +23,7 @@
</el-form> </el-form>
</div> </div>
<div> <div>
<el-input placeholder="请输入题库名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> <el-input placeholder="请输入题干/知识点" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div> </div>
</div> </div>
</div> </div>

@ -1,7 +1,5 @@
<template> <template>
<div> <div>
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="p-title m-b-20">测评题库</div> <div class="p-title m-b-20">测评题库</div>
@ -16,7 +14,7 @@
</el-form> </el-form>
<div> <div>
<el-input <el-input
placeholder="请输入题干" placeholder="请输入题干/知识点"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="keyword" v-model="keyword"
clearable clearable
@ -24,9 +22,7 @@
</div> </div>
</div> </div>
</el-card> </el-card>
</el-col>
<el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex j-between m-b-20"> <div class="flex j-between m-b-20">
<div class="p-title">题目列表</div> <div class="p-title">题目列表</div>
@ -113,8 +109,6 @@
></el-pagination> ></el-pagination>
</div> </div>
</el-card> </el-card>
</el-col>
</el-row>
<ques-dialog ref="quesDialog" :title="topicsTitle" :visible.sync="visible" :isDetail.sync="isDetail" @getData="dialogGetData" @closeTopics="closeTopics"></ques-dialog> <ques-dialog ref="quesDialog" :title="topicsTitle" :visible.sync="visible" :isDetail.sync="isDetail" @getData="dialogGetData" @closeTopics="closeTopics"></ques-dialog>
@ -343,7 +337,6 @@ export default {
} }
}, },
downLoad() { downLoad() {
// location.href = 'http://192.168.31.152:8001/cjEnterprise/questions/getExcel'
location.href = 'http://39.108.250.202/cjEnterprise/题库导入模板.xlsx' location.href = 'http://39.108.250.202/cjEnterprise/题库导入模板.xlsx'
}, },
showimportVisible() { showimportVisible() {

@ -241,9 +241,18 @@ export default {
.catch(err => {}) .catch(err => {})
}, },
getQuesBank() { getQuesBank() {
this.$get(this.api.getTypeByOneLever) let data = {
pageNum: 1,
pageSize: 10000
}
this.$post(this.api.listByPage,data)
.then(res => { .then(res => {
this.quesBankList = res.data.list let list = res.data.list.list
let result = list
list.map((n,i) => {
result = result.concat(n.secondColumn)
})
this.quesBankList = result
}) })
.catch(err => {}) .catch(err => {})
}, },

@ -270,7 +270,7 @@ export default {
let data = { let data = {
userInfo: { userInfo: {
id: form.id, id: form.id,
isPort: 1, isPort: 2,
userId: form.userId, userId: form.userId,
account: form.account, account: form.account,
clientId: form.clientId, clientId: form.clientId,
@ -282,7 +282,7 @@ export default {
}, },
userManagement: { userManagement: {
id: form.id, id: form.id,
isPort: 1, isPort: 2,
userId: form.userId, userId: form.userId,
account: form.account, account: form.account,
clientId: form.clientId, clientId: form.clientId,

@ -6,7 +6,7 @@ import Setting from '@/setting'
const service = axios.create({ const service = axios.create({
baseURL: Setting.apiBaseURL, baseURL: Setting.apiBaseURL,
timeout: 5000 timeout: 50000
}) })
// post请求头 // post请求头

@ -8,10 +8,14 @@ router.beforeEach((to, from, next) => {
document.title = to.meta.title ? `${to.meta.title} | ${Setting.titleSuffix}` : Setting.titleSuffix; document.title = to.meta.title ? `${to.meta.title} | ${Setting.titleSuffix}` : Setting.titleSuffix;
const role = util.session.get(Setting.usernameKey); const role = util.session.get(Setting.usernameKey);
if (!role && to.path !== '/login') { if (!role && to.path !== '/login') {
if(to.fullPath == '/'){
next('/login')
}else{
next({ next({
path: '/login', path: '/login',
query: {redirect: to.fullPath} query: {redirect: to.fullPath}
}) })
}
} else if(role && to.path == '/login') { } else if(role && to.path == '/login') {
next('/index') next('/index')
} else { } else {

Loading…
Cancel
Save