mirror of
https://github.com/1024-lab/smart-admin.git
synced 2025-09-06 20:57:37 +00:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8fdcf13f86 | ||
![]() |
4ca0d6eab9 | ||
![]() |
dc7e96e67b | ||
![]() |
6517b75723 | ||
![]() |
9b354b2e01 | ||
![]() |
fd27cd692d |
@@ -35,6 +35,10 @@
|
||||
<td><img src="https://img.smartadmin.1024lab.net/smart-admin-v3/cut/code.png"/></td>
|
||||
<td><img src="https://img.smartadmin.1024lab.net/smart-admin-v3/cut/git-diff.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://img.smartadmin.1024lab.net/smart-app/app1.png"/></td>
|
||||
<td><img src="https://img.smartadmin.1024lab.net/smart-app/app2.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://img.smartadmin.1024lab.net/smart-admin-v3/cut/front.png"/></td>
|
||||
<td><img src="https://img.smartadmin.1024lab.net/smart-admin-v3/cut/back.png"/></td>
|
||||
|
@@ -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>
|
||||
@@ -46,7 +47,7 @@
|
||||
<jjwt.version>0.9.1</jjwt.version>
|
||||
<jwks-rsa.version>0.9.0</jwks-rsa.version>
|
||||
<velocity-tools.version>3.1</velocity-tools.version>
|
||||
<sa-token.version>1.35.0.RC</sa-token.version>
|
||||
<sa-token.version>1.37.0</sa-token.version>
|
||||
<ip2region.version>2.7.0</ip2region.version>
|
||||
<bcprov.version>1.59</bcprov.version>
|
||||
<jackson-datatype-jsr310.version>2.13.4</jackson-datatype-jsr310.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 开云")
|
||||
|
@@ -159,8 +159,8 @@ public class LoginService implements StpInterface {
|
||||
|
||||
// 对于万能密码:受限制sa token 要求loginId唯一,万能密码只能插入一段uuid
|
||||
String saTokenLoginId = SUPER_PASSWORD_LOGIN_ID_PREFIX + StringConst.COLON + UUID.randomUUID().toString().replace("-", "") + StringConst.COLON + employeeEntity.getEmployeeId();
|
||||
// 万能密码登录只能登录15分钟
|
||||
StpUtil.login(saTokenLoginId, 900);
|
||||
// 万能密码登录只能登录30分钟
|
||||
StpUtil.login(saTokenLoginId, 1800);
|
||||
|
||||
} else {
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
@@ -27,6 +27,7 @@ import org.springframework.core.annotation.AnnotationUtils;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -238,6 +239,7 @@ public abstract class OperateLogAspect {
|
||||
if (arg instanceof HttpServletRequest
|
||||
|| arg instanceof HttpServletResponse
|
||||
|| arg instanceof ModelAndView
|
||||
|| arg instanceof MultipartFile
|
||||
|| arg instanceof BindResult) {
|
||||
continue;
|
||||
}
|
||||
|
@@ -6,230 +6,234 @@
|
||||
* @Copyright ${basic.copyright}
|
||||
-->
|
||||
<template>
|
||||
<a-$!{insertAndUpdate.pageType}
|
||||
<a-$!{insertAndUpdate.pageType}
|
||||
:title="form.$!{primaryKeyFieldName} ? '编辑' : '添加'"
|
||||
width="$!{insertAndUpdate.width}"
|
||||
:open="visibleFlag"
|
||||
#if($!{insertAndUpdate.pageType} == 'drawer')
|
||||
@close="onClose"
|
||||
#else
|
||||
@cancel="onClose"
|
||||
#end
|
||||
:maskClosable="false"
|
||||
:destroyOnClose="true"
|
||||
>
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" >
|
||||
>
|
||||
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" >
|
||||
#if($insertAndUpdate.countPerLine == 1)
|
||||
<a-row>
|
||||
#foreach ($field in $formFields)
|
||||
#if($field.frontComponent == "Input")
|
||||
<a-row>
|
||||
#foreach ($field in $formFields)
|
||||
#if($field.frontComponent == "Input")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-input style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
<a-input style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "InputNumber")
|
||||
#end
|
||||
#if($field.frontComponent == "InputNumber")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-input-number style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
<a-input-number style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "Textarea")
|
||||
#end
|
||||
#if($field.frontComponent == "Textarea")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-textarea style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
<a-textarea style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "BooleanSelect")
|
||||
#end
|
||||
#if($field.frontComponent == "BooleanSelect")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<BooleanSelect v-model:value="form.${field.fieldName}" style="width: 100%" />
|
||||
<BooleanSelect v-model:value="form.${field.fieldName}" style="width: 100%" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "SmartEnumSelect")
|
||||
#end
|
||||
#if($field.frontComponent == "SmartEnumSelect")
|
||||
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
|
||||
<SmartEnumSelect width="100%" v-model:value="form.${field.fieldName}" enumName="$!{field.upperUnderscoreEnum}" placeholder="$codeGeneratorTool.removeEnumDesc($!{field.label})"/>
|
||||
<SmartEnumSelect width="100%" v-model:value="form.${field.fieldName}" enumName="$!{field.upperUnderscoreEnum}" placeholder="$codeGeneratorTool.removeEnumDesc($!{field.label})"/>
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "DictSelect")
|
||||
#end
|
||||
#if($field.frontComponent == "DictSelect")
|
||||
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
|
||||
<DictSelect width="100%" v-model:value="form.${field.fieldName}" keyCode="$!{field.dict}" placeholder="$!{field.label}"/>
|
||||
<DictSelect width="100%" v-model:value="form.${field.fieldName}" keyCode="$!{field.dict}" placeholder="$!{field.label}"/>
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "Date")
|
||||
#end
|
||||
#if($field.frontComponent == "Date")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-date-picker valueFormat="YYYY-MM-DD" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}"/>
|
||||
<a-date-picker valueFormat="YYYY-MM-DD" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}"/>
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "DateTime")
|
||||
#end
|
||||
#if($field.frontComponent == "DateTime")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}" />
|
||||
<a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "Upload")
|
||||
#end
|
||||
#if($field.frontComponent == "Upload")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<FileUpload
|
||||
:defaultFileList="form.$!{field.fieldName}"
|
||||
:folder="FILE_FOLDER_TYPE_ENUM.COMMON.value"
|
||||
buttonText="上传 $!{field.label}"
|
||||
listType="text"
|
||||
@change="e => form.$!{field.fieldName} = e"
|
||||
/>
|
||||
<FileUpload
|
||||
:defaultFileList="form.$!{field.fieldName}"
|
||||
:folder="FILE_FOLDER_TYPE_ENUM.COMMON.value"
|
||||
buttonText="上传 $!{field.label}"
|
||||
listType="text"
|
||||
@change="e => form.$!{field.fieldName} = e"
|
||||
/>
|
||||
</a-form-item>
|
||||
#end
|
||||
#end
|
||||
</a-row>
|
||||
#end
|
||||
#end
|
||||
</a-row>
|
||||
#end
|
||||
|
||||
#if($insertAndUpdate.countPerLine > 1)
|
||||
<a-row>
|
||||
#set($span=24 / $!insertAndUpdate.countPerLine )
|
||||
#foreach ($field in $formFields)
|
||||
<a-col :span="$!{span}">
|
||||
#if($field.frontComponent == "Input")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-input style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "InputNumber")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-input-number style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "Textarea")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-textarea style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "BooleanSelect")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<BooleanSelect v-model:value="form.${field.fieldName}" style="width: 100%" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "SmartEnumSelect")
|
||||
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
|
||||
<SmartEnumSelect width="100%" v-model:value="form.${field.fieldName}" enumName="$!{field.upperUnderscoreEnum}" placeholder="$codeGeneratorTool.removeEnumDesc($!{field.label})"/>
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "DictSelect")
|
||||
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
|
||||
<DictSelect width="100%" v-model:value="form.${field.fieldName}" keyCode="$!{field.dict}" placeholder="$!{field.label}"/>
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "Date")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-date-picker valueFormat="YYYY-MM-DD" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}"/>
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "DateTime")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "Upload")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<FileUpload
|
||||
:defaultFileList="form.$!{field.fieldName}"
|
||||
:folder="FILE_FOLDER_TYPE_ENUM.COMMON.value"
|
||||
buttonText="上传 $!{field.label}"
|
||||
listType="text"
|
||||
@change="e => form.$!{field.fieldName} = e"
|
||||
/>
|
||||
</a-form-item>
|
||||
#end
|
||||
</a-col>
|
||||
#end
|
||||
</a-row>
|
||||
<a-row>
|
||||
#set($span=24 / $!insertAndUpdate.countPerLine )
|
||||
#foreach ($field in $formFields)
|
||||
<a-col :span="$!{span}">
|
||||
#if($field.frontComponent == "Input")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-input style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "InputNumber")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-input-number style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "Textarea")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-textarea style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "BooleanSelect")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<BooleanSelect v-model:value="form.${field.fieldName}" style="width: 100%" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "SmartEnumSelect")
|
||||
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
|
||||
<SmartEnumSelect width="100%" v-model:value="form.${field.fieldName}" enumName="$!{field.upperUnderscoreEnum}" placeholder="$codeGeneratorTool.removeEnumDesc($!{field.label})"/>
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "DictSelect")
|
||||
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
|
||||
<DictSelect width="100%" v-model:value="form.${field.fieldName}" keyCode="$!{field.dict}" placeholder="$!{field.label}"/>
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "Date")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-date-picker valueFormat="YYYY-MM-DD" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}"/>
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "DateTime")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}" />
|
||||
</a-form-item>
|
||||
#end
|
||||
#if($field.frontComponent == "Upload")
|
||||
<a-form-item label="$!{field.label}" name="${field.fieldName}">
|
||||
<FileUpload
|
||||
:defaultFileList="form.$!{field.fieldName}"
|
||||
:folder="FILE_FOLDER_TYPE_ENUM.COMMON.value"
|
||||
buttonText="上传 $!{field.label}"
|
||||
listType="text"
|
||||
@change="e => form.$!{field.fieldName} = e"
|
||||
/>
|
||||
</a-form-item>
|
||||
#end
|
||||
</a-col>
|
||||
#end
|
||||
</a-row>
|
||||
#end
|
||||
</a-form>
|
||||
</a-form>
|
||||
|
||||
<template #footer>
|
||||
<a-space>
|
||||
<a-button @click="onClose">取消</a-button>
|
||||
<a-button type="primary" @click="onSubmit">保存</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-$!{insertAndUpdate.pageType}>
|
||||
<template #footer>
|
||||
<a-space>
|
||||
<a-button @click="onClose">取消</a-button>
|
||||
<a-button type="primary" @click="onSubmit">保存</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-$!{insertAndUpdate.pageType}>
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive, ref, nextTick } from 'vue';
|
||||
import _ from 'lodash';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { $!{name.lowerCamel}Api } from '/@/api/business/$!{name.lowerHyphenCamel}/$!{name.lowerHyphenCamel}-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
#foreach ($import in $frontImportList)
|
||||
$!{import}
|
||||
#end
|
||||
import { reactive, ref, nextTick } from 'vue';
|
||||
import _ from 'lodash';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { $!{name.lowerCamel}Api } from '/@/api/business/$!{name.lowerHyphenCamel}/$!{name.lowerHyphenCamel}-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
#foreach ($import in $frontImportList)
|
||||
$!{import}
|
||||
#end
|
||||
|
||||
// ------------------------ 事件 ------------------------
|
||||
// ------------------------ 事件 ------------------------
|
||||
|
||||
const emits = defineEmits(['reloadList']);
|
||||
const emits = defineEmits(['reloadList']);
|
||||
|
||||
// ------------------------ 显示与隐藏 ------------------------
|
||||
// 是否显示
|
||||
const visibleFlag = ref(false);
|
||||
// ------------------------ 显示与隐藏 ------------------------
|
||||
// 是否显示
|
||||
const visibleFlag = ref(false);
|
||||
|
||||
function show(rowData) {
|
||||
Object.assign(form, formDefault);
|
||||
if (rowData && !_.isEmpty(rowData)) {
|
||||
Object.assign(form, rowData);
|
||||
}
|
||||
visibleFlag.value = true;
|
||||
nextTick(() => {
|
||||
formRef.value.clearValidate();
|
||||
});
|
||||
function show(rowData) {
|
||||
Object.assign(form, formDefault);
|
||||
if (rowData && !_.isEmpty(rowData)) {
|
||||
Object.assign(form, rowData);
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
Object.assign(form, formDefault);
|
||||
visibleFlag.value = false;
|
||||
}
|
||||
|
||||
// ------------------------ 表单 ------------------------
|
||||
|
||||
// 组件ref
|
||||
const formRef = ref();
|
||||
|
||||
const formDefault = {
|
||||
$!{primaryKeyFieldName}: undefined,
|
||||
#foreach ($field in $formFields)
|
||||
$!{field.fieldName}: undefined, //$!{field.label}
|
||||
#end
|
||||
};
|
||||
|
||||
let form = reactive({ ...formDefault });
|
||||
|
||||
const rules = {
|
||||
#foreach ($field in $formFields)
|
||||
#if($field.requiredFlag)
|
||||
$!{field.fieldName}: [{ required: true, message: '$!{field.label} 必填' }],
|
||||
#end
|
||||
#end
|
||||
};
|
||||
|
||||
// 点击确定,验证表单
|
||||
async function onSubmit() {
|
||||
try {
|
||||
await formRef.value.validateFields();
|
||||
save();
|
||||
} catch (err) {
|
||||
message.error('参数验证错误,请仔细填写表单数据!');
|
||||
}
|
||||
}
|
||||
|
||||
// 新建、编辑API
|
||||
async function save() {
|
||||
SmartLoading.show();
|
||||
try {
|
||||
if (form.$!{primaryKeyFieldName}) {
|
||||
await $!{name.lowerCamel}Api.update(form);
|
||||
} else {
|
||||
await $!{name.lowerCamel}Api.add(form);
|
||||
}
|
||||
message.success('操作成功');
|
||||
emits('reloadList');
|
||||
onClose();
|
||||
} catch (err) {
|
||||
smartSentry.captureError(err);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
visibleFlag.value = true;
|
||||
nextTick(() => {
|
||||
formRef.value.clearValidate();
|
||||
});
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
Object.assign(form, formDefault);
|
||||
visibleFlag.value = false;
|
||||
}
|
||||
|
||||
// ------------------------ 表单 ------------------------
|
||||
|
||||
// 组件ref
|
||||
const formRef = ref();
|
||||
|
||||
const formDefault = {
|
||||
$!{primaryKeyFieldName}: undefined,
|
||||
#foreach ($field in $formFields)
|
||||
$!{field.fieldName}: undefined, //$!{field.label}
|
||||
#end
|
||||
};
|
||||
|
||||
let form = reactive({ ...formDefault });
|
||||
|
||||
const rules = {
|
||||
#foreach ($field in $formFields)
|
||||
#if($field.requiredFlag)
|
||||
$!{field.fieldName}: [{ required: true, message: '$!{field.label} 必填' }],
|
||||
#end
|
||||
#end
|
||||
};
|
||||
|
||||
// 点击确定,验证表单
|
||||
async function onSubmit() {
|
||||
try {
|
||||
await formRef.value.validateFields();
|
||||
save();
|
||||
} catch (err) {
|
||||
message.error('参数验证错误,请仔细填写表单数据!');
|
||||
}
|
||||
}
|
||||
|
||||
// 新建、编辑API
|
||||
async function save() {
|
||||
SmartLoading.show();
|
||||
try {
|
||||
if (form.$!{primaryKeyFieldName}) {
|
||||
await $!{name.lowerCamel}Api.update(form);
|
||||
} else {
|
||||
await $!{name.lowerCamel}Api.add(form);
|
||||
}
|
||||
message.success('操作成功');
|
||||
emits('reloadList');
|
||||
onClose();
|
||||
} catch (err) {
|
||||
smartSentry.captureError(err);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
|
@@ -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 代表不限制,永不冻结
|
||||
|
@@ -3,7 +3,7 @@ spring:
|
||||
datasource:
|
||||
url: jdbc: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#1024lab
|
||||
password: Zhuoda1024lab
|
||||
initial-size: 10
|
||||
min-idle: 10
|
||||
max-active: 100
|
||||
@@ -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 代表不限制,永不冻结
|
||||
|
@@ -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: Java@1024
|
||||
password: Zhuoda1024lab
|
||||
initial-size: 2
|
||||
min-idle: 2
|
||||
max-active: 10
|
||||
@@ -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",
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<!--
|
||||
* 主应用页面
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-12 23:46:47
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-12 23:46:47
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
|
||||
<template>
|
||||
@@ -19,6 +19,7 @@
|
||||
colorLinkActive: themeColors[colorIndex].activeColor,
|
||||
colorLinkHover: themeColors[colorIndex].hoverColor,
|
||||
colorIcon: themeColors[colorIndex].primaryColor,
|
||||
borderRadius: borderRadius,
|
||||
},
|
||||
components: {
|
||||
Button: {
|
||||
@@ -62,4 +63,8 @@
|
||||
const colorIndex = computed(() => {
|
||||
return useAppConfigStore().colorIndex;
|
||||
});
|
||||
// 圆角
|
||||
const borderRadius = computed(() => {
|
||||
return useAppConfigStore().borderRadius;
|
||||
});
|
||||
</script>
|
||||
|
@@ -32,7 +32,7 @@ export const fileApi = {
|
||||
/**
|
||||
* 下载文件流(根据fileKey) @author 胡克
|
||||
*/
|
||||
downLoadFile: (fileName, fileKey) => {
|
||||
downLoadFile: (fileKey) => {
|
||||
return getDownload('/support/file/downLoad', { fileKey });
|
||||
},
|
||||
};
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<!---
|
||||
* 字段 下拉选择框
|
||||
*
|
||||
*
|
||||
* @Author: 1024创新实验室:罗伊
|
||||
* @Date: 2022-09-12 22:06:45
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
* @Date: 2022-09-12 22:06:45
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
@@ -108,7 +108,7 @@
|
||||
emit('update:value', valueList);
|
||||
emit('change', valueList);
|
||||
} else {
|
||||
let findValue = dictValueList.value.find((e) => e.valueCode == value);
|
||||
let findValue = dictValueList.value.find((e) => e.valueCode === value);
|
||||
emit('update:value', findValue.valueCode);
|
||||
emit('change', findValue.valueCode);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -20,6 +20,8 @@ export const appDefaultConfig = {
|
||||
colorIndex: 0,
|
||||
// 顶部菜单页面宽度
|
||||
pageWidth: '99%',
|
||||
// 圆角
|
||||
borderRadius: 6,
|
||||
// 标签页
|
||||
pageTagFlag: true,
|
||||
// 面包屑
|
||||
@@ -33,7 +35,7 @@ export const appDefaultConfig = {
|
||||
// 网站名称
|
||||
websiteName: 'SmartAdmin 3.X',
|
||||
// 主题颜色
|
||||
primaryColor: 'red',
|
||||
primaryColor: '#1677ff',
|
||||
// 紧凑
|
||||
compactFlag: false,
|
||||
};
|
||||
|
@@ -19,6 +19,7 @@ export default {
|
||||
'setting.menu.width': 'Menu Width',
|
||||
'setting.menu.theme': 'Menu Theme',
|
||||
'setting.page.width': 'Page Width',
|
||||
'setting.border.radius': 'Border Radius',
|
||||
'setting.compact': 'Page Compact',
|
||||
'setting.bread': 'Show Bread',
|
||||
'setting.pagetag': 'Show PageTag',
|
||||
|
@@ -19,6 +19,7 @@ export default {
|
||||
'setting.menu.width': '菜单宽度',
|
||||
'setting.menu.theme': '菜单主题',
|
||||
'setting.compact': '页面紧凑',
|
||||
'setting.border.radius': '页面圆角',
|
||||
'setting.page.width': '页面宽度',
|
||||
'setting.bread': '面包屑',
|
||||
'setting.pagetag': '标签页',
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<!--
|
||||
* 设置模块
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:18:20
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:18:20
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
|
||||
<template>
|
||||
@@ -35,6 +35,9 @@
|
||||
</template>
|
||||
</div>
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.border.radius')">
|
||||
<a-slider v-model:value="formState.borderRadius" :min="0" :max="6" @change="changeBorderRadius" />
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.compact')">
|
||||
<a-radio-group v-model:value="formState.compactFlag" button-style="solid" @change="changeCompactFlag">
|
||||
<a-radio-button :value="false">默认</a-radio-button>
|
||||
@@ -169,6 +172,8 @@
|
||||
sideMenuTheme: appConfigStore.sideMenuTheme,
|
||||
// 页面紧凑
|
||||
compactFlag: appConfigStore.compactFlag,
|
||||
// 页面圆角
|
||||
borderRadius: appConfigStore.borderRadius,
|
||||
// 标签页
|
||||
pageTagFlag: appConfigStore.pageTagFlag,
|
||||
// 面包屑
|
||||
@@ -227,6 +232,11 @@
|
||||
compactFlag: e.target.value,
|
||||
});
|
||||
}
|
||||
function changeBorderRadius(e) {
|
||||
appConfigStore.$patch({
|
||||
borderRadius: e,
|
||||
});
|
||||
}
|
||||
|
||||
function changeBreadCrumbFlag(e) {
|
||||
appConfigStore.$patch({
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<!--
|
||||
* 标签页
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:29:12
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:29:12
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<!-- 标签页,共两部分:1、标签 ;2、标签操作区 -->
|
||||
@@ -130,6 +130,9 @@
|
||||
|
||||
const { useToken } = theme;
|
||||
const { token } = useToken();
|
||||
const borderRadius = computed(() => {
|
||||
return token.value.borderRadius + 'px';
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@@ -199,6 +202,7 @@
|
||||
|
||||
:deep(.ant-tabs-small > .ant-tabs-nav .ant-tabs-tab) {
|
||||
padding: 5px 8px 3px 10px;
|
||||
border-radius: v-bind(borderRadius);
|
||||
}
|
||||
|
||||
:deep(.ant-tabs-tab-active) {
|
||||
|
@@ -1,18 +1,18 @@
|
||||
<!--
|
||||
* 第一列菜单
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:29:12
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:29:12
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<div class="top-menu-container">
|
||||
<!-- 顶部logo区域 -->
|
||||
<div class="logo" @click="onGoHome">
|
||||
<img class="logo-img" :src="logoImg" />
|
||||
<div class="title">{{ websiteName }}</div>
|
||||
<div class="title smart-logo">{{ websiteName }}</div>
|
||||
</div>
|
||||
<!-- 一级菜单展示 -->
|
||||
<a-menu :selectedKeys="selectedKeys" mode="inline" :theme="theme">
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<!--
|
||||
* 传统菜单
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:29:12
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:29:12
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<!--左侧菜单分为两部分:1、顶部logo区域,包含 logo和名称;2、下方菜单区域-->
|
||||
@@ -13,15 +13,17 @@
|
||||
<!-- 1、顶部logo区域 -->
|
||||
<div class="logo" @click="onGoHome" :style="sideMenuWidth" v-if="!collapsed">
|
||||
<img class="logo-img" :src="logoImg" />
|
||||
<div class="title title-light" v-if="sideMenuTheme === 'light'">{{ websiteName }}</div>
|
||||
<div class="title title-dark" v-if="sideMenuTheme === 'dark'">{{ websiteName }}</div>
|
||||
<div class="title smart-logo title-light" v-if="sideMenuTheme === 'light'">{{ websiteName }}</div>
|
||||
<div class="title smart-logo title-dark" v-if="sideMenuTheme === 'dark'">{{ websiteName }}</div>
|
||||
</div>
|
||||
<div class="min-logo" @click="onGoHome" v-if="collapsed">
|
||||
<img class="logo-img" :src="logoImg" />
|
||||
</div>
|
||||
|
||||
<!-- 2、下方菜单区域: 这里使用一个递归菜单解决 -->
|
||||
<RecursionMenu :collapsed="collapsed" ref="menuRef" />
|
||||
<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>
|
||||
|
@@ -1,15 +1,16 @@
|
||||
<!--
|
||||
* 底部:版权、公司等信息
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:29:12
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:29:12
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<div class="version">
|
||||
<a target="_blank" href="javascript:void(0)"> SmartAdmin V3.x @copyright 河南·洛阳【1024创新实验室】 Since 2012-{{ currentYear }} </a>
|
||||
<a target="_blank" class="smart-copyright" href="https://www.1024lab.net"> ©2012-{{ currentYear }} 河南·洛阳「1024创新实验室」 SmartAdmin </a>
|
||||
<a target="_blank" class="smart-version" href="https://smartadmin.vip/views/other/change-log.html"> V3.4.0 </a>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<!--
|
||||
* 顶部菜单
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:29:12
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-06 20:29:12
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<!--总共3部分:1、logo区域,包含 logo和名称; 2、菜单区域 ;3、用户操作区域-->
|
||||
@@ -13,8 +13,8 @@
|
||||
<!-- 1、logo区域 -->
|
||||
<div class="logo" @click="onGoHome">
|
||||
<img class="logo-img" :src="logoImg" />
|
||||
<div class="title title-light" v-if="sideMenuTheme === 'light'">{{ websiteName }}</div>
|
||||
<div class="title title-dark" v-if="sideMenuTheme === 'dark'">{{ websiteName }}</div>
|
||||
<div class="title smart-logo title-light" v-if="sideMenuTheme === 'light'">{{ websiteName }}</div>
|
||||
<div class="title smart-logo title-dark" v-if="sideMenuTheme === 'dark'">{{ websiteName }}</div>
|
||||
</div>
|
||||
<!-- 2、菜单区域 -->
|
||||
<RecursionMenu ref="menuRef" />
|
||||
|
@@ -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>
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<!--
|
||||
* 公司列表
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-08-15 20:15:49
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<a-form class="smart-query-form" v-privilege="'oa:enterprise:query'">
|
||||
@@ -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,86 +59,86 @@
|
||||
</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({
|
||||
newsType: {
|
||||
type: Number,
|
||||
},
|
||||
});
|
||||
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(() => {
|
||||
if (route.query.noticeId) {
|
||||
queryNoticeDetail();
|
||||
noticeViewRecordList.value.onSearch();
|
||||
onMounted(() => {
|
||||
if (route.query.noticeId) {
|
||||
queryNoticeDetail();
|
||||
noticeViewRecordList.value.onSearch();
|
||||
}
|
||||
});
|
||||
|
||||
// 查询详情
|
||||
async function queryNoticeDetail() {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
const result = await noticeApi.getUpdateNoticeInfo(route.query.noticeId);
|
||||
noticeDetail.value = result.data;
|
||||
} catch (err) {
|
||||
smartSentry.captureError(err);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 查询详情
|
||||
async function queryNoticeDetail() {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
const result = await noticeApi.getUpdateNoticeInfo(route.query.noticeId);
|
||||
noticeDetail.value = result.data;
|
||||
} catch (err) {
|
||||
smartSentry.captureError(err);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
// 点击编辑
|
||||
const noticeFormDrawerRef = ref();
|
||||
function onEdit() {
|
||||
noticeFormDrawerRef.value.showModal(noticeDetail.value.noticeId);
|
||||
}
|
||||
}
|
||||
|
||||
// 点击编辑
|
||||
const noticeFormDrawerRef = ref();
|
||||
function onEdit() {
|
||||
noticeFormDrawerRef.value.showModal(noticeDetail.value.noticeId);
|
||||
}
|
||||
|
||||
// 预览附件
|
||||
const filePreviewRef = ref();
|
||||
function onPrevFile(fileItem) {
|
||||
filePreviewRef.value.showPreview(fileItem);
|
||||
}
|
||||
// 预览附件
|
||||
const filePreviewRef = ref();
|
||||
function onPrevFile(fileItem) {
|
||||
filePreviewRef.value.showPreview(fileItem);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ant-descriptions-item-content) {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.file-list {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.file-item {
|
||||
display: block;
|
||||
margin-right: 10px;
|
||||
:deep(.ant-descriptions-item-content) {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.visible-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.visible-item {
|
||||
margin-right: 10px;
|
||||
color: #666;
|
||||
.file-list {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.file-item {
|
||||
display: block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-html {
|
||||
img {
|
||||
max-width: 100%;
|
||||
.visible-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.visible-item {
|
||||
margin-right: 10px;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.content-html {
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -27,127 +27,119 @@
|
||||
<!--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(() => {
|
||||
if (route.query.noticeId) {
|
||||
queryNoticeDetail();
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
if (route.query.noticeId) {
|
||||
queryNoticeDetail();
|
||||
const noticeViewRecordList = ref();
|
||||
|
||||
// 查询详情
|
||||
async function queryNoticeDetail() {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
const result = await noticeApi.view(route.query.noticeId);
|
||||
noticeDetail.value = result.data;
|
||||
|
||||
noticeViewRecordList.value.onSearch();
|
||||
} catch (err) {
|
||||
smartSentry.captureError(err);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const noticeViewRecordList = ref();
|
||||
|
||||
// 查询详情
|
||||
async function queryNoticeDetail() {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
const result = await noticeApi.view(route.query.noticeId);
|
||||
noticeDetail.value = result.data;
|
||||
|
||||
noticeViewRecordList.value.onSearch();
|
||||
} catch (err) {
|
||||
smartSentry.captureError(err);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
// 点击编辑
|
||||
const noticeFormDrawerRef = ref();
|
||||
function onEdit() {
|
||||
noticeFormDrawerRef.value.showModal(noticeDetail.value.noticeId);
|
||||
}
|
||||
}
|
||||
|
||||
// 点击编辑
|
||||
const noticeFormDrawerRef = ref();
|
||||
function onEdit() {
|
||||
noticeFormDrawerRef.value.showModal(noticeDetail.value.noticeId);
|
||||
}
|
||||
|
||||
// 预览附件
|
||||
const filePreviewRef = ref();
|
||||
function onPrevFile(fileItem) {
|
||||
filePreviewRef.value.showPreview(fileItem);
|
||||
}
|
||||
|
||||
// 打印
|
||||
function print() {
|
||||
let bdhtml = window.document.body.innerHTML;
|
||||
let sprnstr = '<!--startprint-->'; //必须在页面添加<!--startprint-->和<!--endprint-->而且需要打印的内容必须在它们之间
|
||||
let eprnstr = '<!--endprint-->';
|
||||
let prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr));
|
||||
prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
|
||||
let newWin = window.open(''); //新打开一个空窗口
|
||||
newWin.document.body.innerHTML = prnhtml;
|
||||
newWin.document.close(); //在IE浏览器中使用必须添加这一句
|
||||
newWin.focus(); //在IE浏览器中使用必须添加这一句
|
||||
newWin.print(); //打印
|
||||
newWin.close(); //关闭窗口
|
||||
}
|
||||
// 打印
|
||||
function print() {
|
||||
let bdhtml = window.document.body.innerHTML;
|
||||
let sprnstr = '<!--startprint-->'; //必须在页面添加<!--startprint-->和<!--endprint-->而且需要打印的内容必须在它们之间
|
||||
let eprnstr = '<!--endprint-->';
|
||||
let prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr));
|
||||
prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
|
||||
let newWin = window.open(''); //新打开一个空窗口
|
||||
newWin.document.body.innerHTML = prnhtml;
|
||||
newWin.document.close(); //在IE浏览器中使用必须添加这一句
|
||||
newWin.focus(); //在IE浏览器中使用必须添加这一句
|
||||
newWin.print(); //打印
|
||||
newWin.close(); //关闭窗口
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ant-descriptions-item-content) {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.file-list {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.file-item {
|
||||
display: block;
|
||||
margin-right: 10px;
|
||||
:deep(.ant-descriptions-item-content) {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.visible-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.visible-item {
|
||||
margin-right: 10px;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.content-header {
|
||||
.content-header-title {
|
||||
margin: 10px 0px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.content-header-info {
|
||||
margin: 10px 0px;
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
text-align: center;
|
||||
span {
|
||||
margin: 0 10px;
|
||||
cursor: pointer;
|
||||
.file-list {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.file-item {
|
||||
display: block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-html {
|
||||
img {
|
||||
max-width: 100%;
|
||||
.visible-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.visible-item {
|
||||
margin-right: 10px;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.content-header {
|
||||
.content-header-title {
|
||||
margin: 10px 0px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.content-header-info {
|
||||
margin: 10px 0px;
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
text-align: center;
|
||||
span {
|
||||
margin: 0 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.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>
|
||||
|
@@ -1,12 +1,11 @@
|
||||
export default [
|
||||
'每个人的一生好比一根蜡烛,看似不经意间散发的光和热,都可能照亮和温暖他人。这是生活赋予我们的智慧,也让我们在寻常的日子成为一个温暖善良的人。',
|
||||
'立规矩的目的,不是禁锢、限制,而是教育;孩子犯了错,父母不能帮孩子逃避,而应该让孩子学会承担责任。让孩子有面对错误的诚实和勇气,这才是立规矩的意义所在。',
|
||||
'人这一辈子,格局大了、善良有了,成功自然也就近了。格局越大,人生越宽。你的人生会是什么样,与你在为人处世时的表现有很大关系。世间美好都是环环相扣的,善良的人总不会被亏待。',
|
||||
'平日里的千锤百炼,才能托举出光彩时刻;逆境中的亮剑、失败后的奋起,才能让梦想成真。哪有什么一战成名,其实都是百炼成钢。“天才”都是汗水浇灌出来的,天赋或许可以决定起点,但唯有坚持和努力才能达到终点。',
|
||||
'家,不在于奢华,而在于温馨;家,不在于大小,而在于珍惜。在家里,有父母的呵护,有爱人的陪伴,有子女的欢笑。一家人整整齐齐、和和睦睦,就是人生最大的幸福!',
|
||||
'每一个不向命运低头、努力生活的人,都值得被尊重。',
|
||||
'青年的肩上,从不只有清风明月,更有责任担当。岁月因青春慨然以赴而更加美好,世间因少年挺身向前而更加瑰丽。请相信,不会有人永远年轻,但永远有人年轻。',
|
||||
'人生路上,总有人走得比你快,但不必介意,也不必着急。一味羡慕别人的成绩,只会给自己平添压力、徒增烦恼。不盲从别人的脚步,坚定目标,才能找到自己的节奏,进而逢山开路、遇水搭桥。',
|
||||
'如果你真的在乎一个人,首先要学会的就是感恩对方的好。这样,对方才会在和你的相处中找到价值感,相处起来也会更加舒适愉悦。',
|
||||
'一个人只有心里装得下别人,有换位思考的品质,有为他人谋幸福的信念,才能真正做到慷慨施予。同样,也只有赠人玫瑰而无所求时,你才会手有余香、真有所得。',
|
||||
'梦想不会自动成真,奋斗是其桥梁;目标不会自动抵达,奔跑才有远方!',
|
||||
'成长是一场和自己的比赛,不要担心别人会做得比你好,只要你每天都比前一天做得好!',
|
||||
'最慢的步伐不是跬步,而是徘徊;最快的脚步不是冲刺,而是坚持!',
|
||||
'平日里的千锤百炼,才能托举出光彩时刻;逆境中的亮剑、失败后的奋起,才能让梦想成真。哪有什么一战成名,其实都是百炼成钢。“天才”都是汗水浇灌出来的,天赋或许可以决定起点,但唯有坚持和努力才能达到终点。',
|
||||
'历尽天华成此景,人间万事出艰辛。志不求易者成,事不避难者进!',
|
||||
'每一个不向命运低头、努力生活的人,都值得被尊重。',
|
||||
'青年的肩上,从不只有清风明月,更有责任担当。岁月因青春慨然以赴而更加美好,世间因少年挺身向前而更加瑰丽。请相信,不会有人永远年轻,但永远有人年轻。',
|
||||
'人生路上,总有人走得比你快,但不必介意,也不必着急。一味羡慕别人的成绩,只会给自己平添压力、徒增烦恼。不盲从别人的脚步,坚定目标,才能找到自己的节奏,进而逢山开路、遇水搭桥。',
|
||||
'没有理所当然的成功,也没有毫无道理的平庸。值得拥有的东西,永远都来之不易。所以在徘徊迷茫时,不要质疑你的付出,这些累积都会变成一种沉淀,默默为你铺路!',
|
||||
];
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<div class="user-header">
|
||||
<a-page-header :title="welcomeSentence">
|
||||
<template #subTitle>
|
||||
<span style="color: #666; margin-left: 20px;">所属部门:{{ departmentName }} </span>
|
||||
<span style="color: #666; margin-left: 20px">所属部门:{{ departmentName }} </span>
|
||||
</template>
|
||||
<template #extra>
|
||||
<p style="color: #333">{{ dayInfo }}</p>
|
||||
@@ -20,7 +20,7 @@
|
||||
<a-row class="content">
|
||||
<span class="left-content">
|
||||
<p class="last-login-info"><AlertOutlined />{{ lastLoginInfo }}</p>
|
||||
<a class="sentence" href="https://sentence.1024lab.net/" target="_blank"> <smile-outlined spin /> {{ heartSentence }} </a>
|
||||
<a class="sentence" href="https://zhuoda.vip/soup" target="_blank"> <smile-outlined spin /> {{ heartSentence }} </a>
|
||||
</span>
|
||||
<div class="weather">
|
||||
<iframe
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<!--
|
||||
* 登录
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-12 22:34:00
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-09-12 22:34:00
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*
|
||||
-->
|
||||
<template>
|
||||
@@ -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';
|
||||
|
@@ -47,7 +47,7 @@
|
||||
<a-form-item v-if="form.frameFlag" label="外链地址" name="frameUrl">
|
||||
<a-input v-model:value="form.frameUrl" placeholder="请输入外链地址" />
|
||||
</a-form-item>
|
||||
<a-form-item v-else label="组件地址" name="component">
|
||||
<a-form-item v-else label="组件地址" name="component" help="比如 商品列表:/business/erp/goods/goods-list.vue">
|
||||
<a-input v-model:value="form.component" placeholder="请输入组件地址 默认带有开头/@/views" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
@@ -91,9 +91,8 @@
|
||||
</a-form-item>
|
||||
</template>
|
||||
<!-- 按钮 end -->
|
||||
<a-form-item label="排序" name="sort">
|
||||
<a-form-item label="排序" name="sort" help="值越小越靠前">
|
||||
<a-input-number v-model:value="form.sort" :min="0" placeholder="请输入排序" style="width: 100px" />
|
||||
<h6 style="color: #ababab">值越小越靠前</h6>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<div class="footer">
|
||||
|
2
smart-admin-web/typescript-ant-design-vue3/README.md
Normal file
2
smart-admin-web/typescript-ant-design-vue3/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
### **敬请期待,2024年5月开干**
|
||||
|
@@ -1,3 +1,3 @@
|
||||
NODE_ENV=development
|
||||
VITE_APP_TITLE='SmartAdmin 开发环境(Dev)'
|
||||
VITE_APP_API_URL='http://127.0.0.1:1024'
|
||||
VITE_APP_API_URL='https://app.smartadmin.vip/smart-app-api'
|
@@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { useUserStore } from '@/store/modules/system/user';
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
useUserStore().getLoginInfo();
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @LastEditTime: 2022-06-23
|
||||
* @LastEditors: zhuoda
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/smart-request';
|
||||
import { postRequest, getRequest } from '@/lib/smart-request';
|
||||
|
||||
export const goodsApi = {
|
||||
// 添加商品 @author zhuoda
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/smart-request';
|
||||
import { postRequest, getRequest } from '@/lib/smart-request';
|
||||
|
||||
export const enterpriseApi = {
|
||||
// 新建企业 @author 开云
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* @Author: zhuoda
|
||||
* @Date: 2022-08-16 20:34:36
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/smart-request';
|
||||
import { postRequest, getRequest } from '@/lib/smart-request';
|
||||
|
||||
export const noticeApi = {
|
||||
// ---------------- 通知公告类型 -----------------------
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @Date: 2022-09-26 14:53:50
|
||||
* @Copyright 1024创新实验室
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/smart-request';
|
||||
import { postRequest, getRequest } from '@/lib/smart-request';
|
||||
|
||||
export const changeLogApi = {
|
||||
/**
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/smart-request';
|
||||
import { postRequest, getRequest } from '@/lib/smart-request';
|
||||
|
||||
export const dictApi = {
|
||||
// 分页查询数据字典KEY - @author 卓大
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @Date: 2022-09-26 14:53:50
|
||||
* @Copyright 1024创新实验室
|
||||
*/
|
||||
import { uploadRequest } from '/@/lib/smart-request';
|
||||
import { uploadRequest } from '@/lib/smart-request';
|
||||
|
||||
export const fileApi = {
|
||||
upload: (file, folder) => {
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { getRequest, postRequest } from '/@/lib/smart-request';
|
||||
import { getRequest, postRequest } from '@/lib/smart-request';
|
||||
|
||||
export const loginApi = {
|
||||
/**
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { dictApi } from '/@/api/support/dict-api';
|
||||
import { dictApi } from '@/api/support/dict-api';
|
||||
|
||||
const props = defineProps({
|
||||
keyCode: String,
|
||||
|
@@ -7,10 +7,10 @@
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { USER_TOKEN } from '/@/constants/local-storage-key-const';
|
||||
import { DATA_TYPE_ENUM } from '/@/constants/common-const';
|
||||
import { USER_TOKEN } from '@/constants/local-storage-key-const';
|
||||
import { DATA_TYPE_ENUM } from '@/constants/common-const';
|
||||
import { decryptData, encryptData } from './encrypt';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { useUserStore } from '@/store/modules/system/user';
|
||||
|
||||
const baseUrl = import.meta.env.VITE_APP_API_URL;
|
||||
|
||||
|
@@ -6,8 +6,8 @@ import { store } from './store/index';
|
||||
import './theme/index.scss';
|
||||
|
||||
// 枚举管理
|
||||
import smartEnumPlugin from '/@/plugins/smart-enums-plugin';
|
||||
import constantsInfo from '/@/constants/index';
|
||||
import smartEnumPlugin from '@/plugins/smart-enums-plugin';
|
||||
import constantsInfo from '@/constants/index';
|
||||
import lodash from 'lodash';
|
||||
|
||||
export function createApp() {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name" : "",
|
||||
"name" : "smart-app",
|
||||
"appid" : "",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
@@ -50,7 +50,7 @@
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"appid" : "wx2f5032ef5c4adae4",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
|
@@ -83,12 +83,12 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import SmartDetailTabs from '/@/components/smart-detail-tabs/index.vue';
|
||||
import SmartDetailTabs from '@/components/smart-detail-tabs/index.vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
import { enterpriseApi } from '/@/api/business/oa/enterprise-api';
|
||||
import { enterpriseApi } from '@/api/business/oa/enterprise-api';
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { SmartLoading, SmartToast } from '/@/lib/smart-support';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
import { SmartLoading, SmartToast } from '@/lib/smart-support';
|
||||
|
||||
// ----------------------- tab -----------------------
|
||||
|
||||
|
@@ -48,11 +48,11 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { enterpriseApi } from '/@/api/business/oa/enterprise-api';
|
||||
import { regular } from '/@/constants/regular-const';
|
||||
import SmartEnumRadio from '/@/components/smart-enum-radio/index.vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { SmartLoading, SmartToast } from '/@/lib/smart-support';
|
||||
import { enterpriseApi } from '@/api/business/oa/enterprise-api';
|
||||
import { regular } from '@/constants/regular-const';
|
||||
import SmartEnumRadio from '@/components/smart-enum-radio/index.vue';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
import { SmartLoading, SmartToast } from '@/lib/smart-support';
|
||||
import { onLoad, onReady, onShow } from '@dcloudio/uni-app';
|
||||
|
||||
// --------------------- 表单 ---------------------
|
||||
|
@@ -55,10 +55,10 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { enterpriseApi } from '/@/api/business/oa/enterprise-api';
|
||||
import { enterpriseApi } from '@/api/business/oa/enterprise-api';
|
||||
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app';
|
||||
import useMescroll from '@/uni_modules/uni-mescroll/hooks/useMescroll';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
import _ from 'lodash';
|
||||
|
||||
// --------------------------- 查询 ---------------------------------
|
||||
|
@@ -30,8 +30,8 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, toRaw } from 'vue';
|
||||
import DictSelect from '/@/components/dict-select/index.vue';
|
||||
import SmartEnumSelect from '/@/components/smart-enum-select/index.vue';
|
||||
import DictSelect from '@/components/dict-select/index.vue';
|
||||
import SmartEnumSelect from '@/components/smart-enum-select/index.vue';
|
||||
|
||||
const emits = defineEmits(['close']);
|
||||
defineExpose({ show });
|
||||
|
@@ -46,10 +46,10 @@
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import QueryFormPopUp from './components/goods-query-form-popup.vue';
|
||||
import { goodsApi } from '/@/api/business/goods/goods-api';
|
||||
import { goodsApi } from '@/api/business/goods/goods-api';
|
||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app';
|
||||
import useMescroll from '@/uni_modules/uni-mescroll/hooks/useMescroll';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
import NoticeList from './components/goods-list.vue';
|
||||
import _ from 'lodash';
|
||||
|
||||
|
@@ -26,9 +26,9 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { goodsApi } from '/@/api/business/goods/goods-api';
|
||||
import { goodsApi } from '@/api/business/goods/goods-api';
|
||||
|
||||
const queryForm = {
|
||||
pageNum: 1,
|
||||
|
@@ -2,67 +2,67 @@
|
||||
<view class="menu-container">
|
||||
<uni-grid :column="5" :highlight="true" :show-border="false" customStyle="display: block;">
|
||||
<!--------------------------------- 第一排--------------------------------->
|
||||
<uni-grid-item class="menu-grid">
|
||||
<uni-grid-item class="menu-grid" style="width: 134rpx; height: 134rpx">
|
||||
<view class="menu-item" @click="changeHome">
|
||||
<image class="item-image" src="/@/static/images/index/ic_home_menu1.png"></image>
|
||||
<image class="item-image" src="@/static/images/index/ic_home_menu1.png"></image>
|
||||
<view class="item-text"> 首页切换 </view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
|
||||
<uni-grid-item class="menu-grid">
|
||||
<uni-grid-item class="menu-grid" style="width: 134rpx; height: 134rpx">
|
||||
<view class="menu-item" @click="navigateTo('/pages/notice/notice-index')">
|
||||
<image class="item-image" src="/@/static/images/index/ic_home_menu2.png"></image>
|
||||
<image class="item-image" src="@/static/images/index/ic_home_menu2.png"></image>
|
||||
<view class="item-text"> 通知公告 </view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item class="menu-grid">
|
||||
<uni-grid-item class="menu-grid" style="width: 134rpx; height: 134rpx">
|
||||
<view class="menu-item" @click="navigateTo('/pages/enterprise/enterprise-list')">
|
||||
<image class="item-image" src="/@/static/images/index/ic_home_menu3.png"></image>
|
||||
<image class="item-image" src="@/static/images/index/ic_home_menu3.png"></image>
|
||||
<view class="item-text"> 客户线索 </view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item class="menu-grid">
|
||||
<uni-grid-item class="menu-grid" style="width: 134rpx; height: 134rpx">
|
||||
<view class="menu-item" @click="navigateTo('/pages/goods/goods-index')">
|
||||
<image class="item-image" src="/@/static/images/index/ic_home_menu4.png"></image>
|
||||
<image class="item-image" src="@/static/images/index/ic_home_menu4.png"></image>
|
||||
<view class="item-text"> 品质商品 </view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item class="menu-grid">
|
||||
<uni-grid-item class="menu-grid" style="width: 134rpx; height: 134rpx">
|
||||
<view class="menu-item" @click="navigateTo('/pages/support/change-log/change-log-list')">
|
||||
<image class="item-image" src="/@/static/images/index/ic_home_menu5.png"></image>
|
||||
<image class="item-image" src="@/static/images/index/ic_home_menu5.png"></image>
|
||||
<view class="item-text"> 版本更新 </view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
|
||||
<!--------------------------------- 第二排--------------------------------->
|
||||
<uni-grid-item class="menu-grid">
|
||||
<uni-grid-item class="menu-grid" style="width: 134rpx; height: 134rpx">
|
||||
<view class="menu-item" @click="navigateTo('/pages/form/form')">
|
||||
<image class="item-image" src="/@/static/images/index/ic_home_menu6.png"></image>
|
||||
<image class="item-image" src="@/static/images/index/ic_home_menu6.png"></image>
|
||||
<view class="item-text"> 复杂表单 </view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item class="menu-grid">
|
||||
<uni-grid-item class="menu-grid" style="width: 134rpx; height: 134rpx">
|
||||
<view class="menu-item" @click="navigateTo('/pages/order-detail/order-detail')">
|
||||
<image class="item-image" src="/@/static/images/index/ic_home_menu7.png"></image>
|
||||
<image class="item-image" src="@/static/images/index/ic_home_menu7.png"></image>
|
||||
<view class="item-text"> 复杂详情 </view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item class="menu-grid">
|
||||
<uni-grid-item class="menu-grid" style="width: 134rpx; height: 134rpx">
|
||||
<view class="menu-item" @click="switchTab('/pages/list/list')">
|
||||
<image class="item-image" src="/@/static/images/index/ic_home_menu9.png"></image>
|
||||
<image class="item-image" src="@/static/images/index/ic_home_menu9.png"></image>
|
||||
<view class="item-text"> 列表样式1 </view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
|
||||
<uni-grid-item class="menu-grid">
|
||||
<uni-grid-item class="menu-grid" style="width: 134rpx; height: 134rpx">
|
||||
<view class="menu-item" @click="switchTab('/pages/list2/list')">
|
||||
<image class="item-image" src="/@/static/images/index/ic_home_menu8.png"></image>
|
||||
<image class="item-image" src="@/static/images/index/ic_home_menu8.png"></image>
|
||||
<view class="item-text"> 列表样式2 </view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item class="menu-grid">
|
||||
<uni-grid-item class="menu-grid" style="width: 134rpx; height: 134rpx">
|
||||
<view class="menu-item" @click="developing">
|
||||
<image class="item-image" src="/@/static/images/index/ic_home_menu10.png"></image>
|
||||
<image class="item-image" src="@/static/images/index/ic_home_menu10.png"></image>
|
||||
<view class="item-text"> 接口加密 </view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
@@ -71,7 +71,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { SmartToast } from '/@/lib/smart-support';
|
||||
import { SmartToast } from '@/lib/smart-support';
|
||||
const emit = defineEmits(['changeHome']);
|
||||
|
||||
function changeHome() {
|
||||
@@ -101,7 +101,7 @@
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
//height: 340rpx;
|
||||
height: 340rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 16rpx;
|
||||
width: 700rpx;
|
||||
|
@@ -11,8 +11,8 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { noticeApi } from '/@/api/business/oa/notice-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { noticeApi } from '@/api/business/oa/notice-api';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
|
||||
const queryForm = {
|
||||
|
@@ -4,10 +4,10 @@
|
||||
<template #right>
|
||||
<view class="right">
|
||||
<view class="">
|
||||
<image src="/@/static/images/index/ic_scan.png" mode=""></image>
|
||||
<image src="@/static/images/index/ic_scan.png" mode=""></image>
|
||||
</view>
|
||||
<view class="">
|
||||
<image src="/@/static/images/index/ic_search.png" mode=""></image>
|
||||
<image src="@/static/images/index/ic_search.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@@ -12,8 +12,8 @@
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import checkOutImg from '/@/static/images/login/check-out.png';
|
||||
import checkInImg from '/@/static/images/login/check-in.png';
|
||||
import checkOutImg from '/static/images/login/check-out.png';
|
||||
import checkInImg from '/static/images/login/check-in.png';
|
||||
|
||||
import { ref } from 'vue';
|
||||
|
||||
|
@@ -6,15 +6,15 @@
|
||||
<view class="other-way">
|
||||
<!-- 手机号登录 -->
|
||||
<view v-if="phoneLoginFlag" @click="navigateTo('/pages/login/phone-login')" class="item">
|
||||
<image src="/@/static/images/login/phone-login-icon.png" />
|
||||
<image src="@/static/images/login/phone-login-icon.png" />
|
||||
</view>
|
||||
<!-- 微信登录 -->
|
||||
<view v-if="wxLoginFlag" @click="toWeChatLogin" class="item">
|
||||
<image src="/@/static/images/login/wx-login-icon.png" />
|
||||
<image src="@/static/images/login/wx-login-icon.png" />
|
||||
</view>
|
||||
<!-- 苹果账号登录 -->
|
||||
<view v-if="iosFlag" @click="toAppleLogin" class="item apple">
|
||||
<image src="/@/static/images/login/ios-login-icon.png" />
|
||||
<image src="@/static/images/login/ios-login-icon.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -98,6 +98,8 @@
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.other-way-box {
|
||||
flex-shrink: 0;
|
||||
margin-top: 82rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
@@ -3,12 +3,12 @@
|
||||
<view class="top-view">
|
||||
<view class="login"> 登录 </view>
|
||||
<view class="logo">
|
||||
<image src="/@/static/images/login/login-logo.png" />
|
||||
<image src="@/static/images/login/login-logo.png" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-view">
|
||||
<view class="input-view smart-margin-top10">
|
||||
<image src="/@/static/images/login/login-username.png"></image>
|
||||
<image src="@/static/images/login/login-username.png"></image>
|
||||
<uni-easyinput
|
||||
class="input"
|
||||
placeholder="请输入用户名"
|
||||
@@ -20,7 +20,7 @@
|
||||
</view>
|
||||
|
||||
<view class="input-view smart-margin-top10">
|
||||
<image src="/@/static/images/login/login-password.png"></image>
|
||||
<image src="@/static/images/login/login-password.png"></image>
|
||||
<uni-easyinput
|
||||
class="input"
|
||||
placeholder="请输入密码"
|
||||
@@ -33,16 +33,15 @@
|
||||
</view>
|
||||
|
||||
<view class="input-view smart-margin-top10">
|
||||
<image src="/@/static/images/login/login-password.png"></image>
|
||||
<image src="@/static/images/login/login-password.png"></image>
|
||||
<uni-easyinput
|
||||
class="input"
|
||||
class="input captcha-input"
|
||||
placeholder="请输入验证码"
|
||||
:clearable="true"
|
||||
:password="false"
|
||||
placeholderStyle="color:#CCCCCC"
|
||||
border="none"
|
||||
v-model="loginForm.captchaCode"
|
||||
style="width: 50%"
|
||||
/>
|
||||
<img class="captcha-img" :src="captchaBase64Image" @click="getCaptcha" />
|
||||
</view>
|
||||
@@ -54,7 +53,7 @@
|
||||
|
||||
<view @click="login" class="button login-btn smart-margin-top20"> 登录 </view>
|
||||
<view @click="login" class="button register-btn smart-margin-top20"> 创建账号 </view>
|
||||
<OtherWayBox class="other-way-box" />
|
||||
<OtherWayBox />
|
||||
<LoginCheckBox class="login-check-box" ref="loginCheckBoxRef" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -64,11 +63,11 @@
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import OtherWayBox from './components/other-way-box.vue';
|
||||
import LoginCheckBox from './components/login-check-box.vue';
|
||||
import { loginApi } from '/@/api/system/login-api';
|
||||
import { LOGIN_DEVICE_ENUM } from '/@/constants/system/login-device-const';
|
||||
import { encryptData } from '/@/lib/encrypt';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { loginApi } from '@/api/system/login-api';
|
||||
import { LOGIN_DEVICE_ENUM } from '@/constants/system/login-device-const';
|
||||
import { encryptData } from '@/lib/encrypt';
|
||||
import { useUserStore } from '@/store/modules/system/user';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
|
||||
const loginForm = reactive({
|
||||
loginName: 'admin',
|
||||
@@ -176,6 +175,7 @@
|
||||
.captcha-img {
|
||||
margin-left: 5px;
|
||||
height: 100rpx;
|
||||
width: 40%;
|
||||
}
|
||||
image {
|
||||
margin-left: 30rpx;
|
||||
@@ -186,6 +186,9 @@
|
||||
margin: 0 16rpx;
|
||||
background-color: $page-bg-color;
|
||||
}
|
||||
.captcha-input {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
.code-login-view {
|
||||
margin: 50rpx 0 0;
|
||||
@@ -273,7 +276,7 @@
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 720rpx;
|
||||
background-image: url(/@/static/images/login/login-top-back.png);
|
||||
background-image: url('~@/static/images/login/login-top-back.png');
|
||||
.login {
|
||||
font-weight: bold;
|
||||
margin-top: 70rpx;
|
||||
@@ -285,11 +288,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.other-way-box {
|
||||
flex-shrink: 0;
|
||||
margin-top: 82rpx;
|
||||
}
|
||||
|
||||
.login-check-box {
|
||||
flex-shrink: 0;
|
||||
margin-top: 150rpx;
|
||||
|
@@ -66,7 +66,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { SmartToast } from '/@/lib/smart-support';
|
||||
import { SmartToast } from '@/lib/smart-support';
|
||||
|
||||
const emits = defineEmits(['changeStyle']);
|
||||
|
||||
|
@@ -13,12 +13,12 @@
|
||||
<view class="user-phone">{{ departmentName }}</view>
|
||||
</view>
|
||||
<view class="vip-flag">
|
||||
<image src="/@/static/images/mine/no-vip-flag.png" mode=""></image>
|
||||
<image src="@/static/images/mine/no-vip-flag.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { useUserStore } from '@/store/modules/system/user';
|
||||
import { computed } from 'vue';
|
||||
|
||||
const actualName = computed(() => {
|
||||
|
@@ -29,7 +29,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { useUserStore } from '@/store/modules/system/user';
|
||||
import { computed } from 'vue';
|
||||
|
||||
const actualName = computed(() => {
|
||||
@@ -107,7 +107,7 @@
|
||||
}
|
||||
|
||||
.vip-card {
|
||||
background-image: url('/@/static/images/mine/vip-bg.png');
|
||||
background-image: url('~@/static/images/mine/vip-bg.png');
|
||||
height: 80rpx;
|
||||
background-repeat: no-repeat;
|
||||
width: 700rpx;
|
||||
|
@@ -18,9 +18,9 @@
|
||||
import MineUserBlue from './components/mine-user-blue.vue';
|
||||
import MineUserWhite from './components/mine-user-white.vue';
|
||||
import { ref } from 'vue';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import { SmartLoading, SmartToast } from '/@/lib/smart-support';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { useUserStore } from '@/store/modules/system/user';
|
||||
import { SmartLoading, SmartToast } from '@/lib/smart-support';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const blueUserFlag = ref(true);
|
||||
|
@@ -37,7 +37,7 @@
|
||||
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref, toRaw } from 'vue';
|
||||
import { noticeApi } from '/@/api/business/oa/notice-api';
|
||||
import { noticeApi } from '@/api/business/oa/notice-api';
|
||||
import _ from 'lodash';
|
||||
|
||||
const emits = defineEmits(['close']);
|
||||
|
@@ -19,9 +19,9 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import { noticeApi } from '/@/api/business/oa/notice-api';
|
||||
import { noticeApi } from '@/api/business/oa/notice-api';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
|
||||
const noticeDetail = reactive({
|
||||
title: '',
|
||||
|
@@ -46,10 +46,10 @@
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import NoticeQueryFormPopUp from './components/notice-query-form-popup.vue';
|
||||
import { noticeApi } from '/@/api/business/oa/notice-api';
|
||||
import { noticeApi } from '@/api/business/oa/notice-api';
|
||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app';
|
||||
import useMescroll from '@/uni_modules/uni-mescroll/hooks/useMescroll';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
import NoticeList from './components/notice-list.vue';
|
||||
import _ from 'lodash';
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import SmartDetailTabs from '/@/components/smart-detail-tabs/index.vue';
|
||||
import SmartDetailTabs from '@/components/smart-detail-tabs/index.vue';
|
||||
import OrderDetailBaseInfo from './components/order-detail-base-info.vue';
|
||||
import DetailModelPath from './components/detail-model-path.vue';
|
||||
import OrderDetailSettle from './components/order-detail-settle.vue';
|
||||
|
@@ -12,9 +12,9 @@
|
||||
|
||||
<script setup>
|
||||
import { inject, reactive } from 'vue';
|
||||
import { changeLogApi } from '/@/api/support/change-log-api';
|
||||
import { changeLogApi } from '@/api/support/change-log-api';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
|
||||
const smartEnumPlugin = inject('smartEnumPlugin');
|
||||
|
||||
|
@@ -44,10 +44,10 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { changeLogApi } from '/@/api/support/change-log-api';
|
||||
import { changeLogApi } from '@/api/support/change-log-api';
|
||||
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app';
|
||||
import useMescroll from '@/uni_modules/uni-mescroll/hooks/useMescroll';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
import _ from 'lodash';
|
||||
|
||||
// --------------------------- 查询 ---------------------------------
|
||||
|
@@ -31,14 +31,14 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { enterpriseApi } from '/@/api/business/oa/enterprise-api';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { SmartLoading, SmartToast } from '/@/lib/smart-support';
|
||||
import { enterpriseApi } from '@/api/business/oa/enterprise-api';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
import { SmartLoading, SmartToast } from '@/lib/smart-support';
|
||||
import { onLoad, onReady } from '@dcloudio/uni-app';
|
||||
import { fileApi } from '/@/api/support/file-api';
|
||||
import { FILE_FOLDER_TYPE_ENUM } from '/@/constants/support/file-const';
|
||||
import { fileApi } from '@/api/support/file-api';
|
||||
import { FILE_FOLDER_TYPE_ENUM } from '@/constants/support/file-const';
|
||||
import _ from 'lodash';
|
||||
import { feedbackApi } from '/@/api/support/feedback-api';
|
||||
import { feedbackApi } from '@/api/support/feedback-api';
|
||||
|
||||
// --------------------- 表单 ---------------------
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import _ from 'lodash';
|
||||
import { FLAG_NUMBER_ENUM } from '/@/constants/common-const';
|
||||
import { FLAG_NUMBER_ENUM } from '@/constants/common-const';
|
||||
|
||||
export default {
|
||||
install: (app, smartEnumWrapper) => {
|
||||
|
@@ -8,10 +8,10 @@
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
*/
|
||||
import { defineStore } from 'pinia';
|
||||
import { appDefaultConfig } from '/@/config/app-config';
|
||||
import localStorageKeyConst from '/@/constants/local-storage-key-const';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { localRead } from '/@/utils/local-util';
|
||||
import { appDefaultConfig } from '@/config/app-config';
|
||||
import localStorageKeyConst from '@/constants/local-storage-key-const';
|
||||
import { smartSentry } from '@/lib/smart-sentry';
|
||||
import { localRead } from '@/utils/local-util';
|
||||
|
||||
let state = { ...appDefaultConfig };
|
||||
|
||||
|
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
import _ from 'lodash';
|
||||
import { defineStore } from 'pinia';
|
||||
import { USER_TOKEN } from '/@/constants/local-storage-key-const';
|
||||
import { loginApi } from '/@/api/system/login-api';
|
||||
import { USER_TOKEN } from '@/constants/local-storage-key-const';
|
||||
import { loginApi } from '@/api/system/login-api';
|
||||
|
||||
const defaultUserInfo = {
|
||||
//员工id
|
||||
|
Reference in New Issue
Block a user