<template>
  <div style="height: 100%">
    <w-grid
      ref="gridRef"
      title="待办任务"
      :fetch-data-url="Environment.apiContextPath('api/system/process/task/waitTaskAllList')"
      :sort-no="true"
      :checkbox-selection="false"
      :query-form-cols-num="4"
      :query-form-fields="grid.queryFormFields"
      :columns="grid.columns"
      :toolbar-actions="grid.buttons"
      :pagination="{
        reqPageStart: 1,
        sortBy: 'CREATE_TIME',
        descending: true,
      }"
    ></w-grid>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { Environment, EnumTools, DictionaryTools, Options, Formater, axios, NotifyManager } from 'platform-core';

const gridRef = ref();

const grid = {
  queryFormFields: [
    { label: '业务流水号', name: 'BUSINESS_ID', type: 'text' },
    { label: '流程名称', name: 'PROC_NAME', type: 'text' },
    { label: '任务节点', name: 'TASK_NAME', type: 'text' },
    { label: '任务描述', name: 'TASK_DESC', type: 'text' },
  ],
  buttons: [
    'query',
    'reset',
    'separator',
    'refresh',
    {
      name: 'handle',
      label: '办理',
      icon: 'home',
      click: () => {},
    },
    'separator',
  ],
  columns: [
    { label: '业务流水号', name: 'BUSINESS_ID' },
    { label: '流程名称', name: 'PROC_NAME' },
    { label: '任务节点', name: 'TASK_NAME' },
    { label: '任务描述', name: 'TASK_DESC' },
    { label: '任务开始时间', name: 'CREATE_TIME' },
  ],
};
</script>
