feat(upload): 更新上传组件样式和功能

- 修改上传按钮样式,添加box-shadow: none
- 将按钮文字从"确认"改为"上传"
- 统一接受文件类型为.pdf,.docx
- 调整上传组件界面样式

feat(caixun): 重构财讯页面布局和交互

- 使用popover替代弹窗显示二维码分享功能
- 调整页面整体布局和样式
- 替换logo和空状态图标
- 添加公司代码和分类标签样式

style(table): 优化表格组件样式

- 调整表格边框和内边距样式
- 添加表格外边框
- 修改选择项样式
- 优化表格间距

refactor(loading): 更换加载动画实现方式

- 使用gif图片替换css动画
- 更新主题颜色配置
- 移除旧的loading组件代码

refactor(auth): 简化用户角色判断逻辑

- 固定角色名称为common类型
- 移除时间滑动组件
- 修复路由跳转相关问题
This commit is contained in:
傅光孟 2026-04-03 19:23:01 +08:00
parent 8e0ba446df
commit 46252a8d58
15 changed files with 272 additions and 112 deletions

View File

@ -149,6 +149,7 @@ watch(
Cookies.set('phone', phone);
window.token = token;
window.phone = phone;
Session.set('roleName', 'common');
Session.set('userData', {
...Session.get('userData'),

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

BIN
src/assets/loading2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 MiB

View File

@ -99,9 +99,9 @@
btnHeight="32px"
@btnClick="submit"
:btnDisabled="!canSubmit"
style="margin-left: 10px"
style="margin-left: 10px;box-shadow: none;"
>
确认
上传
</ZButton>
</div>
</template>

View File

@ -10,7 +10,7 @@
:http-request="uploadAction"
:headers="uploadHeader"
:limit="1"
:accept="wordFlag ? '.pdf,.docx' : '.pdf'"
:accept="'.pdf,.docx'"
drag
:on-success="handleAvatarSuccess"
:before-upload="onBeforeUpload"
@ -21,8 +21,8 @@
<img :src="iconFile" />
<div class="upload_text_one">将文件拖拽至此处</div>
<div></div>
<ZButton btn-width="112px" btn-height="32px">
<img :src="iconFileWhite" style="width: 12px; height: 13px; margin-right: 5px" />
<ZButton btn-width="112px" btn-height="32px" style="background: #fff;border: 1px solid #FF9900;color: #FF9900">
<!-- <img :src="iconFileWhite" style="width: 12px; height: 13px; margin-right: 5px" /> -->
<text style="font-family: 'Alip-Regular'">选择文件</text>
</ZButton>
</div>

View File

@ -11,7 +11,7 @@
:headers="uploadHeader"
drag
:limit="limit"
:accept="wordFlag ? '.pdf,.docx' : '.pdf'"
:accept="'.pdf,.docx'"
v-model:file-list="fileList"
:on-success="handleAvatarSuccess"
:before-upload="onBeforeUpload"

View File

@ -4,8 +4,8 @@
ref="tableRef"
:data="tableData.data"
v-loading="tableLoading"
style="font-size: 12px"
:cell-style="{ fontWeight: '400', fontSize: '14px', color: 'rgba(0,0,0,0.65)', height: '46px' }"
style="font-size: 12px;border-radius: 4px;border: none;"
:cell-style="{ fontWeight: '400', fontSize: '14px', color: 'rgba(0,0,0,0.65)', height: '46px', padding: '0 10px' }"
:header-cell-style="{
height: '52px',
background: '#fafafa',
@ -13,7 +13,9 @@
fontWeight: '400',
fontSize: '14px',
color: '#858585',
padding: '0 10px',
}"
border
@selection-change="selectionChange"
@sort-change="sortChange"
size="small"
@ -41,7 +43,6 @@
>
<div style="display: flex; justify-content: space-between; width: 100%; align-items: center">
<div style="font-size: 14px; color: rgba(0, 0, 0, 0.6)"> {{ tableData.total }} 项数据</div>
<el-select v-model="tableData.size" placeholder="每页条数" style="width: 120px; margin-left: 10px" popper-class="pagination-popper">
<el-option v-for="item in sizeOptions" :key="item" :label="item + '条/页'" :value="item" />
</el-select>
@ -158,6 +159,9 @@ defineExpose({
// padding: 0 10px;
// background-color: #ff9a5b;
// }
.el-select-dropdown__item.is-selected{
font-weight: normal;
}
.empty_table {
display: flex;
@ -168,4 +172,5 @@ defineExpose({
margin-top: 50px;
margin-bottom: 50px;
}
</style>

View File

@ -31,6 +31,7 @@
--mainColor: rgba(141, 141, 141, 0.7);
--backFilter: saturate(180%) blur(3px);
--el-color-primary: #ff9900;
/* 按钮样式变量 */
// --Buttons-Border-Primary-Gradient: #e38522;

View File

@ -15,7 +15,7 @@
.loading-next .loading-next-box-warp .loading-next-box-item {
width: 33.333333%;
height: 33.333333%;
background: var(--el-color-primary);
background: #ff9900;
float: left;
animation: loading-next-animation 1.2s infinite ease;
border-radius: 1px;

View File

@ -1,5 +1,6 @@
import { nextTick } from 'vue';
import '/@/theme/loading.scss';
import LoadingGif from '/@/assets/loading2.gif';
/**
* Loading
@ -15,15 +16,7 @@ export const NextLoading = {
const htmls = `
<div class="loading-next-box">
<div class="loading-next-box-warp">
<div class="loading-next-box-item"></div>
<div class="loading-next-box-item"></div>
<div class="loading-next-box-item"></div>
<div class="loading-next-box-item"></div>
<div class="loading-next-box-item"></div>
<div class="loading-next-box-item"></div>
<div class="loading-next-box-item"></div>
<div class="loading-next-box-item"></div>
<div class="loading-next-box-item"></div>
<img src="${LoadingGif}" width="100%" alt="Loading..." />
</div>
</div>
`;

View File

@ -2,13 +2,15 @@
<div class="list">
<div v-for="item in props.data" :key="item.title" class="item">
<div class="r_title">
<text class="title" @click="openQrDialog(item.url)">· {{ item.title }}</text>
<text class="title" @click="openQrDialog(item.url)">{{ item.title }}</text>
</div>
<div class="time-source">
<text class="time">{{ item.publicDate }}</text>
<div style="display: flex; align-items: center; gap: 5px">
<img :src="icon" class="source_icon" />
<text class="source">中国证券报</text>
</div>
</div>
<text class="time">{{ item.publicDate }}</text>
</div>
</div>
</template>
@ -51,7 +53,7 @@ onMounted(() => {
.item {
display: flex;
flex-direction: column;
gap: 10px;
gap: 12px;
width: 100%;
border-bottom: 1px solid #f6f6f6;
padding: 20px 5px;
@ -77,6 +79,12 @@ onMounted(() => {
color: var(--Buttons-ningbo);
}
.time-source{
display: flex;
justify-content: space-between;
align-items: center;
}
.time {
font-family: PingFangSC, PingFang SC;
font-weight: normal;
@ -85,7 +93,7 @@ onMounted(() => {
line-height: 20px;
text-align: left;
font-style: normal;
margin-top: 10px;
// margin-top: 10px;
}
.source {

View File

@ -12,13 +12,12 @@
<div class="sub_info">
<text class="company_name">{{ info.company_name }}</text>
<div class="sub_name">
<text>证券代码{{ info.code }}</text> |
<text>行业分类{{ info.cate }}</text>
<text class="code">{{ info.code }}</text>
<text class="cate">{{ info.cate }}</text>
</div>
</div>
</div>
<div class="top_right">
<div class="line"></div>
<div class="st_item">
<text class="st_num">{{ stData.st1 }}</text>
<text class="st_title">财讯篇数</text>
@ -59,7 +58,7 @@
@keyup.enter="sreachLeft"
/>
<div v-loading="loadingLeft" style="margin-top: 30px">
<div v-loading="loadingLeft" style="padding-top: 30px; height: 100%; box-sizing: border-box">
<div class="r_list">
<CaixunList
v-if="caixunList.length > 0"
@ -73,8 +72,6 @@
<text class="empty_text">无搜索结果</text>
</div>
</div>
</div>
<div class="pagination" v-if="caixunList.length > 0">
<el-pagination
style="width: 100%"
@ -91,13 +88,14 @@
</el-pagination>
</div>
</div>
</div>
<div class="right">
<div class="r_list_big_title">
<text class="list_big_title">财报可视化</text>
</div>
<div class="r_line">
<div class="line"></div>
<!-- <div class="line"></div> -->
</div>
<div class="right_tabs">
@ -132,7 +130,27 @@
<text class="right_time">{{ item.publicDate }}</text>
</div>
</div>
<img :src="wxImg" class="right_icon" @click="openQrDialog(item.url, item.id)" />
<el-popover
:width="250"
title="微信扫一扫分享"
placement="top-start"
trigger="click"
@before-enter="openQrDialog(item.url, item.id, item)"
>
<template #default>
<div class="dialog">
<!-- 用于展示二维码的容器 -->
<div v-loading="!item?.ewm"><el-image loading="lazy" :src="item?.ewm" /></div>
<text style="margin-top: 20px">微信里点发现</text>
<text style="margin-bottom: 10px">扫一下二维码便可分享至朋友圈</text>
</div>
</template>
<template #reference>
<!-- <img :src="wxImg" class="right_icon" @click="openQrDialog(item.url, item.id)" /> -->
<img :src="wxImg" class="right_icon" />
</template>
</el-popover>
</div>
</div>
<div v-else class="r_empty">
@ -162,14 +180,13 @@
</div>
</div>
<el-dialog v-model="dialogVisible" title="微信扫一扫分享" width="230">
<!-- <el-dialog v-model="dialogVisible" title="微信扫一扫分享" width="230">
<div class="dialog">
<!-- 用于展示二维码的容器 -->
<div ref="qrcodeContainer" style="margin-top: 20px"></div>
<text style="margin-top: 20px">微信里点发现</text>
<text style="margin-bottom: 10px">扫一下二维码便可分享至朋友圈</text>
</div>
</el-dialog>
</el-dialog> -->
</div>
</template>
@ -179,15 +196,16 @@ import { Session } from '/@/utils/storage';
import { NextLoading } from '/@/utils/loading';
import topBg from '../../../assets/caixun/home_bg_qiye.png';
import topBgJg from '../../../assets/caixun/home_bg_jianguan.png';
import logo from '../../../assets/caixun/company_logo.png';
import logo from '/@/assets/caixun/company_logo2.jpg';
import { Search } from '@element-plus/icons-vue';
import CaixunList from './components/CaixunList.vue';
import emptyImg from '/@/assets/yuqingnew/nonews_icon.png';
import emptyImg from '/@/assets/caixun/nonews_icon.jpg';
import videoImg from '/@/assets/caixun/video_icon.png';
import wxImg from '/@/assets/caixun/icon_wx.png';
import { getSmartInfoPage, getSmartH5InfoPage, getSmartVideoInfoPage, getSmartVideoUrl } from '/@/api/api';
import QRCode from 'qrcodejs2-fixes';
// import QRCode from 'qrcodejs2-fixes';
import { doMaiDian } from '/@/api/api';
import QRCode from 'qrcode';
const qrcodeContainer = ref(null);
@ -209,8 +227,8 @@ const handleResize = () => {
const isCommon = ref(Session.get('roleName') == 'common' || Session.get('roleName') == 'subCommon');
const tabIndex = ref(0);
const info = ref({
company_name: Session.get('userData')?.companySimpleName,
code: Session.get('userData')?.secCode,
company_name: '宁波银行',
code: '002142.SZ',
cate: '股份制银行',
});
@ -257,11 +275,11 @@ async function getLeftList() {
if (data?.list) {
caixunList.value = data.list;
leftForm.value.total = data.total;
info.value.cate = data.swIndustryName;
// info.value.cate = data.swIndustryName;
} else {
caixunList.value = [];
leftForm.value.total = 0;
info.value.cate = '';
// info.value.cate = '';
}
stData.st1 = data.total;
@ -330,25 +348,30 @@ function sizeChangeRight(size: number) {
const qrCode = ref(null);
async function openQrDialog(url, id) {
async function openQrDialog(url, id, item) {
console.log('🚀 ~ openQrDialog ~ url:', url);
//
doMaiDian({ type: 2 });
if (tabIndex.value == 0) {
dialogVisible.value = true;
// dialogVisible.value = true;
nextTick(() => {
if (qrCode.value) {
qrcodeContainer.value.innerHTML = '';
}
qrCode.value = new QRCode(qrcodeContainer.value, {
text: url,
width: 180, //
height: 180, //
colorDark: '#000000', //
colorLight: '#ffffff', //
correctLevel: QRCode.CorrectLevel.H, // LMQH
QRCode.toDataURL(url).then((_url) => {
item.ewm = _url;
});
// if (qrCode.value) {
// qrcodeContainer.value.innerHTML = '';
// }
// qrCode.value = new QRCode(qrcodeContainer.value, {
// text: url,
// width: 180, //
// height: 180, //
// colorDark: '#000000', //
// colorLight: '#ffffff', //
// correctLevel: QRCode.CorrectLevel.H, // LMQH
// });
// console.log('output >>>>> qrCode.value',qrCode.value);
});
} else {
let { code, data } = await getSmartVideoUrl({
@ -356,18 +379,23 @@ async function openQrDialog(url, id) {
});
dialogVisible.value = true;
nextTick(() => {
if (qrCode.value) {
qrcodeContainer.value.innerHTML = '';
}
qrCode.value = new QRCode(qrcodeContainer.value, {
text: data,
width: 180, //
height: 180, //
colorDark: '#000000', //
colorLight: '#ffffff', //
correctLevel: QRCode.CorrectLevel.H, // LMQH
QRCode.toDataURL(data).then((_url) => {
item.ewm = _url;
});
// if (qrCode.value) {
// qrcodeContainer.value.innerHTML = '';
// }
// qrCode.value = new QRCode(qrcodeContainer.value, {
// text: data,
// width: 180, //
// height: 180, //
// colorDark: '#000000', //
// colorLight: '#ffffff', //
// correctLevel: QRCode.CorrectLevel.H, // LMQH
// });
// console.log('output >>>>> qrCode.value',qrCode.value);
});
}
}
@ -433,9 +461,9 @@ $maxWidth: 100vw;
.content {
display: flex;
flex-direction: column;
position: fixed;
left: 50%;
transform: translate(-50%, 0);
// position: fixed;
// left: 50%;
// transform: translate(-50%, 0);
}
.top {
@ -443,8 +471,8 @@ $maxWidth: 100vw;
min-width: 1200px;
max-width: $maxWidth;
height: 117px;
background: linear-gradient(180deg, #e7effa 0%, #fafbfb 100%);
box-shadow: 0px 2px 12px 0px rgba(186, 193, 205, 0.5), inset 0px 1px 0px 0px rgba(255, 255, 255, 0.5);
background: #fff;
// box-shadow: 0px 2px 12px 0px rgba(186, 193, 205, 0.5), inset 0px 1px 0px 0px rgba(255, 255, 255, 0.5);
border-radius: 8px;
display: flex;
justify-content: space-between;
@ -452,16 +480,17 @@ $maxWidth: 100vw;
.top_left {
display: flex;
align-items: center;
height: 100%;
position: relative;
}
.logo {
width: 118px;
height: 118px;
width: 80px;
height: 80px;
background: #e46713;
margin-left: 30px;
margin-top: -20px;
// margin-top: -20px;
}
.sub_info {
@ -492,6 +521,20 @@ $maxWidth: 100vw;
line-height: 22px;
text-align: left;
font-style: normal;
.code {
color: rgb(0, 122, 255);
background-color: rgba(0, 122, 255, 0.1);
padding: 4px 8px;
border-radius: 4px;
margin-right: 12px;
}
.cate {
color: #ff9900;
background-color: rgba(255, 153, 0, 0.1);
padding: 4px 8px;
border-radius: 4px;
}
}
}
@ -549,9 +592,11 @@ $maxWidth: 100vw;
display: flex;
gap: 15px;
margin-top: 25px;
height: calc(100vh - 167px);
.left {
width: 70%;
height: 100%;
border-radius: 10px;
padding: 30px 30px;
padding-bottom: 0;
@ -575,12 +620,12 @@ $maxWidth: 100vw;
.r_list {
// height: 57vh;
// overflow: auto;
max-height: 55vh;
height: calc(100% - 80px);
overflow-y: scroll;
}
.pagination {
margin-top: 12px;
margin-top: 24px;
width: 100%;
display: flex;
text-align: center;
@ -598,8 +643,8 @@ $maxWidth: 100vw;
.r_line {
width: 100%;
height: 4px;
background: #f0f0f0;
height: 1px;
background: #eee;
.line {
width: 80px;
@ -609,18 +654,19 @@ $maxWidth: 100vw;
}
.right {
padding: 30px 20px;
padding: 20px;
}
.r_list_big_title {
height: 50px;
// height: 50px;
padding: 16px 0;
}
.list_big_title {
font-family: PingFangSC, PingFang SC;
font-family: PingFangSC-Medium;
font-weight: bold;
font-size: 20px;
color: #1a1a1a;
font-size: 16px;
color: #333;
text-align: left;
font-style: normal;
}
@ -628,19 +674,16 @@ $maxWidth: 100vw;
.right_tabs {
display: flex;
margin-top: 20px;
gap: 20px;
gap: 16px;
.tab_item {
width: 54px;
height: 28px;
background: #f5f7fd;
border-radius: 4px;
color: #5f6063;
padding: 8px 12px;
background: #f6f6f6;
border-radius: 20px;
color: #333;
font-family: PingFangSC, PingFang SC;
font-weight: bold;
font-size: 16px;
line-height: 22px;
line-height: 16px;
text-align: left;
font-style: normal;
display: flex;
@ -650,8 +693,9 @@ $maxWidth: 100vw;
}
.active {
font-weight: bold;
color: var(--Buttons-ningbo);
background: #f0f4ff;
background: rgba(255, 153, 0, 0.1);
}
}

View File

@ -3,7 +3,7 @@
<!-- <div class="w1400"> -->
<div>
<!-- 时间滑动 start -->
<Slide v-if="historyData.length > 0" :data="historyData" @doDetail="goDetail" />
<!-- <Slide v-if="historyData.length > 0" :data="historyData" @doDetail="goDetail" /> -->
<!-- 时间滑动 end -->
<div class="main">
@ -210,7 +210,7 @@ import ListStatus from '/@/components/TypoDetection/ListStatus.vue';
const route = useRoute();
const router = useRouter();
const userType = ref(Session.get('userData').userType);
const userType = ref(Session.get('userData')?.userType || 0);
const reportType: string[] = ['年报', '半年报', '一季报', '三季报', '', '日常公告'];
const uploadDialog = ref(null);
const queryFrom = ref({});
@ -235,7 +235,7 @@ function showUploadDialog() {
}
function goDetail(item) {
router.push({
const routeData = router.push({
path: '/detail',
query: {
id: item.id,
@ -245,6 +245,7 @@ function goDetail(item) {
fileName: item.fileName,
},
});
// window.open(routeData.href, '_blank');
}
//
@ -391,7 +392,7 @@ const unloadHandler = (e) => {
Session.remove('indexPage');
Session.remove('indexFilter');
};
import Cookies from 'js-cookie';
//
onMounted(() => {
NextLoading.done();
@ -470,7 +471,7 @@ onUnmounted(() => {
</script>
<style scoped lang="scss">
@import url('/@/theme/page/page.scss');
// @import url('/@/theme/page/page.scss');
.container {
width: 100%;
@ -557,4 +558,111 @@ onUnmounted(() => {
max-width: 1400px;
margin: 0 auto;
}
.el_form {
width: 100%;
display: flex;
flex-wrap: wrap;
margin-top: 10px;
align-items: center;
}
.el_form button {
margin-left: 20px;
}
.el_form_item {
width: 250px;
height: 70px;
display: flex;
align-items: center;
/* 输入框特殊样式 */
:deep(.el-input__wrapper) {
display: flex;
height: 40px;
padding: 6px 12px;
justify-content: space-between;
align-items: center;
border-radius: 4px;
// border: 1px solid #ddd;
background: #fff;
}
:deep(.el-select__wrapper) {
display: flex;
height: 40px;
padding: 6px 12px;
justify-content: space-between;
align-items: center;
border-radius: 4px;
border: 1px solid var(--inputs-select-borders-br-color-1, #f0f2f5);
background: var(--inputs-select-backgrounds-bg-color-1, #fff);
}
}
.el_form_item button {
width: 80px;
}
.tab_icon {
width: 25px;
height: 25px;
margin-right: 5px;
}
.custom-tabs-label {
display: flex;
justify-content: center;
align-items: center;
font-size: 12px;
}
.el-form-item {
margin-bottom: 0;
}
/* :deep(.el-select .el-input) {
width: 240px;
} */
:deep(input:-webkit-autofill) {
background-color: #ffffff !important; /*在这里换成你想要的颜色*/
transition: background-color 5000s ease-in-out 0s !important;
}
/* 标题加粗 */
:deep(.el-form-item--large .el-form-item__label) {
font-weight: 400;
color: #2d3643;
}
/* 弹框圆角 */
:deep(.el-dialog__header) {
border-radius: 10px 10px 0 0; /* 设置对话框头部圆角 */
}
/* 弹框圆角 */
:deep(.el-dialog) {
border-radius: 10px; /* 设置对话框圆角 */
}
:deep(.el-input__inner::placeholder) {
color: #ccc;
font-size: 13px;
font-weight: normal;
}
:deep(.el-select__placeholder.is-transparent) {
/* color: #666f8d;*/
color: #c9cdd4;
font-size: 13px;
font-weight: normal;
}
:deep(.el-button) {
}
</style>

View File

@ -16,7 +16,7 @@ const com: any = {
//
const roleName = computed(() => {
return Session.get('roleName') === 'common' || Session.get('roleName') === 'subCommon' ? 'common' : 'admin';
return 'common'//Session.get('roleName') === 'common' || Session.get('roleName') === 'subCommon' ? 'common' : 'admin';
});
onMounted(() => {