Merge pull request #913 from dataease/pr@dev@style_theme_dark

Pr@dev@style theme dark
This commit is contained in:
fit2cloud-chenyw 2021-10-12 16:38:44 +08:00 committed by GitHub
commit 9f4c1af114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 32 deletions

View File

@ -427,6 +427,10 @@ div:focus {
border: none !important; border: none !important;
} }
.blackTheme .el-picker-panel__footer {
background-color: var(--MainBG) !important;
}
.el-pagination { .el-pagination {
button:disabled { button:disabled {
@ -611,6 +615,10 @@ div:focus {
background-color: #000000 ; background-color: #000000 ;
} }
.blackTheme .CodeMirror-line {
background-color: #000000 !important;
}
.blackTheme .el-radio-button__inner { .blackTheme .el-radio-button__inner {
background-color: var(--TableBG); background-color: var(--TableBG);
color: var(--TableColor); color: var(--TableColor);

View File

@ -613,7 +613,7 @@
:fullscreen="true" :fullscreen="true"
> >
<field-edit :param="table" /> <field-edit :param="table" />
<div slot="title" class="dialog-footer"> <div slot="title" class="dialog-footer title-text">
<span style="font-size: 14px;"> <span style="font-size: 14px;">
{{ $t('dataset.field_manage') }} {{ $t('dataset.field_manage') }}
<span v-if="table">[{{ table.name }}]</span> <span v-if="table">[{{ table.name }}]</span>

View File

@ -96,7 +96,7 @@
append-to-body append-to-body
> >
<el-col> <el-col>
<el-form :form="taskForm" :model="taskForm" label-width="100px" size="mini" ref="taskForm" :rules="taskFormRules"> <el-form ref="taskForm" :form="taskForm" :model="taskForm" label-width="100px" size="mini" :rules="taskFormRules">
<el-form-item :label="$t('dataset.task_name')" prop="name"> <el-form-item :label="$t('dataset.task_name')" prop="name">
<el-input <el-input
v-model="taskForm.name" v-model="taskForm.name"
@ -143,12 +143,12 @@
<el-form-item v-if="taskForm.rate === 'SIMPLE_CRON'" label=""> <el-form-item v-if="taskForm.rate === 'SIMPLE_CRON'" label="">
<el-form :inline="true"> <el-form :inline="true">
<el-form-item :label="$t('cron.every')" > <el-form-item :label="$t('cron.every')">
<el-input v-model="taskForm.extraData.simple_cron_value" size="mini" type="number" min="1" @change="onSimpleCronChange()" /> <el-input v-model="taskForm.extraData.simple_cron_value" size="mini" type="number" min="1" @change="onSimpleCronChange()" />
</el-form-item> </el-form-item>
<el-form-item class="form-item"> <el-form-item class="form-item">
<el-select v-model="taskForm.extraData.simple_cron_type" filterable size="mini" @change="onSimpleCronChange()" > <el-select v-model="taskForm.extraData.simple_cron_type" filterable size="mini" @change="onSimpleCronChange()">
<el-option :label="$t('cron.minute_default')" value="minute" /> <el-option :label="$t('cron.minute_default')" value="minute" />
<el-option :label="$t('cron.hour_default')" value="hour" /> <el-option :label="$t('cron.hour_default')" value="hour" />
<el-option :label="$t('cron.day_default')" value="day" /> <el-option :label="$t('cron.day_default')" value="day" />
@ -189,7 +189,7 @@
</el-form> </el-form>
</el-col> </el-col>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="mini" @click="closeTask">{{ $t('dataset.cancel') }}</el-button> <el-button class="dialog_cancel_button" size="mini" @click="closeTask">{{ $t('dataset.cancel') }}</el-button>
<el-button type="primary" size="mini" @click="saveTask(taskForm)">{{ $t('dataset.confirm') }}</el-button> <el-button type="primary" size="mini" @click="saveTask(taskForm)">{{ $t('dataset.confirm') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -222,19 +222,19 @@
</el-table-column> </el-table-column>
<el-table-column prop="status" :label="$t('dataset.task.task_status')"> <el-table-column prop="status" :label="$t('dataset.task.task_status')">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status === 'Underway'" style="color: green"> <span v-if="scope.row.status === 'Underway'" style="color: green">
<el-link type="success" style="font-size: 12px" @click="changeTaskStatus(scope.row)">{{ $t('dataset.task.underway') }}</el-link> <el-link type="success" style="font-size: 12px" @click="changeTaskStatus(scope.row)">{{ $t('dataset.task.underway') }}</el-link>
</span> </span>
<span v-if="scope.row.status === 'Stopped'" style="color: red"> <span v-if="scope.row.status === 'Stopped'" style="color: red">
<div type="danger" style="font-size: 12px">{{ $t('dataset.task.stopped') }}</div> <div type="danger" style="font-size: 12px">{{ $t('dataset.task.stopped') }}</div>
</span> </span>
<span v-if="scope.row.status === 'Pending'" style="color: blue"> <span v-if="scope.row.status === 'Pending'" style="color: blue">
<el-link type="primary" style="font-size: 12px" @click="changeTaskStatus(scope.row)">{{ $t('dataset.task.pending') }}</el-link> <el-link type="primary" style="font-size: 12px" @click="changeTaskStatus(scope.row)">{{ $t('dataset.task.pending') }}</el-link>
</span> </span>
<span v-if="scope.row.status === 'Exec'" style="color: blue"> <span v-if="scope.row.status === 'Exec'" style="color: blue">
<i class="el-icon-loading" /> <i class="el-icon-loading" />
{{ $t('dataset.underway') }} {{ $t('dataset.underway') }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -432,7 +432,7 @@ export default {
created() { created() {
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.listTaskLog(false) this.listTaskLog(false)
}, 5000); }, 5000)
this.taskTimer = setInterval(() => { this.taskTimer = setInterval(() => {
this.listTask(false) this.listTask(false)
}, 5000) }, 5000)
@ -574,10 +574,9 @@ export default {
this.listTask() this.listTask()
this.listTaskLog() this.listTaskLog()
}) })
}else { } else {
return false return false
} }
}) })
}, },
changeTaskStatus(task) { changeTaskStatus(task) {
@ -617,27 +616,27 @@ export default {
}, },
onSimpleCronChange() { onSimpleCronChange() {
if (this.taskForm.extraData.simple_cron_type === 'minute') { if (this.taskForm.extraData.simple_cron_type === 'minute') {
if(this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 59){ if (this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 59) {
this.$message({message: this.$t('cron.minute_limit'), type: 'warning', showClose: true}) this.$message({ message: this.$t('cron.minute_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 59 this.taskForm.extraData.simple_cron_value = 59
} }
this.taskForm.cron = '0 0/'+ this.taskForm.extraData.simple_cron_value + ' * * * ? *' this.taskForm.cron = '0 0/' + this.taskForm.extraData.simple_cron_value + ' * * * ? *'
return return
} }
if (this.taskForm.extraData.simple_cron_type === 'hour') { if (this.taskForm.extraData.simple_cron_type === 'hour') {
if(this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 23){ if (this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 23) {
this.$message({message: this.$t('cron.hour_limit'), type: 'warning', showClose: true}) this.$message({ message: this.$t('cron.hour_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 23 this.taskForm.extraData.simple_cron_value = 23
} }
this.taskForm.cron = '0 0 0/'+ this.taskForm.extraData.simple_cron_value + ' * * ? *' this.taskForm.cron = '0 0 0/' + this.taskForm.extraData.simple_cron_value + ' * * ? *'
return return
} }
if (this.taskForm.extraData.simple_cron_type === 'day') { if (this.taskForm.extraData.simple_cron_type === 'day') {
if(this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 31){ if (this.taskForm.extraData.simple_cron_value < 1 || this.taskForm.extraData.simple_cron_value > 31) {
this.$message({message: this.$t('cron.day_limit'), type: 'warning', showClose: true}) this.$message({ message: this.$t('cron.day_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 31 this.taskForm.extraData.simple_cron_value = 31
} }
this.taskForm.cron = '0 0 0 1/'+ this.taskForm.extraData.simple_cron_value + ' * ? *' this.taskForm.cron = '0 0 0 1/' + this.taskForm.extraData.simple_cron_value + ' * ? *'
return return
} }
}, },
@ -647,16 +646,16 @@ export default {
this.taskForm.endTime = '' this.taskForm.endTime = ''
this.taskForm.cron = '' this.taskForm.cron = ''
} }
if (this.taskForm.rate === 'SIMPLE_CRON'){ if (this.taskForm.rate === 'SIMPLE_CRON') {
this.taskForm.cron = '0 0 0/1 * * ? *' this.taskForm.cron = '0 0 0/1 * * ? *'
} }
if (this.taskForm.rate === 'CRON'){ if (this.taskForm.rate === 'CRON') {
this.taskForm.cron = '00 00 * ? * * *' this.taskForm.cron = '00 00 * ? * * *'
} }
}, },
listTaskLog(loading = true) { listTaskLog(loading = true) {
const params = {"conditions":[{"field":"dataset_table_task_log.table_id","operator":"eq","value": this.table.id}],"orders":[]} const params = { 'conditions': [{ 'field': 'dataset_table_task_log.table_id', 'operator': 'eq', 'value': this.table.id }], 'orders': [] }
post('/dataset/taskLog/list/' + this.table.type + '/' + this.page.currentPage + '/' + this.page.pageSize, params, loading).then(response => { post('/dataset/taskLog/list/' + this.table.type + '/' + this.page.currentPage + '/' + this.page.pageSize, params, loading).then(response => {
this.taskLogData = response.data.listObject this.taskLogData = response.data.listObject
this.page.total = response.data.itemCount this.page.total = response.data.itemCount
}) })
@ -754,6 +753,11 @@ export default {
overflow: hidden ; overflow: hidden ;
} }
.blackTheme .dialog_cancel_button {
background-color: #171b22 !important;
color: #2681ff !important;
}
.span{ .span{
font-size: 12px; font-size: 12px;
} }