修改设备名称

This commit is contained in:
GGJ
2024-10-10 10:29:38 +08:00
parent 3958928ebb
commit e35a697319
3 changed files with 6 additions and 4 deletions

View File

@@ -91,7 +91,7 @@ tableStore.table.params.status = ''
tableStore.table.params.target = [] tableStore.table.params.target = []
tableStore.table.params.userId = '' tableStore.table.params.userId = ''
tableStore.table.params.deviceTypeId = '' tableStore.table.params.deviceTypeId = ''
tableStore.table.params.deviceTypeName = ''
const deviceTreeOptions = ref<any>(props.deviceTree) const deviceTreeOptions = ref<any>(props.deviceTree)
deviceTreeOptions.value.map((item: any, index: any) => { deviceTreeOptions.value.map((item: any, index: any) => {
if (item.children.length == 0) { if (item.children.length == 0) {
@@ -107,7 +107,7 @@ const sourceChange = (e: any) => {
let name = deviceTreeOptions.value.filter((item: any) => { let name = deviceTreeOptions.value.filter((item: any) => {
return item.id == e[0] return item.id == e[0]
})[0].name })[0].name
tableStore.table.params.deviceTypeName = name
if (name == '便携式设备') { if (name == '便携式设备') {
tableStore.table.params.deviceTypeId = e[0] || '' tableStore.table.params.deviceTypeId = e[0] || ''
tableStore.table.params.deviceId = e[1] || '' tableStore.table.params.deviceId = e[1] || ''

View File

@@ -93,6 +93,7 @@ tableStore.table.params.status = ''
tableStore.table.params.target = [] tableStore.table.params.target = []
tableStore.table.params.userId = '' tableStore.table.params.userId = ''
tableStore.table.params.cascader = '' tableStore.table.params.cascader = ''
tableStore.table.params.deviceTypeName = ''
// tableStore.table.params.level='' // tableStore.table.params.level=''
const deviceTreeOptions = ref<any>(props.deviceTree) const deviceTreeOptions = ref<any>(props.deviceTree)
@@ -110,7 +111,7 @@ const sourceChange = (e: any) => {
let name = deviceTreeOptions.value.filter((item: any) => { let name = deviceTreeOptions.value.filter((item: any) => {
return item.id == e[0] return item.id == e[0]
})[0].name })[0].name
tableStore.table.params.deviceTypeName = name
if (name == '便携式设备') { if (name == '便携式设备') {
tableStore.table.params.deviceTypeId = e[0] || '' tableStore.table.params.deviceTypeId = e[0] || ''
tableStore.table.params.deviceId = e[1] || '' tableStore.table.params.deviceId = e[1] || ''

View File

@@ -182,6 +182,7 @@ tableStore.table.params.status = ''
tableStore.table.params.target = [] tableStore.table.params.target = []
tableStore.table.params.userId = '' tableStore.table.params.userId = ''
tableStore.table.params.cascader = '' tableStore.table.params.cascader = ''
tableStore.table.params.deviceTypeName = ''
// tableStore.table.params.level='' // tableStore.table.params.level=''
const deviceTreeOptions: any = ref<any>(props.deviceTree) const deviceTreeOptions: any = ref<any>(props.deviceTree)
@@ -199,7 +200,7 @@ const sourceChange = (e: any) => {
let name = deviceTreeOptions.value.filter((item: any) => { let name = deviceTreeOptions.value.filter((item: any) => {
return item.id == e[0] return item.id == e[0]
})[0].name })[0].name
tableStore.table.params.deviceTypeName = name
if (name == '便携式设备') { if (name == '便携式设备') {
tableStore.table.params.deviceTypeId = e[0] || '' tableStore.table.params.deviceTypeId = e[0] || ''
tableStore.table.params.deviceId = e[1] || '' tableStore.table.params.deviceId = e[1] || ''