区分测试正式环境子系统等

dev_2022-05-11
yujialong 4 years ago
parent 72d9274712
commit 7e9353412f
  1. 2
      src/components/common/Footer.vue
  2. 2
      src/components/page/AddProject.vue
  3. 4
      src/components/page/Login.vue
  4. 23
      src/components/page/Role.vue
  5. 4
      src/components/page/Staff.vue
  6. 20
      src/components/page/dashboard.vue
  7. 10
      src/components/page/evaluation.vue
  8. 17
      src/components/page/project.vue
  9. 6
      src/components/page/student.vue
  10. 29
      src/utils/http.js

@ -1,7 +1,7 @@
<template>
<div>
<div class="copyright">
<p>技术支持深圳或然科技有限公司</p>
<!-- <p>技术支持深圳或然科技有限公司</p> -->
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">粤ICP备20072679号</a></div>
</div>
</template>

@ -469,14 +469,12 @@
},500)
},
projectPermission(val){
if(!this.id){
if(val){
this.flag02 = false
}else{
this.flag02 = true
}
}
}
},
mounted(){
this.recoveryData()

@ -67,8 +67,8 @@ export default {
data: function() {
return {
param: {
username: 'admin',
password: 'admin'
username: '',
password: ''
},
rules: {
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],

@ -1,21 +1,5 @@
<template>
<div>
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div>
<div style="display: flex;justify-content: flex-end;">
<div>
<el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div>
</div>
</div>
</el-card>
<el-card shadow="hover">
<div class="flex-between mgb20">
<div class="flex-center">
@ -23,8 +7,9 @@
<span>角色列表</span>
</div>
<div>
<el-button type="primary" size="small" round @click="addRole" v-auth="'system:角色权限:新增角色'">新增角色</el-button>
<el-button type="primary" size="small" round @click="delAllSelection" v-auth="'system:角色权限:批量删除'">批量删除</el-button>
<el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<!-- <el-button type="primary" size="small" round @click="addRole" v-auth="'system:角色权限:新增角色'">新增角色</el-button>
<el-button type="primary" size="small" round @click="delAllSelection" v-auth="'system:角色权限:批量删除'">批量删除</el-button> -->
</div>
</div>
<el-table :data="roleData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
@ -42,7 +27,7 @@
<template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'system:角色权限:查看'">查看</el-button>
<el-button type="text" @click="editRole(scope.row)" v-auth="'system:角色权限:编辑'">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth="'system:角色权限:删除'">删除</el-button>
<!-- <el-button type="text" @click="handleDelete(scope.row)" v-auth="'system:角色权限:删除'">删除</el-button> -->
</template>
</el-table-column>
</el-table>

@ -366,8 +366,7 @@ export default {
},
getData(){
let data = {
// staffProfessionalArchitectureIds: this.oneDepartmentIds,
staffProfessionalArchitectureIds: '',
staffProfessionalArchitectureIds: (this.oneDepartmentIds && this.twoDepartmentIds) ? '' : this.oneDepartmentIds,
staffGradeIds: this.twoDepartmentIds,
searchContent: this.encodeString(this.keyword),
page: this.pageNo,
@ -445,6 +444,7 @@ export default {
this.teacherForm.userAccount = user.account
this.teacherForm.userId = user.userId
this.teacherForm.schoolId = user.schoolId
this.teacherForm.uniqueIdentificationAccount = user.uniqueIdentificationAccount
or.forEach((n,i) => {
this.teacherForm.roleValue.push(this.roleStatus(n.roleId))
if(n.roleId == 13) {

@ -10,7 +10,7 @@
<el-form label-width="80px">
<div>
<el-form-item label="实验时间" class="userRadio">
<el-radio-group v-model="form.month" @change="getData">
<el-radio-group v-model="form.month" @change="initData">
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{item.name}}</el-radio>
</el-radio-group>
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" style="margin-left: 10px;"
@ -20,17 +20,17 @@
<div class="flex-between no-mb">
<div class="flex-center">
<el-form-item label="发布类型">
<el-select v-model="form.type" clearable placeholder="请选择发布类型" @change="getData">
<el-select v-model="form.type" clearable placeholder="请选择发布类型" @change="initData">
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="实验状态">
<el-select v-model="form.status" clearable placeholder="请选择实验状态" @change="getData">
<el-select v-model="form.status" clearable placeholder="请选择实验状态" @change="initData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="系统" label-width="60px">
<el-select v-model="systemId" placeholder="请选择" @change="getData">
<el-select v-model="systemId" placeholder="请选择" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option
v-for="item in systemList"
@ -276,12 +276,12 @@ export default {
this.form.startTime = ''
this.form.stopTime = ''
}
this.getData()
this.initData()
},
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -295,10 +295,6 @@ export default {
this.timer = setInterval(this.getData,1000)
this.$once('hook:beforeDestroy',() => {
clearInterval(this.timer)
// this.timerList.forEach((n,k) => {
// clearInterval(n)
// })
// this.timerList = []
})
},
methods: {
@ -320,6 +316,10 @@ export default {
this.totals = res.list.totalCount
}).catch(res => {});
},
initData(){
this.pageNo = 1
this.getData()
},
permission(){
this.$router.push('/permission')
},

@ -67,7 +67,7 @@
<div class="flex-between">
<div>
<span style="margin-right: 15px;">题目类型</span>
<el-radio-group v-model="subject" @change="getData">
<el-radio-group v-model="subject" @change="initData">
<el-radio
v-for="(item,index) in subjectList"
:key="index"
@ -287,7 +287,7 @@
@change="switchQues($event,scope.row,scope.$index)"
v-auth="'evaluation:禁用'"
></el-switch>
<el-button type="text" @click="delData(scope.row)">删除</el-button>
<el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button>
</template>
</el-table-column>
</el-table>
@ -389,7 +389,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -409,6 +409,10 @@ export default {
})
.catch(err => {})
},
initData(){
this.pageNo = 1
this.getData()
},
resetForm() {
this.topicForm = {
answer: '',

@ -20,21 +20,21 @@
<div class="flex-center">
<div>
<el-form-item label="创建人">
<el-select v-model="queryData.founder" clearable placeholder="请选择创建人" @change="getData()">
<el-select v-model="queryData.founder" clearable placeholder="请选择创建人" @change="initData">
<el-option v-for="(item,index) in founder" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="状态">
<el-select v-model="queryData.state" clearable placeholder="请选择状态" @change="getData()">
<el-select v-model="queryData.state" clearable placeholder="请选择状态" @change="initData">
<el-option v-for="(item,index) in state" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="权限">
<el-select v-model="queryData.projectPermissions" placeholder="请选择" @change="getData()">
<el-select v-model="queryData.projectPermissions" placeholder="请选择" @change="initData">
<el-option
v-for="item in projectPermissions"
:key="item.value"
@ -46,7 +46,7 @@
</div>
<div>
<el-form-item label="系统">
<el-select v-model="systemId" placeholder="请选择" @change="getData()">
<el-select v-model="systemId" placeholder="请选择" @change="initData">
<el-option
v-for="item in systemList"
:key="item.value"
@ -115,8 +115,7 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="handleCurrentChange" layout="total, prev, pager, next" :total="totals">
</el-pagination>
<el-pagination background @current-change="handleCurrentChange" :current-page="pageNo" layout="total, prev, pager, next" :total="totals"></el-pagination>
</div>
</el-card>
@ -220,7 +219,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -257,6 +256,10 @@ export default {
this.totals = res.pageInfo.total
}).catch(res => {});
},
initData(){
this.pageNo = 1
this.getData()
},
handlePage(){
let list = this.projectDataAll
let result = list.slice((this.pageNo - 1) * this.pageSize,this.pageNo * this.pageSize)

@ -257,7 +257,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -274,6 +274,10 @@ export default {
this.totals = res.data.totalCount
}).catch(res => {});
},
initData(){
this.pageNo = 1
this.getData()
},
saveData() {
this.$refs.form.validate((valid) => {
if (valid) {

@ -101,21 +101,26 @@ axios.interceptors.request.use(config => {
// }
// );
function logouts(){
store.replaceState({})
sessionStorage.removeItem('sta_server_username')
location.reload()
}
let logout = false
export function getToken(){
// console.log(store.state.dataTime,logout)
if(process.env.NODE_ENV == 'production'){
// if(store.state.dataTime && !logout){
// axios.get(`${api.queryToken}?token=${store.state.token}`).then(res => {
// if(store.state.dataTime && (res.data.message != store.state.dataTime)){
// logout || Message.error('您已在另一台设备登录,本次登录已下线!')
// logout = true
// setTimeout(() => {
// core.logout()
// },1500)
// }
// }).catch(err => {})
// }
if(store.state.dataTime && !logout){
axios.get(`${api.queryToken}?token=${store.state.token}`).then(res => {
if(store.state.dataTime && (res.data.message != store.state.dataTime)){
logout || Message.error('您已在另一台设备登录,本次登录已下线!')
logout = true
setTimeout(() => {
logouts()
},1500)
}
}).catch(err => {})
}
}
}

Loading…
Cancel
Save