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

feat: 更新插件

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