<!--
 * @Author: tengmingxue 1473375109@qq.com
 * @Date: 2023-08-31 15:17:20
 * @LastEditors: tengmingxue 1473375109@qq.com
 * @LastEditTime: 2023-08-31 16:02:57
 * @FilePath: \xld-gis-admin\src\views\dataAdmin\dataAdmin\flowStep\handleLog.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="handle-log-table">
    <BasicTable @register="registerTable" :clickToRowSelect="false">
      <template #pdate="{ record }">
        <Tag :color="'red'">
          {{ record.handlerTime ? moment(record.handlerTime).format('YYYY-MM-DD HH:mm:ss') : '' }}
        </Tag>
      </template>
      <template #status="{ record }">
        <Tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : '#05B069'};`">
          {{
            record.status === 0
              ? '待审核'
              : record.status === 1
              ? '审核通过'
              : record.status === 2
              ? '审核不通过'
              : record.status === 3
              ? '被驳回'
              : '未提交'
          }}
        </Tag>
      </template>
    </BasicTable>
  </div>
</template>
  <script lang="ts">
import { defineComponent, onBeforeMount } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { columns } from './table.data';
import { RoleEnum } from '/@/enums/roleEnum';
import { Authority } from '/@/components/Authority';
import { useMessage } from '/@/hooks/web/useMessage';
import { Switch, Popconfirm } from 'ant-design-vue';
import { list } from '/@/api/resource/map';
import Moment from 'moment';

export default defineComponent({
  name: 'RoleManagement',
  components: { BasicTable, TableAction, Authority, Switch, Popconfirm },
  setup() {
    const checkInfo = [
        {flowStep:'开始',handleDept:'发电组',handler:'张山',handlerTime:'2013-09-02 11:23:56',status:1,suggestion:'不按章程来',illustrate:'处理'},
        {flowStep:'审核1',handleDept:'发电组',handler:'张山',handlerTime:'2013-09-02 11:23:56',status:2,suggestion:'不按章程来',illustrate:'处理'}
    ]
    const [registerTable] = useTable({
      //api: list,
      dataSource:checkInfo,
      columns,
      useSearchForm: false,
      showTableSetting: false,
      bordered: true,
      showIndexColumn: true,
      pagination:false,
    //   pagination: {
    //     hideOnSinglePage: false,
    //   },
    });
    const moment = Moment;
    const { createMessage } = useMessage();

    onBeforeMount(async () => {});

    return {
      moment,
      createMessage,
      registerTable,
      RoleEnum,
    };
  },
});
</script>
  <style lang="less" scoped>
.handle-log-table {
  height: 100%;
}
</style>

  