NEZ-1205 fix: 英文状态下选择框内的提示语是中文 修改

This commit is contained in:
zhangyu
2021-11-09 10:17:12 +08:00
parent c38113fd49
commit f7ba3bec13
28 changed files with 47 additions and 40 deletions

View File

@@ -98,7 +98,7 @@ import * as echarts from 'echarts'
import { getChart, setChart, getMousePoint } from '../common/js/common'
import chartConfig from '../page/dashboard/overview/chartConfig'
import { randomcolor } from '../common/js/radomcolor/randomcolor'
import {chartResizeTool, formatScientificNotation} from "@/components/common/js/tools";
import { chartResizeTool, formatScientificNotation } from '@/components/common/js/tools'
import chartDataList from '@/components/common/mixin/chartDataList'
export default {
name: 'pieChart', // 饼图 或者 柱状图的统计

View File

@@ -1556,7 +1556,7 @@ export default {
// purchaseDate: basic.purchaseDate,
// vendor: basic.brand ? basic.brand.name : '-',
// sn: basic.sn,
pingStatus: basic.pingInfo ? basic.pingInfo.status : '-',
pingStatus: basic.pingInfo ? basic.pingInfo.status : '-'
// cabinetStart: basic.cabinetStart,
// cabinetEnd: basic.cabinetEnd,
// pingLastReply: basic.pingInfo ? basic.pingInfo.lastUpdate : ''

View File

@@ -99,7 +99,7 @@ import { getChart, setChart, getMousePoint } from '../common/js/common'
import chartConfig from '../page/dashboard/overview/chartConfig'
import { randomcolor } from '../common/js/radomcolor/randomcolor'
import chartDataList from '@/components/common/mixin/chartDataList'
import {chartResizeTool} from "@/components/common/js/tools";
import { chartResizeTool } from '@/components/common/js/tools'
export default {
name: 'pieChart',
components: {

View File

@@ -200,7 +200,7 @@ import chartAlertList from './chart-alert-list'
import chartConfig from '../page/dashboard/overview/chartConfig'
import diagram from '@/components/common/ChartDiagram/diagram'
import moment from 'moment-timezone'
import {formatScientificNotation} from "@/components/common/js/tools";
import { formatScientificNotation } from '@/components/common/js/tools'
export default {
name: 'chartPreview',
components: {

View File

@@ -294,11 +294,12 @@ export default {
components: {
'my-console': Console
},
computed: {
language () { return this.$store.getters.getLanguage }
},
data () {
const termFontSize = parseInt(localStorage.getItem('termFontSize'))
return {
language: this.$store.getters.language,
authProtocol: [
{
value: 1,

View File

@@ -168,7 +168,7 @@ export default {
}
this.$set(item, 'loading', loading)
// this.$set(this.tableData,index,item);// 调用父组件
},
}
}
}
</script>

View File

@@ -155,7 +155,7 @@ export default {
// }
})
return str
},
}
}
}
</script>

View File

@@ -152,7 +152,7 @@ export default {
// }
})
return str
},
}
}
}
</script>

View File

@@ -134,7 +134,7 @@ export default {
// }
})
return str
},
}
}
}
</script>

View File

@@ -48,7 +48,7 @@
import detailViewLeftMixin from '@/components/common/mixin/detailViewLeftMixin'
import alertLabel from '@/components/common/alert/alertLabel'
import { terminalLog } from '@/components/common/js/constants'
import {calcDurationByStringTimeB} from "@/components/common/js/tools";
import { calcDurationByStringTimeB } from '@/components/common/js/tools'
export default {
name: 'terminalLogDetail',
mixins: [detailViewLeftMixin],
@@ -157,7 +157,7 @@ export default {
}
this.$set(item, 'loading', loading)
// this.$set(this.tableData,index,item);// 调用父组件
},
}
}
}
</script>

View File

@@ -17,7 +17,7 @@ export const agent = {
label: 'Per-datacenter',
value: 2,
text: 'Per-datacenter'
},
}
// {
// label: 'Loki',
// value: 11,

View File

@@ -1362,7 +1362,7 @@ const cn = {
},
P1Rule: 'P1: 万分紧急,可导致业务瘫痪的告警',
P2Rule: 'P2: 重要,需要紧急关注的警报,但还没有影响业务',
P3Rule: 'P3: 轻微警报,需要处理,但不紧急',
P3Rule: 'P3: 轻微警报,需要处理,但不紧急'
},
project: {
chart: {

View File

@@ -155,6 +155,9 @@ export default {
},
deleteObjs: Array
},
computed: {
language () { return this.$store.getters.getLanguage }
},
data () {
return {
importBox: { show: false, title: this.$t('overall.importExcel'), type: 1, record: 'all', format: 1 },
@@ -163,7 +166,6 @@ export default {
importResult: null,
exportShow: false,
panelLock: true,
language: this.$store.getters.language,
recordArr: [
{ name: this.$t('overall.allData'), value: 'all' },
{ name: this.$t('overall.selectRecords'), value: 'records' },

View File

@@ -78,12 +78,12 @@ export default {
return function (username) {
return localStorage.getItem('nz-username') == username
}
}
},
language () { return this.$store.getters.getLanguage }
},
mixins: [editRigthBox],
data () {
return {
language: this.$store.getters.language,
editModel: {},
brandList: [], // brand 列表数据
editModule: {},

View File

@@ -163,6 +163,9 @@ export default {
components: {
'edit-endpoint-box-new': editEndpointBoxNew
},
computed: {
language () { return this.$store.getters.getLanguage }
},
data () {
return {
showError: false,
@@ -181,7 +184,6 @@ export default {
},
assetDataList: [],
moduleList: [],
language: this.$store.getters.language,
ChartSearchShowFields: [ // ChartSearch 下拉搜索表头
{ title: 'ID', data: 'id' },
{

View File

@@ -587,7 +587,7 @@ import pipelineSelect from './pipelineSelect'
import selectWalk from '../popBox/selectWalk'
import editRigthBox from '../mixin/editRigthBox'
import VueTagsInput from '@johmun/vue-tags-input'
import vm from "@/main";
import vm from '@/main'
export default {
name: 'editEndpointBoxNew',
@@ -622,7 +622,6 @@ export default {
activeNameLogs: ['Basic'],
expandedWalkData: [],
editEndpointReset: {},
language: this.$store.getters.language,
radio: 'password',
editEndpoint: {},
restaurants: [
@@ -1495,7 +1494,8 @@ export default {
return (value) => {
return this.getMibName(this.walkData, value)
}
}
},
language () { return this.$store.getters.getLanguage }
},
watch: {
module: {

View File

@@ -619,7 +619,6 @@ export default {
}
}
],
language: this.$store.getters.language,
showAllBasicOption: false,
rules: {
name: [
@@ -1308,7 +1307,8 @@ export default {
return (value) => {
return this.getMibName(this.walkData, value)
}
}
},
language () { return this.$store.getters.getLanguage }
},
watch: {
module: {

View File

@@ -89,17 +89,17 @@ export default {
label: this.$t('config.dc.state'),
prop: 'state',
show: true,
minWidth: 100,
minWidth: 100
}, {
label: this.$t('alert.alertRuleMessage'),
prop: 'msg',
show: true,
minWidth: 100,
minWidth: 100
}, {
label: this.$t('alert.silence.startTime'),
prop: 'stts',
show: true,
minWidth: 300,
minWidth: 300
}, {
label: this.$t('config.terminallog.duration'),
prop: 'duration',

View File

@@ -199,7 +199,8 @@ export default {
remote (initPicked = false) {
if (typeof this.data === 'string' && this.dataLoad && typeof this.dataLoad === 'function') {
const queryParams = this.params && Object.keys(this.params).length
? JSON.parse(JSON.stringify(this.params)) : {}
? JSON.parse(JSON.stringify(this.params))
: {}
queryParams.pageSize = this.pageSize
queryParams.pageNumber = this.pageNumber
if (this.sort) queryParams.orderBy = this.sort

View File

@@ -139,6 +139,7 @@ export default {
changeLocal (lang) {
localStorage.setItem('nz-language', lang)
this.$store.commit('setLanguage', lang)
console.log(lang)
this.$i18n.locale = lang
setTimeout(() => {
window.location.reload()

View File

@@ -1078,7 +1078,7 @@ export default {
params.ids = this.batchDeleteObjs.map(item => item.id).join(',')
this.exportExcel(this.exportUrl, params, this.exportFileName + '-' + this.getTimeString() + '.xlsx')
this.closeDialog()
},
}
},
destroyed () {
localStorage.removeItem('alertMessageProjectId')

View File

@@ -138,9 +138,9 @@
<script>
import operationRecord from './operationRecord'
import QRCode from "qrcodejs2"
import MessageBox from "element-ui/packages/message-box/src/main"
import i18n from "@/components/common/i18n"
import QRCode from 'qrcodejs2'
import MessageBox from 'element-ui/packages/message-box/src/main'
import i18n from '@/components/common/i18n'
import profileBox from '@/components/common/rightBox/profileBox'
export default {

View File

@@ -569,7 +569,6 @@ export default {
this.$store.state.showPanel.id = 0
this.$store.state.showPanel.name = ''
this.$store.state.showPanel.type = 'dashboard'
} else {
if (response.msg) {
this.$message.error(response.msg)

View File

@@ -9,7 +9,7 @@ const user = {
menuList: [],
buttonList: [],
roleList: [],
language: 'en'
language: localStorage.getItem('nz-language')
},
mutations: {
setLanguage (state, language) {
@@ -34,7 +34,7 @@ const user = {
menuList (state) {
return state.menuList
},
language (state) {
getLanguage (state) {
return state.language
},
buttonList (state) {
@@ -59,6 +59,7 @@ const user = {
localStorage.setItem('nz-unnsaved-change', res.data.unsavedChange)
localStorage.setItem('nz-mfa-enable', Number(res.data.mfaAuthEnable) ? 1 : 0)
store.commit('setLanguage', res.data.user.lang)
console.log(res.data.user.lang)
post('/sys/user/permissions', { token: res.data.token }).then(res => {
const menuList = sortByOrderNum(res.data.menus)
store.commit('setMenuList', menuList)