|
|
@@ -69,11 +69,13 @@
|
|
|
</template>
|
|
|
<template slot="status" slot-scope="text, record">
|
|
|
<a-switch
|
|
|
+ v-if="JSPermission(['pc:system:menu:edit'])"
|
|
|
:checked="record.status==='1'?false:true"
|
|
|
checked-children="启用"
|
|
|
un-checked-children="停用"
|
|
|
@change="changeStatus({$event,record})"
|
|
|
/>
|
|
|
+ <span v-else>{{ record.status==='1'?'停用':'启用' }}</span>
|
|
|
</template>
|
|
|
<span slot="action" slot-scope="text, record">
|
|
|
<a-button v-permission="['pc:system:menu:edit']" size="small" type="primary" @click="handleEdit(record)">
|
|
|
@@ -102,6 +104,7 @@ import { listMixin } from '@/mixin/listMixin'
|
|
|
import columns from './indexColumns'
|
|
|
import CheckAndEditModel from './CheckAndEditModel'
|
|
|
import { httpAction } from '@/api/request'
|
|
|
+import JSPermission from '@/utils/JSPermission'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -123,10 +126,11 @@ export default {
|
|
|
created() {
|
|
|
},
|
|
|
methods: {
|
|
|
+ JSPermission,
|
|
|
changeStatus({ $event, record }) {
|
|
|
console.log($event, record)
|
|
|
record.status = $event ? '0' : '1'
|
|
|
- httpAction('/system/dept', record, 'put').then((res) => {
|
|
|
+ httpAction('/system/menu', record, 'put').then((res) => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message.success(res.msg)
|
|
|
} else {
|