前端国际化2
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
v-model="query.job_name"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="输入任务名称搜索"
|
||||
:placeholder="$t('sys_quartz_job.search_by_job_name')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="toQuery"
|
||||
@@ -24,7 +24,7 @@
|
||||
type="info"
|
||||
icon="el-icon-tickets"
|
||||
@click="doLog"
|
||||
>日志
|
||||
>{{$t('sys_quartz_job.log')}}
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<Log ref="log" />
|
||||
@@ -39,60 +39,60 @@
|
||||
width="730px"
|
||||
>
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-form-item label="任务名称" prop="job_name">
|
||||
<el-form-item :label="$t('sys_quartz_job.job_name')" prop="job_name">
|
||||
<el-input v-model="form.job_name" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务描述" prop="description">
|
||||
<el-form-item :label="$t('sys_quartz_job.description')" prop="description">
|
||||
<el-input v-model="form.description" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Bean名称" prop="bean_name">
|
||||
<el-form-item :label="$t('sys_quartz_job.bean_name')" prop="bean_name">
|
||||
<el-input v-model="form.bean_name" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="执行方法" prop="method_name">
|
||||
<el-form-item :label="$t('sys_quartz_job.method_name')" prop="method_name">
|
||||
<el-input v-model="form.method_name" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Cron表达式" prop="cron_expression">
|
||||
<el-form-item :label="$t('sys_quartz_job.cron_expression')" prop="cron_expression">
|
||||
<!-- <el-input v-model="form.cron_expression" style="width: 220px;" />-->
|
||||
<el-input v-model="form.cron_expression" placeholder="请输入CRON 表达式" style="width: 220px;">
|
||||
<el-input v-model="form.cron_expression" :placeholder="$t('sys_quartz_job.enter_cron_expression')" style="width: 220px;">
|
||||
<template slot="append">
|
||||
<el-button type="primary" @click="handleShowCron">
|
||||
生成表达式
|
||||
{{$t('sys_quartz_job.generate_expression')}}
|
||||
<i class="el-icon-time el-icon--right" />
|
||||
</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="子任务ID">
|
||||
<el-input v-model="form.sub_task" placeholder="多个用逗号隔开,按顺序执行" style="width: 220px;" />
|
||||
<el-form-item :label="$t('sys_quartz_job.sub_task')">
|
||||
<el-input v-model="form.sub_task" :placeholder="$t('sys_quartz_job.multiple_comma_separated')" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务负责人" prop="person_in_charge">
|
||||
<el-form-item :label="$t('sys_quartz_job.person_in_charge')" prop="person_in_charge">
|
||||
<el-input v-model="form.person_in_charge" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="告警邮箱" prop="email">
|
||||
<el-input v-model="form.email" placeholder="多个邮箱用逗号隔开" style="width: 220px;" />
|
||||
<el-form-item :label="$t('sys_quartz_job.email')" prop="email">
|
||||
<el-input v-model="form.email" :placeholder="$t('sys_quartz_job.multiple_email_comma_separated')" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调度IP" prop="email">
|
||||
<el-input v-model="form.job_ip" placeholder="执行定时器的ip地址" style="width: 220px;" />
|
||||
<el-form-item :label="$t('sys_quartz_job.job_ip')" prop="email">
|
||||
<el-input v-model="form.job_ip" :placeholder="$t('sys_quartz_job.execute_timer_ip')" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="失败后暂停">
|
||||
<el-form-item :label="$t('sys_quartz_job.pause_after_failure')">
|
||||
<el-radio-group v-model="form.pause_after_failure" style="width: 220px">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
<el-radio :label="true">{{$t('common.Yes')}}</el-radio>
|
||||
<el-radio :label="false">{{$t('common.No')}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态">
|
||||
<el-form-item :label="$t('sys_quartz_job.status')">
|
||||
<el-radio-group v-model="form.is_pause" style="width: 220px">
|
||||
<el-radio :label="false">启用</el-radio>
|
||||
<el-radio :label="true">暂停</el-radio>
|
||||
<el-radio :label="false">{{$t('sys_quartz_job.enable')}}</el-radio>
|
||||
<el-radio :label="true">{{$t('sys_quartz_job.pause')}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数内容">
|
||||
<el-form-item :label="$t('sys_quartz_job.params')">
|
||||
<el-input v-model="form.params" style="width: 556px;" rows="4" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
<el-button type="text" @click="crud.cancelCU">{{$t('common.Cancel')}}</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">{{$t('common.Confirm')}}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
@@ -104,36 +104,36 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="job_id" label="任务ID" />
|
||||
<el-table-column show-overflow-tooltip prop="job_name" label="任务名称" min-width="120" />
|
||||
<el-table-column show-overflow-tooltip prop="bean_name" label="Bean名称" />
|
||||
<el-table-column show-overflow-tooltip prop="job_ip" label="调度IP" />
|
||||
<el-table-column show-overflow-tooltip prop="method_name" label="执行方法" />
|
||||
<el-table-column show-overflow-tooltip prop="params" label="参数" />
|
||||
<el-table-column show-overflow-tooltip prop="job_id" :label="$t('sys_quartz_job.job_id')" />
|
||||
<el-table-column show-overflow-tooltip prop="job_name" :label="$t('sys_quartz_job.job_name')" min-width="120" />
|
||||
<el-table-column show-overflow-tooltip prop="bean_name" :label="$t('sys_quartz_job.bean_name')" />
|
||||
<el-table-column show-overflow-tooltip prop="job_ip" :label="$t('sys_quartz_job.job_ip')" />
|
||||
<el-table-column show-overflow-tooltip prop="method_name" :label="$t('sys_quartz_job.method_name')" />
|
||||
<el-table-column show-overflow-tooltip prop="params" :label="$t('sys_quartz_job.params')" />
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="cron_expression"
|
||||
label="cron表达式"
|
||||
:label="$t('sys_quartz_job.cron_expression')"
|
||||
min-width="100"
|
||||
show-tooltip-when-overflow
|
||||
/>
|
||||
<el-table-column show-overflow-tooltip prop="is_pause" width="90px" label="状态">
|
||||
<el-table-column show-overflow-tooltip prop="is_pause" width="90px" :label="$t('sys_quartz_job.status')">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.is_pause ? 'warning' : 'success'">{{
|
||||
scope.row.is_pause ? '已暂停' : '运行中'
|
||||
}}
|
||||
scope.row.is_pause ? $t('sys_quartz_job.paused') : $t('sys_quartz_job.running')
|
||||
}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="description" width="150px" label="描述" />
|
||||
<el-table-column show-overflow-tooltip prop="create_time" width="136px" label="创建日期">
|
||||
<el-table-column show-overflow-tooltip prop="description" width="150px" :label="$t('sys_quartz_job.description')" />
|
||||
<el-table-column show-overflow-tooltip prop="create_time" width="136px" :label="$t('common.create_time')">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.create_time) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-permission="['admin','timing:edit','timing:del']"
|
||||
label="操作"
|
||||
:label="$t('common.Operate')"
|
||||
width="170px"
|
||||
align="center"
|
||||
fixed="right"
|
||||
@@ -145,7 +145,7 @@
|
||||
style="margin-right: 3px;"
|
||||
type="text"
|
||||
@click="crud.toEdit(scope.row)"
|
||||
>编辑
|
||||
>{{$t('common.Update')}}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-permission="['admin','timing:edit']"
|
||||
@@ -153,16 +153,16 @@
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="execute(scope.row.job_id)"
|
||||
>执行
|
||||
>{{$t('sys_quartz_job.execute')}}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-permission="['admin','timing:edit']"
|
||||
style="margin-left: 3px"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="updateStatus(scope.row.job_id,scope.row.is_pause ? '恢复' : '暂停')"
|
||||
@click="updateStatus(scope.row.job_id,scope.row.is_pause ? $t('sys_quartz_job.resume') : $t('sys_quartz_job.pause'))"
|
||||
>
|
||||
{{ scope.row.is_pause ? '恢复' : '暂停' }}
|
||||
{{ scope.row.is_pause ? $t('sys_quartz_job.resume') : $t('sys_quartz_job.pause') }}
|
||||
</el-button>
|
||||
<el-popover
|
||||
:ref="scope.row.job_id"
|
||||
@@ -170,25 +170,26 @@
|
||||
placement="top"
|
||||
width="200"
|
||||
>
|
||||
<p>确定停止并删除该任务吗?</p>
|
||||
<p>{{$t('sys_quartz_job.confirm_stop_delete_task')}}</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="$refs[scope.row.job_id].doClose()">取消</el-button>
|
||||
<el-button :loading="delLoading" type="primary" size="mini" @click="delMethod(scope.row.job_id)">确定
|
||||
<el-button size="mini" type="text" @click="$refs[scope.row.job_id].doClose()">{{$t('common.Cancel')}}</el-button>
|
||||
<el-button :loading="delLoading" type="primary" size="mini" @click="delMethod(scope.row.job_id)">{{$t('common.Confirm')}}
|
||||
</el-button>
|
||||
</div>
|
||||
<el-button slot="reference" type="text" size="mini">删除</el-button>
|
||||
<el-button slot="reference" type="text" size="mini">{{$t('common.Delete')}}</el-button>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<el-dialog title="Cron表达式生成器" :visible.sync="openCron" append-to-body class="scrollbar" destroy-on-close>
|
||||
<el-dialog :title="$t('sys_quartz_job.cron_expression_generator')" :visible.sync="openCron" append-to-body class="scrollbar" destroy-on-close>
|
||||
<crontab :expression="expression" @hide="openCron=false" @fill="crontabFill" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import crudJob from '@/views/system/timing/timing'
|
||||
import Log from './log'
|
||||
|
||||
Reference in New Issue
Block a user