diff --git a/src/components/action_button/index.vue b/src/components/action_button/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..378a5684fe8522877aea8dde7826a5fc978f17b1
--- /dev/null
+++ b/src/components/action_button/index.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
+ btn?.click(row, btn)" :key="btn.label">{{ btn.label }}
+
+
+
+
+
+ btn?.click(row, btn)">
+ {{ btn.label }}
+
+
+ ...
+
+
+
+
+
+
+
diff --git a/src/components/table/index.vue b/src/components/table/index.vue
index b6a78af96eebdb3515ecaff5e86dcdcd99759353..3092465fbf0df4936c8f1efb12d775eea7da446c 100644
--- a/src/components/table/index.vue
+++ b/src/components/table/index.vue
@@ -7,7 +7,7 @@
@@ -73,9 +73,15 @@ export default {
noPage: Boolean,
},
data() {
+ this.initQuery = {
+ pageNum: 1,
+ pageSize: 10,
+ };
return {
data: [],
- queryForm: {},
+ queryForm: {
+ ...this.initQuery,
+ },
loading: false,
addVisible: false,
submitLoading: false,
@@ -106,14 +112,24 @@ export default {
async getData() {
this.loading = true;
try {
- const res = await request(this.url, METHOD.GET);
- if (this.formatData) this.data = this.formatData(res);
- else this.data = res;
+ this.noPage ? await this.getDataNoPage() : await this.getDataWithPage();
} catch (error) {
// todo
}
this.loading = false;
},
+ async getDataNoPage() {
+ const res = await request(this.url, METHOD.GET);
+ if (this.formatData) this.data = this.formatData(res);
+ else this.data = res;
+ },
+
+ async getDataWithPage() {
+ const res = await request(this.url, METHOD.GET, this.queryForm);
+ if (this.formatData) this.data = this.formatData(res);
+ else this.data = res.records;
+ },
+
add() {
this.addVisible = true;
},
diff --git a/src/pages/frame/store/accountModule.js b/src/pages/frame/store/accountModule.js
index 32f9da4aa9a47df624be227769665c1daa848e0c..153304221344fb7fe0d872b87cd1b02f9aab2521 100644
--- a/src/pages/frame/store/accountModule.js
+++ b/src/pages/frame/store/accountModule.js
@@ -8,7 +8,7 @@ export default {
},
//大量共享的方法
getters: {
- user: (state) => {
+ user: state => {
if (!state.user) {
try {
const user = localStorage.getItem(process.env.VUE_APP_USER_KEY);
@@ -19,31 +19,27 @@ export default {
}
return state.user;
},
- permissions: (state) => {
+ permissions: state => {
if (!state.permissions) {
try {
- const permissions = localStorage.getItem(process.env.VUE_APP_PERMISSIONS_KEY);
- state.permissions = JSON.parse(permissions);
- state.permissions = state.permissions ? state.permissions : [];
+ state.permissions = [];
} catch (e) {
console.error(e.message);
}
}
return state.permissions;
},
- roles: (state) => {
+ roles: state => {
if (!state.roles) {
try {
- const roles = localStorage.getItem(process.env.VUE_APP_ROLES_KEY);
- state.roles = JSON.parse(roles);
- state.roles = state.roles ? state.roles : [];
+ state.roles = [];
} catch (e) {
console.error(e.message);
}
}
return state.roles;
},
- routesConfig: (state) => {
+ routesConfig: state => {
if (!state.routesConfig) {
try {
const routesConfig = localStorage.getItem(process.env.VUE_APP_ROUTES_KEY);
diff --git a/src/pages/system/view/menu/MenuManagement.vue b/src/pages/system/view/menu/MenuManagement.vue
index e123280f8464e1d55907065b7975a30e90ade3e5..f7a269a082983c598a0c00e1402d2739cc5e07f5 100644
--- a/src/pages/system/view/menu/MenuManagement.vue
+++ b/src/pages/system/view/menu/MenuManagement.vue
@@ -37,7 +37,6 @@ export default {
addBtn: {
text: '新建',
title: '菜单配置',
- width: 400,
onOk() {
return vm.$refs['addForm']?.submit();
},
diff --git a/src/pages/system/view/role/RoleManagement.vue b/src/pages/system/view/role/RoleManagement.vue
index 3c011c7b21b132b14e3b4b1ade232382889b2a72..e00d6ebe6ee89a396935011a77e84aca2e4b5563 100644
--- a/src/pages/system/view/role/RoleManagement.vue
+++ b/src/pages/system/view/role/RoleManagement.vue
@@ -1,5 +1,5 @@
-
+
@@ -26,7 +26,7 @@ export default {
components: { Form, PopconfirmDelete },
data() {
return {
- addBtn: { width: 400, onOk: () => this.$refs['form']?.submit() },
+ addBtn: { onOk: () => this.$refs['form']?.submit() },
};
},
methods: {
diff --git a/src/pages/system/view/task/index.vue b/src/pages/system/view/task/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..f1ac03511ae3e4c48fd347fc94770fe21207c94e
--- /dev/null
+++ b/src/pages/system/view/task/index.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/config.js b/src/router/config.js
index a8a15b9a5bc324544425985af4607193e3887df5..494ecba3726b5c33042464d96f998f36baa67b7b 100644
--- a/src/router/config.js
+++ b/src/router/config.js
@@ -95,6 +95,11 @@ const options = {
name: '日志管理',
component: () => import('@/pages/system/view/log'),
},
+ {
+ path: 'task_management',
+ name: '任务管理',
+ component: () => import('@/pages/system/view/task/index.vue'),
+ },
],
},
],