选煤厂生产管理平台前端代码
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
<template>
  <el-drawer
      direction="rtl"
      :visible.sync="visible"
      @close="handleClose"
      size="50%">
    <div class="mod-consume-power-det">
      <el-form :inline="true" :model="dataForm" ref="dataForm" @keyup.enter.native="getDataList()" label-width="10px">
        <!-- <el-form-item prop="sbbm">
          <el-input size="mini" v-model="dataForm.sbbm" placeholder="设备编码"
                    clearable></el-input>
        </el-form-item> -->
        <el-form-item prop="sbmc">
          <el-input size="mini" v-model="dataForm.sbmc" placeholder="设备名称"
                    clearable></el-input>
        </el-form-item>
        <el-form-item>
          <el-button size="mini" @click="getDataList()">{{ $t('query') }}</el-button>
        </el-form-item>
      </el-form>
      <el-table v-loading="dataListLoading" :data="dataList" row-key="id" border style="width: 100%;"
                @selection-change="dataListSelectionChangeHandle">
        <el-table-column type="index" header-align="center" align="center" min-width="50" label="序号"></el-table-column>
        <el-table-column prop="sbmc" header-align="center" align="center" label="设备名称" min-width="100"></el-table-column>
        <el-table-column prop="nbdrl" header-align="center" align="center" label="电耗" min-width="100"></el-table-column>
      </el-table>
    </div>
  </el-drawer>
</template>
<script>
  import mixinViewModule from '@/mixins/view-module'
 
  export default {
    mixins: [mixinViewModule],
    data() {
      return {
        mixinViewModuleOptions: {
          createdIsNeed: false,
          getDataListURL: '/iailab-iems-coal-proddisp/consume/power-det/selectList',
          getDataListIsPage: true,
        },
        visible: false,
        dataForm: {
          powerConsumeId: '',
          rq: '',
          xt: '',
          sbbm: '',
          sbmc: ''
        }
      }
    },
    methods: {
      init(row) {
        this.dataForm.rq = row.rq
        this.dataForm.xt = row.xt
        this.visible = true
        this.$nextTick(() => {
          this.getDataList()
        })
      },
 
      handleClose() {
        this.$refs['dataForm'].resetFields()
        this.dataList = []
      },
 
    }
  }
</script>