|
@@ -42,7 +42,7 @@
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
<div class="part-box-action">
|
|
<div class="part-box-action">
|
|
- <div>
|
|
|
|
|
|
+ <div v-if="!onlyAssignTeacher">
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
plain
|
|
plain
|
|
@@ -129,6 +129,7 @@
|
|
<el-table-column width="170" label="操作">
|
|
<el-table-column width="170" label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="!onlyAssignTeacher"
|
|
size="mini"
|
|
size="mini"
|
|
:type="scope.row.enable ? 'danger' : 'primary'"
|
|
:type="scope.row.enable ? 'danger' : 'primary'"
|
|
plain
|
|
plain
|
|
@@ -141,7 +142,7 @@
|
|
更多<i class="el-icon-more el-icon--right"></i>
|
|
更多<i class="el-icon-more el-icon--right"></i>
|
|
</el-button>
|
|
</el-button>
|
|
<el-dropdown-menu slot="dropdown" class="action-dropdown">
|
|
<el-dropdown-menu slot="dropdown" class="action-dropdown">
|
|
- <el-dropdown-item>
|
|
|
|
|
|
+ <el-dropdown-item v-if="!onlyAssignTeacher">
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -168,7 +169,7 @@
|
|
>查看题卡
|
|
>查看题卡
|
|
</el-button>
|
|
</el-button>
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
- <el-dropdown-item>
|
|
|
|
|
|
+ <el-dropdown-item v-if="!onlyAssignTeacher">
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="danger"
|
|
type="danger"
|
|
@@ -282,6 +283,15 @@ export default {
|
|
...mapState({
|
|
...mapState({
|
|
user: (state) => state.user,
|
|
user: (state) => state.user,
|
|
}),
|
|
}),
|
|
|
|
+ onlyAssignTeacher() {
|
|
|
|
+ if (this.isAdmin) {
|
|
|
|
+ return false;
|
|
|
|
+ } else {
|
|
|
|
+ return this.user.roleList.some(
|
|
|
|
+ (role) => role.roleCode == "ASSIGN_TEACHER"
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
const cacheInfo = window.sessionStorage.getItem("card-manage");
|
|
const cacheInfo = window.sessionStorage.getItem("card-manage");
|