index.vue 1.92 KB
<template>
  <!-- 接收规则管理 -->
  <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>
    <detailDialog v-model="isShow" />
  </div>
</template>
<script>
// 引入表格数据
import data from "./data"
// 引入表格混入方法
import tableMixin from '@/mixins/tableMixin.js'
import detailDialog from './components/detailDialog'
export default {
  name: "jsgzgl",
  mixins: [tableMixin],
  components: {
    detailDialog
  },
  data () {
    return {
      isShow: false,
      form: {
        currentPage: 1
      },
      // 列表数据
      tableData: {
        // 列表头部
        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>
              )
            }
          }
        ]),
        // 列表数据
        data: [{}]
      },
      // 分页
      pageData: {
        total: 0,
        pageSize: 15,
        current: 1,
      }
    }
  },
  methods: {
    // 重置表单
    resetForm () {
      this.$refs.ruleForm.resetFields();
    },
    async featchData () {
    },
    // 修改
    handleEdit (row) {
      this.isShow = true
    }
  }
}
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
@import "./index.scss";
</style>