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

feat: 补充苏研通用插件

上级 d24ae405
var N = Object.defineProperty;
var k = (t, s, e) => s in t ? N(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
var u = (t, s, e) => (k(t, typeof s != "symbol" ? s + "" : s, e), e);
import { ViewMode as f, PluginStaticResource as v } from "@ibiz-template/runtime";
import { useWFStepTraceViewController as E, usePropsWatch as g, useNamespace as p, useViewController as P, useEditView3Controller as S } from "@ibiz-template/vue-util";
import { defineComponent as b, getCurrentInstance as y, ref as d, h } from "vue";
import { ViewType as V } from "@ibiz-template/model";
import { createUUID as w } from "qx-util";
import { WFDynaEditView3Controller as C } from "@ibiz-template/controller";
const T = b({
name: "WFStepTraceGrid",
props: {
context: Object,
params: {
type: Object
},
modelPath: {
type: String,
required: !0
},
modal: {
type: Object
},
deName: {
type: String,
required: !0
}
},
setup(t) {
const {
proxy: s
} = y(), e = E(s, t.modelPath);
g(s, "deName", e.setDeName.bind(e));
const a = p("wf-step-trace-grid"), r = d([]), l = (o, n, m = !1) => {
o.identitylinks.length > 0 || o.comments.length > 0 && o.comments.forEach((c) => {
m && c.type === "启动流程" || n.push({
id: w(),
nodeName: o.userTaskName,
personName: c.authorName,
time: c.time,
content: c.type,
comment: c.fullMessage
});
});
};
e.nerve.self.evt.on("mounted", () => {
var o;
e.data && ((o = e.data.usertasks) == null || o.forEach((n) => {
if (n.usertasks && n.usertasks.length > 0) {
const m = [];
n.usertasks.forEach((c) => {
l(c, m, !0);
}), r.value.push({
id: w(),
nodeName: `${n.userTaskName}`,
personName: "",
time: "",
content: "",
comment: "",
children: m,
_showChildren: !0
});
} else
l(n, r.value);
}), r.value.sort((n, m) => Date.parse(n.time) - Date.parse(m.time)));
});
const i = d([{
title: "处理环节",
key: "nodeName",
width: 180,
resizable: !0,
tree: !0
}, {
title: "处理人",
key: "personName",
width: 180,
resizable: !0
}, {
title: "处理时间",
key: "time",
width: 180,
resizable: !0
}, {
title: "处理内容",
key: "content",
width: 180,
resizable: !0
}, {
title: "处理意见",
key: "comment"
}]);
return {
c: e,
ns: a,
gridData: r,
columns: i
};
},
render() {
return h("div", {
class: this.ns.b()
}, [h("div", {
class: this.ns.e("title")
}, ["审批信息"]), h("i-table", {
attrs: {
"disabled-hover": !0,
columns: this.columns,
data: this.gridData,
"row-key": "id"
},
class: this.ns.e("grid")
})]);
}
});
class D extends C {
async calcWfToolbar() {
await super.calcWfToolbar(), this.isEditable && this.wfLinks.unshift({
sequenceFlowName: "保存",
type: "FORM_SAVE"
});
}
async onLinkClick(s) {
s.type === "FORM_SAVE" ? await this.save() : super.onLinkClick(s);
}
}
const x = b({
props: {
context: Object,
params: {
type: Object
},
modelPath: {
type: String,
required: !0
},
modal: {
type: Object
}
},
setup(t) {
const {
proxy: s
} = y(), e = P(s, (i, o) => new D(t.modelPath, i, o)), a = p(`view-${V.DE_WF_DYNA_EDIT_VIEW3}`.toLowerCase()), r = d(["mainForm"]);
return {
c: e,
ns: a,
onTabClick: (i) => {
r.value.includes(i) || r.value.push(i);
},
lazyList: r
};
},
render(t) {
const s = [];
if (this.c.complete) {
const {
activeForm: e
} = this.c;
e && this.c.providers[e.name] && s.push(t(this.c.providers[e.name].component, {
props: {
modelData: e,
context: this.c.context,
params: this.c.params
},
style: {
height: "auto"
},
on: {
neuronInit: this.c.nerve.onNeuronInit("form")
}
}));
}
if (this.c.complete && this.c.model.drTab.pages[0]) {
const e = this.c.model.drTab.pages[0], a = this.c.drPages[e.source.name];
s.push(t(T, {
attrs: {
context: a.context,
params: a.params,
deName: this.c.model.appEntity.source.codeName,
modal: this.modal,
modelPath: e.embedView.source.modelPath
}
}));
}
return t("view-base", {
attrs: {
controller: this.c
},
scopedSlots: {
toolbar: () => this.c.complete ? [this.c.wfLinks.length > 0 && t("wf-toolbar", {
attrs: {
wfLinks: this.c.wfLinks
},
on: {
"wf-link-click": (e) => {
this.c.onLinkClick(e);
}
}
})] : null
}
}, [this.c.complete && t("i-tabs", {
class: [this.ns.be("", "tab")],
attrs: {
name: this.c.model.drTab.source.name
},
on: {
"on-click": this.onTabClick
}
}, [t("i-tab-pane", {
class: this.ns.be("", "tab-item"),
attrs: {
tab: this.c.model.drTab.source.name,
label: this.c.model.drTab.source.editItemCaption,
name: "mainForm"
}
}, [s]), this.c.model.drTab.pages.map((e) => {
const a = this.c.drPages[e.source.name];
return t("i-tab-pane", {
class: this.ns.be("", "tab-item"),
attrs: {
tab: this.c.model.drTab.source.name,
disabled: this.c.isNewData,
label: e.source.caption,
name: e.source.name
}
}, [!this.c.isNewData && this.lazyList.includes(e.source.name) && t("ViewShell", {
attrs: {
context: a.context,
params: a.params,
modal: {
mode: f.EMBED
},
modelPath: e.embedView.source.modelPath,
// 流程跟踪视图用
deName: this.c.model.appEntity.source.codeName
},
on: {
neuronInit: this.c.nerve.onNeuronInit(e.source.name)
},
key: a.key
})]);
})])]);
}
});
class F {
constructor() {
u(this, "component", x);
}
}
const I = b({
name: "SyEditView3",
props: {
context: Object,
params: {
type: Object
},
modelPath: {
type: String,
required: !0
},
modal: {
type: Object
}
},
setup(t) {
const {
proxy: s
} = y(), e = S(s, t.modelPath), a = p("view-deeditview3"), r = d(["mainForm"]);
return {
c: e,
ns: a,
onTabClick: (i) => {
r.value.includes(i) || r.value.push(i);
},
lazyList: r
};
},
render(t) {
return t("view-base", {
attrs: {
controller: this.c
}
}, [this.c.complete && t("i-tabs", {
class: [this.ns.be("", "tab")],
attrs: {
name: this.c.model.drTab.source.name
},
on: {
"on-click": this.onTabClick
}
}, [t("i-tab-pane", {
class: this.ns.be("", "tab-item"),
attrs: {
tab: this.c.model.drTab.source.name,
label: this.c.model.drTab.source.editItemCaption,
name: "mainForm"
}
}, [t("edit-form-control", {
attrs: {
modelData: this.c.model.form,
context: this.c.context,
params: this.c.params
},
style: {
height: "auto"
},
on: {
neuronInit: this.c.nerve.onNeuronInit(this.c.model.form.source.name)
}
}), t(T, {
attrs: {
context: this.c.drPages[this.c.model.drTab.pages[0].source.name].context,
params: this.c.drPages[this.c.model.drTab.pages[0].source.name].params,
deName: this.c.model.appEntity.source.codeName,
modal: this.modal,
modelPath: this.c.model.drTab.pages[0].embedView.source.modelPath
}
})]), this.c.model.drTab.pages.map((s) => {
const e = this.c.drPages[s.source.name];
if (e)
return t("i-tab-pane", {
class: this.ns.be("", "tab-item"),
attrs: {
tab: this.c.model.drTab.source.name,
disabled: this.c.isNewData,
label: s.source.caption,
name: s.source.name
}
}, [!this.c.isNewData && this.lazyList.includes(s.source.name) && t("ViewShell", {
attrs: {
context: e.context,
params: e.params,
modal: {
mode: f.EMBED
},
modelPath: s.embedView.source.modelPath,
// 流程跟踪视图用
deName: this.c.model.appEntity.source.codeName
},
on: {
neuronInit: this.c.nerve.onNeuronInit(s.source.name)
},
key: e.key
})]);
})])]);
}
});
class W {
constructor() {
u(this, "component", I);
}
}
const O = new v(import.meta.url), A = {
mateUrl: import.meta.url,
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
install(t) {
O.loadStyle(["/style.css"]), ibiz.register.view.register(
"VIEW_CUSTOM_SyWfDynaEditView3",
new F()
), ibiz.register.view.register(
"VIEW_CUSTOM_SyEditView3",
new W()
);
}
};
export {
A as default
};
@charset "UTF-8";.ibiz-wf-step-trace-grid{padding-bottom:1px;margin:0 var(--ibiz-margin) var(--ibiz-margin) var(--ibiz-margin);background-color:var(--ibiz-bg-color-overlay);border-radius:var(--ibiz-border-radius-base)}.ibiz-wf-step-trace-grid__title{padding:10px 16px;font-size:var(--ibiz-font-size-medium);border-bottom:1px solid var(--ibiz-border-color)}.ibiz-wf-step-trace-grid__grid{margin:var(--ibiz-padding)}.app{width:100vw;height:100vh;--ibiz-text-color-readonly: #888;--sy-embed-header-padding: 10px 16px}.app .ibiz-layout{position:relative;margin:auto;--ibiz-layout-width: 1280px}.app .ibiz-app-user{pointer-events:none}.ibiz-form .ibiz-span{color:var(--ibiz-text-color-readonly)}.ibiz-form .ibiz-form-group-header,.ibiz-view-layout--embed .ibiz-view-layout-header{padding:var(--sy-embed-header-padding)}
{
"name": "@ibiz-template-plugin/sy-ty",
"version": "0.0.1-beta.1",
"description": "ibiz full-dynamic-vue 苏研通用",
"author": "chitanda",
"license": "MIT",
"type": "module",
"main": "dist/ibiz-template-plugin.es.js",
"module": "dist/ibiz-template-plugin.es.js",
"types": "dist/types/index.d.ts",
"system": "dist/index.legacy.js",
"files": [
"dist",
"src",
"CHANGELOG.md",
"README.md"
],
"scripts": {
"dev": "vite build --watch",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"publish:next": "npm run build && npm publish --access public --tag next",
"publish:npm": "npm run build && npm publish --access public"
},
"dependencies": {
"@ibiz-template/command": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.73",
"@ibiz-template/core": "^0.0.1-beta.73",
"@ibiz-template/model": "^0.0.1-beta.73",
"@ibiz-template/runtime": "^0.0.1-beta.73",
"@ibiz-template/service": "^0.0.1-beta.73",
"@ibiz-template/theme": "^0.0.1-beta.73",
"@ibiz-template/vue-util": "^0.0.1-beta.73",
"async-validator": "^4.2.5",
"axios": "^1.1.3",
"core-js": "3",
"dayjs": "^1.11.6",
"js-base64": "^3.7.4",
"lodash-es": "^4.17.21",
"pluralize": "^8.0.0",
"qs": "^6.11.0",
"qx-util": "^0.4.8",
"ramda": "^0.28.0",
"view-design": "^4.7.0",
"vue": "^2.7.14",
"vue-router": "^3.6.5"
},
"peerDependencies": {
"@ibiz-template/command": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.59",
"@ibiz-template/core": "^0.0.1-beta.57",
"@ibiz-template/model": "^0.0.1-beta.59",
"@ibiz-template/runtime": "^0.0.1-beta.59",
"@ibiz-template/service": "^0.0.1-beta.59",
"@ibiz-template/theme": "^0.0.1-beta.59",
"@ibiz-template/vue-util": "^0.0.1-beta.59",
"async-validator": "^4.2.5",
"axios": "^1.1.3",
"core-js": "3",
"dayjs": "^1.11.6",
"lodash-es": "^4.17.21",
"pluralize": "^8.0.0",
"qs": "^6.11.0",
"qx-util": "^0.4.8",
"ramda": "^0.28.0",
"view-design": "^4.7.0",
"vue": "^2.7.14",
"vue-router": "^3.6.5"
},
"devDependencies": {
"@commitlint/cli": "^17.2.0",
"@commitlint/config-conventional": "^17.2.0",
"@qx-chitanda/vite-plugin-lib-legacy": "^4.1.0",
"@types/lodash-es": "^4.17.7",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"@vitejs/plugin-vue2": "^2.2.0",
"@vitejs/plugin-vue2-jsx": "^1.1.0",
"eslint": "^8.27.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.7.0",
"husky": "^8.0.2",
"lint-staged": "^13.0.3",
"postcss": "^8.4.19",
"prettier": "^2.7.1",
"rollup-plugin-visualizer": "^5.8.3",
"sass": "^1.56.1",
"stylelint": "^14.15.0",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-recess-order": "^3.0.0",
"stylelint-config-standard": "^29.0.0",
"stylelint-config-standard-scss": "^6.1.0",
"stylelint-scss": "^4.3.0",
"terser": "^5.15.1",
"typescript": "^4.9.3",
"vite": "^4.2.1",
"vite-plugin-dts": "^1.7.1",
"vite-plugin-eslint": "^1.8.1",
"vue-eslint-parser": "^9.1.0",
"vue-tsc": "^1.0.9"
},
"lint-staged": {
"*.{ts,vue}": "eslint --fix",
"*.less": "stylelint --syntax=scss"
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册