diff --git a/src/api/menu.ts b/src/api/menu.ts
index 3f67ef5..eba8a5e 100644
--- a/src/api/menu.ts
+++ b/src/api/menu.ts
@@ -14,7 +14,7 @@ export interface MenuRecord {
order: number;
permissions: string[];
showInMenu?: boolean;
- menuOrder?: string;
+ menuOrder?: number;
};
children?: MenuRecord[] ;
};
@@ -22,6 +22,30 @@ export interface MenuRecord {
export interface MenuCreateRecord extends MenuRecord{
type: string;
}
+export interface MenuUpdateRecord {
+ pid?: number;
+ name: string;
+ path: string;
+ locale?: string;
+ icon?: string;
+ createTime?: string;
+ createBy?: string;
+ type: string;
+ requiresAuth?: boolean;
+ hideInMenu?: boolean;
+ menuOrder?: number;
+ permissions: string;
+
+
+
+
+}
+
+// 获取详情
+export const queryMenuDetail = (id: string | number) => {
+ return axios.get(`/api/rest/menu/${id}`);
+};
+
export const queryMenuList = (data: string) => {
return axios({
diff --git a/src/api/message-mgmt.ts b/src/api/message-mgmt.ts
index 23ea754..090e468 100644
--- a/src/api/message-mgmt.ts
+++ b/src/api/message-mgmt.ts
@@ -3,10 +3,6 @@ import axios from 'axios';
export interface MessageRecord {
userId?: string;
title?: string;
- type?: string;
- name?: string;
- system?: boolean;
- isRead?: boolean;
createAtBegin?: string;
createAtEnd?: string;
current: number;
@@ -21,7 +17,6 @@ export interface MessageCreateRecord {
html: string;
title: string;
content: string;
- attachmentIds?: string[];
}
// 查看详情
diff --git a/src/hooks/pagination.ts b/src/hooks/pagination.ts
index 97ea2bb..026b82f 100644
--- a/src/hooks/pagination.ts
+++ b/src/hooks/pagination.ts
@@ -1,13 +1,13 @@
export default function usePagination(initValue = false) {
const pagination: any = {
- pages: 1,
+ page: 1,
size: 10,
current: 1,
total: 0,
};
const setPagination = (value: any) => {
- pagination.pages = value.page;
+ pagination.page = value.page;
pagination.size = value.size;
pagination.current = value.current;
pagination.total = value.total;
diff --git a/src/router/routes/modules/system.ts b/src/router/routes/modules/system.ts
index 7231e0a..f6e6138 100644
--- a/src/router/routes/modules/system.ts
+++ b/src/router/routes/modules/system.ts
@@ -64,7 +64,7 @@ const SYSTEM: AppRouteRecordRaw = {
locale: '权限管理',
title: '权限管理',
requiresAuth: true,
- permissions: ['system:authority'],
+ permissions: ['system:authorityHidden'],
},
},
{
diff --git a/src/views/iot/device/components/device-edit.vue b/src/views/iot/device/components/device-edit.vue
index 3d21f0b..bf9055e 100644
--- a/src/views/iot/device/components/device-edit.vue
+++ b/src/views/iot/device/components/device-edit.vue
@@ -252,7 +252,7 @@
};
});
loading.value = false;
- }, 2000);
+ }, 1000);
} else {
options.value = [];
}
diff --git a/src/views/iot/product/components/product-edit.vue b/src/views/iot/product/components/product-edit.vue
index 338b317..fd62c2d 100644
--- a/src/views/iot/product/components/product-edit.vue
+++ b/src/views/iot/product/components/product-edit.vue
@@ -92,53 +92,6 @@
field="params"
label="参数"
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -162,75 +115,75 @@
-
- 添加参数
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- 取消
- 确定
-
-
+
+
+
+
+
@@ -256,45 +209,7 @@
});
const { visible, setVisible } = useVisible(false);
const CreateRef = ref();
- const formData = ref({
- // params: [],
- // ...props.prem,
- });
- const columns=[
- {
- title: '参数名称',
- dataIndex: 'name',
- slotName: 'name',
- width: '120',
- },
- {
- title: '参数标识',
- dataIndex: 'identifier',
- slotName: 'identifier',
- width: '120',
- align: 'left'
- },
- {
- title: '数据类型',
- dataIndex: 'dataType',
- slotName: 'dataType',
- width: '150',
- align: 'left'
- },
- {
- title: '参数类型',
- dataIndex: 'type',
- slotName: 'type',
- width: '180',
- align: 'left'
- },
- {
- title: '操作',
- dataIndex: 'operation',
- slotName: 'operation',
- align: 'left'
- }
- ];
+ const formData = ref({});
const paramsData = ref([
{
name: '',
@@ -362,7 +277,7 @@
},
]);
const paramsVisible = ref(false);
- const paramsName = ref([]);
+ // const paramsName = ref([]);
const fetchData = async (Id: number | undefined) => {
const res = await queryProductDetail(Id);
formData.value = res.data;
@@ -378,6 +293,7 @@
// 提交
const handleSubmit = async () => {
const valid = await CreateRef.value?.validate();
+ console.log(valid);
if (!valid) {
// 新增
if (props.isCreate) {
@@ -431,8 +347,8 @@
// 参数模态框提交
const paramsSubmit = () => {
paramsVisible.value = false;
- formData.value.params.push(paramsData.value);
- paramsName.value.push(paramsData.value.name);
+ formData.value.params?.push(paramsData.value);
+ // paramsName.value.push(paramsData.value.name);
}
// 关闭
const handleCancel = async () => {
diff --git a/src/views/notification/notice/components/message-edit.vue b/src/views/notification/notice/components/message-edit.vue
index 99854ef..57bbfa5 100644
--- a/src/views/notification/notice/components/message-edit.vue
+++ b/src/views/notification/notice/components/message-edit.vue
@@ -58,7 +58,7 @@
>
@@ -393,7 +393,6 @@
const handleSubmit = async () => {
const valid = await CreateRef.value?.validate();
if (!valid) {
- formData.value.permissionIds = checkKeys.value;
// 新增
if (props.isCreate) {
// formData.value.username = formData.value.email;
diff --git a/src/views/notification/notice/index.vue b/src/views/notification/notice/index.vue
index 10ba89b..ab2a9ad 100644
--- a/src/views/notification/notice/index.vue
+++ b/src/views/notification/notice/index.vue
@@ -23,7 +23,7 @@
/>
-
+
-
-
-
-
-
-
+
-
+
@@ -193,12 +181,7 @@
const generateFormModel = () => {
return {
- userId: '',
title: '',
- type: '',
- name: '',
- system: '',
- isRead: '',
createAtBegin: '',
createAtEnd: '',
};
@@ -243,12 +226,9 @@
// dataIndex: 'username',
// },
{
- title: '状态',
- dataIndex: 'isRead',
- slotName: 'isRead',
- sortable: {
- sortDirections: ['ascend', 'descend'],
- },
+ title: '备注',
+ dataIndex: 'remark',
+ slotName: 'remark',
},
]);
@@ -258,7 +238,7 @@
) => {
setLoading(true);
try {
- const res: any = await messageStore.queryMessageList(params);
+ const res = await messageStore.queryMessageList(params);
renderData.value = res.data.records;
setPagination(res.data);
} catch (err) {
@@ -279,8 +259,9 @@
// 分页发生改变
const onPageChange = (current: number) => {
- pagination.pages = current;
- pagination.current = current;
+ setPagination({
+ current,
+ });
search();
};
// 时间范围
@@ -292,8 +273,10 @@
};
// 数据条数改变
- const onSizeChange = (Size: number) => {
- pagination.size = Size;
+ const onSizeChange = (size: number) => {
+ setPagination({
+ size,
+ })
search();
};
diff --git a/src/views/system/menu/components/menu-edit.vue b/src/views/system/menu/components/menu-edit.vue
index bb47e4c..bc9360b 100644
--- a/src/views/system/menu/components/menu-edit.vue
+++ b/src/views/system/menu/components/menu-edit.vue
@@ -73,66 +73,66 @@
/>
@@ -145,16 +145,17 @@
import { computed, PropType, ref } from 'vue';
import { FormInstance } from '@arco-design/web-vue/es/form';
import { Message } from '@arco-design/web-vue';
- import { createMenu, MenuCreateRecord, MenuRecord, updateMenu } from '@/api/menu';
+ import { createMenu, MenuRecord, MenuUpdateRecord, queryMenuDetail, updateMenu } from '@/api/menu';
const props = defineProps({
- menu: {
- type: Object as PropType,
- },
menuData: {
type: Object as PropType,
},
isCreate: Boolean,
+ id: {
+ type: Number,
+ default: -1
+ }
});
const modalTitle = computed(() => {
return props.isCreate ? '新建菜单' : '编辑菜单';
@@ -162,31 +163,25 @@
const { visible, setVisible } = useVisible(false);
const createEditRef = ref();
- const formData = ref({
+ const formData = ref({
type: '',
name: '',
path: '',
- meta: {
- icon: '',
- locale: '',
- requiresAuth: false,
- hideInMenu: false,
- menuOrder: '0',
- permissions: [],
- order: 0,
- showInMenu: false
- },
- ...props.menu,
- }
- );
+ locale: '',
+ icon: '',
+ requiresAuth: true,
+ hideInMenu: false,
+ menuOrder: 0,
+ permissions:''
+ });
const typeOptions = computed(() => [
{
- label: '菜单',
- value: 1,
+ label: '页面',
+ value: 'PAGE',
},
{
- label: '权限',
- value: 2,
+ label: '操作',
+ value: "OPERATION",
},
]);
@@ -195,6 +190,11 @@
// 组件被点击
const handleClick = () => {
setVisible(true);
+ if(!props.isCreate){
+ queryMenuDetail(props.id).then(res => {
+ formData.value = res.data;
+ });
+ }
};
// 提交
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index 36581c0..b6f4bd2 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -132,6 +132,7 @@
-
-
-
-
-
-
-
-
-
-
-
+
-
+
@@ -188,7 +165,6 @@
:size="size"
style="margin-bottom: 40px"
:filter-icon-align-left="alignLeft"
- @change="handleSortChange"
@page-change="onPageChange"
>
@@ -247,9 +223,7 @@
import { computed, onMounted, ref, watch } from 'vue';
import useLoading from '@/hooks/loading';
import { UserRecord, UserParams } from '@/api/user';
-// import { getAllDeptTree } from '@/api/dept';
import { Pagination } from '@/types/global';
-import type { SelectOptionData } from '@arco-design/web-vue/es/select/interface';
import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
import { useUserStore } from '@/store';
import { Message } from '@arco-design/web-vue';
@@ -345,17 +319,7 @@ const columns = computed(() => [
slotName: 'operations',
},
]);
-const statusOptions = computed(() => [
- {
- label: '启用',
- value: 'true',
- },
- {
- label: '停用',
- value: 'false',
- },
-]);
-// const deptTreeData = ref([]);
+
// 获取用户列表
const fetchData = async (
@@ -435,7 +399,6 @@ const reset = () => {
// 表格内部排序
const alignLeft = ref(false);
-const handleSortChange = (data: any, extra: any, currentDataSource: any) => {};
// 是否启用
const enabledStatus = async (record: any) => {
diff --git a/src/views/user/bulletin-card/index.vue b/src/views/user/bulletin-card/index.vue
index a782c6f..89f8691 100644
--- a/src/views/user/bulletin-card/index.vue
+++ b/src/views/user/bulletin-card/index.vue
@@ -179,9 +179,7 @@
// 数据条数改变
const onSizeChange = (total: number) => {
- setPagination({
- total,
- })
+ pagination.total = total;
search();
};
diff --git a/src/views/user/messages/index.vue b/src/views/user/messages/index.vue
index fa506a5..0ef8fba 100644
--- a/src/views/user/messages/index.vue
+++ b/src/views/user/messages/index.vue
@@ -242,7 +242,7 @@
// 分页发生改变
const onPageChange = (current: number) => {
- pagination.pages = current;
+ pagination.page = current;
pagination.current = current;
search();
};