再登大屏修改及国际化相关修改

This commit is contained in:
123456 2023-05-15 11:57:06 +08:00
parent 05c8572071
commit 9ae87c892a
13 changed files with 215 additions and 176 deletions

View File

@ -1,5 +1,5 @@
<!-- <!--
* @FilePath: \wwwd:\code\screenFront\src\components\assembly\RotationTable.vue * @FilePath: \screenFront\src\components\assembly\RotationTable.vue
* @Author: 王路平 * @Author: 王路平
* @文件版本: V1.0.0 * @文件版本: V1.0.0
* @Date: 2023-02-16 15:09:06 * @Date: 2023-02-16 15:09:06
@ -20,7 +20,7 @@
<div class="box"> <div class="box">
<h2>{{ props.title }}</h2> <h2>{{ props.title }}</h2>
</div> </div>
<dv-scroll-board <zd-scroll-board
ref="devList" ref="devList"
:config="props.data.data" :config="props.data.data"
@click="dvClick" @click="dvClick"
@ -51,6 +51,7 @@ import { getCurrentInstance, onMounted, reactive, ref, watch } from "vue";
import { EDataPerson, devListType } from "@/type/InPlantProducts"; import { EDataPerson, devListType } from "@/type/InPlantProducts";
import border2 from "@/components/borderBox/border2.vue"; import border2 from "@/components/borderBox/border2.vue";
import border6 from "@/components/borderBox/border6.vue"; import border6 from "@/components/borderBox/border6.vue";
import zdScrollBoard from "@/components/data-view/index.vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { Offsite } from "@/store/module/offsite"; import { Offsite } from "@/store/module/offsite";
// const { proxy } = getCurrentInstance() as any; // const { proxy } = getCurrentInstance() as any;

View File

@ -7,6 +7,7 @@
* *
* 版权信息 : 2023 by ${}, All Rights Reserved. * 版权信息 : 2023 by ${}, All Rights Reserved.
*/ */
import { getStoredLanguage } from '@/utils/languageStorage';
import {onMounted, onUnmounted, reactive, ref} from 'vue' import {onMounted, onUnmounted, reactive, ref} from 'vue'
export default function( ){ export default function( ){
let timeHtml =ref('') let timeHtml =ref('')
@ -22,7 +23,11 @@ export default function( ){
// 周日-周六(0-6) 刚好对应数字下标 // 周日-周六(0-6) 刚好对应数字下标
var day = time.getDay(); var day = time.getDay();
var arr = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]; if (getStoredLanguage() == 'English/USD') {
var arr = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
} else {
var arr = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
}
var hours:any = time.getHours(); var hours:any = time.getHours();
var minutes:any = time.getMinutes(); var minutes:any = time.getMinutes();
var seconds:any = time.getSeconds(); var seconds:any = time.getSeconds();

View File

@ -11,7 +11,7 @@
export default { export default {
messages: { messages: {
'energyConsume': 'Energy Consumption Real-time Monitoring System', 'energyConsume': 'Energy Consumption Real-time Monitoring System',
'ECHistoryData' :'能耗 历史数据检测系统', 'ECHistoryData' :'Energy Historical data detection System',
'generalEnvironment': 'Environment-Convention Real-time Monitoring System', 'generalEnvironment': 'Environment-Convention Real-time Monitoring System',
'InPlantProducts': 'Iot System Products in Factory', 'InPlantProducts': 'Iot System Products in Factory',
'Mechanics': 'Machinery Factory Equipment Monitor and Control Center', 'Mechanics': 'Machinery Factory Equipment Monitor and Control Center',

View File

@ -7,36 +7,44 @@
* *
* 版权信息 : 2023 by ${}, All Rights Reserved. * 版权信息 : 2023 by ${}, All Rights Reserved.
*/ */
export function gettime(data=null){
import { getStoredLanguage } from "../utils/languageStorage";
export function gettime(data = null) {
var time var time
if(data){ if (data) {
time = new Date(data); time = new Date(data);
}else{ } else {
time = new Date(); time = new Date();
} }
var year = time.getFullYear(); var year = time.getFullYear();
// 1月到12月(0-11) // 1月到12月(0-11)
var month = time.getMonth()+1; var month = time.getMonth() + 1;
var dates = time.getDate(); var dates = time.getDate();
// 周日-周六(0-6) 刚好对应数字下标 // 周日-周六(0-6) 刚好对应数字下标
var day = time.getDay(); var day = time.getDay();
var arr = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]; console.log(getStoredLanguage());
var hours:any = time.getHours();
var minutes:any = time.getMinutes(); if (getStoredLanguage() == 'English/USD') {
var seconds:any = time.getSeconds(); var arr = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
} else {
var arr = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
}
var hours: any = time.getHours();
var minutes: any = time.getMinutes();
var seconds: any = time.getSeconds();
// 小于10分钟前面补零 // 小于10分钟前面补零
if (hours < 10) hours = "0" + hours; if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes; if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds; if (seconds < 10) seconds = "0" + seconds;
return year + "-" + month + "-" + dates + " "+hours+':'+minutes+':'+seconds+' '+arr[day]; return year + "-" + month + "-" + dates + " " + hours + ':' + minutes + ':' + seconds + ' ' + arr[day];
} }
export function clacendTime(endtime,nowtime){ export function clacendTime(endtime, nowtime) {
let newDate=Math.abs( endtime-nowtime) let newDate = Math.abs(endtime - nowtime)
var day=Math.floor(newDate/1000/60/60/24) var day = Math.floor(newDate / 1000 / 60 / 60 / 24)
var h=Math.floor(newDate/1000/60/60%24) var h = Math.floor(newDate / 1000 / 60 / 60 % 24)
var m=Math.floor(newDate/1000/60%60) var m = Math.floor(newDate / 1000 / 60 % 60)
var s=Math.floor(newDate/1000%60) var s = Math.floor(newDate / 1000 % 60)
return day+'天'+h+'时'+m+'分'+s+'秒' return day + '天' + h + '时' + m + '分' + s + '秒'
} }

View File

@ -12,7 +12,7 @@
<div class="content-left"> <div class="content-left">
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<gateway ref="gateway1" :title="t('messages.QiCheCommunication')" @click="toLegionProducts(5,'汽车军团')"> </gateway> <gateway ref="gateway1" :title="t('messages.QiCheCommunication')" @click="toLegionProducts(5,t('messages.QiCheLegion'))"> </gateway>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<gateway ref="gateway2" :title="t('messages.FuZhuangCommunication')" @click="toLegionProducts(3,'服装军团')"> </gateway> <gateway ref="gateway2" :title="t('messages.FuZhuangCommunication')" @click="toLegionProducts(3,'服装军团')"> </gateway>

View File

@ -1,5 +1,5 @@
<!-- <!--
* @FilePath: \wwwd:\code\screenFront\src\views\Temp\Large_Format\index.vue * @FilePath: \screenFront\src\views\Temp\Large_Format\index.vue
* @Author: 王路平 * @Author: 王路平
* @文件版本: V1.0.0 * @文件版本: V1.0.0
* @Date: 2023-02-17 15:04:50 * @Date: 2023-02-17 15:04:50
@ -144,7 +144,7 @@ async function getDeviceDetailfun() {
"realityTime": "", "realityTime": "",
"planProductionDate": "2023年04月11日", "planProductionDate": "2023年04月11日",
"customerSalesman": "王佳美", "customerSalesman": "王佳美",
"progress": "100", "progress": "70",
"salesPerson": "王佳美", "salesPerson": "王佳美",
"deliveryDate": "", "deliveryDate": "",
"tradeType": "外贸", "tradeType": "外贸",

View File

@ -1,5 +1,5 @@
<!-- <!--
* @FilePath: \wwwd:\code\screenFront\src\views\Offsite\child\childContent\center.vue * @FilePath: \screenFront\src\views\Temp\OffsiteDevList\childContent\center.vue
* @Author: 王路平 * @Author: 王路平
* @文件版本: V1.0.0 * @文件版本: V1.0.0
* @Date: 2023-04-12 08:46:57 * @Date: 2023-04-12 08:46:57
@ -145,8 +145,8 @@ function changedevlist(val: any) {
res.deviceType, res.deviceType,
res.realityDate, res.realityDate,
JSON.parse(res.deviceStatus) JSON.parse(res.deviceStatus)
? t('messages.onLine') ? `<span style="color:#20aec5;">${t('messages.onLine')}</span>`
: t('messages.offline'), : `<span style="color:rgb(228, 57, 97);">${t('messages.offline')}</span>`,
// "", // "",
]); ]);

View File

@ -1,5 +1,5 @@
<!-- <!--
* @FilePath: \wwwd:\code\screenFront\src\views\Offsite\child\childContent\chart\devTip.vue * @FilePath: \screenFront\src\views\Temp\OffsiteDevList\childContent\chart\devTip.vue
* @Author: 王路平 * @Author: 王路平
* @文件版本: V1.0.0 * @文件版本: V1.0.0
* @Date: 2023-04-12 10:21:10 * @Date: 2023-04-12 10:21:10
@ -33,7 +33,7 @@
<p>时间:<span>{{ res.ts }}</span></p> <p>时间:<span>{{ res.ts }}</span></p>
</div> </div>
<div class="item-text"> <div class="item-text">
<p><span :style="{ color: JSON.parse(res.status) ? 'green' : 'red' }">{{ JSON.parse(res.status) ? t('messages.onLine') : t('messages.offline') }}</span></p> <p><span :style="{ color: JSON.parse(res.status) ? '#20aec5' : 'rgb(228, 57, 97)' }">{{ JSON.parse(res.status) ? t('messages.onLine') : t('messages.offline') }}</span></p>
<p>{{t('messages.DevName')}}:<span>{{ res.name }}</span></p> <p>{{t('messages.DevName')}}:<span>{{ res.name }}</span></p>
</div> </div>
</div> </div>

View File

@ -1,5 +1,5 @@
<!-- <!--
* @FilePath: \wwwd:\code\screenFront\src\views\Offsite\child\childContent\right.vue * @FilePath: \screenFront\src\views\Temp\OffsiteDevList\childContent\right.vue
* @Author: 王路平 * @Author: 王路平
* @文件版本: V1.0.0 * @文件版本: V1.0.0
* @Date: 2023-04-13 09:09:03 * @Date: 2023-04-13 09:09:03
@ -207,7 +207,6 @@ val.typenum.forEach(res=>{
DevType.option.series[0].data=echartdata DevType.option.series[0].data=echartdata
chartref.value.changeData(DevType.option) chartref.value.changeData(DevType.option)
data2.push(...data2)
devTipRef.value.setData(data2); devTipRef.value.setData(data2);
} }
onMounted(() => { onMounted(() => {

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,13 @@
<!--
* @Author: 123456 123456
* @Date: 2023-05-12 16:37:43
* @LastEditors: 123456 123456
* @LastEditTime: 2023-05-15 10:56:17
* @FilePath: \screenFront\src\views\Temp\Winding\index.vue
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<template> <template>
<div :class="$style['container']"> <div :class="$style['container']">
<div class="header"> <div class="header">
@ -29,7 +39,7 @@ import { ref } from "vue";
let header1Config = { let header1Config = {
value: 100, value: 80,
colors: ["#01c4f9", "#c135ff"], colors: ["#01c4f9", "#c135ff"],
borderWidth: 3, borderWidth: 3,
} }

View File

@ -5,7 +5,7 @@
<header2 <header2
:width="'100%'" :width="'100%'"
:height="'100px'" :height="'100px'"
:title="'能耗 历史数据检测系统'" :title="t('messages.ECHistoryData')"
:titleTip="[]" :titleTip="[]"
:typeFun="['comback','time']" :typeFun="['comback','time']"
:alarmType="['']" :alarmType="['']"
@ -49,6 +49,8 @@ import {
} from "@/http/energyConsume"; } from "@/http/energyConsume";
import { useenergyUseStore } from "@/store/module/energyUse"; import { useenergyUseStore } from "@/store/module/energyUse";
const store = useenergyUseStore(); const store = useenergyUseStore();
import { useI18n } from 'vue-i18n'
let {t} = useI18n();
// let titleTip = [ // let titleTip = [
// { // {
// color: "rgb(32, 174, 197)", // color: "rgb(32, 174, 197)",

View File

@ -74,11 +74,16 @@ const router = useRouter()
let severdata = reactive([]) let severdata = reactive([])
let percentage = ref(0) let percentage = ref(0)
//id //id
const deptId = route.params.deptId const deptId:any = route.params.deptId
const title = route.query.title const title = route.query.title
const gatwayList = ref([]) const gatwayList = ref([])
const deviceStatus = ref([]) const deviceStatus = ref([])
let legion:any = {
'5': '汽车军团',
'3': '服装军团',
'4': '家纺军团',
'15': '医防军团'
}
let scrollBoardConfig = reactive({ let scrollBoardConfig = reactive({
header: [t('messages.SerialNum'), t('messages.DevName'), t('messages.model'), t('messages.RackNum'), t('messages.type'), t('messages.InstallPhase'), t('messages.DevStatus'), t('messages.AssemblyGroup'), t('messages.electronicGroup'), t('messages.inspector'), t('messages.deliveryDay')], header: [t('messages.SerialNum'), t('messages.DevName'), t('messages.model'), t('messages.RackNum'), t('messages.type'), t('messages.InstallPhase'), t('messages.DevStatus'), t('messages.AssemblyGroup'), t('messages.electronicGroup'), t('messages.inspector'), t('messages.deliveryDay')],
headerBGC: 'rgb(52, 105, 243)', headerBGC: 'rgb(52, 105, 243)',
@ -122,11 +127,11 @@ const getWayStatus = ()=>{
if (res.code == 200) { if (res.code == 200) {
let index = res.data.findIndex((item: any) => { let index = res.data.findIndex((item: any) => {
return item.name == title return item.name == legion[deptId]
}) })
gatwayList.value.push(res.data[index]) gatwayList.value.push(res.data[index])
gatwayList.value[0].name = title
} }
console.log(gatwayList.value,'gatwayList');
}) })
} }