import '@das-fed/upf-ui/packages/business-components/process-table/style.css';
import { withInstall as Xt } from "@das-fed/upf-utils/with-install/index";
import { ref as T, useSlots as $t, watch as ie, defineComponent as Zt, mergeModels as Je, useModel as er, onMounted as tr, openBlock as oe, createElementBlock as $e, normalizeClass as rr, unref as a, createVNode as z, mergeProps as nr, isRef as Ae, withCtx as B, createCommentVNode as xe, renderSlot as We, Fragment as ar, renderList as or, createBlock as Ye, createElementVNode as Q, toDisplayString as J, createTextVNode as Xe } from "vue";
import { t as H, setI18nRule as sr } from "@das-fed/upf-web/packages/i18n/index";
import { DasTable as Ze, DasTableColumn as ve } from "@das-fed/upf-ui/packages/components/table/index";
import { DasDialog as ir } from "@das-fed/upf-ui/packages/components/dialog/index";
import { DasButton as et } from "@das-fed/upf-ui/packages/components/button/index";
import { DasSwitch as lr } from "@das-fed/upf-ui/packages/components/switch/index";
import { DasTooltip as cr } from "@das-fed/upf-ui/packages/components/tooltip/index";
import { createService as ze } from "@das-fed/upf-utils/api-services/src/create-service";
import { getProjectInfo as tt } from "@das-fed/upf-utils/common-info/index";
import rt from "dayjs";
const ur = ze("/api/admin/hotent/v1/table"), pr = ze("/workflow/form/dataTemplate/v1/getBpmDataTemplateInfoByFlowKey");
ur.post("/value/report/page");
const fr = pr.get(""), dr = (e, t) => ({
  reportTableList: ze(e)[t]("")
});
var At = typeof global == "object" && global && global.Object === Object && global, gr = typeof self == "object" && self && self.Object === Object && self, D = At || gr || Function("return this")(), ee = D.Symbol, xt = Object.prototype, hr = xt.hasOwnProperty, br = xt.toString, se = ee ? ee.toStringTag : void 0;
function yr(e) {
  var t = hr.call(e, se), r = e[se];
  try {
    e[se] = void 0;
    var n = !0;
  } catch {
  }
  var s = br.call(e);
  return n && (t ? e[se] = r : delete e[se]), s;
}
var vr = Object.prototype, mr = vr.toString;
function _r(e) {
  return mr.call(e);
}
var Tr = "[object Null]", Sr = "[object Undefined]", nt = ee ? ee.toStringTag : void 0;
function pe(e) {
  return e == null ? e === void 0 ? Sr : Tr : nt && nt in Object(e) ? yr(e) : _r(e);
}
function fe(e) {
  return e != null && typeof e == "object";
}
var Be = Array.isArray;
function de(e) {
  var t = typeof e;
  return e != null && (t == "object" || t == "function");
}
var wr = "[object AsyncFunction]", jr = "[object Function]", Or = "[object GeneratorFunction]", Cr = "[object Proxy]";
function Pt(e) {
  if (!de(e))
    return !1;
  var t = pe(e);
  return t == jr || t == Or || t == wr || t == Cr;
}
var Pe = D["__core-js_shared__"], at = function() {
  var e = /[^.]+$/.exec(Pe && Pe.keys && Pe.keys.IE_PROTO || "");
  return e ? "Symbol(src)_1." + e : "";
}();
function $r(e) {
  return !!at && at in e;
}
var Ar = Function.prototype, xr = Ar.toString;
function Y(e) {
  if (e != null) {
    try {
      return xr.call(e);
    } catch {
    }
    try {
      return e + "";
    } catch {
    }
  }
  return "";
}
var Pr = /[\\^$.*+?()[\]{}|]/g, Dr = /^\[object .+?Constructor\]$/, Er = Function.prototype, Nr = Object.prototype, Mr = Er.toString, Fr = Nr.hasOwnProperty, Ir = RegExp(
  "^" + Mr.call(Fr).replace(Pr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function zr(e) {
  if (!de(e) || $r(e))
    return !1;
  var t = Pt(e) ? Ir : Dr;
  return t.test(Y(e));
}
function Br(e, t) {
  return e == null ? void 0 : e[t];
}
function X(e, t) {
  var r = Br(e, t);
  return zr(r) ? r : void 0;
}
var Ne = X(D, "WeakMap"), ot = Object.create, Lr = /* @__PURE__ */ function() {
  function e() {
  }
  return function(t) {
    if (!de(t))
      return {};
    if (ot)
      return ot(t);
    e.prototype = t;
    var r = new e();
    return e.prototype = void 0, r;
  };
}();
function Ur(e, t) {
  var r = -1, n = e.length;
  for (t || (t = Array(n)); ++r < n; )
    t[r] = e[r];
  return t;
}
var st = function() {
  try {
    var e = X(Object, "defineProperty");
    return e({}, "", {}), e;
  } catch {
  }
}();
function Rr(e, t) {
  for (var r = -1, n = e == null ? 0 : e.length; ++r < n && t(e[r], r, e) !== !1; )
    ;
  return e;
}
var Hr = 9007199254740991, Vr = /^(?:0|[1-9]\d*)$/;
function Gr(e, t) {
  var r = typeof e;
  return t = t ?? Hr, !!t && (r == "number" || r != "symbol" && Vr.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
function Dt(e, t, r) {
  t == "__proto__" && st ? st(e, t, {
    configurable: !0,
    enumerable: !0,
    value: r,
    writable: !0
  }) : e[t] = r;
}
function Et(e, t) {
  return e === t || e !== e && t !== t;
}
var Kr = Object.prototype, kr = Kr.hasOwnProperty;
function Nt(e, t, r) {
  var n = e[t];
  (!(kr.call(e, t) && Et(n, r)) || r === void 0 && !(t in e)) && Dt(e, t, r);
}
function Se(e, t, r, n) {
  var s = !r;
  r || (r = {});
  for (var i = -1, o = t.length; ++i < o; ) {
    var g = t[i], l = void 0;
    l === void 0 && (l = e[g]), s ? Dt(r, g, l) : Nt(r, g, l);
  }
  return r;
}
var qr = 9007199254740991;
function Mt(e) {
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= qr;
}
function Ft(e) {
  return e != null && Mt(e.length) && !Pt(e);
}
var Qr = Object.prototype;
function Le(e) {
  var t = e && e.constructor, r = typeof t == "function" && t.prototype || Qr;
  return e === r;
}
function Jr(e, t) {
  for (var r = -1, n = Array(e); ++r < e; )
    n[r] = t(r);
  return n;
}
var Wr = "[object Arguments]";
function it(e) {
  return fe(e) && pe(e) == Wr;
}
var It = Object.prototype, Yr = It.hasOwnProperty, Xr = It.propertyIsEnumerable, Zr = it(/* @__PURE__ */ function() {
  return arguments;
}()) ? it : function(e) {
  return fe(e) && Yr.call(e, "callee") && !Xr.call(e, "callee");
};
function en() {
  return !1;
}
var zt = typeof exports == "object" && exports && !exports.nodeType && exports, lt = zt && typeof module == "object" && module && !module.nodeType && module, tn = lt && lt.exports === zt, ct = tn ? D.Buffer : void 0, rn = ct ? ct.isBuffer : void 0, Bt = rn || en, nn = "[object Arguments]", an = "[object Array]", on = "[object Boolean]", sn = "[object Date]", ln = "[object Error]", cn = "[object Function]", un = "[object Map]", pn = "[object Number]", fn = "[object Object]", dn = "[object RegExp]", gn = "[object Set]", hn = "[object String]", bn = "[object WeakMap]", yn = "[object ArrayBuffer]", vn = "[object DataView]", mn = "[object Float32Array]", _n = "[object Float64Array]", Tn = "[object Int8Array]", Sn = "[object Int16Array]", wn = "[object Int32Array]", jn = "[object Uint8Array]", On = "[object Uint8ClampedArray]", Cn = "[object Uint16Array]", $n = "[object Uint32Array]", d = {};
d[mn] = d[_n] = d[Tn] = d[Sn] = d[wn] = d[jn] = d[On] = d[Cn] = d[$n] = !0;
d[nn] = d[an] = d[yn] = d[on] = d[vn] = d[sn] = d[ln] = d[cn] = d[un] = d[pn] = d[fn] = d[dn] = d[gn] = d[hn] = d[bn] = !1;
function An(e) {
  return fe(e) && Mt(e.length) && !!d[pe(e)];
}
function Ue(e) {
  return function(t) {
    return e(t);
  };
}
var Lt = typeof exports == "object" && exports && !exports.nodeType && exports, le = Lt && typeof module == "object" && module && !module.nodeType && module, xn = le && le.exports === Lt, De = xn && At.process, te = function() {
  try {
    var e = le && le.require && le.require("util").types;
    return e || De && De.binding && De.binding("util");
  } catch {
  }
}(), ut = te && te.isTypedArray, Pn = ut ? Ue(ut) : An, Dn = Object.prototype, En = Dn.hasOwnProperty;
function Ut(e, t) {
  var r = Be(e), n = !r && Zr(e), s = !r && !n && Bt(e), i = !r && !n && !s && Pn(e), o = r || n || s || i, g = o ? Jr(e.length, String) : [], l = g.length;
  for (var h in e)
    (t || En.call(e, h)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
    (h == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    s && (h == "offset" || h == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    i && (h == "buffer" || h == "byteLength" || h == "byteOffset") || // Skip index properties.
    Gr(h, l))) && g.push(h);
  return g;
}
function Rt(e, t) {
  return function(r) {
    return e(t(r));
  };
}
var Nn = Rt(Object.keys, Object), Mn = Object.prototype, Fn = Mn.hasOwnProperty;
function In(e) {
  if (!Le(e))
    return Nn(e);
  var t = [];
  for (var r in Object(e))
    Fn.call(e, r) && r != "constructor" && t.push(r);
  return t;
}
function Re(e) {
  return Ft(e) ? Ut(e) : In(e);
}
function zn(e) {
  var t = [];
  if (e != null)
    for (var r in Object(e))
      t.push(r);
  return t;
}
var Bn = Object.prototype, Ln = Bn.hasOwnProperty;
function Un(e) {
  if (!de(e))
    return zn(e);
  var t = Le(e), r = [];
  for (var n in e)
    n == "constructor" && (t || !Ln.call(e, n)) || r.push(n);
  return r;
}
function He(e) {
  return Ft(e) ? Ut(e, !0) : Un(e);
}
var ce = X(Object, "create");
function Rn() {
  this.__data__ = ce ? ce(null) : {}, this.size = 0;
}
function Hn(e) {
  var t = this.has(e) && delete this.__data__[e];
  return this.size -= t ? 1 : 0, t;
}
var Vn = "__lodash_hash_undefined__", Gn = Object.prototype, Kn = Gn.hasOwnProperty;
function kn(e) {
  var t = this.__data__;
  if (ce) {
    var r = t[e];
    return r === Vn ? void 0 : r;
  }
  return Kn.call(t, e) ? t[e] : void 0;
}
var qn = Object.prototype, Qn = qn.hasOwnProperty;
function Jn(e) {
  var t = this.__data__;
  return ce ? t[e] !== void 0 : Qn.call(t, e);
}
var Wn = "__lodash_hash_undefined__";
function Yn(e, t) {
  var r = this.__data__;
  return this.size += this.has(e) ? 0 : 1, r[e] = ce && t === void 0 ? Wn : t, this;
}
function W(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var n = e[t];
    this.set(n[0], n[1]);
  }
}
W.prototype.clear = Rn;
W.prototype.delete = Hn;
W.prototype.get = kn;
W.prototype.has = Jn;
W.prototype.set = Yn;
function Xn() {
  this.__data__ = [], this.size = 0;
}
function we(e, t) {
  for (var r = e.length; r--; )
    if (Et(e[r][0], t))
      return r;
  return -1;
}
var Zn = Array.prototype, ea = Zn.splice;
function ta(e) {
  var t = this.__data__, r = we(t, e);
  if (r < 0)
    return !1;
  var n = t.length - 1;
  return r == n ? t.pop() : ea.call(t, r, 1), --this.size, !0;
}
function ra(e) {
  var t = this.__data__, r = we(t, e);
  return r < 0 ? void 0 : t[r][1];
}
function na(e) {
  return we(this.__data__, e) > -1;
}
function aa(e, t) {
  var r = this.__data__, n = we(r, e);
  return n < 0 ? (++this.size, r.push([e, t])) : r[n][1] = t, this;
}
function U(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var n = e[t];
    this.set(n[0], n[1]);
  }
}
U.prototype.clear = Xn;
U.prototype.delete = ta;
U.prototype.get = ra;
U.prototype.has = na;
U.prototype.set = aa;
var ue = X(D, "Map");
function oa() {
  this.size = 0, this.__data__ = {
    hash: new W(),
    map: new (ue || U)(),
    string: new W()
  };
}
function sa(e) {
  var t = typeof e;
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function je(e, t) {
  var r = e.__data__;
  return sa(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
}
function ia(e) {
  var t = je(this, e).delete(e);
  return this.size -= t ? 1 : 0, t;
}
function la(e) {
  return je(this, e).get(e);
}
function ca(e) {
  return je(this, e).has(e);
}
function ua(e, t) {
  var r = je(this, e), n = r.size;
  return r.set(e, t), this.size += r.size == n ? 0 : 1, this;
}
function re(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var n = e[t];
    this.set(n[0], n[1]);
  }
}
re.prototype.clear = oa;
re.prototype.delete = ia;
re.prototype.get = la;
re.prototype.has = ca;
re.prototype.set = ua;
function Ht(e, t) {
  for (var r = -1, n = t.length, s = e.length; ++r < n; )
    e[s + r] = t[r];
  return e;
}
var Vt = Rt(Object.getPrototypeOf, Object);
function pa() {
  this.__data__ = new U(), this.size = 0;
}
function fa(e) {
  var t = this.__data__, r = t.delete(e);
  return this.size = t.size, r;
}
function da(e) {
  return this.__data__.get(e);
}
function ga(e) {
  return this.__data__.has(e);
}
var ha = 200;
function ba(e, t) {
  var r = this.__data__;
  if (r instanceof U) {
    var n = r.__data__;
    if (!ue || n.length < ha - 1)
      return n.push([e, t]), this.size = ++r.size, this;
    r = this.__data__ = new re(n);
  }
  return r.set(e, t), this.size = r.size, this;
}
function ne(e) {
  var t = this.__data__ = new U(e);
  this.size = t.size;
}
ne.prototype.clear = pa;
ne.prototype.delete = fa;
ne.prototype.get = da;
ne.prototype.has = ga;
ne.prototype.set = ba;
function ya(e, t) {
  return e && Se(t, Re(t), e);
}
function va(e, t) {
  return e && Se(t, He(t), e);
}
var Gt = typeof exports == "object" && exports && !exports.nodeType && exports, pt = Gt && typeof module == "object" && module && !module.nodeType && module, ma = pt && pt.exports === Gt, ft = ma ? D.Buffer : void 0, dt = ft ? ft.allocUnsafe : void 0;
function _a(e, t) {
  if (t)
    return e.slice();
  var r = e.length, n = dt ? dt(r) : new e.constructor(r);
  return e.copy(n), n;
}
function Ta(e, t) {
  for (var r = -1, n = e == null ? 0 : e.length, s = 0, i = []; ++r < n; ) {
    var o = e[r];
    t(o, r, e) && (i[s++] = o);
  }
  return i;
}
function Kt() {
  return [];
}
var Sa = Object.prototype, wa = Sa.propertyIsEnumerable, gt = Object.getOwnPropertySymbols, Ve = gt ? function(e) {
  return e == null ? [] : (e = Object(e), Ta(gt(e), function(t) {
    return wa.call(e, t);
  }));
} : Kt;
function ja(e, t) {
  return Se(e, Ve(e), t);
}
var Oa = Object.getOwnPropertySymbols, kt = Oa ? function(e) {
  for (var t = []; e; )
    Ht(t, Ve(e)), e = Vt(e);
  return t;
} : Kt;
function Ca(e, t) {
  return Se(e, kt(e), t);
}
function qt(e, t, r) {
  var n = t(e);
  return Be(e) ? n : Ht(n, r(e));
}
function $a(e) {
  return qt(e, Re, Ve);
}
function Aa(e) {
  return qt(e, He, kt);
}
var Me = X(D, "DataView"), Fe = X(D, "Promise"), Ie = X(D, "Set"), ht = "[object Map]", xa = "[object Object]", bt = "[object Promise]", yt = "[object Set]", vt = "[object WeakMap]", mt = "[object DataView]", Pa = Y(Me), Da = Y(ue), Ea = Y(Fe), Na = Y(Ie), Ma = Y(Ne), L = pe;
(Me && L(new Me(new ArrayBuffer(1))) != mt || ue && L(new ue()) != ht || Fe && L(Fe.resolve()) != bt || Ie && L(new Ie()) != yt || Ne && L(new Ne()) != vt) && (L = function(e) {
  var t = pe(e), r = t == xa ? e.constructor : void 0, n = r ? Y(r) : "";
  if (n)
    switch (n) {
      case Pa:
        return mt;
      case Da:
        return ht;
      case Ea:
        return bt;
      case Na:
        return yt;
      case Ma:
        return vt;
    }
  return t;
});
var Fa = Object.prototype, Ia = Fa.hasOwnProperty;
function za(e) {
  var t = e.length, r = new e.constructor(t);
  return t && typeof e[0] == "string" && Ia.call(e, "index") && (r.index = e.index, r.input = e.input), r;
}
var _t = D.Uint8Array;
function Ge(e) {
  var t = new e.constructor(e.byteLength);
  return new _t(t).set(new _t(e)), t;
}
function Ba(e, t) {
  var r = t ? Ge(e.buffer) : e.buffer;
  return new e.constructor(r, e.byteOffset, e.byteLength);
}
var La = /\w*$/;
function Ua(e) {
  var t = new e.constructor(e.source, La.exec(e));
  return t.lastIndex = e.lastIndex, t;
}
var Tt = ee ? ee.prototype : void 0, St = Tt ? Tt.valueOf : void 0;
function Ra(e) {
  return St ? Object(St.call(e)) : {};
}
function Ha(e, t) {
  var r = t ? Ge(e.buffer) : e.buffer;
  return new e.constructor(r, e.byteOffset, e.length);
}
var Va = "[object Boolean]", Ga = "[object Date]", Ka = "[object Map]", ka = "[object Number]", qa = "[object RegExp]", Qa = "[object Set]", Ja = "[object String]", Wa = "[object Symbol]", Ya = "[object ArrayBuffer]", Xa = "[object DataView]", Za = "[object Float32Array]", eo = "[object Float64Array]", to = "[object Int8Array]", ro = "[object Int16Array]", no = "[object Int32Array]", ao = "[object Uint8Array]", oo = "[object Uint8ClampedArray]", so = "[object Uint16Array]", io = "[object Uint32Array]";
function lo(e, t, r) {
  var n = e.constructor;
  switch (t) {
    case Ya:
      return Ge(e);
    case Va:
    case Ga:
      return new n(+e);
    case Xa:
      return Ba(e, r);
    case Za:
    case eo:
    case to:
    case ro:
    case no:
    case ao:
    case oo:
    case so:
    case io:
      return Ha(e, r);
    case Ka:
      return new n();
    case ka:
    case Ja:
      return new n(e);
    case qa:
      return Ua(e);
    case Qa:
      return new n();
    case Wa:
      return Ra(e);
  }
}
function co(e) {
  return typeof e.constructor == "function" && !Le(e) ? Lr(Vt(e)) : {};
}
var uo = "[object Map]";
function po(e) {
  return fe(e) && L(e) == uo;
}
var wt = te && te.isMap, fo = wt ? Ue(wt) : po, go = "[object Set]";
function ho(e) {
  return fe(e) && L(e) == go;
}
var jt = te && te.isSet, bo = jt ? Ue(jt) : ho, yo = 1, vo = 2, mo = 4, Qt = "[object Arguments]", _o = "[object Array]", To = "[object Boolean]", So = "[object Date]", wo = "[object Error]", Jt = "[object Function]", jo = "[object GeneratorFunction]", Oo = "[object Map]", Co = "[object Number]", Wt = "[object Object]", $o = "[object RegExp]", Ao = "[object Set]", xo = "[object String]", Po = "[object Symbol]", Do = "[object WeakMap]", Eo = "[object ArrayBuffer]", No = "[object DataView]", Mo = "[object Float32Array]", Fo = "[object Float64Array]", Io = "[object Int8Array]", zo = "[object Int16Array]", Bo = "[object Int32Array]", Lo = "[object Uint8Array]", Uo = "[object Uint8ClampedArray]", Ro = "[object Uint16Array]", Ho = "[object Uint32Array]", p = {};
p[Qt] = p[_o] = p[Eo] = p[No] = p[To] = p[So] = p[Mo] = p[Fo] = p[Io] = p[zo] = p[Bo] = p[Oo] = p[Co] = p[Wt] = p[$o] = p[Ao] = p[xo] = p[Po] = p[Lo] = p[Uo] = p[Ro] = p[Ho] = !0;
p[wo] = p[Jt] = p[Do] = !1;
function me(e, t, r, n, s, i) {
  var o, g = t & yo, l = t & vo, h = t & mo;
  if (o !== void 0)
    return o;
  if (!de(e))
    return e;
  var b = Be(e);
  if (b) {
    if (o = za(e), !g)
      return Ur(e, o);
  } else {
    var w = L(e), E = w == Jt || w == jo;
    if (Bt(e))
      return _a(e, g);
    if (w == Wt || w == Qt || E && !s) {
      if (o = l || E ? {} : co(e), !g)
        return l ? Ca(e, va(o, e)) : ja(e, ya(o, e));
    } else {
      if (!p[w])
        return s ? e : {};
      o = lo(e, w, g);
    }
  }
  i || (i = new ne());
  var O = i.get(e);
  if (O)
    return O;
  i.set(e, o), bo(e) ? e.forEach(function(m) {
    o.add(me(m, t, r, m, e, i));
  }) : fo(e) && e.forEach(function(m, _) {
    o.set(_, me(m, t, r, _, e, i));
  });
  var R = h ? l ? Aa : $a : l ? He : Re, N = b ? void 0 : R(e);
  return Rr(N || e, function(m, _) {
    N && (_ = m, m = e[_]), Nt(o, _, me(m, t, r, _, e, i));
  }), o;
}
var Vo = 1, Go = 4;
function _e(e) {
  return me(e, Vo | Go);
}
const Ko = (e, t, r) => {
  var Z, A, u, M;
  const n = (Z = tt()) != null && Z.id ? (A = tt()) == null ? void 0 : A.id : "371344636432453", s = T([]), i = T([]), o = T([]), g = T(), l = $t(), h = ((u = l.prepend) == null ? void 0 : u.call(l)) ?? [], b = ((M = l.append) == null ? void 0 : M.call(l)) ?? [], w = T(!1), { reportTableList: E } = dr(e.apiUrl, e.reqMethod), O = T([]), R = T([]), N = T([]), m = T(0), _ = T(20), y = T(1), f = T({
    flowKey: e.flowKey,
    clientType: e.clientType,
    permissionFilterTypes: e.permissionQuery,
    pageBean: {
      page: y.value,
      pageSize: _.value
    },
    params: {},
    sorter: [
      // {
      //   property: 'creation_time',
      //   direction: 'DESC',
      // },
    ],
    querys: e.searchQuerys
  });
  ie(
    () => e.searchQuerys,
    (c) => {
      f.value.querys = c, t("getSearchQuery", f.value);
    },
    {
      deep: !0,
      immediate: !0
    }
  ), ie(
    () => e.permissionQuery,
    (c) => {
      f.value.permissionFilterTypes = c, t("getSearchQuery", f.value);
    },
    {
      deep: !0,
      immediate: !0
    }
  );
  const C = async () => new Promise((c) => {
    if (w.value)
      c(!0);
    else {
      let x = ie(
        () => w.value,
        (P) => {
          P && (x == null || x(), x = null, c(!0));
        }
      );
    }
  }), $ = async () => {
    await C(), r.value = !0;
    const c = {
      ...f.value,
      ...e.extraParams,
      sorter: f.value.sorter || []
    }, [x, P] = await E(c, { params: { project: n } }).run();
    r.value = !1, !x && (N.value = P.data, m.value = P.totalCount);
  }, V = async () => {
    var q;
    const c = {
      flowKey: e.flowKey,
      needDisplayFileds: e.needDisplayFileds,
      project: n
    }, [x, P] = await fr(c).run();
    if (x) return;
    const j = P.value;
    if (!j) return;
    let k = [];
    if (j.sortField && (O.value = JSON.parse(j.sortField).map((F) => ({
      property: F.name,
      direction: F.sort
    })), R.value = (e == null ? void 0 : e.defaultSort) ?? JSON.parse(j.sortField).map((F) => {
      const be = F.sort === "ASC" ? "ascending" : "descending";
      return {
        prop: F.name,
        order: be
      };
    }), ((q = O.value) == null ? void 0 : q.length) > 0 ? f.value.sorter = [O.value[0]] : f.value.sorter = [], t("getSearchQuery", f.value), k = O.value.map((F) => F.property)), j.displayField) {
      const F = JSON.parse(j.displayField), be = {}, Ce = /* @__PURE__ */ new Map(), Ke = [], ke = [];
      j.boDef.boEnt.attributeList.forEach((v) => {
        be[v.name] = v;
      }), b.forEach((v) => {
        const S = v.props, I = { desc: S.label, name: S.label };
        Ce.set(S.prop, I), Ke.push({ name: S.prop, desc: S.label, switch: !0 });
      }), h.forEach((v) => {
        const S = v.props, I = { desc: S.label, name: S.label };
        Ce.set(S.prop, I), ke.push({ name: S.prop, desc: S.label, switch: !0 });
      }), s.value = [], F.forEach((v) => {
        if (Ce.has(v.name)) return;
        const S = be[v.name];
        v.encryption = (S == null ? void 0 : S.encryption) ?? "", k.includes(v.name) ? v.sort = "custom" : v.sort = !1, s.value.push(v);
      });
      const Yt = s.value.map((v) => ({
        name: v.name,
        desc: v.desc,
        switch: !0
      }));
      o.value = [...ke, ...Yt, ...Ke];
      const ye = window.localStorage.getItem(e.columnSettingName);
      if (ye && ye !== "undefined") {
        const v = o.value.map((I) => I.name).join(","), S = JSON.parse(ye).map((I) => I.name).join(",");
        v === S ? g.value = JSON.parse(ye) : (g.value = _e(o.value), window.localStorage.setItem(e.columnSettingName, JSON.stringify(o.value))), i.value = s.value.filter((I) => {
          let qe = !1;
          return g.value.map((Qe) => {
            Qe.name === I.name && Qe.switch && (qe = !0);
          }), qe;
        });
      } else
        i.value = _e(s.value), g.value = _e(o.value);
    }
    w.value = !0;
  }, ae = (c) => {
    y.value = c, f.value.pageBean.page = c, $();
  }, ge = (c) => {
    _.value = c, f.value.pageBean.pageSize = c, $();
  }, he = (c) => {
    const x = c.order === "ascending" ? "ASC" : "DESC", P = O.value.find((j) => {
      if (j.property === c.prop)
        return j.direction = x, j;
    });
    f.value.sorter = [P], t("getSearchQuery", f.value), $();
  }, G = T(!0), Oe = (c, x, P) => {
    const j = c.button_list ? JSON.parse(c.button_list) : [], k = T([]);
    if (j && j.length > 0 ? k.value = j.map((q) => ({
      label: q.name,
      value: q.alias
    })) : k.value = [], e.customOperation) {
      const q = typeof e.customOperation == "function" ? e.customOperation(c, x, P) || [] : e.customOperation || [];
      k.value.unshift(...q);
    }
    return k.value;
  }, K = T(!0);
  return ie(
    () => i.value,
    (c) => {
      e.showOperationColumn ? c.length > 0 ? (G.value = !0, K.value = e.selection) : (G.value = !1, K.value = !1) : (G.value = !1, c.length > 0 ? K.value = e.selection : K.value = !1);
    },
    {
      immediate: !0,
      deep: !0
    }
  ), {
    filterSetting: O,
    defaultFilterSetting: R,
    copySettingHeaderData: i,
    copyDialogHeaderData: g,
    operation: Oe,
    reqTableList: $,
    tableData: N,
    reqSearchSetting: V,
    settingHeaderData: s,
    dialogHeaderData: o,
    total: m,
    pageIndex: y,
    pageSize: _,
    handleCurrentPageChange: ae,
    handlePageSizeChange: ge,
    sortChange: he,
    customSelectionOptions: K,
    showOperationColumn: G
  };
}, ko = (e, t, r, n, s, i) => {
  var m, _;
  const o = $t(), g = ((m = o.append) == null ? void 0 : m.call(o)) ?? [], l = ((_ = o.prepend) == null ? void 0 : _.call(o)) ?? [], h = T([]), b = T(!1), w = () => {
    b.value = !1;
    const y = window.localStorage.getItem(e.columnSettingName);
    y ? s.value = JSON.parse(y) : s.value = r.value;
  }, E = () => {
    var y;
    (y = s.value) == null || y.forEach((f) => f.switch = !0);
  }, O = () => {
    var y;
    (y = s.value) == null || y.forEach((f) => f.switch = !1);
  }, R = () => {
    b.value = !0;
  }, N = () => {
    h.value = _e(s.value), window.localStorage.setItem(e.columnSettingName, JSON.stringify(h.value));
    const y = /* @__PURE__ */ new Map();
    h.value.forEach((C) => {
      y.set(C.name, C);
    });
    const f = [];
    l.forEach((C) => {
      const $ = C.props.prop, V = y.get($);
      f.push(V);
    }), g.forEach((C) => {
      const $ = C.props.prop, V = y.get($);
      f.push(V);
    }), t("changeSlotShow", f), b.value = !1;
  };
  return ie(
    () => h.value,
    (y) => {
      i.value = n.value.filter((f) => {
        let C = !1;
        return y.map(($) => {
          $.name === f.name && $.switch && (C = !0);
        }), C;
      });
    }
  ), {
    headerBackData: h,
    showSettingDialog: b,
    cancelTabel: w,
    resetDefault: E,
    showAll: O,
    setTable: N,
    tableSetting: R
  };
}, qo = (e) => {
  const r = "****", n = String(e), s = n.slice(0, 15), i = n.slice(15);
  return ((l) => {
    const h = l.length;
    if (h < 6) return l;
    let b = 0;
    switch (h) {
      case 6:
      case 7:
        b = 1;
        break;
      case 8:
      case 9:
        b = 2;
        break;
      case 10:
      case 11:
        b = 3;
        break;
      case 12:
        b = 4;
        break;
      case 13:
        b = 5;
        break;
      case 14:
        b = 6;
        break;
      case 15:
        b = 7;
        break;
    }
    const w = b + r.length;
    return l.slice(0, b) + r + l.slice(w);
  })(s) + i;
}, Qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: qo
}, Symbol.toStringTag, { value: "Module" })), Te = {}, Jo = /^\.\/(.+)\/index\.ts$/, Ot = /* @__PURE__ */ Object.assign({ "./phone/index.ts": Qo });
var Ct;
for (const e in Ot) {
  const t = Ot[e], r = (Ct = e.match(Jo)) == null ? void 0 : Ct[1];
  Te[r] = t.default;
}
const Wo = (e, t) => {
  var n;
  return t ? ((n = Te[e]) == null ? void 0 : n.call(Te, t)) ?? t : "-";
}, Yo = (e, t) => {
  if (e && t) {
    const r = Number(e);
    return isNaN(r) ? rt(e).format(t) : rt(r).format(t);
  }
  return "-";
}, Xo = (e, t) => {
  const r = String(e);
  if (r && t && t.length > 0) {
    const n = t.find((s) => s.key_ === r);
    return n ? n.value_ : "-";
  } else
    return "-";
}, Ee = (e, t) => {
  var n, s;
  const r = e[t.name];
  return t.encryption ? Wo(t.encryption, r) : t.dateFormatter ? Yo(e[t.name], t.dateFormatter) : ((n = t.formatterData) == null ? void 0 : n.length) > 0 ? Xo(e[t.name], t.formatterData) : t.type === "date" ? ((s = e[t.name]) == null ? void 0 : s.replaceAll("-", "/")) || "-" : e[t.name] || "-";
}, Zo = { class: "das-ui-text-context" }, es = { key: 1 }, ts = { class: "setting-top" }, rs = { class: "setting-top-content" }, ns = { class: "operate" }, as = /* @__PURE__ */ Zt({
  __name: "App",
  props: /* @__PURE__ */ Je({
    flowKey: { default: "" },
    clientType: { default: "pc" },
    needDisplayFileds: { type: Boolean, default: !1 },
    customOperation: {},
    searchQuerys: { default: () => [] },
    sortQuerys: { default: () => [] },
    extraParams: { default: () => ({}) },
    permissionQuery: { default: () => [1] },
    apiUrl: { default: "/api/admin/hotent/v1/table/value/report/page" },
    defaultSort: {},
    reqMethod: { default: "post" },
    columnSettingName: { default: "headerSetting" },
    selection: { type: [Boolean, Object] },
    showOperationColumn: { type: Boolean, default: !0 }
  }, {
    loading: { type: Boolean, default: !1 },
    loadingModifiers: {}
  }),
  emits: /* @__PURE__ */ Je(["getSearchQuery", "changeSlotShow"], ["update:loading"]),
  setup(e, { expose: t, emit: r }) {
    const n = e, s = er(e, "loading"), i = r, {
      copySettingHeaderData: o,
      copyDialogHeaderData: g,
      defaultFilterSetting: l,
      operation: h,
      reqTableList: b,
      dialogHeaderData: w,
      tableData: E,
      reqSearchSetting: O,
      settingHeaderData: R,
      total: N,
      pageIndex: m,
      pageSize: _,
      handleCurrentPageChange: y,
      handlePageSizeChange: f,
      sortChange: C,
      customSelectionOptions: $,
      showOperationColumn: V
    } = Ko(n, i, s), { showSettingDialog: ae, cancelTabel: ge, resetDefault: he, showAll: G, setTable: Oe, tableSetting: K } = ko(
      n,
      i,
      w,
      R,
      g,
      o
    );
    return tr(async () => {
      await O();
    }), t({
      reqTableList: b,
      handleCurrentPageChange: y
    }), (Z, A) => (oe(), $e(
      "div",
      {
        class: rr(["das-process-table", { "no-header-column": a(o).length === 0 }])
      },
      [
        z(a(Ze), nr({ data: a(E) }, Z.$attrs, {
          operation: a(h),
          total: a(N),
          selection: a($),
          "default-sort": a(l)[0],
          showOperationColumn: a(V),
          "current-page": a(m),
          "onUpdate:currentPage": A[0] || (A[0] = (u) => Ae(m) ? m.value = u : null),
          "page-size": a(_),
          "onUpdate:pageSize": A[1] || (A[1] = (u) => Ae(_) ? _.value = u : null),
          onCurrentPageChange: a(y),
          onSizeChange: a(f),
          onTableSetting: a(K),
          onSortChange: a(C)
        }), {
          default: B(() => [
            xe(" 此处用来处理业务固定联动字段，前置插槽，插入DasTableColumn"),
            We(Z.$slots, "prepend", {}, void 0, !0),
            (oe(!0), $e(
              ar,
              null,
              or(a(o), (u) => (oe(), Ye(a(ve), {
                sortable: u.sort,
                key: u.name,
                label: u.desc,
                prop: u.name,
                "show-overflow-tooltip": !u.encryption
              }, {
                default: B(({ row: M, column: c, $index: x }) => [
                  u.encryption ? (oe(), Ye(a(cr), {
                    key: 0,
                    placement: "top",
                    disabled: a(Ee)(M, u) === "-",
                    content: M[u.name]
                  }, {
                    default: B(() => [
                      Q(
                        "div",
                        Zo,
                        J(a(Ee)(M, u)),
                        1
                        /* TEXT */
                      )
                    ]),
                    _: 2
                    /* DYNAMIC */
                  }, 1032, ["disabled", "content"])) : (oe(), $e(
                    "span",
                    es,
                    J(a(Ee)(M, u)),
                    1
                    /* TEXT */
                  ))
                ]),
                _: 2
                /* DYNAMIC */
              }, 1032, ["sortable", "label", "prop", "show-overflow-tooltip"]))),
              128
              /* KEYED_FRAGMENT */
            )),
            xe(" 此处用来处理业务固定联动字段，后置插槽，插入DasTableColumn"),
            We(Z.$slots, "append", {}, void 0, !0)
          ]),
          _: 3
          /* FORWARDED */
        }, 16, ["data", "operation", "total", "selection", "default-sort", "showOperationColumn", "current-page", "page-size", "onCurrentPageChange", "onSizeChange", "onTableSetting", "onSortChange"]),
        xe(" 配置table显示列  "),
        z(a(ir), {
          modelValue: a(ae),
          "onUpdate:modelValue": A[4] || (A[4] = (u) => Ae(ae) ? ae.value = u : null),
          width: "960px",
          title: a(H)("列表控制"),
          height: "580px",
          onClose: a(ge),
          "body-style": { padding: "10px 20px 20px" }
        }, {
          footer: B(() => [
            Q("div", null, [
              z(a(et), { onClick: a(ge) }, {
                default: B(() => [
                  Xe(
                    J(a(H)("取消")),
                    1
                    /* TEXT */
                  )
                ]),
                _: 1
                /* STABLE */
              }, 8, ["onClick"]),
              z(a(et), {
                btnType: "primary",
                style: { "margin-left": "12px" },
                onClick: a(Oe)
              }, {
                default: B(() => [
                  Xe(
                    J(a(H)("确定")),
                    1
                    /* TEXT */
                  )
                ]),
                _: 1
                /* STABLE */
              }, 8, ["onClick"])
            ])
          ]),
          default: B(() => [
            Q("div", ts, [
              Q(
                "div",
                rs,
                J(a(H)("表格设置")),
                1
                /* TEXT */
              )
            ]),
            Q("div", ns, [
              Q(
                "div",
                {
                  class: "text-btn",
                  onClick: A[2] || (A[2] = //@ts-ignore
                  (...u) => a(he) && a(he)(...u))
                },
                J(a(H)("恢复默认")),
                1
                /* TEXT */
              ),
              Q(
                "div",
                {
                  class: "text-btn",
                  onClick: A[3] || (A[3] = //@ts-ignore
                  (...u) => a(G) && a(G)(...u)),
                  style: { "padding-left": "20px" }
                },
                J(a(H)("全部隐藏")),
                1
                /* TEXT */
              )
            ]),
            z(a(Ze), {
              data: a(g),
              "outer-border": "",
              ref: "setTableRef",
              "max-height": "377px"
            }, {
              default: B(() => [
                z(a(ve), {
                  type: "index",
                  width: "56"
                }),
                z(a(ve), {
                  label: a(H)("列名"),
                  prop: "desc"
                }, null, 8, ["label"]),
                z(a(ve), {
                  label: a(H)("显示列"),
                  prop: "switch"
                }, {
                  default: B(({ row: u }) => [
                    z(a(lr), {
                      modelValue: u.switch,
                      "onUpdate:modelValue": (M) => u.switch = M
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                  /* STABLE */
                }, 8, ["label"])
              ]),
              _: 1
              /* STABLE */
            }, 8, ["data"])
          ]),
          _: 1
          /* STABLE */
        }, 8, ["modelValue", "title", "onClose"])
      ],
      2
      /* CLASS */
    ));
  }
}), os = (e, t) => {
  const r = e.__vccOpts || e;
  for (const [n, s] of t)
    r[n] = s;
  return r;
}, ss = /* @__PURE__ */ os(as, [["__scopeId", "data-v-cdd0ec2b"]]), is = {
  列表控制: { "zh-CN": "列表控制", en: "List Control", "zh-MO": "列表控制", _appCode: "framework" },
  表格设置: { "zh-CN": "表格设置", en: "Table Settings", "zh-MO": "表格設置", _appCode: "framework" },
  恢复默认: { "zh-CN": "恢复默认", en: "Reset to Default", "zh-MO": "恢復默認", _appCode: "framework" },
  全部隐藏: { "zh-CN": "全部隐藏", en: "Hide All", "zh-MO": "全部隱藏", _appCode: "framework" },
  列名: { "zh-CN": "列名", en: "Column Name", "zh-MO": "列名", _appCode: "framework" },
  显示列: { "zh-CN": "显示列", en: "Visible Columns", "zh-MO": "顯示列", _appCode: "framework" },
  取消: { "zh-CN": "取消", en: "Cancel", "zh-MO": "取消", _appCode: "framework" },
  确定: { "zh-CN": "确定", en: "OK", "zh-MO": "確定", _appCode: "framework" }
};
sr(is);
const ms = Xt(ss), _s = () => T(null);
export {
  ms as DasProcessTable,
  _s as DasProcessTableRef,
  ms as default
};
