From 5052a34ece1cfe778213f3f2dd2aca67f002ae34 Mon Sep 17 00:00:00 2001 From: Cc Date: Thu, 10 Oct 2024 10:48:21 +0800 Subject: [PATCH] =?UTF-8?q?js=E4=B8=AD=E6=96=87=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/api/device.js | 2 +- src/config/setting.config.js | 2 +- src/i18n/language/en.js | 6 ++++++ src/i18n/language/zh.js | 9 ++++++++- src/main.js | 2 +- src/store/modules/user.js | 10 +++++----- src/views/analysis/facilitiesfunction/index.vue | 2 +- src/views/analysis/water/index.vue | 2 +- src/views/analysis/weekfunction/index.vue | 2 +- src/views/dev/clock/index.vue | 2 +- src/views/index/chart/alarm.vue | 6 +++--- src/views/index/chart/work.vue | 6 +++--- src/views/index/components/SiteDetail.vue | 12 ++++++------ src/views/index/components/SiteSearch.vue | 4 ++-- src/views/index/index1.vue | 4 ++-- src/views/iot/device/index.vue | 8 ++++---- src/views/party/fluorite/videoData.vue | 2 +- src/views/server/assets/components/device/index.vue | 6 +++--- src/views/server/dataEnquiry/index.vue | 2 +- src/views/server/monitor/components/SiteSearch.vue | 4 ++-- src/views/server/monitor/index.vue | 4 ++-- 22 files changed, 56 insertions(+), 42 deletions(-) diff --git a/package.json b/package.json index 9cfc844..bbdf580 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/api/device.js b/src/api/device.js index 94e0a35..7c38af6 100644 --- a/src/api/device.js +++ b/src/api/device.js @@ -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' ) { diff --git a/src/config/setting.config.js b/src/config/setting.config.js index a6f625a..43a6e6f 100644 --- a/src/config/setting.config.js +++ b/src/config/setting.config.js @@ -3,7 +3,7 @@ */ module.exports = { // 标题,此项修改后需要重启项目 (包括初次加载雪花屏的标题 页面的标题 浏览器的标题) - title: '', + title: '力鼎环保', // 标题分隔符 titleSeparator: ' - ', // 标题是否反转 diff --git a/src/i18n/language/en.js b/src/i18n/language/en.js index 3b6c7c1..9bde95c 100644 --- a/src/i18n/language/en.js +++ b/src/i18n/language/en.js @@ -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', }, }; diff --git a/src/i18n/language/zh.js b/src/i18n/language/zh.js index 38a67d6..f5040c7 100644 --- a/src/i18n/language/zh.js +++ b/src/i18n/language/zh.js @@ -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: '暂无公示牌', }, }; diff --git a/src/main.js b/src/main.js index 0effd13..74222f0 100644 --- a/src/main.js +++ b/src/main.js @@ -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); diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 1fd4430..48ed63e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -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}!`, diff --git a/src/views/analysis/facilitiesfunction/index.vue b/src/views/analysis/facilitiesfunction/index.vue index a886394..40ff451 100644 --- a/src/views/analysis/facilitiesfunction/index.vue +++ b/src/views/analysis/facilitiesfunction/index.vue @@ -10,7 +10,7 @@ > - + - +
- + -
通讯正常
+
{{ $t('siteDetails.txzc') }}
-
通讯中断
+
{{ $t('siteDetails.txzc') }}
@@ -31,16 +31,16 @@ 3
-
今日水量
+
{{ $t('siteDetails.jrsl') }}
-
联系人
+
{{ $t('siteDetails.lxr') }}
{{ deviceInfo.leader }}
-
联系电话
+
{{ $t('siteDetails.lxdh') }}
{{ deviceInfo.contact }}
@@ -55,7 +55,7 @@ />
- 暂无公示牌 + {{ $t('siteDetails.zwgsp') }}
diff --git a/src/views/index/components/SiteSearch.vue b/src/views/index/components/SiteSearch.vue index d8a10b3..fed5894 100644 --- a/src/views/index/components/SiteSearch.vue +++ b/src/views/index/components/SiteSearch.vue @@ -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) { diff --git a/src/views/index/index1.vue b/src/views/index/index1.vue index 1728cbb..69e8d8a 100644 --- a/src/views/index/index1.vue +++ b/src/views/index/index1.vue @@ -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, }, diff --git a/src/views/iot/device/index.vue b/src/views/iot/device/index.vue index 97818f9..b7bf3f7 100644 --- a/src/views/iot/device/index.vue +++ b/src/views/iot/device/index.vue @@ -18,7 +18,7 @@ @@ -46,7 +46,7 @@ @@ -65,7 +65,7 @@