<template>
  <a-row :gutter="24">
    <a-col :md="24">
      <a-card :style="cardStyle" :bordered="false">
        <!-- 查询区域 -->
        <div class="table-page-search-wrapper">
          <a-form layout="inline" @keyup.enter.native="searchQuery">
            <a-row :gutter="24">
              <a-col :md="6" :sm="24">
                <a-form-item label="流程类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
                  <a-select v-model="queryParam.processType" placeholder="请选择流程类型">
                    <a-select-option value="0">全部</a-select-option>
                    <a-select-option value="1">请假</a-select-option>
                  </a-select>
                </a-form-item>
              </a-col>
              <a-col :md="6" :sm="24">
                <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
                  <a-button type="primary" @click="searchQuery">查询</a-button>
                  <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
                </span>
              </a-col>
            </a-row>
          </a-form>
        </div>
        <!-- table区域-begin -->
        <div>
          <a-table
            ref="table"
            bordered
            size="middle"
            rowKey="id"
            :columns="columns"
            :dataSource="dataSource"
            :pagination="ipagination"
            :scroll="scroll"
            :loading="loading"
            :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
            @change="handleTableChange"
          >
            <span slot="action" slot-scope="text, record">
              <a @click="">查看</a>
              <a-divider type="vertical" />
              <a-popconfirm
                title="确定删除吗?"
                @confirm="() => handleDelete(record.id)"
              >
                <a>删除</a>
              </a-popconfirm>
            </span>
          </a-table>
        </div>
        <!-- table区域-end -->
      </a-card>
    </a-col>
  </a-row>
</template>
<script>
import { postAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
export default {
  name: 'FlowList',
  mixins: [JeecgListMixin],
  components: {},
  data() {
    return {
      labelCol: {
        span: 5,
      },
      wrapperCol: {
        span: 18,
        offset: 1,
      },
      queryParam: {},
      depotFlag: '0',
      customerFlag: '0',
      columns: [
        { title: '流程类型', dataIndex: 'username', width: 100, align: 'left' },
        { title: '流程节点1', dataIndex: 'userType', width: 80, align: 'left' },
        { title: '流程节点2', dataIndex: 'roleName', width: 100, align: 'left' },
        { title: '流程节点3', dataIndex: 'orgAbr', width: 100, align: 'left' },
        { title: '流程节点4', dataIndex: 'leaderFlagStr', width: 60, align: 'left' },
        { title: '备注', dataIndex: 'phonenum', width: 80, align: 'left' },
        {
          title: '操作',
          dataIndex: 'action',
          scopedSlots: { customRender: 'action' },
          align: 'center',
          width: 100,
        },
      ],
      url: {
        list: '',
        delete: '',
      },
    }
  },
  created() {
  },
  methods: {
    searchQuery() {
      this.loadData(1)
      this.getSystemConfig()
    },
    searchReset() {
      this.queryParam = {}
      this.loadData(1)
      this.getSystemConfig()
    },
  },
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
