opt: 优化首页国际化实现,并优化前端项目

This commit is contained in:
yanps
2023-12-14 14:58:26 +08:00
parent d5f9fc472b
commit 870f926fc6
43 changed files with 698 additions and 686 deletions

View File

@@ -12,16 +12,16 @@
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column :selectable="checkboxT" type="selection" width="55" />
<el-table-column show-overflow-tooltip prop="name" :label="$t('Auto.table.name')" :min-width="flexWidth('name',crud.data,$t('Auto.table.name'))"/>
<el-table-column show-overflow-tooltip prop="name" :label="$t('Auto.table.name')" :min-width="flexWidth('name',crud.data,$t('Auto.table.name'))" />
<el-table-column :show-overflow-tooltip="false" prop="code" :label="$t('Auto.table.code')" :min-width="flexWidth('code',crud.data,$t('Auto.table.code'))" />
<el-table-column show-overflow-tooltip prop="status" :label="$t('Auto.table.status')" :min-width="flexWidth('status',crud.data,$t('Auto.table.status'))" />
<el-table-column show-overflow-tooltip prop="thread_name" :label="$t('Auto.table.thread_name')" :min-width="flexWidth('thread_name',crud.data,$t('Auto.table.thread_name'))"/>
<el-table-column show-overflow-tooltip prop="thread_name" :label="$t('Auto.table.thread_name')" :min-width="flexWidth('thread_name',crud.data,$t('Auto.table.thread_name'))" />
<el-table-column show-overflow-tooltip prop="thread_state" :label="$t('Auto.table.thread_state')" :min-width="flexWidth('thread_state',crud.data,$t('Auto.table.thread_state'))" />
<el-table-column show-overflow-tooltip prop="usedStatus" :label="$t('Auto.table.usedStatus')" :min-width="flexWidth('usedStatus',crud.data,$t('Auto.table.usedStatus'))" />
<el-table-column show-overflow-tooltip prop="stopMessage" :label="$t('Auto.table.stopMessage')" :min-width="flexWidth('stopMessage',crud.data,$t('Auto.table.stopMessage'))" />
<el-table-column v-permission="['admin','timing:edit','timing:del']" :label="$t('Auto.table.operate')" width="170px" align="center" fixed="right">
<el-table-column show-overflow-tooltip prop="stopMessage" :label="$t('Auto.table.stopMessage')" :min-width="flexWidth('stopMessage',crud.data,$t('Auto.table.stopMessage'))" />
<el-table-column v-permission="['admin','timing:edit','timing:del']" :label="$t('Auto.table.operate')" width="170px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['admin','timing:edit']" style="margin-left: -2px" type="text" size="mini" icon="el-icon-video-pause" @click="start(scope.row.code)">{{ $t('common.firing') }}</el-button>
<el-button v-permission="['admin','timing:edit']" style="margin-left: -2px" type="text" size="mini" icon="el-icon-video-pause" @click="start(scope.row.code)">{{ $t('auto.common.firing') }}</el-button>
<el-popover
:ref="scope.row.code"
placement="top"
@@ -29,10 +29,10 @@
>
{{ $t('Auto.msg.stop_msg') }}
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs[scope.row.code].doClose()">{{ $t('common.Cancel') }}</el-button>
<el-button :loading="delLoading" type="primary" size="mini" @click="stop(scope.row.code)">{{ $t('common.determine') }}</el-button>
<el-button size="mini" type="text" @click="$refs[scope.row.code].doClose()">{{ $t('auto.common.Cancel') }}</el-button>
<el-button :loading="delLoading" type="primary" size="mini" @click="stop(scope.row.code)">{{ $t('auto.common.determine') }}</el-button>
</div>
<el-button slot="reference" icon="el-icon-video-play" type="text" size="mini">{{ $t('common.stop') }}</el-button>
<el-button slot="reference" icon="el-icon-video-play" type="text" size="mini">{{ $t('auto.common.stop') }}</el-button>
</el-popover>
</template>
@@ -45,15 +45,13 @@
<script>
import crudAutoRun from '@/api/system/autorun'
import CRUD, { presenter, header, form, crud } from '@crud/crud'
import CRUD, { presenter, header, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import crudJob from '@/views/system/timing/timing'
export default {
name: 'Autorun',
components: { pagination, crudOperation, rrOperation },
components: { pagination, rrOperation },
cruds() {
return CRUD({ title: '自动线程', url: 'api/autorun', crudMethod: { ...crudAutoRun }})
},