| | |
| | | saveStoredRows, |
| | | buildDefaultFlowNodes, |
| | | } from "./approveListConstants.js"; |
| | | import { buildSubmitTemplateFromRow } from "../approve-template/formConfigUtils.js"; |
| | | |
| | | function advanceFlow(row, result, opinion) { |
| | | const nodes = row.approvalFlowNodes || []; |
| | |
| | | return filteredList.value.slice(start, start + page.size); |
| | | }); |
| | | |
| | | const activeTemplate = computed(() => SUBMIT_TEMPLATES[submitForm.templateKey] || null); |
| | | const activeTemplate = computed( |
| | | () => submitForm.templateSnapshot || SUBMIT_TEMPLATES[submitForm.templateKey] || null |
| | | ); |
| | | |
| | | const submitFormRules = computed(() => { |
| | | const rules = { |
| | |
| | | submitDialog.visible = true; |
| | | } |
| | | |
| | | function onTemplatePick(key) { |
| | | Object.assign(submitForm, createEmptySubmitForm(key)); |
| | | /** @param {string} key 内置模板 key 或自定义 id */ |
| | | function onTemplatePick(key, templateRow) { |
| | | const base = templateRow |
| | | ? createEmptySubmitForm(key, buildSubmitTemplateFromRow(templateRow)) |
| | | : createEmptySubmitForm(key); |
| | | Object.assign(submitForm, { |
| | | ...base, |
| | | templateSnapshot: templateRow ? buildSubmitTemplateFromRow(templateRow) : null, |
| | | }); |
| | | submitDialog.step = 2; |
| | | } |
| | | |