From 5b3962e934f5e3ee13fe9b6188648b792191c208 Mon Sep 17 00:00:00 2001
From: xiajunjie <752696511@qq.com>
Date: Sun, 23 May 2021 11:04:45 +0800
Subject: [PATCH] =?UTF-8?q?feat(frontend):vue=20cron=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/package.json | 1 +
frontend/src/main.js | 2 --
frontend/src/views/dataset/data/UpdateInfo.vue | 15 ++++++++++++---
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/frontend/package.json b/frontend/package.json
index 595b2d4646..8cf908add8 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -38,6 +38,7 @@
"vue-axios": "3.2.4",
"vue-clipboard2": "0.3.1",
"vue-codemirror": "^4.0.6",
+ "vue-cron": "^1.0.9",
"vue-i18n": "7.3.2",
"vue-router": "3.0.6",
"vue-uuid": "2.0.2",
diff --git a/frontend/src/main.js b/frontend/src/main.js
index 02d94c008c..dfeca15af3 100644
--- a/frontend/src/main.js
+++ b/frontend/src/main.js
@@ -30,11 +30,9 @@ import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
import UmyUi from 'umy-ui'
-
Vue.use(UmyUi)
import vcolorpicker from 'vcolorpicker'
-
Vue.use(vcolorpicker)
/**
diff --git a/frontend/src/views/dataset/data/UpdateInfo.vue b/frontend/src/views/dataset/data/UpdateInfo.vue
index ce89e76b92..e9bc4cf96f 100644
--- a/frontend/src/views/dataset/data/UpdateInfo.vue
+++ b/frontend/src/views/dataset/data/UpdateInfo.vue
@@ -134,7 +134,10 @@
-
+
+
+
+
@@ -285,10 +288,12 @@ import 'codemirror/keymap/emacs.js'
import 'codemirror/addon/hint/show-hint.css'
import 'codemirror/addon/hint/sql-hint'
import 'codemirror/addon/hint/show-hint'
+// vue-cron
+import { cron } from 'vue-cron'
export default {
name: 'UpdateInfo',
- components: { codemirror },
+ components: { codemirror, cron },
props: {
table: {
type: Object,
@@ -348,7 +353,8 @@ export default {
},
incrementalUpdateType: 'incrementalAdd',
sql: '',
- incrementalConfig: {}
+ incrementalConfig: {},
+ cronEdit: false
}
},
computed: {
@@ -563,6 +569,9 @@ export default {
pos2.line = pos1.line
pos2.ch = pos1.ch
this.$refs.myCm.codemirror.replaceRange(param, pos2)
+ },
+ cronChange(val) {
+ this.taskForm.cron = val
}
}
}