From 2431480f5859ef40dfdf0eb19e1ba6ddebbd9ef2 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期一, 29 十二月 2025 20:06:22 +0800
Subject: [PATCH] 项目页面优化
---
src/views/OfficeRelated/conference/index.vue | 716 ++++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 505 insertions(+), 211 deletions(-)
diff --git a/src/views/OfficeRelated/conference/index.vue b/src/views/OfficeRelated/conference/index.vue
index 5b87c95..2932b7e 100644
--- a/src/views/OfficeRelated/conference/index.vue
+++ b/src/views/OfficeRelated/conference/index.vue
@@ -17,7 +17,11 @@
<el-card class="filter-card">
<el-form :model="queryParams" inline>
<el-form-item label="浼氳绫诲瀷">
- <el-select v-model="queryParams.meetingType" clearable placeholder="璇烽�夋嫨">
+ <el-select
+ v-model="queryParams.meetingType"
+ clearable
+ placeholder="璇烽�夋嫨"
+ >
<el-option label="绉戠爺浼氳" value="research" />
<el-option label="鏃ュ父浼氳" value="daily" />
<el-option label="椤圭洰浼氳" value="project" />
@@ -44,7 +48,11 @@
/>
</el-form-item>
<el-form-item label="鐘舵��">
- <el-select v-model="queryParams.status" clearable placeholder="璇烽�夋嫨">
+ <el-select
+ v-model="queryParams.status"
+ clearable
+ placeholder="璇烽�夋嫨"
+ >
<el-option label="寰呭紑濮�" value="pending" />
<el-option label="杩涜涓�" value="ongoing" />
<el-option label="宸茬粨鏉�" value="completed" />
@@ -67,51 +75,114 @@
style="width: 100%"
@sort-change="handleSortChange"
>
- <el-table-column prop="id" label="ID" width="80" fixed />
- <el-table-column prop="title" label="浼氳涓婚" width="200" fixed>
+ <!-- <el-table-column prop="id" label="ID" width="80" fixed /> -->
+ <el-table-column
+ prop="title"
+ align="center"
+ label="浼氳涓婚"
+ width="200"
+ fixed
+ >
<template #default="scope">
<el-button type="text" @click="handleView(scope.row)">
{{ scope.row.title }}
</el-button>
</template>
</el-table-column>
- <el-table-column prop="meetingType" label="浼氳绫诲瀷" width="120">
+ <el-table-column
+ align="center"
+ prop="meetingType"
+ label="浼氳绫诲瀷"
+ width="120"
+ >
<template #default="scope">
<el-tag :type="getMeetingTypeTag(scope.row.meetingType)">
{{ getMeetingTypeText(scope.row.meetingType) }}
</el-tag>
</template>
</el-table-column>
- <el-table-column prop="participants" label="鍙備細浜哄憳" width="180" show-overflow-tooltip>
- <template #default="scope">
- <span>{{ scope.row.participants.join(', ') }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="location" label="浼氳鍦扮偣" width="150" />
- <el-table-column prop="startTime" label="寮�濮嬫椂闂�" width="160" sortable>
- <template #default="scope">
- <span>{{ formatDateTime(scope.row.startTime) }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="endTime" label="缁撴潫鏃堕棿" width="160" sortable>
- <template #default="scope">
- <span>{{ formatDateTime(scope.row.endTime) }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="duration" label="鎸佺画鏃堕棿" width="100">
- <template #default="scope">
- <span>{{ calculateDuration(scope.row) }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="summary" label="浼氳姒傝" min-width="200" show-overflow-tooltip />
- <el-table-column prop="status" label="鐘舵��" width="100" fixed="right">
+ <el-table-column
+ align="center"
+ prop="status"
+ label="鐘舵��"
+ width="100"
+ fixed="right"
+ >
<template #default="scope">
<el-tag :type="getStatusTag(scope.row.status)">
{{ getStatusText(scope.row.status) }}
</el-tag>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" width="200" fixed="right">
+ <el-table-column
+ prop="participants"
+ label="鍙備細浜哄憳"
+ align="center"
+ width="180"
+ show-overflow-tooltip
+ >
+ <template #default="scope">
+ <span>{{ scope.row.participants.join(", ") }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ align="center"
+ prop="location"
+ label="浼氳鍦扮偣"
+ width="150"
+ />
+ <el-table-column
+ align="center"
+ prop="startTime"
+ label="寮�濮嬫椂闂�"
+ width="160"
+ sortable
+ >
+ <template #default="scope">
+ <span>{{ formatDateTime(scope.row.startTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ align="center"
+ prop="endTime"
+ label="缁撴潫鏃堕棿"
+ width="160"
+ sortable
+ >
+ <template #default="scope">
+ <span>{{ formatDateTime(scope.row.endTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ align="center"
+ prop="duration"
+ label="鎸佺画鏃堕棿"
+ width="100"
+ >
+ <template #default="scope">
+ <span>{{ calculateDuration(scope.row) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ align="center"
+ prop="summary"
+ label="浼氳姒傝"
+ min-width="200"
+ show-overflow-tooltip
+ />
+ <el-table-column align="center" label="浼氳绾" width="120">
+ <template #default="scope">
+ <el-button
+ size="mini"
+ type="text"
+ @click="handleViewMinutes(scope.row)"
+ :disabled="!scope.row.meetingMinutes"
+ >
+ {{ scope.row.meetingMinutes ? "鏌ョ湅绾" : "鏆傛棤" }}
+ </el-button>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" align="center" width="200" fixed="right">
<template #default="scope">
<el-button size="mini" type="text" @click="handleView(scope.row)">
鏌ョ湅
@@ -151,7 +222,54 @@
/>
</div>
</el-card>
-
+ <el-dialog
+ title="浼氳绾"
+ :visible.sync="minutesDialogVisible"
+ width="600px"
+ >
+ <div v-if="currentRecord.meetingMinutes">
+ <el-alert
+ title="浼氳绾璇︽儏"
+ type="info"
+ :closable="false"
+ style="margin-bottom: 16px;"
+ />
+ <div class="minutes-content">
+ <el-card>
+ <div
+ style="white-space: pre-line; line-height: 1.6; max-height: 400px; overflow-y: auto;"
+ >
+ {{ currentRecord.meetingMinutes }}
+ </div>
+ </el-card>
+ </div>
+ <div
+ class="minutes-meta"
+ style="margin-top: 16px; color: #909399; font-size: 12px;"
+ >
+ <span
+ >鍒涘缓鏃堕棿:
+ {{ formatDateTime(currentRecord.minutesCreateTime) }}</span
+ >
+ <span style="margin-left: 16px;"
+ >鍒涘缓浜�: {{ currentRecord.minutesCreator || "绯荤粺" }}</span
+ >
+ </div>
+ </div>
+ <div v-else>
+ <el-empty description="鏆傛棤浼氳绾"></el-empty>
+ </div>
+ <span slot="footer">
+ <el-button @click="minutesDialogVisible = false">鍏抽棴</el-button>
+ <el-button
+ type="primary"
+ @click="handleEdit(currentRecord)"
+ v-if="currentRecord.meetingMinutes"
+ >
+ 缂栬緫绾
+ </el-button>
+ </span>
+ </el-dialog>
<!-- 鏌ョ湅璇︽儏瀵硅瘽妗� -->
<el-dialog
:title="`浼氳璇︽儏 - ${currentRecord.title || ''}`"
@@ -160,7 +278,9 @@
:before-close="handleDetailClose"
>
<el-descriptions :column="2" border v-if="currentRecord">
- <el-descriptions-item label="浼氳涓婚">{{ currentRecord.title }}</el-descriptions-item>
+ <el-descriptions-item label="浼氳涓婚">{{
+ currentRecord.title
+ }}</el-descriptions-item>
<el-descriptions-item label="浼氳绫诲瀷">
<el-tag :type="getMeetingTypeTag(currentRecord.meetingType)">
{{ getMeetingTypeText(currentRecord.meetingType) }}
@@ -177,35 +297,58 @@
{{ participant }}
</el-tag>
</el-descriptions-item>
- <el-descriptions-item label="浼氳鍦扮偣">{{ currentRecord.location }}</el-descriptions-item>
+ <el-descriptions-item label="浼氳鍦扮偣">{{
+ currentRecord.location
+ }}</el-descriptions-item>
<el-descriptions-item label="浼氳鐘舵��">
<el-tag :type="getStatusTag(currentRecord.status)">
{{ getStatusText(currentRecord.status) }}
</el-tag>
</el-descriptions-item>
- <el-descriptions-item label="寮�濮嬫椂闂�">{{ formatDateTime(currentRecord.startTime) }}</el-descriptions-item>
- <el-descriptions-item label="缁撴潫鏃堕棿">{{ formatDateTime(currentRecord.endTime) }}</el-descriptions-item>
- <el-descriptions-item label="鎸佺画鏃堕棿">{{ calculateDuration(currentRecord) }}</el-descriptions-item>
- <el-descriptions-item label="鍒涘缓浜�">{{ currentRecord.creator }}</el-descriptions-item>
+ <el-descriptions-item label="寮�濮嬫椂闂�">{{
+ formatDateTime(currentRecord.startTime)
+ }}</el-descriptions-item>
+ <el-descriptions-item label="缁撴潫鏃堕棿">{{
+ formatDateTime(currentRecord.endTime)
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鎸佺画鏃堕棿">{{
+ calculateDuration(currentRecord)
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鍒涘缓浜�">{{
+ currentRecord.creator
+ }}</el-descriptions-item>
<el-descriptions-item label="浼氳姒傝" :span="2">
{{ currentRecord.summary }}
</el-descriptions-item>
<el-descriptions-item label="浼氳鍐呭" :span="2">
- <div style="white-space: pre-line; max-height: 300px; overflow-y: auto;">
+ <div
+ style="white-space: pre-line; max-height: 300px; overflow-y: auto;"
+ >
{{ currentRecord.content }}
</div>
</el-descriptions-item>
- <el-descriptions-item label="闄勪欢" :span="2" v-if="currentRecord.attachments && currentRecord.attachments.length">
- <div v-for="file in currentRecord.attachments" :key="file.id" class="attachment-item">
+ <el-descriptions-item
+ label="闄勪欢"
+ :span="2"
+ v-if="currentRecord.attachments && currentRecord.attachments.length"
+ >
+ <div
+ v-for="file in currentRecord.attachments"
+ :key="file.id"
+ class="attachment-item"
+ >
<el-link type="primary" :href="file.url" target="_blank">
<i class="el-icon-document"></i> {{ file.name }}
</el-link>
</div>
</el-descriptions-item>
</el-descriptions>
+
<span slot="footer">
<el-button @click="detailDialogVisible = false">鍏抽棴</el-button>
- <el-button type="primary" @click="handleEdit(currentRecord)">缂栬緫</el-button>
+ <el-button type="primary" @click="handleEdit(currentRecord)"
+ >缂栬緫</el-button
+ >
</span>
</el-dialog>
@@ -228,7 +371,11 @@
</el-form-item>
<el-form-item label="浼氳绫诲瀷" prop="meetingType">
- <el-select v-model="editForm.meetingType" placeholder="璇烽�夋嫨浼氳绫诲瀷" style="width: 100%">
+ <el-select
+ v-model="editForm.meetingType"
+ placeholder="璇烽�夋嫨浼氳绫诲瀷"
+ style="width: 100%"
+ >
<el-option label="绉戠爺浼氳" value="research" />
<el-option label="鏃ュ父浼氳" value="daily" />
<el-option label="椤圭洰浼氳" value="project" />
@@ -313,15 +460,30 @@
multiple
>
<el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
- <div slot="tip" class="el-upload__tip">鏀寔涓婁紶鏂囨。銆佸浘鐗囩瓑鏂囦欢锛屽崟涓枃浠朵笉瓒呰繃10MB</div>
+ <div slot="tip" class="el-upload__tip">
+ 鏀寔涓婁紶鏂囨。銆佸浘鐗囩瓑鏂囦欢锛屽崟涓枃浠朵笉瓒呰繃10MB
+ </div>
</el-upload>
+ </el-form-item>
+ <el-form-item label="浼氳绾" prop="meetingMinutes">
+ <el-input
+ v-model="editForm.meetingMinutes"
+ type="textarea"
+ :rows="6"
+ placeholder="璇疯緭鍏ヤ細璁邯瑕佸唴瀹癸紝鍖呮嫭浼氳鍐宠銆佽鍔ㄨ鍒掋�佽矗浠讳汉绛変俊鎭�"
+ maxlength="1000"
+ show-word-limit
+ />
+ <div style="color: #909399; font-size: 12px; margin-top: 4px;">
+ 鎻愮ず锛氬彲璁板綍浼氳璁ㄨ瑕佺偣銆佸喅璁簨椤广�佽鍔ㄨ鍒掔瓑
+ </div>
</el-form-item>
</el-form>
<span slot="footer">
<el-button @click="handleEditClose">鍙栨秷</el-button>
<el-button type="primary" @click="handleSave" :loading="saveLoading">
- {{ isEditing ? '淇濆瓨' : '鏂板' }}
+ {{ isEditing ? "淇濆瓨" : "鏂板" }}
</el-button>
</span>
</el-dialog>
@@ -330,15 +492,15 @@
<script>
export default {
- name: 'MeetingManagement',
+ name: "MeetingManagement",
data() {
return {
// 鏌ヨ鍙傛暟
queryParams: {
- meetingType: '',
- location: '',
+ meetingType: "",
+ location: "",
dateRange: [],
- status: ''
+ status: ""
},
// 鍒嗛〉鍙傛暟
pagination: {
@@ -360,325 +522,436 @@
tableData: [],
// 鐢ㄦ埛鍒楄〃锛堢敤浜庨�夋嫨鍙備細浜哄憳锛�
userList: [
- { id: 1, name: '寮犱笁' },
- { id: 2, name: '鏉庡洓' },
- { id: 3, name: '鐜嬩簲' },
- { id: 4, name: '璧靛叚' },
- { id: 5, name: '閽变竷' },
- { id: 6, name: '瀛欏叓' },
- { id: 7, name: '鍛ㄤ節' },
- { id: 8, name: '鍚村崄' }
+ { id: 1, name: "寮犱笁" },
+ { id: 2, name: "鏉庡洓" },
+ { id: 3, name: "鐜嬩簲" },
+ { id: 4, name: "璧靛叚" },
+ { id: 5, name: "閽变竷" },
+ { id: 6, name: "瀛欏叓" },
+ { id: 7, name: "鍛ㄤ節" },
+ { id: 8, name: "鍚村崄" }
],
+ minutesDialogVisible: false, // 浼氳绾瀵硅瘽妗嗘樉绀虹姸鎬�
+
// 缂栬緫琛ㄥ崟鏁版嵁
editForm: {
- title: '',
- meetingType: '',
+ title: "",
+ meetingType: "",
participants: [],
- location: '',
- startTime: '',
- endTime: '',
- summary: '',
- content: '',
+ location: "",
+ startTime: "",
+ endTime: "",
+ summary: "",
+ content: "",
attachments: []
},
// 琛ㄥ崟楠岃瘉瑙勫垯
editRules: {
- title: [{ required: true, message: '璇疯緭鍏ヤ細璁富棰�', trigger: 'blur' }],
- meetingType: [{ required: true, message: '璇烽�夋嫨浼氳绫诲瀷', trigger: 'change' }],
- participants: [{ required: true, message: '璇烽�夋嫨鍙備細浜哄憳', trigger: 'change' }],
- location: [{ required: true, message: '璇疯緭鍏ヤ細璁湴鐐�', trigger: 'blur' }],
- startTime: [{ required: true, message: '璇烽�夋嫨寮�濮嬫椂闂�', trigger: 'change' }],
- endTime: [{ required: true, message: '璇烽�夋嫨缁撴潫鏃堕棿', trigger: 'change' }],
- summary: [{ required: true, message: '璇疯緭鍏ヤ細璁瑕�', trigger: 'blur' }],
- content: [{ required: true, message: '璇疯緭鍏ヤ細璁唴瀹�', trigger: 'blur' }]
+ title: [{ required: true, message: "璇疯緭鍏ヤ細璁富棰�", trigger: "blur" }],
+ meetingType: [
+ { required: true, message: "璇烽�夋嫨浼氳绫诲瀷", trigger: "change" }
+ ],
+ participants: [
+ { required: true, message: "璇烽�夋嫨鍙備細浜哄憳", trigger: "change" }
+ ],
+ location: [
+ { required: true, message: "璇疯緭鍏ヤ細璁湴鐐�", trigger: "blur" }
+ ],
+ startTime: [
+ { required: true, message: "璇烽�夋嫨寮�濮嬫椂闂�", trigger: "change" }
+ ],
+ endTime: [
+ { required: true, message: "璇烽�夋嫨缁撴潫鏃堕棿", trigger: "change" }
+ ],
+ summary: [
+ { required: true, message: "璇疯緭鍏ヤ細璁瑕�", trigger: "blur" }
+ ],
+ content: [
+ { required: true, message: "璇疯緭鍏ヤ細璁唴瀹�", trigger: "blur" }
+ ],
+ meetingMinutes: [
+ {
+ max: 1000,
+ message: "浼氳绾闀垮害涓嶈兘瓒呰繃1000涓瓧绗�",
+ trigger: "blur"
+ }
+ ]
}
- }
+ };
},
mounted() {
- this.loadData()
+ this.loadData();
},
methods: {
// 鍔犺浇鏁版嵁
async loadData() {
- this.loading = true
+ this.loading = true;
try {
// 妯℃嫙API璋冪敤
- await new Promise(resolve => setTimeout(resolve, 500))
+ await new Promise(resolve => setTimeout(resolve, 500));
// 鐢熸垚妯℃嫙鏁版嵁
- this.tableData = this.generateMockData()
- this.pagination.total = this.tableData.length
+ this.tableData = this.generateMockData();
+ this.pagination.total = this.tableData.length;
} catch (error) {
- console.error('鍔犺浇鏁版嵁澶辫触:', error)
- this.$message.error('鏁版嵁鍔犺浇澶辫触')
+ console.error("鍔犺浇鏁版嵁澶辫触:", error);
+ this.$message.error("鏁版嵁鍔犺浇澶辫触");
} finally {
- this.loading = false
+ this.loading = false;
}
+ },
+ // 鏌ョ湅浼氳绾
+ handleViewMinutes(record) {
+ this.currentRecord = { ...record };
+ this.minutesDialogVisible = true;
},
// 鐢熸垚妯℃嫙鏁版嵁
generateMockData() {
- const meetingTypes = ['research', 'daily', 'project', 'department', 'review']
- const statuses = ['pending', 'ongoing', 'completed', 'cancelled']
- const participantsPool = ['寮犱笁', '鏉庡洓', '鐜嬩簲', '璧靛叚', '閽变竷', '瀛欏叓', '鍛ㄤ節', '鍚村崄']
+ const meetingTypes = [
+ "research",
+ "daily",
+ "project",
+ "department",
+ "review"
+ ];
+ const statuses = ["pending", "ongoing", "completed", "cancelled"];
+ const participantsPool = [
+ "寮犱笁",
+ "鏉庡洓",
+ "鐜嬩簲",
+ "璧靛叚",
+ "閽变竷",
+ "瀛欏叓",
+ "鍛ㄤ節",
+ "鍚村崄"
+ ];
+
+ // 浼氳绾绀轰緥鍐呭
+ const minutesExamples = [
+ `浼氳鍐宠锛�
+1. 椤圭洰璁″垝璋冩暣鑷充笅鍛ㄤ竴姝e紡鍚姩
+2. 鎶�鏈柟妗堢敱寮犱笁璐熻矗瀹屽杽
+3. 涓嬪懆杩涜鎶�鏈瘎瀹′細璁�
+
+琛屽姩璁″垝锛�
+- 鏉庡洓锛氬噯澶囨妧鏈枃妗o紙鎴鍛ㄤ簲锛�
+- 鐜嬩簲锛氬崗璋冭祫婧愬垎閰嶏紙鎴鍛ㄥ洓锛�
+- 鍏ㄤ綋锛氬弬鍔犳妧鏈煿璁紙鍛ㄤ笁涓嬪崍锛塦,
+
+ `璁ㄨ瑕佺偣锛�
+1. 褰撳墠椤圭洰杩涘害姝e父锛岄渶鍔犲己璐ㄩ噺绠℃帶
+2. 瀹㈡埛鍙嶉闂闇�瑕佷紭鍏堝鐞�
+3. 涓嬮樁娈靛伐浣滈噸鐐规槑纭�
+
+浠诲姟鍒嗛厤锛�
+鉁� 宸插畬鎴愶細闇�姹傚垎鏋愩�佹妧鏈柟妗�
+馃敺 杩涜涓細寮�鍙戝疄鏂斤紙璐熻矗浜猴細璧靛叚锛�
+鈴� 寰呭紑濮嬶細娴嬭瘯楠屾敹`,
+
+ `閲嶈鍐宠锛�
+鈥� 閫氳繃棰勭畻璋冩暣鏂规
+鈥� 纭畾鏂版垚鍛樺姞鍏ユ椂闂�
+鈥� 鎵瑰噯璁惧閲囪喘鐢宠
+
+鍚庣画瀹夋帓锛�
+馃搮 涓嬫浼氳鏃堕棿锛�2024-01-15 14:00
+馃搷 浼氳鍦扮偣锛氱涓�浼氳瀹�
+馃懃 蹇呴』鍙備細浜哄憳锛氬紶涓夈�佹潕鍥沗
+ ];
return Array.from({ length: 10 }, (_, index) => {
- const participantCount = Math.floor(Math.random() * 5) + 2
- const participants = []
+ const participantCount = Math.floor(Math.random() * 5) + 2;
+ const participants = [];
for (let i = 0; i < participantCount; i++) {
- const randomIndex = Math.floor(Math.random() * participantsPool.length)
- participants.push(participantsPool[randomIndex])
+ const randomIndex = Math.floor(
+ Math.random() * participantsPool.length
+ );
+ participants.push(participantsPool[randomIndex]);
}
- // 鍘婚噸
- const uniqueParticipants = [...new Set(participants)]
+ const uniqueParticipants = [...new Set(participants)];
+ const startTime = new Date();
+ startTime.setDate(
+ startTime.getDate() + Math.floor(Math.random() * 30) - 15
+ );
+ startTime.setHours(
+ 9 + Math.floor(Math.random() * 8),
+ Math.floor(Math.random() * 4) * 15,
+ 0
+ );
- const startTime = new Date()
- startTime.setDate(startTime.getDate() + Math.floor(Math.random() * 30) - 15)
- startTime.setHours(9 + Math.floor(Math.random() * 8), Math.floor(Math.random() * 4) * 15, 0)
+ const endTime = new Date(startTime);
+ endTime.setHours(
+ startTime.getHours() + Math.floor(Math.random() * 3) + 1
+ );
- const endTime = new Date(startTime)
- endTime.setHours(startTime.getHours() + Math.floor(Math.random() * 3) + 1)
+ // 闅忔満鍐冲畾鏄惁鏈変細璁邯瑕侊紙60%姒傜巼鏈夌邯瑕侊級
+ const hasMinutes = Math.random() > 0.4;
+ const meetingMinutes = hasMinutes
+ ? minutesExamples[Math.floor(Math.random() * minutesExamples.length)]
+ : "";
return {
id: index + 1,
- title: `鍏充簬${['绉戠爺椤圭洰', '鏃ュ父宸ヤ綔', '鎶�鏈瘎瀹�', '閮ㄩ棬鍗忚皟'][Math.floor(Math.random() * 4)]}鐨勪細璁甡,
- meetingType: meetingTypes[Math.floor(Math.random() * meetingTypes.length)],
+ title: `鍏充簬${
+ ["绉戠爺椤圭洰", "鏃ュ父宸ヤ綔", "鎶�鏈瘎瀹�", "閮ㄩ棬鍗忚皟"][
+ Math.floor(Math.random() * 4)
+ ]
+ }鐨勪細璁甡,
+ meetingType:
+ meetingTypes[Math.floor(Math.random() * meetingTypes.length)],
participants: uniqueParticipants,
- location: ['绗竴浼氳瀹�', '绗簩浼氳瀹�', '绗笁浼氳瀹�', '绾夸笂浼氳'][Math.floor(Math.random() * 4)],
+ location: ["绗竴浼氳瀹�", "绗簩浼氳瀹�", "绗笁浼氳瀹�", "绾夸笂浼氳"][
+ Math.floor(Math.random() * 4)
+ ],
startTime: startTime.toISOString(),
endTime: endTime.toISOString(),
- summary: `鏈浼氳涓昏璁ㄨ${['椤圭洰杩涘睍', '鎶�鏈毦棰�', '宸ヤ綔璁″垝', '闂鍗忚皟'][Math.floor(Math.random() * 4)]}绛夌浉鍏充簨瀹渀,
+ summary: `鏈浼氳涓昏璁ㄨ${
+ ["椤圭洰杩涘睍", "鎶�鏈毦棰�", "宸ヤ綔璁″垝", "闂鍗忚皟"][
+ Math.floor(Math.random() * 4)
+ ]
+ }绛夌浉鍏充簨瀹渀,
content: `浼氳璇︾粏鍐呭锛歕n1. 璁涓�璁ㄨ\n2. 璁浜屽垎鏋怽n3. 涓嬩竴姝ュ伐浣滆鍒抃n4. 浠诲姟鍒嗛厤`,
+ meetingMinutes: meetingMinutes,
+ minutesCreateTime: hasMinutes
+ ? new Date(startTime.getTime() + 3600000).toISOString()
+ : "",
+ minutesCreator: hasMinutes ? participants[0] : "",
status: statuses[Math.floor(Math.random() * statuses.length)],
- creator: '绯荤粺绠$悊鍛�',
+ creator: "绯荤粺绠$悊鍛�",
attachments: []
- }
- })
+ };
+ });
},
// 鑾峰彇浼氳绫诲瀷鏍囩鏍峰紡
getMeetingTypeTag(type) {
const typeMap = {
- research: 'primary',
- daily: 'success',
- project: 'warning',
- department: 'info',
- review: 'danger'
- }
- return typeMap[type] || 'info'
+ research: "primary",
+ daily: "success",
+ project: "warning",
+ department: "info",
+ review: "danger"
+ };
+ return typeMap[type] || "info";
},
// 鑾峰彇浼氳绫诲瀷鏂囨湰
getMeetingTypeText(type) {
const textMap = {
- research: '绉戠爺浼氳',
- daily: '鏃ュ父浼氳',
- project: '椤圭洰浼氳',
- department: '閮ㄩ棬浼氳',
- review: '璇勫浼氳'
- }
- return textMap[type] || type
+ research: "绉戠爺浼氳",
+ daily: "鏃ュ父浼氳",
+ project: "椤圭洰浼氳",
+ department: "閮ㄩ棬浼氳",
+ review: "璇勫浼氳"
+ };
+ return textMap[type] || type;
},
// 鑾峰彇鐘舵�佹爣绛炬牱寮�
getStatusTag(status) {
const statusMap = {
- pending: 'primary',
- ongoing: 'success',
- completed: 'info',
- cancelled: 'danger'
- }
- return statusMap[status] || 'info'
+ pending: "primary",
+ ongoing: "success",
+ completed: "info",
+ cancelled: "danger"
+ };
+ return statusMap[status] || "info";
},
// 鑾峰彇鐘舵�佹枃鏈�
getStatusText(status) {
const textMap = {
- pending: '寰呭紑濮�',
- ongoing: '杩涜涓�',
- completed: '宸茬粨鏉�',
- cancelled: '宸插彇娑�'
- }
- return textMap[status] || status
+ pending: "寰呭紑濮�",
+ ongoing: "杩涜涓�",
+ completed: "宸茬粨鏉�",
+ cancelled: "宸插彇娑�"
+ };
+ return textMap[status] || status;
},
// 鏍煎紡鍖栨棩鏈熸椂闂�
formatDateTime(dateTime) {
- if (!dateTime) return ''
- const date = new Date(dateTime)
- return date.toLocaleString('zh-CN')
+ if (!dateTime) return "";
+ const date = new Date(dateTime);
+ return date.toLocaleString("zh-CN");
},
// 璁$畻浼氳鎸佺画鏃堕棿
calculateDuration(record) {
- if (!record.startTime || !record.endTime) return ''
- const start = new Date(record.startTime)
- const end = new Date(record.endTime)
- const duration = (end - start) / (1000 * 60) // 鍒嗛挓鏁�
+ if (!record.startTime || !record.endTime) return "";
+ const start = new Date(record.startTime);
+ const end = new Date(record.endTime);
+ const duration = (end - start) / (1000 * 60); // 鍒嗛挓鏁�
if (duration < 60) {
- return `${Math.round(duration)}鍒嗛挓`
+ return `${Math.round(duration)}鍒嗛挓`;
} else {
- const hours = Math.floor(duration / 60)
- const minutes = Math.round(duration % 60)
- return minutes > 0 ? `${hours}灏忔椂${minutes}鍒嗛挓` : `${hours}灏忔椂`
+ const hours = Math.floor(duration / 60);
+ const minutes = Math.round(duration % 60);
+ return minutes > 0 ? `${hours}灏忔椂${minutes}鍒嗛挓` : `${hours}灏忔椂`;
}
},
// 鏌ヨ澶勭悊
handleQuery() {
- this.pagination.currentPage = 1
- this.loadData()
+ this.pagination.currentPage = 1;
+ this.loadData();
},
// 閲嶇疆鏌ヨ
handleReset() {
this.queryParams = {
- meetingType: '',
- location: '',
+ meetingType: "",
+ location: "",
dateRange: [],
- status: ''
- }
- this.pagination.currentPage = 1
- this.loadData()
+ status: ""
+ };
+ this.pagination.currentPage = 1;
+ this.loadData();
},
// 鏌ョ湅璇︽儏
handleView(record) {
- this.currentRecord = { ...record }
- this.detailDialogVisible = true
+ this.currentRecord = { ...record };
+ this.detailDialogVisible = true;
},
// 鏂板璁板綍
handleAdd() {
- this.isEditing = false
- this.editForm = this.getDefaultFormData()
- this.editDialogVisible = true
+ this.isEditing = false;
+ this.editForm = this.getDefaultFormData();
+ this.editDialogVisible = true;
this.$nextTick(() => {
- this.$refs.editForm && this.$refs.editForm.clearValidate()
- })
+ this.$refs.editForm && this.$refs.editForm.clearValidate();
+ });
},
// 缂栬緫璁板綍
handleEdit(record) {
- this.isEditing = true
- this.currentRecord = record
- this.editForm = { ...record }
- this.editDialogVisible = true
- this.detailDialogVisible = false
+ this.isEditing = true;
+ this.currentRecord = record;
+ this.editForm = { ...record };
+ this.editDialogVisible = true;
+ this.detailDialogVisible = false;
this.$nextTick(() => {
- this.$refs.editForm && this.$refs.editForm.clearValidate()
- })
+ this.$refs.editForm && this.$refs.editForm.clearValidate();
+ });
},
// 澶嶅埗璁板綍
handleCopy(record) {
- this.isEditing = false
- const copiedRecord = { ...record }
- delete copiedRecord.id
- copiedRecord.title = copiedRecord.title + '锛堝鍒讹級'
- this.editForm = copiedRecord
- this.editDialogVisible = true
+ this.isEditing = false;
+ const copiedRecord = { ...record };
+ delete copiedRecord.id;
+ copiedRecord.title = copiedRecord.title + "锛堝鍒讹級";
+ this.editForm = copiedRecord;
+ this.editDialogVisible = true;
this.$nextTick(() => {
- this.$refs.editForm && this.$refs.editForm.clearValidate()
- })
+ this.$refs.editForm && this.$refs.editForm.clearValidate();
+ });
},
// 鍒犻櫎璁板綍
handleDelete(record) {
- this.$confirm('纭畾瑕佸垹闄よ繖鏉′細璁褰曞悧锛�', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- // 妯℃嫙鍒犻櫎鎿嶄綔
- this.tableData = this.tableData.filter(item => item.id !== record.id)
- this.pagination.total = this.tableData.length
- this.$message.success('鍒犻櫎鎴愬姛')
- }).catch(() => {})
+ this.$confirm("纭畾瑕佸垹闄よ繖鏉′細璁褰曞悧锛�", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ })
+ .then(() => {
+ // 妯℃嫙鍒犻櫎鎿嶄綔
+ this.tableData = this.tableData.filter(item => item.id !== record.id);
+ this.pagination.total = this.tableData.length;
+ this.$message.success("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
},
// 淇濆瓨璁板綍
async handleSave() {
try {
- const valid = await this.$refs.editForm.validate()
- if (!valid) return
+ const valid = await this.$refs.editForm.validate();
+ if (!valid) return;
- this.saveLoading = true
+ this.saveLoading = true;
// 妯℃嫙API璋冪敤
- await new Promise(resolve => setTimeout(resolve, 1000))
+ await new Promise(resolve => setTimeout(resolve, 1000));
- this.$message.success(this.isEditing ? '淇濆瓨鎴愬姛' : '鏂板鎴愬姛')
- this.editDialogVisible = false
- this.loadData()
+ this.$message.success(this.isEditing ? "淇濆瓨鎴愬姛" : "鏂板鎴愬姛");
+ this.editDialogVisible = false;
+ this.loadData();
} catch (error) {
- console.error('淇濆瓨澶辫触:', error)
- this.$message.error('鎿嶄綔澶辫触')
+ console.error("淇濆瓨澶辫触:", error);
+ this.$message.error("鎿嶄綔澶辫触");
} finally {
- this.saveLoading = false
+ this.saveLoading = false;
}
},
// 鏂囦欢涓婁紶澶勭悊
handleFileChange(file, fileList) {
- this.editForm.attachments = fileList
+ this.editForm.attachments = fileList;
},
// 鍏抽棴璇︽儏瀵硅瘽妗�
handleDetailClose() {
- this.detailDialogVisible = false
- this.currentRecord = {}
+ this.detailDialogVisible = false;
+ this.currentRecord = {};
},
// 鍏抽棴缂栬緫瀵硅瘽妗�
handleEditClose() {
- this.editDialogVisible = false
- this.currentRecord = {}
+ this.editDialogVisible = false;
+ this.currentRecord = {};
this.$nextTick(() => {
- this.$refs.editForm && this.$refs.editForm.clearValidate()
- })
+ this.$refs.editForm && this.$refs.editForm.clearValidate();
+ });
},
// 瀵煎嚭鏁版嵁
exportData() {
- this.$message.success('瀵煎嚭鍔熻兘寮�鍙戜腑')
+ this.$message.success("瀵煎嚭鍔熻兘寮�鍙戜腑");
},
// 鍒嗛〉澶у皬鍙樺寲
handleSizeChange(size) {
- this.pagination.pageSize = size
- this.pagination.currentPage = 1
- this.loadData()
+ this.pagination.pageSize = size;
+ this.pagination.currentPage = 1;
+ this.loadData();
},
// 褰撳墠椤靛彉鍖�
handleCurrentChange(page) {
- this.pagination.currentPage = page
- this.loadData()
+ this.pagination.currentPage = page;
+ this.loadData();
},
// 鎺掑簭鍙樺寲
handleSortChange(sort) {
- console.log('鎺掑簭鍙樺寲:', sort)
+ console.log("鎺掑簭鍙樺寲:", sort);
},
- // 鑾峰彇榛樿琛ㄥ崟鏁版嵁
+ // 鏇存柊榛樿琛ㄥ崟鏁版嵁
getDefaultFormData() {
return {
- title: '',
- meetingType: '',
+ title: "",
+ meetingType: "",
participants: [],
- location: '',
- startTime: '',
- endTime: '',
- summary: '',
- content: '',
+ location: "",
+ startTime: "",
+ endTime: "",
+ summary: "",
+ content: "",
+ meetingMinutes: "",
+ minutesCreateTime: "",
+ minutesCreator: "",
attachments: []
- }
+ };
}
}
-}
+};
</script>
<style scoped>
@@ -711,7 +984,28 @@
.attachment-item {
margin-bottom: 8px;
}
+.minutes-content {
+ margin-bottom: 16px;
+}
+.minutes-meta {
+ border-top: 1px solid #e4e7ed;
+ padding-top: 12px;
+}
+
+/* 浼氳绾鏂囨湰鍖哄煙鏍峰紡 */
+.minutes-textarea {
+ font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
+ font-size: 13px;
+ line-height: 1.5;
+}
+
+/* 鍝嶅簲寮忚皟鏁� */
+@media (max-width: 768px) {
+ .minutes-content .el-card {
+ margin: 0 -20px;
+ }
+}
/* 鍝嶅簲寮忚璁� */
@media (max-width: 768px) {
.page-header {
--
Gitblit v1.9.3