fix:修改chartStat 显示不正确的问题

This commit is contained in:
zhangyu
2021-12-22 14:55:22 +08:00
parent 7c50aea188
commit cfc3d3f8f9
3 changed files with 54 additions and 3 deletions

View File

@@ -6,16 +6,37 @@ export default {
const q = this.$route.query
lodash.forIn(searchKeys, (val, key) => {
let qv = lodash.get(q, key)
console.log(qv, q, key, val)
if (qv && val.type == 'number') {
qv = lodash.toNumber(qv)
}
setTimeout(() => {
this.setSearchInput(val, qv)
}, 200)
qv && this.$set(val.target, val.propertyName, qv)
})
},
// 更新path包含请求参数
updatePath (param, path) {
console.log(param)
// console.log(param)
this.$router.replace({ path: path, query: param }).catch(err => {})
},
setSearchInput (val, qv) {
let dataList = ''
if (this.detailType !== 'view') {
dataList = 'dataList'
} else {
dataList = 'detailList'
}
if (val.isSearchInput) {
setTimeout(() => {
const obj = lodash.cloneDeep(val.defaultJson)
obj[val.jsonKey] = qv
this.$refs[dataList].$refs.searchInput.select_list.push(obj)
this.$refs[dataList].$refs.searchInput.sreach_num++
// this.$refs[dataList].$refs.searchInput.searchLabelList = this.$refs[dataList].$refs.searchInput.searchLabelList.filter(item => item.label !== 'projectIds')
})
}
}
}
}