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

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

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

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

@ -1,21 +1,5 @@
<template> <template>
<div> <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"> <el-card shadow="hover">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
@ -23,8 +7,9 @@
<span>角色列表</span> <span>角色列表</span>
</div> </div>
<div> <div>
<el-button type="primary" size="small" round @click="addRole" 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="delAllSelection" v-auth="'system:角色权限:批量删除'">批量删除</el-button> <!-- <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>
</div> </div>
<el-table :data="roleData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys"> <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"> <template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'system:角色权限:查看'">查看</el-button> <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="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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

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

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

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

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

@ -257,7 +257,7 @@ export default {
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData()
},500) },500)
} }
}, },
@ -274,6 +274,10 @@ export default {
this.totals = res.data.totalCount this.totals = res.data.totalCount
}).catch(res => {}); }).catch(res => {});
}, },
initData(){
this.pageNo = 1
this.getData()
},
saveData() { saveData() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (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 let logout = false
export function getToken(){ export function getToken(){
// console.log(store.state.dataTime,logout)
if(process.env.NODE_ENV == 'production'){ if(process.env.NODE_ENV == 'production'){
// if(store.state.dataTime && !logout){ if(store.state.dataTime && !logout){
// axios.get(`${api.queryToken}?token=${store.state.token}`).then(res => { axios.get(`${api.queryToken}?token=${store.state.token}`).then(res => {
// if(store.state.dataTime && (res.data.message != store.state.dataTime)){ if(store.state.dataTime && (res.data.message != store.state.dataTime)){
// logout || Message.error('您已在另一台设备登录,本次登录已下线!') logout || Message.error('您已在另一台设备登录,本次登录已下线!')
// logout = true logout = true
// setTimeout(() => { setTimeout(() => {
// core.logout() logouts()
// },1500) },1500)
// } }
// }).catch(err => {}) }).catch(err => {})
// } }
} }
} }

Loading…
Cancel
Save