gbflowengine 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +271 -3
- package/dist/gbflowengine.css +1 -0
- package/dist/gbflowengine.js +18363 -0
- package/dist/gbflowengine.js.map +1 -0
- package/dist/gbflowengine.umd.cjs +5 -0
- package/dist/gbflowengine.umd.cjs.map +1 -0
- package/package.json +84 -6
- package/src/center/DefinitionInspect.vue +291 -0
- package/src/center/FlowCenter.vue +33 -0
- package/src/center/index.js +29 -0
- package/src/center/storage.js +748 -0
- package/src/core/flow/condition.js +160 -0
- package/src/core/flow/customNode.js +385 -0
- package/src/core/flow/defaults.js +124 -0
- package/src/core/flow/flowConstant.js +265 -0
- package/src/core/flow/flowNodeUtils.js +30 -0
- package/src/core/flow/index.js +47 -0
- package/src/core/flow/node.js +44 -0
- package/src/core/flow/nodeFactory.js +58 -0
- package/src/core/flow/prediction.js +325 -0
- package/src/core/flow/runtime/auto.js +83 -0
- package/src/core/flow/runtime/decide.js +329 -0
- package/src/core/flow/runtime/event.js +28 -0
- package/src/core/flow/runtime/execute.js +357 -0
- package/src/core/flow/runtime/helpers.js +52 -0
- package/src/core/flow/runtime/query.js +146 -0
- package/src/core/flow/runtime/reject.js +137 -0
- package/src/core/flow/runtime/token.js +269 -0
- package/src/core/flow/runtime.js +129 -0
- package/src/core/flow/schema.js +864 -0
- package/src/definition/FlowDefinitionDesigner.vue +338 -0
- package/src/definition/index.js +9 -0
- package/src/index.js +39 -0
- package/src/storage.js +200 -0
- package/src/testing/FlowTestPanel.vue +2502 -0
- package/src/testing/UserConfigDrawer.vue +376 -0
- package/src/testing/diagram/FlowProgressDiagram.vue +318 -0
- package/src/testing/diagramModel.js +517 -0
- package/src/testing/index.js +23 -0
- package/src/testing/mock.js +246 -0
- package/src/testing/oaExecutors.js +51 -0
- package/src/testing/oaSeed.js +467 -0
- package/src/testing/sample.js +412 -0
- package/src/testing/seed.js +122 -0
- package/src/utils/format.js +27 -0
- package/src/visual/FlowCanvas.vue +441 -0
- package/src/visual/NodeProgressDetail.vue +43 -0
- package/src/visual/NodeStatusBadge.vue +17 -0
- package/src/visual/NodeWrap.vue +47 -0
- package/src/visual/ScWorkflow.vue +50 -0
- package/src/visual/SelectDialog.vue +460 -0
- package/src/visual/conditionHelpers.js +117 -0
- package/src/visual/index.js +6 -0
- package/src/visual/nodes/AddNode.vue +223 -0
- package/src/visual/nodes/ApproverNode.vue +348 -0
- package/src/visual/nodes/BranchNode.vue +442 -0
- package/src/visual/nodes/CustomNode.vue +339 -0
- package/src/visual/nodes/EndNode.vue +22 -0
- package/src/visual/nodes/PassNode.vue +101 -0
- package/src/visual/nodes/PromoterNode.vue +135 -0
- package/src/visual/nodes/RejectNode.vue +101 -0
- package/src/visual/nodes/SendNode.vue +152 -0
- package/src/visual/styles.scss +879 -0
- package/src/visual/useScNodeStatus.js +18 -0
- package/src/workbench/OaWorkbench.vue +1341 -0
- package/src/workbench/components/ApprovalWorkspace.vue +2090 -0
- package/src/workbench/components/CategoryIcon.vue +74 -0
- package/src/workbench/components/NotificationIcon.vue +73 -0
- package/src/workbench/components/ProcessSteps.vue +557 -0
- package/src/workbench/components/ResubmitDialog.vue +227 -0
- package/src/workbench/components/SidebarNav.vue +138 -0
- package/src/workbench/components/StartFlowDialog.vue +1058 -0
- package/src/workbench/components/UserAvatar.vue +68 -0
- package/src/workbench/custom-tasks.js +130 -0
- package/src/workbench/model.js +1080 -0
- package/src/workbench/pages/DesignPage.vue +798 -0
- package/src/workbench/pages/HomePage.vue +1050 -0
- package/src/workbench/pages/MonitorPage.vue +1029 -0
- package/src/workbench/pages/NotificationsPage.vue +554 -0
- package/src/workbench/pages/RequestsPage.vue +644 -0
- package/src/workbench/pages/TaskCenterPage.vue +1155 -0
- package/src/workbench/pages/TemplatesPage.vue +680 -0
- package/src/workbench/persistence.js +89 -0
- package/src/workbench/shared.js +18 -0
- package/src/workbench/styles.scss +555 -0
- package/src/workbench/useWorkbench.js +955 -0
- package/types/center.d.ts +5 -0
- package/types/core.d.ts +479 -0
- package/types/definition.d.ts +4 -0
- package/types/index.d.ts +34 -0
- package/types/testing.d.ts +20 -0
- package/types/visual.d.ts +20 -0
|
@@ -0,0 +1,1058 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
:model-value="true"
|
|
4
|
+
:show-close="false"
|
|
5
|
+
:with-header="false"
|
|
6
|
+
width="min(1160px, 96vw)"
|
|
7
|
+
top="4vh"
|
|
8
|
+
append-to-body
|
|
9
|
+
destroy-on-close
|
|
10
|
+
class="oa-start-dialog"
|
|
11
|
+
@opened="initialize"
|
|
12
|
+
@update:model-value="handleDialogVisible"
|
|
13
|
+
>
|
|
14
|
+
<div class="oa-start">
|
|
15
|
+
<header class="oa-start__head">
|
|
16
|
+
<div class="oa-start__identity">
|
|
17
|
+
<CategoryIcon :category="business.category" :size="40" />
|
|
18
|
+
<div>
|
|
19
|
+
<div class="oa-start__eyebrow">
|
|
20
|
+
发起申请
|
|
21
|
+
<span>{{ business.category }}</span>
|
|
22
|
+
</div>
|
|
23
|
+
<h2>{{ definition.meta?.name }}</h2>
|
|
24
|
+
<p>{{ definition.meta?.description || business.scenario }}</p>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<button type="button" class="oa-start__close" aria-label="关闭" @click="close">
|
|
28
|
+
<el-icon><Close /></el-icon>
|
|
29
|
+
</button>
|
|
30
|
+
</header>
|
|
31
|
+
|
|
32
|
+
<div class="oa-start__body">
|
|
33
|
+
<section class="oa-start__form-side">
|
|
34
|
+
<div class="oa-start__applicant">
|
|
35
|
+
<UserAvatar :name="oa.currentUserName.value" :size="34" />
|
|
36
|
+
<div class="oa-start__applicant-main">
|
|
37
|
+
<strong>{{ oa.currentUserName.value }}</strong>
|
|
38
|
+
<span>{{ oa.currentUserDept.value }} · {{ oa.currentUserRoleNames.value.join(' / ') || '成员' }}</span>
|
|
39
|
+
</div>
|
|
40
|
+
<span class="oa-chip">以当前身份发起</span>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<el-alert
|
|
44
|
+
v-if="restoredAt"
|
|
45
|
+
type="info"
|
|
46
|
+
:closable="false"
|
|
47
|
+
show-icon
|
|
48
|
+
class="oa-start__restore"
|
|
49
|
+
:title="`已恢复草稿(${formatDateTime(restoredAt)})`"
|
|
50
|
+
>
|
|
51
|
+
<template #default>
|
|
52
|
+
<div class="oa-start__restore-line">
|
|
53
|
+
继续编辑或
|
|
54
|
+
<button type="button" class="oa-link" @click="clearDraft">清空草稿重新填写</button>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
</el-alert>
|
|
58
|
+
|
|
59
|
+
<div class="oa-start__field">
|
|
60
|
+
<label for="oa-start-title">
|
|
61
|
+
事项标题
|
|
62
|
+
<span>用于待办列表和搜索,不填写时自动生成</span>
|
|
63
|
+
</label>
|
|
64
|
+
<el-input
|
|
65
|
+
id="oa-start-title"
|
|
66
|
+
v-model="title"
|
|
67
|
+
maxlength="60"
|
|
68
|
+
show-word-limit
|
|
69
|
+
placeholder="例如:研发中心显示器批量采购"
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div class="oa-start__form-card">
|
|
74
|
+
<div class="oa-start__form-head">
|
|
75
|
+
<h3>申请信息</h3>
|
|
76
|
+
<span>标 <i>*</i> 为必填;金额与日期会参与路径判断</span>
|
|
77
|
+
</div>
|
|
78
|
+
<FormViewer ref="formRef" :key="formKey" :form-config="formComponents" :show-actions="false" />
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div class="oa-start__upload">
|
|
82
|
+
<div class="oa-start__form-head">
|
|
83
|
+
<h3>附件上传</h3>
|
|
84
|
+
<span>支持 PDF / Word / Excel / 图片,最多 5 个文件</span>
|
|
85
|
+
</div>
|
|
86
|
+
<el-upload
|
|
87
|
+
v-model:file-list="fileList"
|
|
88
|
+
class="oa-uploader"
|
|
89
|
+
drag
|
|
90
|
+
multiple
|
|
91
|
+
:auto-upload="false"
|
|
92
|
+
:limit="5"
|
|
93
|
+
accept=".pdf,.doc,.docx,.xls,.xlsx,.png,.jpg,.jpeg"
|
|
94
|
+
:on-exceed="handleExceed"
|
|
95
|
+
>
|
|
96
|
+
<el-icon class="oa-uploader__icon"><UploadFilled /></el-icon>
|
|
97
|
+
<div class="el-upload__text">拖拽文件到此处,或 <em>点击选择</em></div>
|
|
98
|
+
<template #tip>
|
|
99
|
+
<div class="el-upload__tip">测试模式仅保存文件元信息,不会上传到服务器。</div>
|
|
100
|
+
</template>
|
|
101
|
+
</el-upload>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div v-if="ccNodes.length" class="oa-start__cc">
|
|
105
|
+
<div class="oa-start__form-head">
|
|
106
|
+
<h3>抄送人</h3>
|
|
107
|
+
<span>仅对允许发起人自选的抄送节点生效</span>
|
|
108
|
+
</div>
|
|
109
|
+
<div v-for="node in ccNodes" :key="node.nodeId" class="oa-start__cc-row">
|
|
110
|
+
<label>{{ node.nodeName }}</label>
|
|
111
|
+
<el-select
|
|
112
|
+
v-model="ccSelections[node.nodeId]"
|
|
113
|
+
multiple
|
|
114
|
+
collapse-tags
|
|
115
|
+
collapse-tags-tooltip
|
|
116
|
+
clearable
|
|
117
|
+
filterable
|
|
118
|
+
placeholder="不额外抄送"
|
|
119
|
+
>
|
|
120
|
+
<el-option
|
|
121
|
+
v-for="user in oa.usersWithStats.value"
|
|
122
|
+
:key="user.id"
|
|
123
|
+
:label="`${user.realName} · ${user.deptLabel}`"
|
|
124
|
+
:value="user.id"
|
|
125
|
+
/>
|
|
126
|
+
</el-select>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div class="oa-start__material">
|
|
131
|
+
<h3>提交前请确认</h3>
|
|
132
|
+
<ul>
|
|
133
|
+
<li v-for="material in business.materials" :key="material">
|
|
134
|
+
<el-icon><Document /></el-icon>
|
|
135
|
+
{{ material }}
|
|
136
|
+
</li>
|
|
137
|
+
<li v-if="!business.materials.length">
|
|
138
|
+
<el-icon><CircleCheck /></el-icon>
|
|
139
|
+
本流程无需额外材料
|
|
140
|
+
</li>
|
|
141
|
+
</ul>
|
|
142
|
+
</div>
|
|
143
|
+
</section>
|
|
144
|
+
|
|
145
|
+
<aside class="oa-start__preview">
|
|
146
|
+
<div class="oa-start__preview-head">
|
|
147
|
+
<div>
|
|
148
|
+
<span class="oa-start__preview-eyebrow">路径预览</span>
|
|
149
|
+
<h3>预计审批路径</h3>
|
|
150
|
+
</div>
|
|
151
|
+
<el-tag size="small" effect="plain" type="info">基于当前填写内容</el-tag>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
<div class="oa-start__preview-metrics">
|
|
155
|
+
<div>
|
|
156
|
+
<span>预计时长</span>
|
|
157
|
+
<strong>{{ formatSla(business.slaHours) }}</strong>
|
|
158
|
+
</div>
|
|
159
|
+
<div>
|
|
160
|
+
<span>审批节点</span>
|
|
161
|
+
<strong>{{ approvalCount }}</strong>
|
|
162
|
+
</div>
|
|
163
|
+
<div>
|
|
164
|
+
<span>材料要求</span>
|
|
165
|
+
<strong>{{ business.materials.length || '无' }}</strong>
|
|
166
|
+
</div>
|
|
167
|
+
<div>
|
|
168
|
+
<span>自定义节点</span>
|
|
169
|
+
<strong>{{ customNodeCount }}</strong>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<div v-if="decisionChips.length" class="oa-start__branches">
|
|
174
|
+
<span class="oa-start__branches-label">命中分支</span>
|
|
175
|
+
<span v-for="chip in decisionChips" :key="chip" class="oa-chip oa-chip--primary">
|
|
176
|
+
{{ chip }}
|
|
177
|
+
</span>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
<div class="oa-start__preview-body">
|
|
181
|
+
<ProcessSteps v-if="routeSteps.length" :steps="routeSteps" compact />
|
|
182
|
+
<div v-else class="oa-empty oa-empty--sm">
|
|
183
|
+
<span class="oa-empty__icon"><el-icon><Share /></el-icon></span>
|
|
184
|
+
<strong>填写表单后生成审批路径</strong>
|
|
185
|
+
<p>系统会根据表单字段实时计算分支与审批人。</p>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
<div v-if="routeError" class="oa-start__warning">
|
|
190
|
+
<el-icon><WarningFilled /></el-icon>
|
|
191
|
+
{{ routeError }}
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<div class="oa-start__preview-note">
|
|
195
|
+
<el-icon><InfoFilled /></el-icon>
|
|
196
|
+
<p>提交后审批人按组织与角色配置解析;预计时长来自流程 SLA 设置。</p>
|
|
197
|
+
</div>
|
|
198
|
+
</aside>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
<footer class="oa-start__footer">
|
|
202
|
+
<div class="oa-start__draft">
|
|
203
|
+
<span v-if="savedAt" class="oa-start__saved">
|
|
204
|
+
<el-icon><CircleCheck /></el-icon>
|
|
205
|
+
草稿已自动保存 {{ formatDateTime(savedAt, { short: true }) }}
|
|
206
|
+
</span>
|
|
207
|
+
<span v-else class="oa-muted">填写内容会自动保存到本机草稿</span>
|
|
208
|
+
<button v-if="savedAt" type="button" class="oa-link" @click="clearDraft">清空草稿</button>
|
|
209
|
+
</div>
|
|
210
|
+
<div class="oa-start__footer-actions">
|
|
211
|
+
<el-button @click="close">取消</el-button>
|
|
212
|
+
<el-button type="primary" :loading="submitting" @click="submit">
|
|
213
|
+
提交申请
|
|
214
|
+
</el-button>
|
|
215
|
+
</div>
|
|
216
|
+
</footer>
|
|
217
|
+
</div>
|
|
218
|
+
</el-dialog>
|
|
219
|
+
</template>
|
|
220
|
+
|
|
221
|
+
<script setup>
|
|
222
|
+
import { computed, inject, nextTick, onBeforeUnmount, reactive, ref, watch } from 'vue'
|
|
223
|
+
import { ElMessage } from 'element-plus'
|
|
224
|
+
import {
|
|
225
|
+
CircleCheck,
|
|
226
|
+
Close,
|
|
227
|
+
Document,
|
|
228
|
+
InfoFilled,
|
|
229
|
+
Share,
|
|
230
|
+
UploadFilled,
|
|
231
|
+
WarningFilled
|
|
232
|
+
} from '@element-plus/icons-vue'
|
|
233
|
+
import { FormViewer } from 'gbformdesign'
|
|
234
|
+
import { formatDateTime } from '../../utils/format.js'
|
|
235
|
+
import CategoryIcon from './CategoryIcon.vue'
|
|
236
|
+
import ProcessSteps from './ProcessSteps.vue'
|
|
237
|
+
import UserAvatar from './UserAvatar.vue'
|
|
238
|
+
import {
|
|
239
|
+
buildPredictionSteps,
|
|
240
|
+
formatSla,
|
|
241
|
+
resolveBusiness
|
|
242
|
+
} from '../model.js'
|
|
243
|
+
|
|
244
|
+
defineOptions({ name: 'OaStartFlowDialog' })
|
|
245
|
+
|
|
246
|
+
const props = defineProps({
|
|
247
|
+
definition: { type: Object, required: true }
|
|
248
|
+
})
|
|
249
|
+
const emit = defineEmits(['close'])
|
|
250
|
+
const oa = inject('oaStore')
|
|
251
|
+
|
|
252
|
+
const formRef = ref(null)
|
|
253
|
+
const formKey = ref(0)
|
|
254
|
+
const title = ref('')
|
|
255
|
+
const submitting = ref(false)
|
|
256
|
+
const restoredAt = ref('')
|
|
257
|
+
const savedAt = ref('')
|
|
258
|
+
const routeSteps = ref([])
|
|
259
|
+
const routeError = ref('')
|
|
260
|
+
const prediction = ref(null)
|
|
261
|
+
const initialized = ref(false)
|
|
262
|
+
const ccSelections = reactive({})
|
|
263
|
+
const fileList = ref([])
|
|
264
|
+
const ccNodes = computed(() => oa.getCcNodes(props.definition))
|
|
265
|
+
const business = computed(() => resolveBusiness(props.definition))
|
|
266
|
+
const formComponents = computed(() => props.definition.form?.components || [])
|
|
267
|
+
const approvalCount = computed(
|
|
268
|
+
() => routeSteps.value.filter((step) => step.kind === 'approve').length
|
|
269
|
+
)
|
|
270
|
+
const customNodeCount = computed(
|
|
271
|
+
() => routeSteps.value.filter((step) => step.kind === 'custom').length
|
|
272
|
+
)
|
|
273
|
+
const decisionChips = computed(() => {
|
|
274
|
+
const decisions = prediction.value?.decisions || []
|
|
275
|
+
const chips = []
|
|
276
|
+
decisions.forEach((decision) => {
|
|
277
|
+
if (decision.selectedBranchNames?.length) chips.push(...decision.selectedBranchNames)
|
|
278
|
+
else if (decision.selectedBranchName) chips.push(decision.selectedBranchName)
|
|
279
|
+
})
|
|
280
|
+
return [...new Set(chips)]
|
|
281
|
+
})
|
|
282
|
+
|
|
283
|
+
let predictTimer = null
|
|
284
|
+
let draftTimer = null
|
|
285
|
+
|
|
286
|
+
function resetCcNodes() {
|
|
287
|
+
Object.keys(ccSelections).forEach((key) => delete ccSelections[key])
|
|
288
|
+
ccNodes.value.forEach((node) => {
|
|
289
|
+
ccSelections[node.nodeId] = []
|
|
290
|
+
})
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
function initialize(attempt = 0) {
|
|
294
|
+
if (initialized.value) return
|
|
295
|
+
const viewer = formRef.value
|
|
296
|
+
if (!viewer?.formData) {
|
|
297
|
+
if (attempt < 8) setTimeout(() => initialize(attempt + 1), 60)
|
|
298
|
+
return
|
|
299
|
+
}
|
|
300
|
+
initialized.value = true
|
|
301
|
+
resetCcNodes()
|
|
302
|
+
const draft = oa.getDraft(props.definition.meta?.id)
|
|
303
|
+
if (draft) {
|
|
304
|
+
title.value = draft.title || ''
|
|
305
|
+
if (draft.data && typeof draft.data === 'object') {
|
|
306
|
+
Object.keys(viewer.formData).forEach((key) => delete viewer.formData[key])
|
|
307
|
+
Object.assign(viewer.formData, JSON.parse(JSON.stringify(draft.data)))
|
|
308
|
+
}
|
|
309
|
+
if (draft.ccSelections && typeof draft.ccSelections === 'object') {
|
|
310
|
+
Object.entries(draft.ccSelections).forEach(([nodeId, ids]) => {
|
|
311
|
+
if (ccSelections[nodeId] !== undefined && Array.isArray(ids)) {
|
|
312
|
+
ccSelections[nodeId] = inputExistingUsers(ids)
|
|
313
|
+
}
|
|
314
|
+
})
|
|
315
|
+
}
|
|
316
|
+
fileList.value = Array.isArray(draft.attachments)
|
|
317
|
+
? draft.attachments.map((file, index) => ({
|
|
318
|
+
name: file.name || `附件 ${index + 1}`,
|
|
319
|
+
size: Number(file.size) || 0,
|
|
320
|
+
uid: `draft_${index}_${Date.now()}`,
|
|
321
|
+
status: 'ready'
|
|
322
|
+
}))
|
|
323
|
+
: []
|
|
324
|
+
restoredAt.value = draft.savedAt || ''
|
|
325
|
+
savedAt.value = draft.savedAt || ''
|
|
326
|
+
}
|
|
327
|
+
scheduleAutoSave()
|
|
328
|
+
updatePrediction()
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
function inputExistingUsers(ids) {
|
|
332
|
+
const valid = new Set(oa.org.users.map((user) => String(user.id)))
|
|
333
|
+
return ids.filter((id) => valid.has(String(id)))
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
function readData() {
|
|
337
|
+
return formRef.value?.formData
|
|
338
|
+
? JSON.parse(JSON.stringify(formRef.value.formData))
|
|
339
|
+
: {}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
function attachmentMeta() {
|
|
343
|
+
return fileList.value.map((file) => ({
|
|
344
|
+
name: file.name,
|
|
345
|
+
size: Number(file.size) || 0,
|
|
346
|
+
type: file.raw?.type || file.type || ''
|
|
347
|
+
}))
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function handleExceed() {
|
|
351
|
+
ElMessage.warning('最多上传 5 个附件,请先移除不需要的文件')
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
function scheduleAutoSave() {
|
|
355
|
+
if (!initialized.value) return
|
|
356
|
+
if (draftTimer) clearTimeout(draftTimer)
|
|
357
|
+
draftTimer = setTimeout(() => {
|
|
358
|
+
draftTimer = null
|
|
359
|
+
if (!initialized.value) return
|
|
360
|
+
const at = new Date().toISOString()
|
|
361
|
+
oa.saveDraft(props.definition.meta?.id, {
|
|
362
|
+
title: title.value,
|
|
363
|
+
data: readData(),
|
|
364
|
+
ccSelections: JSON.parse(JSON.stringify(ccSelections)),
|
|
365
|
+
attachments: attachmentMeta()
|
|
366
|
+
})
|
|
367
|
+
savedAt.value = at
|
|
368
|
+
}, 600)
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
function updatePrediction() {
|
|
372
|
+
if (!initialized.value) return
|
|
373
|
+
try {
|
|
374
|
+
prediction.value = oa.previewRoute({
|
|
375
|
+
definition: props.definition,
|
|
376
|
+
data: readData(),
|
|
377
|
+
ccSelections,
|
|
378
|
+
initiatorId: oa.currentUserId.value
|
|
379
|
+
})
|
|
380
|
+
routeSteps.value = buildPredictionSteps(prediction.value)
|
|
381
|
+
const warning = prediction.value?.warnings?.[0]
|
|
382
|
+
routeError.value = warning?.message || ''
|
|
383
|
+
} catch (error) {
|
|
384
|
+
routeSteps.value = []
|
|
385
|
+
routeError.value = error.message || '路径预测失败'
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
function schedulePrediction() {
|
|
390
|
+
if (predictTimer) clearTimeout(predictTimer)
|
|
391
|
+
predictTimer = setTimeout(() => {
|
|
392
|
+
predictTimer = null
|
|
393
|
+
updatePrediction()
|
|
394
|
+
}, 260)
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
watch(
|
|
398
|
+
[title, () => formRef.value?.formData, ccSelections, fileList],
|
|
399
|
+
() => {
|
|
400
|
+
scheduleAutoSave()
|
|
401
|
+
schedulePrediction()
|
|
402
|
+
},
|
|
403
|
+
{ deep: true }
|
|
404
|
+
)
|
|
405
|
+
|
|
406
|
+
function clearDraft() {
|
|
407
|
+
if (draftTimer) {
|
|
408
|
+
clearTimeout(draftTimer)
|
|
409
|
+
draftTimer = null
|
|
410
|
+
}
|
|
411
|
+
oa.clearDraft(props.definition.meta?.id)
|
|
412
|
+
initialized.value = false
|
|
413
|
+
restoredAt.value = ''
|
|
414
|
+
savedAt.value = ''
|
|
415
|
+
title.value = ''
|
|
416
|
+
fileList.value = []
|
|
417
|
+
formKey.value += 1
|
|
418
|
+
resetCcNodes()
|
|
419
|
+
nextTick(() => initialize())
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
function flushDraft() {
|
|
423
|
+
if (!initialized.value) return
|
|
424
|
+
if (draftTimer) {
|
|
425
|
+
clearTimeout(draftTimer)
|
|
426
|
+
draftTimer = null
|
|
427
|
+
}
|
|
428
|
+
const at = new Date().toISOString()
|
|
429
|
+
oa.saveDraft(props.definition.meta?.id, {
|
|
430
|
+
title: title.value,
|
|
431
|
+
data: readData(),
|
|
432
|
+
ccSelections: JSON.parse(JSON.stringify(ccSelections)),
|
|
433
|
+
attachments: attachmentMeta()
|
|
434
|
+
})
|
|
435
|
+
savedAt.value = at
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function handleDialogVisible(visible) {
|
|
439
|
+
if (!visible) close()
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
function close() {
|
|
443
|
+
if (submitting.value) return
|
|
444
|
+
flushDraft()
|
|
445
|
+
emit('close')
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
async function submit() {
|
|
449
|
+
if (submitting.value) return
|
|
450
|
+
const viewer = formRef.value
|
|
451
|
+
if (!viewer) return
|
|
452
|
+
try {
|
|
453
|
+
await viewer.formRef?.validate?.()
|
|
454
|
+
} catch {
|
|
455
|
+
ElMessage.warning('请先完善表单必填项')
|
|
456
|
+
return
|
|
457
|
+
}
|
|
458
|
+
submitting.value = true
|
|
459
|
+
try {
|
|
460
|
+
const instance = oa.startFlow({
|
|
461
|
+
definition: props.definition,
|
|
462
|
+
title: title.value,
|
|
463
|
+
data: readData(),
|
|
464
|
+
ccSelections: JSON.parse(JSON.stringify(ccSelections)),
|
|
465
|
+
attachments: attachmentMeta(),
|
|
466
|
+
initiatorId: oa.currentUserId.value
|
|
467
|
+
})
|
|
468
|
+
oa.clearDraft(props.definition.meta?.id)
|
|
469
|
+
if (draftTimer) {
|
|
470
|
+
clearTimeout(draftTimer)
|
|
471
|
+
draftTimer = null
|
|
472
|
+
}
|
|
473
|
+
initialized.value = false
|
|
474
|
+
const warning = instance.state?.warnings?.[0]
|
|
475
|
+
if (warning) ElMessage.warning(warning.message)
|
|
476
|
+
else ElMessage.success(`申请已提交,流程编号 ${instance.code}`)
|
|
477
|
+
emit('close')
|
|
478
|
+
} catch (error) {
|
|
479
|
+
ElMessage.error(error.message || '发起失败')
|
|
480
|
+
} finally {
|
|
481
|
+
submitting.value = false
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
onBeforeUnmount(() => {
|
|
486
|
+
if (predictTimer) clearTimeout(predictTimer)
|
|
487
|
+
flushDraft()
|
|
488
|
+
})
|
|
489
|
+
</script>
|
|
490
|
+
|
|
491
|
+
<style scoped lang="scss">
|
|
492
|
+
.oa-start {
|
|
493
|
+
display: flex;
|
|
494
|
+
flex-direction: column;
|
|
495
|
+
max-height: 88vh;
|
|
496
|
+
background: #f5f7fb;
|
|
497
|
+
border-radius: 12px;
|
|
498
|
+
overflow: hidden;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.oa-start__head {
|
|
502
|
+
flex-shrink: 0;
|
|
503
|
+
display: flex;
|
|
504
|
+
align-items: flex-start;
|
|
505
|
+
justify-content: space-between;
|
|
506
|
+
gap: 16px;
|
|
507
|
+
padding: 18px 22px 15px;
|
|
508
|
+
background: #fff;
|
|
509
|
+
border-bottom: 1px solid var(--oa-line);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.oa-start__identity {
|
|
513
|
+
display: flex;
|
|
514
|
+
align-items: flex-start;
|
|
515
|
+
gap: 12px;
|
|
516
|
+
min-width: 0;
|
|
517
|
+
|
|
518
|
+
h2 {
|
|
519
|
+
margin: 3px 0 0;
|
|
520
|
+
color: var(--oa-ink-strong);
|
|
521
|
+
font-size: 19px;
|
|
522
|
+
font-weight: 650;
|
|
523
|
+
letter-spacing: -0.02em;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
p {
|
|
527
|
+
margin: 3px 0 0;
|
|
528
|
+
color: var(--oa-muted);
|
|
529
|
+
font-size: 11.5px;
|
|
530
|
+
line-height: 1.6;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.oa-start__eyebrow {
|
|
535
|
+
display: inline-flex;
|
|
536
|
+
align-items: center;
|
|
537
|
+
gap: 6px;
|
|
538
|
+
color: var(--oa-faint);
|
|
539
|
+
font-size: 10px;
|
|
540
|
+
font-weight: 600;
|
|
541
|
+
letter-spacing: 0.06em;
|
|
542
|
+
|
|
543
|
+
span {
|
|
544
|
+
padding: 0 5px;
|
|
545
|
+
border-radius: 3px;
|
|
546
|
+
background: var(--oa-primary-soft);
|
|
547
|
+
color: var(--oa-primary);
|
|
548
|
+
font-size: 9px;
|
|
549
|
+
letter-spacing: 0;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.oa-start__close {
|
|
554
|
+
display: grid;
|
|
555
|
+
place-items: center;
|
|
556
|
+
width: 32px;
|
|
557
|
+
height: 32px;
|
|
558
|
+
flex-shrink: 0;
|
|
559
|
+
border: 1px solid var(--oa-line);
|
|
560
|
+
border-radius: 7px;
|
|
561
|
+
background: #fff;
|
|
562
|
+
color: var(--oa-muted);
|
|
563
|
+
cursor: pointer;
|
|
564
|
+
|
|
565
|
+
&:hover {
|
|
566
|
+
background: #f7f9fc;
|
|
567
|
+
color: var(--oa-ink);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.oa-start__body {
|
|
572
|
+
flex: 1;
|
|
573
|
+
min-height: 0;
|
|
574
|
+
display: grid;
|
|
575
|
+
grid-template-columns: minmax(0, 1fr) 340px;
|
|
576
|
+
gap: 0;
|
|
577
|
+
overflow: hidden;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.oa-start__form-side {
|
|
581
|
+
min-width: 0;
|
|
582
|
+
overflow: auto;
|
|
583
|
+
padding: 18px 22px 22px;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.oa-start__applicant {
|
|
587
|
+
display: flex;
|
|
588
|
+
align-items: center;
|
|
589
|
+
gap: 10px;
|
|
590
|
+
padding: 10px 12px;
|
|
591
|
+
border: 1px solid var(--oa-line);
|
|
592
|
+
border-radius: 8px;
|
|
593
|
+
background: #fff;
|
|
594
|
+
|
|
595
|
+
.oa-chip {
|
|
596
|
+
margin-left: auto;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.oa-start__applicant-main {
|
|
601
|
+
display: flex;
|
|
602
|
+
flex-direction: column;
|
|
603
|
+
|
|
604
|
+
strong {
|
|
605
|
+
color: var(--oa-ink);
|
|
606
|
+
font-size: 12.5px;
|
|
607
|
+
font-weight: 600;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
span {
|
|
611
|
+
color: var(--oa-faint);
|
|
612
|
+
font-size: 10.5px;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.oa-start__restore {
|
|
617
|
+
margin-top: 10px;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.oa-start__restore-line {
|
|
621
|
+
margin-top: 2px;
|
|
622
|
+
color: var(--oa-muted);
|
|
623
|
+
font-size: 11px;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.oa-start__field {
|
|
627
|
+
display: flex;
|
|
628
|
+
flex-direction: column;
|
|
629
|
+
gap: 6px;
|
|
630
|
+
margin-top: 14px;
|
|
631
|
+
|
|
632
|
+
label {
|
|
633
|
+
display: flex;
|
|
634
|
+
align-items: baseline;
|
|
635
|
+
gap: 7px;
|
|
636
|
+
color: var(--oa-ink);
|
|
637
|
+
font-size: 12px;
|
|
638
|
+
font-weight: 600;
|
|
639
|
+
|
|
640
|
+
span {
|
|
641
|
+
color: var(--oa-faint);
|
|
642
|
+
font-size: 10px;
|
|
643
|
+
font-weight: 400;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.oa-start__form-card,
|
|
649
|
+
.oa-start__cc,
|
|
650
|
+
.oa-start__material,
|
|
651
|
+
.oa-start__upload {
|
|
652
|
+
margin-top: 12px;
|
|
653
|
+
border: 1px solid var(--oa-line);
|
|
654
|
+
border-radius: 9px;
|
|
655
|
+
background: #fff;
|
|
656
|
+
overflow: hidden;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.oa-start__form-head {
|
|
660
|
+
display: flex;
|
|
661
|
+
align-items: center;
|
|
662
|
+
justify-content: space-between;
|
|
663
|
+
gap: 12px;
|
|
664
|
+
padding: 11px 16px;
|
|
665
|
+
border-bottom: 1px solid #f0f3f8;
|
|
666
|
+
|
|
667
|
+
h3 {
|
|
668
|
+
margin: 0;
|
|
669
|
+
color: var(--oa-ink);
|
|
670
|
+
font-size: 12.5px;
|
|
671
|
+
font-weight: 650;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
span {
|
|
675
|
+
color: var(--oa-faint);
|
|
676
|
+
font-size: 10px;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
i {
|
|
680
|
+
color: var(--oa-danger);
|
|
681
|
+
font-style: normal;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.oa-start__form-card {
|
|
686
|
+
:deep(.form-view-container) {
|
|
687
|
+
height: auto;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
:deep(.form-view-content) {
|
|
691
|
+
overflow: visible;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
:deep(.form-wrapper) {
|
|
695
|
+
padding: 8px 16px 14px;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
:deep(.el-form-item) {
|
|
699
|
+
margin-bottom: 14px;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
:deep(.el-form-item__label) {
|
|
703
|
+
color: var(--oa-muted);
|
|
704
|
+
font-size: 11.5px;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
.oa-start__upload {
|
|
709
|
+
padding-bottom: 12px;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
.oa-uploader {
|
|
713
|
+
padding: 0 16px;
|
|
714
|
+
|
|
715
|
+
:deep(.el-upload) {
|
|
716
|
+
width: 100%;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
:deep(.el-upload-dragger) {
|
|
720
|
+
padding: 18px 12px;
|
|
721
|
+
border-color: #dfe6f1;
|
|
722
|
+
border-radius: 7px;
|
|
723
|
+
background: #fbfcff;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
:deep(.el-upload-dragger:hover) {
|
|
727
|
+
border-color: var(--oa-primary);
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
:deep(.el-upload__text) {
|
|
731
|
+
color: var(--oa-muted);
|
|
732
|
+
font-size: 11px;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
:deep(.el-upload__text em) {
|
|
736
|
+
color: var(--oa-primary);
|
|
737
|
+
font-style: normal;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
:deep(.el-upload__tip) {
|
|
741
|
+
color: var(--oa-faint);
|
|
742
|
+
font-size: 10px;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
:deep(.el-upload-list__item) {
|
|
746
|
+
margin-top: 4px;
|
|
747
|
+
font-size: 11px;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.oa-uploader__icon {
|
|
752
|
+
margin-bottom: 5px;
|
|
753
|
+
color: #9bb0d4;
|
|
754
|
+
font-size: 24px;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.oa-start__cc-row {
|
|
758
|
+
display: flex;
|
|
759
|
+
flex-direction: column;
|
|
760
|
+
gap: 5px;
|
|
761
|
+
padding: 10px 16px;
|
|
762
|
+
|
|
763
|
+
label {
|
|
764
|
+
color: var(--oa-muted);
|
|
765
|
+
font-size: 11px;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
:deep(.el-select) {
|
|
769
|
+
width: 100%;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
.oa-start__material {
|
|
774
|
+
padding: 12px 16px;
|
|
775
|
+
|
|
776
|
+
h3 {
|
|
777
|
+
margin: 0 0 7px;
|
|
778
|
+
color: var(--oa-ink);
|
|
779
|
+
font-size: 12px;
|
|
780
|
+
font-weight: 650;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
ul {
|
|
784
|
+
display: flex;
|
|
785
|
+
flex-wrap: wrap;
|
|
786
|
+
gap: 8px 18px;
|
|
787
|
+
margin: 0;
|
|
788
|
+
padding: 0;
|
|
789
|
+
list-style: none;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
li {
|
|
793
|
+
display: inline-flex;
|
|
794
|
+
align-items: center;
|
|
795
|
+
gap: 5px;
|
|
796
|
+
color: var(--oa-muted);
|
|
797
|
+
font-size: 10.5px;
|
|
798
|
+
|
|
799
|
+
.el-icon {
|
|
800
|
+
color: var(--oa-faint);
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.oa-start__preview {
|
|
806
|
+
display: flex;
|
|
807
|
+
flex-direction: column;
|
|
808
|
+
min-height: 0;
|
|
809
|
+
padding: 18px 18px 16px;
|
|
810
|
+
background: #fff;
|
|
811
|
+
border-left: 1px solid var(--oa-line);
|
|
812
|
+
overflow: auto;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.oa-start__preview-head {
|
|
816
|
+
display: flex;
|
|
817
|
+
align-items: flex-start;
|
|
818
|
+
justify-content: space-between;
|
|
819
|
+
gap: 10px;
|
|
820
|
+
|
|
821
|
+
h3 {
|
|
822
|
+
margin: 2px 0 0;
|
|
823
|
+
color: var(--oa-ink);
|
|
824
|
+
font-size: 14px;
|
|
825
|
+
font-weight: 650;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
.oa-start__preview-eyebrow {
|
|
830
|
+
color: var(--oa-faint);
|
|
831
|
+
font-size: 9.5px;
|
|
832
|
+
font-weight: 600;
|
|
833
|
+
letter-spacing: 0.08em;
|
|
834
|
+
text-transform: uppercase;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
.oa-start__preview-metrics {
|
|
838
|
+
display: grid;
|
|
839
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
840
|
+
gap: 5px;
|
|
841
|
+
margin-top: 12px;
|
|
842
|
+
padding: 10px 0;
|
|
843
|
+
border-top: 1px solid #f0f3f8;
|
|
844
|
+
border-bottom: 1px solid #f0f3f8;
|
|
845
|
+
|
|
846
|
+
div {
|
|
847
|
+
display: flex;
|
|
848
|
+
flex-direction: column;
|
|
849
|
+
gap: 1px;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
span {
|
|
853
|
+
color: var(--oa-faint);
|
|
854
|
+
font-size: 9.5px;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
strong {
|
|
858
|
+
color: var(--oa-ink);
|
|
859
|
+
font-size: 12px;
|
|
860
|
+
font-weight: 650;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
.oa-start__branches {
|
|
865
|
+
display: flex;
|
|
866
|
+
flex-wrap: wrap;
|
|
867
|
+
align-items: center;
|
|
868
|
+
gap: 5px;
|
|
869
|
+
margin-top: 10px;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
.oa-start__branches-label {
|
|
873
|
+
color: var(--oa-faint);
|
|
874
|
+
font-size: 10px;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.oa-start__preview-body {
|
|
878
|
+
flex: 1;
|
|
879
|
+
min-height: 0;
|
|
880
|
+
margin-top: 12px;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
.oa-start__warning {
|
|
884
|
+
display: flex;
|
|
885
|
+
align-items: flex-start;
|
|
886
|
+
gap: 5px;
|
|
887
|
+
margin-top: 10px;
|
|
888
|
+
padding: 7px 9px;
|
|
889
|
+
border-radius: 6px;
|
|
890
|
+
background: var(--oa-warning-soft);
|
|
891
|
+
color: #8d5d17;
|
|
892
|
+
font-size: 10.5px;
|
|
893
|
+
line-height: 1.6;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
.oa-start__preview-note {
|
|
897
|
+
display: flex;
|
|
898
|
+
gap: 6px;
|
|
899
|
+
margin-top: 12px;
|
|
900
|
+
padding-top: 10px;
|
|
901
|
+
border-top: 1px dashed var(--oa-line);
|
|
902
|
+
color: var(--oa-faint);
|
|
903
|
+
|
|
904
|
+
.el-icon {
|
|
905
|
+
margin-top: 2px;
|
|
906
|
+
flex-shrink: 0;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
p {
|
|
910
|
+
margin: 0;
|
|
911
|
+
font-size: 10px;
|
|
912
|
+
line-height: 1.7;
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
.oa-start__footer {
|
|
917
|
+
flex-shrink: 0;
|
|
918
|
+
display: flex;
|
|
919
|
+
align-items: center;
|
|
920
|
+
justify-content: space-between;
|
|
921
|
+
gap: 16px;
|
|
922
|
+
padding: 12px 22px;
|
|
923
|
+
background: #fff;
|
|
924
|
+
border-top: 1px solid var(--oa-line);
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
.oa-start__draft {
|
|
928
|
+
display: flex;
|
|
929
|
+
align-items: center;
|
|
930
|
+
gap: 10px;
|
|
931
|
+
color: var(--oa-faint);
|
|
932
|
+
font-size: 10.5px;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
.oa-start__saved {
|
|
936
|
+
display: inline-flex;
|
|
937
|
+
align-items: center;
|
|
938
|
+
gap: 4px;
|
|
939
|
+
color: var(--oa-success);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
.oa-start__footer-actions {
|
|
943
|
+
display: flex;
|
|
944
|
+
gap: 8px;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
.oa-empty--sm {
|
|
948
|
+
padding: 26px 16px;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
@media (max-width: 960px) {
|
|
952
|
+
.oa-start {
|
|
953
|
+
max-height: 92vh;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
.oa-start__form-card :deep(.form-wrapper) {
|
|
957
|
+
display: block;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
.oa-start__form-card :deep(.form-item-wrapper),
|
|
961
|
+
.oa-start__form-card :deep(.form-item-wrapper.is-row),
|
|
962
|
+
.oa-start__form-card :deep(.form-item-wrapper[style*='--item-width']) {
|
|
963
|
+
width: 100% !important;
|
|
964
|
+
max-width: 100% !important;
|
|
965
|
+
flex: 0 0 100% !important;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
.oa-start__form-card :deep(.row-container .el-col) {
|
|
969
|
+
width: 100% !important;
|
|
970
|
+
max-width: 100% !important;
|
|
971
|
+
flex: 0 0 100% !important;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
.oa-start__form-card :deep(.el-form-item) {
|
|
975
|
+
display: flex;
|
|
976
|
+
flex-direction: column;
|
|
977
|
+
align-items: stretch;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
.oa-start__form-card :deep(.el-form-item__label) {
|
|
981
|
+
width: auto !important;
|
|
982
|
+
height: auto;
|
|
983
|
+
padding: 0 0 5px;
|
|
984
|
+
justify-content: flex-start;
|
|
985
|
+
line-height: 1.4;
|
|
986
|
+
text-align: left;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
.oa-start__form-card :deep(.el-form-item__content) {
|
|
990
|
+
width: 100%;
|
|
991
|
+
margin-left: 0 !important;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
.oa-start__form-card :deep(.el-date-editor.el-input),
|
|
995
|
+
.oa-start__form-card :deep(.el-input-number),
|
|
996
|
+
.oa-start__form-card :deep(.el-select) {
|
|
997
|
+
width: 100% !important;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
.oa-start__head {
|
|
1001
|
+
padding: 13px 14px 12px;
|
|
1002
|
+
|
|
1003
|
+
h2 {
|
|
1004
|
+
font-size: 16px;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
p {
|
|
1008
|
+
display: none;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
.oa-start__body {
|
|
1013
|
+
display: block;
|
|
1014
|
+
overflow: auto;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
.oa-start__form-side {
|
|
1018
|
+
padding: 12px;
|
|
1019
|
+
overflow: visible;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
.oa-start__preview {
|
|
1023
|
+
border-top: 1px solid var(--oa-line);
|
|
1024
|
+
border-left: none;
|
|
1025
|
+
padding: 14px;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
.oa-start__preview-body {
|
|
1029
|
+
max-height: 300px;
|
|
1030
|
+
overflow: auto;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
.oa-start__footer {
|
|
1034
|
+
position: sticky;
|
|
1035
|
+
bottom: 0;
|
|
1036
|
+
z-index: 2;
|
|
1037
|
+
padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
|
|
1038
|
+
flex-wrap: wrap;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.oa-start__draft {
|
|
1042
|
+
display: none;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.oa-start__footer-actions {
|
|
1046
|
+
width: 100%;
|
|
1047
|
+
|
|
1048
|
+
.el-button {
|
|
1049
|
+
flex: 1;
|
|
1050
|
+
min-height: 44px;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.oa-start__form-card :deep(.form-wrapper) {
|
|
1055
|
+
padding: 4px 12px 8px;
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
</style>
|