"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../../../../../node_modules/element-plus/es/index.js");
;/* empty css                                                                      */
;/* empty css                                                                              */
;/* empty css                                                                             */
;/* empty css                                                                                  */
const Vue = require("vue");
;/* empty css               */
const _pluginVue_exportHelper = require("../../../../../../../../_virtual/_plugin-vue_export-helper.js");
const index = require("../../../../../../../../node_modules/element-plus/es/components/scrollbar/index.js");
const index$1 = require("../../../../../../../../node_modules/element-plus/es/components/timeline/index.js");
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 = index$1.ElTimelineItem;
      const _component_el_timeline = index$1.ElTimeline;
      const _component_el_scrollbar = index.ElScrollbar;
      return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
        Vue.createVNode(_component_el_scrollbar, null, {
          default: Vue.withCtx(() => [
            Vue.createVNode(_component_el_timeline, null, {
              default: Vue.withCtx(() => [
                (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(__props.taskList, (node) => {
                  return Vue.openBlock(), Vue.createBlock(_component_el_timeline_item, {
                    "hide-timestamp": true,
                    color: "var(--el-color-primary)",
                    size: "large"
                  }, {
                    default: Vue.withCtx(() => [
                      Vue.createElementVNode("div", _hoisted_2, [
                        Vue.createElementVNode("span", _hoisted_3, Vue.toDisplayString(node.name), 1),
                        Vue.createElementVNode("span", _hoisted_4, Vue.toDisplayString(node.createTime), 1)
                      ]),
                      node.taskType == "task" || node.taskType == "callActivity" || node.taskType == "bizTask" ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_5, [
                        Vue.createElementVNode("div", _hoisted_6, [
                          Vue.createElementVNode("span", _hoisted_7, [
                            node.assignee ? (Vue.openBlock(), Vue.createElementBlock("span", _hoisted_8, Vue.toDisplayString(getAssigneeName(node.assignee)), 1)) : Vue.createCommentVNode("", true),
                            node.taskType == "bizTask" || node.taskType == "callActivity" ? (Vue.openBlock(), Vue.createElementBlock("span", _hoisted_9, " 办理中... ")) : (Vue.openBlock(), Vue.createElementBlock("span", _hoisted_10, " 审批中... "))
                          ]),
                          Vue.createElementVNode("span", _hoisted_11, "已送达：" + Vue.toDisplayString(node.duration), 1)
                        ])
                      ])) : Vue.createCommentVNode("", true),
                      node.taskType == "signTask" ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_12, [
                        (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(node.signTaskList, (sign) => {
                          return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_13, [
                            Vue.createElementVNode("span", _hoisted_14, [
                              Vue.createElementVNode("span", _hoisted_15, [
                                isBackToBack(sign.assignee) ? (Vue.openBlock(), Vue.createElementBlock("span", _hoisted_16, Vue.toDisplayString(getAssigneeName(sign.assignee)), 1)) : (Vue.openBlock(), Vue.createElementBlock("span", _hoisted_17, "其他处理人"))
                              ]),
                              _cache[0] || (_cache[0] = Vue.createElementVNode("span", { class: "apping" }, " 审批中... ", -1))
                            ]),
                            Vue.createElementVNode("span", _hoisted_18, "已送达：" + Vue.toDisplayString(sign.duration), 1)
                          ]);
                        }), 256))
                      ])) : Vue.createCommentVNode("", true)
                    ]),
                    _: 2
                  }, 1024);
                }), 256)),
                (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(__props.hisTaskList, (node) => {
                  return Vue.openBlock(), Vue.createBlock(_component_el_timeline_item, { "hide-timestamp": true }, {
                    default: Vue.withCtx(() => [
                      Vue.createElementVNode("div", _hoisted_19, [
                        Vue.createElementVNode("span", _hoisted_20, Vue.toDisplayString(node.name), 1),
                        Vue.createElementVNode("span", _hoisted_21, Vue.toDisplayString(node.createTime), 1)
                      ]),
                      node.taskType == "task" || node.taskType == "callActivity" ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_22, [
                        Vue.createElementVNode("div", _hoisted_23, [
                          Vue.createElementVNode("span", _hoisted_24, Vue.toDisplayString(node.approveName || "办理完成"), 1),
                          Vue.createElementVNode("span", _hoisted_25, "耗时：" + Vue.toDisplayString(node.duration), 1)
                        ]),
                        node.approveDesc ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_26, [
                          Vue.createElementVNode("div", _hoisted_27, Vue.toDisplayString(node.approveDesc), 1)
                        ])) : Vue.createCommentVNode("", true),
                        Vue.createElementVNode("div", _hoisted_28, [
                          Vue.createElementVNode("span", _hoisted_29, [
                            _cache[1] || (_cache[1] = Vue.createElementVNode("i", { class: "el-icon-time" }, null, -1)),
                            Vue.createTextVNode(Vue.toDisplayString(node.endTime), 1)
                          ]),
                          node.taskType == "task" ? (Vue.openBlock(), Vue.createElementBlock("span", _hoisted_30, [
                            _cache[2] || (_cache[2] = Vue.createTextVNode("处理人：")),
                            Vue.createElementVNode("span", _hoisted_31, Vue.toDisplayString(node.assigneeName), 1)
                          ])) : Vue.createCommentVNode("", true),
                          _cache[3] || (_cache[3] = Vue.createElementVNode("div", { class: "addNodeList" }, null, -1))
                        ])
                      ])) : Vue.createCommentVNode("", true),
                      node.taskType == "signTask" ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_32, [
                        node.signTaskList && node.signTaskList.length > 0 ? (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, { key: 0 }, Vue.renderList(node.signTaskList, (sign) => {
                          return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_33, [
                            Vue.createElementVNode("div", _hoisted_34, [
                              Vue.createElementVNode("span", _hoisted_35, Vue.toDisplayString(sign.approveName), 1),
                              Vue.createElementVNode("span", _hoisted_36, "耗时：" + Vue.toDisplayString(sign.duration), 1)
                            ]),
                            sign.approveDesc ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_37, [
                              Vue.createElementVNode("div", _hoisted_38, Vue.toDisplayString(sign.approveDesc), 1)
                            ])) : Vue.createCommentVNode("", true),
                            Vue.createElementVNode("div", _hoisted_39, [
                              Vue.createElementVNode("span", _hoisted_40, [
                                _cache[4] || (_cache[4] = Vue.createElementVNode("i", { class: "el-icon-time" }, null, -1)),
                                Vue.createTextVNode(Vue.toDisplayString(sign.endTime), 1)
                              ]),
                              Vue.createElementVNode("span", _hoisted_41, [
                                _cache[5] || (_cache[5] = Vue.createTextVNode("处理人：")),
                                Vue.createElementVNode("span", _hoisted_42, Vue.toDisplayString(sign.assigneeName), 1)
                              ]),
                              _cache[6] || (_cache[6] = Vue.createElementVNode("div", { class: "addNodeList" }, null, -1))
                            ])
                          ]);
                        }), 256)) : (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_43, _cache[7] || (_cache[7] = [
                          Vue.createElementVNode("div", { class: "approve" }, [
                            Vue.createElementVNode("span", { class: "point" }),
                            Vue.createElementVNode("span", { class: "iconfont icon-flow-default approveIcon approve_color_11" }),
                            Vue.createElementVNode("span", { class: "approveName approve_color_11" }, "没有查看权限")
                          ], -1)
                        ])))
                      ])) : Vue.createCommentVNode("", true)
                    ]),
                    _: 2
                  }, 1024);
                }), 256))
              ]),
              _: 1
            })
          ]),
          _: 1
        })
      ]);
    };
  }
};
const timeline = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-0ce0023b"]]);
exports.default = timeline;
