Files
jczxw-pc/.output/server/chunks/build/index-BO9w7hej.mjs
赵忠林 528fe28ffc feat(api): 添加多路由代理处理实现
- 新增api目录下多个接口路径代理处理文件,支持动态拼接目标URL
- 根据环境变量选择不同的后端服务地址(如dev和生产环境)
- 统一添加TenantId和Authorization请求头传递租户及身份信息
- 实现请求参数及搜索参数的完整转发
- 引入better-sqlite3及node内建模块支持服务端功能
- 新增专家详情页面,实现文章、成果及预约咨询功能展示
- 页面实现加载骨架屏、标签页切换及空状态提示优化体验
2026-04-28 13:50:27 +08:00

1143 lines
51 KiB
JavaScript

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(`<div${ssrRenderAttrs(mergeProps({ class: "suggestions-page" }, _attrs))} data-v-5f45141b><div class="page-header" data-v-5f45141b><div data-v-5f45141b><h2 class="page-title" data-v-5f45141b>💬 建言献策管理</h2><p class="page-desc" data-v-5f45141b>管理用户提交的建言献策,支持审核与状态跟踪</p></div>`);
_push(ssrRenderComponent(_component_a_space, null, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(ssrRenderComponent(_component_a_button, {
onClick: loadSuggestions,
loading: unref(loading)
}, {
icon: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(ssrRenderComponent(unref(ReloadOutlined), null, null, _parent3, _scopeId2));
} else {
return [
createVNode(unref(ReloadOutlined))
];
}
}),
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(` 刷新 `);
} else {
return [
createTextVNode(" 刷新 ")
];
}
}),
_: 1
}, _parent2, _scopeId));
} else {
return [
createVNode(_component_a_button, {
onClick: loadSuggestions,
loading: unref(loading)
}, {
icon: withCtx(() => [
createVNode(unref(ReloadOutlined))
]),
default: withCtx(() => [
createTextVNode(" 刷新 ")
]),
_: 1
}, 8, ["loading"])
];
}
}),
_: 1
}, _parent));
_push(`</div>`);
_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(`<div class="${ssrRenderClass([[stat.color, { active: unref(filterStatus) === stat.key }], "stat-card"])}" data-v-5f45141b${_scopeId2}><div class="stat-icon" data-v-5f45141b${_scopeId2}>${ssrInterpolate(stat.icon)}</div><div class="stat-info" data-v-5f45141b${_scopeId2}><div class="stat-value" data-v-5f45141b${_scopeId2}>${ssrInterpolate(stat.value)}</div><div class="stat-label" data-v-5f45141b${_scopeId2}>${ssrInterpolate(stat.label)}</div></div></div>`);
} 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(`<div class="panel" data-v-5f45141b><div class="panel-header" data-v-5f45141b><span class="panel-title" data-v-5f45141b>📋 建言列表</span>`);
_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(`</div>`);
_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(`<div class="suggestion-info-cell" data-v-5f45141b${_scopeId}><div class="suggestion-title" data-v-5f45141b${_scopeId}>${ssrInterpolate(record.title)}</div><div class="suggestion-meta" data-v-5f45141b${_scopeId}><span data-v-5f45141b${_scopeId}>👤 ${ssrInterpolate(record.authorName || "匿名")}</span><span class="meta-item" data-v-5f45141b${_scopeId}>📅 ${ssrInterpolate(record.createTime?.substring(0, 10) || "-")}</span></div></div>`);
} else {
_push2(`<!---->`);
}
if (column.key === "content") {
_push2(`<div class="content-preview" data-v-5f45141b${_scopeId}>${ssrInterpolate(record.content?.substring(0, 50))}...</div>`);
} 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(`</div>`);
_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(`<div class="full-content" data-v-5f45141b${_scopeId3}>${ssrInterpolate(unref(currentSuggestion).content)}</div>`);
} 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(`<div class="process-actions" data-v-5f45141b${_scopeId}>`);
_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(`</div>`);
} 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(`</div>`);
};
}
});
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