权限配对

dev_2022-06-14
yujialong 2 years ago
parent 0e5454378a
commit 4fd0048112
  1. 2
      src/setting.js
  2. 33
      src/views/match/add/index.vue
  3. 8
      src/views/match/list/index.vue
  4. 18
      src/views/match/manage/index.vue
  5. 6
      src/views/match/manage/matchProgress.vue
  6. 2
      src/views/match/manage/matchSignup.vue
  7. 7
      src/views/match/manage/notice.vue
  8. 4
      src/views/match/manage/noticeDetail.vue
  9. 4
      src/views/order/AddOrder.vue
  10. 10
      src/views/parner/index.vue
  11. 10
      src/views/parner/mobileRole.vue
  12. 10
      src/views/parner/pcRole.vue
  13. 18
      src/views/parner/staff.vue
  14. 2
      src/views/system/staff.vue

@ -43,7 +43,7 @@ const Setting = {
isDev,
isPro,
// 是否使用动态路由
dynamicRoute: false,
dynamicRoute: true,
/**
* @description 默认密码
*/

@ -135,8 +135,8 @@
</el-form-item>
<el-form-item>
<el-button v-if="!form.id" @click="save(0)">保存</el-button>
<el-button type="primary" @click="save(1)">发布</el-button>
<el-button type="danger" @click="preview">预览</el-button>
<el-button type="primary" @click="save(1)" v-auth="'/match:管理:大赛详情:发布'">发布</el-button>
<el-button type="danger" @click="preview" v-auth="'/match:管理:大赛详情:预览'">预览</el-button>
</el-form-item>
</el-form>
</div>
@ -214,9 +214,12 @@ export default {
checkStrictly: true,
lazy: true,
lazyLoad (node, resolve) {
//
const input = document.querySelector('.el-cascader__search-input')
if (input && input.value) return false
console.log("🚀 ~ file: index.vue ~ line 219 ~ lazyLoad ~ input", input, node)
if (input && input.value) return resolve([])
const { level, value } = node
// console.log("🚀 ~ file: index.vue ~ line 221 ~ lazyLoad ~ level", node)
//
if (!level) {
that.$get(that.api.queryProvince).then(({ list }) => {
@ -365,8 +368,15 @@ export default {
//
getSchool() {
this.$get(this.api.querySchoolData).then(({ list }) => {
list.map(e => e.label = e.schoolName)
this.schools = list
const result = []
list.map(e => {
result.push({
value: e.schoolId,
label: e.schoolName,
leaf: true
})
})
this.schools = result
}).catch(res => {})
},
//
@ -378,7 +388,7 @@ export default {
clearTimeout(this.rangeTimer)
this.rangeTimer = setTimeout(() => {
const val = el.target.value
let result = this.schools.filter(e => e.schoolName.includes(val)) //
let result = this.schools.filter(e => e.label.includes(val)) //
this.rangeList = val ? result : []
}, 500)
},
@ -425,10 +435,15 @@ export default {
//
uploadAnnexSuccess(res) {
const file = res.data.filesResult
this.form.contestAnnexList.push({
const { id } = this.form
const data = {
contestId: id || '',
fileName: this.fileName,
filePath: file.fileUrl || file.fileId
})
filePath: file.fileUrl
}
this.form.contestAnnexList.push(data)
//
id && this.$post(this.api.saveAnnex, data).then(res => {}).catch(res => {})
},
//
beforeUpload(file) {

@ -40,7 +40,7 @@
</li>
</ul>
<div>
<el-button type="primary" round @click="add">创建竞赛</el-button>
<el-button type="primary" round @click="add" v-auth>创建竞赛</el-button>
</div>
</div>
@ -76,10 +76,10 @@
<el-table-column prop="createTime" label="创建时间" align="center" width="160"></el-table-column>
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button type="text" @click="manage(scope.row)">管理</el-button>
<el-divider direction="vertical"></el-divider>
<el-button type="text" @click="delData(scope.row)">删除</el-button>
<el-button type="text" @click="manage(scope.row)" v-auth>管理</el-button>
<el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button>
<el-switch
v-auth="'/match:启用'"
v-model="scope.row.ztOpen"
:active-value="0"
:inactive-value="1"

@ -24,6 +24,7 @@
</template>
<script>
import Setting from "@/setting";
import MatchDetail from "../add";
import MatchProgress from "./matchProgress";
import notice from "./notice";
@ -49,9 +50,24 @@ export default {
MatchSignup
},
mounted() {
Setting.dynamicRoute && this.initTabs()
},
methods: {
initTabs() {
const btns = this.$store.state.btns
const tab1 = btns.includes('/match:管理:大赛详情')
const tab2 = btns.includes('/match:管理:竞赛进展')
const tab3 = btns.includes('/match:管理:公告通知')
const tab4 = btns.includes('/match:管理:报名人员')
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.type
const keys = Object.keys(this.tabs)
this.active = keys.includes(type) ? type : keys[0]
},
back() {
this.handleSave(0) && this.backPage()
},

@ -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)">编辑</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 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>
</el-table-column>
</el-table>
<div class="plus" @click="addData">
<div class="plus" @click="addData" v-auth="'/match:管理:竞赛进展:新增'">
<i class="el-icon-circle-plus-outline"></i>
</div>
</div>

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

@ -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">新增</el-button>
<el-button type="primary" round @click="add" v-auth="'/match:管理:公告通知:新增'">新增</el-button>
</div>
<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 label="操作" align="center" width="250">
<template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" @click="del(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)" v-auth="'/match:管理:公告通知:删除'">删除</el-button>
<el-switch
v-auth="'/match:管理:公告通知:启用'"
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)">草稿</el-button>
<el-button type="primary" @click="save(1)">发布</el-button>
<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 @click="back">取消</el-button>
</el-form-item>
</el-form>

@ -330,7 +330,7 @@
</div>
</template>
</el-table-column>
<el-table-column label="市场单价" align="center" min-width="160">
<el-table-column label="市场单价" align="center" min-width="170">
<template slot-scope="scope">
<div class="small">
<el-input disabled v-model="scope.row.marketValue" placeholder=""
@ -339,7 +339,7 @@
</div>
</template>
</el-table-column>
<el-table-column label="成交单价" align="center" min-width="170">
<el-table-column label="成交单价" align="center" min-width="180">
<template slot-scope="scope">
<div class="small">
<el-input :class="scope.row.finalValue === '' && whetherSubmit?'red':''"

@ -11,6 +11,7 @@
</template>
<script>
import Setting from "@/setting";
import staff from "./staff";
import pcRole from "./pcRole";
import mobileRole from "./mobileRole";
@ -31,7 +32,7 @@ export default {
mobileRole
},
created() {
// Setting.dynamicRoute && this.initTabs();
Setting.dynamicRoute && this.initTabs();
},
methods: {
tabChange(index) {
@ -46,10 +47,13 @@ export default {
},
initTabs() {
const btns = this.$store.state.btns
const tab1 = btns.includes('/system:账号管理')
const tab2 = btns.includes('/system:角色权限')
const tab1 = btns.includes('/parner:账号管理')
const tab2 = btns.includes('/parner:pc角色权限')
const tab3 = btns.includes('/parner:小程序角色权限')
tab1 || delete this.tabs.staff
tab2 || delete this.tabs.pcRole
tab3 || delete this.tabs.mobileRole
const type = this.$route.query.type
const keys = Object.keys(this.tabs)
this.active = keys.includes(type) ? type : keys[0]

@ -8,8 +8,8 @@
</li>
</ul>
<div>
<el-button type="primary" round @click="addRole" v-auth="'/system:角色权限:新增角色'">新增角色</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth="'/system:角色权限:批量删除'">批量删除</el-button>
<el-button type="primary" round @click="addRole" v-auth="'/parner:小程序角色权限:新增角色'">新增角色</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth="'/parner:小程序角色权限:批量删除'">批量删除</el-button>
</div>
</div>
@ -24,9 +24,9 @@
</el-table-column>
<el-table-column label="操作" align="center" width="200">
<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 v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)" v-auth="'/system:角色权限:删除'">删除</el-button>
<el-button type="text" @click="showRole(scope.row)" v-auth="'/parner:小程序角色权限:查看'">查看</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)" v-auth="'/parner:小程序角色权限:编辑'">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)" v-auth="'/parner:小程序角色权限:删除'">删除</el-button>
</template>
</el-table-column>
</el-table>

@ -8,8 +8,8 @@
</li>
</ul>
<div>
<el-button type="primary" round @click="addRole" v-auth="'/system:角色权限:新增角色'">新增角色</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth="'/system:角色权限:批量删除'">批量删除</el-button>
<el-button type="primary" round @click="addRole" v-auth="'/parner:pc角色权限:新增角色'">新增角色</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth="'/parner:pc角色权限:批量删除'">批量删除</el-button>
</div>
</div>
@ -24,9 +24,9 @@
</el-table-column>
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'/system:角色权限:查看'">查看</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)" v-auth="'/system:角色权限:编辑'">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)" v-auth="'/system:角色权限:删除'">删除</el-button>
<el-button type="text" @click="showRole(scope.row)" v-auth="'/parner:pc角色权限:查看'">查看</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)" v-auth="'/parner:pc角色权限:编辑'">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)" v-auth="'/parner:pc角色权限:删除'">删除</el-button>
</template>
</el-table-column>
</el-table>

@ -17,7 +17,7 @@
<div>
<div class="flex-between">
<h6 class="p-title" style="margin-bottom: 0">组织架构</h6>
<el-button type="text" @click="addOrg">添加分类</el-button>
<el-button type="text" @click="addOrg" v-auth="'/parner:账号管理:添加分类'">添加分类</el-button>
</div>
<div style="height: 504px; max-height: 504px; overflow: auto">
@ -36,20 +36,20 @@
<span>
<!-- isTeam 0: 分类1: 团队 -->
<el-button
v-auth="'/system:后台账号:新增部门'"
v-auth="'/parner:账号管理:添加分类'"
v-if="!data.isTeam"
type="text"
icon="el-icon-circle-plus-outline"
@click="() => addOrg(node, data)">
</el-button>
<el-button
v-auth="'/system:后台账号:编辑部门'"
v-auth="'/parner:账号管理:编辑分类'"
type="text"
icon="el-icon-edit-outline"
@click="() => editOrg(node, data)">
</el-button>
<el-button
v-auth="'/system:后台账号:删除部门'"
v-auth="'/parner:账号管理:删除分类'"
type="text"
icon="el-icon-delete"
@click="() => delOrg(node, data)">
@ -100,7 +100,7 @@
</li>
</ul>
<div>
<el-button type="primary" @click="add(0)" v-auth="'/system:后台账号:新增员工'">添加城市合伙人</el-button>
<el-button type="primary" @click="add(0)" v-auth="'/parner:账号管理:添加城市合伙人'">添加城市合伙人</el-button>
</div>
</div>
@ -114,10 +114,10 @@
<el-table-column v-if="!type" prop="roleName" label="授权角色" align="center" min-width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button type="text" v-auth="'/system:后台账号:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button v-if="type" type="text" v-auth="'/system:后台账号:删除'" @click="del(scope.row)">删除</el-button>
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/system:后台账号:删除'" @click="transfer(scope.row)">转让超管</el-button>
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/system:后台账号:删除'" @click="remove(scope.row)">移除</el-button>
<el-button type="text" v-auth="'/parner:账号管理:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button v-if="type" type="text" v-auth="'/parner:账号管理:删除合伙人'" @click="del(scope.row)">删除</el-button>
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'" @click="transfer(scope.row)">转让超管</el-button>
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'" @click="remove(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table>

@ -17,7 +17,7 @@
<div>
<div class="flex-between">
<h6 class="p-title" style="margin-bottom: 0">组织架构</h6>
<el-button type="text" @click="addOrg">添加</el-button>
<el-button type="text" @click="addOrg" v-auth="'/system:后台账号:新增部门'">添加</el-button>
</div>
<div style="height: 504px; max-height: 504px; overflow: auto">

Loading…
Cancel
Save