|
@@ -11,7 +11,7 @@
|
|
|
<span>发帖人 :</span>
|
|
<span>发帖人 :</span>
|
|
|
<el-input
|
|
<el-input
|
|
|
clearable
|
|
clearable
|
|
|
- v-model.trim="searchInput.name"
|
|
|
|
|
|
|
+ v-model.trim="searchInput.userName"
|
|
|
class="w-50 m-2"
|
|
class="w-50 m-2"
|
|
|
placeholder="请输入发帖人"
|
|
placeholder="请输入发帖人"
|
|
|
style="width: 180px"
|
|
style="width: 180px"
|
|
@@ -21,15 +21,12 @@
|
|
|
<span>审核状态 :</span>
|
|
<span>审核状态 :</span>
|
|
|
<el-select
|
|
<el-select
|
|
|
clearable
|
|
clearable
|
|
|
- v-model="searchInput.year"
|
|
|
|
|
|
|
+ v-model="searchInput.isPass"
|
|
|
placeholder="请选择审核状态"
|
|
placeholder="请选择审核状态"
|
|
|
>
|
|
>
|
|
|
- <el-option
|
|
|
|
|
- v-for="i in yearData"
|
|
|
|
|
- :key="i.id"
|
|
|
|
|
- :label="i.name"
|
|
|
|
|
- :value="i.id"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-option label="待审核" :value="1" />
|
|
|
|
|
+ <el-option label="已通过" :value="2" />
|
|
|
|
|
+ <el-option label="已拒绝" :value="3" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="condition">
|
|
<div class="condition">
|
|
@@ -72,35 +69,85 @@
|
|
|
<div class="footer" v-loading="loading">
|
|
<div class="footer" v-loading="loading">
|
|
|
<div class="card_all">
|
|
<div class="card_all">
|
|
|
<el-space wrap>
|
|
<el-space wrap>
|
|
|
- <el-card style="max-width: 480px" v-for="o in 16" :key="o">
|
|
|
|
|
|
|
+ <el-card
|
|
|
|
|
+ style="max-width: 480px"
|
|
|
|
|
+ v-for="i in tableData.list"
|
|
|
|
|
+ :key="i.id"
|
|
|
|
|
+ >
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<div class="card-header">
|
|
<div class="card-header">
|
|
|
- <img src="../../assets/img/nanchang.png" alt="" />
|
|
|
|
|
|
|
+ <img v-viewer :src="i.image" alt="" />
|
|
|
<div class="issuer">
|
|
<div class="issuer">
|
|
|
- <p>发帖人</p>
|
|
|
|
|
- <span>更新时间: 2016-12-12 12:30:00</span>
|
|
|
|
|
|
|
+ <p>{{ i.userName }}</p>
|
|
|
|
|
+ <span>{{ i.updateTime }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
- <p @click="viewDetails">
|
|
|
|
|
- 北国风光,千里冰封,万里雪飘。
|
|
|
|
|
- 望长城内外,惟余莽莽;大河上下,顿失滔滔。
|
|
|
|
|
- 山舞银蛇,原驰蜡象,欲与天公试比高。
|
|
|
|
|
- 须晴日,看红装素裹,分外妖娆。 江山如此多娇,引无数英雄竞折腰。
|
|
|
|
|
- 惜秦皇汉武,略输文采;唐宗宋祖,稍逊风骚。
|
|
|
|
|
- 一代天骄,成吉思汗,只识弯弓射大雕。
|
|
|
|
|
- 俱往矣,数风流人物,还看今朝。
|
|
|
|
|
|
|
+ <p @click="viewDetails(i)" class="content">
|
|
|
|
|
+ {{ i.content }}
|
|
|
</p>
|
|
</p>
|
|
|
|
|
+ <div class="dianzan">
|
|
|
|
|
+ <div class="icon">
|
|
|
|
|
+ <img src="../../assets/img/pinglun.png" alt="" />
|
|
|
|
|
+ <span>{{ i.commentNum }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="icon">
|
|
|
|
|
+ <img src="../../assets/img/dianzan.png" alt="" />
|
|
|
|
|
+ <span>{{ i.likeNum }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="card-footer">
|
|
<div class="card-footer">
|
|
|
- <span>待审批 2016-12-12</span>
|
|
|
|
|
- <el-dropdown placement="bottom">
|
|
|
|
|
|
|
+ <div class="footer_left">
|
|
|
|
|
+ <img
|
|
|
|
|
+ v-if="i.passName == '待审核'"
|
|
|
|
|
+ style="width: 25px; margin-right: 5px"
|
|
|
|
|
+ src="../../assets/img/yuandian.png"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ />
|
|
|
|
|
+ <img
|
|
|
|
|
+ v-if="i.passName == '已通过'"
|
|
|
|
|
+ style="width: 25px; margin-right: 5px"
|
|
|
|
|
+ src="../../assets/img/yuandian2.png"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ />
|
|
|
|
|
+ <img
|
|
|
|
|
+ v-if="i.passName == '已拒绝'"
|
|
|
|
|
+ style="width: 25px; margin-right: 5px"
|
|
|
|
|
+ src="../../assets/img/yuandian3.png"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ />
|
|
|
|
|
+ <span style="margin-right: 20px">{{ i.passName }}</span>
|
|
|
|
|
+ <span>{{ i.passTime }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-dropdown placement="bottom" :hide-on-click="false">
|
|
|
<el-icon :size="20"><MoreFilled /></el-icon>
|
|
<el-icon :size="20"><MoreFilled /></el-icon>
|
|
|
<template #dropdown>
|
|
<template #dropdown>
|
|
|
- <el-dropdown-menu>
|
|
|
|
|
- <el-dropdown-item>通过</el-dropdown-item>
|
|
|
|
|
- <el-dropdown-item>拒绝</el-dropdown-item>
|
|
|
|
|
- <el-dropdown-item>删除</el-dropdown-item>
|
|
|
|
|
|
|
+ <el-dropdown-menu v-if="i.passName == '待审核'">
|
|
|
|
|
+ <el-dropdown-item @click="operationPassChange(i)"
|
|
|
|
|
+ ><span style="color: #0095ff"
|
|
|
|
|
+ >通过</span
|
|
|
|
|
+ ></el-dropdown-item
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-dropdown-item @click="operationRefuseChange(i)"
|
|
|
|
|
+ ><span style="color: #ff8d1a"
|
|
|
|
|
+ >拒绝</span
|
|
|
|
|
+ ></el-dropdown-item
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-dropdown-item @click="deleteS(i)"
|
|
|
|
|
+ ><span style="color: #d43030"
|
|
|
|
|
+ >删除</span
|
|
|
|
|
+ ></el-dropdown-item
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
|
+ <el-dropdown-menu
|
|
|
|
|
+ v-if="i.passName == '已通过' || i.passName == '已拒绝'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-dropdown-item @click="deleteS(i)"
|
|
|
|
|
+ ><span style="color: #d43030"
|
|
|
|
|
+ >删除</span
|
|
|
|
|
+ ></el-dropdown-item
|
|
|
|
|
+ >
|
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
</template>
|
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
@@ -148,24 +195,23 @@
|
|
|
label-position="right"
|
|
label-position="right"
|
|
|
status-icon
|
|
status-icon
|
|
|
>
|
|
>
|
|
|
- <el-form-item label="组织分类 :" prop="school">
|
|
|
|
|
|
|
+ <el-form-item label="组织分类 :" prop="categoryId">
|
|
|
<el-select
|
|
<el-select
|
|
|
- @change="schoolFormChange"
|
|
|
|
|
- v-model="ruleForm.school"
|
|
|
|
|
|
|
+ v-model="ruleForm.categoryId"
|
|
|
clearable
|
|
clearable
|
|
|
placeholder="请选择组织分类"
|
|
placeholder="请选择组织分类"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="i in schoolData"
|
|
|
|
|
|
|
+ v-for="i in categoryData"
|
|
|
:key="i.id"
|
|
:key="i.id"
|
|
|
- :label="i.school"
|
|
|
|
|
|
|
+ :label="i.name"
|
|
|
:value="i.id"
|
|
:value="i.id"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="内容 :" prop="bedNumber">
|
|
|
|
|
|
|
+ <el-form-item label="内容 :" prop="content">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model.trim="ruleForm.bedNumber"
|
|
|
|
|
|
|
+ v-model.trim="ruleForm.content"
|
|
|
placeholder="请输入内容"
|
|
placeholder="请输入内容"
|
|
|
clearable
|
|
clearable
|
|
|
:autosize="{ minRows: 4 }"
|
|
:autosize="{ minRows: 4 }"
|
|
@@ -186,6 +232,54 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ class="addStaff"
|
|
|
|
|
+ v-model="operationVisible"
|
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
|
+ :close-on-press-escape="false"
|
|
|
|
|
+ :title="operationTitle"
|
|
|
|
|
+ align-center
|
|
|
|
|
+ width="540"
|
|
|
|
|
+ :before-close="cancelOperation"
|
|
|
|
|
+ destroy-on-close
|
|
|
|
|
+ draggable
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ ref="operationRef"
|
|
|
|
|
+ :model="operationRuleForm"
|
|
|
|
|
+ :rules="operationRules"
|
|
|
|
|
+ label-width="90px"
|
|
|
|
|
+ class="demo-ruleForm"
|
|
|
|
|
+ :size="formSize"
|
|
|
|
|
+ label-position="right"
|
|
|
|
|
+ status-icon
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="审批意见 :"
|
|
|
|
|
+ :prop="operationTitle == '拒绝审批' ? 'passValue' : ''"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model.trim="operationRuleForm.passValue"
|
|
|
|
|
+ placeholder="请输入审批意见"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ :autosize="{ minRows: 4 }"
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="options">
|
|
|
|
|
+ <el-button @click="cancelOperation">取消</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ color="rgba(0, 97, 255, 1)"
|
|
|
|
|
+ class="queding"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="operationSubmitAdd(operationRef)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 确定
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
<!-- 详情弹窗 -->
|
|
<!-- 详情弹窗 -->
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
class="details"
|
|
class="details"
|
|
@@ -201,23 +295,79 @@
|
|
|
>
|
|
>
|
|
|
<div>
|
|
<div>
|
|
|
<div class="card-header">
|
|
<div class="card-header">
|
|
|
- <img src="../../assets/img/nanchang.png" alt="" />
|
|
|
|
|
|
|
+ <img style="border-radius: 50%" :src="detailData.image" alt="" />
|
|
|
<div class="issuer">
|
|
<div class="issuer">
|
|
|
- <p>发帖人</p>
|
|
|
|
|
- <span>更新时间: 2016-12-12 12:30:00</span>
|
|
|
|
|
|
|
+ <p>{{ detailData.userName }}</p>
|
|
|
|
|
+ <span>{{ detailData.updateTime }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <p @click="viewDetails">
|
|
|
|
|
- 北国风光,千里冰封,万里雪飘。
|
|
|
|
|
- 望长城内外,惟余莽莽;大河上下,顿失滔滔。
|
|
|
|
|
- 山舞银蛇,原驰蜡象,欲与天公试比高。 须晴日,看红装素裹,分外妖娆。
|
|
|
|
|
- 江山如此多娇,引无数英雄竞折腰。
|
|
|
|
|
- 惜秦皇汉武,略输文采;唐宗宋祖,稍逊风骚。
|
|
|
|
|
- 一代天骄,成吉思汗,只识弯弓射大雕。 俱往矣,数风流人物,还看今朝。
|
|
|
|
|
|
|
+ <p style="text-indent: 2em; line-height: 1.8">
|
|
|
|
|
+ {{ detailData.content }}
|
|
|
</p>
|
|
</p>
|
|
|
- <div class="card-footer">
|
|
|
|
|
- <p class="comment-count">1条评论数</p>
|
|
|
|
|
- <div class="user">
|
|
|
|
|
|
|
+ <p class="comment-count">{{ detailData.commentNum }}条评论数</p>
|
|
|
|
|
+ <div class="card-footer" v-loading="commentLoading">
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="user"
|
|
|
|
|
+ v-for="(i, index) in commentData"
|
|
|
|
|
+ :key="i.id"
|
|
|
|
|
+ >
|
|
|
|
|
+ <img style="border-radius: 0" :src="i.image" alt="" />
|
|
|
|
|
+ <div class="user-info">
|
|
|
|
|
+ <div class="upvote">
|
|
|
|
|
+ <span class="username">{{ i.commentName }}</span>
|
|
|
|
|
+ <div class="num">
|
|
|
|
|
+ <img src="../../assets/img/upvote.png" alt="" />
|
|
|
|
|
+ <span>{{ i.likeNum }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="comment">
|
|
|
|
|
+ <p style="margin: 5px 0">{{ i.content }}</p>
|
|
|
|
|
+ <span style="font-size: 12px; margin-bottom: 10px">{{
|
|
|
|
|
+ i.createTime
|
|
|
|
|
+ }}</span>
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="i.commentNum > 0 && !i.children"
|
|
|
|
|
+ style="
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ "
|
|
|
|
|
+ @click="openComment(i, index)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 查看全部 {{ i.commentNum }} 回复
|
|
|
|
|
+ <el-icon><ArrowRightBold /></el-icon>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else>
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-loading="commentLoading"
|
|
|
|
|
+ class="user"
|
|
|
|
|
+ v-for="j in i.children"
|
|
|
|
|
+ :key="j.id"
|
|
|
|
|
+ >
|
|
|
|
|
+ <img style="border-radius: 0;margin: 10px 10px 0 0;" :src="j.image" alt="" />
|
|
|
|
|
+ <div class="user-info">
|
|
|
|
|
+ <div class="upvote">
|
|
|
|
|
+ <span class="username">{{ j.commentName }}</span>
|
|
|
|
|
+ <div class="num">
|
|
|
|
|
+ <img src="../../assets/img/upvote.png" alt="" />
|
|
|
|
|
+ <span>{{ j.likeNum }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="comment">
|
|
|
|
|
+ <p style="margin: 5px 0">{{ j.content }}</p>
|
|
|
|
|
+ <span style="font-size: 12px; margin-bottom: 10px">{{
|
|
|
|
|
+ j.createTime
|
|
|
|
|
+ }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- <div class="user">
|
|
|
<img src="../../assets/img/nanchang.png" alt="" />
|
|
<img src="../../assets/img/nanchang.png" alt="" />
|
|
|
<div class="user-info">
|
|
<div class="user-info">
|
|
|
<div class="upvote">
|
|
<div class="upvote">
|
|
@@ -232,7 +382,7 @@
|
|
|
<span>2016-12-12 12:30:00</span>
|
|
<span>2016-12-12 12:30:00</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -252,9 +402,17 @@ import { useRouter } from "vue-router";
|
|
|
import { genFileId, ElMessage, ElMessageBox } from "element-plus";
|
|
import { genFileId, ElMessage, ElMessageBox } from "element-plus";
|
|
|
import { dayjs } from "element-plus";
|
|
import { dayjs } from "element-plus";
|
|
|
import lodash from "lodash";
|
|
import lodash from "lodash";
|
|
|
-import { MoreFilled } from "@element-plus/icons-vue";
|
|
|
|
|
|
|
+import { MoreFilled, ArrowRightBold } from "@element-plus/icons-vue";
|
|
|
import { storeToRefs } from "pinia";
|
|
import { storeToRefs } from "pinia";
|
|
|
import { useCounterStore } from "@/stores/index";
|
|
import { useCounterStore } from "@/stores/index";
|
|
|
|
|
+import {
|
|
|
|
|
+ insertPosts,
|
|
|
|
|
+ queryCategoryDatas,
|
|
|
|
|
+ toExaminePosts,
|
|
|
|
|
+ deletePostsById,
|
|
|
|
|
+ queryPostsPage,
|
|
|
|
|
+ queryCommetns,
|
|
|
|
|
+} from "@/api/alumni-square";
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const store = useCounterStore();
|
|
const store = useCounterStore();
|
|
@@ -271,11 +429,9 @@ const activeIndex = ref(); // 默认跳转路由
|
|
|
const dialongTitle = ref("新增账号"); // 弹窗标题
|
|
const dialongTitle = ref("新增账号"); // 弹窗标题
|
|
|
|
|
|
|
|
const searchInput = reactive({
|
|
const searchInput = reactive({
|
|
|
- name: "",
|
|
|
|
|
- year: null,
|
|
|
|
|
- college: null,
|
|
|
|
|
- major: null,
|
|
|
|
|
- class: null,
|
|
|
|
|
|
|
+ userName: "",
|
|
|
|
|
+ isPass: null,
|
|
|
|
|
+ createTime: null,
|
|
|
}); // 搜索按钮数据
|
|
}); // 搜索按钮数据
|
|
|
|
|
|
|
|
const currentPage = ref(1); // 当前页
|
|
const currentPage = ref(1); // 当前页
|
|
@@ -289,29 +445,34 @@ const addDialogVisible = ref(false); // 控制添加账号弹窗
|
|
|
const formSize = ref("default");
|
|
const formSize = ref("default");
|
|
|
const ruleFormRef = ref();
|
|
const ruleFormRef = ref();
|
|
|
const ruleForm = reactive({
|
|
const ruleForm = reactive({
|
|
|
- school: "靖安校区", //校区名称
|
|
|
|
|
- build: "", //楼栋名称
|
|
|
|
|
- dormitory: "", //寝室号
|
|
|
|
|
- sex: "男", //寝室性别
|
|
|
|
|
- college: "", //所属学院
|
|
|
|
|
- major: "", //所属专业
|
|
|
|
|
- bedNumber: "", //床位数
|
|
|
|
|
- // "gradestr": "", //所属年级
|
|
|
|
|
- remark: "", //备注
|
|
|
|
|
|
|
+ categoryId: "",
|
|
|
|
|
+ content: "",
|
|
|
id: "",
|
|
id: "",
|
|
|
});
|
|
});
|
|
|
// 表单验证
|
|
// 表单验证
|
|
|
const rules = reactive({
|
|
const rules = reactive({
|
|
|
- school: [{ required: true, message: "校区名称不能为空", trigger: "blur" }],
|
|
|
|
|
- build: [{ required: true, message: "楼栋名称不能为空", trigger: "blur" }],
|
|
|
|
|
- dormitory: [{ required: true, message: "寝室号不能为空", trigger: "blur" }],
|
|
|
|
|
- sex: [{ required: true, message: "寝室性别不能为空", trigger: "blur" }],
|
|
|
|
|
- college: [{ required: true, message: "所属学院不能为空", trigger: "blur" }],
|
|
|
|
|
- major: [{ required: true, message: "专业不能为空", trigger: "blur" }],
|
|
|
|
|
- bedNumber: [{ required: true, message: "床位数不能为空", trigger: "blur" }],
|
|
|
|
|
|
|
+ categoryId: [
|
|
|
|
|
+ { required: true, message: "组织分类不能为空", trigger: "blur" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ content: [{ required: true, message: "内容不能为空", trigger: "blur" }],
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const detailsVisible = ref(false); // 详情弹窗
|
|
const detailsVisible = ref(false); // 详情弹窗
|
|
|
|
|
+const detailData = ref();
|
|
|
|
|
+const commentData = ref();
|
|
|
|
|
+const commentLoading = ref(false);
|
|
|
|
|
+
|
|
|
|
|
+const operationVisible = ref();
|
|
|
|
|
+const operationTitle = ref();
|
|
|
|
|
+const operationRef = ref(); // 操作按钮
|
|
|
|
|
+const operationRuleForm = reactive({
|
|
|
|
|
+ passValue: "",
|
|
|
|
|
+ id: "",
|
|
|
|
|
+});
|
|
|
|
|
+// 表单验证
|
|
|
|
|
+const operationRules = reactive({
|
|
|
|
|
+ passValue: [{ required: true, message: "审批意见不能为空", trigger: "blur" }],
|
|
|
|
|
+});
|
|
|
|
|
|
|
|
// 获取账户列表
|
|
// 获取账户列表
|
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
@@ -319,27 +480,62 @@ const getList = async () => {
|
|
|
let params = {
|
|
let params = {
|
|
|
currentPage: currentPage.value, // 当前页
|
|
currentPage: currentPage.value, // 当前页
|
|
|
pageCount: pageSize.value, // 一页数据条数
|
|
pageCount: pageSize.value, // 一页数据条数
|
|
|
- schoolId: searchInput.schoolId,
|
|
|
|
|
- buildId: searchInput.buildId,
|
|
|
|
|
|
|
+ userName: searchInput.userName,
|
|
|
|
|
+ isPass: searchInput.isPass,
|
|
|
};
|
|
};
|
|
|
|
|
+ if (searchInput.createTime) {
|
|
|
|
|
+ params.startTime = searchInput.createTime[0];
|
|
|
|
|
+ params.endTime = searchInput.createTime[1];
|
|
|
|
|
+ }
|
|
|
|
|
+ queryPostsPage(params).then((res) => {
|
|
|
|
|
+ console.log(res, "获取帖子分页数据");
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ tableData.list = res.data.list;
|
|
|
|
|
+ total.value = res.data.totalCount;
|
|
|
|
|
+ loading.value = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ loading.value = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const categoryData = ref();
|
|
|
|
|
+const categoryList = async () => {
|
|
|
|
|
+ let res = await queryCategoryDatas();
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ categoryData.value = res.data;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 搜索功能
|
|
// 搜索功能
|
|
|
-const searchBtn = lodash.debounce(async () => {}, 300);
|
|
|
|
|
-const resetBtn = lodash.debounce(async () => {}, 300);
|
|
|
|
|
|
|
+const searchBtn = lodash.debounce(async () => {
|
|
|
|
|
+ currentPage.value = 1;
|
|
|
|
|
+ getList();
|
|
|
|
|
+}, 300);
|
|
|
|
|
+const resetBtn = lodash.debounce(async () => {
|
|
|
|
|
+ searchInput.userName = "";
|
|
|
|
|
+ searchInput.isPass = null;
|
|
|
|
|
+ searchInput.createTime = null;
|
|
|
|
|
+ currentPage.value = 1;
|
|
|
|
|
+ getList();
|
|
|
|
|
+}, 300);
|
|
|
|
|
|
|
|
// 添加账号
|
|
// 添加账号
|
|
|
const addlist = () => {
|
|
const addlist = () => {
|
|
|
dialongTitle.value = "发布动态";
|
|
dialongTitle.value = "发布动态";
|
|
|
addDialogVisible.value = true;
|
|
addDialogVisible.value = true;
|
|
|
- ruleForm.school = null;
|
|
|
|
|
-};
|
|
|
|
|
-// 添加账号
|
|
|
|
|
-const updateS = (row) => {
|
|
|
|
|
- console.log(row);
|
|
|
|
|
- dialongTitle.value = "编辑寝室信息";
|
|
|
|
|
- addDialogVisible.value = true;
|
|
|
|
|
|
|
+ ruleForm.categoryId = "";
|
|
|
|
|
+ ruleForm.content = "";
|
|
|
|
|
+ ruleForm.id = "";
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
const deleteS = async (row) => {
|
|
const deleteS = async (row) => {
|
|
|
ElMessageBox.confirm("是否删除此数据?", "提示!!!", {
|
|
ElMessageBox.confirm("是否删除此数据?", "提示!!!", {
|
|
|
confirmButtonText: "确认",
|
|
confirmButtonText: "确认",
|
|
@@ -347,29 +543,59 @@ const deleteS = async (row) => {
|
|
|
type: "warning",
|
|
type: "warning",
|
|
|
})
|
|
})
|
|
|
.then(async () => {
|
|
.then(async () => {
|
|
|
- loading.value = true;
|
|
|
|
|
- let data = {
|
|
|
|
|
- dormitoryId: row.id, // 当前页
|
|
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ id: row.id,
|
|
|
};
|
|
};
|
|
|
|
|
+ let res = await deletePostsById(params);
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ getList();
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
-// 保留
|
|
|
|
|
-const retainS = async (row, flag) => {
|
|
|
|
|
- let data = {
|
|
|
|
|
- dormitoryIds: [row.id], // 当前页
|
|
|
|
|
- retentionState: flag, //保留状态 1:开放,2:保留
|
|
|
|
|
- };
|
|
|
|
|
-};
|
|
|
|
|
|
|
|
|
|
// 确认添加员工
|
|
// 确认添加员工
|
|
|
const submitAdd = lodash.debounce(async (formEl) => {
|
|
const submitAdd = lodash.debounce(async (formEl) => {
|
|
|
if (!formEl) return;
|
|
if (!formEl) return;
|
|
|
await formEl.validate(async (valid, fields) => {
|
|
await formEl.validate(async (valid, fields) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- console.log(data);
|
|
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ categoryId: ruleForm.categoryId,
|
|
|
|
|
+ content: ruleForm.content,
|
|
|
|
|
+ };
|
|
|
|
|
+ let res = await insertPosts(data);
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ addDialogVisible.value = false;
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ getList();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
console.log("error submit!", fields);
|
|
console.log("error submit!", fields);
|
|
|
}
|
|
}
|
|
@@ -381,8 +607,103 @@ const cancelAdd = () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 查看详情
|
|
// 查看详情
|
|
|
-const viewDetails = () => {
|
|
|
|
|
|
|
+const viewDetails = async (i) => {
|
|
|
|
|
+ console.log(i, "查看详情");
|
|
|
|
|
+ commentLoading.value = true;
|
|
|
detailsVisible.value = true;
|
|
detailsVisible.value = true;
|
|
|
|
|
+ detailData.value = i;
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ postsId: i.id,
|
|
|
|
|
+ commentId: 0,
|
|
|
|
|
+ };
|
|
|
|
|
+ let res = await queryCommetns(params);
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ commentLoading.value = false;
|
|
|
|
|
+ console.log(res, "评论");
|
|
|
|
|
+ commentData.value = res.data;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+// 查看更多回复
|
|
|
|
|
+const openComment = async (i, index) => {
|
|
|
|
|
+ commentLoading.value = true;
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ postsId: i.id,
|
|
|
|
|
+ commentId: i.id,
|
|
|
|
|
+ };
|
|
|
|
|
+ let res = await queryCommetns(params);
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ // console.log(res, "回复评论");
|
|
|
|
|
+ commentLoading.value = false;
|
|
|
|
|
+ commentData.value[index].children = res.data;
|
|
|
|
|
+ console.log(commentData.value, "全部评论");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 通过
|
|
|
|
|
+const operationPassChange = async (row) => {
|
|
|
|
|
+ operationTitle.value = "通过审批";
|
|
|
|
|
+ operationVisible.value = true;
|
|
|
|
|
+ operationRuleForm.passValue = null;
|
|
|
|
|
+ operationRuleForm.id = row.id;
|
|
|
|
|
+};
|
|
|
|
|
+// 拒绝
|
|
|
|
|
+const operationRefuseChange = async (row) => {
|
|
|
|
|
+ operationTitle.value = "拒绝审批";
|
|
|
|
|
+ operationVisible.value = true;
|
|
|
|
|
+ operationRuleForm.passValue = null;
|
|
|
|
|
+ operationRuleForm.id = row.id;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 确认审批
|
|
|
|
|
+const operationSubmitAdd = lodash.debounce(async (formEl) => {
|
|
|
|
|
+ if (!formEl) return;
|
|
|
|
|
+ await formEl.validate(async (valid, fields) => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ id: operationRuleForm.id,
|
|
|
|
|
+ isPass: operationTitle.value == "通过审批" ? 2 : 3,
|
|
|
|
|
+ passValue: operationRuleForm.passValue,
|
|
|
|
|
+ };
|
|
|
|
|
+ let res = await toExaminePosts(data);
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ operationVisible.value = false;
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ getList();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.log("error submit!", fields);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+}, 1000);
|
|
|
|
|
+
|
|
|
|
|
+const cancelOperation = () => {
|
|
|
|
|
+ operationVisible.value = false;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 每页显示条数
|
|
// 每页显示条数
|
|
@@ -397,8 +718,8 @@ const handleCurrentChange = (value) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
onBeforeMount(() => {
|
|
onBeforeMount(() => {
|
|
|
- // getList();
|
|
|
|
|
- // schoolList();
|
|
|
|
|
|
|
+ getList();
|
|
|
|
|
+ categoryList();
|
|
|
// collegeList();
|
|
// collegeList();
|
|
|
});
|
|
});
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
@@ -504,6 +825,7 @@ onUnmounted(() => {
|
|
|
width: 50px;
|
|
width: 50px;
|
|
|
height: 50px;
|
|
height: 50px;
|
|
|
margin-right: 20px;
|
|
margin-right: 20px;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
}
|
|
}
|
|
|
.issuer {
|
|
.issuer {
|
|
|
p {
|
|
p {
|
|
@@ -518,9 +840,39 @@ onUnmounted(() => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
:deep(.el-card__body) {
|
|
:deep(.el-card__body) {
|
|
|
- cursor: pointer;
|
|
|
|
|
padding: 0 20px 10px;
|
|
padding: 0 20px 10px;
|
|
|
font-size: 13px;
|
|
font-size: 13px;
|
|
|
|
|
+ .content {
|
|
|
|
|
+ height: 78px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ display: -webkit-box;
|
|
|
|
|
+ -webkit-line-clamp: 3;
|
|
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
|
|
+ line-height: 1.6;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .dianzan {
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ .icon {
|
|
|
|
|
+ margin: 0 15px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-around;
|
|
|
|
|
+ img {
|
|
|
|
|
+ // cursor: pointer;
|
|
|
|
|
+ width: 18px;
|
|
|
|
|
+ height: 18px;
|
|
|
|
|
+ margin-right: 8px;
|
|
|
|
|
+ }
|
|
|
|
|
+ span {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
:deep(.el-card__footer) {
|
|
:deep(.el-card__footer) {
|
|
|
padding: 10px 20px;
|
|
padding: 10px 20px;
|
|
@@ -534,6 +886,10 @@ onUnmounted(() => {
|
|
|
outline: 2px solid rgba(38, 151, 255, 0.5) !important;
|
|
outline: 2px solid rgba(38, 151, 255, 0.5) !important;
|
|
|
// outline-offset: 2px;
|
|
// outline-offset: 2px;
|
|
|
}
|
|
}
|
|
|
|
|
+ .footer_left {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -656,7 +1012,16 @@ onUnmounted(() => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ .comment-count {
|
|
|
|
|
+ padding: 10px ;
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ font-weight: 800;
|
|
|
|
|
+ background-color: #f5f7fa;
|
|
|
|
|
+ border-bottom: 0.5px solid #e0e0e0;
|
|
|
|
|
+ }
|
|
|
.card-footer {
|
|
.card-footer {
|
|
|
|
|
+ max-height: 450px;
|
|
|
|
|
+ overflow: auto;
|
|
|
background-color: #f5f7fa;
|
|
background-color: #f5f7fa;
|
|
|
min-height: 100px;
|
|
min-height: 100px;
|
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
@@ -671,18 +1036,20 @@ onUnmounted(() => {
|
|
|
img {
|
|
img {
|
|
|
width: 40px;
|
|
width: 40px;
|
|
|
height: 40px;
|
|
height: 40px;
|
|
|
- margin: 0 20px;
|
|
|
|
|
|
|
+ margin: 10px 15px;
|
|
|
}
|
|
}
|
|
|
.user-info {
|
|
.user-info {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
- margin-bottom: 10px;
|
|
|
|
|
|
|
+ // margin-bottom: 10px;
|
|
|
.upvote {
|
|
.upvote {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- margin: 8px 0;
|
|
|
|
|
- .username{
|
|
|
|
|
|
|
+ margin: 8px 0 0;
|
|
|
|
|
+ .username {
|
|
|
font-weight: 800;
|
|
font-weight: 800;
|
|
|
|
|
+ // color: #2A82E4;
|
|
|
|
|
+ // color: #aaabad;
|
|
|
}
|
|
}
|
|
|
img {
|
|
img {
|
|
|
width: 19px;
|
|
width: 19px;
|
|
@@ -695,9 +1062,37 @@ onUnmounted(() => {
|
|
|
margin-right: 20px;
|
|
margin-right: 20px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ .comment {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ /* WebKit 内核浏览器(Chrome、Edge、Safari)的滚动条样式 */
|
|
|
|
|
+ .card-footer::-webkit-scrollbar {
|
|
|
|
|
+ /* 滚动条宽度 */
|
|
|
|
|
+ width: 6px;
|
|
|
|
|
+ height: 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /* 滚动条轨道 */
|
|
|
|
|
+ .card-footer::-webkit-scrollbar-track {
|
|
|
|
|
+ background: #f5f7fa;
|
|
|
|
|
+ border-radius: 3px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /* 滚动条滑块 */
|
|
|
|
|
+ .card-footer::-webkit-scrollbar-thumb {
|
|
|
|
|
+ background: #c0c4cc;
|
|
|
|
|
+ border-radius: 3px;
|
|
|
|
|
+ /* 鼠标悬停时滑块变色 */
|
|
|
|
|
+ transition: background 0.3s;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .card-footer::-webkit-scrollbar-thumb:hover {
|
|
|
|
|
+ background: #909399;
|
|
|
|
|
+ }
|
|
|
.el-textarea {
|
|
.el-textarea {
|
|
|
width: 400px;
|
|
width: 400px;
|
|
|
}
|
|
}
|