formContent.js
2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import req from '@/utils/request.js'
const bpmRumtime = window.context.bpmRunTime
const form = window.context.form
export default {
//根据taskId查找任务表单数据
taskDetail(data, cb) {
if (data.taskId) {
req
.get(
bpmRumtime +
`/runtime/task/v1/taskMobileDetail?taskId=` +
data.taskId +
'&reqParams=&leaderId=' +
data.leaderId
)
.then((response) => {
cb(response.data)
})
} else {
req
.get(
bpmRumtime +
`/runtime/task/v1/taskMobileDetail?taskId=` +
data +
'&reqParams='
)
.then((response) => {
cb(response.data)
})
}
},
//根据isntId查找表单数据andBo
getInstFormAndBO(data, cb) {
var urlParam = ''
if ('request' == data.type) {
urlParam += '&myApplication=true'
}
if (data.instId) {
req
.get(
bpmRumtime +
`/runtime/instance/v1/getMobileInstFormAndBO?proInstId=` +
data.instId +
'&nodeId=' +
(data.nodeId || '') +
'&includData=' +
(data.includData || false) +
'&getStartForm=' +
(data.getStartForm || false) +
urlParam
)
.then((response) => {
cb(response.data)
})
} else {
req
.get(
bpmRumtime +
`/runtime/instance/v1/getMobileInstFormAndBO?proInstId=` +
data +
'&nodeId=&includData=true'
)
.then((response) => {
cb(response.data)
})
}
},
//流程启动时获取bo和表单
getFormAndBO(data, cb) {
req
.post(bpmRumtime + '/runtime/instance/v1/getMobileFormAndBO', data)
.then((response) => {
cb(response.data)
})
},
//后台管理预览VUE表单
previewDesignVue(id, cb) {
req
.get(form + '/form/form/v1/previewDesignVue?formId=' + id)
.then((response) => {
cb(response)
})
},
//后台管理临时预览VUE表单(未保存)
previewDesignTemp(id, cb) {
req
.get(form + '/form/form/v1/previewDesignTemp?cacheId=' + id)
.then((response) => {
cb(response)
})
},
//获取表单明显
preview(id, cb) {
req.get(form + '/form/form/v1/getFormById?id=' + id).then((response) => {
cb(response)
})
},
}