nbb-component-ui 1.0.9 → 1.1.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/index.ts +1 -1
- package/package.json +1 -1
- package/src/ProcessFlow/src/ProcessFlow.vue +30 -0
- package/src/api/processInstance.ts +12 -0
- package/tsconfig.json +4 -1
- package/vite.config.js +6 -0
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -4,10 +4,40 @@
|
|
|
4
4
|
|
|
5
5
|
<script setup lang="ts">
|
|
6
6
|
import { ElMessage } from 'element-plus'
|
|
7
|
+
import {ref, watch} from "vue";
|
|
8
|
+
import {createProcessInstanceApi} from "@/api/processInstance";
|
|
9
|
+
|
|
10
|
+
const props = defineProps<{
|
|
11
|
+
processInstanceId: string
|
|
12
|
+
request: any
|
|
13
|
+
}>()
|
|
14
|
+
|
|
15
|
+
const id = ref<string>('')
|
|
16
|
+
const processInstanceApi = createProcessInstanceApi(props.request)
|
|
17
|
+
|
|
7
18
|
|
|
8
19
|
const open = () => {
|
|
9
20
|
ElMessage.success('Hello World!')
|
|
10
21
|
}
|
|
22
|
+
|
|
23
|
+
const init = (processInstanceId: string) => {
|
|
24
|
+
id.value = processInstanceId
|
|
25
|
+
processInstanceApi.processInstanceId(processInstanceId)
|
|
26
|
+
.then((res: any) => {
|
|
27
|
+
console.log(res)
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
watch(
|
|
33
|
+
() => props.processInstanceId,
|
|
34
|
+
(newValue) => {
|
|
35
|
+
if (newValue && newValue !== id.value) {
|
|
36
|
+
init(newValue)
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{ immediate: true, deep: true }
|
|
40
|
+
)
|
|
11
41
|
</script>
|
|
12
42
|
|
|
13
43
|
<style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const createProcessInstanceApi = (request: any) => ({
|
|
2
|
+
getApprovalDetail: async (processInstanceId: any) => {
|
|
3
|
+
return await request.get({
|
|
4
|
+
url: `/system/bpm/process-instance/get-approval-detail`,
|
|
5
|
+
params: {
|
|
6
|
+
processInstanceId
|
|
7
|
+
}
|
|
8
|
+
})
|
|
9
|
+
}
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
|
package/tsconfig.json
CHANGED
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
"noUnusedParameters": true,
|
|
15
15
|
"skipLibCheck": true,
|
|
16
16
|
"declaration": true,
|
|
17
|
-
"declarationDir": "dist"
|
|
17
|
+
"declarationDir": "dist",
|
|
18
|
+
"paths": {
|
|
19
|
+
"@/*": ["src/*"]
|
|
20
|
+
}
|
|
18
21
|
},
|
|
19
22
|
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "index.ts"]
|
|
20
23
|
}
|
package/vite.config.js
CHANGED