From 1bda9babdf0316852ee5972690742f63c79595d6 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 21 一月 2026 16:54:41 +0800
Subject: [PATCH] 用印管理以及知识库部分逻辑修改
---
src/pages/managementMeetings/meetingBoard/index.vue | 393 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 393 insertions(+), 0 deletions(-)
diff --git a/src/pages/managementMeetings/meetingBoard/index.vue b/src/pages/managementMeetings/meetingBoard/index.vue
new file mode 100644
index 0000000..5b930b4
--- /dev/null
+++ b/src/pages/managementMeetings/meetingBoard/index.vue
@@ -0,0 +1,393 @@
+// 瀹℃壒绠$悊涓婚〉闈�
+<template>
+ <view class="sales-account">
+ <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
+ <PageHeader title="浼氳鐪嬫澘"
+ @back="goBack" />
+ <!-- 瀹℃壒鍒楄〃 -->
+ <view class="topbox">
+ <view class="boxItem">
+ <view class="boxItem-num">
+ {{stats.total}}
+ </view>
+ <view class="boxItem-title">
+ 鎬讳細璁暟
+ </view>
+ </view>
+ <view class="boxItem">
+ <view class="boxItem-num">
+ {{stats.underWay}}
+ </view>
+ <view class="boxItem-title">
+ 杩涜涓�
+ </view>
+ </view>
+ <view class="boxItem">
+ <view class="boxItem-num">
+ {{stats.completed}}
+ </view>
+ <view class="boxItem-title">
+ 宸插畬鎴�
+ </view>
+ </view>
+ <view class="boxItem">
+ <view class="boxItem-num">
+ {{stats.toStart}}
+ </view>
+ <view class="boxItem-title">
+ 鍗冲皢寮�濮�
+ </view>
+ </view>
+ </view>
+ <view class="ledger-list"
+ v-if="ledgerList.length > 0">
+ <view v-for="(item, index) in ledgerList"
+ :key="index">
+ <view class="ledger-item">
+ <view class="item-header">
+ <view class="item-left">
+ <view class="document-icon">
+ <up-icon name="file-text"
+ size="16"
+ color="#ffffff"></up-icon>
+ </view>
+ <text class="item-id">{{ item.title }}</text>
+ </view>
+ <view class="item-tag">
+ <u-tag :type="getTagClass(item.status)">{{ formatReceiptType(item.status) }}</u-tag>
+ </view>
+ </view>
+ <up-divider></up-divider>
+ <view class="item-details">
+ <view class="detail-row">
+ <text class="detail-label">涓绘寔浜�</text>
+ <text class="detail-value">{{ item.host }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">鍙備細浜烘暟</text>
+ <text class="detail-value">{{ item.participants.length }}</text>
+ </view>
+ <view class="detail-row-approveReason">
+ <text class="detail-label">浼氳鏃堕棿</text>
+ <text class="detail-value highlightBlue">{{dayjs(item.startTime).format("YYYY-MM-DD")}}
+ {{ formatTime(item.startTime) }} - {{ formatTime(item.endTime) }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">浼氳鍦扮偣</text>
+ <text class="detail-value">{{ item.location }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">鍙備細浜烘暟</text>
+ <text class="detail-value">{{ item.participants.length }}</text>
+ </view>
+ <!-- <up-divider></up-divider> -->
+ <u-collapse @change="change"
+ @close="close"
+ @open="open"
+ accordion
+ border
+ :duration="300">
+ <u-collapse-item :title="`浼氳绾 ${item.content ? '' : '(鏃�)'}`"
+ :name="`meeting-${index}`">
+ <view class="meeting-content">
+ <view v-if="item.content"
+ class="content-html"><rich-text :nodes="item.content"></rich-text></view>
+ <view v-else
+ class="no-content">
+ <text>鏆傛棤浼氳绾鍐呭</text>
+ </view>
+ </view>
+ </u-collapse-item>
+ </u-collapse>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view v-else
+ class="no-data">
+ <text>鏆傛棤鏁版嵁</text>
+ </view>
+ </view>
+</template>
+
+<script setup>
+ import { ref, toRefs, reactive } from "vue";
+ import PageHeader from "@/components/PageHeader.vue";
+ import {
+ getMeetSummaryItems,
+ getMeetSummary,
+ } from "@/api/managementMeetings/meetExamine";
+ import { onShow } from "@dcloudio/uni-app";
+ import dayjs from "dayjs";
+ import useUserStore from "@/store/modules/user";
+ // 鏁版嵁
+ const ledgerList = ref([]);
+ const data = reactive({
+ searchForm: {
+ title: "",
+ },
+ });
+
+ // 杩斿洖涓婁竴椤�
+ const goBack = () => {
+ uni.navigateBack();
+ };
+ // 缁熻鏁版嵁
+ const stats = ref({});
+ const getnum = () => {
+ getMeetSummary().then(res => {
+ stats.value = res.data;
+ });
+ };
+ // 鏍煎紡鍖栨椂闂�
+ const formatTime = timeStr => {
+ const date = new Date(timeStr);
+ return date.toLocaleTimeString("zh-CN", {
+ hour: "2-digit",
+ minute: "2-digit",
+ });
+ };
+ // 鏌ヨ鍒楄〃
+ const getList = () => {
+ showLoadingToast("鍔犺浇涓�...");
+
+ getMeetSummaryItems()
+ .then(res => {
+ ledgerList.value = res.data.map(item => {
+ return {
+ ...item,
+ participants: JSON.parse(item.participants),
+ };
+ });
+ closeToast();
+ })
+ .catch(() => {
+ closeToast();
+ });
+ };
+ // 鏄剧ず鍔犺浇鎻愮ず
+ const showLoadingToast = message => {
+ uni.showLoading({
+ title: message,
+ mask: true,
+ });
+ };
+ const formatDateTime = dateTime => {
+ if (!dateTime) return "";
+ return dateTime.replace(" ", "\n");
+ };
+
+ // 鍏抽棴鎻愮ず
+ const closeToast = () => {
+ uni.hideLoading();
+ };
+
+ // 鏍煎紡鍖栧洖娆炬柟寮�
+ const formatReceiptType = params => {
+ if (params == 0) {
+ return "宸插畬鎴�";
+ } else if (params == 1) {
+ return "鍗冲皢寮�濮�";
+ } else if (params == 2) {
+ return "杩涜涓�";
+ } else {
+ return "鏈煡";
+ }
+ };
+ // 鑾峰彇鏍囩鏍峰紡绫�
+ const getTagClass = type => {
+ if (type == 0) {
+ return "info";
+ } else if (type == 1) {
+ return "warning";
+ } else if (type == 2) {
+ return "success";
+ } else {
+ return "info";
+ }
+ };
+
+ // u-collapse 浜嬩欢澶勭悊鍑芥暟
+ const change = name => {
+ console.log("灞曞紑鐨勯潰鏉垮悕:", name);
+ };
+
+ const close = name => {
+ console.log("鍏抽棴鐨勯潰鏉垮悕:", name);
+ };
+
+ const open = name => {
+ console.log("鎵撳紑鐨勯潰鏉垮悕:", name);
+ };
+
+ onShow(async () => {
+ // 椤甸潰鍔犺浇瀹屾垚鍚庣殑鍒濆鍖栭�昏緫
+ try {
+ // 涓や釜鏂规硶鎵ц瀹屾垚鍚庡啀鎵ц getList()
+ getList();
+ getnum();
+ } catch (error) {
+ console.error("鍒濆鍖栨暟鎹け璐�:", error);
+ // 鍗充娇鍑洪敊涔熸墽琛� getList()锛岀‘淇濋〉闈㈣兘姝e父鍔犺浇
+ getList();
+ getnum();
+ }
+ });
+</script>
+
+<style scoped lang="scss">
+ @import "../../../styles/sales-common.scss";
+
+ .u-divider {
+ margin: 0 !important;
+ }
+
+ // 鏂囨。鍥炬爣鏍峰紡 - 瑕嗙洊鍏叡鏍峰紡涓殑鑳屾櫙鑹�
+ .document-icon {
+ background: #ed8d05;
+ }
+
+ // 娴姩鎸夐挳鏍峰紡 - 瑕嗙洊鍏叡鏍峰紡涓殑鑳屾櫙鑹�
+ .fab-button {
+ background: #ed8d05;
+ }
+
+ // 鐗规湁鏍峰紡
+ .detail-row-user {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ }
+
+ .detail-row-approveReason {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 8px;
+ }
+
+ .detail-value.highlightBlue {
+ color: #2979ff;
+ font-weight: 500;
+ }
+
+ .detail-value.highlightYellow {
+ color: #ed8d05;
+ font-weight: 500;
+ }
+
+ .approver-value {
+ display: flex;
+ justify-content: flex-end;
+ }
+
+ .approver-chip {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ background: #f0f6ff;
+ color: #2b7cff;
+ border: 1px solid #e0efff;
+ border-radius: 999px;
+ padding: 4px 10px;
+ max-width: 100%;
+ }
+
+ .approver-name {
+ font-size: 12px;
+ color: #2b7cff;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ .actions {
+ display: flex;
+ gap: 10px;
+ align-items: center;
+ justify-content: flex-end;
+ margin-top: 18rpx;
+ }
+
+ .action-btn {
+ border-radius: 16px;
+ height: 28px;
+ line-height: 28px;
+ padding: 0 12px;
+ }
+ .topbox {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-left: 20px;
+ margin-right: 20px;
+ margin-top: 10px;
+ }
+ .boxItem {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background-color: #fff;
+ width: 24%;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ border-radius: 6px;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
+ }
+ .boxItem-num {
+ margin-bottom: 5px;
+ font-weight: 500;
+ color: #2979ff;
+ }
+
+ // 浼氳绾鏍峰紡
+ .meeting-content {
+ padding: 15px;
+ line-height: 1.6;
+ font-size: 14px;
+ }
+
+ .content-html {
+ color: #333;
+ word-break: break-word;
+ }
+
+ .content-html :deep(p) {
+ margin-bottom: 10px;
+ }
+
+ .content-html :deep(ul),
+ .content-html :deep(ol) {
+ margin-bottom: 10px;
+ padding-left: 20px;
+ }
+
+ .content-html :deep(li) {
+ margin-bottom: 5px;
+ }
+
+ .no-content {
+ color: #999;
+ text-align: center;
+ padding: 20px 0;
+ font-size: 14px;
+ }
+
+ // u-collapse 鏍峰紡浼樺寲
+ :deep(.u-collapse) {
+ margin-top: 10px;
+ border-radius: 6px;
+ overflow: hidden;
+ }
+
+ :deep(.u-collapse-item__header) {
+ font-size: 14px;
+ font-weight: 500;
+ }
+
+ :deep(.u-collapse-item__content) {
+ background-color: #fafafa;
+ border-top: 1px solid #f0f0f0;
+ }
+</style>
\ No newline at end of file
--
Gitblit v1.9.3