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