选煤厂生产管理平台前端代码
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<template>
  <div class="mod-prod-plan-det">
    <el-form :inline="true" :model="dataForm">
      <el-form-item>
        <span>计划明细</span><span>【{{dataForm.lsh}}】</span>
      </el-form-item>
      <el-form-item>
        <el-button size="mini" @click="getDataList()">{{ $t('refresh') }}</el-button>
        <el-button size="mini" @click="exportExcel()">导出</el-button>
      </el-form-item>
      <!--<el-form-item>
          <el-button size="mini" v-if="$hasPermission('analysis:full:save')" type="primary" @click="updateHandle()">{{ $t('save') }}</el-button>
      </el-form-item>-->
    </el-form>
    <el-table
        ref="table"
        :data="dataList"
        border
        height="400"
        highlight-current-row
        v-loading="dataListLoading"
        style="width: 100%;">
      <el-table-column type="index" header-align="center" align="center" width="50" label="序号"></el-table-column>
      <el-table-column prop="mzName" header-align="center" align="center" label="煤种"></el-table-column>
      <el-table-column prop="dw" header-align="center" align="center" label="单位"></el-table-column>
      <el-table-column prop="cl" header-align="center" align="center" label="产量"></el-table-column>
      <el-table-column prop="hf" header-align="center" align="center" label="灰分(Ad%)"></el-table-column>
      <el-table-column prop="lf" header-align="center" align="center" label="硫分(St,d%)"></el-table-column>
      <el-table-column prop="sf" header-align="center" align="center" label="水分(Mt%)"></el-table-column>
      <el-table-column prop="mbrz" header-align="center" align="center" label="目标热值(Kcal/Kg)"></el-table-column>
    </el-table>
 
  </div>
</template>
<script>
  import {exportByDom} from "@/utils/exportUtil";
 
  export default {
    data() {
      return {
        visible: false,
        dataList: [],
        dataForm: {
          id: '',
          lsh: ''
        },
        dataListLoading: false
      }
    },
    methods: {
      init(row) {
        this.visible = true
        this.dataForm.id = row.id || '0'
        this.dataForm.lsh = row.lsh
        this.$nextTick(() => {
          this.getDataList()
        })
      },
      // 获取数据列表
      getDataList() {
        this.dataListLoading = true
        this.$http.get(`/iailab-iems-coal-proddisp/wash/plan/detInfo/${this.dataForm.id}`).then(({data: res}) => {
          if (res.code !== 0) {
            return this.$message.error(res.msg)
            this.dataListLoading = false
          }
          this.dataList = res.list
          this.dataListLoading = false
        }).catch(() => {
        })
      },
      exportExcel () {
        let dom = this.$refs.table
        exportByDom(dom, undefined, '计划明细')
      }
    }
  }
</script>