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

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

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