选煤厂生产管理平台前端代码
dongyukun
2024-12-10 5cc1d92af645c2f8f4f6d1d3777283b70df78ccd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<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&params=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&params=RQ:${this.dataForm.RQ}&editable=true&t=${this.t}`
      }
    }
  }
</script>