|
|
|
@ -1,3 +1,11 @@
|
|
|
|
|
<!--
|
|
|
|
|
* @Author: lijingjia lijj_xl@163.com
|
|
|
|
|
* @Date: 2024-07-03 09:12:56
|
|
|
|
|
* @LastEditors: lijingjia lijj_xl@163.com
|
|
|
|
|
* @LastEditTime: 2024-07-03 16:13:54
|
|
|
|
|
* @FilePath: \ds-admin-web\ds-wms-admin-web\src\views\system\permission\index.vue
|
|
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<PageWrapper contentClass="flex">
|
|
|
|
|
<a-card :bordered="false" class="w-1/2 menu">
|
|
|
|
@ -22,13 +30,17 @@
|
|
|
|
|
</a-card>
|
|
|
|
|
<a-card title="权限信息" :bordered="false" class="w-1/2 menu" style="margin-left: 10px">
|
|
|
|
|
<BasicForm @register="registerForm" />
|
|
|
|
|
<div style="text-align: right; position: relative; top: -30px; right: 30px;">
|
|
|
|
|
<a-button style="margin-right: 10px;" type="primary" @click="updatePermissions">更新权限</a-button>
|
|
|
|
|
<a-button type="primary" @click="customSaveFunc">保存</a-button>
|
|
|
|
|
</div>
|
|
|
|
|
</a-card>
|
|
|
|
|
</PageWrapper>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { defineComponent, onMounted, ref, unref } from 'vue'
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
|
import { getPermissionTreeList, getPermission, editPermission } from '/@/api/system/permission'
|
|
|
|
|
import { getPermissionTreeList, getPermission, editPermission, updatePermission } from '/@/api/system/permission'
|
|
|
|
|
import { BasicTree } from '/@/components/Tree/index'
|
|
|
|
|
import { PageWrapper } from '/@/components/Page'
|
|
|
|
|
import { formSchema } from './columns'
|
|
|
|
@ -72,13 +84,14 @@
|
|
|
|
|
offset: 20,
|
|
|
|
|
},
|
|
|
|
|
showResetButton: false,
|
|
|
|
|
submitButtonOptions: {
|
|
|
|
|
preIcon: 'ant-design:save-outlined',
|
|
|
|
|
type: 'warning',
|
|
|
|
|
text: '保存',
|
|
|
|
|
},
|
|
|
|
|
submitFunc: customSaveFunc,
|
|
|
|
|
// showActionButtonGroup: false,
|
|
|
|
|
showSubmitButton: false
|
|
|
|
|
// submitButtonOptions: {
|
|
|
|
|
// preIcon: 'ant-design:save-outlined',
|
|
|
|
|
// type: 'warning',
|
|
|
|
|
// text: '保存',
|
|
|
|
|
// },
|
|
|
|
|
// submitFunc: customSaveFunc,
|
|
|
|
|
// showActionButtonGroup: true,
|
|
|
|
|
})
|
|
|
|
|
function handleSelect(checkedKeys, event) {
|
|
|
|
|
if (!event.selected) {
|
|
|
|
@ -99,6 +112,16 @@
|
|
|
|
|
// setFieldsValue({ ...event.selectedNodes[0] });
|
|
|
|
|
// expose.doRefresh();
|
|
|
|
|
}
|
|
|
|
|
async function updatePermissions() {
|
|
|
|
|
const value = await validate()
|
|
|
|
|
console.log(value)
|
|
|
|
|
const postData = {
|
|
|
|
|
id: value.id
|
|
|
|
|
}
|
|
|
|
|
updatePermission(postData).then(res => {
|
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
async function customSaveFunc() {
|
|
|
|
|
try {
|
|
|
|
|
await validate()
|
|
|
|
|