Compare commits

...

2 Commits

Author SHA1 Message Date
9b4d11ae5e style(Home): 优化首页组件代码格式和样式细节
- 统一格式化模板中的标签闭合和属性写法
- 添加数量单元格的样式效果和交互状态
- 优化对话框和模态框的样式细节
2025-08-16 16:49:52 +08:00
ee500f95b5 style(ai_stream): 移除多余的空行以提升代码可读性 2025-08-16 16:04:49 +08:00
2 changed files with 411 additions and 185 deletions

View File

@@ -1,6 +1,4 @@
import { getTokenKeySessionStorage } from "@/utils/auth"; import { getTokenKeySessionStorage } from "@/utils/auth";
/** /**
* 创建聊天流式连接 * 创建聊天流式连接
* @param {Object} params 请求参数 * @param {Object} params 请求参数

View File

@@ -1,9 +1,8 @@
<template> <template>
<div class="home-main-box"> <div class="home-main-box">
<div class="head-information"> <div class="head-information">
<div> <div>
<div class="avatar"><img :src="avatar" alt="avatar"></div> <div class="avatar"><img :src="avatar" alt="avatar" /></div>
<!-- <div class="avatar"><img src = "./images/test-avatar.jpeg" alt = "avatar"></div>--> <!-- <div class="avatar"><img src = "./images/test-avatar.jpeg" alt = "avatar"></div>-->
<div class="text-list"> <div class="text-list">
@@ -33,36 +32,48 @@
</div> </div>
</div> </div>
</div> </div>
<div style="overflow: hidden;text-overflow: ellipsis"> <div style="overflow: hidden; text-overflow: ellipsis">
<div class="home-page-title"> <div class="home-page-title">
<div>我的消息</div> <div>我的消息</div>
<div @click="showMessageDialog" style="cursor: pointer;">更多 <span>></span></div> <div @click="showMessageDialog" style="cursor: pointer">
更多 <span>></span>
</div>
</div> </div>
<div> <div>
<div class="home-page-content"> <div class="home-page-content">
<div v-if="!isEmpty(msg_list)" v-for="(v, i) in msg_list" :key="i" class="message-item" @click="showMessageDetail(v, i)"> <template v-if="!isEmpty(msg_list)">
<div>{{ v.content }}</div> <div
<!-- <div>2024-09-24</div>--> v-for="(v, i) in msg_list"
:key="i"
class="message-item"
@click="showMessageDetail(v, i)"
>
<div>{{ v.content }}</div>
<!-- <div>2024-09-24</div>-->
</div> </div>
<div v-else> </template>
暂无消息 <div v-else>暂无消息</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div style="overflow: hidden;text-overflow: ellipsis"> <div style="overflow: hidden; text-overflow: ellipsis">
<div class="home-page-title"> <div class="home-page-title">
<div>公示栏</div> <div>公示栏</div>
<div @click="showAnnouncementDialog" style="cursor: pointer;">更多 <span>></span></div> <div @click="showAnnouncementDialog" style="cursor: pointer">
更多 <span>></span>
</div>
</div> </div>
<div> <div>
<div class="home-page-content"> <div class="home-page-content">
<div v-for="(v, i) in comp_list.slice(0, 9)" :key="i" class="announcement-item" @click="showAnnouncementDetail(v, i)"> <div
v-for="(v, i) in comp_list.slice(0, 9)"
:key="i"
class="announcement-item"
@click="showAnnouncementDetail(v, i)"
>
<div>{{ v.submitterName }}--{{ v.projectName }} -- 审核通过</div> <div>{{ v.submitterName }}--{{ v.projectName }} -- 审核通过</div>
<div>{{ formatTime(v.createTime) }}</div> <div>{{ formatTime(v.createTime) }}</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -75,132 +86,194 @@
<div>更多 <span>></span></div> <div>更多 <span>></span></div>
</div> </div>
<div class="content"> <div class="content">
<div v-hasPermi="['home:fdy:undo1']" @click="going('/basedata/private/fdypic')"> <div
<div><img src="./images/6.png" alt="icon"></div> v-hasPermi="['home:fdy:undo1']"
@click="going('/basedata/private/fdypic')"
>
<div><img src="./images/6.png" alt="icon" /></div>
<div>辅导员</div> <div>辅导员</div>
<div>画像</div> <div>画像</div>
</div> </div>
<div v-hasPermi="['home:fdy:undo1']" @click="going('/basedata/stu/own')"> <div
<div><img src="./images/6.png" alt="icon"></div> v-hasPermi="['home:fdy:undo1']"
@click="going('/basedata/stu/own')"
>
<div><img src="./images/6.png" alt="icon" /></div>
<div>辅导员</div> <div>辅导员</div>
<div>学生信息</div> <div>学生信息</div>
</div> </div>
<div v-hasPermi="['home:fdy:undo1']" @click="going('/stuCQS/class-score/teacher-own')"> <div
<div><img src="./images/10.png" alt="icon"></div> v-hasPermi="['home:fdy:undo1']"
@click="going('/stuCQS/class-score/teacher-own')"
>
<div><img src="./images/10.png" alt="icon" /></div>
<div>辅导员</div> <div>辅导员</div>
<div>综合素质</div> <div>综合素质</div>
</div> </div>
<div v-hasPermi="['home:fdy:undo1']" @click="going('/dormitory/new/fdy')"> <div
<div><img src="./images/9.png" alt="icon"></div> v-hasPermi="['home:fdy:undo1']"
@click="going('/dormitory/new/fdy')"
>
<div><img src="./images/9.png" alt="icon" /></div>
<div>辅导员</div> <div>辅导员</div>
<div>学生宿舍</div> <div>学生宿舍</div>
</div> </div>
<div v-hasPermi="['home:fdy:qgzx']" @click="going('/workstudy/stupost/fdyAll')"> <div
<div><img src="./images/5.png" alt="icon"></div> v-hasPermi="['home:fdy:qgzx']"
@click="going('/workstudy/stupost/fdyAll')"
>
<div><img src="./images/5.png" alt="icon" /></div>
<div>辅导员</div> <div>辅导员</div>
<div>勤工助学</div> <div>勤工助学</div>
</div> </div>
<div v-hasPermi="['home:zdls:qgzx']" @click="going('/workstudy/stupost/ZdlsAll')"> <div
<div><img src="./images/5.png" alt="icon"></div> v-hasPermi="['home:zdls:qgzx']"
@click="going('/workstudy/stupost/ZdlsAll')"
>
<div><img src="./images/5.png" alt="icon" /></div>
<div>指导老师</div> <div>指导老师</div>
<div>勤工助学</div> <div>勤工助学</div>
</div> </div>
<div v-hasPermi="['home:fdy:undo1']" @click="going('/hard/pks/fdyjl')"> <div
<div><img src="./images/6.png" alt="icon"></div> v-hasPermi="['home:fdy:undo1']"
@click="going('/hard/pks/fdyjl')"
>
<div><img src="./images/6.png" alt="icon" /></div>
<div>辅导员</div> <div>辅导员</div>
<div>困难认定</div> <div>困难认定</div>
</div> </div>
<div v-hasPermi="['home:fdy:undo1']" @click="going('/hard/zxj/record')"> <div
<div><img src="./images/5.png" alt="icon"></div> v-hasPermi="['home:fdy:undo1']"
@click="going('/hard/zxj/record')"
>
<div><img src="./images/5.png" alt="icon" /></div>
<div>辅导员</div> <div>辅导员</div>
<div>助学金</div> <div>助学金</div>
</div> </div>
<div v-hasPermi="['home:fdy:undo1']" @click="going('/stuGood/about-good/fdyall')"> <div
<div><img src="./images/7.png" alt="icon"></div> v-hasPermi="['home:fdy:undo1']"
@click="going('/stuGood/about-good/fdyall')"
>
<div><img src="./images/7.png" alt="icon" /></div>
<div>辅导员</div> <div>辅导员</div>
<div>评优评先</div> <div>评优评先</div>
</div> </div>
<div v-hasPermi="['home:dept:qgzx']" @click="going('/workstudy/post/DeptAll')"> <div
<div><img src="./images/5.png" alt="icon"></div> v-hasPermi="['home:dept:qgzx']"
@click="going('/workstudy/post/DeptAll')"
>
<div><img src="./images/5.png" alt="icon" /></div>
<div>部门领导</div> <div>部门领导</div>
<div>勤工助学</div> <div>勤工助学</div>
</div> </div>
<div v-hasPermi="['home:xw:undo1']" @click="going('/stuCQS/cphxw/stu')"> <div
<div><img src="./images/4.png" alt="icon"></div> v-hasPermi="['home:xw:undo1']"
@click="going('/stuCQS/cphxw/stu')"
>
<div><img src="./images/4.png" alt="icon" /></div>
<div>学务</div> <div>学务</div>
<div>综合素质</div> <div>综合素质</div>
</div> </div>
<div v-hasPermi="['home:xw:undo1']" @click="going('/stuGood/about-good/xwall')"> <div
<div><img src="./images/7.png" alt="icon"></div> v-hasPermi="['home:xw:undo1']"
@click="going('/stuGood/about-good/xwall')"
>
<div><img src="./images/7.png" alt="icon" /></div>
<div>学务</div> <div>学务</div>
<div>评优评先</div> <div>评优评先</div>
</div> </div>
<div v-hasPermi="['home:xw:undo1']" @click="going('/hard/pks/xwjl')"> <div v-hasPermi="['home:xw:undo1']" @click="going('/hard/pks/xwjl')">
<div><img src="./images/12.png" alt="icon"></div> <div><img src="./images/12.png" alt="icon" /></div>
<div>学务</div> <div>学务</div>
<div>困难认定</div> <div>困难认定</div>
</div> </div>
<div v-hasPermi="['home:xw:undo1']" @click="going('/hard/zxj/recordXw')"> <div
<div><img src="./images/11.png" alt="icon"></div> v-hasPermi="['home:xw:undo1']"
@click="going('/hard/zxj/recordXw')"
>
<div><img src="./images/11.png" alt="icon" /></div>
<div>学务</div> <div>学务</div>
<div>助学金</div> <div>助学金</div>
</div> </div>
<div v-hasPermi="['home:xw:undo1']" @click="going('/dormitory/new/xw')"> <div
<div><img src="./images/9.png" alt="icon"></div> v-hasPermi="['home:xw:undo1']"
@click="going('/dormitory/new/xw')"
>
<div><img src="./images/9.png" alt="icon" /></div>
<div>学务</div> <div>学务</div>
<div>学生宿舍</div> <div>学生宿舍</div>
</div> </div>
<div
<div v-hasPermi="['home:stu:undo1']" @click="going('/workstudy/post/hall')"> v-hasPermi="['home:stu:undo1']"
<div><img src="./images/5.png" alt="icon"></div> @click="going('/workstudy/post/hall')"
>
<div><img src="./images/5.png" alt="icon" /></div>
<div>岗位大厅</div> <div>岗位大厅</div>
<div>勤工助学</div> <div>勤工助学</div>
</div> </div>
<div v-hasPermi="['home:zzb:qgzx']" @click="going('/workstudy/post/HighAll')"> <div
<div><img src="./images/5.png" alt="icon"></div> v-hasPermi="['home:zzb:qgzx']"
@click="going('/workstudy/post/HighAll')"
>
<div><img src="./images/5.png" alt="icon" /></div>
<div>资助办</div> <div>资助办</div>
<div>勤工助学</div> <div>勤工助学</div>
</div> </div>
<div v-hasPermi="['home:xg:undo1']" @click="going('/stuCQS/infofill/report/cq_score')"> <div
<div><img src="./images/8.png" alt="icon"></div> v-hasPermi="['home:xg:undo1']"
@click="going('/stuCQS/infofill/report/cq_score')"
>
<div><img src="./images/8.png" alt="icon" /></div>
<div>学工</div> <div>学工</div>
<div>综合素质</div> <div>综合素质</div>
</div> </div>
<div v-hasPermi="['home:xg:undo1']" @click="going('/stuGood/about-good/all')"> <div
<div><img src="./images/7.png" alt="icon"></div> v-hasPermi="['home:xg:undo1']"
@click="going('/stuGood/about-good/all')"
>
<div><img src="./images/7.png" alt="icon" /></div>
<div>学工</div> <div>学工</div>
<div>评优评先</div> <div>评优评先</div>
</div> </div>
<div v-hasPermi="['home:xg:undo1']" @click="going('/hard/pks/jwcjl')"> <div v-hasPermi="['home:xg:undo1']" @click="going('/hard/pks/jwcjl')">
<div><img src="./images/12.png" alt="icon"></div> <div><img src="./images/12.png" alt="icon" /></div>
<div>学工</div> <div>学工</div>
<div>困难认定</div> <div>困难认定</div>
</div> </div>
<div v-hasPermi="['home:xg:undo1']" @click="going('/hard/zxj/record')"> <div
<div><img src="./images/5.png" alt="icon"></div> v-hasPermi="['home:xg:undo1']"
@click="going('/hard/zxj/record')"
>
<div><img src="./images/5.png" alt="icon" /></div>
<div>学工</div> <div>学工</div>
<div>助学金</div> <div>助学金</div>
</div> </div>
<div v-hasPermi="['home:xg:undo1']" @click="going('/dormitory/stuDom/clear')"> <div
<div><img src="./images/9.png" alt="icon"></div> v-hasPermi="['home:xg:undo1']"
@click="going('/dormitory/stuDom/clear')"
>
<div><img src="./images/9.png" alt="icon" /></div>
<div>学工</div> <div>学工</div>
<div>学生宿舍</div> <div>学生宿舍</div>
</div> </div>
<div v-hasPermi="['home:xw:undo1']" @click="going('/system/suggestion')"> <div
<div><img src="./images/11.png" alt="icon"></div> v-hasPermi="['home:xw:undo1']"
@click="going('/system/suggestion')"
>
<div><img src="./images/11.png" alt="icon" /></div>
<div>优化建议</div> <div>优化建议</div>
</div> </div>
</div> </div>
@@ -211,9 +284,23 @@
<div>更多 <span>></span></div> <div>更多 <span>></span></div>
</div> </div>
<div class="content"> <div class="content">
<el-table :data="listData" :border="false" height="368" style="width: 100%;"> <el-table
:data="listData"
:border="false"
height="368"
style="width: 100%"
>
<el-table-column prop="label" label="项目" align="center" /> <el-table-column prop="label" label="项目" align="center" />
<el-table-column prop="value" label="数量" align="center" /> <el-table-column prop="value" label="数量" align="center">
<template v-slot="scope">
<div
class="quantity-cell"
:class="{ 'zero-quantity': scope.row.value == 0 }"
>
{{ scope.row.value }}
</div>
</template>
</el-table-column>
<el-table-column prop="controller" align="center" label="操作"> <el-table-column prop="controller" align="center" label="操作">
<template v-slot="scope"> <template v-slot="scope">
<div class="going" @click="going(scope.row.url)">查看更多</div> <div class="going" @click="going(scope.row.url)">查看更多</div>
@@ -224,17 +311,61 @@
</div> </div>
</div> </div>
<div v-show="false"> <div v-show="false">
<jwc-undo v-if="checkPermi(['home:xg:undo1'])" v-hasPermi="['home:xg:undo1']" ref="childOne" /> <jwc-undo
<xw-undo v-if="checkPermi(['home:xw:undo1'])" v-hasPermi="['home:xw:undo1']" ref="child2" /> v-if="checkPermi(['home:xg:undo1'])"
<fdy-undo v-if="checkPermi(['home:fdy:undo1'])" v-hasPermi="['home:fdy:undo1']" ref="child3" /> v-hasPermi="['home:xg:undo1']"
<stu-undo v-if="checkPermi(['home:stu:undo1'])" v-hasPermi="['home:stu:undo1']" ref="child4" /> ref="childOne"
<fdy-qgzx v-if="checkPermi(['home:fdy:qgzx'])" v-hasPermi="['home:fdy:qgzx']" ref="child5" /> />
<zdls-qgzx v-if="checkPermi(['home:zdls:qgzx'])" v-hasPermi="['home:zdls:qgzx']" ref="child6" /> <xw-undo
<dept-qgzx v-if="checkPermi(['home:dept:qgzx'])" v-hasPermi="['home:dept:qgzx']" ref="child7" /> v-if="checkPermi(['home:xw:undo1'])"
<zzb-qgzx v-if="checkPermi(['home:zzb:qgzx'])" v-hasPermi="['home:zzb:qgzx']" ref="child8" /> v-hasPermi="['home:xw:undo1']"
<zzbld-qgzx v-if="checkPermi(['home:zzbld:qgzx'])" v-hasPermi="['home:zzbld:qgzx']" ref="child9" /> ref="child2"
<jwc-bottom v-if="checkPermi(['home:xg:undo1'])" v-hasPermi="['home:xg:undo1']" ref="child10" /> />
<sjUndo v-if="checkPermi(['home:sj:undo1'])" v-hasPermi="['home:sj:undo1']" ref="child11" /> <fdy-undo
v-if="checkPermi(['home:fdy:undo1'])"
v-hasPermi="['home:fdy:undo1']"
ref="child3"
/>
<stu-undo
v-if="checkPermi(['home:stu:undo1'])"
v-hasPermi="['home:stu:undo1']"
ref="child4"
/>
<fdy-qgzx
v-if="checkPermi(['home:fdy:qgzx'])"
v-hasPermi="['home:fdy:qgzx']"
ref="child5"
/>
<zdls-qgzx
v-if="checkPermi(['home:zdls:qgzx'])"
v-hasPermi="['home:zdls:qgzx']"
ref="child6"
/>
<dept-qgzx
v-if="checkPermi(['home:dept:qgzx'])"
v-hasPermi="['home:dept:qgzx']"
ref="child7"
/>
<zzb-qgzx
v-if="checkPermi(['home:zzb:qgzx'])"
v-hasPermi="['home:zzb:qgzx']"
ref="child8"
/>
<zzbld-qgzx
v-if="checkPermi(['home:zzbld:qgzx'])"
v-hasPermi="['home:zzbld:qgzx']"
ref="child9"
/>
<jwc-bottom
v-if="checkPermi(['home:xg:undo1'])"
v-hasPermi="['home:xg:undo1']"
ref="child10"
/>
<sjUndo
v-if="checkPermi(['home:sj:undo1'])"
v-hasPermi="['home:sj:undo1']"
ref="child11"
/>
</div> </div>
<!-- 我的消息详情对话框 --> <!-- 我的消息详情对话框 -->
@@ -244,15 +375,26 @@
width="80%" width="80%"
:show-close="true" :show-close="true"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false"> :close-on-press-escape="false"
>
<div class="message-dialog-content"> <div class="message-dialog-content">
<el-table :data="msg_list" style="width: 100%" max-height="400"> <el-table :data="msg_list" style="width: 100%" max-height="400">
<el-table-column prop="content" label="消息内容" min-width="200"> <el-table-column prop="content" label="消息内容" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="message-content clickable-row" @click="viewMessageDetail(scope.row)">{{ scope.row.content }}</div> <div
class="message-content clickable-row"
@click="viewMessageDetail(scope.row)"
>
{{ scope.row.content }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" width="180" align="center"> <el-table-column
prop="createTime"
label="创建时间"
width="180"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatTime(scope.row.createTime) }} {{ formatTime(scope.row.createTime) }}
</template> </template>
@@ -272,13 +414,24 @@
width="80%" width="80%"
:show-close="true" :show-close="true"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false"> :close-on-press-escape="false"
>
<div class="announcement-dialog-content"> <div class="announcement-dialog-content">
<el-table :data="comp_list" style="width: 100%" max-height="400"> <el-table :data="comp_list" style="width: 100%" max-height="400">
<el-table-column prop="submitterName" label="提交人" width="120" align="center" /> <el-table-column
prop="submitterName"
label="提交人"
width="120"
align="center"
/>
<el-table-column prop="projectName" label="项目名称" min-width="200"> <el-table-column prop="projectName" label="项目名称" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="project-name clickable-row" @click="viewAnnouncementDetail(scope.row)">{{ scope.row.projectName }}</div> <div
class="project-name clickable-row"
@click="viewAnnouncementDetail(scope.row)"
>
{{ scope.row.projectName }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="100" align="center"> <el-table-column label="状态" width="100" align="center">
@@ -286,7 +439,12 @@
<el-tag type="success" size="small">审核通过</el-tag> <el-tag type="success" size="small">审核通过</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" width="180" align="center"> <el-table-column
prop="createTime"
label="创建时间"
width="180"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatTime(scope.row.createTime) }} {{ formatTime(scope.row.createTime) }}
</template> </template>
@@ -300,36 +458,54 @@
</el-dialog> </el-dialog>
<!-- 消息详情模态框 --> <!-- 消息详情模态框 -->
<div v-if="messageDetailVisible" class="detail-modal-overlay" @click.self="hideMessageDetail"> <div
v-if="messageDetailVisible"
class="detail-modal-overlay"
@click.self="hideMessageDetail"
>
<div class="detail-modal-content"> <div class="detail-modal-content">
<div class="detail-modal-header"> <div class="detail-modal-header">
<h4>消息详情</h4> <h4>消息详情</h4>
<div class="detail-time" v-if="currentMessageDetail.createTime"> <div class="detail-time" v-if="currentMessageDetail.createTime">
{{ formatTime(currentMessageDetail.createTime) }} {{ formatTime(currentMessageDetail.createTime) }}
</div> </div>
<button class="detail-close-btn" @click="hideMessageDetail">&times;</button> <button class="detail-close-btn" @click="hideMessageDetail">
&times;
</button>
</div> </div>
<div class="detail-modal-body"> <div class="detail-modal-body">
<div class="detail-content-section"> <div class="detail-content-section">
<div class="detail-content-text">{{ currentMessageDetail.content || '暂无内容' }}</div> <div class="detail-content-text">
{{ currentMessageDetail.content || "暂无内容" }}
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 公示详情模态框 --> <!-- 公示详情模态框 -->
<div v-if="announcementDetailVisible" class="detail-modal-overlay" @click.self="hideAnnouncementDetail"> <div
v-if="announcementDetailVisible"
class="detail-modal-overlay"
@click.self="hideAnnouncementDetail"
>
<div class="detail-modal-content"> <div class="detail-modal-content">
<div class="detail-modal-header"> <div class="detail-modal-header">
<h4>公示详情</h4> <h4>公示详情</h4>
<div class="detail-time" v-if="currentAnnouncementDetail.createTime"> <div class="detail-time" v-if="currentAnnouncementDetail.createTime">
{{ formatTime(currentAnnouncementDetail.createTime) }} {{ formatTime(currentAnnouncementDetail.createTime) }}
</div> </div>
<button class="detail-close-btn" @click="hideAnnouncementDetail">&times;</button> <button class="detail-close-btn" @click="hideAnnouncementDetail">
&times;
</button>
</div> </div>
<div class="detail-modal-body"> <div class="detail-modal-body">
<div class="detail-content-section"> <div class="detail-content-section">
<div class="detail-content-text">{{ currentAnnouncementDetail.projectName || '暂无项目名称' }} - {{ currentAnnouncementDetail.submitterName || '暂无提交人' }} - 审核通过</div> <div class="detail-content-text">
{{ currentAnnouncementDetail.projectName || "暂无项目名称" }} -
{{ currentAnnouncementDetail.submitterName || "暂无提交人" }} -
审核通过
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -349,14 +525,14 @@
display: flex; display: flex;
column-gap: 15px; column-gap: 15px;
>div { > div {
height: 380px; height: 380px;
background-color: white; background-color: white;
border-radius: 15px; border-radius: 15px;
} }
>div:nth-child(1):after { > div:nth-child(1):after {
content: '个人中心'; content: "个人中心";
display: block; display: block;
background-color: rgb(113, 173, 220); background-color: rgb(113, 173, 220);
color: white; color: white;
@@ -368,7 +544,7 @@
right: 0px; right: 0px;
} }
>div:nth-child(1) { > div:nth-child(1) {
position: relative; position: relative;
padding: 10px; padding: 10px;
box-sizing: border-box; box-sizing: border-box;
@@ -399,23 +575,22 @@
top: 75%; top: 75%;
transform: translateY(-50%); transform: translateY(-50%);
>div { > div {
padding-left: 10px; padding-left: 10px;
display: flex; display: flex;
font-size: 14px; font-size: 14px;
margin-bottom: 25px; margin-bottom: 25px;
>div:nth-child(1) { > div:nth-child(1) {
color: rgba(255, 255, 255, 0.80); color: rgba(255, 255, 255, 0.8);
line-height: 20px; line-height: 20px;
} }
>div:nth-child(2) { > div:nth-child(2) {
padding-left: 10px; padding-left: 10px;
color: rgb(255, 255, 255); color: rgb(255, 255, 255);
line-height: 20px; line-height: 20px;
} }
} }
} }
@@ -430,22 +605,21 @@
padding: 0px 20px; padding: 0px 20px;
box-sizing: border-box; box-sizing: border-box;
>div { > div {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
>div:nth-child(1) { > div:nth-child(1) {
height: 30px; height: 30px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
line-height: 30px; line-height: 30px;
} }
>div:nth-child(2) { > div:nth-child(2) {
text-align: right; text-align: right;
line-height: 30px; line-height: 30px;
} }
@@ -453,21 +627,21 @@
} }
// head center // head center
>div:nth-child(2) { > div:nth-child(2) {
box-sizing: border-box; box-sizing: border-box;
width: 33.3%; width: 33.3%;
>div:nth-child(1) { > div:nth-child(1) {
border-bottom: solid 1px #d0d0d0; border-bottom: solid 1px #d0d0d0;
} }
} }
>div:nth-child(3) { > div:nth-child(3) {
box-sizing: border-box; box-sizing: border-box;
width: 33.3%; width: 33.3%;
padding-bottom: 10px; padding-bottom: 10px;
>div:nth-child(1) { > div:nth-child(1) {
border-bottom: solid 1px #d0d0d0; border-bottom: solid 1px #d0d0d0;
} }
} }
@@ -480,14 +654,14 @@
min-height: 46vh; min-height: 46vh;
>div { > div {
border-radius: 15px; border-radius: 15px;
background-color: white; background-color: white;
box-sizing: border-box; box-sizing: border-box;
} }
// bottom content // bottom content
>div:nth-child(1) { > div:nth-child(1) {
width: 32.8%; width: 32.8%;
.content { .content {
@@ -500,30 +674,29 @@
justify-content: start; justify-content: start;
flex-wrap: wrap; flex-wrap: wrap;
>div { > div {
width: 50px; width: 50px;
margin-top: 15px; margin-top: 15px;
cursor: pointer; cursor: pointer;
font-size: 10px; font-size: 10px;
text-align: center; text-align: center;
>div:nth-child(1) { > div:nth-child(1) {
img { img {
width: 50px; width: 50px;
height: 50px; height: 50px;
} }
} }
>div:nth-child(2) { > div:nth-child(2) {
margin-top: 5px; margin-top: 5px;
text-align: center; text-align: center;
} }
} }
} }
} }
>div:nth-child(2) { > div:nth-child(2) {
width: 48.3%; width: 48.3%;
flex: 1; flex: 1;
box-sizing: border-box; box-sizing: border-box;
@@ -535,20 +708,19 @@
} }
} }
.home-page-title { .home-page-title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 20px; padding: 20px;
>div:nth-child(1) { > div:nth-child(1) {
font-size: 17px; font-size: 17px;
font-weight: bold; font-weight: bold;
position: relative; position: relative;
z-index: 3; z-index: 3;
} }
>div:nth-child(2) { > div:nth-child(2) {
padding-top: 5px; padding-top: 5px;
color: #757575; color: #757575;
font-size: 15px; font-size: 15px;
@@ -559,10 +731,14 @@
} }
} }
>div:nth-child(1):after { > div:nth-child(1):after {
content: ' '; content: " ";
display: block; display: block;
background: linear-gradient(to right, rgb(163, 201, 233), rgb(50, 137, 205)); background: linear-gradient(
to right,
rgb(163, 201, 233),
rgb(50, 137, 205)
);
height: 6px; height: 6px;
width: 100%; width: 100%;
position: absolute; position: absolute;
@@ -574,10 +750,50 @@
.going { .going {
cursor: pointer; cursor: pointer;
transition: all 0.3s; transition: all 0.3s;
color: #1565c0;
font-weight: 500;
} }
.going:hover { .going:hover {
opacity: 0.8; opacity: 0.8;
color: #0d47a1;
text-decoration: underline;
}
/* 数量列样式 */
.quantity-cell {
background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
color: #1565c0;
font-weight: bold;
font-size: 16px;
padding: 8px 12px;
border-radius: 8px;
border: 2px solid #2196f3;
box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
display: inline-block;
min-width: 40px;
text-align: center;
transition: all 0.3s ease;
position: relative;
}
.quantity-cell:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
}
/* 为数量为0的情况添加绿色样式 */
.quantity-cell.zero-quantity {
background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
color: #2e7d32;
border-color: #4caf50;
box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}
.quantity-cell.zero-quantity:hover {
background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
} }
/* 对话框样式 */ /* 对话框样式 */
@@ -790,10 +1006,17 @@ import { isEmpty } from "@/api/helpFunc";
import { checkPermi } from "@/utils/permission"; import { checkPermi } from "@/utils/permission";
export default { export default {
components: { components: {
JwcUndo, XwUndo, FdyUndo, StuUndo, JwcUndo,
XwUndo,
FdyUndo,
StuUndo,
jwcBottom, jwcBottom,
ZzbldQgzx, ZzbQgzx, ZdlsQgzx, FdyQgzx, DeptQgzx, ZzbldQgzx,
sjUndo ZzbQgzx,
ZdlsQgzx,
FdyQgzx,
DeptQgzx,
sjUndo,
}, },
created() { created() {
this.getUser(); this.getUser();
@@ -801,63 +1024,61 @@ export default {
this.listMyMsg(); this.listMyMsg();
this.avatar = store.getters.avatar; this.avatar = store.getters.avatar;
}, },
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
const listDataTask = [ const listDataTask = [];
];
if (!isEmpty(this.$refs.childOne) && this.$refs.childOne.hasPrem) { if (!isEmpty(this.$refs.childOne) && this.$refs.childOne.hasPrem) {
listDataTask.push(...this.$refs.childOne.taskList) listDataTask.push(...this.$refs.childOne.taskList);
} }
if (!isEmpty(this.$refs.child2) && this.$refs.child2.hasPrem) { if (!isEmpty(this.$refs.child2) && this.$refs.child2.hasPrem) {
listDataTask.push(...this.$refs.child2.taskList) listDataTask.push(...this.$refs.child2.taskList);
} }
if (!isEmpty(this.$refs.child3) && this.$refs.child3.hasPrem) { if (!isEmpty(this.$refs.child3) && this.$refs.child3.hasPrem) {
listDataTask.push(...this.$refs.child3.taskList) listDataTask.push(...this.$refs.child3.taskList);
} }
if (!isEmpty(this.$refs.child4) && this.$refs.child4.hasPrem) { if (!isEmpty(this.$refs.child4) && this.$refs.child4.hasPrem) {
listDataTask.push(...this.$refs.child4.taskList) listDataTask.push(...this.$refs.child4.taskList);
} }
if (!isEmpty(this.$refs.child5) && this.$refs.child5.hasPrem) { if (!isEmpty(this.$refs.child5) && this.$refs.child5.hasPrem) {
listDataTask.push(...this.$refs.child5.taskList) listDataTask.push(...this.$refs.child5.taskList);
} }
if (!isEmpty(this.$refs.child6) && this.$refs.child6.hasPrem) { if (!isEmpty(this.$refs.child6) && this.$refs.child6.hasPrem) {
listDataTask.push(...this.$refs.child6.taskList) listDataTask.push(...this.$refs.child6.taskList);
} }
if (!isEmpty(this.$refs.child7) && this.$refs.child7.hasPrem) { if (!isEmpty(this.$refs.child7) && this.$refs.child7.hasPrem) {
listDataTask.push(...this.$refs.child7.taskList) listDataTask.push(...this.$refs.child7.taskList);
} }
if (!isEmpty(this.$refs.child8) && this.$refs.child8.hasPrem) { if (!isEmpty(this.$refs.child8) && this.$refs.child8.hasPrem) {
listDataTask.push(...this.$refs.child8.taskList) listDataTask.push(...this.$refs.child8.taskList);
} }
if (!isEmpty(this.$refs.child9) && this.$refs.child9.hasPrem) { if (!isEmpty(this.$refs.child9) && this.$refs.child9.hasPrem) {
listDataTask.push(...this.$refs.child9.taskList) listDataTask.push(...this.$refs.child9.taskList);
} }
if (!isEmpty(this.$refs.child10) && this.$refs.child10.hasPrem) { if (!isEmpty(this.$refs.child10) && this.$refs.child10.hasPrem) {
listDataTask.push(...this.$refs.child10.taskList) listDataTask.push(...this.$refs.child10.taskList);
} }
if (!isEmpty(this.$refs.child11) && this.$refs.child11.hasPrem) { if (!isEmpty(this.$refs.child11) && this.$refs.child11.hasPrem) {
listDataTask.push(...this.$refs.child11.taskList) listDataTask.push(...this.$refs.child11.taskList);
} }
this.listData = listDataTask; this.listData = listDataTask;
this.listData.sort((a, b) => b.value - a.value); this.listData.sort((a, b) => b.value - a.value);
}, 500) }, 500);
}, },
methods: { methods: {
going(url) { going(url) {
this.$router.push(url); this.$router.push(url);
}, },
cutString(text) { cutString(text) {
return text.split('·') return text.split("·");
}, },
formatTime(date) { formatTime(date) {
const dateTime = new Date(date) const dateTime = new Date(date);
return new Intl.DateTimeFormat('en-CA').format(dateTime); // 'en-CA' 默认格式是 yyyy-mm-dd return new Intl.DateTimeFormat("en-CA").format(dateTime); // 'en-CA' 默认格式是 yyyy-mm-dd
}, },
getUser() { getUser() {
getUserProfile().then(response => { getUserProfile().then((response) => {
this.user = response.data; this.user = response.data;
this.roleGroup = response.roleGroup; this.roleGroup = response.roleGroup;
this.postGroup = response.postGroup; this.postGroup = response.postGroup;
@@ -883,7 +1104,7 @@ export default {
// 获取当前登录用户的ID // 获取当前登录用户的ID
const userId = this.user.userId; const userId = this.user.userId;
console.log("userId", userId); console.log("userId", userId);
let res = await listMsg({receiver: userId}); let res = await listMsg({ receiver: userId });
if (res.rows.length > 0) { if (res.rows.length > 0) {
this.have_msg = true; this.have_msg = true;
this.msg_list = [...res.rows]; this.msg_list = [...res.rows];
@@ -899,7 +1120,6 @@ export default {
viewMessageDetail(row) { viewMessageDetail(row) {
this.currentMessageDetail = row; this.currentMessageDetail = row;
this.messageDetailVisible = true; this.messageDetailVisible = true;
}, },
// 显示消息详情 - 从首页点击进入 // 显示消息详情 - 从首页点击进入
@@ -969,36 +1189,44 @@ export default {
currentMessageIndex: -1, currentMessageIndex: -1,
currentAnnouncementIndex: -1, currentAnnouncementIndex: -1,
tableData: [{ tableData: [
date: '2016-05-03', {
name: '王小虎', date: "2016-05-03",
address: '上海市普陀区金沙江路 1518 弄' name: "王小虎",
}, { address: "上海市普陀区金沙江路 1518 弄",
date: '2016-05-02', },
name: '王小虎', {
address: '上海市普陀区金沙江路 1518 弄' date: "2016-05-02",
}, { name: "王小虎",
date: '2016-05-04', address: "上海市普陀区金沙江路 1518 弄",
name: '王小虎', },
address: '上海市普陀区金沙江路 1518 弄' {
}, { date: "2016-05-04",
date: '2016-05-01', name: "王小虎",
name: '王小虎', address: "上海市普陀区金沙江路 1518 弄",
address: '上海市普陀区金沙江路 1518 弄' },
}, { {
date: '2016-05-08', date: "2016-05-01",
name: '王小虎', name: "王小虎",
address: '上海市普陀区金沙江路 1518 弄' address: "上海市普陀区金沙江路 1518 弄",
}, { },
date: '2016-05-06', {
name: '王小虎', date: "2016-05-08",
address: '上海市普陀区金沙江路 1518 弄' name: "王小虎",
}, { address: "上海市普陀区金沙江路 1518 弄",
date: '2016-05-07', },
name: '王小虎', {
address: '上海市普陀区金沙江路 1518 弄' date: "2016-05-06",
}] name: "王小虎",
} address: "上海市普陀区金沙江路 1518 弄",
} },
} {
date: "2016-05-07",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
],
};
},
};
</script> </script>