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 CHANGED
@@ -1,81 +1,81 @@
1
- import { defineComponent as y, ref as c, watch as k, resolveComponent as P, openBlock as w, createBlock as x, withCtx as C, createTextVNode as b } from "vue";
2
- import { ElMessage as A } from "element-plus";
3
- const T = (s) => ({
4
- getApprovalDetail: async (o) => await s.get({
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: o
7
+ processInstanceId: t
8
8
  }
9
9
  })
10
- }), B = (s) => ({
11
- getTaskListByProcessInstanceId: async (o) => await s.get({
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: o
14
+ processInstanceId: t
15
15
  }
16
16
  })
17
- }), D = /* @__PURE__ */ y({
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 o = useMessage(), n = s, r = c(!1), i = c({}), l = c({}), u = c(""), m = c([]), p = c(""), _ = T(n.request), v = B(n.request), f = (t) => {
25
- p.value = t, g(), d();
26
- }, g = async () => {
27
- var t, a;
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
- r.value = !0;
30
- const e = await _.getApprovalDetail(p.value);
29
+ c.value = !0;
30
+ const e = await _.getApprovalDetail(r.value);
31
31
  if (!e) {
32
- o.error("查询不到审批详情信息!");
32
+ l.error("查询不到审批详情信息!");
33
33
  return;
34
34
  }
35
35
  if (!e.processDefinition || !e.processInstance) {
36
- o.error("查询不到流程信息!");
36
+ l.error("查询不到流程信息!");
37
37
  return;
38
38
  }
39
- i.value = e == null ? void 0 : e.processInstance, u.value = (a = (t = e == null ? void 0 : e.processInstance) == null ? void 0 : t.formVariables) == null ? void 0 : a.applicationPrefix, l.value = e == null ? void 0 : e.todoTask;
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
- r.value = !1;
41
+ c.value = !1;
42
42
  }
43
- }, d = async () => {
44
- m.value = await v.getTaskListByProcessInstanceId(p.value);
43
+ }, g = async () => {
44
+ m.value = await f.getTaskListByProcessInstanceId(r.value);
45
45
  };
46
46
  k(
47
- () => n.processInstanceId,
48
- (t) => {
47
+ () => t.processInstanceId,
48
+ (o) => {
49
49
  debugger;
50
- t && t !== p.value && f(t);
50
+ o && o !== r.value && v(o);
51
51
  },
52
52
  { immediate: !0, deep: !0 }
53
53
  );
54
54
  const I = () => {
55
- A.success("aaa!");
55
+ l.success("aaa!");
56
56
  };
57
- return (t, a) => {
58
- const e = P("el-button");
59
- return w(), x(e, { onClick: I }, {
60
- default: C(() => [...a[0] || (a[0] = [
61
- b("测试按钮2", -1)
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 F = (s, o) => {
69
- const n = s.__vccOpts || s;
70
- for (const [r, i] of o)
71
- n[r] = i;
72
- return n;
73
- }, L = /* @__PURE__ */ F(D, [["__scopeId", "data-v-c412a081"]]), h = {
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", L);
75
+ s.component("CmcProcessFlow", F);
76
76
  }
77
77
  };
78
78
  export {
79
- L as CmcProcessFlow,
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,f){"use strict";const d=t=>({getApprovalDetail:async c=>await t.get({url:"/system/bpm/process-instance/get-approval-detail",params:{processInstanceId:c}})}),m=t=>({getTaskListByProcessInstanceId:async c=>await t.get({url:"/system/bpm/task/list-by-process-instance-id",params:{processInstanceId:c}})}),_=e.defineComponent({__name:"CmcProcessFlow",props:{processInstanceId:{},request:{}},setup(t){const c=useMessage(),r=t,i=e.ref(!1),l=e.ref({}),y=e.ref({}),I=e.ref(""),k=e.ref([]),p=e.ref(""),v=d(r.request),P=m(r.request),b=o=>{p.value=o,C(),T()},C=async()=>{var o,a;try{i.value=!0;const s=await v.getApprovalDetail(p.value);if(!s){c.error("查询不到审批详情信息!");return}if(!s.processDefinition||!s.processInstance){c.error("查询不到流程信息!");return}l.value=s==null?void 0:s.processInstance,I.value=(a=(o=s==null?void 0:s.processInstance)==null?void 0:o.formVariables)==null?void 0:a.applicationPrefix,y.value=s==null?void 0:s.todoTask}finally{i.value=!1}},T=async()=>{k.value=await P.getTaskListByProcessInstanceId(p.value)};e.watch(()=>r.processInstanceId,o=>{debugger;o&&o!==p.value&&b(o)},{immediate:!0,deep:!0});const w=()=>{f.ElMessage.success("aaa!")};return(o,a)=>{const s=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(s,{onClick:w},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("测试按钮2",-1)])]),_:1})}}}),x="",u=((t,c)=>{const r=t.__vccOpts||t;for(const[i,l]of c)r[i]=l;return r})(_,[["__scopeId","data-v-c412a081"]]),g={install(t){t.component("CmcProcessFlow",u)}};n.CmcProcessFlow=u,n.default=g,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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-c412a081]{height:100%;box-sizing:border-box}.process-container[data-v-c412a081]>.el-card__body{height:100%;padding-bottom:0}.process-container[data-v-c412a081]>.el-card__body>div{height:100%;display:flex;flex-direction:column}.approval-actions[data-v-c412a081]{margin:20px 0}.approval-actions .action-buttons[data-v-c412a081]{display:flex;flex-direction:column;gap:12px}.approval-actions .action-buttons .basic-actions[data-v-c412a081]{display:flex;gap:12px}.approval-actions .action-buttons .extended-actions[data-v-c412a081]{display:flex;gap:12px;flex-wrap:wrap}.approval-dialogs[data-v-c412a081]{display:contents}
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nbb-component-ui",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "main": "./dist/index.umd.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",
@@ -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
- message.error('查询不到审批详情信息!')
53
+ ElMessage.error('查询不到审批详情信息!')
54
54
  return
55
55
  }
56
56
  if (!data.processDefinition || !data.processInstance) {
57
- message.error('查询不到流程信息!')
57
+ ElMessage.error('查询不到流程信息!')
58
58
  return
59
59
  }
60
60
  processInstance.value = data?.processInstance