权限配对

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, isDev,
isPro, isPro,
// 是否使用动态路由 // 是否使用动态路由
dynamicRoute: false, dynamicRoute: true,
/** /**
* @description 默认密码 * @description 默认密码
*/ */

@ -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>
@ -214,9 +214,12 @@ export default {
checkStrictly: true, checkStrictly: true,
lazy: true, lazy: true,
lazyLoad (node, resolve) { lazyLoad (node, resolve) {
//
const input = document.querySelector('.el-cascader__search-input') 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 const { level, value } = node
// console.log("🚀 ~ file: index.vue ~ line 221 ~ lazyLoad ~ level", node)
// //
if (!level) { if (!level) {
that.$get(that.api.queryProvince).then(({ list }) => { that.$get(that.api.queryProvince).then(({ list }) => {
@ -365,8 +368,15 @@ export default {
// //
getSchool() { getSchool() {
this.$get(this.api.querySchoolData).then(({ list }) => { this.$get(this.api.querySchoolData).then(({ list }) => {
list.map(e => e.label = e.schoolName) const result = []
this.schools = list list.map(e => {
result.push({
value: e.schoolId,
label: e.schoolName,
leaf: true
})
})
this.schools = result
}).catch(res => {}) }).catch(res => {})
}, },
// //
@ -378,7 +388,7 @@ export default {
clearTimeout(this.rangeTimer) clearTimeout(this.rangeTimer)
this.rangeTimer = setTimeout(() => { this.rangeTimer = setTimeout(() => {
const val = el.target.value 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 : [] this.rangeList = val ? result : []
}, 500) }, 500)
}, },
@ -425,10 +435,15 @@ export default {
// //
uploadAnnexSuccess(res) { uploadAnnexSuccess(res) {
const file = res.data.filesResult const file = res.data.filesResult
this.form.contestAnnexList.push({ const { id } = this.form
const data = {
contestId: id || '',
fileName: this.fileName, 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) { beforeUpload(file) {

@ -40,7 +40,7 @@
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" round @click="add">创建竞赛</el-button> <el-button type="primary" round @click="add" v-auth>创建竞赛</el-button>
</div> </div>
</div> </div>
@ -76,10 +76,10 @@
<el-table-column prop="createTime" label="创建时间" align="center" width="160"></el-table-column> <el-table-column prop="createTime" label="创建时间" align="center" width="160"></el-table-column>
<el-table-column label="操作" align="center" width="180"> <el-table-column label="操作" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="manage(scope.row)">管理</el-button> <el-button type="text" @click="manage(scope.row)" v-auth>管理</el-button>
<el-divider direction="vertical"></el-divider> <el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button>
<el-button type="text" @click="delData(scope.row)">删除</el-button>
<el-switch <el-switch
v-auth="'/match:启用'"
v-model="scope.row.ztOpen" v-model="scope.row.ztOpen"
: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";
@ -49,9 +50,24 @@ export default {
MatchSignup MatchSignup
}, },
mounted() { mounted() {
Setting.dynamicRoute && this.initTabs()
}, },
methods: { 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() { 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>

@ -330,7 +330,7 @@
</div> </div>
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input disabled v-model="scope.row.marketValue" placeholder="" <el-input disabled v-model="scope.row.marketValue" placeholder=""
@ -339,7 +339,7 @@
</div> </div>
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="scope.row.finalValue === '' && whetherSubmit?'red':''" <el-input :class="scope.row.finalValue === '' && whetherSubmit?'red':''"

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

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

@ -8,8 +8,8 @@
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" round @click="addRole" 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="'/system:角色权限:批量删除'">批量删除</el-button> <el-button type="primary" round @click="delAllSelection" v-auth="'/parner:pc角色权限:批量删除'">批量删除</el-button>
</div> </div>
</div> </div>
@ -24,9 +24,9 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" width="200">
<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="'/parner:pc角色权限:查看'">查看</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 !== '超级管理员'" 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="'/system:角色权限:删除'">删除</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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -17,7 +17,7 @@
<div> <div>
<div class="flex-between"> <div class="flex-between">
<h6 class="p-title" style="margin-bottom: 0">组织架构</h6> <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>
<div style="height: 504px; max-height: 504px; overflow: auto"> <div style="height: 504px; max-height: 504px; overflow: auto">
@ -36,20 +36,20 @@
<span> <span>
<!-- isTeam 0: 分类1: 团队 --> <!-- isTeam 0: 分类1: 团队 -->
<el-button <el-button
v-auth="'/system:后台账号:新增部门'" v-auth="'/parner:账号管理:添加分类'"
v-if="!data.isTeam" v-if="!data.isTeam"
type="text" type="text"
icon="el-icon-circle-plus-outline" icon="el-icon-circle-plus-outline"
@click="() => addOrg(node, data)"> @click="() => addOrg(node, data)">
</el-button> </el-button>
<el-button <el-button
v-auth="'/system:后台账号:编辑部门'" v-auth="'/parner:账号管理:编辑分类'"
type="text" type="text"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
@click="() => editOrg(node, data)"> @click="() => editOrg(node, data)">
</el-button> </el-button>
<el-button <el-button
v-auth="'/system:后台账号:删除部门'" v-auth="'/parner:账号管理:删除分类'"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="() => delOrg(node, data)"> @click="() => delOrg(node, data)">
@ -100,7 +100,7 @@
</li> </li>
</ul> </ul>
<div> <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>
</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 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"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-auth="'/system:后台账号:重置密码'" @click="resetPassword(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="'/system:后台账号:删除'" @click="del(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="'/system:后台账号:删除'" @click="transfer(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="'/system:后台账号:删除'" @click="remove(scope.row)">移除</el-button> <el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'" @click="remove(scope.row)">移除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -17,7 +17,7 @@
<div> <div>
<div class="flex-between"> <div class="flex-between">
<h6 class="p-title" style="margin-bottom: 0">组织架构</h6> <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>
<div style="height: 504px; max-height: 504px; overflow: auto"> <div style="height: 504px; max-height: 504px; overflow: auto">

Loading…
Cancel
Save