<template>
  <a-modal
    :width="800"
    :visible="processedVisible"
    :footer="null"
    title="请选择要查看的已办流程"
    @cancel="cancel"
  >
    <a-table :columns="processedStepsColumns" :data-source="processedSteps" :pagination="false">
      <a slot="flowName" slot-scope="text, record" @click="openRecord(record)">{{ text }}</a>
    </a-table>
  </a-modal>
</template>

<script>
import components from './_import-components/sd-processed-steps-import'
const processedStepsColumns = [
  {
    dataIndex: 'sortNum',
    title: '序号',
    customRender: (text, record, index) => `${index + 1}`,
  },
  {
    dataIndex: 'flowName',
    title: '流程',
    scopedSlots: { customRender: 'flowName' },
  },
  {
    dataIndex: 'stepName',
    title: '最后办理环节',
  },

  {
    dataIndex: 'creatorName',
    title: '发送人',
  },
]
processedStepsColumns.forEach((item) => (item.align = 'center'))
export default {
  name: 'SdProcessedSteps',
  components,
  data() {
    return {
      processedStepsColumns,
      processedVisible: true,
    }
  },
  methods: {
    cancel() {
      this.processedVisible = false
    },
  },
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
</style>
