mirror of
https://github.com/1024-lab/smart-admin.git
synced 2025-09-04 11:47:04 +00:00
【V3.2.0】1、左侧菜单Logo和标题固定;2、Excel导出添加水印;3、长时间不在线自动返回登录页;4、移除sa-token的 token-prefix 配置;5、升级 ant deign vue到最新版4.2;6、登录页面引入登录类型图标方式;7、文件预览组件的文件下载方式为接口方式下载;
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
<xerces.version>2.12.0</xerces.version>
|
||||
<easy-excel.version>3.3.2</easy-excel.version>
|
||||
<poi.version>5.2.4</poi.version>
|
||||
<ooxml-schemas.version>1.4</ooxml-schemas.version>
|
||||
<aws-java-sdk.version>1.11.842</aws-java-sdk.version>
|
||||
<log4j-spring-boot.version>2.17.2</log4j-spring-boot.version>
|
||||
<hutool.version>5.7.22</hutool.version>
|
||||
@@ -288,6 +289,12 @@
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>ooxml-schemas</artifactId>
|
||||
<version>${ooxml-schemas.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
|
@@ -1,9 +1,8 @@
|
||||
package net.lab1024.sa.admin.module.business.goods.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import net.lab1024.sa.admin.constant.AdminSwaggerTagConst;
|
||||
import net.lab1024.sa.admin.module.business.goods.domain.form.GoodsAddForm;
|
||||
import net.lab1024.sa.admin.module.business.goods.domain.form.GoodsQueryForm;
|
||||
@@ -14,7 +13,7 @@ import net.lab1024.sa.admin.module.business.goods.service.GoodsService;
|
||||
import net.lab1024.sa.base.common.domain.PageResult;
|
||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.base.common.domain.ValidateList;
|
||||
import net.lab1024.sa.base.common.util.SmartResponseUtil;
|
||||
import net.lab1024.sa.base.common.util.SmartExcelUtil;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@@ -88,17 +87,8 @@ public class GoodsController {
|
||||
@GetMapping("/goods/exportGoods")
|
||||
@SaCheckPermission("goods:exportGoods")
|
||||
public void exportGoods(HttpServletResponse response) throws IOException {
|
||||
|
||||
List<GoodsExcelVO> goodsList = goodsService.getAllGoods();
|
||||
|
||||
// 设置下载消息头
|
||||
SmartResponseUtil.setDownloadFileHeader(response, "商品列表.xls", null);
|
||||
|
||||
// 下载
|
||||
EasyExcel.write(response.getOutputStream(), GoodsExcelVO.class)
|
||||
.autoCloseStream(Boolean.FALSE)
|
||||
.sheet("商品")
|
||||
.doWrite(goodsList);
|
||||
SmartExcelUtil.exportExcel(response,"商品列表.xlsx","商品",GoodsExcelVO.class, goodsList);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,7 +1,6 @@
|
||||
package net.lab1024.sa.admin.module.business.oa.enterprise;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -11,11 +10,11 @@ import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEm
|
||||
import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseExcelVO;
|
||||
import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseListVO;
|
||||
import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseVO;
|
||||
import net.lab1024.sa.admin.util.AdminRequestUtil;
|
||||
import net.lab1024.sa.base.common.domain.PageResult;
|
||||
import net.lab1024.sa.base.common.domain.RequestUser;
|
||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.base.common.util.SmartRequestUtil;
|
||||
import net.lab1024.sa.base.common.util.SmartResponseUtil;
|
||||
import net.lab1024.sa.base.common.util.*;
|
||||
import net.lab1024.sa.base.module.support.operatelog.annotation.OperateLog;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -24,6 +23,7 @@ import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -60,14 +60,11 @@ public class EnterpriseController {
|
||||
return;
|
||||
}
|
||||
|
||||
// 设置下载消息头
|
||||
SmartResponseUtil.setDownloadFileHeader(response, "企业基本信息.xls", null);
|
||||
String watermark = AdminRequestUtil.getRequestUser().getActualName();
|
||||
watermark += SmartLocalDateUtil.format(LocalDateTime.now(), SmartDateFormatterEnum.YMD_HMS);
|
||||
|
||||
SmartExcelUtil.exportExcelWithWatermark(response,"企业基本信息.xlsx","企业信息",EnterpriseExcelVO.class,data,watermark);
|
||||
|
||||
// 下载
|
||||
EasyExcel.write(response.getOutputStream(), EnterpriseExcelVO.class)
|
||||
.autoCloseStream(Boolean.FALSE)
|
||||
.sheet("企业信息")
|
||||
.doWrite(data);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询企业详情 @author 开云")
|
||||
|
@@ -248,6 +248,11 @@
|
||||
<artifactId>poi-scratchpad</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>ooxml-schemas</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
|
@@ -0,0 +1,226 @@
|
||||
package net.lab1024.sa.base.common.util;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.write.handler.SheetWriteHandler;
|
||||
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
|
||||
import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.openxml4j.opc.PackagePartName;
|
||||
import org.apache.poi.openxml4j.opc.PackageRelationship;
|
||||
import org.apache.poi.openxml4j.opc.TargetMode;
|
||||
import org.apache.poi.xssf.usermodel.XSSFPictureData;
|
||||
import org.apache.poi.xssf.usermodel.XSSFRelation;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
*
|
||||
* excel 工具类
|
||||
*
|
||||
* @Author 1024创新实验室-主任:卓大
|
||||
* @Date 2024/4/22 22:49:07
|
||||
* @Wechat zhuoda1024
|
||||
* @Email lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),2012-2024
|
||||
*/
|
||||
public final class SmartExcelUtil {
|
||||
|
||||
/**
|
||||
* 通用单sheet导出
|
||||
*/
|
||||
public static void exportExcel(HttpServletResponse response, String fileName, String sheetName, Class head,Collection<?> data) throws IOException {
|
||||
// 设置下载消息头
|
||||
SmartResponseUtil.setDownloadFileHeader(response, fileName, null);
|
||||
// 下载
|
||||
EasyExcel.write(response.getOutputStream(), head)
|
||||
.autoCloseStream(Boolean.FALSE)
|
||||
.sheet(sheetName)
|
||||
.doWrite(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用单 sheet水印 导出
|
||||
*/
|
||||
public static void exportExcelWithWatermark(HttpServletResponse response, String fileName, String sheetName, Class head,Collection<?> data, String watermarkString) throws IOException {
|
||||
// 设置下载消息头
|
||||
SmartResponseUtil.setDownloadFileHeader(response, fileName, null);
|
||||
// 水印
|
||||
Watermark watermark = new Watermark(watermarkString);
|
||||
// 一定要inMemory
|
||||
EasyExcel.write(response.getOutputStream(), head)
|
||||
.inMemory(true)
|
||||
.sheet(sheetName)
|
||||
.registerWriteHandler(new CustomWaterMarkHandler(watermark))
|
||||
.doWrite(data);
|
||||
}
|
||||
|
||||
|
||||
@Slf4j
|
||||
private static class CustomWaterMarkHandler implements SheetWriteHandler {
|
||||
|
||||
private final Watermark watermark;
|
||||
|
||||
public CustomWaterMarkHandler(Watermark watermark) {
|
||||
this.watermark = watermark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) {
|
||||
BufferedImage bufferedImage = createWatermarkImage();
|
||||
XSSFWorkbook workbook = (XSSFWorkbook) writeSheetHolder.getParentWriteWorkbookHolder().getWorkbook();
|
||||
try {
|
||||
// 添加水印的具体操作
|
||||
addWatermarkToSheet(workbook, bufferedImage);
|
||||
} catch (Exception e) {
|
||||
log.error("添加水印出错:", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建水印图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private BufferedImage createWatermarkImage() {
|
||||
// 获取水印相关参数
|
||||
Font font = watermark.getFont();
|
||||
int width = watermark.getWidth();
|
||||
int height = watermark.getHeight();
|
||||
Color color = watermark.getColor();
|
||||
String text = watermark.getContent();
|
||||
|
||||
// 创建带有透明背景的 BufferedImage
|
||||
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics2D g = image.createGraphics();
|
||||
|
||||
// 设置画笔字体、平滑、颜色
|
||||
g.setFont(font);
|
||||
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
g.setColor(color);
|
||||
|
||||
// 计算水印位置和角度
|
||||
int y = watermark.getYAxis();
|
||||
int x = watermark.getXAxis();
|
||||
AffineTransform transform = AffineTransform.getRotateInstance(Math.toRadians(-watermark.getAngle()), 0, y);
|
||||
g.setTransform(transform);
|
||||
// 绘制水印文字
|
||||
g.drawString(text, x, y);
|
||||
|
||||
// 释放资源
|
||||
g.dispose();
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
private void addWatermarkToSheet(XSSFWorkbook workbook, BufferedImage watermarkImage) {
|
||||
try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
|
||||
ImageIO.write(watermarkImage, "png", os);
|
||||
int pictureIdx = workbook.addPicture(os.toByteArray(), XSSFWorkbook.PICTURE_TYPE_PNG);
|
||||
XSSFPictureData pictureData = workbook.getAllPictures().get(pictureIdx);
|
||||
for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
|
||||
// 获取每个Sheet表
|
||||
XSSFSheet sheet = workbook.getSheetAt(i);
|
||||
PackagePartName ppn = pictureData.getPackagePart().getPartName();
|
||||
String relType = XSSFRelation.IMAGES.getRelation();
|
||||
PackageRelationship pr = sheet.getPackagePart().addRelationship(ppn, TargetMode.INTERNAL, relType, null);
|
||||
sheet.getCTWorksheet().addNewPicture().setId(pr.getId());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 处理ImageIO.write可能抛出的异常
|
||||
log.error("添加水印图片时发生错误", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
private static class Watermark {
|
||||
|
||||
public Watermark(String content) {
|
||||
this.content = content;
|
||||
init();
|
||||
}
|
||||
|
||||
public Watermark(String content, Color color, Font font, double angle) {
|
||||
this.content = content;
|
||||
this.color = color;
|
||||
this.font = font;
|
||||
this.angle = angle;
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据水印内容长度自适应水印图片大小,简单的三角函数
|
||||
*/
|
||||
private void init() {
|
||||
FontMetrics fontMetrics = new JLabel().getFontMetrics(this.font);
|
||||
int stringWidth = fontMetrics.stringWidth(this.content);
|
||||
int charWidth = fontMetrics.charWidth('A');
|
||||
this.width = (int) Math.abs(stringWidth * Math.cos(Math.toRadians(this.angle))) + 5 * charWidth;
|
||||
this.height = (int) Math.abs(stringWidth * Math.sin(Math.toRadians(this.angle))) + 5 * charWidth;
|
||||
this.yAxis = this.height;
|
||||
this.xAxis = charWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* 水印内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 画笔颜色
|
||||
*/
|
||||
private Color color = new Color(239,239,239);
|
||||
|
||||
/**
|
||||
* 字体样式
|
||||
*/
|
||||
private Font font = new Font("Microsoft YaHei", Font.BOLD, 26);
|
||||
|
||||
/**
|
||||
* 水印宽度
|
||||
*/
|
||||
private int width;
|
||||
|
||||
/**
|
||||
* 水印高度
|
||||
*/
|
||||
private int height;
|
||||
|
||||
/**
|
||||
* 倾斜角度,非弧度制
|
||||
*/
|
||||
private double angle = 25;
|
||||
|
||||
/**
|
||||
* 字体的y轴位置
|
||||
*/
|
||||
private int yAxis = 50;
|
||||
|
||||
/**
|
||||
* 字体的X轴位置
|
||||
*/
|
||||
private int xAxis;
|
||||
|
||||
/**
|
||||
* 水平倾斜度
|
||||
*/
|
||||
private double shearX = 0.1;
|
||||
|
||||
/**
|
||||
* 垂直倾斜度
|
||||
*/
|
||||
private double shearY = -0.26;
|
||||
}
|
||||
}
|
@@ -3,7 +3,7 @@ spring:
|
||||
datasource:
|
||||
url: jdbc:p6spy:mysql://127.0.0.1:3306/smart_admin_v3?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: Zhuoda.123
|
||||
password: Zhuoda1024lab
|
||||
initial-size: 2
|
||||
min-idle: 2
|
||||
max-active: 10
|
||||
@@ -120,8 +120,6 @@ reload:
|
||||
sa-token:
|
||||
# token 名称(同时也是 cookie 名称)
|
||||
token-name: x-access-token
|
||||
# token 前缀 例如:Bear
|
||||
token-prefix:
|
||||
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
||||
timeout: 2592000
|
||||
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
|
||||
|
@@ -122,8 +122,6 @@ reload:
|
||||
sa-token:
|
||||
# token 名称(同时也是 cookie 名称)
|
||||
token-name: x-access-token
|
||||
# token 前缀 例如:Bear
|
||||
token-prefix:
|
||||
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
||||
timeout: 2592000
|
||||
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
|
||||
|
@@ -122,8 +122,6 @@ reload:
|
||||
sa-token:
|
||||
# token 名称(同时也是 cookie 名称)
|
||||
token-name: x-access-token
|
||||
# token 前缀 例如:Bear
|
||||
token-prefix:
|
||||
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
||||
timeout: 2592000
|
||||
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
|
||||
|
@@ -122,8 +122,6 @@ reload:
|
||||
sa-token:
|
||||
# token 名称(同时也是 cookie 名称)
|
||||
token-name: x-access-token
|
||||
# token 前缀 例如:Bear
|
||||
token-prefix:
|
||||
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
||||
timeout: 2592000
|
||||
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
|
||||
|
@@ -19,7 +19,7 @@
|
||||
"dependencies": {
|
||||
"@wangeditor/editor": "5.1.14",
|
||||
"@wangeditor/editor-for-vue": "5.1.12",
|
||||
"ant-design-vue": "4.1.2",
|
||||
"ant-design-vue": "4.2.0",
|
||||
"axios": "1.6.8",
|
||||
"clipboard": "2.0.11",
|
||||
"crypto-js": "4.1.1",
|
||||
|
@@ -32,7 +32,7 @@ export const fileApi = {
|
||||
/**
|
||||
* 下载文件流(根据fileKey) @author 胡克
|
||||
*/
|
||||
downLoadFile: (fileName, fileKey) => {
|
||||
downLoadFile: (fileKey) => {
|
||||
return getDownload('/support/file/downLoad', { fileKey });
|
||||
},
|
||||
};
|
||||
|
@@ -24,7 +24,6 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { getDownload } from '/@/lib/axios';
|
||||
import { fileApi } from '/src/api/support/file-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
@@ -62,7 +61,7 @@
|
||||
setVisible(true);
|
||||
return;
|
||||
}
|
||||
window.open(fileItem.fileUrl);
|
||||
fileApi.downLoadFile(fileItem.fileKey);
|
||||
}
|
||||
|
||||
// 判断图片类型
|
||||
|
@@ -22,8 +22,9 @@
|
||||
v-for="(item, index) in fileList"
|
||||
:key="index"
|
||||
:src="item.fileUrl"
|
||||
:style="{ display: type === 'text' ? 'none' : '' }"
|
||||
:style="{ display: type === 'text' ? 'none' : '', padding: '2px', height: '100px' }"
|
||||
:width="width"
|
||||
@click="preview(item, index)"
|
||||
/>
|
||||
</a-image-preview-group>
|
||||
</a-space>
|
||||
@@ -31,7 +32,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { getDownload } from '/@/lib/axios';
|
||||
import { fileApi } from '/src/api/support/file-api';
|
||||
|
||||
let props = defineProps({
|
||||
fileList: {
|
||||
@@ -45,10 +46,10 @@
|
||||
type: String,
|
||||
default: 'text',
|
||||
},
|
||||
// image宽度
|
||||
// image 宽度
|
||||
width: {
|
||||
type: Number,
|
||||
default: 150,
|
||||
default: 100,
|
||||
},
|
||||
// 分隔符 可设置html标签 例如:<br/>
|
||||
separator: {
|
||||
@@ -64,7 +65,7 @@
|
||||
previewCurrent.value = index;
|
||||
visible.value = true;
|
||||
} else {
|
||||
window.open(file.fileUrl);
|
||||
fileApi.downLoadFile(file.fileKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -11,6 +11,7 @@
|
||||
<template>
|
||||
<div class="clearfix">
|
||||
<a-upload
|
||||
multiple
|
||||
:accept="props.accept"
|
||||
:before-upload="beforeUpload"
|
||||
:customRequest="customRequest"
|
||||
@@ -43,12 +44,11 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { fileApi } from '/src/api/support/file-api';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { FILE_FOLDER_TYPE_ENUM } from '/@/constants/support/file-const';
|
||||
import { getDownload } from '/@/lib/axios';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
const props = defineProps({
|
||||
value: String,
|
||||
@@ -162,14 +162,44 @@
|
||||
console.log(fileList.value);
|
||||
}
|
||||
|
||||
function beforeUpload(file) {
|
||||
function beforeUpload(file, files) {
|
||||
if (fileList.value.length + files.length > props.maxUploadSize) {
|
||||
showErrorMsgOnce(`最多支持上传 ${props.maxUploadSize} 个文件哦!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (props.accept) {
|
||||
const suffixIndex = file.name.lastIndexOf('.');
|
||||
const fileSuffix = file.name.substring(suffixIndex <= -1 ? 0 : suffixIndex);
|
||||
if (props.accept.indexOf(fileSuffix) === -1) {
|
||||
showErrorMsgOnce(`只支持上传 ${props.accept.replaceAll(',', ' ')} 格式的文件`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const isLimitSize = file.size / 1024 / 1024 < props.maxSize;
|
||||
if (!isLimitSize) {
|
||||
return message.error(`上传的文件必须小于${props.maxSize}Mb`);
|
||||
showErrorMsgOnce(`单个文件大小必须小于 ${props.maxSize} Mb`);
|
||||
}
|
||||
return isLimitSize;
|
||||
}
|
||||
|
||||
const showErrorModalFlag = ref(true);
|
||||
const showErrorMsgOnce = (content) => {
|
||||
if (showErrorModalFlag.value) {
|
||||
Modal.error({
|
||||
title: '提示',
|
||||
content: content,
|
||||
okType: 'danger',
|
||||
centered: true,
|
||||
onOk() {
|
||||
showErrorModalFlag.value = true;
|
||||
},
|
||||
});
|
||||
showErrorModalFlag.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
function handleCancel() {
|
||||
previewVisible.value = false;
|
||||
}
|
||||
@@ -179,7 +209,7 @@
|
||||
previewUrl.value = file.url || file.preview;
|
||||
previewVisible.value = true;
|
||||
} else {
|
||||
getDownload(file.fileName, file.fileUrl);
|
||||
fileApi.downLoadFile(file.fileKey);
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -33,7 +33,7 @@ export const appDefaultConfig = {
|
||||
// 网站名称
|
||||
websiteName: 'SmartAdmin 3.X',
|
||||
// 主题颜色
|
||||
primaryColor: 'red',
|
||||
primaryColor: '#1677ff',
|
||||
// 紧凑
|
||||
compactFlag: false,
|
||||
};
|
||||
|
@@ -21,7 +21,9 @@
|
||||
</div>
|
||||
|
||||
<!-- 2、下方菜单区域: 这里使用一个递归菜单解决 -->
|
||||
<div class="menu">
|
||||
<RecursionMenu :collapsed="collapsed" ref="menuRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -60,6 +62,13 @@
|
||||
function onGoHome() {
|
||||
router.push({ name: HOME_PAGE_NAME });
|
||||
}
|
||||
|
||||
const color = computed(() => {
|
||||
let isLight = useAppConfigStore().$state.sideMenuTheme === 'light';
|
||||
return {
|
||||
background: isLight ? '#FFFFFF' : '#001529',
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@@ -75,7 +84,9 @@
|
||||
height: @header-user-height;
|
||||
line-height: @header-user-height;
|
||||
padding: 0px 15px 0px 15px;
|
||||
width: 100%;
|
||||
background-color: v-bind('color.background');
|
||||
position: fixed;
|
||||
width: 80px;
|
||||
z-index: 21;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -89,7 +100,9 @@
|
||||
.logo {
|
||||
height: @header-user-height;
|
||||
line-height: @header-user-height;
|
||||
background-color: v-bind('color.background');
|
||||
padding: 0px 15px 0px 15px;
|
||||
position: fixed;
|
||||
z-index: 21;
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
@@ -115,6 +128,6 @@
|
||||
}
|
||||
}
|
||||
.menu {
|
||||
padding: 16px 0;
|
||||
margin-top: @header-user-height;
|
||||
}
|
||||
</style>
|
||||
|
@@ -23,6 +23,12 @@ const smartAxios = axios.create({
|
||||
baseURL: import.meta.env.VITE_APP_API_URL,
|
||||
});
|
||||
|
||||
// 退出系统
|
||||
function logout() {
|
||||
localClear();
|
||||
location.href = '/';
|
||||
}
|
||||
|
||||
// ================================= 请求拦截器 =================================
|
||||
|
||||
smartAxios.interceptors.request.use(
|
||||
@@ -73,10 +79,7 @@ smartAxios.interceptors.response.use(
|
||||
if (res.code === 30007 || res.code === 30008) {
|
||||
message.destroy();
|
||||
message.error('您没有登录,请重新登录');
|
||||
localClear();
|
||||
setTimeout(() => {
|
||||
location.href = '/';
|
||||
}, 300);
|
||||
setTimeout(logout, 300);
|
||||
return Promise.reject(response);
|
||||
}
|
||||
|
||||
@@ -94,15 +97,9 @@ smartAxios.interceptors.response.use(
|
||||
Modal.error({
|
||||
title: '重要提醒',
|
||||
content: res.msg,
|
||||
onOk() {
|
||||
return new Promise((resolve, reject) => {
|
||||
localClear();
|
||||
setTimeout(() => {
|
||||
location.href = '/';
|
||||
}, 300);
|
||||
}).catch(() => console.log('Oops errors!'));
|
||||
},
|
||||
onOk: logout,
|
||||
});
|
||||
setTimeout(logout, 3000);
|
||||
return Promise.reject(response);
|
||||
}
|
||||
message.destroy();
|
||||
|
@@ -5,12 +5,13 @@ export const themeColors = [
|
||||
activeColor: '#0958d9',
|
||||
hoverColor: '#bae0ff',
|
||||
},
|
||||
// 紫色
|
||||
// 绿色
|
||||
{
|
||||
primaryColor: '#722ED1',
|
||||
activeColor: '#531dab',
|
||||
hoverColor: '#9254de',
|
||||
primaryColor: '#00b96b',
|
||||
activeColor: '#00945b',
|
||||
hoverColor: '#20c77c',
|
||||
},
|
||||
|
||||
// 红色
|
||||
{
|
||||
primaryColor: '#F5222D',
|
||||
@@ -29,10 +30,10 @@ export const themeColors = [
|
||||
activeColor: '#c41d7f',
|
||||
hoverColor: '#f759ab',
|
||||
},
|
||||
// 绿色
|
||||
// 紫色
|
||||
{
|
||||
primaryColor: '#52C41A',
|
||||
activeColor: '#389e0d',
|
||||
hoverColor: '#73d13d',
|
||||
primaryColor: '#722ED1',
|
||||
activeColor: '#531dab',
|
||||
hoverColor: '#9254de',
|
||||
},
|
||||
];
|
||||
|
@@ -24,7 +24,7 @@
|
||||
<a-descriptions-item label="创建时间">{{ detail.createTime }}</a-descriptions-item>
|
||||
<a-descriptions-item label="创建人">{{ detail.createUserName }}</a-descriptions-item>
|
||||
<a-descriptions-item label="营业执照">
|
||||
<FilePreview :default-file-list="detail.businessLicense" />
|
||||
<FilePreview :file-list="detail.businessLicense" />
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</div>
|
||||
|
@@ -50,7 +50,7 @@
|
||||
<template #icon>
|
||||
<FileExcelOutlined />
|
||||
</template>
|
||||
导出数据
|
||||
导出数据(带水印)
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="smart-table-setting-block">
|
||||
|
@@ -9,7 +9,7 @@
|
||||
-->
|
||||
<template>
|
||||
<a-card style="margin-bottom: 15px" size="small">
|
||||
<a-descriptions :title="noticeDetail.title" :columns="4" size="small">
|
||||
<a-descriptions :title="noticeDetail.title" :column="4" size="small">
|
||||
<template #extra>
|
||||
<a-button v-if="!noticeDetail.publishFlag" type="primary" size="small" @click="onEdit">编辑</a-button>
|
||||
</template>
|
||||
@@ -28,7 +28,7 @@
|
||||
<a class="file-item" v-for="item in noticeDetail.attachment" :key="item.fileId" @click="onPrevFile(item)">{{ item.fileName }}</a>
|
||||
</div>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="可见范围" :span="2">
|
||||
<a-descriptions-item label="可见范围">
|
||||
<template v-if="noticeDetail.allVisibleFlag">全部可见</template>
|
||||
<div class="visible-list">
|
||||
<div class="visible-item" v-for="item in noticeDetail.visibleRangeList" :key="item.dataId">
|
||||
@@ -59,37 +59,37 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import NoticeFormDrawer from './components/notice-form-drawer.vue';
|
||||
import NoticeViewRecordList from './components/notice-view-record-list.vue';
|
||||
import { noticeApi } from '/@/api/business/oa/notice-api';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import FilePreviewModal from '/@/components/support/file-preview-modal/index.vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import NoticeFormDrawer from './components/notice-form-drawer.vue';
|
||||
import NoticeViewRecordList from './components/notice-view-record-list.vue';
|
||||
import { noticeApi } from '/@/api/business/oa/notice-api';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import FilePreviewModal from '/@/components/support/file-preview-modal/index.vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
|
||||
const route = useRoute();
|
||||
const route = useRoute();
|
||||
|
||||
const props = defineProps({
|
||||
const props = defineProps({
|
||||
newsType: {
|
||||
type: Number,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
const activeKey = ref(1);
|
||||
const activeKey = ref(1);
|
||||
|
||||
const noticeDetail = ref({});
|
||||
const noticeViewRecordList = ref();
|
||||
const noticeDetail = ref({});
|
||||
const noticeViewRecordList = ref();
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(() => {
|
||||
if (route.query.noticeId) {
|
||||
queryNoticeDetail();
|
||||
noticeViewRecordList.value.onSearch();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 查询详情
|
||||
async function queryNoticeDetail() {
|
||||
// 查询详情
|
||||
async function queryNoticeDetail() {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
const result = await noticeApi.getUpdateNoticeInfo(route.query.noticeId);
|
||||
@@ -99,27 +99,27 @@ async function queryNoticeDetail() {
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 点击编辑
|
||||
const noticeFormDrawerRef = ref();
|
||||
function onEdit() {
|
||||
// 点击编辑
|
||||
const noticeFormDrawerRef = ref();
|
||||
function onEdit() {
|
||||
noticeFormDrawerRef.value.showModal(noticeDetail.value.noticeId);
|
||||
}
|
||||
}
|
||||
|
||||
// 预览附件
|
||||
const filePreviewRef = ref();
|
||||
function onPrevFile(fileItem) {
|
||||
// 预览附件
|
||||
const filePreviewRef = ref();
|
||||
function onPrevFile(fileItem) {
|
||||
filePreviewRef.value.showPreview(fileItem);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ant-descriptions-item-content) {
|
||||
:deep(.ant-descriptions-item-content) {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.file-list {
|
||||
}
|
||||
.file-list {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -127,18 +127,18 @@ function onPrevFile(fileItem) {
|
||||
display: block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.visible-list {
|
||||
}
|
||||
.visible-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.visible-item {
|
||||
margin-right: 10px;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.content-html {
|
||||
}
|
||||
.content-html {
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -27,43 +27,41 @@
|
||||
<!--endprint-->
|
||||
</div>
|
||||
<a-divider />
|
||||
<div>附件:<file-preview :fileList="noticeDetail.attachment" /></div>
|
||||
<div>
|
||||
附件:
|
||||
<file-preview v-if="!$lodash.isEmpty(noticeDetail.attachment)" :fileList="noticeDetail.attachment" />
|
||||
<span v-else>无</span>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
<a-card title="记录" size="small" class="smart-margin-top10">
|
||||
<NoticeViewRecordList ref="noticeViewRecordList" :noticeId="route.query.noticeId" />
|
||||
</a-card>
|
||||
|
||||
<!-- 预览附件 -->
|
||||
<FilePreviewModal ref="filePreviewRef" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import NoticeViewRecordList from './components/notice-view-record-list.vue';
|
||||
import { noticeApi } from '/@/api/business/oa/notice-api';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import FilePreviewModal from '/@/components/support/file-preview-modal/index.vue';
|
||||
import FilePreview from '/@/components/support/file-preview/index.vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import NoticeViewRecordList from './components/notice-view-record-list.vue';
|
||||
import { noticeApi } from '/@/api/business/oa/notice-api';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import FilePreview from '/@/components/support/file-preview/index.vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
|
||||
const route = useRoute();
|
||||
const route = useRoute();
|
||||
|
||||
const activeKey = ref(1);
|
||||
const noticeDetail = ref({});
|
||||
|
||||
const noticeDetail = ref({});
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(() => {
|
||||
if (route.query.noticeId) {
|
||||
queryNoticeDetail();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const noticeViewRecordList = ref();
|
||||
const noticeViewRecordList = ref();
|
||||
|
||||
// 查询详情
|
||||
async function queryNoticeDetail() {
|
||||
// 查询详情
|
||||
async function queryNoticeDetail() {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
const result = await noticeApi.view(route.query.noticeId);
|
||||
@@ -75,22 +73,16 @@ async function queryNoticeDetail() {
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 点击编辑
|
||||
const noticeFormDrawerRef = ref();
|
||||
function onEdit() {
|
||||
// 点击编辑
|
||||
const noticeFormDrawerRef = ref();
|
||||
function onEdit() {
|
||||
noticeFormDrawerRef.value.showModal(noticeDetail.value.noticeId);
|
||||
}
|
||||
}
|
||||
|
||||
// 预览附件
|
||||
const filePreviewRef = ref();
|
||||
function onPrevFile(fileItem) {
|
||||
filePreviewRef.value.showPreview(fileItem);
|
||||
}
|
||||
|
||||
// 打印
|
||||
function print() {
|
||||
// 打印
|
||||
function print() {
|
||||
let bdhtml = window.document.body.innerHTML;
|
||||
let sprnstr = '<!--startprint-->'; //必须在页面添加<!--startprint-->和<!--endprint-->而且需要打印的内容必须在它们之间
|
||||
let eprnstr = '<!--endprint-->';
|
||||
@@ -102,15 +94,15 @@ function print() {
|
||||
newWin.focus(); //在IE浏览器中使用必须添加这一句
|
||||
newWin.print(); //打印
|
||||
newWin.close(); //关闭窗口
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ant-descriptions-item-content) {
|
||||
:deep(.ant-descriptions-item-content) {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.file-list {
|
||||
}
|
||||
.file-list {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -118,16 +110,16 @@ function print() {
|
||||
display: block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.visible-list {
|
||||
}
|
||||
.visible-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.visible-item {
|
||||
margin-right: 10px;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.content-header {
|
||||
}
|
||||
.content-header {
|
||||
.content-header-title {
|
||||
margin: 10px 0px;
|
||||
font-size: 18px;
|
||||
@@ -144,10 +136,10 @@ function print() {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-html {
|
||||
}
|
||||
.content-html {
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -45,7 +45,7 @@
|
||||
<a-table rowKey="feedbackId" :dataSource="tableData" :columns="tableColumns" :pagination="false" :loading="tableLoading" size="small" bordered>
|
||||
<template #bodyCell="{ text, column }">
|
||||
<template v-if="column.dataIndex === 'feedbackAttachment'">
|
||||
<FilePreview :fileList="text" />
|
||||
<FilePreview :fileList="text" type="picture" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'userType'">
|
||||
<span>{{ $smartEnumPlugin.getDescByValue('USER_TYPE_ENUM', text) }}</span>
|
||||
|
@@ -138,13 +138,191 @@ function print() {
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-html {
|
||||
/*样式深入*/
|
||||
:deep(.content-html) {
|
||||
margin-top: 30px;
|
||||
padding: 0 8px;
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
border: #1e1e1e;
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0 auto;
|
||||
color: #ccd1d8;
|
||||
line-height: 1.5;
|
||||
padding: 16px;
|
||||
background-color: #333842;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #0D366F;
|
||||
font-weight: bold;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
padding: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #61afef;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
vertical-align: baseline;
|
||||
text-decoration: none;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #ba68c8;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
padding: 0;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
li {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
li ul, li ol {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
p, ul, ol {
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
mark {
|
||||
color: #000000;
|
||||
background-color: #c4c400;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
-moz-tab-size: 4;
|
||||
tab-size: 4;
|
||||
}
|
||||
|
||||
code {
|
||||
color: #98c379;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
pre code {
|
||||
display: block;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
color: #98c379;
|
||||
background-color: #2d323b;
|
||||
line-height: 1.5;
|
||||
white-space: pre;
|
||||
-moz-tab-size: 4;
|
||||
tab-size: 4;
|
||||
}
|
||||
|
||||
aside {
|
||||
display: block;
|
||||
float: right;
|
||||
width: 390px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
color: #abb2bf;
|
||||
border-left: .5em solid #abb2bf;
|
||||
padding: 0 1em;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote p {
|
||||
color: #abb2bf;
|
||||
}
|
||||
|
||||
hr {
|
||||
display: block;
|
||||
text-align: left;
|
||||
margin: 1em 0;
|
||||
border: none;
|
||||
height: 2px;
|
||||
background-color: #4c5562;
|
||||
}
|
||||
|
||||
table {
|
||||
padding: 0;
|
||||
margin: 1rem 0.5rem;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table tr {
|
||||
border-top: 1px solid #4c5562;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table tr:hover {
|
||||
background-color: #DBE5F2;
|
||||
}
|
||||
|
||||
table tr th {
|
||||
font-weight: bold;
|
||||
background-color: #90BFFF;
|
||||
border: 1px solid #4c5562;
|
||||
margin: 0;
|
||||
padding: 6px 13px;
|
||||
}
|
||||
|
||||
table tr td {
|
||||
border: 1px solid #4c5562;
|
||||
margin: 0;
|
||||
padding: 6px 13px;
|
||||
}
|
||||
|
||||
table tr th :first-child, table tr td :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
table tr th :last-child, table tr td :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -86,13 +86,13 @@
|
||||
<p class="line"></p>
|
||||
</div>
|
||||
<div class="login-type">
|
||||
<img src="/@/assets/images/login/wechat-icon.png" />
|
||||
<img src="/@/assets/images/login/ali-icon.png" />
|
||||
<img src="/@/assets/images/login/douyin-icon.png" />
|
||||
<img src="/@/assets/images/login/qq-icon.png" />
|
||||
<img src="/@/assets/images/login/weibo-icon.png" />
|
||||
<img src="/@/assets/images/login/feishu-icon.png" />
|
||||
<img src="/@/assets/images/login/google-icon.png" />
|
||||
<img :src="wechatIcon" />
|
||||
<img :src="aliIcon" />
|
||||
<img :src="douyinIcon" />
|
||||
<img :src="qqIcon" />
|
||||
<img :src="weiboIcon" />
|
||||
<img :src="feishuIcon" />
|
||||
<img :src="googleIcon" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -106,10 +106,16 @@
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { LOGIN_DEVICE_ENUM } from '/@/constants/system/login-device-const';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import gongzhonghao from '/@/assets/images/1024lab/1024lab-gzh.jpg';
|
||||
import zhuoda from '/@/assets/images/1024lab/zhuoda-wechat.jpg';
|
||||
import loginQR from '/@/assets/images/login/login-qr.png';
|
||||
import gzh from '/@/assets/images/1024lab/gzh.jpg';
|
||||
import wechatIcon from '/@/assets/images/login/wechat-icon.png';
|
||||
import aliIcon from '/@/assets/images/login/ali-icon.png';
|
||||
import douyinIcon from '/@/assets/images/login/douyin-icon.png';
|
||||
import qqIcon from '/@/assets/images/login/qq-icon.png';
|
||||
import weiboIcon from '/@/assets/images/login/weibo-icon.png';
|
||||
import feishuIcon from '/@/assets/images/login/feishu-icon.png';
|
||||
import googleIcon from '/@/assets/images/login/google-icon.png';
|
||||
|
||||
import { buildRoutes } from '/@/router/index';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
@@ -148,7 +154,7 @@
|
||||
notification['success']({
|
||||
message: '温馨提示',
|
||||
description: 'SmartAdmin 提供 9种 登录背景风格哦!',
|
||||
duration: null,
|
||||
duration: 8,
|
||||
onClick: () => {},
|
||||
btn: () =>
|
||||
h(
|
||||
|
@@ -50,13 +50,13 @@
|
||||
<p class="line"></p>
|
||||
</div>
|
||||
<div class="login-type">
|
||||
<img src="/@/assets/images/login/wechat-icon.png" />
|
||||
<img src="/@/assets/images/login/ali-icon.png" />
|
||||
<img src="/@/assets/images/login/douyin-icon.png" />
|
||||
<img src="/@/assets/images/login/qq-icon.png" />
|
||||
<img src="/@/assets/images/login/weibo-icon.png" />
|
||||
<img src="/@/assets/images/login/feishu-icon.png" />
|
||||
<img src="/@/assets/images/login/google-icon.png" />
|
||||
<img :src="wechatIcon" />
|
||||
<img :src="aliIcon" />
|
||||
<img :src="douyinIcon" />
|
||||
<img :src="qqIcon" />
|
||||
<img :src="weiboIcon" />
|
||||
<img :src="feishuIcon" />
|
||||
<img :src="googleIcon" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,6 +71,13 @@
|
||||
import { LOGIN_DEVICE_ENUM } from '/@/constants/system/login-device-const';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import loginQR from '/@/assets/images/login/login-qr.png';
|
||||
import wechatIcon from '/@/assets/images/login/wechat-icon.png';
|
||||
import aliIcon from '/@/assets/images/login/ali-icon.png';
|
||||
import douyinIcon from '/@/assets/images/login/douyin-icon.png';
|
||||
import qqIcon from '/@/assets/images/login/qq-icon.png';
|
||||
import weiboIcon from '/@/assets/images/login/weibo-icon.png';
|
||||
import feishuIcon from '/@/assets/images/login/feishu-icon.png';
|
||||
import googleIcon from '/@/assets/images/login/google-icon.png';
|
||||
|
||||
import { buildRoutes } from '/@/router/index';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
<p>欢迎登录 SmartAdmin V3</p>
|
||||
<p class="sub-welcome">高质量代码的快速开发平台</p>
|
||||
</div>
|
||||
<img class="welcome-img" src="/@/assets/images/login/left-bg2.png" />
|
||||
<img class="welcome-img" :src="leftBg2" />
|
||||
</div>
|
||||
<div class="box-item login">
|
||||
<img class="login-qr" :src="loginQR" />
|
||||
@@ -51,13 +51,13 @@
|
||||
<p class="line"></p>
|
||||
</div>
|
||||
<div class="login-type">
|
||||
<img src="/@/assets/images/login/wechat-icon.png" />
|
||||
<img src="/@/assets/images/login/ali-icon.png" />
|
||||
<img src="/@/assets/images/login/douyin-icon.png" />
|
||||
<img src="/@/assets/images/login/qq-icon.png" />
|
||||
<img src="/@/assets/images/login/weibo-icon.png" />
|
||||
<img src="/@/assets/images/login/feishu-icon.png" />
|
||||
<img src="/@/assets/images/login/google-icon.png" />
|
||||
<img :src="wechatIcon" />
|
||||
<img :src="aliIcon" />
|
||||
<img :src="douyinIcon" />
|
||||
<img :src="qqIcon" />
|
||||
<img :src="weiboIcon" />
|
||||
<img :src="feishuIcon" />
|
||||
<img :src="googleIcon" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -72,6 +72,14 @@
|
||||
import { LOGIN_DEVICE_ENUM } from '/@/constants/system/login-device-const';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import loginQR from '/@/assets/images/login/login-qr.png';
|
||||
import leftBg2 from '/@/assets/images/login/left-bg2.png';
|
||||
import wechatIcon from '/@/assets/images/login/wechat-icon.png';
|
||||
import aliIcon from '/@/assets/images/login/ali-icon.png';
|
||||
import douyinIcon from '/@/assets/images/login/douyin-icon.png';
|
||||
import qqIcon from '/@/assets/images/login/qq-icon.png';
|
||||
import weiboIcon from '/@/assets/images/login/weibo-icon.png';
|
||||
import feishuIcon from '/@/assets/images/login/feishu-icon.png';
|
||||
import googleIcon from '/@/assets/images/login/google-icon.png';
|
||||
|
||||
import { buildRoutes } from '/@/router/index';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
|
Reference in New Issue
Block a user