提交 6255d140 编写于 作者: jlj05024111@163.com's avatar jlj05024111@163.com

feat: 更新插件包sy-gs-web

上级 d8ec10e7
var W = Object.defineProperty;
var q = (e, t, i) => t in e ? W(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
var v = (e, t, i) => (q(e, typeof t != "symbol" ? t + "" : t, i), i);
var q = Object.defineProperty;
var _ = (e, t, s) => t in e ? q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
var v = (e, t, s) => (_(e, typeof t != "symbol" ? t + "" : t, s), s);
import { GridModel as B, ModelUtil as $ } from "@ibiz-template/model";
import { defineComponent as z, h, ref as C, computed as S, getCurrentInstance as V, watch as T, onUnmounted as J } from "vue";
import { useNamespace as P, useGridController as K } from "@ibiz-template/vue-util";
......@@ -17,11 +17,11 @@ const Z = z({
setup(e, {
emit: t
}) {
const i = P("wf-toolbar"), o = async (a, n) => {
const s = P("wf-toolbar"), o = async (a, n) => {
t("wf-link-click", a, n);
};
return {
ns: i,
ns: s,
handleClick: async (a, n) => {
setTimeout(() => {
o(a, n);
......@@ -34,32 +34,32 @@ const Z = z({
return h("div", {
class: `${this.ns.b()}`
}, [e.length > 0 && e.map((t) => {
const i = t.sequenceFlowName.startsWith("驳回") || t.sequenceFlowName.startsWith("取消");
const s = t.sequenceFlowName.startsWith("驳回") || t.sequenceFlowName.startsWith("取消"), o = t.sequenceFlowName.startsWith("保存") || t.sequenceFlowName.startsWith("关闭") || t.sequenceFlowName.startsWith("保存并关闭");
return h("div", {
key: t.sequenceFlowId,
class: [this.ns.e("item"), i ? this.ns.em("item", "reject") : ""]
class: [this.ns.e("item"), o ? this.ns.em("item", "plain") : "", s ? this.ns.em("item", "reject") : ""]
}, [h("i-button", {
attrs: {
title: t.sequenceFlowName
},
on: {
click: (o) => this.handleClick(t, o)
click: (i) => this.handleClick(t, i)
}
}, [t.sequenceFlowName || ""])]);
})]);
}
});
function x(e, t) {
var s, a;
const i = [];
var i, a;
const s = [];
e.source.columnType === "GROUPGRIDCOLUMN" && e.children.forEach((n) => {
i.push(x(n, t));
s.push(x(n, t));
});
const o = {
title: e.title,
width: e.source.widthUnit === "STAR" ? void 0 : e.width,
minWidth: e.width,
align: ((s = e.source.align) == null ? void 0 : s.toLowerCase()) || "center",
align: ((i = e.source.align) == null ? void 0 : i.toLowerCase()) || "center",
slot: e.codeName,
key: e.codeName,
fieldName: e.deFieldName,
......@@ -72,14 +72,14 @@ function x(e, t) {
userParams: e.source.userParams,
className: (a = e.source.getCellPSSysCss()) == null ? void 0 : a.cssName
};
return i.length > 0 && Object.assign(o, { children: i }), o;
return s.length > 0 && Object.assign(o, { children: s }), o;
}
function ee(e) {
const t = e.model, i = [], o = t.columns.map((s) => x(s, e));
return t.children.forEach((s) => {
const a = o.find((n) => n.key === s.codeName);
a && i.push(a);
}), e.singleSelect || i.splice(0, 0, { type: "selection", width: 60 }), i;
const t = e.model, s = [], o = t.columns.map((i) => x(i, e));
return t.children.forEach((i) => {
const a = o.find((n) => n.key === i.codeName);
a && s.push(a);
}), e.singleSelect || s.splice(0, 0, { type: "selection", width: 60 }), s;
}
function te(e) {
const t = C([]);
......@@ -104,7 +104,7 @@ function te(e) {
}
function oe(e) {
const t = (n) => e.items.find((u) => u.srfkey === n.srfkey);
function i(n) {
function s(n) {
const u = t(n);
if (e.singleSelect) {
const d = e.selectedData.find(
......@@ -117,7 +117,7 @@ function oe(e) {
function o(n) {
e.onDbRowClick(t(n));
}
function s(n) {
function i(n) {
if (!e.singleSelect) {
const u = [];
n.forEach((d) => {
......@@ -130,21 +130,21 @@ function oe(e) {
const { column: u, order: d } = n, f = d === "asc" || d === "desc" ? d : void 0;
e.setSort(u.fieldName, f), e.load();
}
return { onRowClick: i, onDbRowClick: o, onSelectionChange: s, onSortChange: a };
return { onRowClick: s, onDbRowClick: o, onSelectionChange: i, onSortChange: a };
}
function ne(e) {
function t(s) {
!s || s === e.curPage || (e.curPage = s, e.load());
function t(i) {
!i || i === e.curPage || (e.curPage = i, e.load());
}
function i(s) {
!s || s === e.size || (e.size = s, e.curPage === 1 && e.load());
function s(i) {
!i || i === e.size || (e.size = i, e.curPage === 1 && e.load());
}
function o() {
e.curPage = 1, e.load();
}
return { onPageChange: t, onPageSizeChange: i, onPageReset: o };
return { onPageChange: t, onPageSizeChange: s, onPageReset: o };
}
const ie = z({
const se = z({
props: {
modelData: B,
context: {
......@@ -174,7 +174,7 @@ const ie = z({
setup(e) {
const {
proxy: t
} = V(), i = P("grid"), o = K(t, e.modelData, e.context, e.params), [s] = te(o), {
} = V(), s = P("grid"), o = K(t, e.modelData, e.context, e.params), [i] = te(o), {
onRowClick: a,
onDbRowClick: n,
onSelectionChange: u,
......@@ -192,14 +192,14 @@ const ie = z({
const E = (r, l) => {
p != null && window.clearTimeout(p), p = window.setTimeout(() => {
const c = t.$refs.grid;
c && (o.selectedData.find((D) => D.srfkey === r.srfkey) && c.clearCurrentRow(), c.toggleSelect && c.toggleSelect(l)), a(r);
c && (o.selectedData.find((F) => F.srfkey === r.srfkey) && c.clearCurrentRow(), c.toggleSelect && c.toggleSelect(l)), a(r);
}, 300);
}, M = (r) => {
p != null && window.clearTimeout(p);
const l = t.$refs.grid;
l && (o.selectedData.find((m) => m.srfkey === r.srfkey) || l.clearCurrentRow()), n(r);
}, w = C(0), g = C(null), R = C(null);
let b = null, N = 0;
let b = null, D = 0;
const G = () => {
var r;
if (g.value && ((r = e.modal) == null ? void 0 : r.mode) !== "EMBED")
......@@ -213,15 +213,15 @@ const ie = z({
T(g, (r, l) => {
r && r !== l && (G(), window.ResizeObserver && g.value && (b = new ResizeObserver((c) => {
const m = c[0].contentRect.height;
m !== N && (G(), N = m);
m !== D && (G(), D = m);
}), b.observe(g.value)));
}), J(() => {
b && b.disconnect();
});
const L = S(() => [{
hiddenRow: !0
}, ...o.items]), y = P("grid-field-column"), j = P("collaborative-satisfaction-grid"), k = C([]), _ = S(() => {
const r = [...s.value];
}, ...o.items]), y = P("grid-field-column"), W = P("collaborative-satisfaction-grid"), k = C([]), j = S(() => {
const r = [...i.value];
return r.splice(1, 0, ...k.value), r;
}), I = C([]);
return T(() => o.items, () => {
......@@ -237,9 +237,9 @@ const ie = z({
tooltip: !1,
resizable: !0,
render: (m, {
index: D
index: F
}) => {
const F = I.value[D - 1];
const N = I.value[F - 1];
return h("div", {
class: [y.b()],
style: y.cssVarBlock({
......@@ -247,7 +247,7 @@ const ie = z({
})
}, [h("span", {
class: y.e("text")
}, [(F == null ? void 0 : F[c]) || ""])]);
}, [(N == null ? void 0 : N[c]) || ""])]);
}
};
}), I.value = o.items.map((r) => {
......@@ -266,8 +266,8 @@ const ie = z({
}));
}), {
c: o,
ns: i,
columns: s,
ns: s,
columns: i,
tableData: L,
onDbRowClick: n,
onUIRowClick: E,
......@@ -282,8 +282,8 @@ const ie = z({
girdPaginationRef: R,
highlight: A,
ns2: y,
ns3: j,
tableColumns: _
ns3: W,
tableColumns: j
};
},
render() {
......@@ -293,23 +293,23 @@ const ie = z({
return this.c.model.columns.forEach((t) => {
if (t.source.columnType === "GROUPGRIDCOLUMN")
return;
const i = t.codeName;
e[i] = ({
const s = t.codeName;
e[s] = ({
row: o,
index: s
index: i
}) => {
const a = this.c.rows[s - 1];
const a = this.c.rows[i - 1];
if (o.hiddenRow)
return h("span", {
style: "word-break: break-word;white-space: pre-wrap;"
}, ["隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列"]);
if (a)
return h(this.c.providers[i].component, {
return h(this.c.providers[s].component, {
props: {
controller: this.c.columns[i],
controller: this.c.columns[s],
row: a
},
key: o.srfkey + i
key: o.srfkey + s
});
};
}), h("control-layout", {
......@@ -352,18 +352,18 @@ const ie = z({
})])]);
}
});
class se {
class ie {
constructor() {
v(this, "component", "IndexView");
}
}
const re = new Q(import.meta.url);
class ae extends X {
async execAction(t, i, o, s, a) {
async execAction(t, s, o, i, a) {
const n = "/ibzsy/xtmydcphzdc";
return ibiz.net.request(n, {
method: "post",
data: s,
data: i,
responseType: "blob",
baseURL: ibiz.env.baseUrl
}).then((u) => {
......@@ -399,10 +399,10 @@ const Ce = {
t.app.userParams.autoWidth === "true" && document.getElementsByClassName("app")[0].classList.add("auto-width");
}), re.loadStyle(["/style.css"]), e.component("WfToolbar", Z), ibiz.config.enableDataInfoBar = !1, ibiz.config.gridEditShowMode = "all", ibiz.register.view.register(
"VIEW_CUSTOM_GsIndexCSS",
new se()
new ie()
), e.component(
"CollaborativeSatisfactionGrid",
ie
se
), ibiz.register.control.register(
"CUSTOM_CollaborativeSatisfactionGrid",
new ce()
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册