diff --git a/Report-V3-TS/src/components/Base/Jsq-crud/src/components/Jsq-tableActiion.vue b/Report-V3-TS/src/components/Base/Jsq-crud/src/components/Jsq-tableActiion.vue
index e1b8579e..503548bd 100644
--- a/Report-V3-TS/src/components/Base/Jsq-crud/src/components/Jsq-tableActiion.vue
+++ b/Report-V3-TS/src/components/Base/Jsq-crud/src/components/Jsq-tableActiion.vue
@@ -3,7 +3,7 @@
* @Author: qianlishi
* @Date: 2025-01-11 22:50:26
* @LastEditors: qianlishi
- * @LastEditTime: 2025-01-11 23:51:23
+ * @LastEditTime: 2025-01-12 00:20:42
-->
@@ -30,32 +30,45 @@
diff --git a/Report-V3-TS/src/views/access/accessAuthority/utils/schemas.ts b/Report-V3-TS/src/views/access/accessAuthority/utils/schemas.ts
index 299eb579..a377b485 100644
--- a/Report-V3-TS/src/views/access/accessAuthority/utils/schemas.ts
+++ b/Report-V3-TS/src/views/access/accessAuthority/utils/schemas.ts
@@ -3,7 +3,7 @@
* @Author: qianlishi
* @Date: 2025-01-03 01:01:14
* @LastEditors: qianlishi
- * @LastEditTime: 2025-01-11 21:34:22
+ * @LastEditTime: 2025-01-11 23:55:41
*/
import { computed, h } from 'vue';
import { cloneDeep } from 'lodash-es';
@@ -12,7 +12,6 @@ import { NButton, NTag } from 'naive-ui'
import { editFormShow, enable } from '@/enums/common'
import { FormSchema } from '@/components/Base/Jsq-crud/src/components/Jsq-searchForm';
import { getAuthorityTree } from '@/api/access/accessAuthority';
-import { number } from 'vue-types';
// tree配置
export const getTreeOptions = () => {
@@ -326,7 +325,6 @@ export const getTableColumns = ({ updateClick, removeSingle }) => {
{
size: 'small',
quaternary: true,
- 'v-permission': 'asd',
type:"primary",
onClick: () => {
removeSingle(row)
diff --git a/Report-V3-TS/src/views/access/accessRole/index.vue b/Report-V3-TS/src/views/access/accessRole/index.vue
index adce0cf3..16ba5723 100644
--- a/Report-V3-TS/src/views/access/accessRole/index.vue
+++ b/Report-V3-TS/src/views/access/accessRole/index.vue
@@ -28,8 +28,14 @@
toRemove(row)
}
+ // 分配权限
+ const toSetPermission = (row) => {
+ console.log(row)
+ console.log('分配权限')
+ }
+
const { rowsButtons } = getTableButtons({ addClick, removeAll })
- const { columns } = getTableColumns({ updateClick, removeSingle })
+ const { columns } = getTableColumns({ updateClick, removeSingle, toSetPermission })
const [register, { toAdd, toUpdate, toRemoveAll, toRemove }] = useCrud({
searchFormOption: {
diff --git a/Report-V3-TS/src/views/access/accessRole/utils/schemas.ts b/Report-V3-TS/src/views/access/accessRole/utils/schemas.ts
index 50d7c9e8..3aac34f5 100644
--- a/Report-V3-TS/src/views/access/accessRole/utils/schemas.ts
+++ b/Report-V3-TS/src/views/access/accessRole/utils/schemas.ts
@@ -3,15 +3,15 @@
* @Author: qianlishi
* @Date: 2025-01-03 01:01:14
* @LastEditors: qianlishi
- * @LastEditTime: 2025-01-11 21:36:37
+ * @LastEditTime: 2025-01-12 00:00:55
*/
import { computed, h } from 'vue';
import { cloneDeep } from 'lodash-es';
import { isObject } from '@/utils/is';
-import { NButton, NTag } from 'naive-ui'
+import { NTag } from 'naive-ui'
import { editFormShow, enable } from '@/enums/common'
import { FormSchema } from '@/components/Base/Jsq-crud/src/components/Jsq-searchForm';
-
+import JsqTableAction from '@/components/Base/Jsq-crud/src/components/Jsq-tableActiion.vue';
// 表单配置
export const getFormSchemas = ({ params }: Record) => {
const schemas = computed(() => {
@@ -174,7 +174,7 @@ export const getDialogRecordingSchemas = () => {
}
// 表格
-export const getTableColumns = ({ updateClick, removeSingle }) => {
+export const getTableColumns = ({ updateClick, removeSingle, toSetPermission }) => {
const columns= [
{
type: 'selection',
@@ -244,33 +244,37 @@ export const getTableColumns = ({ updateClick, removeSingle }) => {
width: "120px",
editHide: true,
render(row) {
- return [
- h(
- NButton,
+ return h(JsqTableAction as any, {
+ actions: [
{
- size: 'small',
+ label: '编辑',
quaternary: true,
type:"primary",
onClick: () => {
updateClick(row)
}
},
- { default: () => '编辑' }
- ),
- h(
- NButton,
{
- size: 'small',
+ label: '分配权限',
+ quaternary: true,
+ type:"primary",
+ onClick: () => {
+ toSetPermission(row)
+ }
+ },
+ {
+ label: '删除',
quaternary: true,
- 'v-permission': 'asd',
type:"primary",
onClick: () => {
removeSingle(row)
}
},
- { default: () => '删除' }
- )
- ]
+ ],
+ // select: (key) => {
+ // window['$message'].info(`您点击了,${key} 按钮`);
+ // },
+ })
}
}
];