From ac7b0e9fe1105ef9309fc6cf5243fef20731500b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Fri, 2 Jul 2021 12:44:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=BB=E5=8A=A1=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 1 + src/api/task.js | 9 + src/components/Acron/ACron.vue | 139 +- src/components/Acron/AntCron.vue | 2271 +++++++++-------- src/components/FormMixin/index.js | 5 +- src/components/action_button/index.vue | 1 - src/components/table/index.vue | 1 + src/pages/system/view/menu/MenuManagement.vue | 3 +- src/pages/system/view/task/form.vue | 32 +- src/pages/system/view/task/index.vue | 12 +- 10 files changed, 1271 insertions(+), 1203 deletions(-) create mode 100644 src/api/task.js diff --git a/src/api/index.js b/src/api/index.js index 18af1f5..dd390ca 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,6 +1,7 @@ import { request, METHOD } from '@/utils'; export * from './menu'; export * from './system'; +export * from './task'; export function getUserDetailInfoApi() { return request('/api/v1/detail', METHOD.GET); diff --git a/src/api/task.js b/src/api/task.js new file mode 100644 index 0000000..ca44ba1 --- /dev/null +++ b/src/api/task.js @@ -0,0 +1,9 @@ +import { postReq, putReq } from '@/utils'; + +export function addTaskApi(data) { + return postReq('/api/v1/schedules', data); +} + +export function updateTaskApi(data) { + return putReq('/api/v1/schedules', data); +} diff --git a/src/components/Acron/ACron.vue b/src/components/Acron/ACron.vue index 242833b..51a552b 100644 --- a/src/components/Acron/ACron.vue +++ b/src/components/Acron/ACron.vue @@ -1,86 +1,89 @@ \ No newline at end of file + diff --git a/src/components/Acron/AntCron.vue b/src/components/Acron/AntCron.vue index cc0aa09..160a736 100644 --- a/src/components/Acron/AntCron.vue +++ b/src/components/Acron/AntCron.vue @@ -1,1150 +1,1197 @@ - - - \ No newline at end of file + diff --git a/src/components/FormMixin/index.js b/src/components/FormMixin/index.js index ec20166..370edc9 100644 --- a/src/components/FormMixin/index.js +++ b/src/components/FormMixin/index.js @@ -20,15 +20,16 @@ export default { async submit() { await this.$refs.DrawerForm.validate(); if (this.isAdd) { - return this?.add(); + return this.add(); } if (this.isEdit) { - return this?.edit(); + return this.edit(); } }, setData(data, type) { this.form = { ...data }; this.type = type; + console.log(data, type); }, }, }; diff --git a/src/components/action_button/index.vue b/src/components/action_button/index.vue index 14acc20..9bd580d 100644 --- a/src/components/action_button/index.vue +++ b/src/components/action_button/index.vue @@ -62,7 +62,6 @@ export default { }, created() { this.init(); - console.log(this.buttonsArr); }, computed: { basicBtns() { diff --git a/src/components/table/index.vue b/src/components/table/index.vue index c7aa340..b8055f0 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -180,6 +180,7 @@ export default { this.addVisible = true; this.type = 0; this.noFooter = false; + this.title = '新增'; }, addDrawerClose() { this.addVisible = false; diff --git a/src/pages/system/view/menu/MenuManagement.vue b/src/pages/system/view/menu/MenuManagement.vue index ec2bc25..af40934 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: '新建', onOk() { - console.log(vm.addCom); return vm.addCom ? vm.$refs['addCom']?.submit() : vm.$refs['addForm']?.submit(); }, onCancel() { @@ -50,7 +49,7 @@ export default { { label: '新增组件', option: { - type: 'danger', + style: 'color: #ff4d4f', }, click(row) { vm.show(); diff --git a/src/pages/system/view/task/form.vue b/src/pages/system/view/task/form.vue index 7640815..086624a 100644 --- a/src/pages/system/view/task/form.vue +++ b/src/pages/system/view/task/form.vue @@ -1,41 +1,43 @@