NEZ-1205 fix: 英文状态下选择框内的提示语是中文 修改
This commit is contained in:
@@ -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', // 饼图 或者 柱状图的统计
|
||||
@@ -761,7 +761,7 @@ export default {
|
||||
<div style="max-width: 500px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom: 5px">${this.legend[params.seriesIndex].alias}</div>
|
||||
<div style="font-size:12px;display:flex;justify-content: space-between;">
|
||||
<div>value</div>
|
||||
<div>${chartDataFormat.getUnit(chartInfo.unit ? chartInfo.unit : 2).compute(params.value[1], null, -1, this.chartDot ? this.chartDot : 2 )}</div>
|
||||
<div>${chartDataFormat.getUnit(chartInfo.unit ? chartInfo.unit : 2).compute(params.value[1], null, -1, this.chartDot ? this.chartDot : 2)}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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 : ''
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -168,7 +168,7 @@ export default {
|
||||
}
|
||||
this.$set(item, 'loading', loading)
|
||||
// this.$set(this.tableData,index,item);// 调用父组件
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -155,7 +155,7 @@ export default {
|
||||
// }
|
||||
})
|
||||
return str
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -152,7 +152,7 @@ export default {
|
||||
// }
|
||||
})
|
||||
return str
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
// }
|
||||
})
|
||||
return str
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -17,7 +17,7 @@ export const agent = {
|
||||
label: 'Per-datacenter',
|
||||
value: 2,
|
||||
text: 'Per-datacenter'
|
||||
},
|
||||
}
|
||||
// {
|
||||
// label: 'Loki',
|
||||
// value: 11,
|
||||
|
||||
@@ -1362,7 +1362,7 @@ const cn = {
|
||||
},
|
||||
P1Rule: 'P1: 万分紧急,可导致业务瘫痪的告警',
|
||||
P2Rule: 'P2: 重要,需要紧急关注的警报,但还没有影响业务',
|
||||
P3Rule: 'P3: 轻微警报,需要处理,但不紧急',
|
||||
P3Rule: 'P3: 轻微警报,需要处理,但不紧急'
|
||||
},
|
||||
project: {
|
||||
chart: {
|
||||
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
walkData: { type: Array },
|
||||
currentWalk: { type: Array },
|
||||
expandedWalk: { type: Array },
|
||||
disabled: {type: Boolean, default: false }
|
||||
disabled: { type: Boolean, default: false }
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -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' },
|
||||
@@ -376,7 +378,7 @@ export default {
|
||||
this.exportExcel(this.exportUrl, params, this.exportFileName + '-' + this.getTimeString() + '.xlsx')
|
||||
this.closeDialog()
|
||||
},
|
||||
exportRecords() {
|
||||
exportRecords () {
|
||||
const params = JSON.parse(JSON.stringify(this.params))
|
||||
if (this.params2) {
|
||||
Object.keys(this.params2).forEach(key => {
|
||||
|
||||
@@ -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: {},
|
||||
|
||||
@@ -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' },
|
||||
{
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -870,7 +870,7 @@ export default {
|
||||
if (labelBool) {
|
||||
objectInfo[val.label] = val.val
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
objectInfo[val.label] = val.valnum
|
||||
}
|
||||
} else if (val.type === 'selectSelf') {
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -129,7 +129,7 @@ export default {
|
||||
deep: true,
|
||||
handler (n) {
|
||||
if (n) {
|
||||
this.$emit('selectedEndpointsChange', n)
|
||||
this.$emit('selectedEndpointsChange', n)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
} else {
|
||||
this.exploreItems.push(index === 0 ? 1 : 0)
|
||||
if (!this.$refs.exploreItem[0].showMetrics) {
|
||||
this.$nextTick(()=>{
|
||||
this.$nextTick(() => {
|
||||
this.$refs.exploreItem[1].selectMetricsLogs(this.$t('overall.logs'), 'nz-icon nz-icon-logs', 'Logs')
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user