|
@@ -46,13 +46,15 @@
|
|
|
<el-form-item label="会议状态" prop="meetingState">
|
|
|
<el-select v-model="queryParams.meetingState" placeholder="请选择会议状态" clearable>
|
|
|
<el-option
|
|
|
- v-for="dict in dict.type.metting_state"
|
|
|
+ v-for="dict in dict.type.meeting_state"
|
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
|
:value="dict.value"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- </el-form-item><el-form-item label="会议时间">
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="会议时间">
|
|
|
<el-date-picker
|
|
|
v-model="queryParams.startTime"
|
|
|
type="datetime"
|
|
@@ -120,7 +122,7 @@
|
|
|
v-hasPermi="['meeting:meeting:export']"
|
|
|
>导出</el-button>
|
|
|
</el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"> </right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="meetingList" @selection-change="handleSelectionChange">
|
|
@@ -191,7 +193,7 @@
|
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
|
:value="parseInt(dict.value)"
|
|
|
- ></el-option>
|
|
|
+ > </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="会议状态" prop="meetingState">
|
|
@@ -316,31 +318,102 @@
|
|
|
<el-cascader
|
|
|
v-model="form.checkOrganization"
|
|
|
:options="userTreeOptions"
|
|
|
- :props="{ multiple: false, checkStrictly: true }"
|
|
|
+ :props="{ multiple: true,
|
|
|
+ checkStrictly: true }"
|
|
|
placeholder="请选择承办组织"
|
|
|
style="width: 300px; margin-right: 10px;"
|
|
|
clearable
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="会后查阅附件" prop="selectText">
|
|
|
- <el-input v-model="form.selectText" placeholder="请输入会后查阅附件" />
|
|
|
+ <el-switch
|
|
|
+ v-model="form.selectText"
|
|
|
+ active-value="1"
|
|
|
+ inactive-value="0"
|
|
|
+ active-text="启用"
|
|
|
+ inactive-text="禁用"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="发布时间" prop="meetingTime">
|
|
|
+ <!-- <el-form-item label="发布时间" prop="meetingTime">
|
|
|
<el-date-picker clearable
|
|
|
v-model="form.meetingTime"
|
|
|
- type="date"
|
|
|
+ type="datetime"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="请选择发布时间">
|
|
|
</el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="删除标识" prop="delFlag">
|
|
|
- <el-input v-model="form.delFlag" placeholder="请输入删除标识0正常1删除" />
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="议题" prop="topicId">
|
|
|
- <el-input v-model="form.topicId" placeholder="请输入议题id" />
|
|
|
+ <el-form-item label="议题设置" prop="topicList">
|
|
|
+ <div class="topic-list-container">
|
|
|
+ <!-- 添加议题按钮 -->
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ size="mini"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="handleAddTopic()"
|
|
|
+ >
|
|
|
+ 添加议题
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <!-- 右侧操作按钮 -->
|
|
|
+ <div style="float: right; margin-left: 10px;">
|
|
|
+ <el-button type="primary" size="mini" @click="handleTopicLibrary">议题库</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="handleDownloadTemplate">下载模板</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="handleImport">导入</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 已添加议题列表 -->
|
|
|
+ <div v-if="form.topicList.length > 0" class="topic-items">
|
|
|
+ <div
|
|
|
+ v-for="(topic, index) in form.topicList"
|
|
|
+ :key="index"
|
|
|
+ class="topic-item"
|
|
|
+ >
|
|
|
+ <!-- 展开/收起图标 -->
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="toggleTopic(index)"
|
|
|
+ >
|
|
|
+ <i :class="['el-icon-arrow-right', { 'el-icon-arrow-down': topic.expanded }]"> </i>
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <!-- 议题名称 -->
|
|
|
+ <span class="topic-name">{{ topic.topicName }}</span>
|
|
|
+
|
|
|
+ <!-- 操作按钮(右对齐) -->
|
|
|
+ <div class="topic-actions">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="editTopic(index)"
|
|
|
+ />
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="deleteTopic(index)"
|
|
|
+ />
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
+ icon="el-icon-view"
|
|
|
+ v-if="topic.filePath"
|
|
|
+ @click="previewFile(topic)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 内容详情(展开后显示) -->
|
|
|
+ <div v-show="topic.expanded" class="topic-details">
|
|
|
+ <p> <strong>议题密码:</strong>{{ topic.topicName || '无' }}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -348,11 +421,132 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 议题库弹窗 -->
|
|
|
+ <el-dialog :title="'议题库'" :visible.sync="topicDialogVisible" width="800px" append-to-body>
|
|
|
+ <el-form :model="topicQuery" inline size="small">
|
|
|
+ <el-form-item label="议题名称">
|
|
|
+ <el-input
|
|
|
+ v-model="topicQuery.topicName"
|
|
|
+ placeholder="请输入议题名称"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleTopicSearch"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleTopicSearch">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetTopicQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ :data="topicList"
|
|
|
+ style="width: 100%"
|
|
|
+ @selection-change="handleTopicSelectionChange"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column label="议题名称" prop="topicName" />
|
|
|
+ <el-table-column label="议题状态" prop="topicState">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.topicState === '1' ? '待上会' : '已上会' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <pagination
|
|
|
+ v-show="topicTotal > 0"
|
|
|
+ :total="topicTotal"
|
|
|
+ :page.sync="topicQuery.pageNum"
|
|
|
+ :limit.sync="topicQuery.pageSize"
|
|
|
+ @pagination="getTopicList"
|
|
|
+ />
|
|
|
+
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="topicDialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="confirmTopicSelect">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 议题新增 -->
|
|
|
+ <el-dialog :title="topicModalTitle" :visible.sync="topicManageVisible" width="600px" append-to-body>
|
|
|
+ <el-form ref="topicFormRef" :model="formTopic" :rules="topicRules" label-width="120px" label-position="left">
|
|
|
+ <el-form-item label="议题名称" prop="topicName">
|
|
|
+ <el-input v-model="formTopic.topicName" placeholder="请输入议题名称" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="议题密码" prop="topicPassword">
|
|
|
+ <el-input v-model="formTopic.topicPassword" placeholder="请输入议题密码" />
|
|
|
+ <div style="font-size: 12px; color: #999; margin-top: 4px;">不填就无密码</div>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="议题内容" prop="topicText">
|
|
|
+ <el-input v-model="formTopic.topicText" type="textarea" placeholder="请输入议题内容" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <!-- 文件上传 -->
|
|
|
+ <el-form-item label="文件上传">
|
|
|
+ <el-upload
|
|
|
+ action=""
|
|
|
+ :auto-upload="false"
|
|
|
+ :on-change="handleFileChange"
|
|
|
+ :file-list="fileList"
|
|
|
+ accept=".pdf,.doc,.docx,.ppt,.pptx"
|
|
|
+ show-file-list
|
|
|
+ list-type="text"
|
|
|
+ >
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <!-- 添加与会人员 -->
|
|
|
+ <el-form-item label="添加与会人员" prop="members">
|
|
|
+ <div class="attendees-container">
|
|
|
+ <div v-for="(item, index) in formTopic.members" :key="index" class="attendee-item">
|
|
|
+ <el-select
|
|
|
+ v-model="item.role"
|
|
|
+ placeholder="请选择角色"
|
|
|
+ style="width: 120px; margin-right: 10px;"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.members"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ <treeselect
|
|
|
+ v-model="item.userIds"
|
|
|
+ :options="deptOptions"
|
|
|
+ :normalizer="normalizer"
|
|
|
+ :multiple="true"
|
|
|
+ :disable-branch-nodes="true"
|
|
|
+ placeholder="请选择员工"
|
|
|
+ style="width: 300px; margin-right: 10px;"
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-button type="text" icon="el-icon-delete" @click="removeTopicMember(index)" />
|
|
|
+ </div>
|
|
|
+ <el-button type="text" icon="el-icon-plus" @click="addTopicMember" style="margin-top: 10px;" />
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitTopicForm">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { listMeeting, getMeeting, delMeeting, addMeeting, updateMeeting } from "@/api/meeting/meeting";
|
|
|
+import { listLibrary, getLibrary, delLibrary, addLibrary, updateLibrary } from "@/api/meeting/library";
|
|
|
import { deptTreeSelect } from "@/api/system/user"
|
|
|
import { listDept } from '@/api/system/dept'
|
|
|
import Treeselect from '@riophae/vue-treeselect'
|
|
@@ -383,6 +577,30 @@ export default {
|
|
|
meetingList: [],
|
|
|
userTreeOptions: [], // 用户树形数据,需从接口获取
|
|
|
deptOptions: [],
|
|
|
+ fileList: [],
|
|
|
+ topicDialogVisible: false,
|
|
|
+ topicManageVisible: false,
|
|
|
+ topicModalTitle: '议题管理',
|
|
|
+ topicQuery: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ topicName: null
|
|
|
+ },
|
|
|
+ selectedTopicId: null, // 单个选中议题ID(用于编辑)
|
|
|
+ selectedTopics: [], // 多选议题(用于删除或最终确认)
|
|
|
+ topicSingle: true, // 非单个禁用
|
|
|
+ topicMultiple: true, // 非多个禁用
|
|
|
+ formTopic: {
|
|
|
+ topicName: '',
|
|
|
+ topicPassword: '',
|
|
|
+ topicText: '',
|
|
|
+ filePath: '',
|
|
|
+ fileName: '',
|
|
|
+ members: []
|
|
|
+ },
|
|
|
+ topicList: [],
|
|
|
+ topic:null,
|
|
|
+ topicTotal: 0,
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
@@ -401,8 +619,45 @@ export default {
|
|
|
endTime:null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ meetingId: null,
|
|
|
+ meetingType: null,
|
|
|
+ meetingState: null,
|
|
|
+ meetingName: null,
|
|
|
+ startTime: null,
|
|
|
+ endTime: null,
|
|
|
+ roomId: null,
|
|
|
+ roomDetail: null,
|
|
|
+ enterTime: null,
|
|
|
+ members: [],
|
|
|
+ checkmode: null,
|
|
|
+ meetingCheck: null,
|
|
|
+ meetingNotice: "0",
|
|
|
+ noticeText: null,
|
|
|
+ maintenance: null,
|
|
|
+ checkOrganization: null,
|
|
|
+ selectText: null,
|
|
|
+ meetingTime: this.getCurrentDateTime(),
|
|
|
+ delFlag: null,
|
|
|
+ remark: null,
|
|
|
+ topicId: null,
|
|
|
+ topicList: []
|
|
|
+ },
|
|
|
// 表单校验
|
|
|
+ topicRules: {
|
|
|
+ topicName: [
|
|
|
+ { required: true, message: '议题名称不能为空', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ members: [
|
|
|
+ { validator: (rule, value, callback) => {
|
|
|
+ if (!value || value.length === 0) {
|
|
|
+ callback(new Error('请至少添加一名与会人员'));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }, trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
rules: {
|
|
|
meetingType: [
|
|
|
{ required: true, message: "会议类型不能为空", trigger: "blur" }
|
|
@@ -439,8 +694,239 @@ export default {
|
|
|
this.loadUserTree();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 添加议题与会人员
|
|
|
+ addTopicMember() {
|
|
|
+ this.formTopic.members.push({ role: null, userIds: [] });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 删除议题与会人员
|
|
|
+ removeTopicMember(index) {
|
|
|
+ if (this.formTopic.members.length > 1) {
|
|
|
+ this.formTopic.members.splice(index, 1);
|
|
|
+ } else {
|
|
|
+ this.$message.warning("至少保留一位与会人员");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toggleTopic(index) {
|
|
|
+ this.form.topicList[index].expanded = !this.form.topicList[index].expanded;
|
|
|
+ },
|
|
|
+
|
|
|
+ // 编辑议题
|
|
|
+ editTopic(index) {
|
|
|
+ const topic = { ...this.form.topicList[index] };
|
|
|
+ this.formTopic = topic;
|
|
|
+ this.openTopicForm('修改议题');
|
|
|
+ },
|
|
|
+
|
|
|
+ // 删除议题
|
|
|
+ deleteTopic(index) {
|
|
|
+ this.$modal.confirm(`是否确认删除该议题?`).then(() => {
|
|
|
+ this.form.topicList.splice(index, 1);
|
|
|
+ this.$message.success('删除成功');
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 预览文件
|
|
|
+ previewFile(topic) {
|
|
|
+ const url = `/meeting/library/download/${topic.filePath}`;
|
|
|
+ window.open(url, '_blank');
|
|
|
+ },
|
|
|
+
|
|
|
+ // 打开议题管理弹窗
|
|
|
+ handleAddTopic() {
|
|
|
+ this.getTopicList();
|
|
|
+ this.topicManageVisible = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取议题列表
|
|
|
+ getTopicList() {
|
|
|
+ listLibrary(this.topicQuery).then(response => {
|
|
|
+ this.topicList = response.rows;
|
|
|
+ this.topicTotal = response.total;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 重置查询条件
|
|
|
+ resetTopicQuery() {
|
|
|
+ this.resetForm('topicQuery');
|
|
|
+ this.getTopicList();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 多选处理
|
|
|
+ handleTopicSelectionChange(selection) {
|
|
|
+ this.selectedTopics = selection;
|
|
|
+ this.topicMultiple = !selection.length;
|
|
|
+ this.topicSingle = selection.length !== 1;
|
|
|
+ },
|
|
|
+
|
|
|
+ // 新增议题
|
|
|
+ handleTopicAdd() {
|
|
|
+ this.formTopic = { members: [] };
|
|
|
+ this.openTopicForm('添加议题');
|
|
|
+ },
|
|
|
+
|
|
|
+ // 编辑议题
|
|
|
+ handleTopicEdit(row) {
|
|
|
+ const topicId = row.topicId || this.selectedTopicId;
|
|
|
+ getLibrary(topicId).then(res => {
|
|
|
+ this.formTopic = res.data;
|
|
|
+ this.openTopicForm('修改议题');
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 删除议题
|
|
|
+ handleTopicDelete(row) {
|
|
|
+ const ids = row.topicId || this.selectedTopics.map(item => item.topicId).join(',');
|
|
|
+ this.$modal.confirm(`是否确认删除议题编号为 "${ids}" 的数据项?`).then(() => {
|
|
|
+ delLibrary(ids).then(() => {
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ this.getTopicList();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 提交议题表单(新增/修改)
|
|
|
+ submitTopicForm() {
|
|
|
+ this.$refs.topicFormRef.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.formTopic.topicId != null) {
|
|
|
+ updateLibrary(this.formTopic).then(() => {
|
|
|
+ this.$modal.msgSuccess("更新成功");
|
|
|
+ this.closeTopicForm();
|
|
|
+ this.getTopicList(); // 刷新议题库列表
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ addLibrary(this.formTopic).then(response => {
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.closeTopicForm();
|
|
|
+ this.getTopicList();
|
|
|
+
|
|
|
+ // 将新创建的议题添加到当前会议的 topicList
|
|
|
+ const newTopic = { ...this.formTopic, topicId: response.data.topicId };
|
|
|
+ this.form.topicList.push(newTopic);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleFileChange(file, fileList) {
|
|
|
+ // 限制只保留一个文件
|
|
|
+ if (fileList.length > 1) {
|
|
|
+ this.fileList = [fileList[fileList.length - 1]]; // 保留最新上传的
|
|
|
+ } else {
|
|
|
+ this.fileList = fileList;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 可选:读取文件内容(如需预览或校验)
|
|
|
+ const reader = new FileReader();
|
|
|
+ reader.onload = (e) => {
|
|
|
+ // 例如:打印文件内容(适用于文本文件)
|
|
|
+ console.log('文件内容:', e.target.result);
|
|
|
+ };
|
|
|
+ reader.readAsText(file.raw);
|
|
|
+
|
|
|
+ // 存储文件到 form 对象中(用于提交)
|
|
|
+ this.form.file = file.raw; // raw 是原始 File 对象
|
|
|
+ },
|
|
|
+ // 确认选取议题
|
|
|
+ confirmSelectedTopic() {
|
|
|
+ if (this.selectedTopics.length === 0) {
|
|
|
+ this.$message.warning('请至少选择一个议题');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const selected = this.selectedTopics.map(item => ({
|
|
|
+ topicId: item.topicId,
|
|
|
+ topicName: item.topicName,
|
|
|
+ topicPassword: item.topicPassword,
|
|
|
+ topicText: item.topicText,
|
|
|
+ filePath: item.filePath,
|
|
|
+ fileName: item.fileName,
|
|
|
+ members: item.members || []
|
|
|
+ }));
|
|
|
+ // 添加到本地 topicList
|
|
|
+ this.form.topicList.push(...selected);
|
|
|
+
|
|
|
+ this.topicManageVisible = false;
|
|
|
+ this.$message.success('议题已添加');
|
|
|
+ },
|
|
|
+
|
|
|
+ // 打开议题表单弹窗(可抽离为单独弹窗)
|
|
|
+ openTopicForm(title) {
|
|
|
+ this.formTopic = {
|
|
|
+ topicName: '',
|
|
|
+ topicPassword: '',
|
|
|
+ topicText: '',
|
|
|
+ filePath: '',
|
|
|
+ fileName: '',
|
|
|
+ members: [{ role: null, userIds: [] }] // 默认一条
|
|
|
+ };
|
|
|
+ this.topicModalTitle = title;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.topicFormRef?.clearValidate();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ closeTopicForm() {
|
|
|
+ this.topicModalTitle = '';
|
|
|
+ this.formTopic = {};
|
|
|
+ },
|
|
|
+ // 打开议题库
|
|
|
+ handleLibrary() {
|
|
|
+ this.getTopicList();
|
|
|
+ this.topicDialogVisible = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ // 查询议题列表
|
|
|
+ getTopicList() {
|
|
|
+ listLibrary(this.topicQuery).then(response => {
|
|
|
+ this.topicList = response.rows;
|
|
|
+ this.topicTotal = response.total;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 搜索议题
|
|
|
+ handleTopicSearch() {
|
|
|
+ this.topicQuery.pageNum = 1;
|
|
|
+ this.getTopicList();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 重置查询条件
|
|
|
+ resetTopicQuery() {
|
|
|
+ this.resetForm('topicQuery');
|
|
|
+ this.handleTopicSearch();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 处理选中变化
|
|
|
+ handleTopicSelectionChange(selection) {
|
|
|
+ this.selectedTopics = selection;
|
|
|
+ },
|
|
|
+
|
|
|
+ // 确认选择议题
|
|
|
+ confirmTopicSelect() {
|
|
|
+ if (this.selectedTopics.length === 0) {
|
|
|
+ this.$message.warning('请至少选择一个议题');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 将选中的议题 ID 添加到 form.topicId
|
|
|
+ const topicIds = this.selectedTopics.map(item => item.topicId);
|
|
|
+ this.form.topicId = topicIds.join(',');
|
|
|
+ console.log(this.form.topicId);
|
|
|
+
|
|
|
+ this.topicDialogVisible = false;
|
|
|
+ this.$message.success('已成功添加议题');
|
|
|
+ },
|
|
|
+ handleTopicLibrary() {
|
|
|
+ this.handleLibrary();
|
|
|
+ },
|
|
|
+ handleDownloadTemplate() {
|
|
|
+ this.$message.info('开始下载模板');
|
|
|
+ },
|
|
|
+ handleImport() {
|
|
|
+ this.$message.info('开始导入');
|
|
|
+ },
|
|
|
loadUserTree() {
|
|
|
deptTreeSelect().then(response => {
|
|
|
+ console.log(response.data)
|
|
|
this.userTreeOptions = response.data;
|
|
|
});
|
|
|
listDept().then(response => {
|
|
@@ -520,13 +1006,25 @@ export default {
|
|
|
maintenance: null,
|
|
|
checkOrganization: null,
|
|
|
selectText: null,
|
|
|
- topicId: null,
|
|
|
- meetingTime: null,
|
|
|
+ meetingTime: this.getCurrentDateTime(),
|
|
|
delFlag: null,
|
|
|
- remark: null
|
|
|
+ remark: null,
|
|
|
+ topicId: null,
|
|
|
+ topicList: []
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
+ // 获取当前日期时间字符串
|
|
|
+ getCurrentDateTime() {
|
|
|
+ const now = new Date();
|
|
|
+ const year = now.getFullYear();
|
|
|
+ const month = String(now.getMonth() + 1).padStart(2, '0');
|
|
|
+ const day = String(now.getDate()).padStart(2, '0');
|
|
|
+ const hour = String(now.getHours()).padStart(2, '0');
|
|
|
+ const minute = String(now.getMinutes()).padStart(2, '0');
|
|
|
+ const second = String(now.getSeconds()).padStart(2, '0');
|
|
|
+ return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
|
|
+ },
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|
|
@@ -596,15 +1094,24 @@ export default {
|
|
|
}, `meeting_${new Date().getTime()}.xlsx`)
|
|
|
},
|
|
|
normalizer(node) {
|
|
|
+ if (node.userId) {
|
|
|
+ return {
|
|
|
+ id: node.userId,
|
|
|
+ label: node.userName || node.nickName,
|
|
|
+ children: null
|
|
|
+ };
|
|
|
+ }
|
|
|
+ // 否则作为部门节点处理
|
|
|
if (node.children && !node.children.length) {
|
|
|
- delete node.children
|
|
|
+ delete node.children;
|
|
|
}
|
|
|
return {
|
|
|
id: node.deptId,
|
|
|
label: node.deptName,
|
|
|
children: node.children
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
@@ -621,4 +1128,51 @@ export default {
|
|
|
align-items: center;
|
|
|
gap: 10px;
|
|
|
}
|
|
|
+
|
|
|
+.topic-setting-container {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 10px 0;
|
|
|
+ border-bottom: 1px solid #e4e7ed;
|
|
|
+}
|
|
|
+.topic-list-container {
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.topic-items {
|
|
|
+ margin-top: 10px;
|
|
|
+ border: 1px solid #e4e7ed;
|
|
|
+ border-radius: 4px;
|
|
|
+}
|
|
|
+
|
|
|
+.topic-item {
|
|
|
+ padding: 10px 15px;
|
|
|
+ border-bottom: 1px solid #f0f0f0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.topic-item:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+}
|
|
|
+
|
|
|
+.topic-name {
|
|
|
+ flex: 1;
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+
|
|
|
+.topic-actions {
|
|
|
+ display: flex;
|
|
|
+ gap: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.topic-details {
|
|
|
+ margin-top: 8px;
|
|
|
+ padding: 8px 0;
|
|
|
+ border-top: 1px dashed #e4e7ed;
|
|
|
+ color: #666;
|
|
|
+ font-size: 12px;
|
|
|
+}
|
|
|
</style>
|