Blame view

src/views/baseSpecialAction/ExportBox.vue 1.74 KB
4424f41c   monkeyhouyi   网信执法、清单管理静态页面
1
2
3
4
  <template>
    <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible"
      class="NCC-dialog NCC-dialog_center" lock-scroll width="600px">
      <el-form label-position="top" label-width="80px">
06c7a82f   李宇   最新代码
5
6
7
8
9
        <el-col :span="4">
          <el-form-item label="">
            <el-date-picker v-model="releaseTime" type="datetimerange" value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期"/>
          </el-form-item>
        </el-col>
4424f41c   monkeyhouyi   网信执法、清单管理静态页面
10
11
12
13
14
15
16
17
18
19
20
21
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="visible=false">取 消</el-button>
        <el-button type="primary" @click="downLoad">导 出</el-button>
      </span>
    </el-dialog>
  </template>
  
  <script>
  export default {
    data() {
      return {
06c7a82f   李宇   最新代码
22
        releaseTime:'',
4424f41c   monkeyhouyi   网信执法、清单管理静态页面
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
        visible: false,
        btnLoading: false,
        type: 0,
        columns: [],
        checkAll: true,
        isIndeterminate: false,
        columnList: []
      }
    },
    methods: {
      init(columnList) {
        this.visible = true
        this.columnList = columnList
        this.columns = columnList.map(o => o.prop)
      },
      handleCheckAllChange(val) {
        this.columns = val ? this.columnList.map(o => o.prop) : [];
        this.isIndeterminate = false;
      },
      handleCheckedChange(value) {
        let checkedCount = value.length;
        this.checkAll = checkedCount === this.columnList.length;
        this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length;
      },
      downLoad() {
06c7a82f   李宇   最新代码
48
49
50
51
52
53
        if(this.releaseTime){
          this.$emit('download',this.releaseTime.join(','))
        } else{
          this.$message.error('请选择日期')
        }
        
4424f41c   monkeyhouyi   网信执法、清单管理静态页面
54
55
56
57
58
59
60
61
62
      }
    }
  }
  </script>
  <style lang="scss" scoped>
  >>> .el-dialog__body {
    padding: 20px !important;
  }
  </style>