提交 422844eb 编写于 作者: chitanda's avatar chitanda

feat: 插件更新

上级 4c81f61b
var n = Object.defineProperty;
var s = (e, i, r) => i in e ? n(e, i, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[i] = r;
var t = (e, i, r) => (s(e, typeof i != "symbol" ? i + "" : i, r), r);
class a {
var f = Object.defineProperty;
var g = (e, t, r) => t in e ? f(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
var l = (e, t, r) => (g(e, typeof t != "symbol" ? t + "" : t, r), r);
import { GridFieldColumnController as u, GridRowController as p, WFStepTraceViewController as I } from "@ibiz-template/controller";
import { defineComponent as C, computed as m, h as c, getCurrentInstance as V } from "vue";
import { useNamespace as w, useViewController as b, usePropsWatch as y } from "@ibiz-template/vue-util";
import { colorBlend as L, IBizContext as x } from "@ibiz-template/core";
class S {
constructor() {
t(this, "compName", "IndexView");
l(this, "compName", "VIEWCUSTOMPresetWFChartView");
}
}
const l = {
class W {
constructor() {
l(this, "compName", "GRIDCOLRENDERCodeListGridColumn");
}
async createController(t, r) {
const n = new u(t, r);
return await n.init(), n;
}
}
class P {
constructor() {
l(this, "compName", "IndexView");
}
}
const R = C({
name: "CodeListGridColumn",
props: {
controller: {
type: u,
required: !0
},
row: {
type: p,
required: !0
}
},
setup(e) {
const t = w("grid-field-column"), r = m(() => {
var d;
if (e.controller.model.source.cLConvertMode !== "FRONT")
return [];
const o = e.row.data[e.controller.model.codeName];
return ((d = e.controller.codeListItems) == null ? void 0 : d.length) && o ? o.split(",").map((h) => {
const a = e.controller.codeListItems.find((i) => i.value === h);
if (a) {
const i = a.color || "#515a6e";
return {
text: a.text,
colorStyle: t.cssVarBlock({
color: i,
"border-color": i,
"bg-color": L(i, "#fff")
})
};
}
}).filter(Boolean) : [];
}), n = (o) => {
e.controller.isLinkColumn && e.controller.openLinkView(e.row, o);
}, s = m(() => {
let o = "";
switch (e.controller.model.align) {
case "LEFT":
o = "flex-start";
break;
case "RIGHT":
o = "flex-end";
break;
default:
o = "center";
break;
}
return t.cssVarBlock({
"justify-content": o
});
});
return {
ns: t,
alignStyle: s,
selectedItems: r,
onCellClick: n
};
},
render() {
const e = this.controller, t = this.row.data[e.model.codeName];
return c("div", {
class: [this.ns.b(), e.isLinkColumn && this.ns.m("link-column")],
style: this.alignStyle,
on: {
click: this.onCellClick
}
}, [this.selectedItems.length > 0 ? this.selectedItems.map((r) => c("span", {
class: this.ns.e("code-list-item"),
style: r.colorStyle
}, [r.text])) : c("span", {
class: this.ns.e("text")
}, [t])]);
}
});
class v extends I {
constructor() {
super(...arguments);
l(this, "imgSrc");
}
async getUIData() {
const r = new x(this.params, this.context), n = await this.entityService.wf.getWFProcessDiagram(r), s = new Blob([n.data]);
this.imgSrc = URL.createObjectURL(s);
}
}
const F = C({
name: "PresetWFChartView",
props: {
context: Object,
params: {
type: Object
},
modelPath: {
type: String,
required: !0
},
modal: {
type: Object
},
deName: {
type: String,
required: !0
}
},
setup(e) {
const t = w("preset-wf-chart-view"), {
proxy: r
} = V(), n = b(r, (s, o) => new v(e.modelPath, s, o));
return y(r, "deName", n.setDeName.bind(n)), {
c: n,
ns: t
};
},
render() {
return c("div", {
class: this.ns.b()
}, [c("img", {
attrs: {
src: this.c.imgSrc
}
})]);
}
}), U = {
mateUrl: import.meta.url,
install(e) {
ibiz.register.view.register(
"VIEW_CUSTOM_SyWebIndexView",
new a()
new P()
), e.component("VIEWCUSTOMPresetWFChartView", F), ibiz.register.view.register(
"VIEW_CUSTOM_PresetWFChartView",
new S()
), e.component("GRIDCOLRENDERCodeListGridColumn", R), ibiz.register.gridColumn.register(
"GRID_COLRENDER_CodeListGridColumn",
new W()
);
}
};
export {
l as default
U as default
};
@charset "UTF-8";.app{width:100vw;height:100vh}.app .ibiz-layout{position:relative;margin:auto;--ibiz-layout-width: 1280px}
@charset "UTF-8";.app{width:100vw;height:100vh}.app .ibiz-layout{position:relative;margin:auto;--ibiz-layout-width: 1280px}.ibiz-grid-field-column{--ibiz-grid-field-column-cell-padding: var(--ibiz-grid-cell-padding);--ibiz-grid-field-column-font-color: var(--ibiz-color-primary);display:flex;align-items:center;justify-content:var(--ibiz-grid-field-column-justify-content);width:100%;height:100%;padding:var(--ibiz-grid-field-column-cell-padding)}.ibiz-grid-field-column__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-grid-field-column--link-column{color:var(--ibiz-grid-field-column-font-color);cursor:pointer}.ibiz-grid-field-column__code-list-item{color:var(--ibiz-grid-field-column-color);border-color:var(--ibiz-grid-field-column-border-color);background-color:var(--ibiz-grid-field-column-bg-color);border:3px solid var(--ibiz-grid-field-column-border-color);border-radius:5px;padding:0 8px;display:inline-block}.ibiz-preset-wf-chart-view{width:100%;height:100%;text-align:center;overflow:auto}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册