<template>
|
<el-card shadow="never" class="aui-card--fill">
|
<el-form :inline="true" :model="dataForm">
|
<el-form-item label="月份" prop="RQ">
|
<el-date-picker
|
v-model="dataForm.RQ"
|
type="month"
|
format="yyyy-MM"
|
value-format="yyyy-MM"
|
:clearable="false"
|
placeholder="选择日期">
|
</el-date-picker>
|
</el-form-item>
|
<el-form-item>
|
<el-button @click="getDataList()" :loading="loading">查询</el-button>
|
</el-form-item>
|
</el-form>
|
<report-view ref="reportView" :src="reportsrc" v-loading="loading" @loadCompleted="loading = false"></report-view>
|
</el-card>
|
</template>
|
<script>
|
import ReportView from '@/components/report/report-view'
|
import { getYM } from '@/utils/dateUtils'
|
export default {
|
components: {
|
ReportView
|
},
|
data () {
|
return {
|
loading: true,
|
dataForm: {
|
RQ: getYM(new Date())
|
},
|
dateValue: getYM(new Date()),
|
t: new Date().getTime(),
|
reportsrc: `/iail-report/preview?reportModel=whs-sc-mon.ureport.xml&reportId=34¶ms=RQ:${getYM(new Date())}&editable=true`
|
}
|
},
|
methods: {
|
getDataList () {
|
this.loading = true
|
this.t = new Date().getTime()
|
this.reportsrc = `/iail-report/preview?reportModel=whs-sc-mon.ureport.xml&reportId=34¶ms=RQ:${this.dataForm.RQ}&editable=true&t=${this.t}`
|
}
|
}
|
}
|
</script>
|