js中文翻译

This commit is contained in:
Cc 2024-10-10 10:48:21 +08:00
parent aa2e25f49b
commit 5052a34ece
22 changed files with 56 additions and 42 deletions

View File

@ -50,6 +50,7 @@
"jsencrypt": "^3.2.0",
"lodash": "^4.17.21",
"mockjs": "^1.1.0",
"node-ssh": "^13.2.0",
"nprogress": "^0.2.0",
"qs": "^6.10.1",
"quill-image-drop-module": "^1.0.3",

View File

@ -48,7 +48,7 @@ export function getDeviceData(data) {
param += '&townCode=' + data.townCode;
}
if (
data.commPro != '全部协议' &&
data.commPro != 'Entire agreement' &&
data.commPro != undefined &&
data.commPro != 'all'
) {

View File

@ -3,7 +3,7 @@
*/
module.exports = {
// 标题,此项修改后需要重启项目 (包括初次加载雪花屏的标题 页面的标题 浏览器的标题)
title: '',
title: '力鼎环保',
// 标题分隔符
titleSeparator: ' - ',
// 标题是否反转

View File

@ -385,6 +385,12 @@ const en = {
dw: 'Unit',
dx: 'Read-write',
xfzl: 'Issue command',
txzc: 'Communication is normal',
txzd: 'interruption of communication',
jrsl: 'Today water volume',
lxr: 'contacts',
lxdh: 'Contact Number',
zwgsp: 'There are currently no public signs available',
},
};

View File

@ -301,7 +301,7 @@ const zh = {
txxy: '通信协议',
qxztxxy: '请选择通信协议',
qb: 'all',
qbxy: '全部协议',
qbxy: 'Entire agreement',
zt: '状态',
qxzzt: '请选择状态',
zdmc: '站点名称',
@ -386,6 +386,13 @@ const zh = {
dw: '单位',
dx: '读写',
xfzl: '下发指令',
txzc: '通讯正常',
txzd: '通讯中断',
jrsl: '今日水量',
lxr: '联系人',
lxdh: '联系电话',
zwgsp: '暂无公示牌',
},
};

View File

@ -10,7 +10,7 @@ import CKEditor from '@ckeditor/ckeditor5-vue';
const app = createApp(App);
import i18n from './i18n';
Vue.prototype.$t = (key, value) => i18n.t(key, value);
app.use(i18n);
app.use(ElementPlus, { locale });
app.use(CKEditor);

View File

@ -53,14 +53,14 @@ const actions = {
const hour = new Date().getHours();
const thisTime =
hour < 8
? '早上好'
? 'Good morning'
: hour <= 11
? '上午好'
? 'Good morning'
: hour <= 13
? '中午好'
? 'Good afternoon'
: hour < 18
? '下午好'
: '晚上好';
? 'Good afternoon'
: 'Good evening';
ElNotification.success({
title: `welcome login ${title}`,
message: `${thisTime}`,

View File

@ -10,7 +10,7 @@
></el-date-picker>
</el-form-item>
<el-form-item :label="$t('dataEnquiry.jd')">
<el-select v-model="value" placeholder="请选择街道">
<el-select v-model="value" :placeholder="$t('dataEnquiry.qxzjd')">
<el-option
v-for="item in options"
:key="item.value"

View File

@ -10,7 +10,7 @@
></el-date-picker>
</el-form-item>
<el-form-item :label="$t('dataEnquiry.jd')">
<el-select v-model="value" placeholder="请选择街道">
<el-select v-model="value" :placeholder="$t('dataEnquiry.qxzjd')">
<el-option
v-for="item in options"
:key="item.value"

View File

@ -29,7 +29,7 @@
<el-form-item width="100" :label="$t('dataEnquiry.jd')">
<el-select
v-model="queryForm.townCode"
placeholder="请选择街道"
:placeholder="$t('dataEnquiry.qxzjd')"
@change="changeTown"
>
<el-option

View File

@ -44,7 +44,7 @@
</el-form>
</div>
<div class="manage-input">
<el-form ref="queryForm" :model="queryForm" label-width="80px">
<el-form ref="queryForm" :model="queryForm" label-width="84px">
<vab-query-form>
<el-form-item width="100" prop="time" :label="$t('defalult.xzrq')">
<el-date-picker

View File

@ -62,15 +62,15 @@ export default {
this.alarmData = [
{
value: data.handle,
name: '已处理',
name: 'processed',
},
{
value: data.unHandle,
name: '未处理',
name: 'untreated',
},
{
value: data.total,
name: '总数',
name: 'total',
},
];
},

View File

@ -63,15 +63,15 @@ export default {
this.taskData = [
{
value: data.handle,
name: '已处理',
name: 'processed',
},
{
value: data.unHandle,
name: '未处理',
name: 'untreated',
},
{
value: data.total,
name: '总数',
name: 'total',
},
];
},

View File

@ -13,7 +13,7 @@
class="tips-image"
:src="require('@/assets/success.png')"
/>
<div class="tips">通讯正常</div>
<div class="tips">{{ $t('siteDetails.txzc') }}</div>
</div>
<div v-else class="item status">
<el-image
@ -21,7 +21,7 @@
:src="require('@/assets/interrupt.png')"
style="width: 54px; height: 54px"
/>
<div class="tips">通讯中断</div>
<div class="tips">{{ $t('siteDetails.txzc') }}</div>
</div>
<div class="item flow">
<div class="flow-container">
@ -31,16 +31,16 @@
<sup>3</sup>
</div>
</div>
<div class="tips">今日水量</div>
<div class="tips">{{ $t('siteDetails.jrsl') }}</div>
</div>
</div>
<div class="line"></div>
<div class="contact-item">
<div class="label">联系人</div>
<div class="label">{{ $t('siteDetails.lxr') }}</div>
<div class="value">{{ deviceInfo.leader }}</div>
</div>
<div class="contact-item">
<div class="label">联系电话</div>
<div class="label">{{ $t('siteDetails.lxdh') }}</div>
<div class="value">{{ deviceInfo.contact }}</div>
</div>
</div>
@ -55,7 +55,7 @@
/>
</div>
<div v-else class="body-item" style="text-align: center">
<text style="line-height: 180px">暂无公示牌</text>
<text style="line-height: 180px">{{ $t('siteDetails.zwgsp') }}</text>
</div>
<div class="body-item">
<div v-for="(label, key) in sensorData" :key="key" class="label-item">

View File

@ -80,7 +80,7 @@ export default {
data() {
return {
filterText: '所有站点',
filterText: 'all sites',
expand: false,
};
},
@ -95,7 +95,7 @@ export default {
onToggle(show) {
this.expand = show;
if (!this.expand) {
!this.filterText && (this.filterText = '所有站点');
!this.filterText && (this.filterText = 'all sites');
}
},
onNodeClick(x) {

View File

@ -70,12 +70,12 @@ export default {
// http://lbs.tianditu.gov.cn/api/js4.0/class.html
const ctrl = new T.Control.MapType([
{
title: '地图',
title: 'map',
icon: 'http://api.tianditu.gov.cn/v4.0/image/map/maptype/vector.png',
layer: window.TMAP_NORMAL_MAP,
},
{
title: '卫星',
title: 'satellite',
icon: ' http://api.tianditu.gov.cn/v4.0/image/map/maptype/satellite.png',
layer: window.TMAP_SATELLITE_MAP,
},

View File

@ -18,7 +18,7 @@
<el-input
v-model="queryForm.serial"
size="small"
placeholder="请输入序列号"
:placeholder="$t('dataEnquiry.qsrxlh')"
></el-input>
</el-form-item>
<el-form-item
@ -29,7 +29,7 @@
<el-input
v-model="queryForm.community"
size="small"
placeholder="请输入社区"
:placeholder="$t('dataEnquiry.qsrsq')"
></el-input>
</el-form-item>
</vab-query-form>
@ -46,7 +46,7 @@
<el-select
v-model="queryForm.townCode"
size="small"
placeholder="请选择街道"
:placeholder="$t('dataEnquiry.qxzjd')"
>
<el-option
v-for="item in townData"
@ -423,7 +423,7 @@ export default {
serial: '',
community: '',
townCode: '',
commPro: '全部协议',
commPro: 'Entire agreement',
status: 3,
},
};

View File

@ -23,7 +23,7 @@
<el-input
v-model="queryForm.deviceSerial"
size="small"
placeholder="请输入序列号"
:placeholder="$t('dataEnquiry.qsrxlh')"
></el-input>
</el-form-item>
<el-form-item

View File

@ -18,7 +18,7 @@
<el-input
v-model="queryForm.serial"
size="small"
placeholder="请输入序列号"
:placeholder="$t('dataEnquiry.qsrxlh')"
></el-input>
</el-form-item>
<el-form-item
@ -29,7 +29,7 @@
<el-input
v-model="queryForm.community"
size="small"
placeholder="请输入社区"
:placeholder="$t('dataEnquiry.qsrsq')"
></el-input>
</el-form-item>
</vab-query-form>
@ -65,7 +65,7 @@
<el-select
v-model="queryForm.townCode"
size="small"
placeholder="请选择街道"
:placeholder="$t('dataEnquiry.qxzjd')"
>
<el-option
v-for="item in townData"

View File

@ -386,7 +386,7 @@ export default {
serial: '',
community: '',
townCode: '',
commPro: '全部协议',
commPro: 'Entire agreement',
status: 3,
},
};

View File

@ -80,7 +80,7 @@ export default {
data() {
return {
filterText: '所有站点',
filterText: 'all sites',
expand: false,
};
},
@ -95,7 +95,7 @@ export default {
onToggle(show) {
this.expand = show;
if (!this.expand) {
!this.filterText && (this.filterText = '所有站点');
!this.filterText && (this.filterText = 'all sites');
}
},
onNodeClick(x) {

View File

@ -60,12 +60,12 @@ export default {
// http://lbs.tianditu.gov.cn/api/js4.0/class.html
const ctrl = new T.Control.MapType([
{
title: '地图',
title: 'map',
icon: 'http://api.tianditu.gov.cn/v4.0/image/map/maptype/vector.png',
layer: window.TMAP_NORMAL_MAP,
},
{
title: '卫星',
title: 'satellite',
icon: ' http://api.tianditu.gov.cn/v4.0/image/map/maptype/satellite.png',
layer: window.TMAP_SATELLITE_MAP,
},