import "../../../../../../../../node_modules/element-plus/es/index.mjs";
/* empty css                                                                      */
/* empty css                                                                              */
/* empty css                                                                             */
/* empty css                                                                                  */
import { createElementBlock, openBlock, createVNode, withCtx, Fragment, renderList, createBlock, createElementVNode, createCommentVNode, toDisplayString, createTextVNode } from "vue";
/* empty css               */
import _export_sfc from "../../../../../../../../_virtual/_plugin-vue_export-helper.mjs";
import { ElScrollbar } from "../../../../../../../../node_modules/element-plus/es/components/scrollbar/index.mjs";
import { ElTimeline, ElTimelineItem } from "../../../../../../../../node_modules/element-plus/es/components/timeline/index.mjs";
const _hoisted_1 = { class: "flowChartTimeline" };
const _hoisted_2 = { class: "header" };
const _hoisted_3 = { class: "app nodeName" };
const _hoisted_4 = { class: "createTime" };
const _hoisted_5 = {
  key: 0,
  class: "appContent"
};
const _hoisted_6 = { class: "openTask" };
const _hoisted_7 = { style: { "font-weight": "bold" } };
const _hoisted_8 = {
  key: 0,
  class: "appAssignee"
};
const _hoisted_9 = {
  key: 1,
  class: "apping"
};
const _hoisted_10 = {
  key: 2,
  class: "apping"
};
const _hoisted_11 = { class: "duration" };
const _hoisted_12 = {
  key: 1,
  class: "appContent"
};
const _hoisted_13 = { class: "openTask sign" };
const _hoisted_14 = { style: { "font-weight": "bold" } };
const _hoisted_15 = { class: "appAssignee" };
const _hoisted_16 = { key: 0 };
const _hoisted_17 = {
  key: 1,
  style: { "color": "#999" }
};
const _hoisted_18 = { class: "duration" };
const _hoisted_19 = { class: "header" };
const _hoisted_20 = { class: "nodeName" };
const _hoisted_21 = { class: "createTime" };
const _hoisted_22 = {
  key: 0,
  class: "content"
};
const _hoisted_23 = { class: "app-header" };
const _hoisted_24 = { class: "approveType" };
const _hoisted_25 = { class: "duration" };
const _hoisted_26 = {
  key: 0,
  class: "app-content"
};
const _hoisted_27 = { class: "approveIdea" };
const _hoisted_28 = { class: "app-footer" };
const _hoisted_29 = { class: "endTime" };
const _hoisted_30 = {
  key: 0,
  class: "assignee"
};
const _hoisted_31 = { class: "assignee-name" };
const _hoisted_32 = {
  key: 1,
  class: "signContent"
};
const _hoisted_33 = { class: "content" };
const _hoisted_34 = { class: "app-header" };
const _hoisted_35 = { class: "approveType" };
const _hoisted_36 = { class: "duration" };
const _hoisted_37 = {
  key: 0,
  class: "app-content"
};
const _hoisted_38 = { class: "approveIdea" };
const _hoisted_39 = { class: "app-footer" };
const _hoisted_40 = { class: "endTime" };
const _hoisted_41 = { class: "assignee" };
const _hoisted_42 = { class: "assignee-name" };
const _hoisted_43 = {
  key: 1,
  class: "content"
};
const _sfc_main = {
  __name: "timeline",
  props: {
    hisTaskList: {
      type: Array,
      default: []
    },
    taskList: {
      type: Array,
      default: []
    }
  },
  setup(__props) {
    function getAssigneeName(assignee) {
      let assigneeName = "";
      for (let i in assignee) {
        assigneeName += assignee[i].opName;
        if (i < assignee.length - 1) {
          assigneeName += ",";
        }
      }
      return assigneeName;
    }
    function isBackToBack(assigneeList) {
      const assignee = assigneeList[0];
      if (assignee.opNo == window.$store.getters.user.opNo) {
        return true;
      } else {
        return false;
      }
    }
    return (_ctx, _cache) => {
      const _component_el_timeline_item = ElTimelineItem;
      const _component_el_timeline = ElTimeline;
      const _component_el_scrollbar = ElScrollbar;
      return openBlock(), createElementBlock("div", _hoisted_1, [
        createVNode(_component_el_scrollbar, null, {
          default: withCtx(() => [
            createVNode(_component_el_timeline, null, {
              default: withCtx(() => [
                (openBlock(true), createElementBlock(Fragment, null, renderList(__props.taskList, (node) => {
                  return openBlock(), createBlock(_component_el_timeline_item, {
                    "hide-timestamp": true,
                    color: "var(--el-color-primary)",
                    size: "large"
                  }, {
                    default: withCtx(() => [
                      createElementVNode("div", _hoisted_2, [
                        createElementVNode("span", _hoisted_3, toDisplayString(node.name), 1),
                        createElementVNode("span", _hoisted_4, toDisplayString(node.createTime), 1)
                      ]),
                      node.taskType == "task" || node.taskType == "callActivity" || node.taskType == "bizTask" ? (openBlock(), createElementBlock("div", _hoisted_5, [
                        createElementVNode("div", _hoisted_6, [
                          createElementVNode("span", _hoisted_7, [
                            node.assignee ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(getAssigneeName(node.assignee)), 1)) : createCommentVNode("", true),
                            node.taskType == "bizTask" || node.taskType == "callActivity" ? (openBlock(), createElementBlock("span", _hoisted_9, " 办理中... ")) : (openBlock(), createElementBlock("span", _hoisted_10, " 审批中... "))
                          ]),
                          createElementVNode("span", _hoisted_11, "已送达：" + toDisplayString(node.duration), 1)
                        ])
                      ])) : createCommentVNode("", true),
                      node.taskType == "signTask" ? (openBlock(), createElementBlock("div", _hoisted_12, [
                        (openBlock(true), createElementBlock(Fragment, null, renderList(node.signTaskList, (sign) => {
                          return openBlock(), createElementBlock("div", _hoisted_13, [
                            createElementVNode("span", _hoisted_14, [
                              createElementVNode("span", _hoisted_15, [
                                isBackToBack(sign.assignee) ? (openBlock(), createElementBlock("span", _hoisted_16, toDisplayString(getAssigneeName(sign.assignee)), 1)) : (openBlock(), createElementBlock("span", _hoisted_17, "其他处理人"))
                              ]),
                              _cache[0] || (_cache[0] = createElementVNode("span", { class: "apping" }, " 审批中... ", -1))
                            ]),
                            createElementVNode("span", _hoisted_18, "已送达：" + toDisplayString(sign.duration), 1)
                          ]);
                        }), 256))
                      ])) : createCommentVNode("", true)
                    ]),
                    _: 2
                  }, 1024);
                }), 256)),
                (openBlock(true), createElementBlock(Fragment, null, renderList(__props.hisTaskList, (node) => {
                  return openBlock(), createBlock(_component_el_timeline_item, { "hide-timestamp": true }, {
                    default: withCtx(() => [
                      createElementVNode("div", _hoisted_19, [
                        createElementVNode("span", _hoisted_20, toDisplayString(node.name), 1),
                        createElementVNode("span", _hoisted_21, toDisplayString(node.createTime), 1)
                      ]),
                      node.taskType == "task" || node.taskType == "callActivity" ? (openBlock(), createElementBlock("div", _hoisted_22, [
                        createElementVNode("div", _hoisted_23, [
                          createElementVNode("span", _hoisted_24, toDisplayString(node.approveName || "办理完成"), 1),
                          createElementVNode("span", _hoisted_25, "耗时：" + toDisplayString(node.duration), 1)
                        ]),
                        node.approveDesc ? (openBlock(), createElementBlock("div", _hoisted_26, [
                          createElementVNode("div", _hoisted_27, toDisplayString(node.approveDesc), 1)
                        ])) : createCommentVNode("", true),
                        createElementVNode("div", _hoisted_28, [
                          createElementVNode("span", _hoisted_29, [
                            _cache[1] || (_cache[1] = createElementVNode("i", { class: "el-icon-time" }, null, -1)),
                            createTextVNode(toDisplayString(node.endTime), 1)
                          ]),
                          node.taskType == "task" ? (openBlock(), createElementBlock("span", _hoisted_30, [
                            _cache[2] || (_cache[2] = createTextVNode("处理人：")),
                            createElementVNode("span", _hoisted_31, toDisplayString(node.assigneeName), 1)
                          ])) : createCommentVNode("", true),
                          _cache[3] || (_cache[3] = createElementVNode("div", { class: "addNodeList" }, null, -1))
                        ])
                      ])) : createCommentVNode("", true),
                      node.taskType == "signTask" ? (openBlock(), createElementBlock("div", _hoisted_32, [
                        node.signTaskList && node.signTaskList.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(node.signTaskList, (sign) => {
                          return openBlock(), createElementBlock("div", _hoisted_33, [
                            createElementVNode("div", _hoisted_34, [
                              createElementVNode("span", _hoisted_35, toDisplayString(sign.approveName), 1),
                              createElementVNode("span", _hoisted_36, "耗时：" + toDisplayString(sign.duration), 1)
                            ]),
                            sign.approveDesc ? (openBlock(), createElementBlock("div", _hoisted_37, [
                              createElementVNode("div", _hoisted_38, toDisplayString(sign.approveDesc), 1)
                            ])) : createCommentVNode("", true),
                            createElementVNode("div", _hoisted_39, [
                              createElementVNode("span", _hoisted_40, [
                                _cache[4] || (_cache[4] = createElementVNode("i", { class: "el-icon-time" }, null, -1)),
                                createTextVNode(toDisplayString(sign.endTime), 1)
                              ]),
                              createElementVNode("span", _hoisted_41, [
                                _cache[5] || (_cache[5] = createTextVNode("处理人：")),
                                createElementVNode("span", _hoisted_42, toDisplayString(sign.assigneeName), 1)
                              ]),
                              _cache[6] || (_cache[6] = createElementVNode("div", { class: "addNodeList" }, null, -1))
                            ])
                          ]);
                        }), 256)) : (openBlock(), createElementBlock("div", _hoisted_43, _cache[7] || (_cache[7] = [
                          createElementVNode("div", { class: "approve" }, [
                            createElementVNode("span", { class: "point" }),
                            createElementVNode("span", { class: "iconfont icon-flow-default approveIcon approve_color_11" }),
                            createElementVNode("span", { class: "approveName approve_color_11" }, "没有查看权限")
                          ], -1)
                        ])))
                      ])) : createCommentVNode("", true)
                    ]),
                    _: 2
                  }, 1024);
                }), 256))
              ]),
              _: 1
            })
          ]),
          _: 1
        })
      ]);
    };
  }
};
const timeline = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0ce0023b"]]);
export {
  timeline as default
};
