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. 18
      src/store/modules/common.js
  13. 7
      vue.config.js

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <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"> <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"> <link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css">
<title>电子竞技在线教学资源管理平台</title> <title>电子竞技数字化考试系统-企业端</title>
</head> </head>
<body> <body>
<noscript> <noscript>

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

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

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

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

@ -45,23 +45,22 @@
</div> </div>
<el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange"> <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="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"> <el-table-column prop="questionStem" label="题干" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-html="scope.row.questionStem"></div> <div v-html="scope.row.questionStem"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" 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="对应课程" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" align="center"></el-table-column> <el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" width="140" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" align="center"></el-table-column> <el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="共享时间" align="center"></el-table-column> <el-table-column prop="createTime" label="共享时间" width="140" align="center"></el-table-column>
<el-table-column prop="createUser" label="创建人" 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"> <el-table-column label="操作" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button> <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> <el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -146,24 +145,12 @@ export default {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = 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) { delData(row) {
this.$confirm('确定要删除吗?', '提示', { this.$confirm('确定要删除吗?', '提示', {
type: 'warning' type: 'warning'
}) })
.then(() => { .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.$message.success('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {});
@ -181,7 +168,7 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .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.multipleSelection = [];
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()

@ -84,7 +84,7 @@
align="center" align="center"
:reserve-selection="true" :reserve-selection="true"
></el-table-column> ></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template <template
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
@ -94,19 +94,19 @@
<div v-html="scope.row.questionStem"></div> <div v-html="scope.row.questionStem"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="试题类型" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" width="120" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" align="center"></el-table-column> <el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" width="140" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" align="center"></el-table-column> <el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="上传时间" align="center"></el-table-column> <el-table-column prop="createTime" label="上传时间" width="140" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" width="170" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button> <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="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="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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -151,6 +151,52 @@
<el-button type="primary" @click="uploadSure"> </el-button> <el-button type="primary" @click="uploadSure"> </el-button>
</span> </span>
</el-dialog> </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> </div>
</template> </template>
<script> <script>
@ -176,6 +222,12 @@ export default {
searchTimer: null, searchTimer: null,
uploadFaild: false, uploadFaild: false,
token: '', token: '',
cancelShareVisible: false,
globalData: [],
pageGlobal: 1,
pageSizeGlobal: 10,
totalGlobal: 0,
multipleSelectionGlobal: []
}; };
}, },
computed: { computed: {
@ -257,9 +309,9 @@ export default {
this.$post(`${this.api.deleteByMeSubject}?ids=${row.id}`).then(res => { this.$post(`${this.api.deleteByMeSubject}?ids=${row.id}`).then(res => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
}) })
.catch(() => {}); .catch(() => {})
}, },
share(row) { share(row) {
this.$confirm('确定要共享吗?', '提示', { this.$confirm('确定要共享吗?', '提示', {
@ -283,10 +335,9 @@ export default {
}) })
.then(() => { .then(() => {
let data = { let data = {
userId: this.userId, ids: [row.id]
qid: row.id
} }
this.$post(this.api.delete,data).then(res => { this.$post(this.api.cancelByMySharing,data).then(res => {
this.$message.success('取消共享成功'); this.$message.success('取消共享成功');
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {});
@ -323,6 +374,9 @@ export default {
} }
}, },
cancelShareBatch() { cancelShareBatch() {
this.cancelShareVisible = true
this.getGlobalData()
return false
if(this.multipleSelection.length != ''){ if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection let newArr = this.multipleSelection
let shareList = newArr.map(item => { let shareList = newArr.map(item => {
@ -347,6 +401,33 @@ export default {
}else{ }else{
this.$message.error('请先选择数据!'); 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() { delAllData() {
if(this.multipleSelection.length){ if(this.multipleSelection.length){

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

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

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

@ -15,7 +15,8 @@ const Setting = {
// 页面切换时,是否显示模拟的进度条 // 页面切换时,是否显示模拟的进度条
showProgressBar: true, 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, modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

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

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