Compare commits

..

No commits in common. "95da2191ddf73dd84a92b1628fc5a5b0e9de14f0" and "aa32e4d3fb453344ec4279ff02bfe15fd2b4eea6" have entirely different histories.

4 changed files with 5 additions and 31 deletions

View File

@ -8,7 +8,6 @@
:props="{ checkStrictly: true, value: 'id', label: 'name' }" :props="{ checkStrictly: true, value: 'id', label: 'name' }"
popper-class="cascaderParent" popper-class="cascaderParent"
size="small" size="small"
style="width: 250px;"
clearable></el-cascader> clearable></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="时间维度"> <el-form-item label="时间维度">
@ -158,31 +157,7 @@ export default {
this.$emit('submit', this.queryParams) this.$emit('submit', this.queryParams)
}, },
exportData() { exportData() {
let name this.$emit('exportD')
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) {// transformTime(timeStamp) {//
let year = moment(timeStamp).format('YYYY') let year = moment(timeStamp).format('YYYY')

View File

@ -83,10 +83,9 @@ export default {
} }
this.chartData = this.list this.chartData = this.list
}, },
exportData(val) { exportData() {
if (this.list.length > 0) { if (this.list.length > 0) {
var wb = XLSX.utils.table_to_book(document.querySelector(".qoq-out-table")) var wb = XLSX.utils.table_to_book(document.querySelector(".qoq-out-table"))
let fileName = val.name + "环比分析.xlsx"
var wbout = XLSX.write(wb, { var wbout = XLSX.write(wb, {
bookType: "xlsx", bookType: "xlsx",
bookSST: true, bookSST: true,
@ -95,7 +94,7 @@ export default {
try { try {
FileSaver.saveAs( FileSaver.saveAs(
new Blob([wbout], { type: "application/octet-stream" }), new Blob([wbout], { type: "application/octet-stream" }),
fileName "环比分析.xlsx"
) )
} catch (e) { } catch (e) {
if (typeof console !== "undefined") console.log(e, wbout); if (typeof console !== "undefined") console.log(e, wbout);

View File

@ -99,7 +99,7 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.form = res.data this.form = res.data
this.form.plcParamId = res.data.plcParamId || '' this.form.plcParamId = res.data.plcParamId || ''
this.form.limitType = this.form.limitType ? this.form.limitType + '' : '' this.form.limitType = this.form.limitType + ''
this.objIds = this.changeDetSelect(this.form.objectId, this.objList) this.objIds = this.changeDetSelect(this.form.objectId, this.objList)
if (this.form.type === 2) { if (this.form.type === 2) {
this.getDetailList() this.getDetailList()

View File

@ -46,7 +46,7 @@ const tableProps = [
label: '监控模式' label: '监控模式'
}, },
{ {
prop: 'paramName', prop: 'plcParamId',
label: '监控参数' label: '监控参数'
}, },
{ {