forked from github/dataease
feat(frontend):vue cron组件
This commit is contained in:
parent
0468039333
commit
5b3962e934
@ -38,6 +38,7 @@
|
|||||||
"vue-axios": "3.2.4",
|
"vue-axios": "3.2.4",
|
||||||
"vue-clipboard2": "0.3.1",
|
"vue-clipboard2": "0.3.1",
|
||||||
"vue-codemirror": "^4.0.6",
|
"vue-codemirror": "^4.0.6",
|
||||||
|
"vue-cron": "^1.0.9",
|
||||||
"vue-i18n": "7.3.2",
|
"vue-i18n": "7.3.2",
|
||||||
"vue-router": "3.0.6",
|
"vue-router": "3.0.6",
|
||||||
"vue-uuid": "2.0.2",
|
"vue-uuid": "2.0.2",
|
||||||
|
@ -30,11 +30,9 @@ import * as echarts from 'echarts'
|
|||||||
Vue.prototype.$echarts = echarts
|
Vue.prototype.$echarts = echarts
|
||||||
|
|
||||||
import UmyUi from 'umy-ui'
|
import UmyUi from 'umy-ui'
|
||||||
|
|
||||||
Vue.use(UmyUi)
|
Vue.use(UmyUi)
|
||||||
|
|
||||||
import vcolorpicker from 'vcolorpicker'
|
import vcolorpicker from 'vcolorpicker'
|
||||||
|
|
||||||
Vue.use(vcolorpicker)
|
Vue.use(vcolorpicker)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -134,7 +134,10 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="taskForm.rate === 'CRON'" label="">
|
<el-form-item v-if="taskForm.rate === 'CRON'" label="">
|
||||||
<el-input v-model="taskForm.cron" size="mini" style="width: 50%" />
|
<el-popover v-model="cronEdit">
|
||||||
|
<cron @close="cronEdit = false" @change="cronChange" i18n="cn"/>
|
||||||
|
<el-input v-model="taskForm.cron" size="mini" style="width: 50%" @click="cronEdit = true" slot="reference"/>
|
||||||
|
</el-popover>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('dataset.end_time')" prop="end">
|
<el-form-item :label="$t('dataset.end_time')" prop="end">
|
||||||
<el-select v-model="taskForm.end" size="mini">
|
<el-select v-model="taskForm.end" size="mini">
|
||||||
@ -285,10 +288,12 @@ import 'codemirror/keymap/emacs.js'
|
|||||||
import 'codemirror/addon/hint/show-hint.css'
|
import 'codemirror/addon/hint/show-hint.css'
|
||||||
import 'codemirror/addon/hint/sql-hint'
|
import 'codemirror/addon/hint/sql-hint'
|
||||||
import 'codemirror/addon/hint/show-hint'
|
import 'codemirror/addon/hint/show-hint'
|
||||||
|
// vue-cron
|
||||||
|
import { cron } from 'vue-cron'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UpdateInfo',
|
name: 'UpdateInfo',
|
||||||
components: { codemirror },
|
components: { codemirror, cron },
|
||||||
props: {
|
props: {
|
||||||
table: {
|
table: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -348,7 +353,8 @@ export default {
|
|||||||
},
|
},
|
||||||
incrementalUpdateType: 'incrementalAdd',
|
incrementalUpdateType: 'incrementalAdd',
|
||||||
sql: '',
|
sql: '',
|
||||||
incrementalConfig: {}
|
incrementalConfig: {},
|
||||||
|
cronEdit: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -563,6 +569,9 @@ export default {
|
|||||||
pos2.line = pos1.line
|
pos2.line = pos1.line
|
||||||
pos2.ch = pos1.ch
|
pos2.ch = pos1.ch
|
||||||
this.$refs.myCm.codemirror.replaceRange(param, pos2)
|
this.$refs.myCm.codemirror.replaceRange(param, pos2)
|
||||||
|
},
|
||||||
|
cronChange(val) {
|
||||||
|
this.taskForm.cron = val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user