opt:菜单国际化

This commit is contained in:
2026-01-14 20:25:51 +08:00
parent 391f574a2e
commit 80e7f24845
26 changed files with 157 additions and 72 deletions

View File

@@ -36,7 +36,6 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item divided command="zh">简体中文</el-dropdown-item>
<el-dropdown-item divided command="en">English</el-dropdown-item>
<el-dropdown-item divided command="iv">Vietnamese</el-dropdown-item>
<el-dropdown-item divided command="id">Indonesian</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@@ -136,8 +135,6 @@ export default {
this.language = 'English'
} else if (command === 'zh') {
this.language = '简体中文'
} else if (command === 'iv') {
this.language = 'Vietnamese'
} else if (command === 'id') {
this.language = 'Indonesian'
}

View File

@@ -92,6 +92,27 @@
:placeholder="$t('sys_menu.title')"
/>
</el-form-item>
<el-form-item v-if="form.type.toString() !== '2'" :label="$t('menu.zh_title')" prop="zh_title">
<el-input
v-model="form.zh_title"
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
:placeholder="$t('menu.zh_title')"
/>
</el-form-item>
<el-form-item v-if="form.type.toString() !== '2'" :label="$t('menu.en_title')" prop="en_title">
<el-input
v-model="form.en_title"
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
:placeholder="$t('menu.en_title')"
/>
</el-form-item>
<el-form-item v-if="form.type.toString() !== '2'" :label="$t('menu.id_title')" prop="id_title">
<el-input
v-model="form.id_title"
:style=" form.type.toString() === '0' ? 'width: 450px' : 'width: 190px'"
:placeholder="$t('menu.id_title')"
/>
</el-form-item>
<el-form-item v-if="form.type.toString() === '2'" :label="$t('sys_menu.button_name')" prop="title">
<el-input v-model="form.title" :placeholder="$t('sys_menu.button_name')" style="width: 190px;" />
</el-form-item>
@@ -222,6 +243,9 @@ import Dict from '../../../components/Dict/Dict'
const defaultForm = {
menu_id: null,
title: null,
en_title: null,
id_title: null,
zh_title: null,
menu_sort: 999,
path: null,
system_type: null,
@@ -259,6 +283,15 @@ export default {
title: [
{ required: true, message: '请输入标题', trigger: 'blur' }
],
zh_title: [
{ required: true, message: '请输入标题', trigger: 'blur' }
],
en_title: [
{ required: true, message: '请输入标题', trigger: 'blur' }
],
id_title: [
{ required: true, message: '请输入标题', trigger: 'blur' }
],
path: [
{ required: true, message: '请输入地址', trigger: 'blur' }
]

View File

@@ -67,7 +67,7 @@
<el-form-item :label="$t('wms.basedata.master.class.topCategory')">
<el-radio-group v-model="form.isTop" style="width: 140px">
<el-radio label="1">{{ $t('common.yes') }}</el-radio>
<el-radio label="0">{{ $t('common.no') }}</el-radio>
<el-radio label="0">{{ $t('common.No') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.isTop === '0'" style="margin-bottom: 0;" :label="$t('wms.basedata.master.class.parentCategory')" prop="pid">
@@ -81,8 +81,8 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('common.cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.confirm') }}</el-button>
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
</div>
</el-dialog>
<!--表格渲染-->
@@ -246,7 +246,7 @@ export default {
if (row.is_modify === '1') {
return this.$t('common.yes')
} else {
return this.$t('common.no')
return this.$t('common.No')
}
},
dataTypeChange(data) {

View File

@@ -95,8 +95,8 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('common.cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.confirm') }}</el-button>
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
</div>
</el-dialog>
<!--表格渲染-->

View File

@@ -63,7 +63,7 @@
<el-col :span="12">
<el-form-item :label="$t('wms.basedata.master.interfaceback.isReturn')" prop="is_back">
<el-radio v-model="form.is_back" label="1">{{ $t('common.yes') }}</el-radio>
<el-radio v-model="form.is_back" label="0">{{ $t('common.no') }}</el-radio>
<el-radio v-model="form.is_back" label="0">{{ $t('common.No') }}</el-radio>
</el-form-item>
</el-col>
</el-row>
@@ -97,8 +97,8 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('common.cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.confirm') }}</el-button>
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
</div>
</el-dialog>
<!--表格渲染-->

View File

@@ -40,13 +40,13 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('common.isEnabled')" prop="is_active">
<el-radio v-model="form.is_active" label="0">{{ $t('common.no') }}</el-radio>
<el-radio v-model="form.is_active" label="0">{{ $t('common.No') }}</el-radio>
<el-radio v-model="form.is_active" label="1">{{ $t('common.yes') }}</el-radio>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('common.cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.confirm') }}</el-button>
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
</div>
</el-dialog>
<!--表格渲染-->
@@ -130,8 +130,8 @@ export default {
// 改变状态
changeEnabled(data, val) {
this.$confirm(this.$t('wms.basedata.master.sales.confirmOperation', { status: this.dict.label.is_used[val], code: data.sales_code }), this.$t('common.prompt'), {
confirmButtonText: this.$t('common.confirm'),
cancelButtonText: this.$t('common.cancel'),
confirmButtonText: this.$t('common.Confirm'),
cancelButtonText: this.$t('common.Cancel'),
type: 'warning'
}).then(() => {
crudSales.edit(data).then(res => {

View File

@@ -165,8 +165,8 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('common.cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.confirm') }}</el-button>
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
</div>
</el-dialog>
<!--表格渲染-->
@@ -305,8 +305,8 @@ export default {
// 改变状态
changeEnabled(data, val) {
this.$confirm(this.$t('wms.basedata.master.transport.confirmOperation', { status: this.dict.label.is_used[val], name: data.unit_name }), this.$t('common.prompt'), {
confirmButtonText: this.$t('common.confirm'),
cancelButtonText: this.$t('common.cancel'),
confirmButtonText: this.$t('common.Confirm'),
cancelButtonText: this.$t('common.Cancel'),
type: 'warning'
}).then(() => {
crudTransportationbase.edit(data).then(res => {

View File

@@ -8,7 +8,7 @@
v-model="query.blurry"
size="mini"
clearable
:placeholder="$t('wms.basedata.product.userArea.searchPlaceholder')"
:placeholder="$t('common.enterNameOrDescriptionToSearch')"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"

View File

@@ -113,7 +113,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item :label="$t('wms.basedata.st.boxInfo.vehicleType') + ':'" prop="vehicle_type">
<el-select v-model="form.vehicle_type" :placeholder="$t('wms.basedata.st.boxInfo.vehicleTypePlaceholder')" clearable style="width: 200px;">
<el-select v-model="form.vehicle_type" :placeholder="$t('wms.basedata.master.st.boxInfo.vehicleTypePlaceholder')" clearable style="width: 200px;">
<el-option
v-for="item in vehicleTypeList"
:key="item.value"
@@ -157,7 +157,7 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('common.cancel') }}</el-button>
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
<el-button type="text" :loading="crud.cu === 2" @click="crud.submitCU">{{ $t('common.save') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="savePrint">{{ $t('common.saveAndPrint') }}</el-button>
</div>

View File

@@ -118,20 +118,20 @@
<el-col :span="12">
<el-form-item :label="$t('wms.basedata.st.boxType.isFirstLashing') + ':'" prop="need_lash_one">
<el-radio v-model="form.need_lash_one" label="1" style="width: 79px;" border>{{ $t('common.yes') }}</el-radio>
<el-radio v-model="form.need_lash_one" label="0" style="width: 79px;" border>{{ $t('common.no') }}</el-radio>
<el-radio v-model="form.need_lash_one" label="0" style="width: 79px;" border>{{ $t('common.No') }}</el-radio>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('wms.basedata.st.boxType.isSecondLashing') + ':'" prop="need_lash_two">
<el-radio v-model="form.need_lash_two" label="1" style="width: 79px;" border>{{ $t('common.yes') }}</el-radio>
<el-radio v-model="form.need_lash_two" label="0" style="width: 79px;" border>{{ $t('common.no') }}</el-radio>
<el-radio v-model="form.need_lash_two" label="0" style="width: 79px;" border>{{ $t('common.No') }}</el-radio>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('common.cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.confirm') }}</el-button>
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
</div>
</el-dialog>
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
@@ -155,12 +155,12 @@
</el-col>
<el-col :span="4">
<span>
<el-button icon="el-icon-close" size="mini" type="info" @click="dialogVisible2 = false">{{ $t('common.cancel') }}</el-button>
<el-button icon="el-icon-close" size="mini" type="info" @click="dialogVisible2 = false">{{ $t('common.Cancel') }}</el-button>
</span>
</el-col>
<el-col :span="4">
<span>
<el-button icon="el-icon-check" size="mini" type="primary" @click="confirmUpdate()">{{ $t('common.confirm') }}</el-button>
<el-button icon="el-icon-check" size="mini" type="primary" @click="confirmUpdate()">{{ $t('common.Confirm') }}</el-button>
</span>
</el-col>
</el-row>

View File

@@ -120,8 +120,8 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('common.cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.confirm') }}</el-button>
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
</div>
</el-dialog>
<!--表格渲染-->
@@ -303,8 +303,8 @@ export default {
msg = this.$t('wms.basedata.st.sect.confirmEnable')
}
this.$confirm(msg, this.$t('common.prompt'), {
confirmButtonText: this.$t('common.confirm'),
cancelButtonText: this.$t('common.cancel'),
confirmButtonText: this.$t('common.Confirm'),
cancelButtonText: this.$t('common.Cancel'),
type: 'warning'
}).then(() => {
crudSectattr.changeActive(data).then(res => {

View File

@@ -95,7 +95,7 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-form-item :label="$t('wms.basedata.st.stor.storType')" required>
<el-form-item :label="$t('common.storType')" required>
<el-col :span="4" />
<el-col :span="4">
<el-checkbox v-model="form.is_materialstore" true-label="1" false-label="0">{{ $t('wms.basedata.st.stor.rawMaterialStor') }}</el-checkbox>
@@ -110,7 +110,7 @@
<el-checkbox v-model="form.is_attachment" true-label="1" false-label="0">{{ $t('wms.basedata.st.stor.sparePartStor') }}</el-checkbox>
</el-col>
<el-col :span="4">
<el-checkbox v-model="form.is_virtualstore" true-label="1" false-label="0">{{ $t('wms.basedata.st.stor.virtualStor') }}</el-checkbox>
<el-checkbox v-model="form.is_virtualstore" true-label="1" false-label="0">{{ $t('common.virtualStor') }}</el-checkbox>
</el-col>
</el-form-item>
@@ -125,8 +125,8 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('common.cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.confirm') }}</el-button>
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
</div>
</el-dialog>
<!--表格渲染-->
@@ -328,13 +328,13 @@ export default {
return is_used === '1'
},
changeEnabled(data, val) {
let msg = $t('wms.basedata.st.stor.operationWillDisableContinue')
let msg = this.$t('wms.basedata.st.stor.operationWillDisableContinue')
if (val !== '1') {
msg = $t('wms.basedata.st.stor.operationWillEnableContinue')
msg = this.$t('wms.basedata.st.stor.operationWillEnableContinue')
}
this.$confirm(msg, $t('common.tip'), {
confirmButtonText: $t('common.confirm'),
cancelButtonText: $t('common.cancel'),
this.$confirm(msg, this.$t('common.tip'), {
confirmButtonText: this.$t('common.Confirm'),
cancelButtonText: this.$t('common.Cancel'),
type: 'warning'
}).then(() => {
crudStorattr.changeActive(data).then(res => {

View File

@@ -284,13 +284,13 @@
<el-col :span="8">
<el-form-item :label="$t('wms.basedata.st.struct.isTemporary')" prop="is_tempstruct">
<el-radio v-model="form.is_tempstruct" label="1">{{ $t('common.yes') }}</el-radio>
<el-radio v-model="form.is_tempstruct" label="0">{{ $t('common.no') }}</el-radio>
<el-radio v-model="form.is_tempstruct" label="0">{{ $t('common.No') }}</el-radio>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('wms.basedata.st.struct.isEmptyVehicle')" prop="is_emptyvehicle">
<el-radio v-model="form.is_emptyvehicle" label="1">{{ $t('common.yes') }}</el-radio>
<el-radio v-model="form.is_emptyvehicle" label="0">{{ $t('common.no') }}</el-radio>
<el-radio v-model="form.is_emptyvehicle" label="0">{{ $t('common.No') }}</el-radio>
</el-form-item>
</el-col>
</el-row>
@@ -592,9 +592,9 @@ export default {
if (val !== '1') {
msg = '此操作将启用,是否继续!'
}
this.$confirm(msg, $t('common.tip'), {
confirmButtonText: $t('common.confirm'),
cancelButtonText: $t('common.cancel'),
this.$confirm(msg, this.$t('common.tip'), {
confirmButtonText: this.$t('common.Confirm'),
cancelButtonText: this.$t('common.Cancel'),
type: 'warning'
}).then(() => {
crudStructattr.changeActive(data).then(res => {

View File

@@ -126,8 +126,8 @@ export default {
msg = this.$t('wms.mps.device.confirmEnable')
}
this.$confirm(msg, this.$t('common.tip'), {
confirmButtonText: this.$t('common.confirm'),
cancelButtonText: this.$t('common.cancel'),
confirmButtonText: this.$t('common.Confirm'),
cancelButtonText: this.$t('common.Cancel'),
type: 'warning'
}).then(() => {
crudDevice.changeActive(data).then(res => {

View File

@@ -239,8 +239,8 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('common.cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.confirm') }}</el-button>
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
</div>
</el-dialog>
<!--表格渲染-->

View File

@@ -484,17 +484,17 @@ export default {
mstrow: {},
updowns: [{
value: '1',
label: $t('wms.pdm.order.slittingplan.upAxis')
label: this.$t('wms.pdm.order.slittingplan.upAxis')
}, {
value: '2',
label: $t('wms.pdm.order.slittingplan.downAxis')
label: this.$t('wms.pdm.order.slittingplan.downAxis')
}],
leftorrights: [{
value: '1',
label: $t('wms.pdm.order.slittingplan.leftRoll')
label: this.$t('wms.pdm.order.slittingplan.leftRoll')
}, {
value: '2',
label: $t('wms.pdm.order.slittingplan.rightRoll')
label: this.$t('wms.pdm.order.slittingplan.rightRoll')
}],
materType: '',
customType: '',

View File

@@ -441,8 +441,8 @@ export default {
msg = this.$t('common.confirmEnable')
}
this.$confirm(msg, this.$t('common.tip'), {
confirmButtonText: this.$t('common.confirm'),
cancelButtonText: this.$t('common.cancel'),
confirmButtonText: this.$t('common.Confirm'),
cancelButtonText: this.$t('common.Cancel'),
type: 'warning'
}).then(() => {
changeActive(data).then(res => {