hsy
13 小时以前 2d3530a7c11557a40807ad7c0b9e302ce6ce3a9f
src/views/officeProcessAutomation/ApproveManage/approve-template/useSelectOptionSources.js
@@ -14,25 +14,26 @@
    deptOptions: [],
  });
  async function ensureForFields(fields) {
    const sources = collectOptionSourcesFromFields(fields);
  async function ensureForFields(fields, context = {}) {
    const sources = collectOptionSourcesFromFields(fields, context);
    if (!sources.length) return;
    loading.value = true;
    try {
      const next = await fetchSelectOptionCaches(sources);
      caches.users = next.users;
      caches.deptOptions = next.deptOptions;
      caches.employees = next.employees || [];
    } finally {
      loading.value = false;
    }
  }
  function getOptions(field) {
    return resolveFieldSelectOptions(field, caches);
  function getOptions(field, context = {}) {
    return resolveFieldSelectOptions(field, caches, context);
  }
  function getDisplayLabel(field, val) {
    return resolveSelectDisplayLabel(field, val, caches);
  function getDisplayLabel(field, val, context = {}) {
    return resolveSelectDisplayLabel(field, val, caches, context);
  }
  return {