af-mobile-client-vue3 1.5.85 → 1.5.86
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/package.json +1 -1
- package/src/components/core/MessageNotification/MessageNotification.vue +0 -1
- package/src/components/core/MessageNotification/webSocket.tsx +2 -1
- package/src/components/data/step/person-select.vue +168 -168
- package/src/stores/modules/step.ts +88 -88
- package/src/views/component/FilePreviewView/index.vue +31 -31
- package/src/views/component/StepView/index.vue +1 -1
package/package.json
CHANGED
|
@@ -28,7 +28,8 @@ export function initWebSocket(notify: string | null = null, sendCallback: (messa
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
// 初始化 WebSocket
|
|
31
|
-
|
|
31
|
+
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'
|
|
32
|
+
websocket = new WebSocket(`${protocol}${window.location.host}/socket/af-system/sendMessage?userId=${notifyId}:phone`)
|
|
32
33
|
|
|
33
34
|
// WebSocket 打开连接时触发
|
|
34
35
|
websocket.onopen = () => {
|
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
Field as VanField,
|
|
4
|
-
Picker as VanPicker,
|
|
5
|
-
Popup as VanPopup,
|
|
6
|
-
Search as VanSearch,
|
|
7
|
-
} from 'vant'
|
|
8
|
-
import { computed, inject, onMounted, ref } from 'vue'
|
|
9
|
-
|
|
10
|
-
const workflowHandleWrap: any = inject('workflowHandleWrap')
|
|
11
|
-
|
|
12
|
-
const showPicker = ref(false)
|
|
13
|
-
|
|
14
|
-
const showMultiplePicker = ref(false)
|
|
15
|
-
|
|
16
|
-
const branchChargePersons = ref({})
|
|
17
|
-
|
|
18
|
-
const isInit = ref(false)
|
|
19
|
-
|
|
20
|
-
// 用于 filterOption 的本地输入缓存(vant 不自带 filter)
|
|
21
|
-
const filterKeyword = ref('')
|
|
22
|
-
|
|
23
|
-
const customFieldName = {
|
|
24
|
-
text: 'label',
|
|
25
|
-
value: 'value',
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const selectedNode = ref(undefined)
|
|
29
|
-
|
|
30
|
-
const selectedOptions = computed(() => {
|
|
31
|
-
if (!selectedNode.value) {
|
|
32
|
-
return []
|
|
33
|
-
}
|
|
34
|
-
return filterOptions(selectedNode.value.chargePersonOptions)
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
onMounted(() => {
|
|
38
|
-
isInit.value = false
|
|
39
|
-
if (workflowHandleWrap.branchNodes.value) {
|
|
40
|
-
// 初始化初始值
|
|
41
|
-
for (const node of workflowHandleWrap.branchNodes.value) {
|
|
42
|
-
branchChargePersons.value[node.stepId] = {
|
|
43
|
-
handler: '',
|
|
44
|
-
handlerId: '',
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
isInit.value = true
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
function setBranchPersonValue(stepId, value, options, selectedOptions) {
|
|
52
|
-
if (!stepId)
|
|
53
|
-
return
|
|
54
|
-
if (!workflowHandleWrap.branchChargePersons.value) {
|
|
55
|
-
workflowHandleWrap.branchChargePersons.value = {}
|
|
56
|
-
}
|
|
57
|
-
if (!workflowHandleWrap.branchChargePersons.value[stepId]) {
|
|
58
|
-
workflowHandleWrap.branchChargePersons.value[stepId] = {}
|
|
59
|
-
}
|
|
60
|
-
if (workflowHandleWrap.branchChargePersons.value[stepId]) {
|
|
61
|
-
branchChargePersons.value[stepId] = {
|
|
62
|
-
handler: options.find(item => item.value === value)?.label,
|
|
63
|
-
handlerId: value,
|
|
64
|
-
}
|
|
65
|
-
Object.assign(workflowHandleWrap.branchChargePersons.value[stepId], branchChargePersons.value[stepId])
|
|
66
|
-
}
|
|
67
|
-
workflowHandleWrap.checkedNextStepPerson.value = selectedOptions[0].value
|
|
68
|
-
workflowHandleWrap.checkedNextStepPersonName.value = selectedOptions[0].label
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function getBranchSelectionLabel() {
|
|
72
|
-
if (workflowHandleWrap.needMultipleBranchSelection.value) {
|
|
73
|
-
return '分支处理人'
|
|
74
|
-
}
|
|
75
|
-
else if (workflowHandleWrap.calculatedTargetNode.value) {
|
|
76
|
-
return `${workflowHandleWrap.getStepNameByStepId(workflowHandleWrap.calculatedTargetNode.value)}处理人`
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
return '处理人'
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// vant 没有原生 filter-option,因此需要本地筛选
|
|
84
|
-
function filterOptions(options) {
|
|
85
|
-
if (!filterKeyword.value)
|
|
86
|
-
return options
|
|
87
|
-
return options.filter(option => option.label.toLowerCase().includes(filterKeyword.value.toLowerCase()))
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// 搜索回调函数
|
|
91
|
-
function search(val: string) {
|
|
92
|
-
filterKeyword.value = val || ''
|
|
93
|
-
}
|
|
94
|
-
</script>
|
|
95
|
-
|
|
96
|
-
<template>
|
|
97
|
-
<div v-if="workflowHandleWrap.isNeedSelectPerson.value && isInit">
|
|
98
|
-
<!-- 多分支选择 -->
|
|
99
|
-
<template v-if="workflowHandleWrap.needMultipleBranchSelection.value && workflowHandleWrap.branchNodes.value.length > 0">
|
|
100
|
-
<template v-for="node in workflowHandleWrap.branchNodes.value" :key="node.stepId">
|
|
101
|
-
<VanField
|
|
102
|
-
v-model="branchChargePersons[node.stepId].handler"
|
|
103
|
-
:label="`${node.stepName}处理人`"
|
|
104
|
-
is-link
|
|
105
|
-
clickable
|
|
106
|
-
required
|
|
107
|
-
placeholder="请选择处理人"
|
|
108
|
-
@click="selectedNode = node; showMultiplePicker = true;"
|
|
109
|
-
/>
|
|
110
|
-
</template>
|
|
111
|
-
<VanPopup v-model:show="showMultiplePicker" position="bottom">
|
|
112
|
-
<!-- 搜索框 -->
|
|
113
|
-
<VanSearch
|
|
114
|
-
v-model="filterKeyword"
|
|
115
|
-
placeholder="搜索"
|
|
116
|
-
@clear="() => search('')"
|
|
117
|
-
@update:model-value="search"
|
|
118
|
-
/>
|
|
119
|
-
<VanPicker
|
|
120
|
-
:columns="selectedOptions"
|
|
121
|
-
:columns-field-names="customFieldName"
|
|
122
|
-
value-key="label"
|
|
123
|
-
@confirm="(val) => {
|
|
124
|
-
setBranchPersonValue(selectedNode.stepId, val.selectedValues[0], selectedNode.chargePersonOptions, val.selectedOptions)
|
|
125
|
-
showMultiplePicker = false;
|
|
126
|
-
}"
|
|
127
|
-
@cancel="showMultiplePicker = false;"
|
|
128
|
-
/>
|
|
129
|
-
</VanPopup>
|
|
130
|
-
</template>
|
|
131
|
-
|
|
132
|
-
<!-- 单分支选择 -->
|
|
133
|
-
<template v-else>
|
|
134
|
-
<VanField
|
|
135
|
-
v-model="workflowHandleWrap.checkedNextStepPersonName.value"
|
|
136
|
-
:label="getBranchSelectionLabel()"
|
|
137
|
-
label-width="auto"
|
|
138
|
-
is-link
|
|
139
|
-
clickable
|
|
140
|
-
required
|
|
141
|
-
placeholder="请选择处理人"
|
|
142
|
-
@click="showPicker = true"
|
|
143
|
-
/>
|
|
144
|
-
<VanPopup v-model:show="showPicker" position="bottom">
|
|
145
|
-
<!-- 搜索框 -->
|
|
146
|
-
<VanSearch
|
|
147
|
-
v-model="filterKeyword"
|
|
148
|
-
placeholder="搜索"
|
|
149
|
-
@clear="() => search('')"
|
|
150
|
-
@update:model-value="search"
|
|
151
|
-
/>
|
|
152
|
-
<VanPicker
|
|
153
|
-
:columns="filterOptions(workflowHandleWrap.nextStepPersonOptions.value)"
|
|
154
|
-
:columns-field-names="customFieldName"
|
|
155
|
-
@confirm="(val) => {
|
|
156
|
-
setBranchPersonValue(workflowHandleWrap.calculatedTargetNode.value, val.selectedValues[0], workflowHandleWrap.nextStepPersonOptions.value, val.selectedOptions)
|
|
157
|
-
showPicker = false;
|
|
158
|
-
}"
|
|
159
|
-
@cancel="showPicker = false;"
|
|
160
|
-
/>
|
|
161
|
-
</VanPopup>
|
|
162
|
-
</template>
|
|
163
|
-
</div>
|
|
164
|
-
</template>
|
|
165
|
-
|
|
166
|
-
<style scoped>
|
|
167
|
-
/* 保持你的样式或根据 vant 移动端自行优化 */
|
|
168
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
Field as VanField,
|
|
4
|
+
Picker as VanPicker,
|
|
5
|
+
Popup as VanPopup,
|
|
6
|
+
Search as VanSearch,
|
|
7
|
+
} from 'vant'
|
|
8
|
+
import { computed, inject, onMounted, ref } from 'vue'
|
|
9
|
+
|
|
10
|
+
const workflowHandleWrap: any = inject('workflowHandleWrap')
|
|
11
|
+
|
|
12
|
+
const showPicker = ref(false)
|
|
13
|
+
|
|
14
|
+
const showMultiplePicker = ref(false)
|
|
15
|
+
|
|
16
|
+
const branchChargePersons = ref({})
|
|
17
|
+
|
|
18
|
+
const isInit = ref(false)
|
|
19
|
+
|
|
20
|
+
// 用于 filterOption 的本地输入缓存(vant 不自带 filter)
|
|
21
|
+
const filterKeyword = ref('')
|
|
22
|
+
|
|
23
|
+
const customFieldName = {
|
|
24
|
+
text: 'label',
|
|
25
|
+
value: 'value',
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const selectedNode = ref(undefined)
|
|
29
|
+
|
|
30
|
+
const selectedOptions = computed(() => {
|
|
31
|
+
if (!selectedNode.value) {
|
|
32
|
+
return []
|
|
33
|
+
}
|
|
34
|
+
return filterOptions(selectedNode.value.chargePersonOptions)
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
onMounted(() => {
|
|
38
|
+
isInit.value = false
|
|
39
|
+
if (workflowHandleWrap.branchNodes.value) {
|
|
40
|
+
// 初始化初始值
|
|
41
|
+
for (const node of workflowHandleWrap.branchNodes.value) {
|
|
42
|
+
branchChargePersons.value[node.stepId] = {
|
|
43
|
+
handler: '',
|
|
44
|
+
handlerId: '',
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
isInit.value = true
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
function setBranchPersonValue(stepId, value, options, selectedOptions) {
|
|
52
|
+
if (!stepId)
|
|
53
|
+
return
|
|
54
|
+
if (!workflowHandleWrap.branchChargePersons.value) {
|
|
55
|
+
workflowHandleWrap.branchChargePersons.value = {}
|
|
56
|
+
}
|
|
57
|
+
if (!workflowHandleWrap.branchChargePersons.value[stepId]) {
|
|
58
|
+
workflowHandleWrap.branchChargePersons.value[stepId] = {}
|
|
59
|
+
}
|
|
60
|
+
if (workflowHandleWrap.branchChargePersons.value[stepId]) {
|
|
61
|
+
branchChargePersons.value[stepId] = {
|
|
62
|
+
handler: options.find(item => item.value === value)?.label,
|
|
63
|
+
handlerId: value,
|
|
64
|
+
}
|
|
65
|
+
Object.assign(workflowHandleWrap.branchChargePersons.value[stepId], branchChargePersons.value[stepId])
|
|
66
|
+
}
|
|
67
|
+
workflowHandleWrap.checkedNextStepPerson.value = selectedOptions[0].value
|
|
68
|
+
workflowHandleWrap.checkedNextStepPersonName.value = selectedOptions[0].label
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function getBranchSelectionLabel() {
|
|
72
|
+
if (workflowHandleWrap.needMultipleBranchSelection.value) {
|
|
73
|
+
return '分支处理人'
|
|
74
|
+
}
|
|
75
|
+
else if (workflowHandleWrap.calculatedTargetNode.value) {
|
|
76
|
+
return `${workflowHandleWrap.getStepNameByStepId(workflowHandleWrap.calculatedTargetNode.value)}处理人`
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
return '处理人'
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// vant 没有原生 filter-option,因此需要本地筛选
|
|
84
|
+
function filterOptions(options) {
|
|
85
|
+
if (!filterKeyword.value)
|
|
86
|
+
return options
|
|
87
|
+
return options.filter(option => option.label.toLowerCase().includes(filterKeyword.value.toLowerCase()))
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// 搜索回调函数
|
|
91
|
+
function search(val: string) {
|
|
92
|
+
filterKeyword.value = val || ''
|
|
93
|
+
}
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
<template>
|
|
97
|
+
<div v-if="workflowHandleWrap.isNeedSelectPerson.value && isInit">
|
|
98
|
+
<!-- 多分支选择 -->
|
|
99
|
+
<template v-if="workflowHandleWrap.needMultipleBranchSelection.value && workflowHandleWrap.branchNodes.value.length > 0">
|
|
100
|
+
<template v-for="node in workflowHandleWrap.branchNodes.value" :key="node.stepId">
|
|
101
|
+
<VanField
|
|
102
|
+
v-model="branchChargePersons[node.stepId].handler"
|
|
103
|
+
:label="`${node.stepName}处理人`"
|
|
104
|
+
is-link
|
|
105
|
+
clickable
|
|
106
|
+
required
|
|
107
|
+
placeholder="请选择处理人"
|
|
108
|
+
@click="selectedNode = node; showMultiplePicker = true;"
|
|
109
|
+
/>
|
|
110
|
+
</template>
|
|
111
|
+
<VanPopup v-model:show="showMultiplePicker" position="bottom">
|
|
112
|
+
<!-- 搜索框 -->
|
|
113
|
+
<VanSearch
|
|
114
|
+
v-model="filterKeyword"
|
|
115
|
+
placeholder="搜索"
|
|
116
|
+
@clear="() => search('')"
|
|
117
|
+
@update:model-value="search"
|
|
118
|
+
/>
|
|
119
|
+
<VanPicker
|
|
120
|
+
:columns="selectedOptions"
|
|
121
|
+
:columns-field-names="customFieldName"
|
|
122
|
+
value-key="label"
|
|
123
|
+
@confirm="(val) => {
|
|
124
|
+
setBranchPersonValue(selectedNode.stepId, val.selectedValues[0], selectedNode.chargePersonOptions, val.selectedOptions)
|
|
125
|
+
showMultiplePicker = false;
|
|
126
|
+
}"
|
|
127
|
+
@cancel="showMultiplePicker = false;"
|
|
128
|
+
/>
|
|
129
|
+
</VanPopup>
|
|
130
|
+
</template>
|
|
131
|
+
|
|
132
|
+
<!-- 单分支选择 -->
|
|
133
|
+
<template v-else>
|
|
134
|
+
<VanField
|
|
135
|
+
v-model="workflowHandleWrap.checkedNextStepPersonName.value"
|
|
136
|
+
:label="getBranchSelectionLabel()"
|
|
137
|
+
label-width="auto"
|
|
138
|
+
is-link
|
|
139
|
+
clickable
|
|
140
|
+
required
|
|
141
|
+
placeholder="请选择处理人"
|
|
142
|
+
@click="showPicker = true"
|
|
143
|
+
/>
|
|
144
|
+
<VanPopup v-model:show="showPicker" position="bottom">
|
|
145
|
+
<!-- 搜索框 -->
|
|
146
|
+
<VanSearch
|
|
147
|
+
v-model="filterKeyword"
|
|
148
|
+
placeholder="搜索"
|
|
149
|
+
@clear="() => search('')"
|
|
150
|
+
@update:model-value="search"
|
|
151
|
+
/>
|
|
152
|
+
<VanPicker
|
|
153
|
+
:columns="filterOptions(workflowHandleWrap.nextStepPersonOptions.value)"
|
|
154
|
+
:columns-field-names="customFieldName"
|
|
155
|
+
@confirm="(val) => {
|
|
156
|
+
setBranchPersonValue(workflowHandleWrap.calculatedTargetNode.value, val.selectedValues[0], workflowHandleWrap.nextStepPersonOptions.value, val.selectedOptions)
|
|
157
|
+
showPicker = false;
|
|
158
|
+
}"
|
|
159
|
+
@cancel="showPicker = false;"
|
|
160
|
+
/>
|
|
161
|
+
</VanPopup>
|
|
162
|
+
</template>
|
|
163
|
+
</div>
|
|
164
|
+
</template>
|
|
165
|
+
|
|
166
|
+
<style scoped>
|
|
167
|
+
/* 保持你的样式或根据 vant 移动端自行优化 */
|
|
168
|
+
</style>
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import { defineStore } from 'pinia'
|
|
2
|
-
import { ref } from 'vue'
|
|
3
|
-
|
|
4
|
-
export interface StepToolsInfo {
|
|
5
|
-
workflowId: string
|
|
6
|
-
stepDefines: any
|
|
7
|
-
formData: any
|
|
8
|
-
currentStepData: any
|
|
9
|
-
readOnly: boolean
|
|
10
|
-
callbackFunction: Function
|
|
11
|
-
businessData: any
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const useStepStore = defineStore('apply-step', () => {
|
|
15
|
-
const stepState = ref<StepToolsInfo>({
|
|
16
|
-
workflowId: '0',
|
|
17
|
-
stepDefines: undefined,
|
|
18
|
-
formData: undefined,
|
|
19
|
-
currentStepData: undefined,
|
|
20
|
-
readOnly: false,
|
|
21
|
-
callbackFunction: () => {
|
|
22
|
-
return true
|
|
23
|
-
},
|
|
24
|
-
businessData: undefined,
|
|
25
|
-
})
|
|
26
|
-
const getWorkflowId = () => {
|
|
27
|
-
return stepState.value.workflowId || '0'
|
|
28
|
-
}
|
|
29
|
-
const getStepDefines = () => {
|
|
30
|
-
return stepState.value.stepDefines || {}
|
|
31
|
-
}
|
|
32
|
-
const getFormData = () => {
|
|
33
|
-
return stepState.value.formData || {}
|
|
34
|
-
}
|
|
35
|
-
const getReadOnly = () => {
|
|
36
|
-
return stepState.value.readOnly || false
|
|
37
|
-
}
|
|
38
|
-
const getCurrentStepData = () => {
|
|
39
|
-
return stepState.value.currentStepData || {}
|
|
40
|
-
}
|
|
41
|
-
const getCallbackFunction = () => {
|
|
42
|
-
return stepState.value.callbackFunction || undefined
|
|
43
|
-
}
|
|
44
|
-
const getBusinessData = () => {
|
|
45
|
-
return stepState.value.businessData || {}
|
|
46
|
-
}
|
|
47
|
-
const setWorkflowId = (workflowId: string) => {
|
|
48
|
-
stepState.value.workflowId = workflowId
|
|
49
|
-
}
|
|
50
|
-
const setStepDefines = (stepDefines: any) => {
|
|
51
|
-
stepState.value.stepDefines = stepDefines
|
|
52
|
-
}
|
|
53
|
-
const setFormData = (formData: any) => {
|
|
54
|
-
stepState.value.formData = formData
|
|
55
|
-
}
|
|
56
|
-
const setCurrentStepData = (currentStepData: any) => {
|
|
57
|
-
stepState.value.currentStepData = currentStepData
|
|
58
|
-
}
|
|
59
|
-
const setReadOnly = (readOnly: boolean) => {
|
|
60
|
-
stepState.value.readOnly = readOnly
|
|
61
|
-
}
|
|
62
|
-
const setCallbackFunction = (callbackFunction: Function) => {
|
|
63
|
-
stepState.value.callbackFunction = callbackFunction
|
|
64
|
-
}
|
|
65
|
-
const setBusinessData = (businessData: any) => {
|
|
66
|
-
stepState.value.businessData = businessData
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
stepState,
|
|
71
|
-
getWorkflowId,
|
|
72
|
-
getStepDefines,
|
|
73
|
-
getFormData,
|
|
74
|
-
getCurrentStepData,
|
|
75
|
-
getReadOnly,
|
|
76
|
-
getCallbackFunction,
|
|
77
|
-
getBusinessData,
|
|
78
|
-
setWorkflowId,
|
|
79
|
-
setStepDefines,
|
|
80
|
-
setFormData,
|
|
81
|
-
setCurrentStepData,
|
|
82
|
-
setReadOnly,
|
|
83
|
-
setCallbackFunction,
|
|
84
|
-
setBusinessData,
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
export default useStepStore
|
|
1
|
+
import { defineStore } from 'pinia'
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
export interface StepToolsInfo {
|
|
5
|
+
workflowId: string
|
|
6
|
+
stepDefines: any
|
|
7
|
+
formData: any
|
|
8
|
+
currentStepData: any
|
|
9
|
+
readOnly: boolean
|
|
10
|
+
callbackFunction: Function
|
|
11
|
+
businessData: any
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const useStepStore = defineStore('apply-step', () => {
|
|
15
|
+
const stepState = ref<StepToolsInfo>({
|
|
16
|
+
workflowId: '0',
|
|
17
|
+
stepDefines: undefined,
|
|
18
|
+
formData: undefined,
|
|
19
|
+
currentStepData: undefined,
|
|
20
|
+
readOnly: false,
|
|
21
|
+
callbackFunction: () => {
|
|
22
|
+
return true
|
|
23
|
+
},
|
|
24
|
+
businessData: undefined,
|
|
25
|
+
})
|
|
26
|
+
const getWorkflowId = () => {
|
|
27
|
+
return stepState.value.workflowId || '0'
|
|
28
|
+
}
|
|
29
|
+
const getStepDefines = () => {
|
|
30
|
+
return stepState.value.stepDefines || {}
|
|
31
|
+
}
|
|
32
|
+
const getFormData = () => {
|
|
33
|
+
return stepState.value.formData || {}
|
|
34
|
+
}
|
|
35
|
+
const getReadOnly = () => {
|
|
36
|
+
return stepState.value.readOnly || false
|
|
37
|
+
}
|
|
38
|
+
const getCurrentStepData = () => {
|
|
39
|
+
return stepState.value.currentStepData || {}
|
|
40
|
+
}
|
|
41
|
+
const getCallbackFunction = () => {
|
|
42
|
+
return stepState.value.callbackFunction || undefined
|
|
43
|
+
}
|
|
44
|
+
const getBusinessData = () => {
|
|
45
|
+
return stepState.value.businessData || {}
|
|
46
|
+
}
|
|
47
|
+
const setWorkflowId = (workflowId: string) => {
|
|
48
|
+
stepState.value.workflowId = workflowId
|
|
49
|
+
}
|
|
50
|
+
const setStepDefines = (stepDefines: any) => {
|
|
51
|
+
stepState.value.stepDefines = stepDefines
|
|
52
|
+
}
|
|
53
|
+
const setFormData = (formData: any) => {
|
|
54
|
+
stepState.value.formData = formData
|
|
55
|
+
}
|
|
56
|
+
const setCurrentStepData = (currentStepData: any) => {
|
|
57
|
+
stepState.value.currentStepData = currentStepData
|
|
58
|
+
}
|
|
59
|
+
const setReadOnly = (readOnly: boolean) => {
|
|
60
|
+
stepState.value.readOnly = readOnly
|
|
61
|
+
}
|
|
62
|
+
const setCallbackFunction = (callbackFunction: Function) => {
|
|
63
|
+
stepState.value.callbackFunction = callbackFunction
|
|
64
|
+
}
|
|
65
|
+
const setBusinessData = (businessData: any) => {
|
|
66
|
+
stepState.value.businessData = businessData
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
stepState,
|
|
71
|
+
getWorkflowId,
|
|
72
|
+
getStepDefines,
|
|
73
|
+
getFormData,
|
|
74
|
+
getCurrentStepData,
|
|
75
|
+
getReadOnly,
|
|
76
|
+
getCallbackFunction,
|
|
77
|
+
getBusinessData,
|
|
78
|
+
setWorkflowId,
|
|
79
|
+
setStepDefines,
|
|
80
|
+
setFormData,
|
|
81
|
+
setCurrentStepData,
|
|
82
|
+
setReadOnly,
|
|
83
|
+
setCallbackFunction,
|
|
84
|
+
setBusinessData,
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
export default useStepStore
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import FilePreview from '@af-mobile-client-vue3/components/data/FilePreview/index.vue'
|
|
3
|
-
import { onMounted, ref } from 'vue'
|
|
4
|
-
|
|
5
|
-
const previewDocType = ref('pdf')
|
|
6
|
-
const previewDocUrl = ref('/resource/af-revenue/pdf/e0a35f3414444d009cbce020af2e617d.pdf')
|
|
7
|
-
|
|
8
|
-
const filePreviewRef = ref<InstanceType<typeof FilePreview> | null>(null)
|
|
9
|
-
|
|
10
|
-
onMounted(() => {
|
|
11
|
-
filePreviewRef.value?.init({
|
|
12
|
-
path: '/resource/af-revenue/pdf/e0a35f3414444d009cbce020af2e617d.pdf',
|
|
13
|
-
})
|
|
14
|
-
})
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<template>
|
|
18
|
-
<div>
|
|
19
|
-
<FilePreview
|
|
20
|
-
ref="filePreviewRef"
|
|
21
|
-
:key="`${previewDocType}-${previewDocUrl}`"
|
|
22
|
-
class="doc-preview-file"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<style scoped lang="less">
|
|
28
|
-
.doc-preview-file {
|
|
29
|
-
height: 90vh;
|
|
30
|
-
}
|
|
31
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import FilePreview from '@af-mobile-client-vue3/components/data/FilePreview/index.vue'
|
|
3
|
+
import { onMounted, ref } from 'vue'
|
|
4
|
+
|
|
5
|
+
const previewDocType = ref('pdf')
|
|
6
|
+
const previewDocUrl = ref('/resource/af-revenue/pdf/e0a35f3414444d009cbce020af2e617d.pdf')
|
|
7
|
+
|
|
8
|
+
const filePreviewRef = ref<InstanceType<typeof FilePreview> | null>(null)
|
|
9
|
+
|
|
10
|
+
onMounted(() => {
|
|
11
|
+
filePreviewRef.value?.init({
|
|
12
|
+
path: '/resource/af-revenue/pdf/e0a35f3414444d009cbce020af2e617d.pdf',
|
|
13
|
+
})
|
|
14
|
+
})
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div>
|
|
19
|
+
<FilePreview
|
|
20
|
+
ref="filePreviewRef"
|
|
21
|
+
:key="`${previewDocType}-${previewDocUrl}`"
|
|
22
|
+
class="doc-preview-file"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<style scoped lang="less">
|
|
28
|
+
.doc-preview-file {
|
|
29
|
+
height: 90vh;
|
|
30
|
+
}
|
|
31
|
+
</style>
|