Blame view

src/views/jsgzgl/index.vue 1.92 KB
任超 committed
1
<template>
任超 committed
2
  <!-- 接收规则管理 -->
任超 committed
3 4 5 6 7
  <div class="jsgzgl from-clues">
    <lb-table ref="table" :heightNum="195" :total="pageData.total" :page-size="pageData.size"
      :current-page.sync="pageData.current" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
      :column="tableData.columns" :data="tableData.data">
    </lb-table>
任超 committed
8
    <detailDialog v-model="isShow" />
任超 committed
9 10 11
  </div>
</template>
<script>
任超 committed
12
// 引入表格数据
任超 committed
13
import data from "./data"
任超 committed
14
// 引入表格混入方法
任超 committed
15
import tableMixin from '@/mixins/tableMixin.js'
任超 committed
16
import detailDialog from './components/detailDialog'
任超 committed
17 18 19
export default {
  name: "jsgzgl",
  mixins: [tableMixin],
任超 committed
20 21 22
  components: {
    detailDialog
  },
任超 committed
23 24
  data () {
    return {
任超 committed
25 26 27 28 29
      isShow: false,
      form: {
        currentPage: 1
      },
      // 列表数据
任超 committed
30
      tableData: {
任超 committed
31
        // 列表头部
任超 committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
        columns: [{
          label: '序号',
          type: 'index',
          width: '50',
          index: this.indexMethod,
        }].concat(data.columns()).concat([
          {
            label: "操作",
            width: '80',
            render: (h, scope) => {
              return (
                <div>
                  <el-button
                    type="text"
                    size="mini"
                    onClick={() => { this.handleEdit(scope.row) }}
                  >
                    修改
                  </el-button>
                </div>
              )
            }
          }
        ]),
任超 committed
56
        // 列表数据
任超 committed
57 58
        data: [{}]
      },
任超 committed
59
      // 分页
任超 committed
60 61 62 63
      pageData: {
        total: 0,
        pageSize: 15,
        current: 1,
任超 committed
64
      }
任超 committed
65 66 67
    }
  },
  methods: {
任超 committed
68
    // 重置表单
任超 committed
69 70 71 72 73
    resetForm () {
      this.$refs.ruleForm.resetFields();
    },
    async featchData () {
    },
任超 committed
74
    // 修改
任超 committed
75
    handleEdit (row) {
任超 committed
76
      this.isShow = true
任超 committed
77 78 79 80 81 82 83 84 85
    }
  }
}
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
@import "./index.scss";
</style>