opt: 设备监控页面国际化优化
This commit is contained in:
@@ -364,7 +364,7 @@ export default {
|
||||
lf.extension.menu.setMenuConfig({
|
||||
nodeMenu: false
|
||||
})
|
||||
lf.on('node:click', (data, e) => { // 鼠标点击节点
|
||||
lf.on('node:click', (data) => { // 鼠标点击节点
|
||||
console.log('data: ', data)
|
||||
// 展开显示设备信息
|
||||
if (data.data.type !== 'pro-rect' && data.data.type !== 'pro-circle' && data.data.type !== 'triangle' && data.data.type !== 'rect-radius') {
|
||||
@@ -377,7 +377,7 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
lf.on('node:contextmenu', (data, e, position) => { // 右键编辑
|
||||
lf.on('node:contextmenu', (data) => { // 右键编辑
|
||||
if (data.data.type !== 'pro-rect' && data.data.type !== 'pro-circle' && data.data.type !== 'triangle' && data.data.type !== 'rect-radius') {
|
||||
if (data.data.properties.device) {
|
||||
this.editDevice(data.data.id) // 编辑
|
||||
@@ -392,14 +392,14 @@ export default {
|
||||
getStages() {
|
||||
selectStageList().then(data => {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (this.language === 'en') {
|
||||
if (i18n.locale === 'en') {
|
||||
const tempObject = {
|
||||
'stage_name': data[i].en_stage_name,
|
||||
'stage_code': data[i].stage_code
|
||||
}
|
||||
this.Stages.push(tempObject)
|
||||
}
|
||||
if (this.language === 'zh') {
|
||||
if (i18n.locale === 'zh') {
|
||||
const tempObject = {
|
||||
'stage_name': data[i].zh_stage_name,
|
||||
'stage_code': data[i].stage_code
|
||||
@@ -506,7 +506,7 @@ export default {
|
||||
this.arr = [] // 清空
|
||||
if (item.device_code && item.data) {
|
||||
console.log('item', item)
|
||||
let tempDeviceName = ''
|
||||
/* let tempDeviceName = ''
|
||||
if (this.language === 'zh') {
|
||||
tempDeviceName = item.data.zh_device_name
|
||||
}
|
||||
@@ -515,7 +515,7 @@ export default {
|
||||
}
|
||||
if (this.language === 'in') {
|
||||
tempDeviceName = item.data.in_device_name
|
||||
}
|
||||
} */
|
||||
this.arr = [
|
||||
{ name: i18n.t('monitor.click.equipment_number'), value: item.device_code },
|
||||
{ name: i18n.t('monitor.click.device_name'), value: item.device_name }
|
||||
@@ -786,7 +786,7 @@ export default {
|
||||
})
|
||||
},
|
||||
dialogSave() {
|
||||
deviceCrud.changeDeviceStatus(this.form).then(res => {
|
||||
deviceCrud.changeDeviceStatus(this.form).then(() => {
|
||||
this.$notify({ title: '操作成功', message: '', type: 'success' })
|
||||
this.dialogFormVisible = false
|
||||
this.dialogFormVisible3 = false
|
||||
@@ -811,7 +811,7 @@ export default {
|
||||
})
|
||||
},
|
||||
saveBarcode() {
|
||||
deviceCrud.saveBarcode(this.form).then(res => {
|
||||
deviceCrud.saveBarcode(this.form).then(() => {
|
||||
this.notify('操作成功', 'success')
|
||||
this.dialogFormVisible1 = false
|
||||
this.initStageData()
|
||||
|
||||
Reference in New Issue
Block a user