add: 高级配置模块实现国际化
This commit is contained in:
@@ -14,21 +14,25 @@ import route from './route/zh'
|
||||
import auto from './auto/zh'
|
||||
import monitor from './monitor/zh'
|
||||
import timing from './timing/zh'
|
||||
import config from './config/zh'
|
||||
|
||||
export default {
|
||||
...zhLocale,
|
||||
...zh,
|
||||
...menu,
|
||||
...param,
|
||||
...device,
|
||||
...opc,
|
||||
...protocol,
|
||||
...address,
|
||||
...storageCell,
|
||||
...route,
|
||||
...instruction,
|
||||
...task,
|
||||
...history,
|
||||
...auto,
|
||||
...monitor,
|
||||
...timing
|
||||
}
|
||||
...zhLocale,
|
||||
...zh,
|
||||
...menu,
|
||||
...param,
|
||||
...device,
|
||||
...opc,
|
||||
...protocol,
|
||||
...address,
|
||||
...storageCell,
|
||||
...route,
|
||||
...instruction,
|
||||
...task,
|
||||
...history,
|
||||
...auto,
|
||||
...monitor,
|
||||
...timing,
|
||||
...config
|
||||
}
|
||||
|
||||
|
||||
23
acs/nladmin-ui/src/i18n/langs/config/en.js
Normal file
23
acs/nladmin-ui/src/i18n/langs/config/en.js
Normal file
@@ -0,0 +1,23 @@
|
||||
export default {
|
||||
'config': {
|
||||
'table': {
|
||||
'device_execution': 'Device execution',
|
||||
'please_select': 'Please select',
|
||||
'end_of_instruction': 'End of instructio',
|
||||
'end_of_task': 'End of task',
|
||||
'end_device': 'End device',
|
||||
'max': 'Maximum quantity',
|
||||
'allocation_ratio': 'Allocation ratio',
|
||||
'cancel': 'Cancel',
|
||||
'confirm': 'Confirm',
|
||||
'device_code': 'Device code',
|
||||
'destination_device': 'Destination device',
|
||||
'inst_nextdevice_code': 'Command destination device',
|
||||
'destination_configuration': 'Destination configuration',
|
||||
'operation': 'Operation',
|
||||
'device_is_not_null': 'Device code cannot be empty'
|
||||
},
|
||||
'rules': {
|
||||
}
|
||||
}
|
||||
}
|
||||
23
acs/nladmin-ui/src/i18n/langs/config/in.js
Normal file
23
acs/nladmin-ui/src/i18n/langs/config/in.js
Normal file
@@ -0,0 +1,23 @@
|
||||
export default {
|
||||
'config': {
|
||||
'table': {
|
||||
'device_execution': 'Eksekusi perangkat',
|
||||
'please_select': 'Silakan pilih',
|
||||
'end_of_instruction': 'Akhir instruksi',
|
||||
'end_of_task': 'Akhir tugas',
|
||||
'end_device': 'Perangkat akhir',
|
||||
'max': 'Jumlah maksimum',
|
||||
'allocation_ratio': 'Rasio alokasi',
|
||||
'cancel': 'Membatalkan',
|
||||
'confirm': 'Mengonfirmasi',
|
||||
'device_code': 'Kode perangkat',
|
||||
'destination_device': 'Perangkat tujuan tugas',
|
||||
'inst_nextdevice_code': 'Perangkat tujuan perintah',
|
||||
'destination_configuration': 'Konfigurasi tujuan',
|
||||
'operation': 'Operasi',
|
||||
'device_is_not_null': 'Kode perangkat tidak boleh kosong'
|
||||
},
|
||||
'rules': {
|
||||
}
|
||||
}
|
||||
}
|
||||
23
acs/nladmin-ui/src/i18n/langs/config/zh.js
Normal file
23
acs/nladmin-ui/src/i18n/langs/config/zh.js
Normal file
@@ -0,0 +1,23 @@
|
||||
export default {
|
||||
'config': {
|
||||
'table': {
|
||||
'device_execution': '执行设备',
|
||||
'please_select': '请选择',
|
||||
'end_of_instruction': '指令终点',
|
||||
'end_of_task': '任务终点',
|
||||
'end_device': '终点设备',
|
||||
'max': '最大数量',
|
||||
'allocation_ratio': '分配比例',
|
||||
'cancel': '取消',
|
||||
'confirm': '确定',
|
||||
'device_code': '设备编码',
|
||||
'destination_device': '任务终点设备',
|
||||
'inst_nextdevice_code': '指令终点设备',
|
||||
'destination_configuration': '终点配置',
|
||||
'operation': '操作',
|
||||
'device_is_not_null': '设备编码不能为空'
|
||||
},
|
||||
'rules': {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,21 +14,25 @@ import route from './route/en'
|
||||
import auto from './auto/en'
|
||||
import monitor from './monitor/en'
|
||||
import timing from './timing/en'
|
||||
import config from './config/en'
|
||||
|
||||
export default {
|
||||
...enLocale,
|
||||
...en,
|
||||
...menu,
|
||||
...param,
|
||||
...instruction,
|
||||
...task,
|
||||
...history,
|
||||
...device,
|
||||
...opc,
|
||||
...protocol,
|
||||
...address,
|
||||
...storageCell,
|
||||
...route,
|
||||
...auto,
|
||||
...monitor,
|
||||
...timing
|
||||
}
|
||||
...enLocale,
|
||||
...en,
|
||||
...menu,
|
||||
...param,
|
||||
...instruction,
|
||||
...task,
|
||||
...history,
|
||||
...device,
|
||||
...opc,
|
||||
...protocol,
|
||||
...address,
|
||||
...storageCell,
|
||||
...route,
|
||||
...auto,
|
||||
...monitor,
|
||||
...timing,
|
||||
...config
|
||||
}
|
||||
|
||||
|
||||
@@ -14,21 +14,24 @@ import route from './route/in'
|
||||
import auto from './auto/in'
|
||||
import monitor from './monitor/in'
|
||||
import timing from './timing/in'
|
||||
import config from './config/in'
|
||||
|
||||
export default {
|
||||
...idLocale,
|
||||
...id,
|
||||
...menu,
|
||||
...param,
|
||||
...instruction,
|
||||
...task,
|
||||
...history,
|
||||
...device,
|
||||
...opc,
|
||||
...protocol,
|
||||
...address,
|
||||
...storageCell,
|
||||
...route,
|
||||
...auto,
|
||||
...monitor,
|
||||
...timing
|
||||
}
|
||||
...idLocale,
|
||||
...id,
|
||||
...menu,
|
||||
...param,
|
||||
...instruction,
|
||||
...task,
|
||||
...history,
|
||||
...device,
|
||||
...opc,
|
||||
...protocol,
|
||||
...address,
|
||||
...storageCell,
|
||||
...route,
|
||||
...auto,
|
||||
...monitor,
|
||||
...config,
|
||||
...timing
|
||||
}
|
||||
|
||||
@@ -46,7 +46,11 @@ export default {
|
||||
'finish_time': 'Completion time',
|
||||
'create_type': 'Create type',
|
||||
'finish_type': 'Completion type',
|
||||
'retry_times': 'Retry count'
|
||||
'retry_times': 'Retry count',
|
||||
'please_enter_origin-column': 'Please enter origin-column!',
|
||||
'please_enter_origin_level': 'Please enter origin-level!',
|
||||
'please_select_destination_column': 'Please select destination-column!',
|
||||
'please_select_destination_level': 'Please select the destination floor!'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,11 @@ export default {
|
||||
'finish_time': 'Waktu penyelesaian',
|
||||
'create_type': 'Jenis pembuatan',
|
||||
'finish_type': 'Jenis penyelesaian',
|
||||
'retry_times': 'Jumlah percobaan ulang'
|
||||
'retry_times': 'Jumlah percobaan ulang',
|
||||
'please_enter_origin_column': 'Silakan masukkan asal-kolom!',
|
||||
'please_enter_origin_level': 'Silakan masukkan asal-level!',
|
||||
'please_select_destination_column': 'Silakan pilih tujuan-kolom!',
|
||||
'please_select_destination_level': 'Silakan pilih lantai tujuan!”'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,11 @@ export default {
|
||||
'finish_time': '完成时间',
|
||||
'create_type': '创建类型',
|
||||
'finish_type': '完成类型',
|
||||
'retry_times': '重试次数'
|
||||
'retry_times': '重试次数',
|
||||
'please_enter_origin-column': '请输入起点-列!',
|
||||
'please_enter_origin_level': '请输入起点-层!',
|
||||
'please_select_destination_column': '请选择终点-列!',
|
||||
'please_select_destination_level': '请选择终点-层!'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:visible.sync="crud.status.cu"
|
||||
:title="crud.status.title"
|
||||
width="800px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="120px">
|
||||
<el-form-item label="执行设备" prop="device_code">
|
||||
<el-form-item :label="$t('config.table.device_execution')" prop="device_code">
|
||||
<el-select
|
||||
v-model="form.device_code"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
:placeholder="$t('config.table.please_select')"
|
||||
style="width: 300px;"
|
||||
:disabled="crud.status.edit == 1"
|
||||
>
|
||||
@@ -29,12 +29,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="指令终点" prop="inst_nextDevice_code">
|
||||
<el-form-item :label="$t('config.table.end_of_instruction')" prop="inst_nextDevice_code">
|
||||
<el-select
|
||||
v-model="form.inst_nextdevice_code"
|
||||
multiple
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
:placeholder="$t('config.table.please_select')"
|
||||
style="width: 300px;"
|
||||
@change="getValue"
|
||||
>
|
||||
@@ -46,12 +46,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务终点" prop="task_nextDevice_code">
|
||||
<el-form-item :label="$t('config.table.end_of_task')" prop="task_nextDevice_code">
|
||||
<el-select
|
||||
v-model="form.task_nextdevice_code"
|
||||
filterable
|
||||
multiple
|
||||
placeholder="请选择"
|
||||
:placeholder="$t('config.table.please_select')"
|
||||
style="width: 300px;"
|
||||
>
|
||||
<el-option
|
||||
@@ -69,16 +69,16 @@
|
||||
>
|
||||
<el-table-column
|
||||
prop="device"
|
||||
label="终点设备"
|
||||
:label="$t('config.table.end_device')"
|
||||
width="180"
|
||||
/>
|
||||
|
||||
<el-table-column prop="limit" label="最大数量">
|
||||
<el-table-column prop="limit" :label="$t('config.table.max')">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="form.tableData[scope.$index].limit" size="mini" class="edit-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="scale" label="分配比例">
|
||||
<el-table-column prop="scale" :label="$t('config.table.allocation_ratio')">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="form.tableData[scope.$index].scale" size="mini" class="edit-input" />
|
||||
</template>
|
||||
@@ -87,8 +87,8 @@
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
<el-button type="text" @click="crud.cancelCU">{{ $t('config.table.cancel') }}</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('config.table.confirm') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
@@ -103,13 +103,13 @@
|
||||
<!-- <el-table-column type="selection" width="55" />-->
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="assigned_id" label="任务标识" />
|
||||
<el-table-column prop="device_code" label="设备编码" />
|
||||
<el-table-column prop="task_nextdevice_code" label="任务终点设备" />
|
||||
<el-table-column prop="inst_nextdevice_code" label="指令终点设备" />
|
||||
<el-table-column prop="param" label="终点配置" :formatter="paramFormate" />
|
||||
<el-table-column prop="device_code" :label="$t('config.table.device_code')" />
|
||||
<el-table-column prop="task_nextdevice_code" :label="$t('config.table.destination_device')" />
|
||||
<el-table-column prop="inst_nextdevice_code" :label="$t('config.table.inst_nextdevice_code')" />
|
||||
<el-table-column prop="param" :label="$t('config.table.destination_configuration')" :formatter="paramFormate" />
|
||||
<el-table-column
|
||||
v-permission="['admin','AcsDeviceAssigned:edit','AcsDeviceAssigned:del']"
|
||||
label="操作"
|
||||
:label="$t('config.table.operation')"
|
||||
width="150px"
|
||||
align="center"
|
||||
>
|
||||
@@ -170,7 +170,7 @@ export default {
|
||||
deviceList: [],
|
||||
rules: {
|
||||
device_code: [
|
||||
{ required: true, message: '设备编码不能为空', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('config.table.device_is_not_null'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:visible.sync="crud.status.cu"
|
||||
:title="crud.status.title"
|
||||
width="800px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="120px">
|
||||
<el-form-item label="执行设备" prop="device_code">
|
||||
<el-form-item :label="$t('config.table.device_execution')" prop="device_code">
|
||||
<el-select
|
||||
v-model="form.device_code"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
:placeholder="$t('config.table.please_select')"
|
||||
style="width: 300px;"
|
||||
:disabled="crud.status.edit == 1"
|
||||
>
|
||||
@@ -29,12 +29,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="指令终点" prop="inst_nextDevice_code">
|
||||
<el-form-item :label="$t('config.table.end_of_instruction')" prop="inst_nextDevice_code">
|
||||
<el-select
|
||||
v-model="form.inst_nextdevice_code"
|
||||
multiple
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
:placeholder="$t('config.table.please_select')"
|
||||
style="width: 300px;"
|
||||
@change="getValue"
|
||||
>
|
||||
@@ -46,12 +46,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务终点" prop="task_nextDevice_code">
|
||||
<el-form-item :label="$t('config.table.end_of_task')" prop="task_nextDevice_code">
|
||||
<el-select
|
||||
v-model="form.task_nextdevice_code"
|
||||
filterable
|
||||
multiple
|
||||
placeholder="请选择"
|
||||
:placeholder="$t('config.table.please_select')"
|
||||
style="width: 300px;"
|
||||
>
|
||||
<el-option
|
||||
@@ -69,16 +69,16 @@
|
||||
>
|
||||
<el-table-column
|
||||
prop="device"
|
||||
label="终点设备"
|
||||
:label="$t('config.table.end_device')"
|
||||
width="180"
|
||||
/>
|
||||
|
||||
<el-table-column prop="limit" label="最大数量">
|
||||
<el-table-column prop="limit" :label="$t('config.table.max')">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="form.tableData[scope.$index].limit" size="mini" class="edit-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="scale" label="分配比例">
|
||||
<el-table-column prop="scale" :label="$t('config.table.allocation_ratio')">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="form.tableData[scope.$index].scale" size="mini" class="edit-input" />
|
||||
</template>
|
||||
@@ -87,8 +87,8 @@
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
<el-button type="text" @click="crud.cancelCU">{{ $t('config.table.cancel') }}</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('config.table.confirm') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
@@ -103,13 +103,13 @@
|
||||
<!-- <el-table-column type="selection" width="55" />-->
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="assigned_id" label="任务标识" />
|
||||
<el-table-column prop="device_code" label="设备编码" />
|
||||
<el-table-column prop="task_nextdevice_code" label="任务终点设备" />
|
||||
<el-table-column prop="inst_nextdevice_code" label="指令终点设备" />
|
||||
<el-table-column prop="param" label="终点配置" :formatter="paramFormate" />
|
||||
<el-table-column prop="device_code" :label="$t('config.table.device_code')" />
|
||||
<el-table-column prop="task_nextdevice_code" :label="$t('config.table.destination_device')" />
|
||||
<el-table-column prop="inst_nextdevice_code" :label="$t('config.table.inst_nextdevice_code')" />
|
||||
<el-table-column prop="param" :label="$t('config.table.destination_configuration')" :formatter="paramFormate" />
|
||||
<el-table-column
|
||||
v-permission="['admin','AcsDeviceAssigned:edit','AcsDeviceAssigned:del']"
|
||||
label="操作"
|
||||
:label="$t('config.table.operation')"
|
||||
width="150px"
|
||||
align="center"
|
||||
>
|
||||
@@ -170,7 +170,7 @@ export default {
|
||||
deviceList: [],
|
||||
rules: {
|
||||
device_code: [
|
||||
{ required: true, message: '设备编码不能为空', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('config.table.device_is_not_null'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
icon="el-icon-refresh"
|
||||
@click="reload"
|
||||
>
|
||||
{{ $t('common.Synchronize') }}
|
||||
{{ $t('common.synchronous') }}
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
@@ -387,6 +387,7 @@ import pagination from '@crud/Pagination'
|
||||
import deviceCrud from '@/api/acs/device/device'
|
||||
import routeCurd from '@/api/acs/route/routePlan'
|
||||
import { getDicts } from '@/views/system/dict/dict'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
export default {
|
||||
name: 'Task',
|
||||
@@ -394,7 +395,7 @@ export default {
|
||||
dicts: ['task_status', 'task_type', 'agv_system_type', 'storage_task_type'],
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '任务', url: 'api/task', idField: 'task_id', sort: 'task_id,desc',
|
||||
return CRUD({ title: i18n.t('task.txt_box.Task'), url: 'api/task', idField: 'task_id', sort: 'task_id,desc',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: true,
|
||||
@@ -408,7 +409,7 @@ export default {
|
||||
const checkFromY = (rule, value, callback) => {
|
||||
if (this.start_flag) {
|
||||
if (!value) {
|
||||
callback(new Error('请选择起点-列!'))
|
||||
callback(new Error(this.$t('task.select.please_enter_origin_column')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
@@ -419,7 +420,7 @@ export default {
|
||||
const checkFromZ = (rule, value, callback) => {
|
||||
if (this.start_flag) {
|
||||
if (!value) {
|
||||
callback(new Error('请选择起点-层!'))
|
||||
callback(new Error(this.$t('task.select.please_enter_origin_level')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
@@ -430,7 +431,7 @@ export default {
|
||||
const checkToY = (rule, value, callback) => {
|
||||
if (this.end_flag) {
|
||||
if (!value) {
|
||||
callback(new Error('请选择终点-列!'))
|
||||
callback(new Error(this.$t('task.select.please_select_destination_column')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
@@ -441,7 +442,7 @@ export default {
|
||||
const checkToZ = (rule, value, callback) => {
|
||||
if (this.end_flag) {
|
||||
if (!value) {
|
||||
callback(new Error('请选择终点-列!'))
|
||||
callback(new Error(this.$t('task.select.please_select_destination_level')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user