
<template>
  <div class="page">
    <LayoutTable :data="tableData" :config="tableConfig" notAdd notDel>
    </LayoutTable>
  </div>
</template>

<script>

import table from "@/assets/mixins/table";

export default {
  name: "todoList",
  components: {},
  mixins: [table],
  async created() {

  },
  mounted() {},
  beforeDestroy: function () {
    // 页面离开时断开连接,清除定时器
  },
  methods: {
    // 跳转到处理页面
    handleProcess(row) {
      this.$router.push({
        path: "/flowable/task/record/index",
        query: {
          procInsId: row.procInsId,
          deployId: row.deployId,
          taskId: row.taskId,
          businessKey: row.businessKey,
          finished: true,
        },
      });
    },

    /** 新增按钮操作 */
    handleAdd() {
      console.log("新增按钮操作");
      this.reset();
      this.open = true;
      this.title = "添加流程定义";
    },
  },
  data() {
    return {

      formConfOpen: false,
      formTitle: "",
      formDeployOpen: false,
      formDeployTitle: "",
      formList: [],
      formConf: {}, // 默认表单数据
      // 表单参数
      form: {},
      // 表单校验
      rules: {},
      config: {
        search: [
          {
            name: "name",
            type: "text",
            label: "名称",
          },
        ],
        columns: [
          {
            prop: "taskId",
            label: "任务编号",
          },
          {
            prop: "taskName",
            label: "任务节点",
          },

          {
            prop: "procDefName",
            label: "流程名称",
          },

           {
            prop: "procInsId",
            label: "流程实例",
          },

           {
            prop: "businessKey",
            label: "业务key",
          },

          {
            prop: "platformSn",
            label: "所属平台",
          },

          {
            prop: "createTime",
            label: "接收时间",
            width: 140,
            formatter: this.formatterDate,
          },

          {
            label: "操作",
            width: 180,
            formatter: (row) => {
              return (
                <div>
                <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-edit-outline"
                  onClick={() => {
                    this.handleProcess(row);
                  }}
                >
                  撤销
                </el-button>
                <span> </span>

                <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-edit-outline"
                  onClick={() => {
                    this.handleProcess(row);
                  }}
                >
                  删除
                </el-button>
                <span> </span>

                <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-edit-outline"
                  onClick={() => {
                    this.handleProcess(row);
                  }}
                >
                  预览
                </el-button>
                <span> </span>

                </div>
              );
            },
          },
        ],
      },
    };
  },
};
</script>
