nbb-component-ui 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +35 -35
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/ProcessFlow/src/CmcProcessFlow.vue +6 -4
- package/src/api/processInstance.ts +0 -13
package/dist/index.es.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { defineComponent as y, ref as n, watch as k, resolveComponent as w, openBlock as C, createBlock as b, withCtx as q, createTextVNode as x } from "vue";
|
|
2
|
-
import { ElMessage as
|
|
3
|
-
const
|
|
2
|
+
import { ElMessage as P } from "element-plus";
|
|
3
|
+
const T = (s) => i().get({
|
|
4
4
|
url: "/system/bpm/process-instance/get-approval-detail",
|
|
5
5
|
params: {
|
|
6
6
|
processInstanceId: s
|
|
7
7
|
}
|
|
8
|
-
}),
|
|
8
|
+
}), F = (s) => i().get({
|
|
9
9
|
url: "/system/bpm/task/list-by-process-instance-id",
|
|
10
10
|
params: {
|
|
11
11
|
processInstanceId: s
|
|
12
12
|
}
|
|
13
|
-
}),
|
|
13
|
+
}), h = /* @__PURE__ */ y({
|
|
14
14
|
__name: "CmcProcessFlow",
|
|
15
15
|
props: {
|
|
16
16
|
processInstanceId: {},
|
|
17
17
|
request: {}
|
|
18
18
|
},
|
|
19
19
|
setup(s) {
|
|
20
|
-
const t = s,
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
var o,
|
|
20
|
+
const t = useMessage(), c = s, a = n(!1), u = n({}), m = n({}), _ = n(""), f = n([]), l = n(""), g = (o) => {
|
|
21
|
+
l.value = o, v(), d();
|
|
22
|
+
}, v = async () => {
|
|
23
|
+
var o, r;
|
|
24
24
|
try {
|
|
25
|
-
|
|
26
|
-
const e = await
|
|
25
|
+
a.value = !0;
|
|
26
|
+
const e = await T(l.value);
|
|
27
27
|
if (!e) {
|
|
28
|
-
|
|
28
|
+
console.log("查询不到审批详情信息!"), t.error("查询不到审批详情信息!");
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
if (!e.processDefinition || !e.processInstance) {
|
|
32
|
-
|
|
32
|
+
console.log("查询不到流程信息!"), t.error("查询不到流程信息!");
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
u.value = e == null ? void 0 : e.processInstance, _.value = (r = (o = e == null ? void 0 : e.processInstance) == null ? void 0 : o.formVariables) == null ? void 0 : r.applicationPrefix, m.value = e == null ? void 0 : e.todoTask;
|
|
36
36
|
} finally {
|
|
37
|
-
|
|
37
|
+
a.value = !1;
|
|
38
38
|
}
|
|
39
39
|
}, d = async () => {
|
|
40
|
-
|
|
40
|
+
f.value = await F(l.value);
|
|
41
41
|
};
|
|
42
42
|
k(
|
|
43
|
-
() =>
|
|
43
|
+
() => c.processInstanceId,
|
|
44
44
|
(o) => {
|
|
45
|
-
o && o !==
|
|
45
|
+
o && o !== l.value && g(o);
|
|
46
46
|
},
|
|
47
47
|
{ immediate: !0, deep: !0 }
|
|
48
48
|
);
|
|
49
49
|
const I = () => {
|
|
50
|
-
|
|
50
|
+
P.success("aaa!");
|
|
51
51
|
};
|
|
52
|
-
return (o,
|
|
52
|
+
return (o, r) => {
|
|
53
53
|
const e = w("el-button");
|
|
54
54
|
return C(), b(e, { onClick: I }, {
|
|
55
|
-
default: q(() => [...
|
|
55
|
+
default: q(() => [...r[0] || (r[0] = [
|
|
56
56
|
x("测试按钮3", -1)
|
|
57
57
|
])]),
|
|
58
58
|
_: 1
|
|
@@ -60,27 +60,27 @@ const P = (s) => _().get({
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
for (const [
|
|
66
|
-
|
|
67
|
-
return
|
|
68
|
-
},
|
|
69
|
-
let
|
|
70
|
-
const
|
|
63
|
+
const B = (s, t) => {
|
|
64
|
+
const c = s.__vccOpts || s;
|
|
65
|
+
for (const [a, u] of t)
|
|
66
|
+
c[a] = u;
|
|
67
|
+
return c;
|
|
68
|
+
}, D = /* @__PURE__ */ B(h, [["__scopeId", "data-v-55a3d454"]]);
|
|
69
|
+
let p = null;
|
|
70
|
+
const A = {
|
|
71
71
|
install(s, t) {
|
|
72
72
|
if (console.log("插件install执行,options:", t), !(t != null && t.request))
|
|
73
73
|
throw new Error("请在 app.use(NbbComponentUi) 时传入 { request }");
|
|
74
|
-
|
|
74
|
+
p = t.request, s.component("CmcProcessFlow", D);
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
function
|
|
78
|
-
if (console.log("getRequest",
|
|
77
|
+
function i() {
|
|
78
|
+
if (console.log("getRequest", p), !p)
|
|
79
79
|
throw new Error("没有_request对象");
|
|
80
|
-
return
|
|
80
|
+
return p;
|
|
81
81
|
}
|
|
82
82
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
D as CmcProcessFlow,
|
|
84
|
+
A as default,
|
|
85
|
+
i as getRequest
|
|
86
86
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.NbbComponentUi={},t.Vue,t.ElementPlus))})(this,function(t,e,
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.NbbComponentUi={},t.Vue,t.ElementPlus))})(this,function(t,e,_){"use strict";const d=n=>p().get({url:"/system/bpm/process-instance/get-approval-detail",params:{processInstanceId:n}}),g=n=>p().get({url:"/system/bpm/task/list-by-process-instance-id",params:{processInstanceId:n}}),y=e.defineComponent({__name:"CmcProcessFlow",props:{processInstanceId:{},request:{}},setup(n){const o=useMessage(),a=n,i=e.ref(!1),f=e.ref({}),b=e.ref({}),q=e.ref(""),v=e.ref([]),u=e.ref(""),w=r=>{u.value=r,C(),k()},C=async()=>{var r,c;try{i.value=!0;const s=await d(u.value);if(!s){console.log("查询不到审批详情信息!"),o.error("查询不到审批详情信息!");return}if(!s.processDefinition||!s.processInstance){console.log("查询不到流程信息!"),o.error("查询不到流程信息!");return}f.value=s==null?void 0:s.processInstance,q.value=(c=(r=s==null?void 0:s.processInstance)==null?void 0:r.formVariables)==null?void 0:c.applicationPrefix,b.value=s==null?void 0:s.todoTask}finally{i.value=!1}},k=async()=>{v.value=await g(u.value)};e.watch(()=>a.processInstanceId,r=>{r&&r!==u.value&&w(r)},{immediate:!0,deep:!0});const P=()=>{_.ElMessage.success("aaa!")};return(r,c)=>{const s=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(s,{onClick:P},{default:e.withCtx(()=>[...c[0]||(c[0]=[e.createTextVNode("测试按钮3",-1)])]),_:1})}}}),x="",m=((n,o)=>{const a=n.__vccOpts||n;for(const[i,f]of o)a[i]=f;return a})(y,[["__scopeId","data-v-55a3d454"]]);let l=null;const I={install(n,o){if(console.log("插件install执行,options:",o),!(o!=null&&o.request))throw new Error("请在 app.use(NbbComponentUi) 时传入 { request }");l=o.request,n.component("CmcProcessFlow",m)}};function p(){if(console.log("getRequest",l),!l)throw new Error("没有_request对象");return l}t.CmcProcessFlow=m,t.default=I,t.getRequest=p,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.process-container[data-v-
|
|
1
|
+
@charset "UTF-8";.process-container[data-v-55a3d454]{height:100%;box-sizing:border-box}.process-container[data-v-55a3d454]>.el-card__body{height:100%;padding-bottom:0}.process-container[data-v-55a3d454]>.el-card__body>div{height:100%;display:flex;flex-direction:column}.approval-actions[data-v-55a3d454]{margin:20px 0}.approval-actions .action-buttons[data-v-55a3d454]{display:flex;flex-direction:column;gap:12px}.approval-actions .action-buttons .basic-actions[data-v-55a3d454]{display:flex;gap:12px}.approval-actions .action-buttons .extended-actions[data-v-55a3d454]{display:flex;gap:12px;flex-wrap:wrap}.approval-dialogs[data-v-55a3d454]{display:contents}
|
package/package.json
CHANGED
|
@@ -16,8 +16,8 @@ import * as taskApi from "@/api/task";
|
|
|
16
16
|
|
|
17
17
|
// import ProcessInstanceTaskList from './CmcFlowList.vue'
|
|
18
18
|
|
|
19
|
-
//
|
|
20
|
-
|
|
19
|
+
// @ts-expect-error 运行时由宿主应用提供
|
|
20
|
+
const message = useMessage() // 消息弹窗
|
|
21
21
|
|
|
22
22
|
const props = defineProps<{
|
|
23
23
|
processInstanceId: string
|
|
@@ -49,11 +49,13 @@ const getApprovalDetail = async () => {
|
|
|
49
49
|
|
|
50
50
|
const data = await processInstanceApi.getApprovalDetail(id.value)
|
|
51
51
|
if (!data) {
|
|
52
|
-
|
|
52
|
+
console.log('查询不到审批详情信息!')
|
|
53
|
+
message.error('查询不到审批详情信息!')
|
|
53
54
|
return
|
|
54
55
|
}
|
|
55
56
|
if (!data.processDefinition || !data.processInstance) {
|
|
56
|
-
|
|
57
|
+
console.log('查询不到流程信息!')
|
|
58
|
+
message.error('查询不到流程信息!')
|
|
57
59
|
return
|
|
58
60
|
}
|
|
59
61
|
processInstance.value = data?.processInstance
|
|
@@ -11,16 +11,3 @@ export const getApprovalDetail = (processInstanceId: string) => {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
// export const createProcessInstanceApi = (request: any) => ({
|
|
16
|
-
// getApprovalDetail: async (processInstanceId: any) => {
|
|
17
|
-
// return await request.get({
|
|
18
|
-
// url: `/system/bpm/process-instance/get-approval-detail`,
|
|
19
|
-
// params: {
|
|
20
|
-
// processInstanceId
|
|
21
|
-
// }
|
|
22
|
-
// })
|
|
23
|
-
// }
|
|
24
|
-
// })
|
|
25
|
-
|
|
26
|
-
|