10.12
This commit is contained in:
@@ -125,7 +125,31 @@ export default {
|
||||
this.$emit('submit', this.queryParams)
|
||||
},
|
||||
exportData() {
|
||||
this.$emit('exportD')
|
||||
let name
|
||||
if (this.queryParams.objId) {
|
||||
name = this.getObjName(this.objList, this.queryParams.objId)
|
||||
} else {
|
||||
this.$modal.msgWarning("对象不能为空")
|
||||
return false
|
||||
}
|
||||
this.$emit('exportD', {name: name})
|
||||
},
|
||||
// 递归取对象name
|
||||
getObjName(list, id) {
|
||||
let _this = this
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
let a = list[i]
|
||||
if (a.id === id) {
|
||||
return a.name
|
||||
} else {
|
||||
if (a.children && a.children.length > 0) {
|
||||
let res = _this.getObjName(a.children, id)
|
||||
if (res) {
|
||||
return res
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
transformTime(timeStamp) {// 本月最后一天
|
||||
let year = moment(timeStamp).format('YYYY')
|
||||
|
||||
Reference in New Issue
Block a user