nbb-component-ui 1.3.1 → 1.3.2
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 +38 -38
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/ProcessFlow/src/CmcProcessFlow.vue +4 -4
package/dist/index.es.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { defineComponent as y, ref as
|
|
2
|
-
import { ElMessage as
|
|
3
|
-
const
|
|
4
|
-
getApprovalDetail: async (
|
|
1
|
+
import { defineComponent as y, ref as n, watch as k, resolveComponent as b, openBlock as P, createBlock as w, withCtx as x, createTextVNode as C } from "vue";
|
|
2
|
+
import { ElMessage as l } from "element-plus";
|
|
3
|
+
const A = (s) => ({
|
|
4
|
+
getApprovalDetail: async (t) => await s.get({
|
|
5
5
|
url: "/system/bpm/process-instance/get-approval-detail",
|
|
6
6
|
params: {
|
|
7
|
-
processInstanceId:
|
|
7
|
+
processInstanceId: t
|
|
8
8
|
}
|
|
9
9
|
})
|
|
10
|
-
}),
|
|
11
|
-
getTaskListByProcessInstanceId: async (
|
|
10
|
+
}), T = (s) => ({
|
|
11
|
+
getTaskListByProcessInstanceId: async (t) => await s.get({
|
|
12
12
|
url: "/system/bpm/task/list-by-process-instance-id",
|
|
13
13
|
params: {
|
|
14
|
-
processInstanceId:
|
|
14
|
+
processInstanceId: t
|
|
15
15
|
}
|
|
16
16
|
})
|
|
17
|
-
}),
|
|
17
|
+
}), B = /* @__PURE__ */ y({
|
|
18
18
|
__name: "CmcProcessFlow",
|
|
19
19
|
props: {
|
|
20
20
|
processInstanceId: {},
|
|
21
21
|
request: {}
|
|
22
22
|
},
|
|
23
23
|
setup(s) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
var
|
|
24
|
+
const t = s, c = n(!1), p = n({}), i = n({}), u = n(""), m = n([]), r = n(""), _ = A(t.request), f = T(t.request), v = (o) => {
|
|
25
|
+
r.value = o, d(), g();
|
|
26
|
+
}, d = async () => {
|
|
27
|
+
var o, a;
|
|
28
28
|
try {
|
|
29
|
-
|
|
30
|
-
const e = await _.getApprovalDetail(
|
|
29
|
+
c.value = !0;
|
|
30
|
+
const e = await _.getApprovalDetail(r.value);
|
|
31
31
|
if (!e) {
|
|
32
|
-
|
|
32
|
+
l.error("查询不到审批详情信息!");
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
if (!e.processDefinition || !e.processInstance) {
|
|
36
|
-
|
|
36
|
+
l.error("查询不到流程信息!");
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
p.value = e == null ? void 0 : e.processInstance, u.value = (a = (o = e == null ? void 0 : e.processInstance) == null ? void 0 : o.formVariables) == null ? void 0 : a.applicationPrefix, i.value = e == null ? void 0 : e.todoTask;
|
|
40
40
|
} finally {
|
|
41
|
-
|
|
41
|
+
c.value = !1;
|
|
42
42
|
}
|
|
43
|
-
},
|
|
44
|
-
m.value = await
|
|
43
|
+
}, g = async () => {
|
|
44
|
+
m.value = await f.getTaskListByProcessInstanceId(r.value);
|
|
45
45
|
};
|
|
46
46
|
k(
|
|
47
|
-
() =>
|
|
48
|
-
(
|
|
47
|
+
() => t.processInstanceId,
|
|
48
|
+
(o) => {
|
|
49
49
|
debugger;
|
|
50
|
-
|
|
50
|
+
o && o !== r.value && v(o);
|
|
51
51
|
},
|
|
52
52
|
{ immediate: !0, deep: !0 }
|
|
53
53
|
);
|
|
54
54
|
const I = () => {
|
|
55
|
-
|
|
55
|
+
l.success("aaa!");
|
|
56
56
|
};
|
|
57
|
-
return (
|
|
58
|
-
const e =
|
|
59
|
-
return
|
|
60
|
-
default:
|
|
61
|
-
|
|
57
|
+
return (o, a) => {
|
|
58
|
+
const e = b("el-button");
|
|
59
|
+
return P(), w(e, { onClick: I }, {
|
|
60
|
+
default: x(() => [...a[0] || (a[0] = [
|
|
61
|
+
C("测试按钮2", -1)
|
|
62
62
|
])]),
|
|
63
63
|
_: 1
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
for (const [
|
|
71
|
-
|
|
72
|
-
return
|
|
73
|
-
},
|
|
68
|
+
const D = (s, t) => {
|
|
69
|
+
const c = s.__vccOpts || s;
|
|
70
|
+
for (const [p, i] of t)
|
|
71
|
+
c[p] = i;
|
|
72
|
+
return c;
|
|
73
|
+
}, F = /* @__PURE__ */ D(B, [["__scopeId", "data-v-72e65f2b"]]), h = {
|
|
74
74
|
install(s) {
|
|
75
|
-
s.component("CmcProcessFlow",
|
|
75
|
+
s.component("CmcProcessFlow", F);
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
export {
|
|
79
|
-
|
|
79
|
+
F as CmcProcessFlow,
|
|
80
80
|
h as default
|
|
81
81
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,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):(n=typeof globalThis<"u"?globalThis:n||self,e(n.NbbComponentUi={},n.Vue,n.ElementPlus))})(this,function(n,e,
|
|
1
|
+
(function(n,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):(n=typeof globalThis<"u"?globalThis:n||self,e(n.NbbComponentUi={},n.Vue,n.ElementPlus))})(this,function(n,e,p){"use strict";const d=t=>({getApprovalDetail:async o=>await t.get({url:"/system/bpm/process-instance/get-approval-detail",params:{processInstanceId:o}})}),_=t=>({getTaskListByProcessInstanceId:async o=>await t.get({url:"/system/bpm/task/list-by-process-instance-id",params:{processInstanceId:o}})}),m=e.defineComponent({__name:"CmcProcessFlow",props:{processInstanceId:{},request:{}},setup(t){const o=t,r=e.ref(!1),l=e.ref({}),u=e.ref({}),y=e.ref(""),I=e.ref([]),i=e.ref(""),k=d(o.request),b=_(o.request),v=c=>{i.value=c,C(),P()},C=async()=>{var c,a;try{r.value=!0;const s=await k.getApprovalDetail(i.value);if(!s){p.ElMessage.error("查询不到审批详情信息!");return}if(!s.processDefinition||!s.processInstance){p.ElMessage.error("查询不到流程信息!");return}l.value=s==null?void 0:s.processInstance,y.value=(a=(c=s==null?void 0:s.processInstance)==null?void 0:c.formVariables)==null?void 0:a.applicationPrefix,u.value=s==null?void 0:s.todoTask}finally{r.value=!1}},P=async()=>{I.value=await b.getTaskListByProcessInstanceId(i.value)};e.watch(()=>o.processInstanceId,c=>{debugger;c&&c!==i.value&&v(c)},{immediate:!0,deep:!0});const T=()=>{p.ElMessage.success("aaa!")};return(c,a)=>{const s=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(s,{onClick:T},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("测试按钮2",-1)])]),_:1})}}}),w="",f=((t,o)=>{const r=t.__vccOpts||t;for(const[l,u]of o)r[l]=u;return r})(m,[["__scopeId","data-v-72e65f2b"]]),g={install(t){t.component("CmcProcessFlow",f)}};n.CmcProcessFlow=f,n.default=g,Object.defineProperties(n,{__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-72e65f2b]{height:100%;box-sizing:border-box}.process-container[data-v-72e65f2b]>.el-card__body{height:100%;padding-bottom:0}.process-container[data-v-72e65f2b]>.el-card__body>div{height:100%;display:flex;flex-direction:column}.approval-actions[data-v-72e65f2b]{margin:20px 0}.approval-actions .action-buttons[data-v-72e65f2b]{display:flex;flex-direction:column;gap:12px}.approval-actions .action-buttons .basic-actions[data-v-72e65f2b]{display:flex;gap:12px}.approval-actions .action-buttons .extended-actions[data-v-72e65f2b]{display:flex;gap:12px;flex-wrap:wrap}.approval-dialogs[data-v-72e65f2b]{display:contents}
|
package/package.json
CHANGED
|
@@ -16,8 +16,8 @@ import {createTaskApi} from "@/api/task";
|
|
|
16
16
|
|
|
17
17
|
// import ProcessInstanceTaskList from './CmcFlowList.vue'
|
|
18
18
|
|
|
19
|
-
// @ts-expect-error 运行时由宿主应用提供
|
|
20
|
-
const message = useMessage() // 消息弹窗
|
|
19
|
+
// // @ts-expect-error 运行时由宿主应用提供
|
|
20
|
+
// const message = useMessage() // 消息弹窗
|
|
21
21
|
|
|
22
22
|
const props = defineProps<{
|
|
23
23
|
processInstanceId: string
|
|
@@ -50,11 +50,11 @@ const getApprovalDetail = async () => {
|
|
|
50
50
|
processInstanceLoading.value = true
|
|
51
51
|
const data = await processInstanceApi.getApprovalDetail(id.value)
|
|
52
52
|
if (!data) {
|
|
53
|
-
|
|
53
|
+
ElMessage.error('查询不到审批详情信息!')
|
|
54
54
|
return
|
|
55
55
|
}
|
|
56
56
|
if (!data.processDefinition || !data.processInstance) {
|
|
57
|
-
|
|
57
|
+
ElMessage.error('查询不到流程信息!')
|
|
58
58
|
return
|
|
59
59
|
}
|
|
60
60
|
processInstance.value = data?.processInstance
|