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", "jsencrypt": "^3.2.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"node-ssh": "^13.2.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"qs": "^6.10.1", "qs": "^6.10.1",
"quill-image-drop-module": "^1.0.3", "quill-image-drop-module": "^1.0.3",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -44,7 +44,7 @@
</el-form> </el-form>
</div> </div>
<div class="manage-input"> <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> <vab-query-form>
<el-form-item width="100" prop="time" :label="$t('defalult.xzrq')"> <el-form-item width="100" prop="time" :label="$t('defalult.xzrq')">
<el-date-picker <el-date-picker

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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