Skip to content

Commit

Permalink
perf(cloudTest): fix(multitenant): 修复新建设备默认值问题
Browse files Browse the repository at this point in the history
ISSUES CLOSED: 修复告警管理查询
  • Loading branch information
h7ml committed Jul 2, 2022
1 parent 075617a commit 47dd27d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/views/CloudOT/maintenance/alert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@
// productid: this.queryForm.productName
// ? this.queryForm.productName
// : 'all',
// isprocess: this.queryForm.isprocess,
isprocess: this.queryForm.isprocess,
include: '',
where: {
'content._productid': {
Expand All @@ -573,11 +573,11 @@
// ? (this.queryPayload.where.content['_productid'] = )
// : 'all'
// this.queryForm.isprocess
// ? (this.queryPayload.where['process'] = {
// $regex: this.queryForm.isprocess,
// })
// : ''
this.queryForm.isprocess + ''.length
? (this.queryPayload.where['status'] = this.queryForm.isprocess)
: ''
if (!Number(this.queryPayload.where['status']))
delete this.queryPayload.where['status']
if (this.queryForm.searchDate.length) {
this.queryPayload.where['createdAt'] = {
$gt: {
Expand Down
30 changes: 23 additions & 7 deletions src/views/DeviceCloud/manage/component/wmxdetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,6 @@
<script>
import { getDlinkJson } from '@/api/Dlink'
import { mapGetters, mapMutations } from 'vuex'
import defaultLogo from '../../../../../public/assets/images/logo/logo.png'
import { getProtocol } from '@/api/Protocol'
import { getProduct } from '@/api/Product'
Expand Down Expand Up @@ -1116,6 +1115,7 @@
},
value: '',
inputParams: {},
Type: 'addThing',
dataList: [{}],
dataType: [],
options: [
Expand Down Expand Up @@ -1321,7 +1321,9 @@
beforeMount() {}, //生命周期 - 挂载之前
beforeUpdate() {}, //生命周期 - 更新之前
updated() {}, //生命周期 - 更新之后
beforeDestroy() {}, //生命周期 - 销毁之前
beforeDestroy() {
this.Type = 'addThing'
}, //生命周期 - 销毁之前
activated() {},
methods: {
async queryProtocol() {
Expand Down Expand Up @@ -1561,6 +1563,7 @@
setProtocol: 'product/setProtocol',
}),
changeThing(item) {
this.Type = 'showThing'
console.error(item)
let that = this
dgiotlog.log('this.sizeFormaaa', that.$refs.sizeForm.model.name)
Expand Down Expand Up @@ -1614,6 +1617,7 @@
isread: item.accessMode,
isshow: item.isshow,
isaccumulate: item.isaccumulate,
isstorage: item.isstorage,
identifier: item.identifier,
}
if (item.dataForm) {
Expand All @@ -1623,6 +1627,7 @@
}
} else if (item.dataType.type == 'image') {
obj = {
isstorage: item.isstorage,
name: item.name,
devicetype: item.devicetype,
ico: item.ico,
Expand Down Expand Up @@ -1665,6 +1670,7 @@
}
} else if (item.dataType.type == 'bool') {
obj = {
isstorage: item.isstorage,
name: item.name,
devicetype: item.devicetype,
ico: item.ico,
Expand Down Expand Up @@ -1713,6 +1719,7 @@
})
}
obj = {
isstorage: item.isstorage,
name: item.name,
devicetype: item.devicetype,
ico: item.ico,
Expand Down Expand Up @@ -1753,6 +1760,7 @@
}
} else if (item.dataType.type == 'struct') {
obj = {
isstorage: item.isstorage,
name: item.name,
devicetype: item.devicetype,
ico: item.ico,
Expand Down Expand Up @@ -1792,6 +1800,7 @@
}
} else if (item.dataType.type == 'text') {
obj = {
isstorage: item.isstorage,
name: item.name,
devicetype: item.devicetype,
ico: item.ico,
Expand Down Expand Up @@ -1831,6 +1840,7 @@
}
} else if (item.dataType.type == 'date') {
obj = {
isstorage: item.isstorage,
name: item.name,
devicetype: item.devicetype,
ico: item.ico,
Expand Down Expand Up @@ -1869,6 +1879,7 @@
}
} else if (item.dataType.type == 'file') {
obj = {
isstorage: item.isstorage,
name: item.name,
devicetype: item.devicetype,
ico: item.ico,
Expand Down Expand Up @@ -1907,6 +1918,7 @@
}
} else if (item.dataType.type == 'url') {
obj = {
isstorage: item.isstorage,
name: item.name,
devicetype: item.devicetype,
ico: item.ico,
Expand Down Expand Up @@ -1945,6 +1957,7 @@
}
} else if (item.dataType.type == 'geopoint') {
obj = {
isstorage: item.isstorage,
name: item.name,
devicetype: item.devicetype,
ico: item.ico,
Expand Down Expand Up @@ -1991,16 +2004,19 @@
console.log('obj 1944', obj)
that.setSizeForm(obj)
this.$nextTick(async () => {
this.queryResource()
await this.queryResource()
// 保证子组件已经挂载完成)
// if (this)
this.resource.value = item.dataForm.protocol
this.resource.disabled = item.dataForm.protocol.length ? true : false
// this.changeResource(this.resource.value)
this.resource.arrlist = _.sortBy(item.dataSource, function (item) {
return item.order //根据code对数据进行升序排序,若是降序则改成:return -item.code
})
console.log(item.dataSource, 'item.dataSource')
this.resource.arrlist =
this.Type == 'showThing'
? item.dataSource
: _.sortBy(item.dataSource, function (item) {
return item.order //根据code对数据进行升序排序,若是降序则改成:return -item.code
})
console.log(this.resource.arrlist, 'arrlist')
this.$nextTick(() => {
this.resource.data.forEach((resource, index) => {
Expand Down

0 comments on commit 47dd27d

Please sign in to comment.