权限修复

dev_2022-06-14
yujialong 2 years ago
parent cc375077da
commit 2406d68a83
  1. 12
      src/pages/match/add/index.vue
  2. 6
      src/pages/match/manage/matchProgress.vue
  3. 4
      src/pages/match/manage/matchSignup.vue
  4. 8
      src/pages/match/manage/notice.vue
  5. 4
      src/pages/match/manage/noticeDetail.vue
  6. 2
      src/plugins/auth/index.js

@ -149,10 +149,7 @@
:props="props"
:show-all-levels="false"
clearable
filterable
:before-filter="beforeFilter"
:options="rangeList"
@input.native="rangeSearch"></el-cascader>
filterable></el-cascader>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="rangeVisible = false"> </el-button>
<el-button size="small" type="primary" @click="rangeSubmit"> </el-button>
@ -215,9 +212,6 @@ export default {
checkStrictly: true,
lazy: true,
lazyLoad (node, resolve) {
//
const input = document.querySelector('.el-cascader__search-input')
if (input && input.value) return false
const { level, value } = node
//
if (!level) {
@ -309,7 +303,7 @@ export default {
},
mounted() {
this.getData()
this.getSchool()
// this.getSchool()
},
methods: {
getData() {
@ -430,7 +424,7 @@ export default {
const data = {
contestId: id || '',
fileName: this.fileName,
filePath: file.fileUrl
filePath: file.fileUrl || file.fileId
}
this.form.contestAnnexList.push(data)
//

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

@ -9,7 +9,7 @@
</li>
</ul>
<div>
<el-button type="primary" round @click="exportAll" v-auth="'/match:管理:报名人员:导出'">导出</el-button>
<el-button type="primary" round @click="exportAll" v-auth="'/match/list:管理:报名人员:全部导出'">导出</el-button>
</div>
</div>
@ -24,7 +24,7 @@
</el-table-column>
<el-table-column prop="username" label="学生姓名">
</el-table-column>
<el-table-column prop="account" label="学号">
<el-table-column prop="workNumber" label="学号">
</el-table-column>
<el-table-column prop="phone" label="手机号">
</el-table-column>

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

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

@ -9,7 +9,7 @@ export default {
inserted(el, binding, vnode) {
const val = binding.value
// 如果有传值,就取传的值,否则,就取按钮名字
const text = vnode.context.$route.path + ':' + (val || el.innerText)
const text = val.includes('/') ? val : vnode.context.$route.path + ':' + (val || el.innerText)
const { btns } = store.state.auth
if (text && btns && btns.length) {
// 如果按钮集合里没有该权限,就把该按钮给去除

Loading…
Cancel
Save