<template>
  <div>
    <sd-data-table
      ref="dataTable4"
      data-url="api/framework/v1/delegation-manager/delegatedlist"
      :columns="columns4"
      :search-fields="['TITLE']"
      :process-req="processReq"
    >
    </sd-data-table>
  </div>
</template>

<script>
import { Message } from 'ant-design-vue'
import TableColumnTypes from '../../common/services/table-column-types'
import components from './_import-components/sd-my-entrusted-record-list-import'

export default {
  name: 'SdMyEntrustedRecordList',
  components,
  data() {
    return {
      searchform: {
        isopen: false,
      },
      columns4: [
        {
          title: '业务类型',
          dataIndex: 'flowName',
        },
        {
          title: '标题',
          dataIndex: 'title',
        },

        {
          title: '委托人',
          dataIndex: 'activityTrustorName',
        },
        {
          title: '执行的操作',
          dataIndex: 'activityActionName',
        },
        {
          title: '办理时间',
          sdRender: TableColumnTypes.dateTime,
          dataIndex: 'activityFinishDate',
          defaultSortOrder: 'desc',
          sorter: true,
        },
      ],
    }
  },
  computed: {},
  created() {},
  methods: {
    // 修改查询参数
    processReq(req) {
      if (req.data?.expressions[0]) {
        const exp = req.data.expressions[0].expressionsValue
        req.data.expressions = exp
      }
      return req
    },
    // 高级搜索展开按钮事件
    superBtnClick() {
      this.searchform.isopen = !this.searchform.isopen
    },
    // 高级查询按钮
    searchSubmit(val) {
      Message.success(`搜索条件为${val}`)
    },
  },
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
.date {
  width: 100%;
}
</style>
