|
|
@ -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>
|
|
|
|
<template>
|
|
|
|
<PageWrapper contentClass="flex">
|
|
|
|
<PageWrapper contentClass="flex">
|
|
|
|
<a-card :bordered="false" class="w-1/2 menu">
|
|
|
|
<a-card :bordered="false" class="w-1/2 menu">
|
|
|
@ -22,13 +30,17 @@
|
|
|
|
</a-card>
|
|
|
|
</a-card>
|
|
|
|
<a-card title="权限信息" :bordered="false" class="w-1/2 menu" style="margin-left: 10px">
|
|
|
|
<a-card title="权限信息" :bordered="false" class="w-1/2 menu" style="margin-left: 10px">
|
|
|
|
<BasicForm @register="registerForm" />
|
|
|
|
<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>
|
|
|
|
</a-card>
|
|
|
|
</PageWrapper>
|
|
|
|
</PageWrapper>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { defineComponent, onMounted, ref, unref } from 'vue'
|
|
|
|
import { defineComponent, onMounted, ref, unref } from 'vue'
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
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 { BasicTree } from '/@/components/Tree/index'
|
|
|
|
import { PageWrapper } from '/@/components/Page'
|
|
|
|
import { PageWrapper } from '/@/components/Page'
|
|
|
|
import { formSchema } from './columns'
|
|
|
|
import { formSchema } from './columns'
|
|
|
@ -72,13 +84,14 @@
|
|
|
|
offset: 20,
|
|
|
|
offset: 20,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
showResetButton: false,
|
|
|
|
showResetButton: false,
|
|
|
|
submitButtonOptions: {
|
|
|
|
showSubmitButton: false
|
|
|
|
preIcon: 'ant-design:save-outlined',
|
|
|
|
// submitButtonOptions: {
|
|
|
|
type: 'warning',
|
|
|
|
// preIcon: 'ant-design:save-outlined',
|
|
|
|
text: '保存',
|
|
|
|
// type: 'warning',
|
|
|
|
},
|
|
|
|
// text: '保存',
|
|
|
|
submitFunc: customSaveFunc,
|
|
|
|
// },
|
|
|
|
// showActionButtonGroup: false,
|
|
|
|
// submitFunc: customSaveFunc,
|
|
|
|
|
|
|
|
// showActionButtonGroup: true,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
function handleSelect(checkedKeys, event) {
|
|
|
|
function handleSelect(checkedKeys, event) {
|
|
|
|
if (!event.selected) {
|
|
|
|
if (!event.selected) {
|
|
|
@ -99,6 +112,16 @@
|
|
|
|
// setFieldsValue({ ...event.selectedNodes[0] });
|
|
|
|
// setFieldsValue({ ...event.selectedNodes[0] });
|
|
|
|
// expose.doRefresh();
|
|
|
|
// 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() {
|
|
|
|
async function customSaveFunc() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
await validate()
|
|
|
|
await validate()
|
|
|
|