提交 cca2d000 编写于 作者: zhf's avatar zhf

feat: 更新公文效能插件

上级 b74ddf89
var A = Object.defineProperty;
var M = (e, s, t) => s in e ? A(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
var n = (e, s, t) => (M(e, typeof s != "symbol" ? s + "" : s, t), t);
var l = (e, s, t) => (M(e, typeof s != "symbol" ? s + "" : s, t), t);
import { PluginStaticResource as j, ViewMode as D } from "@ibiz-template/runtime";
import { CustomPortletController as B, ViewPortletController as N, SpanEditorController as R, AppPortalViewNerve as G, AppPortalViewController as q } from "@ibiz-template/controller";
import { CustomPortletController as B, ViewPortletController as N, SpanEditorController as R, AppPortalViewNerve as F, AppPortalViewController as G } from "@ibiz-template/controller";
import m from "dayjs";
import { PortletPartModel as F, ListModel as E, ViewPortletModel as Y } from "@ibiz-template/model";
import { PortletPartModel as q, ListModel as E, ViewPortletModel as Y } from "@ibiz-template/model";
import { defineComponent as w, reactive as z, watch as k, h as a, getCurrentInstance as C, ref as P, computed as _ } from "vue";
import { useNamespace as p, useTabExpViewController as U, useRouter as $, useRoute as S, getViewName as K, getSpanProps as W, useListController as L, useViewController as H } from "@ibiz-template/vue-util";
import { useNamespace as p, useTabExpViewController as U, useRouter as $, useRoute as V, getViewName as K, getSpanProps as W, useListController as L, useViewController as H } from "@ibiz-template/vue-util";
const J = new j(import.meta.url);
class Q {
constructor() {
n(this, "component", "IndexView");
l(this, "component", "IndexView");
}
}
class O extends B {
constructor() {
super(...arguments);
n(this, "items", [
l(this, "items", [
{
text: "近一年",
value: 12
......@@ -30,11 +30,11 @@ class O extends B {
value: 3
}
]);
n(this, "data", {
l(this, "data", {
selectDate: [],
itemValue: 12
});
n(this, "onItemValueChange", (t) => {
l(this, "onItemValueChange", (t) => {
const r = m();
this.data.selectDate = [
r.subtract(t, "month").add(1, "day").toDate(),
......@@ -48,18 +48,18 @@ class O extends B {
changeViewParams() {
const [t, r] = this.data.selectDate;
if (t && r) {
const o = m(t).format("YYYY-MM-DD"), l = m(r).format("YYYY-MM-DD");
const o = m(t).format("YYYY-MM-DD"), i = m(r).format("YYYY-MM-DD");
this.dashboard.nerve.self.evt.asyncEmit(
"contextOrParamsChange",
{ ...this.context },
{
...this.params,
starttime: o,
endtime: l,
endtime: i,
kssj: o,
jssj: l,
jssj: i,
tjkssj: o,
tjjssj: l
tjjssj: i
},
!0
);
......@@ -76,7 +76,7 @@ class T extends N {
* @date 2023-11-16 15:11:57
* @type {EntityService}
*/
n(this, "entityService");
l(this, "entityService");
/**
* 请求结果
*
......@@ -84,7 +84,7 @@ class T extends N {
* @date 2023-11-16 15:11:41
* @type {{ data: IData }}
*/
n(this, "result", { data: {} });
l(this, "result", { data: {} });
}
async onInit() {
await super.onInit(), this.entityService = await ibiz.entityService.getService(
......@@ -117,7 +117,7 @@ class T extends N {
}
class X {
constructor() {
n(this, "component", "PortalDatePicker");
l(this, "component", "PortalDatePicker");
}
async createController(s, t, r) {
const o = new O(
......@@ -130,13 +130,13 @@ class X {
}
class Z {
constructor() {
n(this, "component", "CustomTabExpView");
l(this, "component", "CustomTabExpView");
}
}
class tt {
constructor(s) {
n(this, "formEditor", "GrowthRateSpan");
n(this, "gridEditor", "IBizGridSpan");
l(this, "formEditor", "GrowthRateSpan");
l(this, "gridEditor", "IBizGridSpan");
s === "SPAN_LINK" && (this.formEditor = "IBizSpanLink", this.gridEditor = "IBizSpanLink");
}
async createController(s, t) {
......@@ -146,12 +146,12 @@ class tt {
}
class et {
constructor() {
n(this, "component", "BwsdCustomList");
l(this, "component", "BwsdCustomList");
}
}
class st {
constructor() {
n(this, "component", "FwzlPortal");
l(this, "component", "FwzlPortal");
}
async createController(s, t, r) {
const o = new T(s, t, r);
......@@ -160,19 +160,19 @@ class st {
}
class at {
constructor() {
n(this, "component", "FwzlCustomList");
l(this, "component", "FwzlCustomList");
}
}
class rt {
constructor() {
n(this, "component", "GwxnAppPortalView");
l(this, "component", "GwxnAppPortalView");
}
}
const ot = w({
name: "PortalDatePicker",
props: {
modelData: {
type: F,
type: q,
required: !0
},
controller: {
......@@ -185,14 +185,14 @@ const ot = w({
Object.assign(t, {
data: z(t.data)
});
const r = m("2017-01-01"), o = m(), l = {
const r = m("2017-01-01"), o = m(), i = {
disabledDate: (d) => {
const u = m(d);
return u.isBefore(r, "day") || o.isBefore(u, "day");
}
}, c = (d) => {
if (Array.isArray(d) && d.length === 2) {
const [u, h] = d.map((y) => m(y));
const [u, h] = d.map((x) => m(x));
if (u.clone().add(1, "year").subtract(1, "day").isBefore(h, "day")) {
t.data.selectDate = [...t.data.selectDate], ibiz.message.error("统计期间不能超过一年");
return;
......@@ -201,11 +201,11 @@ const ot = w({
}
};
return k(() => t.data.selectDate, (d, u) => {
const [h, x] = d.map((i) => m(i).format("YYYY-MM-DD")), [y, V] = u.map((i) => m(i).format("YYYY-MM-DD"));
h === y && x === V || t.changeViewParams();
const [h, y] = d.map((n) => m(n).format("YYYY-MM-DD")), [x, S] = u.map((n) => m(n).format("YYYY-MM-DD"));
h === x && y === S || t.changeViewParams();
}), {
ns: s,
options: l,
options: i,
onSelectDateChange: c
};
},
......@@ -280,13 +280,13 @@ const it = w({
setup(e) {
const {
proxy: s
} = C(), t = p("custom-tab-exp-view"), r = p("view"), o = U(s, e.modelPath), l = P([]), c = P(""), d = P(!1), u = $(s), h = {}, x = async (i) => {
const f = S(s).fullPath;
} = C(), t = p("custom-tab-exp-view"), r = p("view"), o = U(s, e.modelPath), i = P([]), c = P(""), d = P(!1), u = $(s), h = {}, y = async (n) => {
const f = V(s).fullPath;
h[c.value] = f;
const b = o.model.tabExpPanel.tabExpPages.find((v) => v.name === i);
const b = o.model.tabExpPanel.tabExpPages.find((v) => v.name === n);
if ((b == null ? void 0 : b.embedView.initialized) === !1 && await b.embedView.init(), o.context.isRouter) {
if (d.value = !0, h[i])
u.push(h[i]);
if (d.value = !0, h[n])
u.push(h[n]);
else {
const v = Object.assign(o.context.clone(), {
toRouteLevel: o.modal.level + 1
......@@ -294,17 +294,17 @@ const it = w({
ibiz.openView.root(b.embedView.source, v, o.params);
}
setTimeout(() => {
d.value = !1, c.value = i;
d.value = !1, c.value = n;
}, 0);
} else
l.value.includes(i) || (l.value.push(i), c.value = i);
i.value.includes(n) || (i.value.push(n), c.value = n);
};
o.nerve.self.evt.on("created", () => {
const i = S(s), {
const n = V(s), {
tabExpPages: g
} = o.model.tabExpPanel;
if (o.context.isRouter) {
const f = e.modal.level + 1, b = i.params[`view${f}`];
const f = e.modal.level + 1, b = n.params[`view${f}`];
if (b) {
const v = g.find((I) => K(I.embedView.source) === b);
v && (c.value = v.name);
......@@ -312,22 +312,22 @@ const it = w({
}
if (g.length && !c.value) {
const f = g[0].name;
x(f);
y(f);
}
});
const y = _(() => Object.values(o.tabExpPages).map((i) => i.key)), V = {
const x = _(() => Object.values(o.tabExpPages).map((n) => n.key)), S = {
mode: D.EMBED
};
return {
c: o,
ns: t,
ns2: r,
onTabClick: x,
lazyList: l,
onTabClick: y,
lazyList: i,
deactivateAll: d,
activeTab: c,
keyHistory: y,
embedViewModal: V
keyHistory: x,
embedViewModal: S
};
},
render() {
......@@ -507,7 +507,15 @@ const lt = w({
const {
proxy: s
} = C(), t = p("bwsd-custom-list"), r = L(s, e.modelData, e.context, e.params);
return r.size = r.model.size, {
r.size = r.model.size;
let o = "";
const {
defaultSortField: i,
defaultSortDir: c
} = r.model;
return i && c && (o = `${i},${c}`), r.nerve.self.evt.on("beforeLoad", () => !r.model.source.noSort && o ? {
sort: o
} : {}), {
c: r,
ns: t
};
......@@ -654,8 +662,8 @@ const dt = w({
var c;
const {
proxy: s
} = C(), t = L(s, e.modelData, e.context, e.params), r = p("fwzl-custom-list"), o = P([]), l = (c = t.model.source.getPSControlParam()) == null ? void 0 : c.ctrlParams;
return l && l.COLOR && (o.value = JSON.parse(l.COLOR)), {
} = C(), t = L(s, e.modelData, e.context, e.params), r = p("fwzl-custom-list"), o = P([]), i = (c = t.model.source.getPSControlParam()) == null ? void 0 : c.ctrlParams;
return i && i.COLOR && (o.value = JSON.parse(i.COLOR)), {
c: t,
ns: r,
colorList: o
......@@ -745,7 +753,7 @@ const ut = w({
}, [this.text]);
}
});
class mt extends G {
class mt extends F {
connect(s, t) {
var r;
super.connect(s, t), s === "dashboard" && ((r = this.dashboard) == null || r.evt.on(
......@@ -754,7 +762,7 @@ class mt extends G {
));
}
}
class pt extends q {
class pt extends G {
createNerve() {
return new mt(this);
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册