权限重构

dev_2022-06-14
yujialong 2 years ago
parent 2819a9c0cc
commit ba933acf76
  1. 2
      src/pages/account/login/index.vue
  2. 8
      src/pages/achievement/list/index.vue
  3. 2
      src/pages/assessment/list/index.vue
  4. 18
      src/pages/course/contentSettings/index.vue
  5. 20
      src/pages/course/list/courseManagement/index.vue
  6. 24
      src/pages/course/list/index.vue
  7. 8
      src/pages/course/list/sortManagement/index.vue
  8. 14
      src/pages/information/columnManage/index.vue
  9. 14
      src/pages/information/contentManage/contentList.vue
  10. 4
      src/pages/information/list/index.vue
  11. 4
      src/pages/match/add/index.vue
  12. 8
      src/pages/match/list/index.vue
  13. 22
      src/pages/match/manage/index.vue
  14. 6
      src/pages/match/manage/matchProgress.vue
  15. 2
      src/pages/match/manage/matchSignup.vue
  16. 7
      src/pages/match/manage/notice.vue
  17. 4
      src/pages/match/manage/noticeDetail.vue
  18. 9
      src/pages/project/list/index.vue
  19. 2
      src/router/modules/station.js

@ -158,7 +158,7 @@ export default {
this.setCustomer(res.customer); this.setCustomer(res.customer);
res.customerName && this.setCustomerName(res.customerName); res.customerName && this.setCustomerName(res.customerName);
// let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : "/index"; // let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : "/index";
this.$router.replace('/index'); this.$router.replace('/station');
}).catch(res => {}); }).catch(res => {});
}, },
phoneCountdown() { phoneCountdown() {

@ -59,7 +59,7 @@
<div class="tool mul"> <div class="tool mul">
<ul class="filter"></ul> <ul class="filter"></ul>
<div style="margin-bottom: 24px"> <div style="margin-bottom: 24px">
<el-button v-if="auth('批量删除')" type="primary" @click="delAllData">批量删除</el-button> <el-button v-auth type="primary" @click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
@ -88,9 +88,9 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="300"> <el-table-column label="操作" align="center" min-width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="auth('练习成绩管理') || auth('考核成绩管理')" type="text" @click="entry(scope.row)">成绩管理</el-button> <el-button v-auth="'练习成绩管理'" type="text" @click="entry(scope.row)">成绩管理</el-button>
<el-button type="text" v-if="scope.row.canDel" @click="handleDelete(scope.row)" >删除</el-button> <el-button v-auth type="text" v-if="scope.row.canDel" @click="handleDelete(scope.row)" >删除</el-button>
<el-button type="text" v-else style='color:#999' >删除</el-button> <el-button v-auth type="text" v-else style='color:#999' >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -103,7 +103,7 @@
<el-button v-auth type="text" @click="edit(scope.row)">修改</el-button> <el-button v-auth type="text" @click="edit(scope.row)">修改</el-button>
</template> </template>
<template v-else-if="scope.row.status == 1 && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))"> <template v-else-if="scope.row.status == 1 && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))">
<el-button type="text" @click="finish(scope.row)">提前结束</el-button> <el-button v-auth type="text" @click="finish(scope.row)">提前结束</el-button>
</template> </template>
<template v-else-if="scope.row.status == 2"> <template v-else-if="scope.row.status == 2">
<el-button v-auth type="text" @click="show(scope.row)">查看成绩</el-button> <el-button v-auth type="text" @click="show(scope.row)">查看成绩</el-button>

@ -12,8 +12,8 @@
<div class="p-title">内容设置</div> <div class="p-title">内容设置</div>
<div class="btns" style="top: -10px"> <div class="btns" style="top: -10px">
<template v-if="!sorting"> <template v-if="!sorting">
<el-button type="primary" round v-throttle @click="addChapter">添加章节</el-button> <el-button v-auth="'课程管理:内容设置:添加章节'" type="primary" round v-throttle @click="addChapter">添加章节</el-button>
<el-button type="primary" round v-throttle @click="sort">编辑顺序</el-button> <el-button v-auth="'课程管理:内容设置:编辑顺序'" type="primary" round v-throttle @click="sort">编辑顺序</el-button>
</template> </template>
<template v-else> <template v-else>
<el-button type="primary" round @click="move">批量移动</el-button> <el-button type="primary" round @click="move">批量移动</el-button>
@ -29,9 +29,9 @@
<div>{{ chapter.name }}</div> <div>{{ chapter.name }}</div>
<div> <div>
<template v-if="!sorting"> <template v-if="!sorting">
<el-button class="action-btn" type="primary" round v-throttle @click="editChapter(chapter)">修改章节名称</el-button> <el-button v-auth="'课程管理:内容设置:修改章节名称'" class="action-btn" type="primary" round v-throttle @click="editChapter(chapter)">修改章节名称</el-button>
<el-button class="action-btn" type="primary" round v-throttle @click="addSection(chapter.id)">添加小节</el-button> <el-button v-auth="'课程管理:内容设置:添加小节'" class="action-btn" type="primary" round v-throttle @click="addSection(chapter.id)">添加小节</el-button>
<el-button class="action-btn" type="primary" round v-throttle @click="delChapter(chapter.id)">删除</el-button> <el-button v-auth="'课程管理:内容设置:章节删除'" class="action-btn" type="primary" round v-throttle @click="delChapter(chapter.id)">删除</el-button>
</template> </template>
<template v-else> <template v-else>
<i class="el-icon-top sort-icon" :class="{disabled: index == 0}" style="margin-right: 5px" @click="sortChapter(chapter,'up',index == 0,index)"></i> <i class="el-icon-top sort-icon" :class="{disabled: index == 0}" style="margin-right: 5px" @click="sortChapter(chapter,'up',index == 0,index)"></i>
@ -57,10 +57,10 @@
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="!sorting"> <template v-if="!sorting">
<el-button type="text" @click="preview(scope.row)">查看</el-button> <el-button v-auth="'课程管理:内容设置:查看'" type="text" @click="preview(scope.row)">查看</el-button>
<el-button type="text" @click="delSection(scope.row)">删除</el-button> <el-button v-auth="'课程管理:内容设置:小节删除'" type="text" @click="delSection(scope.row)">删除</el-button>
<el-button type="text" @click="editSectionName(scope.row,chapter.id)">修改小节名称</el-button> <el-button v-auth="'课程管理:内容设置:修改小节名称'" type="text" @click="editSectionName(scope.row,chapter.id)">修改小节名称</el-button>
<el-button type="text" @click="switchFile(scope.row,chapter.id)">更换文件</el-button> <el-button v-auth="'课程管理:内容设置:更换文件'" type="text" @click="switchFile(scope.row,chapter.id)">更换文件</el-button>
</template> </template>
<template v-else> <template v-else>
<i class="el-icon-top sort-icon" :class="{disabled: scope.$index == 0}" style="margin-right: 5px" @click="sortSection(index,'up',scope.$index == 0,scope.$index)"></i> <i class="el-icon-top sort-icon" :class="{disabled: scope.$index == 0}" style="margin-right: 5px" @click="sortSection(index,'up',scope.$index == 0,scope.$index)"></i>

@ -16,8 +16,8 @@
</li> </li>
</ul> </ul>
<div> <div>
<el-button v-if="auth('课程管理-新增')" type="info" round @click="addCourse">新增</el-button> <el-button v-auth="'课程管理:新增'" type="info" round @click="addCourse">新增</el-button>
<el-button v-if="auth('课程管理-批量删除')" type="primary" round @click="delAllData">批量删除</el-button> <el-button v-auth="'课程管理:批量删除'" type="primary" round @click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
@ -43,19 +43,19 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250"> <el-table-column label="操作" align="center" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="auth('课程管理-编辑信息')" type="text" @click="editCourse(scope.row)">编辑信息</el-button> <el-button v-auth="'课程管理:编辑信息'" type="text" @click="editCourse(scope.row)">编辑信息</el-button>
<el-divider v-if="auth('课程管理-编辑信息')" direction="vertical"></el-divider> <el-divider v-auth="'课程管理:编辑信息'" direction="vertical"></el-divider>
<el-button v-if="auth('课程管理-内容设置')" type="text" @click="config(scope.row)">内容设置</el-button> <el-button v-auth="'课程管理:内容设置'" type="text" @click="config(scope.row)">内容设置</el-button>
<el-divider v-if="auth('课程管理-内容设置')" direction="vertical"></el-divider> <el-divider v-auth="'课程管理:内容设置'" direction="vertical"></el-divider>
<el-button v-if="auth('课程管理-预览')" type="text" @click="preview(scope.row)">预览</el-button> <el-button v-auth="'课程管理:预览'" type="text" @click="preview(scope.row)">预览</el-button>
<el-divider v-if="auth('课程管理-预览')" direction="vertical"></el-divider> <el-divider v-auth="'课程管理:预览'" direction="vertical"></el-divider>
<el-button v-if="auth('课程管理-删除')" type="text" @click="handleDelete(scope.row)">删除</el-button> <el-button v-auth="'课程管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </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-switch <el-switch
v-if="auth('课程管理-禁用')" v-auth="'课程管理:禁用'"
v-model="scope.row.isEnable" v-model="scope.row.isEnable"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"

@ -6,9 +6,9 @@
</div> </div>
<div class="page-content"> <div class="page-content">
<!-- 课程管理 --> <!-- 课程管理 -->
<CourseManagement v-if="active == 'first' && auth('课程管理')" /> <CourseManagement v-if="active == 'first'" />
<!-- 分类管理 --> <!-- 分类管理 -->
<SortManagement v-if="active == 'second' && auth('分类管理')" /> <SortManagement v-if="active == 'second'" />
</div> </div>
</div> </div>
</template> </template>
@ -37,25 +37,23 @@ export default {
}, },
computed: { computed: {
...mapState("auth", [ ...mapState("auth", [
"routes" "btns"
]) ])
}, },
mounted() {
Setting.dynamicRoute && this.initTabs();
},
methods: { methods: {
tabChange(index) { tabChange(index) {
this.active = index; this.active = index;
}, },
initTabs() { initTabs() {
let showStaff = this.auth("课程管理"); const { btns } = this
let showRole = this.auth("分类管理"); const tab1 = btns.includes('/course/list:课程管理')
const tab2 = btns.includes('/course/list:分类管理')
if (!showStaff || !showRole) { tab1 || delete this.tabs.first
this.showTabs = false; tab2 || delete this.tabs.second
} }
!showStaff && showRole && (this.active = "second");
}
},
mounted() {
Setting.dynamicRoute && this.initTabs();
} }
}; };
</script> </script>

@ -6,7 +6,7 @@
</ul> </ul>
<div style="margin-top: 24px"> <div style="margin-top: 24px">
<el-button v-if="auth('分类管理-新增')" type="primary" round @click="addClass">新增</el-button> <el-button v-auth="'分类管理:新增'" type="primary" round @click="addClass">新增</el-button>
</div> </div>
</div> </div>
<el-table :data="classificationList" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table :data="classificationList" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
@ -19,9 +19,9 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="auth('分类管理-修改')" type="text" @click="editClass(scope.row)">修改</el-button> <el-button v-auth="'分类管理:修改'" type="text" @click="editClass(scope.row)">修改</el-button>
<el-divider v-if="auth('分类管理-修改')" direction="vertical"></el-divider> <el-divider v-auth="'分类管理:修改'" direction="vertical"></el-divider>
<el-button v-if="auth('分类管理-删除')" type="text" @click="handleDelete(scope.row)">删除</el-button> <el-button v-auth="'分类管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -12,9 +12,9 @@
<el-button class="action-btn" type="primary" round @click="sortSubmit">保存</el-button> <el-button class="action-btn" type="primary" round @click="sortSubmit">保存</el-button>
</template> </template>
<template v-if="!sorting"> <template v-if="!sorting">
<el-button v-if="auth('栏目管理-更改排序')" class="action-btn" type="primary" round @click="openSort">更改排序 <el-button v-auth="'栏目管理:更改排序'" class="action-btn" type="primary" round @click="openSort">更改排序
</el-button> </el-button>
<el-button v-if="auth('栏目管理-添加栏目')" class="action-btn" type="info" round @click="addColumn">添加栏目 <el-button v-auth="'栏目管理:添加栏目'" class="action-btn" type="info" round @click="addColumn">添加栏目
</el-button> </el-button>
</template> </template>
</div> </div>
@ -31,13 +31,13 @@
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span class="name">{{ node.label }}</span> <span class="name">{{ node.label }}</span>
<span class="action" v-show="!sorting"> <span class="action" v-show="!sorting">
<el-button v-if="auth('栏目管理-编辑')" type="text" @click.stop="editType(data)">编辑</el-button> <el-button v-auth="'栏目管理:编辑'" type="text" @click.stop="editType(data)">编辑</el-button>
<el-divider v-if="auth('栏目管理-编辑')" direction="vertical"></el-divider> <el-divider v-auth="'栏目管理:编辑'" direction="vertical"></el-divider>
<template v-if="node.level == 1"> <template v-if="node.level == 1">
<el-button v-if="auth('栏目管理-新增')" type="text" @click.stop="addType(data)">新增</el-button> <el-button v-auth="'栏目管理:新增'" type="text" @click.stop="addType(data)">新增</el-button>
<el-divider v-if="auth('栏目管理-新增')" direction="vertical"></el-divider> <el-divider v-auth="'栏目管理:新增'" direction="vertical"></el-divider>
</template> </template>
<el-button v-if="auth('栏目管理-删除')" type="text" @click.stop="delData(data)">删除</el-button> <el-button v-auth="'栏目管理:删除'" type="text" @click.stop="delData(data)">删除</el-button>
</span> </span>
</span> </span>
</el-tree> </el-tree>

@ -4,9 +4,9 @@
<!-- <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>--> <!-- <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>-->
<!-- </div>--> <!-- </div>-->
<div class="btn-wrap"> <div class="btn-wrap">
<el-button v-if="auth('内容管理-保存排序')" class="action-btn" type="primary" @click="sortSubmit">保存排序</el-button> <el-button v-auth="'内容管理:保存排序'" class="action-btn" type="primary" @click="sortSubmit">保存排序</el-button>
<el-button v-if="auth('内容管理-批量删除')" class="action-btn" type="primary" @click="delAllData">批量删除</el-button> <el-button v-auth="'内容管理:批量删除'" class="action-btn" type="primary" @click="delAllData">批量删除</el-button>
<el-button v-if="auth('内容管理-新增文章')" class="action-btn" type="info" @click="addArticle">新增文章</el-button> <el-button v-auth="'内容管理:新增文章'" class="action-btn" type="info" @click="addArticle">新增文章</el-button>
</div> </div>
<div class="page-content" style="padding-top: 24px"> <div class="page-content" style="padding-top: 24px">
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
@ -31,15 +31,15 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="170"> <el-table-column label="操作" align="center" width="170">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="auth('内容管理-编辑')" type="text" @click="editArticle(scope)">编辑</el-button> <el-button v-auth="'内容管理:编辑'" type="text" @click="editArticle(scope)">编辑</el-button>
<el-divider v-if="auth('内容管理-编辑')" direction="vertical"></el-divider> <el-divider v-auth="'内容管理:编辑'" direction="vertical"></el-divider>
<el-button v-if="auth('内容管理-删除')" type="text" @click="delData(scope.row)">删除</el-button> <el-button v-auth="'内容管理:删除'" type="text" @click="delData(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="文章发布状态" width="120" align="center"> <el-table-column prop="name" label="文章发布状态" width="120" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-if="auth('内容管理-禁用')" v-auth="'内容管理:禁用'"
class="off" class="off"
v-model="scope.row.status" v-model="scope.row.status"
:active-value="0" :active-value="0"

@ -2,11 +2,11 @@
<!-- 资讯管理 --> <!-- 资讯管理 -->
<div class="page"> <div class="page">
<el-tabs v-model="tabsName" tab-position="left" @tab-click="handleClick"> <el-tabs v-model="tabsName" tab-position="left" @tab-click="handleClick">
<el-tab-pane name="1" v-if="auth('栏目管理')"> <el-tab-pane name="1" v-auth="'栏目管理'">
<span slot="label"><i class="el-icon-collection-tag"></i> 栏目管理</span> <span slot="label"><i class="el-icon-collection-tag"></i> 栏目管理</span>
<columnManage v-if="tabsName === '1'" /> <columnManage v-if="tabsName === '1'" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="2" v-if="auth('内容管理')"> <el-tab-pane name="2" v-auth="'内容管理'">
<span slot="label"><i class="el-icon-document"></i> 内容管理</span> <span slot="label"><i class="el-icon-document"></i> 内容管理</span>
<ContentManage v-if="tabsName === '2'" /> <ContentManage v-if="tabsName === '2'" />
</el-tab-pane> </el-tab-pane>

@ -135,8 +135,8 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button v-if="!form.id" @click="save(0)">保存</el-button> <el-button v-if="!form.id" @click="save(0)">保存</el-button>
<el-button type="primary" @click="save(1)">发布</el-button> <el-button type="primary" @click="save(1)" v-auth="'/match:管理:大赛详情:发布'">发布</el-button>
<el-button type="danger" @click="preview">预览</el-button> <el-button type="danger" @click="preview" v-auth="'/match:管理:大赛详情:预览'">预览</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>

@ -69,13 +69,13 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="170"> <el-table-column label="操作" align="center" width="170">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="auth('管理')" type="text" @click="manage(scope.row)">管理</el-button> <el-button v-auth type="text" @click="manage(scope.row)">管理</el-button>
<el-divider v-if="auth('管理')" direction="vertical"></el-divider> <el-divider v-auth="'管理'" direction="vertical"></el-divider>
<el-button v-if="auth('删除')" type="text" @click="delData(scope.row)">删除</el-button> <el-button v-auth type="text" @click="delData(scope.row)">删除</el-button>
<!-- 列表展示中台的禁启用依据zt_open展示职站的禁启用依据is_open展示 --> <!-- 列表展示中台的禁启用依据zt_open展示职站的禁启用依据is_open展示 -->
<!-- 中台禁用了这个学校发布的学校这边还能看到但是学校这边不能启用 --> <!-- 中台禁用了这个学校发布的学校这边还能看到但是学校这边不能启用 -->
<el-switch <el-switch
v-if="auth('禁用')" v-auth="'禁用'"
v-model="scope.row.isOpen" v-model="scope.row.isOpen"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"

@ -24,6 +24,7 @@
</template> </template>
<script> <script>
import Setting from "@/setting";
import MatchDetail from "../add"; import MatchDetail from "../add";
import MatchProgress from "./matchProgress"; import MatchProgress from "./matchProgress";
import notice from "./notice"; import notice from "./notice";
@ -46,6 +47,9 @@ export default {
computed: { computed: {
...mapState("user", [ ...mapState("user", [
'page' 'page'
]),
...mapState('auth', [
'btns'
]) ])
}, },
components: { components: {
@ -54,7 +58,25 @@ export default {
notice, notice,
MatchSignup MatchSignup
}, },
mounted() {
Setting.dynamicRoute && this.initTabs()
},
methods: { methods: {
initTabs() {
const { btns } = this
const tab1 = btns.includes('/match/list:管理:大赛详情')
const tab2 = btns.includes('/match/list:管理:竞赛进展')
const tab3 = btns.includes('/match/list:管理:公告通知')
const tab4 = btns.includes('/match/list:管理:报名人员')
tab1 || delete this.tabs.first
tab2 || delete this.tabs.second
tab3 || delete this.tabs.third
tab4 || delete this.tabs.fourth
const type = this.$route.query.tab
const keys = Object.keys(this.tabs)
this.active = keys.includes(type) ? type : keys[0]
},
back() { back() {
this.handleSave(0) && this.backPage() this.handleSave(0) && this.backPage()
}, },

@ -26,13 +26,13 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="170"> <el-table-column label="操作" align="center" width="170">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="!scope.row.operate" type="text" @click="operateIt(scope.row)">编辑</el-button> <el-button v-if="!scope.row.operate" type="text" @click="operateIt(scope.row)" v-auth="'/match:管理:竞赛进展:编辑'">编辑</el-button>
<el-button v-else type="text" @click="saveData(scope.row)">保存</el-button> <el-button v-else type="text" @click="saveData(scope.row)">保存</el-button>
<el-button type="text" @click="handleDelete(scope.row, scope.$index)">删除</el-button> <el-button type="text" @click="handleDelete(scope.row, scope.$index)" v-auth="'/match:管理:竞赛进展:删除'">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="plus" @click="addData"> <div class="plus" @click="addData" v-auth="'/match:管理:竞赛进展:新增'">
<i class="el-icon-circle-plus-outline"></i> <i class="el-icon-circle-plus-outline"></i>
</div> </div>
</div> </div>

@ -9,7 +9,7 @@
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" round @click="exportAll">导出</el-button> <el-button type="primary" round @click="exportAll" v-auth="'/match:管理:报名人员:导出'">导出</el-button>
</div> </div>
</div> </div>

@ -2,7 +2,7 @@
<!-- 报名人员 --> <!-- 报名人员 -->
<div class="page-content" style="padding: 24px"> <div class="page-content" style="padding: 24px">
<div class="tool" style="justify-content: flex-end"> <div class="tool" style="justify-content: flex-end">
<el-button type="primary" round @click="add">新增</el-button> <el-button type="primary" round @click="add" v-auth="'/match:管理:公告通知:新增'">新增</el-button>
</div> </div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
@ -24,9 +24,10 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250"> <el-table-column label="操作" align="center" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)">编辑</el-button> <el-button type="text" @click="edit(scope.row)" v-auth="'/match:管理:公告通知:编辑'">编辑</el-button>
<el-button type="text" @click="del(scope.row)">删除</el-button> <el-button type="text" @click="del(scope.row)" v-auth="'/match:管理:公告通知:删除'">删除</el-button>
<el-switch <el-switch
v-auth="'/match:管理:公告通知:启用'"
v-model="scope.row.isOpen" v-model="scope.row.isOpen"
:active-text="scope.row.isOpen ? '关' : '开'" :active-text="scope.row.isOpen ? '关' : '开'"
:active-value="0" :active-value="0"

@ -38,8 +38,8 @@
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button v-if="!form.id" @click="save(0)">草稿</el-button> <el-button v-if="!form.id" @click="save(0)" v-auth="'/match:管理:公告通知:草稿'">草稿</el-button>
<el-button type="primary" @click="save(1)">发布</el-button> <el-button type="primary" @click="save(1)" v-auth="'/match:管理:公告通知:发布'">发布</el-button>
<el-button @click="back">取消</el-button> <el-button @click="back">取消</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>

@ -67,8 +67,8 @@
</li> </li>
</ul> </ul>
<div> <div>
<el-button v-if="auth('新增项目')" type="info" @click="add">新增项目</el-button> <el-button v-auth type="info" @click="add">新增项目</el-button>
<el-button v-if="auth('批量删除')" type="primary" @click="delAllData">批量删除</el-button> <el-button v-auth type="primary" @click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
@ -100,9 +100,10 @@
<el-button type="text" @click="edit(scope.row, 1)">查看</el-button> <el-button type="text" @click="edit(scope.row, 1)">查看</el-button>
<el-button v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" type="text" @click="edit(scope.row)">编辑</el-button> <el-button v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" type="text" @click="handleDelete(scope.row.projectId)">删除</el-button> <el-button v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" type="text" @click="handleDelete(scope.row.projectId)">删除</el-button>
<el-button v-if="auth('复制')" type="text" @click="copyData(scope.row.projectId)">复制</el-button> <el-button v-auth type="text" @click="copyData(scope.row.projectId)">复制</el-button>
<el-switch <el-switch
v-if="auth('禁用') && scope.row.state" v-auth="'禁用'"
v-if="scope.row.state"
v-model="scope.row.ccupationlabOpen" v-model="scope.row.ccupationlabOpen"
:active-text="scope.row.ccupationlabOpen ? '关闭' : '启用'" :active-text="scope.row.ccupationlabOpen ? '关闭' : '启用'"
:active-value="0" :active-value="0"

@ -14,7 +14,7 @@ export default {
component: BasicLayout, component: BasicLayout,
children: [ children: [
{ {
name: `${pre}person`, name: `${pre}list`,
path: `list`, path: `list`,
component: () => import("@/pages/station/list"), component: () => import("@/pages/station/list"),
meta: { title: "实验台" } meta: { title: "实验台" }

Loading…
Cancel
Save