|
@@ -56,18 +56,20 @@
|
|
|
>
|
|
>
|
|
|
<template slot="status" slot-scope="text, record">
|
|
<template slot="status" slot-scope="text, record">
|
|
|
<a-switch
|
|
<a-switch
|
|
|
|
|
+ v-if="JSPermission(['pc:system:role:edit'])"
|
|
|
:checked="record.status==='1'?false:true"
|
|
:checked="record.status==='1'?false:true"
|
|
|
checked-children="启用"
|
|
checked-children="启用"
|
|
|
un-checked-children="停用"
|
|
un-checked-children="停用"
|
|
|
@change="changeStatus({$event,record})"
|
|
@change="changeStatus({$event,record})"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <span v-else>{{ record.status==='1'?'停用':'启用' }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
<span slot="action" slot-scope="text, record">
|
|
<span slot="action" slot-scope="text, record">
|
|
|
<a-button v-permission="['pc:system:role:edit']" size="small" type="primary" @click="handleEdit(record)">
|
|
<a-button v-permission="['pc:system:role:edit']" size="small" type="primary" @click="handleEdit(record)">
|
|
|
编辑
|
|
编辑
|
|
|
</a-button>
|
|
</a-button>
|
|
|
<a-divider type="vertical" />
|
|
<a-divider type="vertical" />
|
|
|
- <a-button size="small" type="primary" @click="prem(record)">
|
|
|
|
|
|
|
+ <a-button v-permission="['pc:system:role:permission']" size="small" type="primary" @click="prem(record)">
|
|
|
操作权限
|
|
操作权限
|
|
|
</a-button>
|
|
</a-button>
|
|
|
<a-divider type="vertical" />
|
|
<a-divider type="vertical" />
|
|
@@ -95,6 +97,7 @@ import columns from './indexColumns'
|
|
|
import CheckAndEditModel from './CheckAndEditModel'
|
|
import CheckAndEditModel from './CheckAndEditModel'
|
|
|
import rightModel from '@/components/RightModel'
|
|
import rightModel from '@/components/RightModel'
|
|
|
import { httpAction } from '@/api/request'
|
|
import { httpAction } from '@/api/request'
|
|
|
|
|
+import JSPermission from '@/utils/JSPermission'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -121,6 +124,7 @@ export default {
|
|
|
created() {
|
|
created() {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ JSPermission,
|
|
|
changeStatus({ $event, record }) {
|
|
changeStatus({ $event, record }) {
|
|
|
console.log($event, record)
|
|
console.log($event, record)
|
|
|
record.status = $event ? '0' : '1'
|
|
record.status = $event ? '0' : '1'
|