yyb
14 小时以前 a567edf28abb00581c93b27405ed9657b63a8bd7
src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js
@@ -14,7 +14,9 @@
export { TEMPLATE_TYPE_OPTIONS };
export function templateTypeLabel(type) {
  return TEMPLATE_TYPE_OPTIONS.find((x) => x.value === type)?.label || "—";
  if (type == null || type === "") return "—";
  const n = Number(type);
  return TEMPLATE_TYPE_OPTIONS.find((x) => x.value === n)?.label || "—";
}
/** 节点内审批方式:会签 / 或签 */
@@ -162,7 +164,7 @@
    description: row.description || "",
    enabled: mapEnabledFromApi(row.enabled),
    enabledRaw: row.enabled,
    templateType: row.templateType,
    templateType: row.templateType != null ? Number(row.templateType) : undefined,
    formConfig: row.formConfig,
    formConfigData: parseFormConfigToData(row.formConfig),
    createdUser: row.createdUser,
@@ -210,15 +212,14 @@
  return dto;
}
/** 构建分页查询参数 */
export function buildApprovalTemplateListParams({ page, searchForm }) {
export function buildApprovalTemplateListParams({ page, searchForm, templateType = TEMPLATE_TYPE_CUSTOM }) {
  const params = {
    current: page.current,
    size: page.size,
    templateType: searchForm?.templateType != null && searchForm.templateType !== ""
      ? searchForm.templateType
      : templateType,
  };
  if (searchForm?.templateType != null && searchForm.templateType !== "") {
    params.templateType = searchForm.templateType;
  }
  const kw = (searchForm?.keyword || "").trim();
  if (kw) params.templateName = kw;
  if (searchForm?.enabledOnly) params.enabled = "1";