yujialong 4 years ago
parent 7eb2f5c121
commit 3b5b07a4b0
  1. 2
      public/index.html
  2. 74
      src/api/index.js
  3. 2
      src/layouts/home/index.vue
  4. 20
      src/layouts/navbar/index.vue
  5. 4
      src/pages/client/add/index.vue
  6. 33
      src/pages/quesBank/list/globalQuesBank.vue
  7. 111
      src/pages/quesBank/list/myQuesBank.vue
  8. 4
      src/pages/system/list/staff.vue
  9. 10
      src/pages/user/list/index.vue
  10. 3
      src/plugins/requests/index.js
  11. 3
      src/setting.js
  12. 22
      src/store/modules/common.js
  13. 7
      vue.config.js

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css">
<title>电子竞技在线教学资源管理平台</title>
<title>电子竞技数字化考试系统-企业端</title>
</head>
<body>
<noscript>

@ -2,8 +2,8 @@ export default {
logins: `management/userInfo/login`, //登录 
// 查询省份城市
queryCity: `enterprise/city/queryCity`,
queryProvince: `enterprise/province/queryProvince`,
queryCity: `cjEnterprise/city/queryCity`,
queryProvince: `cjEnterprise/province/queryProvince`,
// 个人中心
userinfoUpdate:`management/userInfo/update`,//个人中心信息修改
@ -47,53 +47,53 @@ export default {
toAssign: `management/permission/toAssign`,
// 学校管理
addClient: `enterprise/client/addClient`,
deleteClient: `enterprise/client/deleteClient`,
queryClient: `enterprise/client/list`,
updateClient: `enterprise/client/updateClient`,
getClient: `enterprise/client/getClient`,
getClientName: `enterprise/client/getClientName`,
addClient: `cjEnterprise/client/addClient`,
deleteClient: `cjEnterprise/client/deleteClient`,
queryClient: `cjEnterprise/client/list`,
updateClient: `cjEnterprise/client/updateClient`,
getClient: `cjEnterprise/client/getClient`,
getClientName: `cjEnterprise/client/getClientName`,
// 用户管理
addUser: `enterprise/user/addUser`,
deleteUser: `enterprise/user/deleteUser`,
queryUser: `enterprise/user/list`,
updateUser: `enterprise/user/updateUser`,
uploadFileUser: `enterprise/user/uploadFile`,
exportFailureUser: `enterprise/user/exportFailure`,
addUser: `cjEnterprise/user/addUser`,
deleteUser: `cjEnterprise/user/deleteUser`,
queryUser: `cjEnterprise/user/list`,
updateUser: `cjEnterprise/user/updateUser`,
uploadFileUser: `cjEnterprise/user/uploadFile`,
exportFailureUser: `cjEnterprise/user/exportFailure`,
downloadUserTemp: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658619702.xlsx',
fileupload: `oss/manage/fileupload`,
fileDeletion: `oss/manage/fileDeletion`, //批量删除文件
// 题库分类
AddOneLevel:`enterprise/questionBank/AddOneLevel`,
AddSecondLevel:`enterprise/questionBank/AddSecondLevel`,
deleteById:`enterprise/questionBank/deleteById`,
getTypeByOneLever:`enterprise/questionBank/getTypeByOneLever`,
listByPage:`enterprise/questionBank/listByPage`,
modifyLevel:`enterprise/questionBank/modifyLevel`,
AddOneLevel:`cjEnterprise/questionBank/AddOneLevel`,
AddSecondLevel:`cjEnterprise/questionBank/AddSecondLevel`,
deleteById:`cjEnterprise/questionBank/deleteById`,
getTypeByOneLever:`cjEnterprise/questionBank/getTypeByOneLever`,
listByPage:`cjEnterprise/questionBank/listByPage`,
modifyLevel:`cjEnterprise/questionBank/modifyLevel`,
// 题型列表
typesList:`enterprise/questionTypes/typesList`,
typesList:`cjEnterprise/questionTypes/typesList`,
// 题库管理
addQuestions:`enterprise/questions/addQuestions`,
deleteByOne:`enterprise/questions/deleteByOne`,
findById:`enterprise/questions/findById`,
pageByCondition:`enterprise/questions/pageByCondition`,
updateQuestions:`enterprise/questions/update`,
getExcel:`enterprise/questions/getExcel`,
impExcel:`enterprise/questions/impExcel`,
addQuestions:`cjEnterprise/questions/addQuestions`,
deleteByOne:`cjEnterprise/questions/deleteByOne`,
findById:`cjEnterprise/questions/findById`,
pageByCondition:`cjEnterprise/questions/pageByCondition`,
updateQuestions:`cjEnterprise/questions/update`,
getExcel:`cjEnterprise/questions/getExcel`,
impExcel:`cjEnterprise/questions/impExcel`,
// 共享相关
batchSave:`enterprise/questionSharing/batchSave`,
cancelByMySharing:`enterprise/questionSharing/cancelByMySharing`,
delByMySharing:`enterprise/questionSharing/delByMySharing`,
deleteByMeSubject:`enterprise/questionSharing/deleteByMeSubject`,
detail:`enterprise/questionSharing/detail`,
getMeSharingInfo:`enterprise/questionSharing/getMeSharingInfo`,
pageByConditionSharing:`enterprise/questionSharing/pageByConditionSharing`,
saveSharing:`enterprise/questionSharing/save`,
batchSave:`cjEnterprise/questionSharing/batchSave`,
cancelByMySharing:`cjEnterprise/questionSharing/cancelByMySharing`,
delByMySharing:`cjEnterprise/questionSharing/delByMySharing`,
deleteByMeSubject:`cjEnterprise/questionSharing/deleteByMeSubject`,
deleteByMeSubjectBySharing:`cjEnterprise/questionSharing/deleteByMeSubjectBySharing`,
detail:`cjEnterprise/questionSharing/detail`,
getMeSharingInfo:`cjEnterprise/questionSharing/getMeSharingInfo`,
pageByConditionSharing:`cjEnterprise/questionSharing/pageByConditionSharing`,
saveSharing:`cjEnterprise/questionSharing/save`,
}

@ -1,6 +1,6 @@
<template>
<div class="wrapper">
<div class="placeholder" :class="{mini: !hideNavList}"></div>
<div class="placeholder" :class="{mini: !hideNavbar}"></div>
<div class="fixed">
<v-head></v-head>
<v-navbar v-show="hideNavbar"></v-navbar>

@ -60,32 +60,38 @@ export default {
defaultMenus: [
{
icon: 'el-icon-lx-home',
index: '/index/list',
index: '/index',
title: '学校管理'
},
{
icon: 'el-icon-user',
index: '/user/list',
index: '/user',
title: '用户管理'
},
{
icon: 'el-icon-monitor',
index: '/quesBank/list',
index: '/quesBank',
title: '题库管理'
},
{
icon: 'el-icon-takeaway-box',
index: '/system/list',
index: '/system',
title: '系统设置'
}
],
menus: []
menus: [],
actives: {
index: ['index-add'],
}
};
},
computed: {
onRoutes() {
console.log(33,this.$route)
return this.$route.path
let actives = this.actives
for(let i in this.actives){
if(actives[i].includes(this.$route.name)) return `/${i}`
}
return '/' + this.$route.name.replace(/-\w+/,'')
}
},
created() {

@ -16,12 +16,12 @@
<el-card shadow="hover">
<div>
<div class="flex a-center m-b-20">
<p class="addhr_tag"></p>
<p class="hr_tag"></p>
<span>基本信息</span>
</div>
<div>
<el-form :model="form" :rules="rules" ref="form" label-width="100px" class="flex-start-around" :disabled="isDetail">
<el-form :model="form" :rules="rules" ref="form" label-width="100px" class="flex j-center" :disabled="isDetail">
<el-col :span="6" style="margin-right: 60px;">
<el-form-item prop="countries" label="国家">
<el-select v-model="form.countries" clearable placeholder="请选择国家">

@ -45,23 +45,22 @@
</div>
<el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="questionStem" label="题干" align="center">
<template slot-scope="scope">
<div v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column prop="name" label="试题类型" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" align="center"></el-table-column>
<el-table-column prop="createTime" label="共享时间" align="center"></el-table-column>
<el-table-column prop="createUser" label="创建人" align="center"></el-table-column>
<el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" width="140" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="共享时间" width="140" align="center"></el-table-column>
<el-table-column prop="createUser" label="创建人" width="100" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button>
<el-button v-if="scope.row.myShare" type="text" @click="cancelShare(scope.row)">取消共享</el-button>
<el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button>
</template>
</el-table-column>
@ -146,24 +145,12 @@ export default {
handleSelectionChange(val) {
this.multipleSelection = val;
},
cancelShare(row) {
this.$confirm('确定要取消共享吗?', '提示', {
type: 'info'
})
.then(() => {
this.$post(`${this.api.cancelByMySharing}?ids=${row.sid}`).then(res => {
this.$message.success('取消共享成功');
this.getData()
}).catch(res => {});
})
.catch(() => {});
},
delData(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
this.$post(`${this.api.deleteByMeSubject}?ids=${row.sid}`).then(res => {
this.$post(`${this.api.deleteByMeSubjectBySharing}?identification=1&ids=${row.sid}`).then(res => {
this.$message.success('删除成功')
this.getData()
}).catch(res => {});
@ -181,7 +168,7 @@ export default {
type: 'warning'
})
.then(() => {
this.$post(`${this.api.deleteByMeSubject}?ids=${delList.join()}`).then(res => {
this.$post(`${this.api.deleteByMeSubjectBySharing}?identification=1&ids=${delList.join()}`).then(res => {
this.multipleSelection = [];
this.$message.success('删除成功')
this.getData()

@ -84,7 +84,7 @@
align="center"
:reserve-selection="true"
></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<el-table-column type="index" width="60" label="序号" align="center">
<template
slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template>
@ -94,19 +94,19 @@
<div v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column prop="name" label="试题类型" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" align="center"></el-table-column>
<el-table-column prop="createTime" label="上传时间" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<el-table-column prop="name" label="试题类型" width="120" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" width="140" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="上传时间" width="140" align="center"></el-table-column>
<el-table-column label="操作" width="170" align="center">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="edit(scope.row)">修改</el-button>
<el-button type="text" @click="share(scope.row)">共享</el-button>
<el-button type="text" @click="delData(scope.row)">删除</el-button>
<!-- <el-button type="text" @click="cancelShare(scope.row)">取消共享</el-button> -->
<el-button v-if="!scope.row.myShare" type="text" @click="share(scope.row)">共享</el-button>
<el-button v-else type="text" @click="cancelShare(scope.row)">取消共享</el-button>
</template>
</el-table-column>
</el-table>
@ -151,6 +151,52 @@
<el-button type="primary" @click="uploadSure"> </el-button>
</span>
</el-dialog>
<el-dialog title="批量取消共享" :visible.sync="cancelShareVisible" width="40%" @close="closeCancelShare" :close-on-click-modal="false">
<el-table
:data="globalData"
max-height="400"
ref="table"
row-key="id"
class="table"
stripe
header-align="center"
@selection-change="handleGlobalSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
:reserve-selection="true"
></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<template
slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column>
<el-table-column prop="questionStem" label="题干" align="center">
<template slot-scope="scope">
<div v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@current-change="handleGlobalCurrentChange"
:current-page="pageGlobal"
:page-size="pageSizeGlobal"
layout="total,prev, pager, next"
:total="totalGlobal"
></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="cancelShareVisible = false">取消</el-button>
<el-button type="primary" @click="cancelShareSubmit">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
@ -176,6 +222,12 @@ export default {
searchTimer: null,
uploadFaild: false,
token: '',
cancelShareVisible: false,
globalData: [],
pageGlobal: 1,
pageSizeGlobal: 10,
totalGlobal: 0,
multipleSelectionGlobal: []
};
},
computed: {
@ -257,9 +309,9 @@ export default {
this.$post(`${this.api.deleteByMeSubject}?ids=${row.id}`).then(res => {
this.$message.success('删除成功')
this.getData()
}).catch(res => {});
}).catch(res => {})
})
.catch(() => {});
.catch(() => {})
},
share(row) {
this.$confirm('确定要共享吗?', '提示', {
@ -283,10 +335,9 @@ export default {
})
.then(() => {
let data = {
userId: this.userId,
qid: row.id
ids: [row.id]
}
this.$post(this.api.delete,data).then(res => {
this.$post(this.api.cancelByMySharing,data).then(res => {
this.$message.success('取消共享成功');
this.getData()
}).catch(res => {});
@ -323,6 +374,9 @@ export default {
}
},
cancelShareBatch() {
this.cancelShareVisible = true
this.getGlobalData()
return false
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
let shareList = newArr.map(item => {
@ -347,6 +401,33 @@ export default {
}else{
this.$message.error('请先选择数据!');
}
},
getGlobalData() {
this.$post(this.api.pageByConditionSharing, {
pageNum: this.pageGlobal,
pageSize: this.pageSizeGlobal,
questionStem: '',
createUser: '',
name: ''
})
.then(res => {
this.globalData = res.data.list.list
this.totalGlobal = res.data.list.totalCount
})
.catch(err => {})
},
handleSelectionChange(val) {
this.multipleSelectionGlobal = val;
},
handleGlobalCurrentChange(val) {
this.pageGlobal = val
this.getGlobalData()
},
closeCancelShare(){
},
cancelShareSubmit(){
},
delAllData() {
if(this.multipleSelection.length){

@ -436,7 +436,7 @@ export default {
userId: this.manageForm.userId,
userName: this.manageForm.userName,
account: this.manageForm.userAccount,
schoolId: this.clientId,
schoolId: this.manageForm.clientId,
clientId: this.manageForm.clientId,
clientName: this.manageForm.clientName,
roleId: this.manageForm.roleValue,
@ -459,7 +459,7 @@ export default {
data.staff = {
roleId: this.manageForm.roleValue,
isPort: 1,
schoolId: this.clientId,
schoolId: this.manageForm.clientId,
clientId: this.manageForm.clientId,
clientName: this.manageForm.clientName,
staffId: this.manageForm.staffId,

@ -40,7 +40,7 @@
</el-table-column>
<el-table-column prop="role" label="账号角色" align="center">
<template slot-scope="scope">
{{getRole(scope.row.roleId)}}
{{getRoleName(scope.row.roleId)}}
</template>
</el-table-column>
<el-table-column prop="loginNumber" label="登录次数" align="center">
@ -120,7 +120,7 @@
<script>
import Setting from '@/setting'
import { mapState,mapActions } from 'vuex'
import { mapState, mapGetters } from 'vuex'
import util from '@/libs/util'
export default {
name: 'user',
@ -181,6 +181,9 @@ export default {
computed: {
...mapState('layout', [
'isIE'
]),
...mapGetters('common', [
'getRoleName'
])
},
mounted() {
@ -188,9 +191,6 @@ export default {
this.getClient()
},
methods: {
...mapActions('common', [
'getRole'
]),
getData() {
let data = {
searchContent: this.keyword,

@ -1,6 +1,5 @@
import axios from 'axios';
import QS from 'qs';
// import store from '../store/index'
import { Message } from 'element-ui'
import router from '@/router/index'
import Setting from '@/setting'
@ -39,7 +38,7 @@ service.interceptors.response.use(
} else {
switch (res.code) {
case 201:
Message.error(res.message)
Message.error(res.message ? res.message : '数据请求异常')
break;
default:
Promise.reject(res).catch(e => {})

@ -15,7 +15,8 @@ const Setting = {
// 页面切换时,是否显示模拟的进度条
showProgressBar: true,
// 接口请求地址
apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000',
// apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000',
apiBaseURL: env === 'development' ? 'http://39.108.250.202:9000' : 'http://39.108.250.202:9000',
// 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

@ -2,23 +2,25 @@
* 通用
* */
const roleList = {
'1': '超级管理员',
'2': '管理员',
'3': '老师',
'4': '学生'
}
export default {
namespaced: true,
state: {
roleList: {
'1': '超级管理员',
'2': '管理员',
'3': '老师',
'4': '学生'
}
},
getters: {
getRoleName: state => id => {
return state.roleList[id]
},
},
mutations: {
},
actions: {
getRole (id) {
return roleList[id] || '未知状态'
}
}
}

@ -23,8 +23,9 @@ module.exports = {
},
publicPath: Setting.publicPath,
  outputDir: Setting.outputDir,
  assetsDir: Setting.assetsDir
// devServer: {
  assetsDir: Setting.assetsDir,
devServer: {
port: 8084
// proxy: {
// "/api": {
// target: "http://192.168.0.106:8080",
@ -35,5 +36,5 @@ module.exports = {
// }
// }
// }
// }
}
}
Loading…
Cancel
Save