import { createElementBlock, openBlock, createVNode, withCtx, Fragment, renderList, createBlock, createElementVNode, createCommentVNode, toDisplayString, createTextVNode, pushScopeId, popScopeId } from "vue";
import s from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
import { ElTimeline as r, ElTimelineItem as p } from "../../../../../node_modules/element-plus/es/components/timeline/index.mjs";
import { ElScrollbar as a } from "../../../../../node_modules/element-plus/es/components/scrollbar/index.mjs";
const _ = (c) => (pushScopeId("data-v-269c174b"), c = c(), popScopeId(), c), C = { class: "flowChartTimeline" }, x = { class: "header" }, B = { class: "app nodeName" }, D = { class: "createTime" }, E = {
  key: 0,
  class: "appContent"
}, S = { class: "openTask" }, V = { style: { "font-weight": "bold" } }, z = {
  key: 0,
  class: "appAssignee"
}, F = {
  key: 1,
  class: "apping"
}, $ = {
  key: 2,
  class: "apping"
}, j = { class: "duration" }, q = {
  key: 1,
  class: "appContent"
}, G = { class: "openTask sign" }, H = { style: { "font-weight": "bold" } }, J = { class: "appAssignee" }, K = { key: 0 }, M = {
  key: 1,
  style: { color: "#999" }
}, O = /* @__PURE__ */ _(() => /* @__PURE__ */ createElementVNode("span", { class: "apping" }, " 审批中... ", -1)), P = { class: "duration" }, Q = { class: "header" }, R = { class: "nodeName" }, U = { class: "createTime" }, W = {
  key: 0,
  class: "content"
}, X = { class: "app-header" }, Y = { class: "approveType" }, Z = { class: "duration" }, ss = {
  key: 0,
  class: "app-content"
}, es = { class: "approveIdea" }, ts = { class: "app-footer" }, as = { class: "endTime" }, os = /* @__PURE__ */ _(() => /* @__PURE__ */ createElementVNode("i", { class: "el-icon-time" }, null, -1)), is = {
  key: 0,
  class: "assignee"
}, ns = { class: "assignee-name" }, cs = /* @__PURE__ */ _(() => /* @__PURE__ */ createElementVNode("div", { class: "addNodeList" }, null, -1)), ps = {
  key: 1,
  class: "signContent"
}, _s = { class: "content" }, ls = { class: "app-header" }, rs = { class: "approveType" }, ds = { class: "duration" }, hs = {
  key: 0,
  class: "app-content"
}, ms = { class: "approveIdea" }, us = { class: "app-footer" }, ks = { class: "endTime" }, vs = /* @__PURE__ */ _(() => /* @__PURE__ */ createElementVNode("i", { class: "el-icon-time" }, null, -1)), ys = { class: "assignee" }, Ts = { class: "assignee-name" }, fs = /* @__PURE__ */ _(() => /* @__PURE__ */ createElementVNode("div", { class: "addNodeList" }, null, -1)), gs = {
  key: 1,
  class: "content"
}, Ns = /* @__PURE__ */ _(() => /* @__PURE__ */ createElementVNode("div", { class: "approve" }, [
  /* @__PURE__ */ createElementVNode("span", { class: "point" }),
  /* @__PURE__ */ createElementVNode("span", { class: "iconfont icon-flow-default approveIcon approve_color_11" }),
  /* @__PURE__ */ createElementVNode("span", { class: "approveName approve_color_11" }, "没有查看权限")
], -1)), Ls = [
  Ns
], bs = {
  __name: "timeline",
  props: {
    hisTaskList: {
      type: Array,
      default: []
    },
    taskList: {
      type: Array,
      default: []
    }
  },
  setup(c) {
    function k(p2) {
      let l = "";
      for (let r2 in p2)
        l += p2[r2].opName, r2 < p2.length - 1 && (l += ",");
      return l;
    }
    function T(p2) {
      return p2[0].opNo == window.$store.getters.user.opNo;
    }
    return (p$1, l) => {
      const r$1 = p, f = r, g = a;
      return openBlock(), createElementBlock("div", C, [
        createVNode(g, null, {
          default: withCtx(() => [
            createVNode(f, null, {
              default: withCtx(() => [
                (openBlock(true), createElementBlock(Fragment, null, renderList(c.taskList, (e) => (openBlock(), createBlock(r$1, {
                  "hide-timestamp": true,
                  color: "var(--el-color-primary)",
                  size: "large"
                }, {
                  default: withCtx(() => [
                    createElementVNode("div", x, [
                      createElementVNode("span", B, toDisplayString(e.name), 1),
                      createElementVNode("span", D, toDisplayString(e.createTime), 1)
                    ]),
                    e.taskType == "task" || e.taskType == "callActivity" || e.taskType == "bizTask" ? (openBlock(), createElementBlock("div", E, [
                      createElementVNode("div", S, [
                        createElementVNode("span", V, [
                          e.assignee ? (openBlock(), createElementBlock("span", z, toDisplayString(k(e.assignee)), 1)) : createCommentVNode("", true),
                          e.taskType == "bizTask" || e.taskType == "callActivity" ? (openBlock(), createElementBlock("span", F, " 办理中... ")) : (openBlock(), createElementBlock("span", $, " 审批中... "))
                        ]),
                        createElementVNode("span", j, "已送达：" + toDisplayString(e.duration), 1)
                      ])
                    ])) : createCommentVNode("", true),
                    e.taskType == "signTask" ? (openBlock(), createElementBlock("div", q, [
                      (openBlock(true), createElementBlock(Fragment, null, renderList(e.signTaskList, (i) => (openBlock(), createElementBlock("div", G, [
                        createElementVNode("span", H, [
                          createElementVNode("span", J, [
                            T(i.assignee) ? (openBlock(), createElementBlock("span", K, toDisplayString(k(i.assignee)), 1)) : (openBlock(), createElementBlock("span", M, "其他处理人"))
                          ]),
                          O
                        ]),
                        createElementVNode("span", P, "已送达：" + toDisplayString(i.duration), 1)
                      ]))), 256))
                    ])) : createCommentVNode("", true)
                  ]),
                  _: 2
                }, 1024))), 256)),
                (openBlock(true), createElementBlock(Fragment, null, renderList(c.hisTaskList, (e) => (openBlock(), createBlock(r$1, { "hide-timestamp": true }, {
                  default: withCtx(() => [
                    createElementVNode("div", Q, [
                      createElementVNode("span", R, toDisplayString(e.name), 1),
                      createElementVNode("span", U, toDisplayString(e.createTime), 1)
                    ]),
                    e.taskType == "task" || e.taskType == "callActivity" ? (openBlock(), createElementBlock("div", W, [
                      createElementVNode("div", X, [
                        createElementVNode("span", Y, toDisplayString(e.approveName || "办理完成"), 1),
                        createElementVNode("span", Z, "耗时：" + toDisplayString(e.duration), 1)
                      ]),
                      e.approveDesc ? (openBlock(), createElementBlock("div", ss, [
                        createElementVNode("div", es, toDisplayString(e.approveDesc), 1)
                      ])) : createCommentVNode("", true),
                      createElementVNode("div", ts, [
                        createElementVNode("span", as, [
                          os,
                          createTextVNode(toDisplayString(e.endTime), 1)
                        ]),
                        e.taskType == "task" ? (openBlock(), createElementBlock("span", is, [
                          createTextVNode("处理人："),
                          createElementVNode("span", ns, toDisplayString(e.assigneeName), 1)
                        ])) : createCommentVNode("", true),
                        cs
                      ])
                    ])) : createCommentVNode("", true),
                    e.taskType == "signTask" ? (openBlock(), createElementBlock("div", ps, [
                      e.signTaskList && e.signTaskList.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(e.signTaskList, (i) => (openBlock(), createElementBlock("div", _s, [
                        createElementVNode("div", ls, [
                          createElementVNode("span", rs, toDisplayString(i.approveName), 1),
                          createElementVNode("span", ds, "耗时：" + toDisplayString(i.duration), 1)
                        ]),
                        i.approveDesc ? (openBlock(), createElementBlock("div", hs, [
                          createElementVNode("div", ms, toDisplayString(i.approveDesc), 1)
                        ])) : createCommentVNode("", true),
                        createElementVNode("div", us, [
                          createElementVNode("span", ks, [
                            vs,
                            createTextVNode(toDisplayString(i.endTime), 1)
                          ]),
                          createElementVNode("span", ys, [
                            createTextVNode("处理人："),
                            createElementVNode("span", Ts, toDisplayString(i.assigneeName), 1)
                          ]),
                          fs
                        ])
                      ]))), 256)) : (openBlock(), createElementBlock("div", gs, Ls))
                    ])) : createCommentVNode("", true)
                  ]),
                  _: 2
                }, 1024))), 256))
              ]),
              _: 1
            })
          ]),
          _: 1
        })
      ]);
    };
  }
}, Vs = /* @__PURE__ */ s(bs, [["__scopeId", "data-v-269c174b"]]);
export {
  Vs as default
};
