import { defineComponent, ref, reactive, computed, resolveComponent, mergeProps, withCtx, unref, createTextVNode, createVNode, toDisplayString, createBlock, openBlock, Fragment, renderList, isRef, createCommentVNode, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrRenderClass, ssrInterpolate } from 'vue/server-renderer'; import { ReloadOutlined } from '@ant-design/icons-vue'; import { message } from 'ant-design-vue'; import { a as _export_sfc, c as useHead } from './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 'better-sqlite3'; import 'vue-router'; import '@babel/runtime/helpers/esm/extends'; import 'stylis'; import 'dayjs'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'unhead/server'; import 'devalue'; import 'unhead/plugins'; import 'unhead/utils'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "index", __ssrInlineRender: true, setup(__props) { useHead({ title: "建言管理 - 后台管理" }); const loading = ref(false); const suggestions = ref([]); const filterStatus = ref(void 0); const searchKeyword = ref(""); const pagination = reactive({ current: 1, pageSize: 20, showSizeChanger: true, showQuickJumper: true }); const statCards = reactive([ { key: 0, icon: "⏳", label: "待处理", value: 0, color: "orange" }, { key: 1, icon: "✅", label: "已处理", value: 0, color: "blue" }, { key: 2, icon: "🎯", label: "已采纳", value: 0, color: "green" }, { key: -1, icon: "📝", label: "全部建言", value: 0, color: "purple" } ]); const columns = [ { title: "建言信息", key: "info", width: 280 }, { title: "内容预览", key: "content", width: 200 }, { title: "状态", key: "status", width: 100 }, { title: "操作", key: "action", width: 120 } ]; const showDetailModal = ref(false); const currentSuggestion = ref(null); const replyForm = reactive({ reply: "", status: 1 }); const filteredSuggestions = computed(() => { const keyword = searchKeyword.value.trim().toLowerCase(); return suggestions.value.filter((item) => filterStatus.value === void 0 || item.status === filterStatus.value).filter((item) => { if (!keyword) return true; return [item.title, item.content].some((val) => String(val || "").toLowerCase().includes(keyword)); }).sort((a, b) => (b.id || 0) - (a.id || 0)); }); const pagedSuggestions = computed(() => { const start = (pagination.current - 1) * pagination.pageSize; return filteredSuggestions.value.slice(start, start + pagination.pageSize); }); const tablePagination = computed(() => ({ current: pagination.current, pageSize: pagination.pageSize, total: filteredSuggestions.value.length, showSizeChanger: pagination.showSizeChanger, showQuickJumper: pagination.showQuickJumper })); function updateStats() { statCards[0].value = suggestions.value.filter((i) => i.status === 0).length; statCards[1].value = suggestions.value.filter((i) => i.status === 1).length; statCards[2].value = suggestions.value.filter((i) => i.status === 2).length; statCards[3].value = suggestions.value.length; } async function loadSuggestions() { loading.value = true; try { updateStats(); } catch (e) { message.error(e?.message || "加载建言列表失败"); } finally { loading.value = false; } } function handleStatFilter(key) { filterStatus.value = key === -1 ? void 0 : key; pagination.current = 1; } function handleSearch() { pagination.current = 1; } function handleTableChange(pag) { pagination.current = pag.current; pagination.pageSize = pag.pageSize; } function handleView(record) { currentSuggestion.value = record; replyForm.reply = ""; replyForm.status = 1; showDetailModal.value = true; } function handleProcess(record) { handleView(record); } async function handleSubmitReply() { if (!currentSuggestion.value?.id) return; try { message.success("处理成功"); showDetailModal.value = false; await loadSuggestions(); } catch (e) { message.error(e?.message || "处理失败"); } } function statusText(status) { const map = { 0: "待处理", 1: "已处理", 2: "已采纳" }; return map[status ?? -1] || "-"; } function statusColor(status) { const map = { 0: "orange", 1: "blue", 2: "success" }; return map[status ?? -1] || "default"; } return (_ctx, _push, _parent, _attrs) => { const _component_a_space = resolveComponent("a-space"); const _component_a_button = resolveComponent("a-button"); const _component_a_row = resolveComponent("a-row"); const _component_a_col = resolveComponent("a-col"); const _component_a_select = resolveComponent("a-select"); const _component_a_select_option = resolveComponent("a-select-option"); const _component_a_input_search = resolveComponent("a-input-search"); const _component_a_table = resolveComponent("a-table"); const _component_a_tag = resolveComponent("a-tag"); const _component_a_modal = resolveComponent("a-modal"); const _component_a_descriptions = resolveComponent("a-descriptions"); const _component_a_descriptions_item = resolveComponent("a-descriptions-item"); const _component_a_divider = resolveComponent("a-divider"); const _component_a_form = resolveComponent("a-form"); const _component_a_form_item = resolveComponent("a-form-item"); const _component_a_textarea = resolveComponent("a-textarea"); _push(``); _push(ssrRenderComponent(_component_a_row, { gutter: [16, 16], class: "mb-6" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(``); ssrRenderList(unref(statCards), (stat) => { _push2(ssrRenderComponent(_component_a_col, { xs: 12, sm: 6, key: stat.key }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`
${ssrInterpolate(stat.icon)}
${ssrInterpolate(stat.value)}
${ssrInterpolate(stat.label)}
`); } else { return [ createVNode("div", { class: ["stat-card", [stat.color, { active: unref(filterStatus) === stat.key }]], onClick: ($event) => handleStatFilter(stat.key) }, [ createVNode("div", { class: "stat-icon" }, toDisplayString(stat.icon), 1), createVNode("div", { class: "stat-info" }, [ createVNode("div", { class: "stat-value" }, toDisplayString(stat.value), 1), createVNode("div", { class: "stat-label" }, toDisplayString(stat.label), 1) ]) ], 10, ["onClick"]) ]; } }), _: 2 }, _parent2, _scopeId)); }); _push2(``); } else { return [ (openBlock(true), createBlock(Fragment, null, renderList(unref(statCards), (stat) => { return openBlock(), createBlock(_component_a_col, { xs: 12, sm: 6, key: stat.key }, { default: withCtx(() => [ createVNode("div", { class: ["stat-card", [stat.color, { active: unref(filterStatus) === stat.key }]], onClick: ($event) => handleStatFilter(stat.key) }, [ createVNode("div", { class: "stat-icon" }, toDisplayString(stat.icon), 1), createVNode("div", { class: "stat-info" }, [ createVNode("div", { class: "stat-value" }, toDisplayString(stat.value), 1), createVNode("div", { class: "stat-label" }, toDisplayString(stat.label), 1) ]) ], 10, ["onClick"]) ]), _: 2 }, 1024); }), 128)) ]; } }), _: 1 }, _parent)); _push(`
📋 建言列表`); _push(ssrRenderComponent(_component_a_space, { wrap: "" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_a_select, { value: unref(filterStatus), "onUpdate:value": ($event) => isRef(filterStatus) ? filterStatus.value = $event : null, style: { "width": "120px" }, onChange: handleSearch }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_select_option, { value: void 0 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`全部状态`); } else { return [ createTextVNode("全部状态") ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_select_option, { value: 0 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`待处理`); } else { return [ createTextVNode("待处理") ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_select_option, { value: 1 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`已处理`); } else { return [ createTextVNode("已处理") ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_select_option, { value: 2 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`已采纳`); } else { return [ createTextVNode("已采纳") ]; } }), _: 1 }, _parent3, _scopeId2)); } else { return [ createVNode(_component_a_select_option, { value: void 0 }, { default: withCtx(() => [ createTextVNode("全部状态") ]), _: 1 }), createVNode(_component_a_select_option, { value: 0 }, { default: withCtx(() => [ createTextVNode("待处理") ]), _: 1 }), createVNode(_component_a_select_option, { value: 1 }, { default: withCtx(() => [ createTextVNode("已处理") ]), _: 1 }), createVNode(_component_a_select_option, { value: 2 }, { default: withCtx(() => [ createTextVNode("已采纳") ]), _: 1 }) ]; } }), _: 1 }, _parent2, _scopeId)); _push2(ssrRenderComponent(_component_a_input_search, { value: unref(searchKeyword), "onUpdate:value": ($event) => isRef(searchKeyword) ? searchKeyword.value = $event : null, placeholder: "搜索标题 / 内容", style: { "width": "240px" }, onSearch: handleSearch }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_a_select, { value: unref(filterStatus), "onUpdate:value": ($event) => isRef(filterStatus) ? filterStatus.value = $event : null, style: { "width": "120px" }, onChange: handleSearch }, { default: withCtx(() => [ createVNode(_component_a_select_option, { value: void 0 }, { default: withCtx(() => [ createTextVNode("全部状态") ]), _: 1 }), createVNode(_component_a_select_option, { value: 0 }, { default: withCtx(() => [ createTextVNode("待处理") ]), _: 1 }), createVNode(_component_a_select_option, { value: 1 }, { default: withCtx(() => [ createTextVNode("已处理") ]), _: 1 }), createVNode(_component_a_select_option, { value: 2 }, { default: withCtx(() => [ createTextVNode("已采纳") ]), _: 1 }) ]), _: 1 }, 8, ["value", "onUpdate:value"]), createVNode(_component_a_input_search, { value: unref(searchKeyword), "onUpdate:value": ($event) => isRef(searchKeyword) ? searchKeyword.value = $event : null, placeholder: "搜索标题 / 内容", style: { "width": "240px" }, onSearch: handleSearch }, null, 8, ["value", "onUpdate:value"]) ]; } }), _: 1 }, _parent)); _push(`
`); _push(ssrRenderComponent(_component_a_table, { columns, "data-source": unref(pagedSuggestions), loading: unref(loading), pagination: unref(tablePagination), "row-key": "id", onChange: handleTableChange, size: "middle" }, { bodyCell: withCtx(({ column, record }, _push2, _parent2, _scopeId) => { if (_push2) { if (column.key === "info") { _push2(`
${ssrInterpolate(record.title)}
👤 ${ssrInterpolate(record.authorName || "匿名")}📅 ${ssrInterpolate(record.createTime?.substring(0, 10) || "-")}
`); } else { _push2(``); } if (column.key === "content") { _push2(`
${ssrInterpolate(record.content?.substring(0, 50))}...
`); } else { _push2(``); } if (column.key === "status") { _push2(ssrRenderComponent(_component_a_tag, { color: statusColor(record.status) }, { default: withCtx((_, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`${ssrInterpolate(statusText(record.status))}`); } else { return [ createTextVNode(toDisplayString(statusText(record.status)), 1) ]; } }), _: 2 }, _parent2, _scopeId)); } else { _push2(``); } if (column.key === "action") { _push2(ssrRenderComponent(_component_a_space, null, { default: withCtx((_, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleView(record) }, { default: withCtx((_2, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`查看`); } else { return [ createTextVNode("查看") ]; } }), _: 2 }, _parent3, _scopeId2)); if (record.status === 0) { _push3(ssrRenderComponent(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleProcess(record) }, { default: withCtx((_2, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`处理`); } else { return [ createTextVNode("处理") ]; } }), _: 2 }, _parent3, _scopeId2)); } else { _push3(``); } } else { return [ createVNode(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleView(record) }, { default: withCtx(() => [ createTextVNode("查看") ]), _: 1 }, 8, ["onClick"]), record.status === 0 ? (openBlock(), createBlock(_component_a_button, { key: 0, type: "link", size: "small", onClick: ($event) => handleProcess(record) }, { default: withCtx(() => [ createTextVNode("处理") ]), _: 1 }, 8, ["onClick"])) : createCommentVNode("", true) ]; } }), _: 2 }, _parent2, _scopeId)); } else { _push2(``); } } else { return [ column.key === "info" ? (openBlock(), createBlock("div", { key: 0, class: "suggestion-info-cell" }, [ createVNode("div", { class: "suggestion-title" }, toDisplayString(record.title), 1), createVNode("div", { class: "suggestion-meta" }, [ createVNode("span", null, "👤 " + toDisplayString(record.authorName || "匿名"), 1), createVNode("span", { class: "meta-item" }, "📅 " + toDisplayString(record.createTime?.substring(0, 10) || "-"), 1) ]) ])) : createCommentVNode("", true), column.key === "content" ? (openBlock(), createBlock("div", { key: 1, class: "content-preview" }, toDisplayString(record.content?.substring(0, 50)) + "...", 1)) : createCommentVNode("", true), column.key === "status" ? (openBlock(), createBlock(_component_a_tag, { key: 2, color: statusColor(record.status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(record.status)), 1) ]), _: 2 }, 1032, ["color"])) : createCommentVNode("", true), column.key === "action" ? (openBlock(), createBlock(_component_a_space, { key: 3 }, { default: withCtx(() => [ createVNode(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleView(record) }, { default: withCtx(() => [ createTextVNode("查看") ]), _: 1 }, 8, ["onClick"]), record.status === 0 ? (openBlock(), createBlock(_component_a_button, { key: 0, type: "link", size: "small", onClick: ($event) => handleProcess(record) }, { default: withCtx(() => [ createTextVNode("处理") ]), _: 1 }, 8, ["onClick"])) : createCommentVNode("", true) ]), _: 2 }, 1024)) : createCommentVNode("", true) ]; } }), _: 1 }, _parent)); _push(`
`); _push(ssrRenderComponent(_component_a_modal, { open: unref(showDetailModal), "onUpdate:open": ($event) => isRef(showDetailModal) ? showDetailModal.value = $event : null, title: "建言详情", width: "700px", footer: null }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { if (unref(currentSuggestion)) { _push2(``); _push2(ssrRenderComponent(_component_a_descriptions, { column: 2, bordered: "", size: "small" }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "标题", span: 2 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentSuggestion).title)}`); } else { return [ createTextVNode(toDisplayString(unref(currentSuggestion).title), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "提交人" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentSuggestion).authorName || "匿名")}`); } else { return [ createTextVNode(toDisplayString(unref(currentSuggestion).authorName || "匿名"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "联系方式" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentSuggestion).contact || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentSuggestion).contact || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "提交时间" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentSuggestion).createTime?.substring(0, 16) || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentSuggestion).createTime?.substring(0, 16) || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "当前状态" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(ssrRenderComponent(_component_a_tag, { color: statusColor(unref(currentSuggestion).status) }, { default: withCtx((_4, _push5, _parent5, _scopeId4) => { if (_push5) { _push5(`${ssrInterpolate(statusText(unref(currentSuggestion).status))}`); } else { return [ createTextVNode(toDisplayString(statusText(unref(currentSuggestion).status)), 1) ]; } }), _: 1 }, _parent4, _scopeId3)); } else { return [ createVNode(_component_a_tag, { color: statusColor(unref(currentSuggestion).status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(unref(currentSuggestion).status)), 1) ]), _: 1 }, 8, ["color"]) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "建言内容", span: 2 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`
${ssrInterpolate(unref(currentSuggestion).content)}
`); } else { return [ createVNode("div", { class: "full-content" }, toDisplayString(unref(currentSuggestion).content), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); if (unref(currentSuggestion).reply) { _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "处理备注", span: 2 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentSuggestion).reply)}`); } else { return [ createTextVNode(toDisplayString(unref(currentSuggestion).reply), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); } else { _push3(``); } } else { return [ createVNode(_component_a_descriptions_item, { label: "标题", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentSuggestion).title), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "提交人" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentSuggestion).authorName || "匿名"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "联系方式" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentSuggestion).contact || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "提交时间" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentSuggestion).createTime?.substring(0, 16) || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "当前状态" }, { default: withCtx(() => [ createVNode(_component_a_tag, { color: statusColor(unref(currentSuggestion).status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(unref(currentSuggestion).status)), 1) ]), _: 1 }, 8, ["color"]) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "建言内容", span: 2 }, { default: withCtx(() => [ createVNode("div", { class: "full-content" }, toDisplayString(unref(currentSuggestion).content), 1) ]), _: 1 }), unref(currentSuggestion).reply ? (openBlock(), createBlock(_component_a_descriptions_item, { key: 0, label: "处理备注", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentSuggestion).reply), 1) ]), _: 1 })) : createCommentVNode("", true) ]; } }), _: 1 }, _parent2, _scopeId)); if (unref(currentSuggestion).status === 0) { _push2(`
`); _push2(ssrRenderComponent(_component_a_divider, null, null, _parent2, _scopeId)); _push2(ssrRenderComponent(_component_a_form, { model: unref(replyForm), layout: "vertical" }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_form_item, { label: "处理备注" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(ssrRenderComponent(_component_a_textarea, { value: unref(replyForm).reply, "onUpdate:value": ($event) => unref(replyForm).reply = $event, rows: 3, placeholder: "请输入处理备注..." }, null, _parent4, _scopeId3)); } else { return [ createVNode(_component_a_textarea, { value: unref(replyForm).reply, "onUpdate:value": ($event) => unref(replyForm).reply = $event, rows: 3, placeholder: "请输入处理备注..." }, null, 8, ["value", "onUpdate:value"]) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_form_item, { label: "处理结果" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(ssrRenderComponent(_component_a_select, { value: unref(replyForm).status, "onUpdate:value": ($event) => unref(replyForm).status = $event, placeholder: "请选择处理结果" }, { default: withCtx((_4, _push5, _parent5, _scopeId4) => { if (_push5) { _push5(ssrRenderComponent(_component_a_select_option, { value: 1 }, { default: withCtx((_5, _push6, _parent6, _scopeId5) => { if (_push6) { _push6(`已处理`); } else { return [ createTextVNode("已处理") ]; } }), _: 1 }, _parent5, _scopeId4)); _push5(ssrRenderComponent(_component_a_select_option, { value: 2 }, { default: withCtx((_5, _push6, _parent6, _scopeId5) => { if (_push6) { _push6(`已采纳`); } else { return [ createTextVNode("已采纳") ]; } }), _: 1 }, _parent5, _scopeId4)); } else { return [ createVNode(_component_a_select_option, { value: 1 }, { default: withCtx(() => [ createTextVNode("已处理") ]), _: 1 }), createVNode(_component_a_select_option, { value: 2 }, { default: withCtx(() => [ createTextVNode("已采纳") ]), _: 1 }) ]; } }), _: 1 }, _parent4, _scopeId3)); } else { return [ createVNode(_component_a_select, { value: unref(replyForm).status, "onUpdate:value": ($event) => unref(replyForm).status = $event, placeholder: "请选择处理结果" }, { default: withCtx(() => [ createVNode(_component_a_select_option, { value: 1 }, { default: withCtx(() => [ createTextVNode("已处理") ]), _: 1 }), createVNode(_component_a_select_option, { value: 2 }, { default: withCtx(() => [ createTextVNode("已采纳") ]), _: 1 }) ]), _: 1 }, 8, ["value", "onUpdate:value"]) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_space, null, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(ssrRenderComponent(_component_a_button, { type: "primary", onClick: handleSubmitReply }, { default: withCtx((_4, _push5, _parent5, _scopeId4) => { if (_push5) { _push5(`提交`); } else { return [ createTextVNode("提交") ]; } }), _: 1 }, _parent4, _scopeId3)); } else { return [ createVNode(_component_a_button, { type: "primary", onClick: handleSubmitReply }, { default: withCtx(() => [ createTextVNode("提交") ]), _: 1 }) ]; } }), _: 1 }, _parent3, _scopeId2)); } else { return [ createVNode(_component_a_form_item, { label: "处理备注" }, { default: withCtx(() => [ createVNode(_component_a_textarea, { value: unref(replyForm).reply, "onUpdate:value": ($event) => unref(replyForm).reply = $event, rows: 3, placeholder: "请输入处理备注..." }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }), createVNode(_component_a_form_item, { label: "处理结果" }, { default: withCtx(() => [ createVNode(_component_a_select, { value: unref(replyForm).status, "onUpdate:value": ($event) => unref(replyForm).status = $event, placeholder: "请选择处理结果" }, { default: withCtx(() => [ createVNode(_component_a_select_option, { value: 1 }, { default: withCtx(() => [ createTextVNode("已处理") ]), _: 1 }), createVNode(_component_a_select_option, { value: 2 }, { default: withCtx(() => [ createTextVNode("已采纳") ]), _: 1 }) ]), _: 1 }, 8, ["value", "onUpdate:value"]) ]), _: 1 }), createVNode(_component_a_space, null, { default: withCtx(() => [ createVNode(_component_a_button, { type: "primary", onClick: handleSubmitReply }, { default: withCtx(() => [ createTextVNode("提交") ]), _: 1 }) ]), _: 1 }) ]; } }), _: 1 }, _parent2, _scopeId)); _push2(`
`); } else { _push2(``); } _push2(``); } else { _push2(``); } } else { return [ unref(currentSuggestion) ? (openBlock(), createBlock(Fragment, { key: 0 }, [ createVNode(_component_a_descriptions, { column: 2, bordered: "", size: "small" }, { default: withCtx(() => [ createVNode(_component_a_descriptions_item, { label: "标题", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentSuggestion).title), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "提交人" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentSuggestion).authorName || "匿名"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "联系方式" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentSuggestion).contact || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "提交时间" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentSuggestion).createTime?.substring(0, 16) || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "当前状态" }, { default: withCtx(() => [ createVNode(_component_a_tag, { color: statusColor(unref(currentSuggestion).status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(unref(currentSuggestion).status)), 1) ]), _: 1 }, 8, ["color"]) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "建言内容", span: 2 }, { default: withCtx(() => [ createVNode("div", { class: "full-content" }, toDisplayString(unref(currentSuggestion).content), 1) ]), _: 1 }), unref(currentSuggestion).reply ? (openBlock(), createBlock(_component_a_descriptions_item, { key: 0, label: "处理备注", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentSuggestion).reply), 1) ]), _: 1 })) : createCommentVNode("", true) ]), _: 1 }), unref(currentSuggestion).status === 0 ? (openBlock(), createBlock("div", { key: 0, class: "process-actions" }, [ createVNode(_component_a_divider), createVNode(_component_a_form, { model: unref(replyForm), layout: "vertical" }, { default: withCtx(() => [ createVNode(_component_a_form_item, { label: "处理备注" }, { default: withCtx(() => [ createVNode(_component_a_textarea, { value: unref(replyForm).reply, "onUpdate:value": ($event) => unref(replyForm).reply = $event, rows: 3, placeholder: "请输入处理备注..." }, null, 8, ["value", "onUpdate:value"]) ]), _: 1 }), createVNode(_component_a_form_item, { label: "处理结果" }, { default: withCtx(() => [ createVNode(_component_a_select, { value: unref(replyForm).status, "onUpdate:value": ($event) => unref(replyForm).status = $event, placeholder: "请选择处理结果" }, { default: withCtx(() => [ createVNode(_component_a_select_option, { value: 1 }, { default: withCtx(() => [ createTextVNode("已处理") ]), _: 1 }), createVNode(_component_a_select_option, { value: 2 }, { default: withCtx(() => [ createTextVNode("已采纳") ]), _: 1 }) ]), _: 1 }, 8, ["value", "onUpdate:value"]) ]), _: 1 }), createVNode(_component_a_space, null, { default: withCtx(() => [ createVNode(_component_a_button, { type: "primary", onClick: handleSubmitReply }, { default: withCtx(() => [ createTextVNode("提交") ]), _: 1 }) ]), _: 1 }) ]), _: 1 }, 8, ["model"]) ])) : createCommentVNode("", true) ], 64)) : createCommentVNode("", true) ]; } }), _: 1 }, _parent)); _push(``); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/admin/suggestions/index.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5f45141b"]]); export { index as default }; //# sourceMappingURL=index-BO9w7hej.mjs.map