Skip to content

Commit 47dd27d

Browse files
committed
perf(cloudTest): fix(multitenant): 修复新建设备默认值问题
ISSUES CLOSED: 修复告警管理查询
1 parent 075617a commit 47dd27d

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

src/views/CloudOT/maintenance/alert.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@
548548
// productid: this.queryForm.productName
549549
// ? this.queryForm.productName
550550
// : 'all',
551-
// isprocess: this.queryForm.isprocess,
551+
isprocess: this.queryForm.isprocess,
552552
include: '',
553553
where: {
554554
'content._productid': {
@@ -573,11 +573,11 @@
573573
// ? (this.queryPayload.where.content['_productid'] = )
574574
// : 'all'
575575
576-
// this.queryForm.isprocess
577-
// ? (this.queryPayload.where['process'] = {
578-
// $regex: this.queryForm.isprocess,
579-
// })
580-
// : ''
576+
this.queryForm.isprocess + ''.length
577+
? (this.queryPayload.where['status'] = this.queryForm.isprocess)
578+
: ''
579+
if (!Number(this.queryPayload.where['status']))
580+
delete this.queryPayload.where['status']
581581
if (this.queryForm.searchDate.length) {
582582
this.queryPayload.where['createdAt'] = {
583583
$gt: {

src/views/DeviceCloud/manage/component/wmxdetail.vue

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,6 @@
10261026
<script>
10271027
import { getDlinkJson } from '@/api/Dlink'
10281028
import { mapGetters, mapMutations } from 'vuex'
1029-
import defaultLogo from '../../../../../public/assets/images/logo/logo.png'
10301029
import { getProtocol } from '@/api/Protocol'
10311030
import { getProduct } from '@/api/Product'
10321031
@@ -1116,6 +1115,7 @@
11161115
},
11171116
value: '',
11181117
inputParams: {},
1118+
Type: 'addThing',
11191119
dataList: [{}],
11201120
dataType: [],
11211121
options: [
@@ -1321,7 +1321,9 @@
13211321
beforeMount() {}, //生命周期 - 挂载之前
13221322
beforeUpdate() {}, //生命周期 - 更新之前
13231323
updated() {}, //生命周期 - 更新之后
1324-
beforeDestroy() {}, //生命周期 - 销毁之前
1324+
beforeDestroy() {
1325+
this.Type = 'addThing'
1326+
}, //生命周期 - 销毁之前
13251327
activated() {},
13261328
methods: {
13271329
async queryProtocol() {
@@ -1561,6 +1563,7 @@
15611563
setProtocol: 'product/setProtocol',
15621564
}),
15631565
changeThing(item) {
1566+
this.Type = 'showThing'
15641567
console.error(item)
15651568
let that = this
15661569
dgiotlog.log('this.sizeFormaaa', that.$refs.sizeForm.model.name)
@@ -1614,6 +1617,7 @@
16141617
isread: item.accessMode,
16151618
isshow: item.isshow,
16161619
isaccumulate: item.isaccumulate,
1620+
isstorage: item.isstorage,
16171621
identifier: item.identifier,
16181622
}
16191623
if (item.dataForm) {
@@ -1623,6 +1627,7 @@
16231627
}
16241628
} else if (item.dataType.type == 'image') {
16251629
obj = {
1630+
isstorage: item.isstorage,
16261631
name: item.name,
16271632
devicetype: item.devicetype,
16281633
ico: item.ico,
@@ -1665,6 +1670,7 @@
16651670
}
16661671
} else if (item.dataType.type == 'bool') {
16671672
obj = {
1673+
isstorage: item.isstorage,
16681674
name: item.name,
16691675
devicetype: item.devicetype,
16701676
ico: item.ico,
@@ -1713,6 +1719,7 @@
17131719
})
17141720
}
17151721
obj = {
1722+
isstorage: item.isstorage,
17161723
name: item.name,
17171724
devicetype: item.devicetype,
17181725
ico: item.ico,
@@ -1753,6 +1760,7 @@
17531760
}
17541761
} else if (item.dataType.type == 'struct') {
17551762
obj = {
1763+
isstorage: item.isstorage,
17561764
name: item.name,
17571765
devicetype: item.devicetype,
17581766
ico: item.ico,
@@ -1792,6 +1800,7 @@
17921800
}
17931801
} else if (item.dataType.type == 'text') {
17941802
obj = {
1803+
isstorage: item.isstorage,
17951804
name: item.name,
17961805
devicetype: item.devicetype,
17971806
ico: item.ico,
@@ -1831,6 +1840,7 @@
18311840
}
18321841
} else if (item.dataType.type == 'date') {
18331842
obj = {
1843+
isstorage: item.isstorage,
18341844
name: item.name,
18351845
devicetype: item.devicetype,
18361846
ico: item.ico,
@@ -1869,6 +1879,7 @@
18691879
}
18701880
} else if (item.dataType.type == 'file') {
18711881
obj = {
1882+
isstorage: item.isstorage,
18721883
name: item.name,
18731884
devicetype: item.devicetype,
18741885
ico: item.ico,
@@ -1907,6 +1918,7 @@
19071918
}
19081919
} else if (item.dataType.type == 'url') {
19091920
obj = {
1921+
isstorage: item.isstorage,
19101922
name: item.name,
19111923
devicetype: item.devicetype,
19121924
ico: item.ico,
@@ -1945,6 +1957,7 @@
19451957
}
19461958
} else if (item.dataType.type == 'geopoint') {
19471959
obj = {
1960+
isstorage: item.isstorage,
19481961
name: item.name,
19491962
devicetype: item.devicetype,
19501963
ico: item.ico,
@@ -1991,16 +2004,19 @@
19912004
console.log('obj 1944', obj)
19922005
that.setSizeForm(obj)
19932006
this.$nextTick(async () => {
1994-
this.queryResource()
2007+
await this.queryResource()
19952008
// 保证子组件已经挂载完成)
19962009
// if (this)
19972010
this.resource.value = item.dataForm.protocol
19982011
this.resource.disabled = item.dataForm.protocol.length ? true : false
19992012
// this.changeResource(this.resource.value)
2000-
2001-
this.resource.arrlist = _.sortBy(item.dataSource, function (item) {
2002-
return item.order //根据code对数据进行升序排序,若是降序则改成:return -item.code
2003-
})
2013+
console.log(item.dataSource, 'item.dataSource')
2014+
this.resource.arrlist =
2015+
this.Type == 'showThing'
2016+
? item.dataSource
2017+
: _.sortBy(item.dataSource, function (item) {
2018+
return item.order //根据code对数据进行升序排序,若是降序则改成:return -item.code
2019+
})
20042020
console.log(this.resource.arrlist, 'arrlist')
20052021
this.$nextTick(() => {
20062022
this.resource.data.forEach((resource, index) => {

0 commit comments

Comments
 (0)