提交 2ca21e56 编写于 作者: zhujiamin's avatar zhujiamin

feat: 更新插件

上级 d10bcecb
......@@ -2,7 +2,7 @@ var ke = Object.defineProperty;
var je = (a, s, i) => s in a ? ke(a, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[s] = i;
var I = (a, s, i) => (je(a, typeof s != "symbol" ? s + "" : s, i), i);
import B from "dayjs";
import fe, { defineComponent as le, getCurrentInstance as we, onActivated as Re, computed as qe, watch as ue, reactive as $e, ref as ae, h as Y } from "vue";
import fe, { defineComponent as le, getCurrentInstance as we, onActivated as qe, computed as Re, watch as ue, reactive as $e, ref as ae, h as Y } from "vue";
import { PluginStaticResource as Ne, AppDEUIActionUtil as Pe } from "@ibiz-template/runtime";
import { useViewController as Ie, useNamespace as te, useControlController as ze } from "@ibiz-template/vue-util";
import { GridViewNerve as He, GridViewController as Be, ListNerve as We, ListController as Ge } from "@ibiz-template/controller";
......@@ -25,7 +25,7 @@ var Ee = { exports: {} };
};
});
})(Ee);
const Ze = Ee.exports;
const Je = Ee.exports;
var Te = { exports: {} };
(function(a, s) {
(function(i, t) {
......@@ -39,7 +39,7 @@ var Te = { exports: {} };
};
});
})(Te);
const Je = Te.exports;
const Ze = Te.exports;
var Ke = { exports: {} };
(function(a, s) {
(function(i, t) {
......@@ -239,8 +239,8 @@ function Ye() {
throw new Error("Invalid Date in fecha.format");
r = i.masks[r] || r || i.masks.default;
var x = [];
return r = r.replace(y, function(j, R) {
return x.push(R), "@@@";
return r = r.replace(y, function(j, q) {
return x.push(q), "@@@";
}), r = r.replace(t, function(j) {
return j in d ? d[j](e, v) : j.slice(1, j.length - 1);
}), r.replace(/@@@/g, function() {
......@@ -252,9 +252,9 @@ function Ye() {
throw new Error("Invalid format in fecha.parse");
if (r = i.masks[r] || r, e.length > 1e3)
return null;
var x = {}, j = [], R = [];
var x = {}, j = [], q = [];
r = r.replace(y, function(A, k) {
return R.push(k), "@@@";
return q.push(k), "@@@";
});
var P = w(r).replace(t, function(A) {
if (c[A]) {
......@@ -264,7 +264,7 @@ function Ye() {
return A;
});
P = P.replace(/@@@/g, function() {
return R.shift();
return q.shift();
});
var N = e.match(new RegExp(P, "i"));
if (!N)
......@@ -794,10 +794,10 @@ function nt() {
}, S.getRangeHours = function(e) {
var r = [], u = [];
if ((e || []).forEach(function(j) {
var R = j.map(function(P) {
var q = j.map(function(P) {
return P.getHours();
});
u = u.concat(b(R[0], R[1]));
u = u.concat(b(q[0], q[1]));
}), u.length)
for (var v = 0; v < 24; v++)
r[v] = u.indexOf(v) === -1;
......@@ -827,8 +827,8 @@ function nt() {
S.getRangeMinutes = function(e, r) {
var u = new Array(60);
return e.length > 0 ? e.forEach(function(v) {
var x = v[0], j = v[1], R = x.getHours(), P = x.getMinutes(), N = j.getHours(), m = j.getMinutes();
R === r && N !== r ? f(u, P, 60, !0) : R === r && N === r ? f(u, P, m + 1, !0) : R !== r && N === r ? f(u, 0, m + 1, !0) : R < r && N > r && f(u, 0, 60, !0);
var x = v[0], j = v[1], q = x.getHours(), P = x.getMinutes(), N = j.getHours(), m = j.getMinutes();
q === r && N !== r ? f(u, P, 60, !0) : q === r && N === r ? f(u, P, m + 1, !0) : q !== r && N === r ? f(u, 0, m + 1, !0) : q < r && N > r && f(u, 0, 60, !0);
}) : f(u, 0, 60, !0), u;
};
var M = S.range = function(e) {
......@@ -860,11 +860,11 @@ function nt() {
return x >= m[0] && x <= m[1];
}))
return e;
var R = j[0][0], P = j[0][0];
var q = j[0][0], P = j[0][0];
j.forEach(function(m) {
R = new Date(Math.min(m[0], R)), P = new Date(Math.max(m[1], R));
q = new Date(Math.min(m[0], q)), P = new Date(Math.max(m[1], q));
});
var N = x < R ? R : P;
var N = x < q ? q : P;
return E(N, e.getFullYear(), e.getMonth(), e.getDate());
};
S.timeWithinRange = function(e, r, u) {
......@@ -1404,8 +1404,8 @@ function ot() {
getCellClass: function(h) {
var C = h.text, A = h.type, k = [A];
if (A === "current") {
var q = this.getFormateDate(C, A);
q === this.selectedDay && k.push("is-selected"), q === this.formatedToday && k.push("is-today");
var R = this.getFormateDate(C, A);
R === this.selectedDay && k.push("is-selected"), R === this.formatedToday && k.push("is-today");
}
return k;
},
......@@ -1414,15 +1414,15 @@ function ot() {
this.$emit("pick", k);
},
cellRenderProxy: function(h) {
var C = h.text, A = h.type, k = this.$createElement, q = this.elCalendar.$scopedSlots.dateCell;
if (!q)
var C = h.text, A = h.type, k = this.$createElement, R = this.elCalendar.$scopedSlots.dateCell;
if (!R)
return k("span", [C]);
var $ = this.getFormateDate(C, A), z = new Date($), V = {
isSelected: this.selectedDay === $,
type: A + "-month",
day: $
};
return q({ date: z, data: V });
return R({ date: z, data: V });
}
},
computed: {
......@@ -1449,12 +1449,12 @@ function ot() {
rows: function() {
var h = [];
if (this.isInRange) {
var C = this.range, A = C[0], k = C[1], q = Object(M.range)(k.getDate() - A.getDate() + 1).map(function(L, K) {
var C = this.range, A = C[0], k = C[1], R = Object(M.range)(k.getDate() - A.getDate() + 1).map(function(L, K) {
return {
text: A.getDate() + K,
type: "current"
};
}), $ = q.length % 7;
}), $ = R.length % 7;
$ = $ === 0 ? 0 : 7 - $;
var z = Object(M.range)($).map(function(L, K) {
return {
......@@ -1462,11 +1462,11 @@ function ot() {
type: "next"
};
});
h = q.concat(z);
h = R.concat(z);
} else {
var V = this.date, U = Object(M.getFirstDayOfMonth)(V);
U = U === 0 ? 7 : U;
var Z = typeof this.firstDayOfWeek == "number" ? this.firstDayOfWeek : 1, G = (7 + U - Z) % 7, J = Object(M.getPrevMonthLastDays)(V, G).map(function(L) {
var J = typeof this.firstDayOfWeek == "number" ? this.firstDayOfWeek : 1, G = (7 + U - J) % 7, Z = Object(M.getPrevMonthLastDays)(V, G).map(function(L) {
return {
text: L,
type: "prev"
......@@ -1477,7 +1477,7 @@ function ot() {
type: "current"
};
});
h = [].concat(J, re);
h = [].concat(Z, re);
var ne = Object(M.range)(42 - h.length).map(function(L, K) {
return {
text: K + 1,
......@@ -1513,15 +1513,15 @@ function ot() {
cellpadding: "0"
}
},
[A, C("tbody", [this.rows.map(function(k, q) {
[A, C("tbody", [this.rows.map(function(k, R) {
return C(
"tr",
{
class: {
"el-calendar-table__row": !0,
"el-calendar-table__row--hide-border": q === 0 && h.hideHeader
"el-calendar-table__row--hide-border": R === 0 && h.hideHeader
},
key: q
key: R
},
[k.map(function($, z) {
return C(
......@@ -1598,8 +1598,8 @@ function ot() {
return h instanceof Date ? h : new Date(h);
},
rangeValidator: function(h, C) {
var A = this.realFirstDayOfWeek, k = C ? A : A === 0 ? 6 : A - 1, q = (C ? "start" : "end") + " of range should be " + v[k] + ".";
return h.getDay() !== k ? (console.warn("[ElementCalendar]", q, "Invalid range will be ignored."), !1) : !0;
var A = this.realFirstDayOfWeek, k = C ? A : A === 0 ? 6 : A - 1, R = (C ? "start" : "end") + " of range should be " + v[k] + ".";
return h.getDay() !== k ? (console.warn("[ElementCalendar]", R, "Invalid range will be ignored."), !1) : !0;
}
},
computed: {
......@@ -1648,21 +1648,21 @@ function ot() {
var h = this, C = this.range;
if (!C)
return [];
if (C = C.reduce(function(J, re, ne) {
if (C = C.reduce(function(Z, re, ne) {
var L = h.toDate(re);
return h.rangeValidator(L, ne === 0) && (J = J.concat(L)), J;
return h.rangeValidator(L, ne === 0) && (Z = Z.concat(L)), Z;
}, []), C.length === 2) {
var A = C, k = A[0], q = A[1];
if (k > q)
var A = C, k = A[0], R = A[1];
if (k > R)
return console.warn("[ElementCalendar]end time should be greater than start time"), [];
if (Object(M.validateRangeInOneMonth)(k, q))
return [[k, q]];
if (Object(M.validateRangeInOneMonth)(k, R))
return [[k, R]];
var $ = [], z = new Date(k.getFullYear(), k.getMonth() + 1, 1), V = this.toDate(z.getTime() - x);
if (!Object(M.validateRangeInOneMonth)(z, q))
if (!Object(M.validateRangeInOneMonth)(z, R))
return console.warn("[ElementCalendar]start time and end time interval must not exceed two months"), [];
$.push([k, V]);
var U = this.realFirstDayOfWeek, Z = z.getDay(), G = 0;
return Z !== U && (U === 0 ? G = 7 - Z : (G = U - Z, G = G > 0 ? G : 7 + G)), z = this.toDate(z.getTime() + G * x), z.getDate() < q.getDate() && $.push([z, q]), $;
var U = this.realFirstDayOfWeek, J = z.getDay(), G = 0;
return J !== U && (U === 0 ? G = 7 - J : (G = U - J, G = G > 0 ? G : 7 + G)), z = this.toDate(z.getTime() + G * x), z.getDate() < R.getDate() && $.push([z, R]), $;
}
return [];
},
......@@ -1676,8 +1676,8 @@ function ot() {
now: new Date()
};
}
}, R = j, P = Object(l.a)(
R,
}, q = j, P = Object(l.a)(
q,
n,
o,
!1,
......@@ -1786,8 +1786,8 @@ const dt = le({
const {
proxy: s
} = we(), i = te("calendar-grid-view"), t = lt(s, a.modelPath);
Re(() => t.refresh());
const n = qe(() => t.activeRadio);
qe(() => t.refresh());
const n = Re(() => t.activeRadio);
return ue(() => a.context, () => {
const o = t.context.n_orgid_eq;
o ? Object.assign(t.params, {
......@@ -2932,7 +2932,7 @@ const gt = {
class: this.ns.e("state_sbdk")
}, ["\u4E0A\u73ED\u6253\u5361: ", this.$props.data.sbdk]), Y("div", {
class: this.ns.e("state_xbdk")
}, ["\u4E0B\u73ED\u6253\u5361: ", this.$props.data.xbdk])])]) : this.$props.deCodeName === "KqGRTJ" && this.$props.holiday ? Y("div", [Y("div", [this.$props.data.zzdksj ? `\u7B2C\u4E00\u6B21\u6253\u5361:${this.$props.data.zzdksj}` : ""]), Y("div", [this.$props.data.zzdksj ? `\u6700\u540E\u4E00\u6B21\u6253\u5361:${this.$props.data.zhdksj}` : ""])]) : this.$props.deCodeName === "KQ_BMTJ_BMKQQK" && !this.$props.holiday ? Y("div", {
}, ["\u4E0B\u73ED\u6253\u5361: ", this.$props.data.xbdk])])]) : this.$props.deCodeName === "KqGRTJ" && this.$props.holiday ? Y("div", [Y("div", [this.$props.data.zzdksj ? `\u7B2C\u4E00\u6B21\u6253\u5361:${this.$props.data.zzdksj}` : ""]), Y("div", [this.$props.data.zzdksj ? `\u6700\u540E\u4E00\u6B21\u6253\u5361:${this.$props.data.zhdksj}` : ""])]) : (this.$props.deCodeName === "KQ_BMTJ_BMKQQK" || this.$props.deCodeName === "KqJcjgYkqqk") && !this.$props.holiday ? Y("div", {
class: [this.nns.b()]
}, [Y("div", {
class: this.nns.e("zccq-sbcd")
......@@ -2982,7 +2982,7 @@ const gt = {
}), Et = {
mateUrl: import.meta.url,
install(a) {
st.loadStyle(["/style.css"]), B.locale("zh-cn"), B.extend(Ze), B.extend(Je), a.component(xe.name, xe), a.component("CalendarGridView", dt), a.component("StatisticalCalendarControl", yt), a.component("StatisticalCalendarItem", vt), ibiz.register.view.register(
st.loadStyle(["/style.css"]), B.locale("zh-cn"), B.extend(Je), B.extend(Ze), a.component(xe.name, xe), a.component("CalendarGridView", dt), a.component("StatisticalCalendarControl", yt), a.component("StatisticalCalendarItem", vt), ibiz.register.view.register(
"VIEW_CUSTOM_CalendarGridView",
new bt()
);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册