var Z = Object.defineProperty;
var ee = (t, a, s) => a in t ? Z(t, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[a] = s;
var w = (t, a, s) => (ee(t, typeof a != "symbol" ? a + "" : a, s), s);
import { PluginStaticResource as te, ViewMode as se } from "@ibiz-template/runtime";
import { ref as C, watch as _, defineComponent as D, getCurrentInstance as I, computed as L, onMounted as N, h as i, toRefs as ae, reactive as ie, nextTick as F, toRef as re, onActivated as ne } from "vue";
import { useRouter as G, useRoute as $, useIndexViewController as oe, useNamespace as S, useControlController as le, usePropsWatch as ce, useListController as de, useListExpViewController as ue, useRouteKey as he, getUploadProps as pe, getEditorEmits as me, useMPickupViewController as fe, useTreeController as ge, useViewController as ye } from "@ibiz-template/vue-util";
import { createUUID as ve } from "qx-util";
import { IndexViewModel as we, PortletPartModel as be, ViewPortletModel as Ce, ListModel as H, TreeModel as xe, getControl as B, GridModel as U } from "@ibiz-template/model";
import z from "dayjs";
import { CustomPortletController as ke, ViewPortletController as Pe, EditFormController as qe, ListController as De, UploadEditorController as Se, FormMDCtrlController as _e, GridViewNerve as Me, GridViewController as Ee } from "@ibiz-template/controller";
import { mergeDeepRight as Te } from "ramda";
import { init as Ie, registerMap as Ve } from "echarts";
import { Treeselect as je } from "@riophae/vue-treeselect";
const E = new te(import.meta.url);
class ze {
  constructor() {
    w(this, "component", "UserIndexView");
  }
}
const Ae = (t) => {
  const { view2: a, params2: s, params1: e } = t.params;
  if (!a)
    return "";
  let n = s.replace(
    new RegExp(";srfnav=[^;=]*$|(?<=;)srfnav=[^;=]*;|^srfnav=[^;=]*;|^srfnav=[^;=]*$", "g"),
    ""
  );
  return n = n || ibiz.env.routePlaceholder, `/${e}/${a}/${n}`;
}, Oe = (t) => {
  const { view1: a, appContext: s } = t.params;
  return `/${s}/${a}/${ibiz.env.routePlaceholder}`;
};
function Le(t, a) {
  const s = G(t), e = C(""), n = C(""), r = C([]), u = C([]), v = (l) => {
    l.forEach((h) => {
      const b = r.value.indexOf(h);
      b !== -1 && r.value.splice(b, 1);
      const k = u.value.findIndex((y) => y.key === h);
      k !== -1 && u.value.splice(k, 1);
    });
  };
  _(
    () => t.$route.path,
    (l, h) => {
      if (l !== h) {
        const b = $(t);
        e.value = Ae(b), n.value = Oe(b);
        const k = u.value.find(
          (y) => y.key === e.value
        );
        if (k)
          b.matched.length === 2 ? s.push(k.fullPath) : k.fullPath = b.fullPath;
        else {
          if (l === n.value)
            return;
          u.value.push({
            key: e.value,
            fullPath: b.fullPath,
            modelPath: "",
            caption: ""
          });
        }
      }
    },
    { deep: !0, immediate: !0 }
  ), _(
    e,
    (l, h) => {
      if (l !== h && l) {
        const b = r.value.indexOf(l);
        b === -1 || r.value.splice(b, 1), r.value.unshift(l);
      }
    },
    { immediate: !0 }
  );
  const o = async (l, h) => {
    const b = u.value.find((k) => k.key === e.value);
    b && (h.caption && (b.caption = h.caption), h.modelPath && (b.modelPath = h.modelPath));
  }, p = (l = e.value) => {
    v([l]);
    const h = r.value[0];
    if (!h)
      a.model.source.blankMode ? window.close() : (e.value = "", s.push(n.value));
    else {
      const b = u.value.find((k) => k.key === h);
      s.push(b.fullPath);
    }
  }, f = (l) => {
    const h = u.value[l];
    h && s.push(h.fullPath);
  }, g = () => {
    const h = $(t).fullPath;
    let b = h.indexOf("/");
    for (let y = 0; y < 2; y++)
      b = h.indexOf("/", b + 1);
    const k = `${h.substring(0, b)}/-`;
    s.push(k);
  }, d = () => {
    if (r.value.length > 0) {
      const l = u.value.find(
        (h) => h.key === r.value[0]
      );
      l && s.push(l.fullPath);
    } else
      g();
  };
  return {
    currentKey: e,
    keyHistory: r,
    routeMsgs: u,
    updateRouteMsg: o,
    closeView: p,
    deleteRouteCache: v,
    handleTabClick: f,
    handleTabDelete: (l) => {
      const h = u.value[l];
      h && (v([h.key]), d());
    },
    handleCloseAll: () => {
      if (u.value.length > 0) {
        const l = [];
        u.value.forEach((h) => {
          l.push(h.key);
        }), v(l), d();
      }
    },
    handleCloseOther: () => {
      if (u.value.length > 0) {
        const l = [];
        u.value.forEach((h) => {
          h.key !== e.value && l.push(h.key);
        }), v(l), d();
      }
    }
  };
}
const Ne = /* @__PURE__ */ D({
  __name: "index-view",
  props: {
    context: null,
    params: { default: () => ({}) },
    modelPath: null
  },
  setup(t) {
    const a = t, { proxy: s } = I(), e = oe(s, a.modelPath), n = !0;
    let r = null, u = null, v = () => {
    }, o = null, p = null, f = null, g = null, d = null, c, m, x, l;
    const h = C(ve());
    {
      const {
        currentKey: k,
        keyHistory: y,
        routeMsgs: P,
        updateRouteMsg: q,
        closeView: K,
        deleteRouteCache: A,
        handleTabClick: V,
        handleTabDelete: j,
        handleCloseAll: T,
        handleCloseOther: J
      } = Le(s, e);
      m = k, x = y, l = P, o = A, p = V, f = j, g = T, d = J, r = (M) => {
        const O = m.value;
        M.evt.on("closeView", () => {
          K(O);
        }), M.evt.on("setTitle", (X) => {
          q(O, { caption: X });
        });
      }, u = (M) => {
        q(m.value, M);
      }, window.onpopstate = () => {
        o([x.value[1]]);
      }, c = L(() => {
        const M = l.value.find(
          (O) => O.key === m.value
        );
        return (M == null ? void 0 : M.modelPath) || "";
      });
    }
    return N(() => {
      setTimeout(() => {
        const k = document.querySelector(".app-loading-x");
        k && (k.style.display = "none");
      }, 300);
    }), { __sfc: !0, props: a, proxy: s, c: e, isShowTabPageExp: n, onCreated: r, onViewFound: u, onMenuRouteChange: v, deleteRouteCache: o, handleTabClick: p, handleTabDelete: f, handleCloseAll: g, handleCloseOther: d, currentPath: c, currentKey: m, keyHistory: x, routeMsgs: l, appKeepAliveKey: h, collapseChange: (k) => {
      e.collapseChange = k;
    } };
  }
});
function Re(t, a, s, e, n, r, u, v) {
  var o = typeof t == "function" ? t.options : t;
  a && (o.render = a, o.staticRenderFns = s, o._compiled = !0), e && (o.functional = !0), r && (o._scopeId = "data-v-" + r);
  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__), n && n.call(this, d), d && d._registeredComponents && d._registeredComponents.add(u);
  }, o._ssrRegister = p) : n && (p = v ? function() {
    n.call(
      this,
      (o.functional ? this.parent : this).$root.$options.shadowRoot
    );
  } : n), p)
    if (o.functional) {
      o._injectStyles = p;
      var f = o.render;
      o.render = function(c, m) {
        return p.call(m), f(c, m);
      };
    } else {
      var g = o.beforeCreate;
      o.beforeCreate = g ? [].concat(g, p) : [p];
    }
  return {
    exports: t,
    options: o
  };
}
var Ke = function() {
  var a = this, s = a._self._c, e = a._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" }) : a._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" }) : a._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)] : a._e()], 2);
}, Fe = [], $e = /* @__PURE__ */ Re(
  Ne,
  Ke,
  Fe,
  !1,
  null,
  null,
  null,
  null
);
const Be = $e.exports;
const Y = D({
  name: "ChangePassword",
  props: {
    isShowModal: {
      type: Boolean,
      default: !1
    }
  },
  setup(t, {
    emit: a
  }) {
    const s = S("change-password"), e = C(null), n = C({
      oldPwd: "",
      newPwd: "",
      newPwd2: ""
    }), r = 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(o, p, f) {
          p !== n.value.newPwd ? f(new Error("\u4E24\u6B21\u8F93\u5165\u5BC6\u7801\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u68C0\u67E5")) : f();
        }
      }]
    }, v = () => {
      e.value.validate(async (o) => {
        var p, f, g;
        if (o)
          try {
            r.value = !0;
            const d = await ibiz.net.post("/v7/changepwd ", {
              oldPwd: n.value.oldPwd,
              newPwd: n.value.newPwd
            });
            if (d.ok) {
              ibiz.notification.success({
                title: "\u4FEE\u6539\u5BC6\u7801\u6210\u529F\uFF01"
              }), r.value = !1, a("change-success");
              return;
            }
            ibiz.notification.error({
              title: ((p = d.data) == null ? void 0 : p.message) || "\u4FEE\u6539\u5BC6\u7801\u5931\u8D25\uFF01"
            }), r.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"
            }), r.value = !1;
          }
      });
    };
    return _(() => t.isShowModal, (o) => {
      o === !0 && e.value && e.value.resetFields();
    }), {
      ns: s,
      formData: n,
      rules: u,
      loading: r,
      formRef: e,
      handleSubmit: v
    };
  },
  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: (a) => {
          this.$set(this.formData, "oldPwd", a);
        }
      }
    })]), 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: (a) => {
          this.$set(this.formData, "newPwd", a);
        }
      }
    })]), 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: (a) => {
          this.$set(this.formData, "newPwd2", a);
        }
      }
    })]), 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 Ue(t, a) {
  return i("div", {
    class: t.e("logo")
  }, [i("img", {
    class: t.e("logo-img"),
    attrs: {
      src: E.dir("/assets/img/jh-800.png")
    }
  }), i("div", {
    class: t.e("logo-caption")
  }, [a.caption])]);
}
const Ge = D({
  name: "UserAppLayout",
  props: {
    model: {
      type: we,
      required: !0
    },
    isComplete: {
      type: Boolean,
      default: !1
    },
    isShowTabPageExp: {
      type: Boolean,
      default: !1
    }
  },
  setup(t, {
    emit: a,
    slots: s
  }) {
    var y;
    const e = S("layout"), n = C(!1), r = () => {
      n.value = !n.value, a("onCollapseChange", n.value);
    }, u = L(() => t.model.source.blankMode === !0), v = async () => {
      var q;
      const P = (q = s.menu) == null ? void 0 : q.call(s)[0].componentInstance;
      P && P.c && await P.c.onClickMenuItem("menuitem46");
    }, {
      srfusername: o = "\u6E38\u5BA2",
      srforgsectorname: p,
      srffirstlogin: f
    } = ((y = ibiz.appData) == null ? void 0 : y.context) || {}, {
      proxy: g
    } = I(), d = G(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: n,
      isBlank: u,
      collapseMenus: r,
      openView: v,
      srfusername: o,
      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 ? i("i-layout", {
      class: [this.ns.b(), this.isBlank ? this.ns.m("blank") : "", this.ns.is("collapse", this.collapseChange), this.ns.is("tab", this.isShowTabPageExp)]
    }, [i("i-sider", {
      attrs: {
        "hide-trigger": !0,
        value: this.collapseChange
      },
      class: [this.ns.b("nav"), this.ns.is("collapse", this.collapseChange)]
    }, [Ue(this.ns, this.model), i("div", {
      class: this.ns.b("option")
    }, [i("i-poptip", {
      attrs: {
        trigger: "click",
        transfer: !0,
        "popper-class": "opt-box",
        placement: "bottom-end"
      },
      scopedSlots: {
        default: () => i("div", {
          class: this.ns.be("option", "top")
        }, [i("img", {
          class: "head",
          attrs: {
            src: E.dir("/assets/img/head.svg")
          }
        }), i("div", {
          class: "user"
        }, [i("div", {
          class: "username"
        }, [this.srfusername]), i("div", {
          class: "orgname"
        }, [this.srforgsectorname])]), i("img", {
          class: "down",
          attrs: {
            src: E.dir("/assets/img/down.svg")
          }
        })]),
        content: () => i("div", {
          class: "opts"
        }, [i("div", {
          on: {
            click: this.showChangePassword
          }
        }, [i("img", {
          class: "lr",
          attrs: {
            src: E.dir("/assets/img/lr.svg")
          }
        }), "\u4FEE\u6539\u5BC6\u7801"]), i("div", {
          class: "logout",
          on: {
            click: this.clickOut
          }
        }, [i("i", {
          class: "ivu-icon ivu-icon-ios-log-out"
        }), "\u9000\u51FA\u767B\u5F55"])])
      }
    }), i("div", {
      class: [this.ns.be("option", "bottom")]
    }, [i("i-tooltip", {
      attrs: {
        content: "\u8BBE\u5907\u79BB\u7EBF\u544A\u8B66",
        placement: "right",
        theme: "light"
      }
    }, [i("img", {
      class: "gj",
      attrs: {
        src: E.dir("/assets/img/gj.svg")
      },
      on: {
        click: () => this.openView()
      }
    })])])]), this.$slots.menu, i("div", {
      class: this.ns.be("slider", "collapse-icon")
    }, [this.collapseChange ? i("ion-icon", {
      attrs: {
        src: "./assets/img/menu-unfold.svg"
      },
      on: {
        click: () => this.collapseMenus()
      }
    }) : i("ion-icon", {
      attrs: {
        src: "./assets/img/menu-fold.svg"
      },
      on: {
        click: () => this.collapseMenus()
      }
    })])]), i("i-layout", {
      class: [this.ns.b("content")]
    }, [i("i-content", {
      class: this.ns.be("content", "main")
    }, [this.$slots.tabPageExp, this.$slots.default]), i("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;
        }
      }
    }, [i(Y, {
      attrs: {
        isShowModal: this.isShowModal
      },
      on: {
        "change-success": this.hideChangePassword
      }
    })])])]) : null;
  }
});
class Q extends ke {
  constructor() {
    super(...arguments);
    w(this, "options", []);
    w(this, "kqrq", "");
    w(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 = z().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 He = D({
  name: "PortletSearchHeader",
  props: {
    modelData: {
      type: be,
      required: !0
    },
    controller: {
      type: Q,
      required: !0
    }
  },
  setup(t) {
    const a = S("portal-search-header"), s = C([]), e = C(new Date()), n = (o) => {
      s.value = o, t.controller.rylx = o.join(","), t.controller.changeViewParams();
    }, r = (o) => {
      e.value = o, t.controller.kqrq = o ? z(o).format("YYYY-MM-DD") : "", t.controller.changeViewParams();
    };
    e.value = new Date(t.controller.kqrq), s.value = t.controller.rylx.split(",");
    const u = z();
    return {
      ns: a,
      selectArray: s,
      selectDate: e,
      options: {
        disabledDate: (o) => {
          const p = z(o);
          return u.isSame(p, "day") || u.isBefore(p, "day");
        }
      },
      onSelectArrayChange: n,
      onDateChange: r
    };
  },
  render() {
    const t = [this.ns.b(), this.ns.m(this.modelData.modelClass)];
    return i("portlet-layout", {
      attrs: {
        controller: this.controller
      },
      class: t
    }, [i("i-checkbox-group", {
      class: this.ns.e("rylx-checkbox"),
      attrs: {
        value: this.selectArray
      },
      on: {
        "on-change": this.onSelectArrayChange
      }
    }, [this.controller.options.map((a) => i("i-checkbox", {
      attrs: {
        label: a.value
      }
    }, [a.text]))]), i("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 Ye {
  constructor() {
    w(this, "component", He);
  }
  async createController(a, s, e) {
    const n = new Q(
      a,
      s,
      e
    );
    return await n.init(), n;
  }
}
class W extends Pe {
  constructor() {
    super(...arguments);
    w(this, "data", {});
    w(this, "mapData", []);
    w(this, "pointData", []);
    w(this, "form");
    w(this, "hasLoad", !1);
    w(this, "isloading", !1);
    w(this, "entityService");
    w(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 qe(s, this.context, {
      ...this.params
    }), await this.form.init(), this.dashboard.nerve.self.evt.on("mounted", () => {
      this.load();
    });
  }
  calcPercent(s, e, n = 1) {
    return s ? parseFloat((s * 100 / e).toFixed(n)) : 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((r) => ({
      name: r.orgcode,
      value: this.calcPercent(Number(r.zcl), 1, 2),
      title: r.orgname,
      zcl: `${this.calcPercent(Number(r.zcl), 1, 2)}%`,
      zcrs: r.zcrs,
      yzrs: r.yzrs != null ? r.yzrs : "",
      zgrs: r.zgrs != null ? r.zgrs : "",
      jd: r.jd,
      wd: r.wd
    })), n = e.findIndex(
      (r) => r.name === this.params.orgcode
    );
    n !== -1 && (this.pointData = e.splice(n, 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 Qe = ["#FF0700", "#FFF400", "#73A0FA"], We = {
  strMapCode: !0,
  visualMap: {
    text: ["\u9AD8", "\u4F4E"],
    min: 0,
    max: 100,
    rangeColor: Qe
  },
  pointSymbol: "pin"
}, Je = "/assets/json/map/jiangsu/{id}.json";
async function Xe(t) {
  return (await ibiz.net.axios({
    url: E.dir(Je.replace("{id}", t))
  })).data;
}
function Ze(t, a) {
  const s = /* @__PURE__ */ new Map(), e = C(""), n = C([]);
  let r;
  const u = C(), v = (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;
  }, o = async (c) => {
    if (s.has(c))
      return;
    const m = await Xe(c);
    s.set(c, v(m)), Ve(c, m);
  }, p = (c) => {
    const m = s.get(e.value);
    if (m)
      return m.cityNames[c];
  }, f = () => {
    const c = t(e.value);
    r.setOption(c), r.resize();
  }, g = async (c, m = !1) => {
    m || a("mapChange", { name: c }), s.has(c) || await o(c), e.value = c, n.value.push(c), f();
  }, d = () => {
    if (n.value.length > 1) {
      n.value.pop();
      const c = n.value.pop();
      g(c);
    }
  };
  return N(() => {
    r = Ie(u.value), window.addEventListener("resize", () => {
      r == null || r.resize();
    }), r.on("click", (c) => {
      if (c.componentType === "series" && c.seriesType === "scatter") {
        a("pointClick", c.data);
        return;
      }
      c.name !== e.value && g(c.name);
    }), r.on("mouseover", function(c) {
      if (c.componentType === "series" && c.seriesType === "scatter") {
        const m = c.dataIndex, x = r.getOption(), l = x.series[c.seriesIndex].data, h = x.series[c.seriesIndex].symbolSize;
        l[m].symbolSize = h + 10, r.setOption(x);
      }
    }), r.on("mouseout", function(c) {
      if (c.componentType === "series" && c.seriesType === "scatter") {
        const m = c.dataIndex, x = r.getOption(), l = x.series[c.seriesIndex].data;
        delete l[m].symbolSize, r.setOption(x);
      }
    });
  }), {
    chartRef: u,
    historyNames: n,
    currenName: e,
    changeMap: g,
    getCityName: p,
    goBack: d,
    refresh: f
  };
}
const et = D({
  name: "MapChart",
  props: {
    mapData: {
      type: Array,
      required: !0
    },
    pointData: {
      type: Array
    },
    options: {
      type: Object,
      default: () => ({})
    },
    defaultMapName: {
      type: String,
      required: !0
    }
  },
  setup(t, {
    emit: a
  }) {
    const s = S("map-chart"), e = L(() => Te(We, t.options)), {
      chartRef: n,
      historyNames: r,
      changeMap: u,
      getCityName: v,
      goBack: o,
      refresh: p
    } = Ze((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 = v(l.name), b = t.mapData.find((k) => k.name == l.name);
                if (!!b)
                  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>${b.zgrs}/${b.yzrs}</span>
                      </div>
                    `;
              }
            },
            label: {
              show: !0,
              color: "#000000",
              fontSize: 11,
              formatter: (l) => v(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" ? a("mapChange", c.name) : a(d, c);
    });
    N(() => {
      u(t.defaultMapName, !0);
    });
    const {
      mapData: f,
      pointData: g
    } = ae(t);
    return _([f, g], () => {
      p();
    }), {
      ns: s,
      chartRef: n,
      historyNames: r,
      goBack: o
    };
  },
  render() {
    return i("div", {
      class: this.ns.b()
    }, [i("div", {
      class: this.ns.e("chart"),
      ref: "chartRef"
    }), this.historyNames.length > 1 && i("div", {
      class: this.ns.e("goback"),
      on: {
        click: () => {
          this.goBack();
        }
      }
    }, ["\u8FD4\u56DE"])]);
  }
}), tt = `image://${E.dir("/assets/img/fiveStars.png")}`, st = D({
  name: "PortalMapArea",
  props: {
    modelData: {
      type: Ce,
      required: !0
    },
    controller: {
      type: W,
      required: !0
    }
  },
  setup(t) {
    const a = ie(t.controller), s = S("portal-map-area");
    return {
      c: a,
      ns: s
    };
  },
  render() {
    if (!this.c.hasLoad)
      return;
    const t = [this.ns.b(), this.ns.m(this.modelData.modelClass)];
    return i("portlet-layout", {
      attrs: {
        controller: this.controller
      },
      class: t
    }, [this.c.isloading ? i("i-spin", {
      attrs: {
        size: "large",
        fix: !0
      }
    }) : null, i("div", {
      class: this.ns.e("left")
    }), i("div", {
      class: this.ns.e("center")
    }, [i("div", {
      class: this.ns.e("title")
    }, [`${this.c.data.orgname} \u2014 ${this.c.data.yzrs}\u4EBA`]), i(et, {
      class: this.ns.e("map"),
      attrs: {
        mapData: this.c.mapData,
        pointData: this.c.pointData,
        defaultMapName: this.c.params.orgcode,
        options: {
          pointSymbol: tt
        }
      },
      on: {
        mapChange: (a) => {
          this.c.onMapChange(a);
        },
        pointClick: (a) => {
          this.c.onPointClick(a);
        }
      }
    }), this.c.pointClicked && i("div", {
      class: this.ns.e("goback"),
      on: {
        click: () => {
          this.c.goBackFrominstitution();
        }
      }
    }, ["\u8FD4\u56DE"])]), i("div", {
      class: this.ns.e("right")
    })]);
  }
});
class at {
  constructor() {
    w(this, "component", st);
  }
  async createController(a, s, e) {
    const n = new W(
      a,
      s,
      e
    );
    return await n.init(), n;
  }
}
class it extends De {
  constructor() {
    super(...arguments);
    w(this, "unit", "");
    w(this, "isPercent", !1);
    w(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 rt(t, a, s, e = {}) {
  return le(t, () => {
    const n = new it(a, s, e);
    return ce(t, "mdCtrlActiveMode", n.setMdCtrlActiveMode.bind(n)), n;
  });
}
function nt(t) {
  return { handleClick: (e) => {
    const n = t.selectedData.findIndex((r) => e.srfkey === r.srfkey);
    if (t.singleSelect)
      n === -1 ? t.onSelectionChange([e]) : t.onSelectionChange([]);
    else {
      const r = t.selectedData;
      n === -1 ? r.push(e) : r.splice(n, 1), t.onSelectionChange(r);
    }
    t.handleClick(e);
  }, handleDblClick: (e) => {
    t.handleDblClick(e);
  } };
}
const ot = D({
  name: "KqqkListControl",
  props: {
    modelData: {
      type: H,
      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: a
    } = I(), s = S("kqqk-list"), e = rt(a, t.modelData, t.context, t.params), {
      handleClick: n,
      handleDblClick: r
    } = nt(e), u = (o, p) => {
      const f = e.selectedData.findIndex((d) => d.srfkey === o.srfkey), g = [s.b("item"), s.is("active", f !== -1)];
      return i("div", {
        class: g,
        key: o.srfkey + p,
        on: {
          click: () => n(o),
          dblclick: () => r(o)
        }
      }, [i("span", {
        class: s.be("item", "title")
      }, [o.title]), i("div", {
        class: s.be("item", "progress")
      }, [i("span", {
        style: `width:${o.percent}%;`,
        class: s.be("item", "progress-bar")
      }), i("span", {
        class: s.be("item", "progress-text")
      }, [o.num, e.unit])])]);
    };
    return {
      c: e,
      ns: s,
      renderListContent: () => e.items.map((o, p) => u(o, p))
    };
  },
  render() {
    return i("control-layout", {
      class: this.ns.b(),
      attrs: {
        modelData: this.c.model
      }
    }, [this.c.complete && [this.renderListContent()]]);
  }
});
class lt {
  constructor() {
    w(this, "component", ot);
  }
}
function ct(t) {
  return { handleClick: (e) => {
    const n = t.selectedData.findIndex((r) => e.srfkey === r.srfkey);
    if (t.singleSelect)
      n === -1 ? t.onSelectionChange([e]) : t.onSelectionChange([]);
    else {
      const r = t.selectedData;
      n === -1 ? r.push(e) : r.splice(n, 1), t.onSelectionChange(r);
    }
    t.handleClick(e);
  }, handleDblClick: (e) => {
    t.handleDblClick(e);
  } };
}
const R = D({
  name: "ListExpControl",
  props: {
    modelData: {
      type: H,
      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: a
    } = I(), s = S("control-list"), e = de(a, t.modelData, t.context, t.params), {
      handleClick: n,
      handleDblClick: r
    } = ct(e);
    let u = !0;
    N(() => {
      _(() => 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 v = (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, n(d);
      }, x = [s.b("item"), s.is("active", c !== -1 && u === !1)];
      return i("div", {
        class: x,
        on: {
          click: () => m(),
          dblclick: () => r(d)
        }
      }, [e.layoutPanelProvider ? i(e.layoutPanelProvider.component, {
        props: {
          modelData: e.model,
          context: e.context,
          params: e.params,
          inputData: d
        }
      }) : `${d.deptname}`]);
    }, o = () => e.model.source.enableGroup ? i("el-collapse") : e.items.map((d) => v(d)), p = () => Object.is(e.total, e.items.length) ? null : i("div", {
      class: s.e("no-data")
    }, [i("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, n(d);
    }, g = () => {
      const d = [s.b("item"), s.is("active", u === !0)];
      return e.items.length > 0 ? i("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: o,
      renderLoadMore: p,
      renderAll: g,
      renderAllClick: f,
      isSelectAll: u
    };
  },
  render() {
    return i("control-layout", {
      class: [this.ns.b()],
      attrs: {
        modelData: this.c.model
      }
    }, [this.c.complete && [this.renderAll(), this.renderListContent(), this.renderLoadMore()]]);
  }
});
const dt = D({
  name: "ListExpSelectTreeView",
  components: {
    Treeselect: je,
    ListExpControl: R
  },
  props: {
    context: Object,
    params: {
      type: Object
    },
    srfnav: String,
    modelPath: {
      type: String,
      required: !0
    },
    modal: {
      type: Object
    }
  },
  setup(t) {
    const {
      proxy: a
    } = I(), s = ue(a, t.modelPath), e = C(""), n = C([]), r = S("list-exp-select-tree");
    s.context.isRouter === !0 && s.nerve.self.evt.on("created", () => {
      t.srfnav && (s.navItem.key = t.srfnav, n.value = [t.srfnav]), he(re(s.navItem, "key"), a, 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 v = (g) => ({
      id: g.id,
      label: g.text,
      children: g.children
    }), o = (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: n,
      routeViewKey: e,
      normalizer: v,
      select: o,
      dataItems: [],
      isLoadCodeList: p,
      value: u,
      ns: r
    };
  },
  render() {
    if (this.c.complete) {
      const t = this.c.context.isRouter === !0, {
        listExpBar: a
      } = this.c.model, {
        list: s
      } = a, e = this.c.model.codeName;
      if (this.dataItems.length === 0 && e === "SysDepartmentKqAYTJListExp1View") {
        const {
          codeName: n
        } = this.c.model.source.getQuickGroupPSCodeList();
        (async (u) => {
          this.dataItems = await ibiz.codeListService.get(u, this.c.context, {
            size: 1e3
          }), this.isLoadCodeList = !0;
        })(n);
      }
      return i("exp-view-base", {
        class: [this.ns.b()],
        attrs: {
          controller: this.c,
          expBarModel: this.c.model.listExpBar
        },
        scopedSlots: {
          default: () => i(R, {
            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" ? i("div", {
            class: "ibiz-selectTree"
          }, [i("treeselect", {
            attrs: {
              value: this.value,
              options: this.dataItems,
              normalizer: this.normalizer,
              clearable: !1,
              "default-expand-level": 1
            },
            on: {
              select: this.select
            }
          })]) : e === "SysDepartmentkqBmtjListExpView" ? i("div", {
            class: "ibiz-bmtj"
          }, [i("div", {
            class: "ibiz-bmyj-content"
          }, [this.c.context.srforgname])]) : null,
          expView: () => s.navView ? t ? this.routeViewKey ? i("router-view", {
            key: this.routeViewKey
          }) : null : i("ViewShell", {
            attrs: {
              context: this.c.navItem.context,
              params: this.c.navItem.params,
              modal: {
                mode: se.EMBED
              },
              modelPath: s.navView.source.modelPath
            },
            key: this.c.navItem.key
          }) : null
        }
      });
    }
    return null;
  }
});
class ut {
  constructor() {
    w(this, "component", "ListExpSelectTreeView");
  }
}
class ht {
  constructor() {
    w(this, "component", "BYQKEditView");
  }
}
class pt {
  constructor() {
    w(this, "formEditor", "KqBase64ImageUpload");
    w(this, "gridEditor", "IBizGridFileUpload");
  }
  async createController(a, s) {
    const e = new Se(a, s);
    return await e.init(), e;
  }
}
const mt = D({
  name: "KqBase64ImageUpload",
  props: pe(),
  emits: me(),
  setup(t) {
    var r, u, v;
    const a = S("kq-base64-image-upload"), s = ((r = t.controller.model) == null ? void 0 : r.width) || "auto", e = ((u = t.controller.model) == null ? void 0 : u.height) || "150px", n = ((v = t.controller.editorParams) == null ? void 0 : v["justify-content"]) || "center";
    return () => i("div", {
      class: a.b(),
      style: {
        width: s,
        height: e,
        justifyContent: n
      }
    }, [i("img", {
      attrs: {
        src: t.value
      },
      class: a.e("image")
    })]);
  }
});
class ft {
  constructor() {
    w(this, "component", "KqdwCustomPickupTreeView");
  }
}
const gt = D({
  name: "KqdwCustomPickupTreeView",
  props: {
    context: {
      type: Object,
      required: !0
    },
    params: {
      type: Object
    },
    srfnav: String,
    modelPath: {
      type: String,
      required: !0
    },
    modal: {
      type: Object
    }
  },
  setup(t) {
    const a = S("kqdw-custom-pickup-tree-view"), {
      proxy: s
    } = I(), e = fe(s, t.modelPath), n = C(null);
    let r = null;
    const u = C([]), v = C({}), o = C([]), p = C([]), f = C(""), g = C([]), d = async (y) => {
      await r.loadNodes(y), v.value = y, o.value.push(y);
    };
    return _(() => e.complete, async (y, P) => {
      var q;
      if (y !== P && y) {
        await e.model.pickupViewPanel.embedView.init();
        const A = (q = e.model.pickupViewPanel.embedView.source.getPSControls()) == null ? void 0 : q.find((j) => j.controlType === "TREEVIEW");
        A || console.warn("\u672A\u627E\u5230[\u6811(tree)]\u90E8\u4EF6"), n.value = new xe(A), await n.value.init(), r = ge(s, n.value, t.context, t.params), await r.init();
        const V = await r.load();
        if (V.length > 0 && (u.value = V, v.value.children = V, o.value.push({
          text: "\u5F53\u524D\u9662",
          children: V
        })), e.params.selectedData) {
          const j = JSON.parse(e.params.selectedData);
          j.length > 0 && (p.value = j.map((T) => ({
            srfkey: T.srfkey,
            srfmajortext: T.srfmajortext,
            value: T.srfkey,
            text: T.srfmajortext,
            dxlx: T.dxlx
          })));
        }
      }
    }), {
      ns: a,
      c: e,
      treeDatas: u,
      currentTreeNode: v,
      clickTreeNode: d,
      treeHistory: o,
      isChecked: (y) => p.value.findIndex((q) => q.value === y.value) !== -1,
      selectTreeNodes: p,
      handleSelect: (y) => {
        const P = p.value.findIndex((q) => q.value === y.value);
        P === -1 ? p.value.push(y) : p.value.splice(P, 1);
      },
      clickHistory: (y) => {
        const P = o.value.findIndex((q) => q.value === y.value);
        o.value = o.value.slice(0, P + 1), v.value = y;
      },
      clearAll: () => {
        p.value = [];
      },
      onOkButtonClick: () => {
        const y = p.value.map((P) => {
          var q;
          return {
            srfkey: P.value,
            srfmajortext: P.text,
            dxlx: (q = P.deData) == null ? void 0 : q.dxlx
          };
        });
        e.closeView({
          ok: !0,
          data: y
        });
      },
      query: f,
      queryChange: (y) => {
        y.target && (f.value = y.target.value, Object.assign(e.params, {
          query: f.value
        }));
      },
      search: async () => {
        const y = await (r == null ? void 0 : r.load());
        y && (g.value = y);
      },
      queryTreeNodeList: g
    };
  },
  render() {
    return i("div", {
      class: this.ns.b()
    }, [i("div", {
      class: "top"
    }, [i("div", {
      class: "left"
    }, [i("div", {
      class: "title"
    }, ["\u672A\u9009\u62E9\u7528\u6237"]), i("div", {
      class: "search"
    }, [i("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
      }
    })]), i("div", {
      class: "cascader"
    }, [i("div", {
      class: "history"
    }, [!this.query && this.treeHistory.length > 0 && this.treeHistory.map((t, a) => i("span", {
      class: "content"
    }, [i("span", {
      on: {
        click: () => this.clickHistory(t)
      }
    }, [t.text]), a < this.treeHistory.length - 1 && i("span", {
      class: "icon"
    }, [">"])]))]), i("div", {
      class: "children"
    }, [this.query ? this.queryTreeNodeList.map((t) => i("div", {
      class: "child",
      key: t.id
    }, [this.isChecked(t) ? i("span", {
      class: "checked",
      on: {
        click: () => {
          this.handleSelect(t);
        }
      }
    }, ["\u221A"]) : i("span", {
      class: "no-checked",
      on: {
        click: () => {
          this.handleSelect(t);
        }
      }
    }), i("span", {
      class: "text"
    }, [t.text])])) : this.currentTreeNode && this.currentTreeNode.children && this.currentTreeNode.children.map((t) => i("div", {
      class: "child",
      key: t.id
    }, [this.isChecked(t) ? i("span", {
      class: "checked",
      on: {
        click: () => {
          this.handleSelect(t);
        }
      }
    }, ["\u221A"]) : i("span", {
      class: "no-checked",
      on: {
        click: () => {
          this.handleSelect(t);
        }
      }
    }), i("span", {
      class: "text",
      on: {
        click: () => this.clickTreeNode(t)
      }
    }, [t.text])]))])])]), i("div", {
      class: "right"
    }, [i("div", {
      class: "title"
    }, [i("span", [" \u5DF2\u9009\u62E9\u7528\u6237"]), " ", i("span", {
      class: "clear",
      on: {
        click: () => this.clearAll()
      }
    }, ["\u5168\u90E8\u6E05\u9664"])]), i("div", {
      class: "list"
    }, [this.selectTreeNodes.map((t) => i("div", {
      class: "node"
    }, [i("span", [t.text]), " ", i("span", {
      class: "remove",
      on: {
        click: () => {
          this.handleSelect(t);
        }
      }
    }, ["x"])]))])])]), i("div", {
      class: "bottom"
    }, [i("i-button", {
      on: {
        click: () => {
          this.onOkButtonClick();
        }
      }
    }, ["\u786E\u5B9A"]), i("i-button", {
      on: {
        click: () => {
          this.c.onCancelButtonClick();
        }
      }
    }, ["\u53D6\u6D88"])])]);
  }
});
class yt {
  constructor() {
    w(this, "component", "KqbcFormMDCtrl");
  }
  async createController(a, s, e) {
    const n = new _e(a, s, e);
    return await n.init(), n;
  }
}
const vt = D({
  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: a
  }) {
    const s = S("user-tab-page-exp"), e = C("0"), n = [{
      text: "\u5173\u95ED\u6240\u6709",
      value: "closeAll"
    }, {
      text: "\u5173\u95ED\u5176\u4ED6",
      value: "closeOther"
    }];
    return _(() => t.currentKey, (o, p) => {
      const f = t.routeMsgs.findIndex((g) => g.key === o);
      f !== -1 && (e.value = `${f}`);
    }), {
      ns: s,
      tabsValue: e,
      actions: n,
      changePage: (o) => {
        e.value = o, a("tab-click", +o);
      },
      onClose: (o) => {
        a("tab-delete", +o);
      },
      handleCommand: (o) => {
        o === "closeAll" ? a("close-all") : o === "closeOther" && a("close-other");
      }
    };
  },
  render() {
    var t;
    return i("div", {
      class: this.ns.b()
    }, [i("div", {
      class: this.ns.e("left")
    }, [i("i-tabs", {
      attrs: {
        type: "card",
        closable: !0
      },
      on: {
        "on-click": this.changePage,
        "on-tab-remove": this.onClose
      },
      model: {
        value: this.tabsValue,
        callback: (a) => {
          this.tabsValue = a;
        }
      }
    }, [(t = this.routeMsgs) == null ? void 0 : t.map((a, s) => i("i-tab-pane", {
      key: a.key,
      attrs: {
        name: `${s}`,
        label: a.caption
      }
    }))])])]);
  }
});
class wt {
  constructor() {
    w(this, "component", "QytjGridView");
  }
}
class bt extends Me {
  constructor() {
    super(...arguments);
    w(this, "qjgrid");
    w(this, "ycgrid");
  }
  inclusive(s) {
    return s === "ycgrid" || s === "qjgrid" || super.inclusive(s);
  }
  connect(s, e) {
    super.connect(s, e), s === "qjgrid" && (this.qjgrid = e), s === "ycgrid" && (this.ycgrid = e);
  }
}
class Ct extends Ee {
  constructor() {
    super(...arguments);
    w(this, "activeRadio", "qyry");
    w(this, "selectTimeFrame", z().format("YYYY-MM"));
    w(this, "activeGrid", !0);
  }
  createNerve() {
    return new bt(this);
  }
  async onInit() {
    await super.onInit();
    const s = B(this.model.source, "BytjYcry");
    this.ycgrid = new U(s), await this.ycgrid.init();
    const e = B(this.model.source, "BytjQjry");
    this.qjgrid = new U(e), await this.qjgrid.init();
  }
  load() {
    return this.params.n_kqny_eq || this.setTimeFrameParams(), this.activeRadio === "ycry" ? this.nerve.ycgrid.call.load() : this.activeRadio === "qjry" ? this.nerve.qjgrid.call.load() : this.nerve.grid.call.load();
  }
  setActiveRadio(s) {
    this.activeRadio = s, this.setTimeFrameParams(), this.load();
  }
  setSelectTimeFrame(s) {
    this.selectTimeFrame = s, this.setTimeFrameParams(), this.load();
  }
  setTimeFrameParams() {
    this.params.n_kqny_eq = this.selectTimeFrame;
  }
  async exportData(s) {
    if (this.activeRadio === "ycry") {
      const { ycgrid: e } = this.nerve;
      await e.call.exportData(s);
    } else if (this.activeRadio === "qjry") {
      const { qjgrid: e } = this.nerve;
      await e.call.exportData(s);
    } else {
      const { grid: e } = this.nerve;
      await e.call.exportData(s);
    }
  }
}
function xt(t, a) {
  return ye(
    t,
    (s, e) => new Ct(a, s, e)
  );
}
const kt = D({
  name: "QytjGridView",
  props: {
    context: Object,
    params: {
      type: Object,
      default: () => ({})
    },
    modelPath: {
      type: String,
      required: !0
    },
    modal: {
      type: Object
    }
  },
  setup(t) {
    const {
      proxy: a
    } = I(), s = S("qytj-grid-view"), e = xt(a, t.modelPath);
    ne(() => e.refresh());
    const n = L(() => e.activeRadio);
    return _(() => t.context, () => {
      const r = e.context.n_orgid_eq;
      r ? Object.assign(e.params, {
        n_orgid_eq: r
      }) : e.params.n_orgid_eq && delete e.params.n_orgid_eq;
    }, {
      deep: !0,
      immediate: !0
    }), {
      c: e,
      ns: s,
      activeRadio: n
    };
  },
  render(t) {
    let a = null, s = null, e = null;
    if (this.c.complete) {
      const {
        grid: n
      } = this.c.model;
      if (this.c.providers[n.name] && (a = t(this.c.providers[n.name].component, {
        key: "grid",
        class: [this.ns.e("grid"), this.ns.is("active", this.activeRadio === "qyry")],
        props: {
          modelData: n,
          context: this.c.context,
          params: this.c.params
        },
        on: {
          neuronInit: this.c.nerve.onNeuronInit(n.name)
        }
      })), this.activeRadio === "ycry" || this.c.activeGrid) {
        const {
          ycgrid: r
        } = this.c;
        this.c.providers.grid && (s = t(this.c.providers.grid.component, {
          key: "ycgrid",
          class: [this.ns.e("grid"), this.ns.is("active", this.activeRadio === "ycry")],
          props: {
            modelData: r,
            context: this.c.context,
            params: this.c.params,
            "grid-row-active-mode": this.c.model.gridRowActiveMode
          },
          on: {
            neuronInit: this.c.nerve.onNeuronInit(r.name)
          }
        }));
      }
      if (this.activeRadio === "qjry" || this.c.activeGrid) {
        const {
          qjgrid: r
        } = this.c;
        this.c.providers.grid && (e = t(this.c.providers.grid.component, {
          key: "qjgrid",
          class: [this.ns.e("grid"), this.ns.is("active", this.activeRadio === "qjry")],
          props: {
            modelData: r,
            context: this.c.context,
            params: this.c.params,
            "grid-row-active-mode": this.c.model.gridRowActiveMode
          },
          on: {
            neuronInit: this.c.nerve.onNeuronInit(r.name)
          }
        }));
      }
    }
    return t("view-base", {
      class: [this.ns.b()],
      attrs: {
        controller: this.c
      },
      scopedSlots: {
        caption: () => {
          const n = `${this.c.context.calendarcaption || this.c.context.srfpersonname}\u7EDF\u8BA1`;
          return t("div", {
            class: this.ns.b("caption")
          }, [t("span", {
            class: this.ns.be("caption", "text"),
            attrs: {
              title: n
            }
          }, [n])]);
        },
        toolbar: () => [t("div", {
          class: [this.ns.b("exp")]
        }, [t("i-radio-group", {
          attrs: {
            value: this.activeRadio,
            type: "button"
          },
          on: {
            "on-change": (n) => {
              this.c.setActiveRadio(n);
            }
          }
        }, [t("i-radio", {
          attrs: {
            label: "qyry"
          }
        }, ["\u5168\u9662\u4EBA\u5458"]), t("i-radio", {
          attrs: {
            label: "ycry"
          }
        }, ["\u5F02\u5E38\u4EBA\u5458"]), t("i-radio", {
          attrs: {
            label: "qjry"
          }
        }, ["\u8BF7\u5047\u4EBA\u5458"])])])],
        quickSearch: () => [this.c.model.toolbar && t("view-toolbar", {
          attrs: {
            modelData: this.c.model.toolbar,
            toolbarState: this.c.toolbarState,
            viewMode: this.c.modal.mode
          },
          on: {
            neuronInit: this.c.nerve.onNeuronInit(this.c.model.toolbar.source.name)
          }
        }), t("div", {
          class: [this.ns.b("search")]
        }, [t("div", {
          class: [this.ns.be("search", "time-frame")]
        }, [t("i-CalendarPicker", {
          attrs: {
            value: this.c.selectTimeFrame,
            clearable: !1,
            type: "month",
            format: "yyyy-MM",
            placeholder: "\u8BF7\u9009\u62E9"
          },
          on: {
            "on-change": (n) => {
              this.c.setSelectTimeFrame(n);
            }
          },
          style: "width: 110px;"
        })])])]
      }
    }, [a, s, e]);
  }
}), zt = {
  mateUrl: import.meta.url,
  install(t) {
    t.component("UserTabPageExp", vt), t.component("UserIndexView", Be), t.component("UserAppLayout", Ge), t.component("ListExpSelectTreeView", dt), t.component("ListExpControl", R), t.component("ChangePassword", Y), 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 ze()
    ), ibiz.register.view.register(
      "VIEW_CUSTOM_ListExpSelectTreeView",
      new ut()
    ), E.loadStyle(["/style.css"]), ibiz.register.portletPart.register(
      "PORTLET_CUSTOM_JskqWebPortalSearchHeader",
      new Ye()
    ), ibiz.register.portletPart.register(
      "PORTLET_CUSTOM_jskqWebPortalMapArea",
      new at()
    ), ibiz.register.control.register(
      "LIST_RENDER_JskqWebKqqkList",
      new lt()
    ), ibiz.register.view.register(
      "VIEW_CUSTOM_ByqkCustomEditView",
      new ht()
    ), t.component("KqBase64ImageUpload", mt), ibiz.register.editor.register(
      "PICTURE_ONE_Base64ImageUpload",
      new pt()
    ), t.component("KqdwCustomPickupTreeView", gt), ibiz.register.view.register(
      "VIEW_CUSTOM_KqdwCustomPickupTreeView",
      new ft()
    ), t.component("QytjGridView", kt), ibiz.register.view.register(
      "VIEW_CUSTOM_QytjGridView",
      new wt()
    ), ibiz.register.formDetail.register("MDCTRL", new yt());
  }
};
export {
  zt as default
};
