import { defineComponent, ref, reactive, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderStyle, ssrRenderList, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual } from 'vue/server-renderer'; import { u as useApi } from './useApi-B-E5eLsI.mjs'; import { u as useToast } from './useToast-CS21XT61.mjs'; import './server.mjs'; import '../nitro/nitro.mjs'; import 'node:http'; import 'node:https'; import 'node:events'; import 'node:buffer'; import 'node:fs'; import 'node:path'; import 'node:crypto'; import 'node:url'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'unhead/server'; import 'devalue'; import 'unhead/utils'; import 'pinia'; import 'perfect-debounce'; import './useLoading-D4zrSa2m.mjs'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "factory", __ssrInlineRender: true, setup(__props) { useApi(); useToast(); const view = ref("list"); const rows = ref([]); const providers = ref([]); const loading = ref(false); const submitting = ref(false); const isEditing = ref(false); const emails = ref([]); const newEmail = ref(""); const form = reactive({ id: 0, brand: "", providerid: 0, description: "" }); function hexId(id) { return id ? Number(id).toString(16).toUpperCase() : ""; } function mailList(s) { return (s || "").split(",").map((e) => e.trim()).filter(Boolean); } function providerName(pid) { if (!pid) return "-"; const p = providers.value.find((x) => x.id === pid); return p ? p.name : "方案商#" + pid; } return (_ctx, _push, _parent, _attrs) => { _push(`
| ID | 品牌名称 | 归属方案商 | 联系邮箱 | 产品 | 操作 |
|---|---|---|---|---|---|
| 暂无数据 | |||||
| ${ssrInterpolate(hexId(b.id))} | ${ssrInterpolate(b.brand)} | ${ssrInterpolate(providerName(b.providerid))} | `); if (mailList(b.contactmails).length) { _push(``); ssrRenderList(mailList(b.contactmails), (e, i) => { _push(`${ssrInterpolate(e)}`); }); _push(``); } else { _push(`-`); } _push(` | ${ssrInterpolate(b.productlists || "")} | |