var Q = Object.defineProperty;
var X = (t, n, s) => n in t ? Q(t, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[n] = s;
var b = (t, n, s) => (X(t, typeof n != "symbol" ? n + "" : n, s), s);
import { PluginStaticResource as Z, ViewMode as ee } from "@ibiz-template/runtime";
import { ref as C, watch as _, defineComponent as S, getCurrentInstance as z, computed as N, onMounted as K, h as a, toRefs as te, reactive as se, nextTick as F, toRef as ae } from "vue";
import { useRouter as B, useRoute as R, useIndexViewController as ne, useNamespace as q, useControlController as oe, usePropsWatch as re, useListController as ie, useListExpViewController as le, useRouteKey as ce, getUploadProps as de, getEditorEmits as ue, useMPickupViewController as he, useTreeController as pe } from "@ibiz-template/vue-util";
import { createUUID as me } from "qx-util";
import { IndexViewModel as fe, PortletPartModel as ge, ViewPortletModel as ve, ListModel as U, TreeModel as ye } from "@ibiz-template/model";
import O from "dayjs";
import { CustomPortletController as we, ViewPortletController as Ce, EditFormController as be, ListController as xe, UploadEditorController as ke, FormMDCtrlController as Pe } from "@ibiz-template/controller";
import { mergeDeepRight as De } from "ramda";
import { init as Se, registerMap as qe } from "echarts";
import { Treeselect as _e } from "@riophae/vue-treeselect";
const E = new Z(import.meta.url);
class Me {
  constructor() {
    b(this, "component", "UserIndexView");
  }
}
const Ee = (t) => {
  const { view2: n, params2: s, params1: e } = t.params;
  if (!n)
    return "";
  let r = s.replace(
    new RegExp(";srfnav=[^;=]*$|(?<=;)srfnav=[^;=]*;|^srfnav=[^;=]*;|^srfnav=[^;=]*$", "g"),
    ""
  );
  return r = r || ibiz.env.routePlaceholder, `/${e}/${n}/${r}`;
}, Te = (t) => {
  const { view1: n, appContext: s } = t.params;
  return `/${s}/${n}/${ibiz.env.routePlaceholder}`;
};
function Ie(t, n) {
  const s = B(t), e = C(""), r = C(""), o = C([]), u = C([]), y = (l) => {
    l.forEach((h) => {
      const w = o.value.indexOf(h);
      w !== -1 && o.value.splice(w, 1);
      const k = u.value.findIndex((v) => v.key === h);
      k !== -1 && u.value.splice(k, 1);
    });
  };
  _(
    () => t.$route.path,
    (l, h) => {
      if (l !== h) {
        const w = R(t);
        e.value = Ee(w), r.value = Te(w);
        const k = u.value.find(
          (v) => v.key === e.value
        );
        if (k)
          w.matched.length === 2 ? s.push(k.fullPath) : k.fullPath = w.fullPath;
        else {
          if (l === r.value)
            return;
          u.value.push({
            key: e.value,
            fullPath: w.fullPath,
            modelPath: "",
            caption: ""
          });
        }
      }
    },
    { deep: !0, immediate: !0 }
  ), _(
    e,
    (l, h) => {
      if (l !== h && l) {
        const w = o.value.indexOf(l);
        w === -1 || o.value.splice(w, 1), o.value.unshift(l);
      }
    },
    { immediate: !0 }
  );
  const i = async (l, h) => {
    const w = u.value.find((k) => k.key === e.value);
    w && (h.caption && (w.caption = h.caption), h.modelPath && (w.modelPath = h.modelPath));
  }, p = (l = e.value) => {
    y([l]);
    const h = o.value[0];
    if (!h)
      n.model.source.blankMode ? window.close() : (e.value = "", s.push(r.value));
    else {
      const w = u.value.find((k) => k.key === h);
      s.push(w.fullPath);
    }
  }, f = (l) => {
    const h = u.value[l];
    h && s.push(h.fullPath);
  }, g = () => {
    const h = R(t).fullPath;
    let w = h.indexOf("/");
    for (let v = 0; v < 2; v++)
      w = h.indexOf("/", w + 1);
    const k = `${h.substring(0, w)}/-`;
    s.push(k);
  }, d = () => {
    if (o.value.length > 0) {
      const l = u.value.find(
        (h) => h.key === o.value[0]
      );
      l && s.push(l.fullPath);
    } else
      g();
  };
  return {
    currentKey: e,
    keyHistory: o,
    routeMsgs: u,
    updateRouteMsg: i,
    closeView: p,
    deleteRouteCache: y,
    handleTabClick: f,
    handleTabDelete: (l) => {
      const h = u.value[l];
      h && (y([h.key]), d());
    },
    handleCloseAll: () => {
      if (u.value.length > 0) {
        const l = [];
        u.value.forEach((h) => {
          l.push(h.key);
        }), y(l), d();
      }
    },
    handleCloseOther: () => {
      if (u.value.length > 0) {
        const l = [];
        u.value.forEach((h) => {
          h.key !== e.value && l.push(h.key);
        }), y(l), d();
      }
    }
  };
}
const Ve = /* @__PURE__ */ S({
  __name: "index-view",
  props: {
    context: null,
    params: { default: () => ({}) },
    modelPath: null
  },
  setup(t) {
    const n = t, { proxy: s } = z(), e = ne(s, n.modelPath), r = !0;
    let o = null, u = null, y = () => {
    }, i = null, p = null, f = null, g = null, d = null, c, m, x, l;
    const h = C(me());
    {
      const {
        currentKey: k,
        keyHistory: v,
        routeMsgs: P,
        updateRouteMsg: D,
        closeView: $,
        deleteRouteCache: A,
        handleTabClick: I,
        handleTabDelete: V,
        handleCloseAll: T,
        handleCloseOther: J
      } = Ie(s, e);
      m = k, x = v, l = P, i = A, p = I, f = V, g = T, d = J, o = (M) => {
        const L = m.value;
        M.evt.on("closeView", () => {
          $(L);
        }), M.evt.on("setTitle", (G) => {
          D(L, { caption: G });
        });
      }, u = (M) => {
        D(m.value, M);
      }, window.onpopstate = () => {
        i([x.value[1]]);
      }, c = N(() => {
        const M = l.value.find(
          (L) => L.key === m.value
        );
        return (M == null ? void 0 : M.modelPath) || "";
      });
    }
    return K(() => {
      setTimeout(() => {
        const k = document.querySelector(".app-loading-x");
        k && (k.style.display = "none");
      }, 300);
    }), { __sfc: !0, props: n, proxy: s, c: e, isShowTabPageExp: r, onCreated: o, onViewFound: u, onMenuRouteChange: y, deleteRouteCache: i, handleTabClick: p, handleTabDelete: f, handleCloseAll: g, handleCloseOther: d, currentPath: c, currentKey: m, keyHistory: x, routeMsgs: l, appKeepAliveKey: h, collapseChange: (k) => {
      e.collapseChange = k;
    } };
  }
});
function ze(t, n, s, e, r, o, u, y) {
  var i = typeof t == "function" ? t.options : t;
  n && (i.render = n, i.staticRenderFns = s, i._compiled = !0), e && (i.functional = !0), o && (i._scopeId = "data-v-" + o);
  var p;
  if (u ? (p = function(d) {
    d = d || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !d && typeof __VUE_SSR_CONTEXT__ < "u" && (d = __VUE_SSR_CONTEXT__), r && r.call(this, d), d && d._registeredComponents && d._registeredComponents.add(u);
  }, i._ssrRegister = p) : r && (p = y ? function() {
    r.call(
      this,
      (i.functional ? this.parent : this).$root.$options.shadowRoot
    );
  } : r), p)
    if (i.functional) {
      i._injectStyles = p;
      var f = i.render;
      i.render = function(c, m) {
        return p.call(m), f(c, m);
      };
    } else {
      var g = i.beforeCreate;
      i.beforeCreate = g ? [].concat(g, p) : [p];
    }
  return {
    exports: t,
    options: i
  };
}
var Ae = function() {
  var n = this, s = n._self._c, e = n._self._setupProxy;
  return s("UserAppLayout", { attrs: { "is-complete": e.c.complete, model: e.c.model, "is-show-tab-page-exp": e.isShowTabPageExp }, on: { onCollapseChange: e.collapseChange } }, [e.c.complete ? [e.c.complete ? s("app-menu", { attrs: { slot: "menu", "current-path": e.currentPath, "model-data": e.c.model.appMenu, context: e.c.context, "collapse-change": e.c.collapseChange }, on: { menuRouteChange: e.onMenuRouteChange }, slot: "menu" }) : n._e(), e.isShowTabPageExp ? s("user-tab-page-exp", { attrs: { slot: "tabPageExp", "route-msgs": e.routeMsgs, "current-key": e.currentKey }, on: { "tab-click": e.handleTabClick, "tab-delete": e.handleTabDelete, "close-all": e.handleCloseAll, "close-other": e.handleCloseOther }, slot: "tabPageExp" }) : n._e(), e.isShowTabPageExp ? s("AppKeepAlive", { attrs: { "key-list": e.keyHistory } }, [s("router-view", { key: e.currentKey, on: { neuronInit: e.onCreated, viewFound: e.onViewFound } })], 1) : s("AppKeepAlive", { key: e.appKeepAliveKey, attrs: { "key-list": e.keyHistory } }, [s("router-view", { key: e.currentKey, on: { neuronInit: e.onCreated, viewFound: e.onViewFound } })], 1)] : n._e()], 2);
}, Le = [], Oe = /* @__PURE__ */ ze(
  Ve,
  Ae,
  Le,
  !1,
  null,
  null,
  null,
  null
);
const Ke = Oe.exports;
const H = S({
  name: "ChangePassword",
  props: {
    isShowModal: {
      type: Boolean,
      default: !1
    }
  },
  setup(t, {
    emit: n
  }) {
    const s = q("change-password"), e = C(null), r = C({
      oldPwd: "",
      newPwd: "",
      newPwd2: ""
    }), o = C(!1), u = {
      oldPwd: [{
        required: !0,
        message: "\u8BF7\u8F93\u5165\u539F\u5BC6\u7801",
        trigger: "blur"
      }],
      newPwd: [{
        required: !0,
        trigger: "blur",
        min: 8,
        max: 20,
        pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+~`/*-])[A-Za-z\d!@#$%^&*()_+~`/*-]{8,20}$/,
        message: "\u5BC6\u7801\u81F3\u5C11\u5305\u542B\u516B\u4E2A\u5B57\u7B26\uFF0C\u81F3\u591A\u4E8C\u5341\u4E2A\u5B57\u7B26\uFF0C\u5305\u62EC\u81F3\u5C11\u4E00\u4E2A\u6570\u5B57\uFF0C\u5E76\u4E14\u540C\u65F6\u5305\u542B\u5927\u5C0F\u5199\u5B57\u6BCD\u548C\u7279\u6B8A\u5B57\u7B26"
      }],
      newPwd2: [{
        required: !0,
        trigger: "blur",
        validator(i, p, f) {
          p !== r.value.newPwd ? f(new Error("\u4E24\u6B21\u8F93\u5165\u5BC6\u7801\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u68C0\u67E5")) : f();
        }
      }]
    }, y = () => {
      e.value.validate(async (i) => {
        var p, f, g;
        if (i)
          try {
            o.value = !0;
            const d = await ibiz.net.post("/v7/changepwd ", {
              oldPwd: r.value.oldPwd,
              newPwd: r.value.newPwd
            });
            if (d.ok) {
              ibiz.notification.success({
                title: "\u4FEE\u6539\u5BC6\u7801\u6210\u529F\uFF01"
              }), o.value = !1, n("change-success");
              return;
            }
            ibiz.notification.error({
              title: ((p = d.data) == null ? void 0 : p.message) || "\u4FEE\u6539\u5BC6\u7801\u5931\u8D25\uFF01"
            }), o.value = !1;
          } catch (d) {
            ibiz.notification.error({
              title: ((g = (f = d.response) == null ? void 0 : f.data) == null ? void 0 : g.message) || "\u4FEE\u6539\u5BC6\u7801\u5931\u8D25\uFF01"
            }), o.value = !1;
          }
      });
    };
    return _(() => t.isShowModal, (i) => {
      i === !0 && e.value && e.value.resetFields();
    }), {
      ns: s,
      formData: r,
      rules: u,
      loading: o,
      formRef: e,
      handleSubmit: y
    };
  },
  render(t) {
    return t("i-form", {
      class: this.ns.b(),
      ref: "formRef",
      attrs: {
        model: this.formData,
        rules: this.rules
      }
    }, [t("i-form-item", {
      attrs: {
        prop: "oldPwd",
        "label-position": "top",
        label: "\u539F\u5BC6\u7801"
      }
    }, [t("i-input", {
      attrs: {
        type: "password",
        password: !0,
        placeholder: "\u8BF7\u8F93\u5165\u539F\u5BC6\u7801",
        size: "large"
      },
      model: {
        value: this.formData.oldPwd,
        callback: (n) => {
          this.$set(this.formData, "oldPwd", n);
        }
      }
    })]), t("i-form-item", {
      attrs: {
        prop: "newPwd",
        "label-position": "top",
        label: "\u65B0\u5BC6\u7801"
      }
    }, [t("i-input", {
      attrs: {
        type: "password",
        password: !0,
        placeholder: "\u8BF7\u8F93\u5165\u65B0\u5BC6\u7801",
        size: "large"
      },
      model: {
        value: this.formData.newPwd,
        callback: (n) => {
          this.$set(this.formData, "newPwd", n);
        }
      }
    })]), t("i-form-item", {
      attrs: {
        prop: "newPwd2",
        "label-position": "top",
        label: "\u786E\u8BA4\u5BC6\u7801"
      }
    }, [t("i-input", {
      attrs: {
        type: "password",
        password: !0,
        placeholder: "\u8BF7\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801",
        size: "large"
      },
      model: {
        value: this.formData.newPwd2,
        callback: (n) => {
          this.$set(this.formData, "newPwd2", n);
        }
      }
    })]), t("i-form-item", [t("i-button", {
      class: this.ns.b("submit"),
      on: {
        click: this.handleSubmit
      },
      attrs: {
        loading: this.loading,
        size: "large"
      }
    }, ["\u786E\u8BA4\u4FEE\u6539"])])]);
  }
});
function je(t, n) {
  return a("div", {
    class: t.e("logo")
  }, [a("img", {
    class: t.e("logo-img"),
    attrs: {
      src: E.dir("/assets/img/jh-800.png")
    }
  }), a("div", {
    class: t.e("logo-caption")
  }, [n.caption])]);
}
const Ne = S({
  name: "UserAppLayout",
  props: {
    model: {
      type: fe,
      required: !0
    },
    isComplete: {
      type: Boolean,
      default: !1
    },
    isShowTabPageExp: {
      type: Boolean,
      default: !1
    }
  },
  setup(t, {
    emit: n,
    slots: s
  }) {
    var v;
    const e = q("layout"), r = C(!1), o = () => {
      r.value = !r.value, n("onCollapseChange", r.value);
    }, u = N(() => t.model.source.blankMode === !0), y = async () => {
      var D;
      const P = (D = s.menu) == null ? void 0 : D.call(s)[0].componentInstance;
      P && P.c && await P.c.onClickMenuItem("menuitem46");
    }, {
      srfusername: i = "\u6E38\u5BA2",
      srforgsectorname: p,
      srffirstlogin: f
    } = ((v = ibiz.appData) == null ? void 0 : v.context) || {}, {
      proxy: g
    } = z(), d = B(g), c = async () => {
      (await ibiz.auth.v7logout()).ok ? (ibiz.message.success("\u767B\u51FA\u6210\u529F"), d.push(`/login?ru=${encodeURIComponent(window.location.hash.replace("#/", "/"))}`)) : ibiz.message.error("\u767B\u51FA\u5931\u8D25");
    }, m = C(!0), x = () => {
      m.value = !m.value;
    }, l = C(!1), h = C(!0);
    return f === 1 && (l.value = !0, h.value = !1), {
      ns: e,
      collapseChange: r,
      isBlank: u,
      collapseMenus: o,
      openView: y,
      srfusername: i,
      srforgsectorname: p,
      clickOut: c,
      isShowOpt: m,
      isShowModal: l,
      isModalClosable: h,
      changeShowOpt: x,
      showChangePassword: () => {
        l.value = !0;
      },
      hideChangePassword: () => {
        l.value = !1, h.value = !0;
      }
    };
  },
  render() {
    return this.isComplete ? a("i-layout", {
      class: [this.ns.b(), this.isBlank ? this.ns.m("blank") : "", this.ns.is("collapse", this.collapseChange), this.ns.is("tab", this.isShowTabPageExp)]
    }, [a("i-sider", {
      attrs: {
        "hide-trigger": !0,
        value: this.collapseChange
      },
      class: [this.ns.b("nav"), this.ns.is("collapse", this.collapseChange)]
    }, [je(this.ns, this.model), a("div", {
      class: this.ns.b("option")
    }, [a("i-poptip", {
      attrs: {
        trigger: "click",
        transfer: !0,
        "popper-class": "opt-box",
        placement: "bottom-end"
      },
      scopedSlots: {
        default: () => a("div", {
          class: this.ns.be("option", "top")
        }, [a("img", {
          class: "head",
          attrs: {
            src: E.dir("/assets/img/head.svg")
          }
        }), a("div", {
          class: "user"
        }, [a("div", {
          class: "username"
        }, [this.srfusername]), a("div", {
          class: "orgname"
        }, [this.srforgsectorname])]), a("img", {
          class: "down",
          attrs: {
            src: E.dir("/assets/img/down.svg")
          }
        })]),
        content: () => a("div", {
          class: "opts"
        }, [a("div", {
          on: {
            click: this.showChangePassword
          }
        }, [a("img", {
          class: "lr",
          attrs: {
            src: E.dir("/assets/img/lr.svg")
          }
        }), "\u4FEE\u6539\u5BC6\u7801"]), a("div", {
          class: "logout",
          on: {
            click: this.clickOut
          }
        }, [a("i", {
          class: "ivu-icon ivu-icon-ios-log-out"
        }), "\u9000\u51FA\u767B\u5F55"])])
      }
    }), a("div", {
      class: [this.ns.be("option", "bottom")]
    }, [a("i-tooltip", {
      attrs: {
        content: "\u8BBE\u5907\u79BB\u7EBF\u544A\u8B66",
        placement: "right",
        theme: "light"
      }
    }, [a("img", {
      class: "gj",
      attrs: {
        src: E.dir("/assets/img/gj.svg")
      },
      on: {
        click: () => this.openView()
      }
    })])])]), this.$slots.menu, a("div", {
      class: this.ns.be("slider", "collapse-icon")
    }, [this.collapseChange ? a("ion-icon", {
      attrs: {
        src: "./assets/img/menu-unfold.svg"
      },
      on: {
        click: () => this.collapseMenus()
      }
    }) : a("ion-icon", {
      attrs: {
        src: "./assets/img/menu-fold.svg"
      },
      on: {
        click: () => this.collapseMenus()
      }
    })])]), a("i-layout", {
      class: [this.ns.b("content")]
    }, [a("i-content", {
      class: this.ns.be("content", "main")
    }, [this.$slots.tabPageExp, this.$slots.default]), a("i-modal", {
      attrs: {
        title: "\u4FEE\u6539\u5BC6\u7801",
        "class-name": "change-password-modal",
        "mask-closable": this.isModalClosable,
        closable: this.isModalClosable,
        "footer-hide": !0
      },
      model: {
        value: this.isShowModal,
        callback: (t) => {
          this.isShowModal = t;
        }
      }
    }, [a(H, {
      attrs: {
        isShowModal: this.isShowModal
      },
      on: {
        "change-success": this.hideChangePassword
      }
    })])])]) : null;
  }
});
class Y extends we {
  constructor() {
    super(...arguments);
    b(this, "options", []);
    b(this, "kqrq", "");
    b(this, "rylx", "");
  }
  async onInit() {
    await super.onInit(), this.options = await ibiz.codeListService.get(
      "UsrCodeList0402031972",
      this.context,
      this.params
    ), this.context.srforgcode && (this.params.orgcode = this.context.srforgcode), this.kqrq = O().subtract(1, "day").startOf("day").format("YYYY-MM-DD"), this.rylx = this.options.map((s) => s.value).join(","), this.changeViewParams();
  }
  changeViewParams() {
    this.dashboard.setContextOrParams(
      void 0,
      {
        ...this.params,
        kqrq: this.kqrq || null,
        rylx: this.rylx || null
      },
      !0
    );
  }
}
const $e = S({
  name: "PortletSearchHeader",
  props: {
    modelData: {
      type: ge,
      required: !0
    },
    controller: {
      type: Y,
      required: !0
    }
  },
  setup(t) {
    const n = q("portal-search-header"), s = C([]), e = C(new Date()), r = (i) => {
      s.value = i, t.controller.rylx = i.join(","), t.controller.changeViewParams();
    }, o = (i) => {
      e.value = i, t.controller.kqrq = i ? O(i).format("YYYY-MM-DD") : "", t.controller.changeViewParams();
    };
    e.value = new Date(t.controller.kqrq), s.value = t.controller.rylx.split(",");
    const u = O();
    return {
      ns: n,
      selectArray: s,
      selectDate: e,
      options: {
        disabledDate: (i) => {
          const p = O(i);
          return u.isSame(p, "day") || u.isBefore(p, "day");
        }
      },
      onSelectArrayChange: r,
      onDateChange: o
    };
  },
  render() {
    const t = [this.ns.b(), this.ns.m(this.modelData.modelClass)];
    return a("portlet-layout", {
      attrs: {
        controller: this.controller
      },
      class: t
    }, [a("i-checkbox-group", {
      class: this.ns.e("rylx-checkbox"),
      attrs: {
        value: this.selectArray
      },
      on: {
        "on-change": this.onSelectArrayChange
      }
    }, [this.controller.options.map((n) => a("i-checkbox", {
      attrs: {
        label: n.value
      }
    }, [n.text]))]), a("i-CalendarPicker", {
      class: this.ns.e("date-picker"),
      attrs: {
        type: "date",
        value: this.selectDate,
        clearable: !1,
        placement: "bottom-end",
        options: this.options
      },
      on: {
        "on-change": this.onDateChange
      }
    })]);
  }
});
class Fe {
  constructor() {
    b(this, "component", $e);
  }
  async createController(n, s, e) {
    const r = new Y(
      n,
      s,
      e
    );
    return await r.init(), r;
  }
}
class W extends Ce {
  constructor() {
    super(...arguments);
    b(this, "data", {});
    b(this, "mapData", []);
    b(this, "pointData", []);
    b(this, "form");
    b(this, "hasLoad", !1);
    b(this, "isloading", !1);
    b(this, "entityService");
    b(this, "pointClicked", !1);
  }
  async onInit() {
    await super.onInit(), await this.model.embedView.init();
    const s = this.model.embedView.form;
    this.entityService = await ibiz.entityService.getService(
      s.appEntity.codeName,
      this.context
    ), this.form = new be(s, this.context, {
      ...this.params
    }), await this.form.init(), this.dashboard.nerve.self.evt.on("mounted", () => {
      this.load();
    });
  }
  calcPercent(s, e, r = 1) {
    return s ? parseFloat((s * 100 / e).toFixed(r)) : 0;
  }
  calcViewParams() {
    super.calcViewParams(), this.dashboard.complete && (this.form.setContextOrParams(void 0, this.params, !0), this.load());
  }
  async load() {
    this.isloading = !0, this.data = await this.form.load(), this.data.zcrs = this.data.zcrs || 0, this.data.ycrs = this.data.ycrs || 0, this.data.qjrs = this.data.qjrs || 0, this.data.xjrs = this.data.xjrs || 0, this.data.zcl = this.calcPercent(this.data.zcrs, this.data.yzrs), this.data.ycl = this.calcPercent(this.data.ycrs, this.data.yzrs), this.data.qjl = this.calcPercent(this.data.qjrs, this.data.yzrs), this.data.xjl = this.calcPercent(this.data.xjrs, this.data.yzrs), await this.loadMapData(), this.hasLoad = !0, this.isloading = !1;
  }
  async loadMapData() {
    const e = (await this.entityService.exec(
      "FetchMapData",
      this.context,
      this.params
    )).data.map((o) => ({
      name: o.orgcode,
      value: this.calcPercent(Number(o.zcl), 1, 2),
      title: o.orgname,
      zcl: `${this.calcPercent(Number(o.zcl), 1, 2)}%`,
      zcrs: o.zcrs,
      yzrs: o.yzrs != null ? o.yzrs : "",
      zgrs: o.zgrs != null ? o.zgrs : "",
      jd: o.jd,
      wd: o.wd
    })), r = e.findIndex(
      (o) => o.name === this.params.orgcode
    );
    r !== -1 && (this.pointData = e.splice(r, 1)), this.mapData = e.length === 0 ? this.pointData : e;
  }
  onMapChange(s) {
    const e = `${s}`;
    this.mapData = [], this.pointData = [], this.dashboard.setContextOrParams(
      void 0,
      {
        ...this.params,
        orgcode: e,
        tjfw: void 0
      },
      !0
    );
  }
  onPointClick(s) {
    console.log("pointClick"), this.pointClicked = !0, this.dashboard.setContextOrParams(
      void 0,
      {
        ...this.params,
        tjfw: "20"
      },
      !0
    );
  }
  goBackFrominstitution() {
    this.pointClicked = !1, this.dashboard.setContextOrParams(
      void 0,
      {
        ...this.params,
        tjfw: void 0
      },
      !0
    );
  }
}
const Re = ["#FF0700", "#FFF400", "#73A0FA"], Be = {
  strMapCode: !0,
  visualMap: {
    text: ["\u9AD8", "\u4F4E"],
    min: 0,
    max: 100,
    rangeColor: Re
  },
  pointSymbol: "pin"
}, Ue = "/assets/json/map/jiangsu/{id}.json";
async function He(t) {
  return (await ibiz.net.axios({
    url: E.dir(Ue.replace("{id}", t))
  })).data;
}
function Ye(t, n) {
  const s = /* @__PURE__ */ new Map(), e = C(""), r = C([]);
  let o;
  const u = C(), y = (c) => {
    const m = {
      cityNames: {},
      noChild: c.features.length === 1
    };
    return c.features.forEach((x) => {
      const { adcode: l, name: h } = x.properties;
      m.cityNames[l] = h;
    }), m;
  }, i = async (c) => {
    if (s.has(c))
      return;
    const m = await He(c);
    s.set(c, y(m)), qe(c, m);
  }, p = (c) => {
    const m = s.get(e.value);
    if (m)
      return m.cityNames[c];
  }, f = () => {
    const c = t(e.value);
    o.setOption(c), o.resize();
  }, g = async (c, m = !1) => {
    m || n("mapChange", { name: c }), s.has(c) || await i(c), e.value = c, r.value.push(c), f();
  }, d = () => {
    if (r.value.length > 1) {
      r.value.pop();
      const c = r.value.pop();
      g(c);
    }
  };
  return K(() => {
    o = Se(u.value), window.addEventListener("resize", () => {
      o == null || o.resize();
    }), o.on("click", (c) => {
      if (c.componentType === "series" && c.seriesType === "scatter") {
        n("pointClick", c.data);
        return;
      }
      c.name !== e.value && g(c.name);
    }), o.on("mouseover", function(c) {
      if (c.componentType === "series" && c.seriesType === "scatter") {
        const m = c.dataIndex, x = o.getOption(), l = x.series[c.seriesIndex].data, h = x.series[c.seriesIndex].symbolSize;
        l[m].symbolSize = h + 10, o.setOption(x);
      }
    }), o.on("mouseout", function(c) {
      if (c.componentType === "series" && c.seriesType === "scatter") {
        const m = c.dataIndex, x = o.getOption(), l = x.series[c.seriesIndex].data;
        delete l[m].symbolSize, o.setOption(x);
      }
    });
  }), {
    chartRef: u,
    historyNames: r,
    currenName: e,
    changeMap: g,
    getCityName: p,
    goBack: d,
    refresh: f
  };
}
const We = S({
  name: "MapChart",
  props: {
    mapData: {
      type: Array,
      required: !0
    },
    pointData: {
      type: Array
    },
    options: {
      type: Object,
      default: () => ({})
    },
    defaultMapName: {
      type: String,
      required: !0
    }
  },
  setup(t, {
    emit: n
  }) {
    const s = q("map-chart"), e = N(() => De(Be, t.options)), {
      chartRef: r,
      historyNames: o,
      changeMap: u,
      getCityName: y,
      goBack: i,
      refresh: p
    } = Ye((d) => {
      const {
        visualMap: c,
        pointSymbol: m
      } = e.value, x = {
        geo: {
          map: d
        },
        tooltip: {
          trigger: "item",
          textStyle: {
            color: "#fff",
            fontSize: 12
          },
          backgroundColor: "rgba(0, 0, 0, 0.47)",
          borderWidth: 0,
          extraCssText: "backdrop-filter: blur(3px);"
        },
        visualMap: {
          min: c.min,
          max: c.max,
          text: c.text,
          realtime: !1,
          hoverLink: !1,
          inRange: {
            color: c.rangeColor
          }
        },
        series: [
          {
            type: "map",
            map: d,
            nameProperty: e.value.strMapCode ? "adcodeStr" : "adcode",
            tooltip: {
              formatter: (l) => {
                const h = y(l.name), w = t.mapData.find((k) => k.name == l.name);
                if (!!w)
                  return `
                      <div style='display:flex;justify-content: center;'>
                        <span>${h}</span>
                      </div>
                      <div style='display:flex;justify-content: space-between;'>
                        <span style='margin-right: 16px;'>\u5728\u5C97\u4EBA\u6570/\u603B\u4EBA\u6570</span>
                        <span>${w.zgrs}/${w.yzrs}</span>
                      </div>
                    `;
              }
            },
            label: {
              show: !0,
              color: "#000000",
              fontSize: 11,
              formatter: (l) => y(l.name)
            },
            select: {
              disabled: !0
            },
            data: t.mapData.map((l) => ({
              name: l.name,
              value: l.value
            }))
          }
        ]
      };
      return t.pointData && x.series.push({
        type: "scatter",
        coordinateSystem: "geo",
        symbol: m,
        symbolSize: 20,
        visualMap: !1,
        itemStyle: {
          color: "#FF1D00"
        },
        label: {
          show: !0,
          color: "#000000",
          fontSize: 10,
          textShadowBlur: 0,
          formatter: (l) => l.data.title,
          position: "left",
          offset: [10, -15]
        },
        tooltip: {
          formatter: (l) => {
            const h = l.data;
            return `
                    <div style='display:flex;justify-content: center;'>
                      <span>${h.title}</span>
                    </div>
                    <div style='display:flex;justify-content: space-between;'>
                      <span style='margin-right: 16px;'>\u5728\u5C97\u4EBA\u6570/\u603B\u4EBA\u6570</span>
                      <span>${h.zgrs}/${h.yzrs}</span>
                    </div>
                  `;
          }
        },
        data: t.pointData.map((l) => ({
          ...l,
          value: [Number(l.jd), Number(l.wd)],
          visualMap: !1
        }))
      }), x;
    }, (d, c) => {
      d === "mapChange" ? n("mapChange", c.name) : n(d, c);
    });
    K(() => {
      u(t.defaultMapName, !0);
    });
    const {
      mapData: f,
      pointData: g
    } = te(t);
    return _([f, g], () => {
      p();
    }), {
      ns: s,
      chartRef: r,
      historyNames: o,
      goBack: i
    };
  },
  render() {
    return a("div", {
      class: this.ns.b()
    }, [a("div", {
      class: this.ns.e("chart"),
      ref: "chartRef"
    }), this.historyNames.length > 1 && a("div", {
      class: this.ns.e("goback"),
      on: {
        click: () => {
          this.goBack();
        }
      }
    }, ["\u8FD4\u56DE"])]);
  }
}), Je = `image://${E.dir("/assets/img/fiveStars.png")}`, Ge = S({
  name: "PortalMapArea",
  props: {
    modelData: {
      type: ve,
      required: !0
    },
    controller: {
      type: W,
      required: !0
    }
  },
  setup(t) {
    const n = se(t.controller), s = q("portal-map-area");
    return {
      c: n,
      ns: s
    };
  },
  render() {
    if (!this.c.hasLoad)
      return;
    const t = [this.ns.b(), this.ns.m(this.modelData.modelClass)];
    return a("portlet-layout", {
      attrs: {
        controller: this.controller
      },
      class: t
    }, [this.c.isloading ? a("i-spin", {
      attrs: {
        size: "large",
        fix: !0
      }
    }) : null, a("div", {
      class: this.ns.e("left")
    }), a("div", {
      class: this.ns.e("center")
    }, [a("div", {
      class: this.ns.e("title")
    }, [`${this.c.data.orgname} \u2014 ${this.c.data.yzrs}\u4EBA`]), a(We, {
      class: this.ns.e("map"),
      attrs: {
        mapData: this.c.mapData,
        pointData: this.c.pointData,
        defaultMapName: this.c.params.orgcode,
        options: {
          pointSymbol: Je
        }
      },
      on: {
        mapChange: (n) => {
          this.c.onMapChange(n);
        },
        pointClick: (n) => {
          this.c.onPointClick(n);
        }
      }
    }), this.c.pointClicked && a("div", {
      class: this.ns.e("goback"),
      on: {
        click: () => {
          this.c.goBackFrominstitution();
        }
      }
    }, ["\u8FD4\u56DE"])]), a("div", {
      class: this.ns.e("right")
    })]);
  }
});
class Qe {
  constructor() {
    b(this, "component", Ge);
  }
  async createController(n, s, e) {
    const r = new W(
      n,
      s,
      e
    );
    return await r.init(), r;
  }
}
class Xe extends xe {
  constructor() {
    super(...arguments);
    b(this, "unit", "");
    b(this, "isPercent", !1);
    b(this, "maxNum", 0);
  }
  async onInit() {
    var s;
    await super.onInit(), (s = this.model.source.getPSDEListDataItems()) == null || s.forEach((e) => {
      e.name === "unit" && (this.unit = e.format), e.name === "percent" && (this.isPercent = !0);
    });
  }
  async afterLoad(s) {
    return super.afterLoad(s), this.maxNum = 0, this.items.forEach((e) => {
      this.isPercent ? (e.num = (parseFloat(e.num) * 100).toFixed(2), e.num === "0.00" && (e.num = "0"), e.percent = Number(e.num)) : e.num > this.maxNum && (this.maxNum = e.num);
    }), this.isPercent || this.items.forEach((e) => {
      e.percent = this.maxNum ? e.num * 100 / this.maxNum : 0;
    }), s;
  }
}
function Ze(t, n, s, e = {}) {
  return oe(t, () => {
    const r = new Xe(n, s, e);
    return re(t, "mdCtrlActiveMode", r.setMdCtrlActiveMode.bind(r)), r;
  });
}
function et(t) {
  return { handleClick: (e) => {
    const r = t.selectedData.findIndex((o) => e.srfkey === o.srfkey);
    if (t.singleSelect)
      r === -1 ? t.onSelectionChange([e]) : t.onSelectionChange([]);
    else {
      const o = t.selectedData;
      r === -1 ? o.push(e) : o.splice(r, 1), t.onSelectionChange(o);
    }
    t.handleClick(e);
  }, handleDblClick: (e) => {
    t.handleDblClick(e);
  } };
}
const tt = S({
  name: "KqqkListControl",
  props: {
    modelData: {
      type: U,
      required: !0
    },
    context: {
      type: Object,
      required: !0
    },
    params: {
      type: Object,
      default: () => ({})
    },
    mdCtrlActiveMode: {
      type: Number,
      default: 2
    },
    isSelectFirstDefault: {
      type: Boolean,
      required: !1
    },
    defaultSelectKeys: {
      type: Array,
      required: !1
    }
  },
  setup(t) {
    const {
      proxy: n
    } = z(), s = q("kqqk-list"), e = Ze(n, t.modelData, t.context, t.params), {
      handleClick: r,
      handleDblClick: o
    } = et(e), u = (i, p) => {
      const f = e.selectedData.findIndex((d) => d.srfkey === i.srfkey), g = [s.b("item"), s.is("active", f !== -1)];
      return a("div", {
        class: g,
        key: i.srfkey + p,
        on: {
          click: () => r(i),
          dblclick: () => o(i)
        }
      }, [a("span", {
        class: s.be("item", "title")
      }, [i.title]), a("div", {
        class: s.be("item", "progress")
      }, [a("span", {
        style: `width:${i.percent}%;`,
        class: s.be("item", "progress-bar")
      }), a("span", {
        class: s.be("item", "progress-text")
      }, [i.num, e.unit])])]);
    };
    return {
      c: e,
      ns: s,
      renderListContent: () => e.items.map((i, p) => u(i, p))
    };
  },
  render() {
    return a("control-layout", {
      class: this.ns.b(),
      attrs: {
        modelData: this.c.model
      }
    }, [this.c.complete && [this.renderListContent()]]);
  }
});
class st {
  constructor() {
    b(this, "component", tt);
  }
}
function at(t) {
  return { handleClick: (e) => {
    const r = t.selectedData.findIndex((o) => e.srfkey === o.srfkey);
    if (t.singleSelect)
      r === -1 ? t.onSelectionChange([e]) : t.onSelectionChange([]);
    else {
      const o = t.selectedData;
      r === -1 ? o.push(e) : o.splice(r, 1), t.onSelectionChange(o);
    }
    t.handleClick(e);
  }, handleDblClick: (e) => {
    t.handleDblClick(e);
  } };
}
const j = S({
  name: "ListExpControl",
  props: {
    modelData: {
      type: U,
      required: !0
    },
    context: {
      type: Object,
      required: !0
    },
    params: {
      type: Object,
      default: () => ({})
    },
    mdCtrlActiveMode: {
      type: Number,
      default: 2
    },
    isSelectFirstDefault: {
      type: Boolean,
      required: !0
    },
    defaultSelectKeys: {
      type: Array,
      required: !1
    },
    isExpView: {
      type: Boolean,
      required: !1
    }
  },
  setup(t) {
    const {
      proxy: n
    } = z(), s = q("control-list"), e = ie(n, t.modelData, t.context, t.params), {
      handleClick: r,
      handleDblClick: o
    } = at(e);
    let u = !0;
    K(() => {
      _(() => e, (d, c) => {
        if (t.isExpView && d && d !== c) {
          let m = e.items[0];
          if (t.defaultSelectKeys && t.defaultSelectKeys.length > 0) {
            const x = e.items.find((l) => l.srfkey === t.defaultSelectKeys[0]);
            x && (m = x);
          }
          m && e.onSelectionChange([m]);
        }
      }, {
        immediate: !0
      }), _(() => e.items.length, (d) => {
        t.isExpView && d && e.onSelectionChange([e.items[0]]);
      }, {
        immediate: !0,
        deep: !0
      });
    });
    const y = (d) => {
      e.selectedData.length === 0 && (e.selectedData = [{
        srfkey: e.items[0].srfkey
      }]);
      const c = e.selectedData.findIndex((l) => l.srfkey === d.srfkey), m = () => {
        u = !1, delete e.context.n_orgid_eq, e.context.calendarcaption = d.deptname, r(d);
      }, x = [s.b("item"), s.is("active", c !== -1 && u === !1)];
      return a("div", {
        class: x,
        on: {
          click: () => m(),
          dblclick: () => o(d)
        }
      }, [e.layoutPanelProvider ? a(e.layoutPanelProvider.component, {
        props: {
          modelData: e.model,
          context: e.context,
          params: e.params,
          inputData: d
        }
      }) : `${d.deptname}`]);
    }, i = () => e.model.source.enableGroup ? a("el-collapse") : e.items.map((d) => y(d)), p = () => Object.is(e.total, e.items.length) ? null : a("div", {
      class: s.e("no-data")
    }, [a("div", ["\u6682\u65E0\u6570\u636E"])]), f = (d) => {
      u = !0, Object.assign(e.context, {
        n_orgid_eq: e.params.n_orgid_eq
      }), e.context.calendarcaption = d.deptname, r(d);
    }, g = () => {
      const d = [s.b("item"), s.is("active", u === !0)];
      return e.items.length > 0 ? a("div", {
        class: d,
        on: {
          click: () => f({
            deptid: e.params.n_orgid_eq,
            orgid: e.params.n_orgid_eq,
            srfkey: e.params.n_orgid_eq,
            deptname: e.context.selectedDeptName,
            sysdepartment: void 0
          })
        }
      }, ["\u5168\u90E8"]) : null;
    };
    return F(() => {
      u && (f({
        deptid: e.params.n_orgid_eq,
        orgid: e.params.n_orgid_eq,
        srfkey: e.params.n_orgid_eq,
        deptname: e.context.selectedDeptName,
        sysdepartment: void 0
      }), e.selectedData.length = 0);
    }), _(() => e.items, () => {
      F(() => {
        u = !0, Object.assign(e.context, {
          n_orgid_eq: e.params.n_orgid_eq
        }), f({
          deptid: e.params.n_orgid_eq,
          orgid: e.params.n_orgid_eq,
          srfkey: e.params.n_orgid_eq,
          deptname: e.context.selectedDeptName,
          sysdepartment: void 0
        }), e.selectedData.length = 0;
      });
    }, {
      immediate: !0,
      deep: !0
    }), {
      c: e,
      ns: s,
      renderListContent: i,
      renderLoadMore: p,
      renderAll: g,
      renderAllClick: f,
      isSelectAll: u
    };
  },
  render() {
    return a("control-layout", {
      class: [this.ns.b()],
      attrs: {
        modelData: this.c.model
      }
    }, [this.c.complete && [this.renderAll(), this.renderListContent(), this.renderLoadMore()]]);
  }
});
const nt = S({
  name: "ListExpSelectTreeView",
  components: {
    Treeselect: _e,
    ListExpControl: j
  },
  props: {
    context: Object,
    params: {
      type: Object
    },
    srfnav: String,
    modelPath: {
      type: String,
      required: !0
    },
    modal: {
      type: Object
    }
  },
  setup(t) {
    const {
      proxy: n
    } = z(), s = le(n, t.modelPath), e = C(""), r = C([]), o = q("list-exp-select-tree");
    s.context.isRouter === !0 && s.nerve.self.evt.on("created", () => {
      t.srfnav && (s.navItem.key = t.srfnav, r.value = [t.srfnav]), ce(ae(s.navItem, "key"), n, e);
    });
    const u = [`${s.context.srforgid}`];
    s.context.srforgid && (s.context.selectedDeptName = s.context.srforgname, Object.assign(s.params, {
      n_orgid_eq: s.context.srforgid
    }));
    const y = (g) => ({
      id: g.id,
      label: g.text,
      children: g.children
    }), i = (g) => {
      s.context.selectedDeptName = g.text, Object.assign(s.params, {
        n_orgid_eq: g.value
      }), s.nerve.list.call.load();
    }, p = C(!1);
    return {
      c: s,
      defaultSelectKeys: r,
      routeViewKey: e,
      normalizer: y,
      select: i,
      dataItems: [],
      isLoadCodeList: p,
      value: u,
      ns: o
    };
  },
  render() {
    if (this.c.complete) {
      const t = this.c.context.isRouter === !0, {
        listExpBar: n
      } = this.c.model, {
        list: s
      } = n, e = this.c.model.codeName;
      if (this.dataItems.length === 0 && e === "SysDepartmentKqAYTJListExp1View") {
        const {
          codeName: r
        } = this.c.model.source.getQuickGroupPSCodeList();
        (async (u) => {
          this.dataItems = await ibiz.codeListService.get(u, this.c.context, {
            size: 1e3
          }), this.isLoadCodeList = !0;
        })(r);
      }
      return a("exp-view-base", {
        class: [this.ns.b()],
        attrs: {
          controller: this.c,
          expBarModel: this.c.model.listExpBar
        },
        scopedSlots: {
          default: () => a(j, {
            attrs: {
              modelData: s,
              context: this.c.context,
              params: this.c.params,
              isExpView: !0,
              isSelectFirstDefault: !1,
              mdCtrlActiveMode: 1,
              defaultSelectKeys: this.defaultSelectKeys
            },
            on: {
              neuronInit: this.c.nerve.onNeuronInit(s.name)
            }
          }),
          searchForm: () => this.isLoadCodeList && e === "SysDepartmentKqAYTJListExp1View" ? a("div", {
            class: "ibiz-selectTree"
          }, [a("treeselect", {
            attrs: {
              value: this.value,
              options: this.dataItems,
              normalizer: this.normalizer,
              clearable: !1,
              "default-expand-level": 1
            },
            on: {
              select: this.select
            }
          })]) : e === "SysDepartmentkqBmtjListExpView" ? a("div", {
            class: "ibiz-bmtj"
          }, [a("div", {
            class: "ibiz-bmyj-content"
          }, [this.c.context.srforgname])]) : null,
          expView: () => s.navView ? t ? this.routeViewKey ? a("router-view", {
            key: this.routeViewKey
          }) : null : a("ViewShell", {
            attrs: {
              context: this.c.navItem.context,
              params: this.c.navItem.params,
              modal: {
                mode: ee.EMBED
              },
              modelPath: s.navView.source.modelPath
            },
            key: this.c.navItem.key
          }) : null
        }
      });
    }
    return null;
  }
});
class ot {
  constructor() {
    b(this, "component", "ListExpSelectTreeView");
  }
}
class rt {
  constructor() {
    b(this, "component", "BYQKEditView");
  }
}
class it {
  constructor() {
    b(this, "formEditor", "KqBase64ImageUpload");
    b(this, "gridEditor", "IBizGridFileUpload");
  }
  async createController(n, s) {
    const e = new ke(n, s);
    return await e.init(), e;
  }
}
const lt = S({
  name: "KqBase64ImageUpload",
  props: de(),
  emits: ue(),
  setup(t) {
    var o, u, y;
    const n = q("kq-base64-image-upload"), s = ((o = t.controller.model) == null ? void 0 : o.width) || "auto", e = ((u = t.controller.model) == null ? void 0 : u.height) || "150px", r = ((y = t.controller.editorParams) == null ? void 0 : y["justify-content"]) || "center";
    return () => a("div", {
      class: n.b(),
      style: {
        width: s,
        height: e,
        justifyContent: r
      }
    }, [a("img", {
      attrs: {
        src: t.value
      },
      class: n.e("image")
    })]);
  }
});
class ct {
  constructor() {
    b(this, "component", "KqdwCustomPickupTreeView");
  }
}
const dt = S({
  name: "KqdwCustomPickupTreeView",
  props: {
    context: {
      type: Object,
      required: !0
    },
    params: {
      type: Object
    },
    srfnav: String,
    modelPath: {
      type: String,
      required: !0
    },
    modal: {
      type: Object
    }
  },
  setup(t) {
    const n = q("kqdw-custom-pickup-tree-view"), {
      proxy: s
    } = z(), e = he(s, t.modelPath), r = C(null);
    let o = null;
    const u = C([]), y = C({}), i = C([]), p = C([]), f = C(""), g = C([]), d = async (v) => {
      await o.loadNodes(v), y.value = v, i.value.push(v);
    };
    return _(() => e.complete, async (v, P) => {
      var D;
      if (v !== P && v) {
        await e.model.pickupViewPanel.embedView.init();
        const A = (D = e.model.pickupViewPanel.embedView.source.getPSControls()) == null ? void 0 : D.find((V) => V.controlType === "TREEVIEW");
        A || console.warn("\u672A\u627E\u5230[\u6811(tree)]\u90E8\u4EF6"), r.value = new ye(A), await r.value.init(), o = pe(s, r.value, t.context, t.params), await o.init();
        const I = await o.load();
        if (I.length > 0 && (u.value = I, y.value.children = I, i.value.push({
          text: "\u5F53\u524D\u9662",
          children: I
        })), e.params.selectedData) {
          const V = JSON.parse(e.params.selectedData);
          V.length > 0 && (p.value = V.map((T) => ({
            srfkey: T.srfkey,
            srfmajortext: T.srfmajortext,
            value: T.srfkey,
            text: T.srfmajortext,
            dxlx: T.dxlx
          })));
        }
      }
    }), {
      ns: n,
      c: e,
      treeDatas: u,
      currentTreeNode: y,
      clickTreeNode: d,
      treeHistory: i,
      isChecked: (v) => p.value.findIndex((D) => D.value === v.value) !== -1,
      selectTreeNodes: p,
      handleSelect: (v) => {
        const P = p.value.findIndex((D) => D.value === v.value);
        P === -1 ? p.value.push(v) : p.value.splice(P, 1);
      },
      clickHistory: (v) => {
        const P = i.value.findIndex((D) => D.value === v.value);
        i.value = i.value.slice(0, P + 1), y.value = v;
      },
      clearAll: () => {
        p.value = [];
      },
      onOkButtonClick: () => {
        const v = p.value.map((P) => {
          var D;
          return {
            srfkey: P.value,
            srfmajortext: P.text,
            dxlx: (D = P.deData) == null ? void 0 : D.dxlx
          };
        });
        e.closeView({
          ok: !0,
          data: v
        });
      },
      query: f,
      queryChange: (v) => {
        v.target && (f.value = v.target.value, Object.assign(e.params, {
          query: f.value
        }));
      },
      search: async () => {
        const v = await (o == null ? void 0 : o.load());
        v && (g.value = v);
      },
      queryTreeNodeList: g
    };
  },
  render() {
    return a("div", {
      class: this.ns.b()
    }, [a("div", {
      class: "top"
    }, [a("div", {
      class: "left"
    }, [a("div", {
      class: "title"
    }, ["\u672A\u9009\u62E9\u7528\u6237"]), a("div", {
      class: "search"
    }, [a("i-input", {
      attrs: {
        value: this.query,
        search: !0,
        placeholder: "\u8BF7\u8F93\u5165"
      },
      on: {
        "on-change": this.queryChange,
        "on-enter": this.search,
        "on-search": this.search
      }
    })]), a("div", {
      class: "cascader"
    }, [a("div", {
      class: "history"
    }, [!this.query && this.treeHistory.length > 0 && this.treeHistory.map((t, n) => a("span", {
      class: "content"
    }, [a("span", {
      on: {
        click: () => this.clickHistory(t)
      }
    }, [t.text]), n < this.treeHistory.length - 1 && a("span", {
      class: "icon"
    }, [">"])]))]), a("div", {
      class: "children"
    }, [this.query ? this.queryTreeNodeList.map((t) => a("div", {
      class: "child",
      key: t.id
    }, [this.isChecked(t) ? a("span", {
      class: "checked",
      on: {
        click: () => {
          this.handleSelect(t);
        }
      }
    }, ["\u221A"]) : a("span", {
      class: "no-checked",
      on: {
        click: () => {
          this.handleSelect(t);
        }
      }
    }), a("span", {
      class: "text"
    }, [t.text])])) : this.currentTreeNode && this.currentTreeNode.children && this.currentTreeNode.children.map((t) => a("div", {
      class: "child",
      key: t.id
    }, [this.isChecked(t) ? a("span", {
      class: "checked",
      on: {
        click: () => {
          this.handleSelect(t);
        }
      }
    }, ["\u221A"]) : a("span", {
      class: "no-checked",
      on: {
        click: () => {
          this.handleSelect(t);
        }
      }
    }), a("span", {
      class: "text",
      on: {
        click: () => this.clickTreeNode(t)
      }
    }, [t.text])]))])])]), a("div", {
      class: "right"
    }, [a("div", {
      class: "title"
    }, [a("span", [" \u5DF2\u9009\u62E9\u7528\u6237"]), " ", a("span", {
      class: "clear",
      on: {
        click: () => this.clearAll()
      }
    }, ["\u5168\u90E8\u6E05\u9664"])]), a("div", {
      class: "list"
    }, [this.selectTreeNodes.map((t) => a("div", {
      class: "node"
    }, [a("span", [t.text]), " ", a("span", {
      class: "remove",
      on: {
        click: () => {
          this.handleSelect(t);
        }
      }
    }, ["x"])]))])])]), a("div", {
      class: "bottom"
    }, [a("i-button", {
      on: {
        click: () => {
          this.onOkButtonClick();
        }
      }
    }, ["\u786E\u5B9A"]), a("i-button", {
      on: {
        click: () => {
          this.c.onCancelButtonClick();
        }
      }
    }, ["\u53D6\u6D88"])])]);
  }
});
class ut {
  constructor() {
    b(this, "component", "KqbcFormMDCtrl");
  }
  async createController(n, s, e) {
    const r = new Pe(n, s, e);
    return await r.init(), r;
  }
}
const ht = S({
  name: "UserTabPageExp",
  props: {
    routeMsgs: {
      type: Array,
      required: !0
    },
    currentKey: {
      type: String,
      required: !0
    }
  },
  emits: ["tab-delete", "tab-click", "close-all", "close-other"],
  setup(t, {
    emit: n
  }) {
    const s = q("user-tab-page-exp"), e = C("0"), r = [{
      text: "\u5173\u95ED\u6240\u6709",
      value: "closeAll"
    }, {
      text: "\u5173\u95ED\u5176\u4ED6",
      value: "closeOther"
    }];
    return _(() => t.currentKey, (i, p) => {
      const f = t.routeMsgs.findIndex((g) => g.key === i);
      f !== -1 && (e.value = `${f}`);
    }), {
      ns: s,
      tabsValue: e,
      actions: r,
      changePage: (i) => {
        e.value = i, n("tab-click", +i);
      },
      onClose: (i) => {
        n("tab-delete", +i);
      },
      handleCommand: (i) => {
        i === "closeAll" ? n("close-all") : i === "closeOther" && n("close-other");
      }
    };
  },
  render() {
    var t;
    return a("div", {
      class: this.ns.b()
    }, [a("div", {
      class: this.ns.e("left")
    }, [a("i-tabs", {
      attrs: {
        type: "card",
        closable: !0
      },
      on: {
        "on-click": this.changePage,
        "on-tab-remove": this.onClose
      },
      model: {
        value: this.tabsValue,
        callback: (n) => {
          this.tabsValue = n;
        }
      }
    }, [(t = this.routeMsgs) == null ? void 0 : t.map((n, s) => a("i-tab-pane", {
      key: n.key,
      attrs: {
        name: `${s}`,
        label: n.caption
      }
    }))])])]);
  }
}), Pt = {
  mateUrl: import.meta.url,
  install(t) {
    t.component("UserTabPageExp", ht), t.component("UserIndexView", Ke), t.component("UserAppLayout", Ne), t.component("ListExpSelectTreeView", nt), t.component("ListExpControl", j), t.component("ChangePassword", H), t.component(
      "BYQKEditView",
      () => import("./byqk-edit-view.fea98c06.js")
    ), t.component(
      "KqbcFormMDCtrl",
      () => import("./kqbc-form-mdctrl.b92c2279.js")
    ), ibiz.register.view.register(
      "VIEW_CUSTOM_JskqIndexView",
      new Me()
    ), ibiz.register.view.register(
      "VIEW_CUSTOM_ListExpSelectTreeView",
      new ot()
    ), E.loadStyle(["/style.css"]), ibiz.register.portletPart.register(
      "PORTLET_CUSTOM_JskqWebPortalSearchHeader",
      new Fe()
    ), ibiz.register.portletPart.register(
      "PORTLET_CUSTOM_jskqWebPortalMapArea",
      new Qe()
    ), ibiz.register.control.register(
      "LIST_RENDER_JskqWebKqqkList",
      new st()
    ), ibiz.register.view.register(
      "VIEW_CUSTOM_ByqkCustomEditView",
      new rt()
    ), t.component("KqBase64ImageUpload", lt), ibiz.register.editor.register(
      "PICTURE_ONE_Base64ImageUpload",
      new it()
    ), t.component("KqdwCustomPickupTreeView", dt), ibiz.register.view.register(
      "VIEW_CUSTOM_KqdwCustomPickupTreeView",
      new ct()
    ), ibiz.register.formDetail.register("MDCTRL", new ut());
  }
};
export {
  Pt as default
};
