yyb
18 小时以前 6c324a234060820d031014ea657af5aa0b0d478e
src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
@@ -15,6 +15,7 @@
  saveStoredRows,
  buildDefaultFlowNodes,
} from "./approveListConstants.js";
import { buildSubmitTemplateFromRow } from "../approve-template/formConfigUtils.js";
function advanceFlow(row, result, opinion) {
  const nodes = row.approvalFlowNodes || [];
@@ -110,7 +111,9 @@
    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 = {
@@ -232,8 +235,15 @@
    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;
  }