Compare commits

...

23 Commits

Author SHA1 Message Date
af3442f276 保存进度! 2025-10-31 19:08:12 +08:00
390a5efbb8 编写上传界面 2025-10-30 18:19:51 +08:00
72a4895328 保存进度! 2025-10-30 16:02:54 +08:00
ef3b31c9e4 编写制度管理。 2025-10-28 23:51:14 +08:00
a11c6ada3d 编写制度文件管理view 2025-10-24 18:07:49 +08:00
ad3320779c 保存进度! 2025-10-24 11:45:27 +08:00
96efb0cf53 保存进度! 2025-10-24 11:45:10 +08:00
44f26dd330 保存进度 2025-10-24 00:36:24 +08:00
7ea8e7ab4d 编写路由代码。 2025-10-23 17:52:01 +08:00
fd4275c3a5 保存进度! 2025-10-22 18:17:36 +08:00
51f96ed6c1 保存进度! 2025-10-17 18:16:51 +08:00
8cc2f8759d 保存进度! 2025-10-16 18:16:46 +08:00
4a79a080c5 更新 README.md 2025-10-16 07:44:55 +00:00
9699e39ecf 保存进度! 2025-10-16 15:43:26 +08:00
c22779bd6a 保存进度! 2025-10-16 15:42:00 +08:00
07bf0e3450 保存进度! 2025-10-16 15:41:29 +08:00
bb25a5db61 保存进度! 2025-10-16 15:40:25 +08:00
74c4389c9f 完成后端上传文件的代码。 2025-10-16 15:20:11 +08:00
2eaedf52fe 编写后端接收上传文件代码。 2025-10-16 11:14:32 +08:00
6cae285034 加入后端代码。 2025-10-15 11:42:56 +08:00
5a3a854160 保存进度! 2025-10-14 17:35:21 +08:00
ca17efb5fa 保存进度! 2025-10-14 16:04:42 +08:00
364753a64d 保存进度! 2025-10-13 19:32:20 +08:00
81 changed files with 4545 additions and 211 deletions

0
7788.md Normal file
View File

View File

@@ -1,3 +1,9 @@
# regulatory-management-system <h1 style="text-align:center; font-size:2rem;" title>产险厦门分公司规章制度管理工具</h1>
# 概述
产险厦门分公司规章制度管理工具。 产险厦门分公司规章制度管理工具。
# 密码
## mysql
root@localhost ^QaKwfmo#HNy&0D7

View File

@@ -0,0 +1,25 @@
# top-most EditorConfig file
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.js]
indent_size = 4
[*.ts]
indent_size = 4
[*.py]
indent_size = 4
[*.java]
indent_size = 4
[*.xml]
indent_size = 2

View File

@@ -0,0 +1,78 @@
/**
* This file is generated by VSCode extension: Fileheader Pro
*/
/**
* These comments can help you write your own template with type hint
* @typedef {Object} FileheaderVariable Fileheader variables
* @property {string} birthtime file birth time. will get it from VCS or fallback to filesystem when it is not available
* @property {string} mtime file modification time. will get it from VCS or fallback to filesystem when it is not available
* @property {string} authorName if the file is tracked by VCS, it will get the author name from VCS. else it will get it from current user name
* @property {string} authorEmail if the file is tracked by VCS, it will get the author email from VCS. else it will get it from current user email
* @property {string} userName else it will get it from current user name
* @property {string} userEmail user email is from VSCode config, and fallback to VCS config
* @property {string} companyName
* @property {string} projectName name of current project
* @property {string} filePath the file path, relative to project root with POSIX path separator
* @property {string} dirPath the directory path, relative to project root with POSIX path separator
* @property {string} fileName filename with extension
*/
/**
* @typedef {string | number | null | undefined | Template | boolean} TemplateInterpolation NOTE: boolean or falsy value will render empty string
*
* @typedef {{ strings: TemplateStringsArray; interpolations: TemplateInterpolation[]; }} Template
* @typedef {(strings: TemplateStringsArray, ...values: any[]) => string} ITemplateFunction
*
*/
/**
* Please confirm your provider extends from globalThis.FileheaderLanguageProvider
*/
class CustomLanguageProvider extends globalThis.FileheaderLanguageProvider {
/**
* @type {string[]}
*/
languages = [
"java",
"javascript",
"typescript",
"javascriptreact",
"typescriptreact",
];
/**
* @type {string=} the language block comment start string.
* this is for future feature: support detect old custom template when custom template changes
*/
blockCommentStart = "/**";
/**
* @type {string=}
*/
blockCommentEnd = "*/";
/**
* get your template when document language matched
* @param {ITemplateFunction} tpl template function, it is a tagged function, support nested interpolation
* @param {FileheaderVariable} variables template variables
* @returns {Template}
*/
getTemplate(tpl, variables) {
// prettier-ignore
return tpl
`/**
* @Author: ${variables.authorName} <${variables.authorEmail}>
* @Date: ${variables.birthtime}
* @LastEditors: ${variables.userName}
* @LastModified: ${variables.mtime}
* @FilePath: ${variables.filePath}
* @Description:
*
* Copyright (c) ${2025} by Kane All rights reserved
*/`;
}
}
// export your provider classes
module.exports = [CustomLanguageProvider];

View File

@@ -0,0 +1,4 @@
{
"java.configuration.updateBuildConfiguration": "interactive",
"java.compile.nullAnalysis.mode": "automatic"
}

View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cpic.xim</groupId>
<artifactId>RegulatoryManagementBackend</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>RegulatoryManagementBackend Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>18</maven.compiler.source>
<maven.compiler.target>18</maven.compiler.target>
<spring.version>6.2.11</spring.version>
<log4j.version>2.24.3</log4j.version>
<jackson.version>2.18.3</jackson.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<!-- springmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.1.0</version>
<scope>provided</scope>
</dependency>
<!-- log4j -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<!-- jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>9.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-fileupload2-jakarta-servlet6</artifactId>
<version>2.0.0-M2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.18.0</version>
</dependency>
</dependencies>
<build>
<finalName>RegulatoryManagementBackend</finalName>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be
moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<!-- see
http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@@ -0,0 +1,95 @@
/*
* @Author: Kane
*
* @Date: 2023-04-05 22:34:36
*
* @LastEditors: Kane
*
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/QueryResponse.java
*
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
package com.cpic.xim.web.controllers;
import com.fasterxml.jackson.annotation.JsonProperty;
public class QueryResponse
{
@JsonProperty( "success" )
private boolean success;
@JsonProperty( "message" )
private String message;
public QueryResponse( boolean success, String message )
{
this.success = success;
this.message = message;
}
public QueryResponse()
{
this.success = false;
this.message = "";
}
public boolean isSuccess()
{
return success;
}
public void setSuccess( boolean success )
{
this.success = success;
}
public String getMessage()
{
return message;
}
public void setMessage( String message )
{
this.message = message;
}
@Override
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + (success ? 1231 : 1237);
result = prime * result + ((message == null) ? 0 : message.hashCode());
return result;
}
@Override
public boolean equals( Object obj )
{
if ( this == obj )
return true;
if ( obj == null )
return false;
if ( getClass() != obj.getClass() )
return false;
QueryResponse other = ( QueryResponse ) obj;
if ( success != other.success )
return false;
if ( message == null )
{
if ( other.message != null )
return false;
}
else if ( !message.equals( other.message ) )
return false;
return true;
}
@Override
public String toString()
{
return "QueryResult [success=" + success + ", message=" + message + "]";
}
}

View File

@@ -0,0 +1,155 @@
/**
* @Author: Kane Wang <wangkane@qq.com>
* @Date: 2025-10-15 11:42:56
* @LastEditors: Kane Wang
* @LastModified: 2025-10-15 17:48:52
* @FilePath: src/main/java/com/cpic/xim/web/controllers/fileupload/FileUpload.java
* @Description: 用于接受上传文件的Controller。
*
* Copyright (c) 2025 by Kane All rights reserved
*/
package com.cpic.xim.web.controllers.fileupload;
import java.io.File;
import java.io.IOException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.Vector;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
// @SuppressWarnings( "unused" )
@Controller
@RequestMapping( path = "/file" )
public class FileUpload
{
/**
* 接收上传文件,并保存到临时目录:
* 1、临时目录下再用sessionID作为子目录保存文件。
* 2、保存时不更改文件名会覆盖同名文件。
* 3、MultipartFile参数形参名称必须和请求form中file标签的name属性一致否则值为null。
* 4、返回值为接收结果和文件保存绝对路径。
*
* @deprecated
* @param taskName 任务名称字符串
* @param files MultipartFile结构的文件对象
* @param request HttpServletRequest对象实例
* @return 返回一个FileUploadResult对象包含上传结果。
*/
// @RequestMapping( path = "/file-upload.do" )
// @ResponseBody
// public FileUploadResult getUploadFile(
// @RequestParam( "task-name" ) String taskName,
// @RequestParam( "files" ) MultipartFile file,
// HttpServletRequest request
// )
// {
// // session id用来创建临时目录避免重复
// String sessionID = request.getSession().getId();
// FileUploadResult result = new FileUploadResult();
// Vector<String> fileNames = new Vector<String>();
// result.setSuccess( true );
// result.setMessage( "上传成功!" );
// String filePath = request.getServletContext().getRealPath( "/temp/upload/" + sessionID );
// File dir = new File( filePath );
// if ( !dir.mkdirs() )
// {
// }
// // 检查文件长度如果为0则跳过
// if ( file.isEmpty() )
// {
// result.setSuccess( false );
// result.setMessage( "不允许上传空文件。" );
// }
// else
// {
// // 保存文件到临时目录
// Long milliSecond = LocalDateTime.now().toInstant( ZoneOffset.of( "+8" ) ).toEpochMilli();
// String fileName = String.valueOf( milliSecond ) + file.getOriginalFilename();
// File destFile = new File( filePath, fileName );
// // String fileName = file.getOriginalFilename();
// try
// {
// file.transferTo( destFile );
// // 把上传文件的绝对路径保存,返回给前端
// fileNames.add( destFile.getAbsolutePath() );
// result.setSuccess( true );
// result.setMessage( "上传成功" );
// result.setFileList( fileNames );
// }
// catch ( IOException error )
// {
// result.setSuccess( false );
// result.setMessage( "上传失败,原因:" + error.getMessage() );
// }
// }
// return result;
// }
/**
* 接收上传文件,并保存到临时目录:
* 1、临时目录下再用sessionID作为子目录保存文件。
* 2、保存时不更改文件名会覆盖同名文件。
* 3、MultipartFile参数形参名称必须和请求form中file标签的name属性一致否则值为null。
* 4、返回值为接收结果和文件保存绝对路径。
* @param fileName
* @param file
* @param request
* @return
*/
@RequestMapping( path = "/file-upload.do" )
@ResponseBody
public FileUploadResult saveUploadFile(
@RequestParam( "file-name" ) String fileName,
@RequestParam( "files" ) MultipartFile file,
HttpServletRequest request
)
{
// session id用来创建临时目录避免重复
String sessionID = request.getSession().getId();
FileUploadResult result = new FileUploadResult();
MultipartFile[] files = new MultipartFile[1];
result.setSuccess( true );
result.setMessage( "上传成功!" );
String filePath = request.getServletContext().getRealPath( "/temp/upload/" + sessionID );
File dir = new File( filePath );
// 创建临时目录
if ( (!dir.exists()) && (!dir.mkdirs()) )
{
result.setSuccess( false );
result.setMessage( "创建临时目录失败:" + filePath );
return result;
}
try
{
files[0] = file;
SaveUploadFile.saveUploadFile( files, filePath );
}
catch ( ProcessUploadedFileException error )
{
result.setSuccess( false );
result.setMessage( error.getMessage() );
}
return result;
}
}

View File

@@ -0,0 +1,62 @@
/*
* @Author: Kane
*
* @Date: 2023-01-23 22:56:17
*
* @LastEditors: Kane
*
* @LastEditTime: 2023-10-06 00:32:47
*
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/FileUpload/FileUploadResult.java
*
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
package com.cpic.xim.web.controllers.fileupload;
import java.util.Vector;
import com.cpic.xim.web.controllers.QueryResponse;
import com.fasterxml.jackson.annotation.JsonProperty;
@SuppressWarnings( "unused" )
public class FileUploadResult extends QueryResponse
{
public FileUploadResult()
{
super();
}
/**
* 构造函数
*
* @param success 是否上传成功
* @param message 消息字符串
* @param fileList 文件绝对路径字符串数组
*/
public FileUploadResult(
boolean success,
String message,
Vector<UploadedFile> fileList
)
{
super( success, message );
this.fileList = fileList;
}
public Vector<UploadedFile> getFileList()
{
return fileList;
}
public void setFileList( Vector<UploadedFile> fileList )
{
this.fileList = fileList;
}
@JsonProperty( "fileList" )
private Vector<UploadedFile> fileList;
}

View File

@@ -0,0 +1,26 @@
/**
* @Author: Kane Wang <wangkane@qq.com>
* @Date: 2025-10-15 12:06:26
* @LastEditors: Kane Wang
* @LastModified: 2025-10-16 09:59:39
* @FilePath: src/main/java/com/cpic/xim/web/controllers/fileupload/ProcessUploadedFileException.java
* @Description:
*
* Copyright (c) 2025 by Kane All rights reserved
*/
package com.cpic.xim.web.controllers.fileupload;
import java.io.IOException;
public class ProcessUploadedFileException extends IOException
{
ProcessUploadedFileException()
{
super("上传文件失败!");
}
ProcessUploadedFileException( String message )
{
super(message);
}
}

View File

@@ -0,0 +1,71 @@
/**
* @Author: Kane Wang <wangkane@qq.com>
* @Date: 2025-10-16 09:46:42
* @LastEditors: Kane Wang
* @LastModified: 2025-10-16 15:16:57
* @FilePath: src/main/java/com/cpic/xim/web/controllers/fileupload/SaveUploadFile.java
* @Description:
*
* Copyright (c) 2025 by Kane All rights reserved
*/
package com.cpic.xim.web.controllers.fileupload;
import java.io.File;
import java.io.IOException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.HashMap;
import org.springframework.web.multipart.MultipartFile;
public class SaveUploadFile
{
public static HashMap<String, String> saveUploadFile(
MultipartFile[] files,
String tempFilePath
)
throws ProcessUploadedFileException
{
HashMap<String, String> savedFiles = new HashMap<>();
// File dir = new File( tempFilePath );
String fileName = "";
String fullPath;
if ( !(tempFilePath.endsWith( "/" ) || tempFilePath.endsWith( "\\" )) )
{
fullPath = tempFilePath + "/";
}
else
{
fullPath = tempFilePath;
}
try
{
for ( MultipartFile file : files )
{
// 空文件跳过
if ( file.isEmpty() )
{
continue;
}
// 文件名前加上时间戳,避免覆盖
Long milliSecond = LocalDateTime.now().toInstant( ZoneOffset.of( "+8" ) ).toEpochMilli();
fileName = String.valueOf( milliSecond ) + " - " + file.getOriginalFilename();
File destFile = new File( tempFilePath, fileName );
file.transferTo( destFile );
savedFiles.put( fileName, fullPath + fileName );
}
}
catch ( IOException error )
{
throw new ProcessUploadedFileException( "临时目录" + tempFilePath + "保存文件" + fileName + "失败!" );
}
return savedFiles;
}
}

View File

@@ -0,0 +1,44 @@
/**
* @Author: Kane Wang <wangkane@qq.com>
* @Date: 2025-10-31 17:33:13
* @LastEditors: Kane Wang
* @LastModified: 2025-10-31 17:36:03
* @FilePath: src/main/java/com/cpic/xim/web/controllers/fileupload/UploadedFile.java
* @Description:
*
* Copyright (c) 2025 by Kane All rights reserved
*/
package com.cpic.xim.web.controllers.fileupload;
public class UploadedFile
{
private String fileName;
private String localFilePath;
public String getFileName()
{
return fileName;
}
public void setFileName( String fileName )
{
this.fileName = fileName;
}
public String getLocalFilePath()
{
return localFilePath;
}
public void setLocalFilePath( String localFilePath )
{
this.localFilePath = localFilePath;
}
public UploadedFile( String fileName, String localFilePath )
{
this.fileName = fileName;
this.localFilePath = localFilePath;
}
}

View File

@@ -0,0 +1,71 @@
/**
* @Author: Kane Wang <wangkane@qq.com>
* @Date: 2025-03-15 18:40:54
* @LastEditors: Kane Wang
* @LastModified: 2025-03-16 08:56:20
* @FilePath: src/main/java/com/cpic/xim/web/filters/cros/CrosFilter.java
* @Description:
*
* Copyright (c) 2025 by Kane All rights reserved
*/
package com.cpic.xim.web.filters.cros;
import java.io.IOException;
import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpMethod;
public class CrosFilter implements Filter
{
private static Logger logger = LoggerFactory.getLogger( CrosFilter.class );
/**
*
* @param req
* @param resp
* @param chain
* @throws ServletException
* @throws IOException
*/
@Override
public void doFilter(
ServletRequest req,
ServletResponse resp,
FilterChain chain
)
throws ServletException,
IOException
{
HttpServletRequest request = ( HttpServletRequest ) req;
HttpServletResponse response = ( HttpServletResponse ) resp;
String method = request.getMethod();
String originHeader = request.getHeader( "Origin" );
logger.info( "收到" + method + "请求,来自" + originHeader );
// 如果是Options请求
if ( method.equals( HttpMethod.OPTIONS.toString() ) )
{
originHeader = "*";
}
response.setHeader( "Access-Control-Allow-Origin", originHeader );
response.setHeader( "Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE, PUT" );
response.setHeader( "Access-Control-Max-Age", "0" );
response.setHeader( "Access-Control-Allow-Headers",
"Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token" );
response.setHeader( "Access-Control-Allow-Credentials", "true" );
response.setHeader( "XDomainRequestAllowed", "1" );
response.setHeader( "XDomainRequestAllowed", "1" );
chain.doFilter( request, response );
}
}

View File

@@ -0,0 +1,40 @@
<Configuration status="WARN" monitorInterval="300">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} ### %msg%n" />
<ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY" />
</Console>
<RollingFile name="rolling_file_win"
filePattern="./logs/制度管理/$${date:yyyy-MM}/huixiabao-%d{MM-dd-yyyy}-%i.log.gz">
<PatternLayout>
<Pattern>[%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n</Pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy interval="1" />
<SizeBasedTriggeringPolicy size="20MB" />
<DefaultRolloverStrategy max="20" />
</Policies>
</RollingFile>
<RollingFile name="rolling_file_linux"
filePattern="/logs/制度管理/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
<PatternLayout>
<Pattern>[%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n</Pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy interval="1" />
<SizeBasedTriggeringPolicy size="20MB" />
<DefaultRolloverStrategy max="20" />
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<!-- <Logger name="mylog" level="info">
<AppenderRef ref="rolling_file" />
</Logger> -->
<Root level="debug">
<AppenderRef ref="rolling_file_linux" />
<AppenderRef ref="rolling_file_win" />
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration>

View File

@@ -0,0 +1,4 @@
jdbc.oracle.driver=oracle.jdbc.driver.OracleDriver
jdbc.oracle.xmcx1.url=jdbc:oracle:thin:@10.39.0.86:1521:xmcx1
jdbc.oracle.xmcx1.username=desktop_archievement_admin
jdbc.oracle.xmcx1.password=Cpic123456

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cpic.xim.mybatis.mapper.ArchievementMapper">
<select id="getDepartmentArchievement" useCache="false" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap">
call telsale_archievement_pkg.department_archievement(
#{a_department_code, mode=IN, jdbcType=VARCHAR},
#{a_attaching_rate, mode=OUT, jdbcType=VARCHAR},
#{a_attaching_rate_target, mode=OUT, jdbcType=VARCHAR},
#{a_renewal_rate, mode=OUT, jdbcType=VARCHAR},
#{a_renewal_rate_target, mode=OUT, jdbcType=VARCHAR},
#{a_total, mode=OUT, jdbcType=INTEGER, javaType=Integer},
#{a_mensual_cur, mode=OUT, jdbcType=CURSOR, resultMap=MensualArchievementMapper})
</select>
<select id="getCallerArchievement" useCache="false" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap">
call telsale_archievement_pkg.caller_archievement(
#{a_caller_code, mode=IN, jdbcType=VARCHAR},
#{a_attaching_rate, mode=OUT, jdbcType=VARCHAR},
#{a_renewal_rate, mode=OUT, jdbcType=VARCHAR},
#{a_total, mode=OUT, jdbcType=INTEGER, javaType=Integer},
#{a_present_month, mode=OUT, jdbcType=DOUBLE, javaType=Double},
#{a_mensual_cur, mode=OUT, jdbcType=CURSOR, resultMap=MensualArchievementMapper})
</select>
<resultMap id="MensualArchievementMapper" type="MensualArchievementItem">
<id property="month" column="mm" javaType="INT"/>
<result property="premium" column="bf" />
</resultMap>
</mapper>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cpic.xim.mybatis.mapper.ImportBIArchievementDataMapper">
<insert id="insertTelsalerAttachingRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord">
insert into BI电销坐席车非渗透率跟踪表 ( "部门","经办","车险保费(万)","车险保费占比","非车保费(万)",
"当月保费渗透率","保费渗透率环比上月","当月客户渗透率","客户渗透率环比上月",
"当月车非客均保费","客均保费环比上月" )
values ( #{departmentName}, #{telsalerName}, #{motoPremium}, #{motoPremiumProportion}, #{nomotoPremium},
#{attachingRate}, #{attachingRateChange}, #{customerHandleRate},
#{customerHandleRateChange}, #{noMotoPremiumPerCustomer}, #{noMotoPremiumPerCustomerChange} )
</insert>
<insert id="insertTelsalerRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord">
insert into "BI电销坐席续保率跟踪表-24年" ("责任部门","责任人","机构目标值1(%)","到期数-全月",
"序时到期数占比(%)","个车续保率(序时)(%)","个车续保率(全月)(%)",
"环比昨日(%)","环比上月(%)")
values (#{责任部门},#{责任人},#{机构目标值},#{到期数全月},#{序时到期数占比},
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月} )
</insert>
<insert id="insertDepartmentAttachingRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord">
insert into BI机构渗透率跟踪表 ( 部门,"目标值-机构",目标差距,"车险保费",
车险保费占比,"非车保费",当月保费渗透率,保费渗透率环比上月,当月客户渗透率,
客户渗透率环比上月,当月车非客均保费,客均保费环比上月,车险客户数)
values (#{departmentName},#{departmentObject},#{objectGap},#{motoPremium},
#{motoPremiumProPortion},#{nomotoPremium},#{attachingRate},#{attachingRateChange},
#{customerHandleRate},#{customerHandleRateChange},#{premiumPerCustomer},#{premiumPerCustomerChange},
#{motoInsuranceCustomerCount} )
</insert>
<insert id="insertDepartmentRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord" >
insert into "BI机构续保率跟踪表-24年"( "责任部门","机构目标值1(%)","到期数-全月" ,"序时到期数占比(%)","个车续保率(序时)(%)",
"个车续保率(全月)(%)","环比昨日(%)","环比上月(%)")
values (#{责任部门},#{机构目标值},#{到期数全月},#{序时到期数占比},
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月} )
</insert>
<select id="cleanTelsalerAttachingRateData" statementType="CALLABLE">
call TELSALE_BI_UTILS.清理BI电销坐席车非渗透率跟踪表()
</select>
<select id="cleanTelsalerRenewalRateData" statementType="CALLABLE">
call TELSALE_BI_UTILS.清理BI电销坐席续保率跟踪表()
</select>
<select id="cleanDepartmentAttachingRateData" statementType="CALLABLE">
call TELSALE_BI_UTILS.清理BI部门渗透率跟踪表()
</select>
<select id="cleanDepartmentRenewalRateData" statementType="CALLABLE">
call TELSALE_BI_UTILS.清理BI部门续保率跟踪表()
</select>
</mapper>

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cpic.xim.mybatis.mapper.QueryBIArchievementDataMapper">
<!-- 查询坐席车非渗透率报表 -->
<select id="queryBITelsalerAttachingRate" statementType="STATEMENT" resultMap="BITelsalerAttachingRate" useCache="false" flushCache="true">
SELECT t.部门,
t.经办,
t."车险保费(万)" as 车险保费,
t.车险保费占比,
t."非车保费(万)" as 非车保费,
t.当月保费渗透率,
t.保费渗透率环比上月,
t.当月客户渗透率,
t.客户渗透率环比上月,
t.当月车非客均保费,
t.客均保费环比上月
FROM BI电销坐席车非渗透率跟踪表 t
ORDER BY t.部门
</select>
<!-- 坐席车非渗透率报表记录 -->
<resultMap id="BITelsalerAttachingRate" type="com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord">
<result property="departmentName" column="部门" javaType="String" jdbcType="VARCHAR" />
<result property="telsalerName" column="经办" javaType="String" jdbcType="VARCHAR" />
<result property="motoPremium" column="车险保费" javaType="double" jdbcType="DOUBLE" />
<result property="motoPremiumProportion" column="车险保费占比" javaType="double" jdbcType="DOUBLE" />
<result property="nomotoPremium" column="非车保费" javaType="double" jdbcType="DOUBLE" />
<result property="attachingRate" column="当月保费渗透率" javaType="double" jdbcType="DOUBLE" />
<result property="attachingRateChange" column="保费渗透率环比上月" javaType="double" jdbcType="DOUBLE" />
<result property="customerHandleRate" column="当月客户渗透率" javaType="double" jdbcType="DOUBLE" />
<result property="customerHandleRateChange" column="客户渗透率环比上月" javaType="double" jdbcType="DOUBLE" />
<result property="noMotoPremiumPerCustomer" column="当月车非客均保费" javaType="double" jdbcType="DOUBLE" />
<result property="noMotoPremiumPerCustomerChange" column="客均保费环比上月" javaType="double" jdbcType="DOUBLE" />
</resultMap>
<!-- 坐席续保率 -->
<select id="queryBITesalerRenewalRate" statementType="STATEMENT" resultMap="BITelsalerRenewalRate" useCache="false" flushCache="true">
select t.责任部门,
t.责任人,
t."机构目标值1(%)" as 机构目标值,
t."到期数-全月" as 到期数全月,
t."序时到期数占比(%)" as 序时到期数占比,
t."个车续保率(序时)(%)" as 个车续保率序时,
t."个车续保率(全月)(%)" as 个车续保率全月,
t."环比昨日(%)" as 环比昨日,
t."环比上月(%)" as 环比上月
from "BI电销坐席续保率跟踪表-24年" t
</select>
<resultMap id="BITelsalerRenewalRate" type="com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord">
<result property="责任部门" column="责任部门" javaType="String" jdbcType="VARCHAR" />
<result property="责任人" column="责任人" javaType="String" jdbcType="VARCHAR" />
<result property="机构目标值" column="机构目标值" javaType="double" jdbcType="DOUBLE" />
<result property="到期数全月" column="到期数全月" javaType="double" jdbcType="DOUBLE" />
<result property="序时到期数占比" column="序时到期数占比" javaType="double" jdbcType="DOUBLE" />
<result property="个车续保率序时" column="个车续保率序时" javaType="double" jdbcType="DOUBLE" />
<result property="个车续保率全月" column="个车续保率全月" javaType="double" jdbcType="DOUBLE" />
<result property="环比昨日" column="环比昨日" javaType="double" jdbcType="DOUBLE" />
<result property="环比上月" column="环比上月" javaType="double" jdbcType="DOUBLE" />
<!-- <result property="平均提前签单天数" column="平均提前签单天数" javaType="int" jdbcType="DOUBLE" /> -->
<!-- <result property="环比" column="环比" javaType="int" jdbcType="DOUBLE" /> -->
</resultMap>
<!-- 机构渗透率 -->
<select id="queryBIDepartmentAttachingRate" statementType="STATEMENT" resultMap="BIDepartmentAttachingRate" useCache="false" flushCache="true">
select t.部门,
t."目标值-机构" as 目标值机构,
t.目标差距,
t.车险保费,
t.车险保费占比,
t.非车保费,
t.当月保费渗透率,
t.保费渗透率环比上月,
t.当月客户渗透率,
t.客户渗透率环比上月,
t.当月车非客均保费,
t.客均保费环比上月,
t.车险客户数
from BI机构渗透率跟踪表 t
</select>
<resultMap id="BIDepartmentAttachingRate" type="com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord">
<result column="部门" property="departmentName" jdbcType="VARCHAR" javaType="String" />
<result column="目标值机构" property="departmentObject" jdbcType="DOUBLE" javaType="double" />
<result column="目标差距" property="objectGap" jdbcType="DOUBLE" javaType="double" />
<result column="车险保费" property="motoPremium" jdbcType="DOUBLE" javaType="double" />
<result column="车险保费占比" property="motoPremiumProPortion" jdbcType="DOUBLE" javaType="double" />
<result column="非车保费" property="nomotoPremium" jdbcType="DOUBLE" javaType="double" />
<result column="当月保费渗透率" property="attachingRate" jdbcType="DOUBLE" javaType="double" />
<result column="保费渗透率环比上月" property="attachingRateChange" jdbcType="DOUBLE" javaType="double" />
<result column="当月客户渗透率" property="customerHandleRate" jdbcType="DOUBLE" javaType="double" />
<result column="客户渗透率环比上月" property="customerHandleRateChange" jdbcType="DOUBLE" javaType="double" />
<result column="当月车非客均保费" property="premiumPerCustomer" jdbcType="DOUBLE" javaType="double" />
<result column="客均保费环比上月" property="premiumPerCustomerChange" jdbcType="DOUBLE" javaType="double" />
<result column="车险客户数" property="motoInsuranceCustomerCount" jdbcType="INTEGER" javaType="int" />
</resultMap>
<!-- 机构续保率 -->
<select id="queryBIDepartmentRenewalRate" statementType="STATEMENT" resultMap="BIDepartmentRenewalRate" useCache="false" flushCache="true">
select t.责任部门,
t."机构目标值1(%)" as 机构目标值,
t."到期数-全月" as 到期数全月,
t."序时到期数占比(%)" as 序时到期数占比,
t."个车续保率(序时)(%)" as 个车续保率序时,
t."个车续保率(全月)(%)" as 个车续保率全月,
t."环比昨日(%)" as 环比昨日,
t."环比上月(%)" as 环比上月
from "BI机构续保率跟踪表-24年" t
</select>
<resultMap id="BIDepartmentRenewalRate" type="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord">
<result column="责任部门" property="责任部门" jdbcType="VARCHAR" javaType="String" />
<result column="机构目标值" property="机构目标值" jdbcType="DOUBLE" javaType="double" />
<result column="到期数全月" property="到期数全月" jdbcType="INTEGER" javaType="int" />
<result column="序时到期数占比" property="序时到期数占比" jdbcType="DOUBLE" javaType="double" />
<result column="个车续保率序时" property="个车续保率序时" jdbcType="DOUBLE" javaType="double" />
<result column="个车续保率全月" property="个车续保率全月" jdbcType="DOUBLE" javaType="double" />
<result column="环比昨日" property="环比昨日" jdbcType="DOUBLE" javaType="double" />
<result column="环比上月" property="环比上月" jdbcType="DOUBLE" javaType="double" />
<!-- <result column="平均提前签单天数" property="平均提前签单天数" jdbcType="INTEGER" javaType="int" /> -->
<!-- <result column="环比" property="环比" jdbcType="DOUBLE" javaType="double" /> -->
</resultMap>
</mapper>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cpic.xim.mybatis.mapper.RankingListMapper">
<select id="getRankingList" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap">
call telsale_archievement_pkg.caller_arch_ranking_list(
#{a_department_code,mode=IN,jdbcType=VARCHAR},
#{a_year,mode=IN,jdbcType=VARCHAR},
#{a_month,mode=IN,jdbcType=VARCHAR},
#{a_attaching_ranking_list,mode=OUT,jdbcType=CURSOR, resultMap=AttachingRateRankingMap},
#{a_renewal_ranking_list,mode=OUT,jdbcType=CURSOR, resultMap=RenewalRateRankingMap})
</select>
<resultMap id="AttachingRateRankingMap" type="CallerRankingItem">
<id property="index" column="rownum" jdbcType="INTEGER" javaType="int"/>
<result property="callerName" column="caller_name" jdbcType="VARCHAR" javaType="String"/>
<result property="appraiseValue" column="attaching_rate" jdbcType="VARCHAR" javaType="String"/>
</resultMap>
<resultMap id="RenewalRateRankingMap" type="CallerRankingItem">
<id property="index" column="rownum" jdbcType="INTEGER" javaType="int"/>
<result property="callerName" column="caller_name" jdbcType="VARCHAR" javaType="String"/>
<result property="appraiseValue" column="renewal_rate" jdbcType="VARCHAR" javaType="String"/>
</resultMap>
</mapper>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cpic.xim.mybatis.mapper.RewardsMapper">
<select id="queryRewardProjects" statementType="STATEMENT" resultMap="RewardProjectMap" useCache="false" flushCache="true">
select reward_index, reward_name from reward_projects order by reward_index desc
</select>
<resultMap id="RewardProjectMap" type="com.cpic.xim.mybatis.pojo.RewardProject">
<id property="rewardCode" column="reward_index" />
<result property="rewardName" column="reward_name" javaType="String"/>
</resultMap>
<select id="queryRewardTelsaler" statementType="STATEMENT" resultMap="RewardGainerMapper" useCache="false" flushCache="true">
SELECT hjr.rec_id rec_id,
hjr.telsaler_name telsaler_name,
hjr.telsaler_code telsaler_code,
xm.reward_name reward_name,
xm.reward_index reward_index
FROM telsaler_reward hjr,
reward_projects xm
WHERE hjr.reward_index = xm.reward_index
order by xm.reward_index desc
</select>
<resultMap id="RewardGainerMapper" type="com.cpic.xim.mybatis.pojo.RewardGainer">
<id column="rec_id" property="recID" />
<result column="telsaler_name" property="callerName" />
<result column="telsaler_code" property="callerCode" />
<result column="reward_name" property="rewardProjectName" />
<result column="reward_index" property="rewardProjectCode" />
</resultMap>
<select id="addRewardTelSaler" statementType="CALLABLE" parameterType="java.util.HashMap" useCache="false" flushCache="true" >
call telsaler_reward_pkg.add_telsaler_reward(
#{a_reward_index,mode=IN,jdbcType=VARCHAR},
#{a_telsaler_name,mode=IN,jdbcType=VARCHAR})
</select>
<!-- 删除获奖坐席记录 -->
<select id="deleteRewardTelSaler" statementType="CALLABLE" parameterType="java.util.HashMap" useCache="false" flushCache="true" >
call telsaler_reward_pkg.delete_telsaler_reward(
#{a_rec_id,mode=IN,jdbcType=INTEGER})
</select>
<!-- 更新获奖坐席 -->
<select id="updateRewardTelSaler" statementType="CALLABLE" parameterType="java.util.HashMap" useCache="false" flushCache="true" >
call telsaler_reward_pkg.update_telsaler_reward(
#{a_rec_id,mode=IN,jdbcType=INTEGER},
#{a_telsaler_name,mode=IN,jdbcType=VARCHAR},
#{a_reward_index,mode=IN,jdbcType=VARCHAR})
</select>
</mapper>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cpic.xim.mybatis.mapper.StaffMapper">
<select id="queryCpicStaff" resultMap="CpicXIMStaff" >
SELECT ry.p13uid,
ry.staff_code,
ry.staff_name,
bm.department_code,
bm.department_name,
ksh.section_office_code,
ksh.section_office_name
FROM idst0.rydm_t ry,
idst0.ks_t ksh,
idst0.bm_t bm
WHERE ry.staff_code = #{staffCode,mode=IN}
AND ry.department_code = bm.department_code
AND ry.section_office_code = ksh.section_office_code
</select>
<resultMap id="CpicXIMStaff" type="com.cpic.xim.mybatis.pojo.CpicStaff">
<!-- <constructor>
<arg column="p13uid" name="p13uid"/>
<arg column="staff_code" name="staffCode"/>
<arg column="staff_name" name="staffName"/>
<arg column="department_code" name="departmentCode"/>
<arg column="department_name" name="departmentName"/>
<arg column="section_office_code" name="sectionOfficeCode"/>
<arg column="section_office_name" name="sectionOfficeName"/>
</constructor> -->
<id property="staffCode" column="staff_code"/>
<result property="staffName" column="staff_name"/>
<result property="p13UID" column="p13uid"/>
<result property="departmentCode" column="department_code"/>
<result property="departmentName" column="department_name"/>
<result property="sectionOfficeCode" column="section_office_code"/>
<result property="sectionOfficeName" column="section_office_name"/>
</resultMap>
</mapper>

View File

@@ -0,0 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cpic.xim.mybatis.mapper.TWrTelsalerMapper">
<select id="queryTWrTelsalerInfo" resultMap="TWrTelsaler">
select t.人员姓名,
t.人员工号,
t.籍贯,
t.参加工作时间,
t.入职日期,
t.入司日期,
t.业务类型,
t.办公地省,
t.办公地市,
t.人员类别,
t.现任岗位,
t.现任职级,
t.机构名称,
t.职场分类,
t.片区名称,
t.团队名称,
t.对口分公司,
t.展业地区,
t.招聘渠道,
t.渠道明细,
t.全日制最高学历,
t.学历类型,
t.用工性质名称,
t.合同种类,
t.合同类型,
t.合同性质,
t.合同签订次数,
t.合同生效日期,
t.合同到期日期,
t.人员属性,
t.保代员工号,
t.职场属性,
t.办公性质,
t.保代人员属性,
t.人员状态
from telsaler t
where t.人员姓名 = #{telsaler} or t.人员工号 = #{telsaler}
</select>
<resultMap id="TWrTelsaler" type="TWrTelsalerRecord">
<result column="人员姓名" property="人员姓名" jdbcType="VARCHAR" javaType="String" />
<result column="人员工号" property="人员工号" jdbcType="VARCHAR" javaType="String" />
<result column="籍贯" property="籍贯" jdbcType="VARCHAR" javaType="String" />
<result column="参加工作时间" property="参加工作时间" jdbcType="VARCHAR" javaType="String" />
<result column="入职日期" property="入职日期" jdbcType="VARCHAR" javaType="String" />
<result column="入司日期" property="入司日期" jdbcType="VARCHAR" javaType="String" />
<result column="业务类型" property="业务类型" jdbcType="VARCHAR" javaType="String" />
<result column="办公地省" property="办公地省" jdbcType="VARCHAR" javaType="String"/>
<result column="办公地市" property="办公地市" jdbcType="VARCHAR" javaType="String"/>
<result column="人员类别" property="人员类别" jdbcType="VARCHAR" javaType="String"/>
<result column="现任岗位" property="现任岗位" jdbcType="VARCHAR" javaType="String"/>
<result column="现任职级" property="现任职级" jdbcType="VARCHAR" javaType="String"/>
<result column="机构名称" property="机构名称" jdbcType="VARCHAR" javaType="String"/>
<result column="职场分类" property="职场分类" jdbcType="VARCHAR" javaType="String"/>
<result column="片区名称" property="片区名称" jdbcType="VARCHAR" javaType="String"/>
<result column="团队名称" property="团队名称" jdbcType="VARCHAR" javaType="String"/>
<result column="对口分公司" property="对口分公司" jdbcType="VARCHAR" javaType="String"/>
<result column="展业地区" property="展业地区" jdbcType="VARCHAR" javaType="String"/>
<result column="招聘渠道" property="招聘渠道" jdbcType="VARCHAR" javaType="String"/>
<result column="渠道明细" property="渠道明细" jdbcType="VARCHAR" javaType="String"/>
<result column="全日制最高学历" property="全日制最高学历" jdbcType="VARCHAR" javaType="String"/>
<result column="学历类型" property="学历类型" jdbcType="VARCHAR" javaType="String"/>
<result column="用工性质名称" property="用工性质名称" jdbcType="VARCHAR" javaType="String"/>
<result column="合同种类" property="合同种类" jdbcType="VARCHAR" javaType="String"/>
<result column="合同类型" property="合同类型" jdbcType="VARCHAR" javaType="String"/>
<result column="合同性质" property="合同性质" jdbcType="VARCHAR" javaType="String"/>
<result column="合同签订次数" property="合同签订次数" jdbcType="VARCHAR" javaType="String"/>
<result column="合同生效日期" property="合同生效日期" jdbcType="VARCHAR" javaType="String"/>
<result column="合同到期日期" property="合同到期日期" jdbcType="VARCHAR" javaType="String"/>
<result column="人员属性" property="人员属性" jdbcType="VARCHAR" javaType="String"/>
<result column="保代员工号" property="保代员工号" jdbcType="VARCHAR" javaType="String"/>
<result column="职场属性" property="职场属性" jdbcType="VARCHAR" javaType="String"/>
<result column="办公性质" property="办公性质" jdbcType="VARCHAR" javaType="String"/>
<result column="保代人员属性" property="保代人员属性" jdbcType="VARCHAR" javaType="String"/>
<result column="人员状态" property="人员状态" jdbcType="VARCHAR" javaType="String"/>
</resultMap>
<!-- insertTWrTelsalerRecordToDB -->
<insert id="insertTWrTelsalerRecordToDB" parameterType="TWrTelsalerRecord">
insert into TWR_TELSALER_DEV(
人员姓名,
人员工号,
籍贯,
参加工作时间,
入职日期,
入司日期,
业务类型,
办公地省,
办公地市,
人员类别,
现任岗位,
现任职级,
机构名称,
职场分类,
片区名称,
团队名称,
对口分公司,
展业地区,
招聘渠道,
渠道明细,
全日制最高学历,
学历类型,
用工性质名称,
合同种类,
合同类型,
合同性质,
合同签订次数,
合同生效日期,
合同到期日期,
人员属性,
保代员工号,
职场属性,
办公性质,
保代人员属性,
人员状态)
values (
#{人员姓名},
#{人员工号},
#{籍贯},
#{参加工作时间},
#{入职日期},
#{入司日期},
#{业务类型},
#{办公地省},
#{办公地市},
#{人员类别},
#{现任岗位},
#{现任职级},
#{机构名称},
#{职场分类},
#{片区名称},
#{团队名称},
#{对口分公司},
#{展业地区},
#{招聘渠道},
#{渠道明细},
#{全日制最高学历},
#{学历类型},
#{用工性质名称},
#{合同种类},
#{合同类型},
#{合同性质},
#{合同签订次数},
#{合同生效日期},
#{合同到期日期},
#{人员属性},
#{保代员工号},
#{职场属性},
#{办公性质},
#{保代人员属性},
#{人员状态} )
</insert>
<select id="cleanTWrTelsalerRecord" statementType="CALLABLE">
call TELSALER_TWR_UTILS.清理TWR坐席清单()
</select>
<select id="cleanTWrTelsalerTeamRecord" statementType="CALLABLE">
call TELSALER_TWR_UTILS.清理TWR团队清单()
</select>
</mapper>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "https://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<properties resource="mybatis/jdbc.properties" />
<settings>
<!-- 二级缓存开启 -->
<setting name="cacheEnabled" value="false" />
</settings>
<!-- 类型别名 -->
<typeAliases>
<package name="com.cpic.xim.mybatis.pojo" />
<package name="com.cpic.xim.utils.ranking" />
</typeAliases>
<environments default="development">
<environment id="development">
<transactionManager type="JDBC" />
<dataSource type="POOLED">
<property name="driver" value="${jdbc.oracle.driver}" />
<property name="url" value="${jdbc.oracle.xmcx1.url}" />
<property name="username" value="${jdbc.oracle.xmcx1.username}" />
<property name="password" value="${jdbc.oracle.xmcx1.password}" />
</dataSource>
</environment>
</environments>
<mappers>
<!-- <mapper resource="mybatis/mapper/StaffMapper.xml" /> -->
<mapper resource="mybatis/mapper/ArchievementMapper.xml" />
<mapper resource="mybatis/mapper/RankingListMapper.xml" />
<mapper resource="mybatis/mapper/RewardsMapper.xml" />
<mapper resource="mybatis/mapper/ImportBIArchievementDataMapper.xml" />
<mapper resource="mybatis/mapper/QueryBIArchievementDataMapper.xml" />
<mapper resource="mybatis/mapper/TWrTelsalerMapper.xml" />
</mappers>
</configuration>

View File

@@ -0,0 +1,38 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">
<context:component-scan base-package="com.cpic.xim" />
<mvc:annotation-driven />
<mvc:default-servlet-handler />
<!-- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property
name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean> -->
<bean id="multipartResolver"
class="org.springframework.web.multipart.support.StandardServletMultipartResolver">
<!-- <property name="defaultEncoding" value="UTF-8" /> -->
<!-- <property name="maxUploadSize" value="-1" /> -->
<!-- <property name="maxFileSize" value="10485760" /> -->
</bean>
</beans>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app
version="4.0"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:javaee="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
<display-name>Archetype Created Web Application</display-name>
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<multipart-config>
<!-- 上传文件最大为多少 -->
<max-file-size>10485760</max-file-size>
<!-- 最大的请求大小 -->
<max-request-size>10485760</max-request-size>
<!-- 多大以上的文件可以上传 -->
<file-size-threshold>0</file-size-threshold>
</multipart-config>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/account/p13_account_check</url-pattern>
</servlet-mapping>
<filter>
<filter-name>CrosFilter</filter-name>
<filter-class>com.cpic.xim.web.filters.cros.CrosFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CrosFilter</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
</web-app>

View File

@@ -0,0 +1,5 @@
<html>
<body>
<h2><%= "Hello World!" %></h2>
</body>
</html>

4
code/db/操作.txt Normal file
View File

@@ -0,0 +1,4 @@
alter user 'root'@localhost identified by '^QaKwfmo#HNy&0D7';
create user 'zhiduguanli'@'%' identified by 'Kane@1981';
regulatory_management.*
grant all privileges on regulatory_management.* to 'zhiduguanli'@'%';

156
code/tomcat/server.xml Normal file
View File

@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!-- OpenSSL support using Tomcat Native -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" />
<!-- OpenSSL support using FFM API from Java 22 -->
<!-- <Listener className="org.apache.catalina.core.OpenSSLLifecycleListener" /> -->
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The
connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
HTTP Connector: /docs/config/http.html
AJP Connector: /docs/config/ajp.html
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
This connector uses the NIO implementation. The default
SSLImplementation will depend on the presence of the APR/native
library and the useOpenSSL attribute of the AprLifecycleListener.
Either JSSE or OpenSSL style configuration may be used regardless of
the SSLImplementation selected. JSSE style configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
certificateKeystorePassword="changeit" type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<!--
<Connector protocol="AJP/1.3"
address="::1"
port="8009"
redirectPort="8443" />
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--For
clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase" />
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="/regulatory" docBase="D:/数据/制度库/文件" debug="0" privileged="true" />
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
</Host>
</Engine>
</Service>
</Server>

View File

@@ -123,7 +123,7 @@ module.exports = {
// "@typescript-eslint/indent": ["warn", 4,], // "@typescript-eslint/indent": ["warn", 4,],
"@stylistic/indent": ["warn", 4,], "@stylistic/indent": ["warn", 4,],
"@typescript-eslint/no-explicit-any": "warn", "@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unsafe-argument": "warn", // "@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-extra-semi": "off", "@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-inferrable-types": "off", "@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-unused-vars": "warn", "@typescript-eslint/no-unused-vars": "warn",
@@ -171,7 +171,7 @@ module.exports = {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off", "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-argument": "warn", // "@typescript-eslint/no-unsafe-argument": "warn",
// "@typescript-eslint/indent": ["error", 4,], // "@typescript-eslint/indent": ["error", 4,],
"@stylistic/indent": ["warn", 4,], "@stylistic/indent": ["warn", 4,],
"@typescript-eslint/no-extra-semi": "off", "@typescript-eslint/no-extra-semi": "off",

File diff suppressed because it is too large Load Diff

View File

@@ -9,20 +9,32 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"vue": "^3.5.22" "scss": "^0.2.4",
"vue": "^3.5.22",
"vue-router": "^4.6.3"
}, },
"devDependencies": { "devDependencies": {
"@stylistic/eslint-plugin": "^5.4.0", "@element-plus/icons-vue": "^2.3.2",
"@typescript-eslint/eslint-plugin": "^8.46.0", "@stylistic/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^8.46.0", "@types/node": "^24.9.2",
"@typescript-eslint/eslint-plugin": "^8.46.2",
"@typescript-eslint/parser": "^8.46.2",
"@vitejs/plugin-vue": "^6.0.1", "@vitejs/plugin-vue": "^6.0.1",
"@vue-office/docx": "^1.6.3",
"@vue-office/excel": "^1.7.14",
"@vue-office/pdf": "^2.0.10",
"@vue/tsconfig": "^0.8.1", "@vue/tsconfig": "^0.8.1",
"element-plus": "^2.11.4", "axios": "^1.13.1",
"eslint": "^9.37.0", "element-plus": "^2.11.5",
"eslint-plugin-vue": "^10.5.0", "eslint": "^9.38.0",
"eslint-plugin-vue": "^10.5.1",
"path": "^0.12.7",
"sass": "^1.93.2",
"typescript": "~5.9.3", "typescript": "~5.9.3",
"vite": "^7.1.9", "vite": "^7.1.12",
"vue-demi": "^0.14.10",
"vue-eslint-parser": "^10.2.0", "vue-eslint-parser": "^10.2.0",
"vue-tsc": "^3.1.1" "vue-pdf-embed": "^2.1.3",
"vue-tsc": "^3.1.2"
} }
} }

View File

@@ -0,0 +1,17 @@
/*
* @Author: Kane
* @Date: 2023-03-04 17:23:02
* @LastEditors: Kane
* @FilePath: /task_schedule/shims-vue.d.ts
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
declare module "*.vue"
{
import { type ComponentOptions } from "vue";
const componentOptions: ComponentOptions;
// export default componentOptions;
}
// declare module "./src/router/index.js";

View File

@@ -0,0 +1,17 @@
<!--
author: Kane Wang <wangkane@qq.com>
date: 2025-10-14 15:57:34
component: AppMain
Copyright © CPIC All rights reserved
-->
<template>
<router-view />
</template>
<script lang="ts">
export default {
name: "AppMain",
components: [],
setup() {},
};
</script>
<style lang="sass" scoped></style>

View File

@@ -0,0 +1,14 @@
/*
* @Author: Kane
* @Date: 2023-03-03 09:56:05
* @LastEditors: Kane
* @FilePath: /task_schedule/src/assets/css/index.scss
* @Description: 全局css的入口文件
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
@import url("./public/reset.scss");
@import url("./public/normalize.scss");
@import url("./public/mixin.scss");
@import url("../font/fonts.css");
// @import url("./public/color.scss");

View File

@@ -0,0 +1,56 @@
/*
* @Author: Kane
* @Date: 2023-02-24 09:36:08
* @LastEditors: Kane
* @LastEditTime: 2023-06-15 15:50:00
* @FilePath: /task_schedule/src/assets/css/public/_public.scss
* @Description: 公共变量
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
//背景色
$wrap-bg-color:#fff;
$span-font-color:#5f5f5f;
//阴影
$box-shadow:0px 0px 20px -10px rgb(14 18 22 / 25%);
$box-shadow-hover:0px 0px 20px -10px rgb(14 18 22 / 50%);
//文字大小
$font-size-normal:14px;
//查询框
@mixin query-box-wrap {
padding: 0px 10px;
span {
font-weight: normal;
display: block;
text-align: right;
font-size: $font-size-normal;
color: $span-font-color;
}
:deep(.el-row) {
display: flex;
align-items: center;
justify-content: left;
}
.el-row+.el-row {
margin-top: 10px;
}
.button-wrapper-right {
display: flex;
justify-content: right;
align-items: center;
}
.button-wrapper-left {
display: flex;
justify-content: left;
align-items: center;
}
}

View File

@@ -0,0 +1,21 @@
/*
* @Author: Kane
* @Date: 2023-02-28 19:25:30
* @LastEditors: Kane
* @FilePath: /task_schedule/src/assets/css/public/global.scss
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
@mixin no-select {
-webkit-touch-callout: none;
-moz-user-select: none;
/*火狐*/
-webkit-user-select: none;
/*webkit浏览器*/
-ms-user-select: none;
/*IE10*/
-khtml-user-select: none;
/*早期浏览器*/
user-select: none;
}

View File

@@ -0,0 +1,389 @@
/*
* @Author: Kane
* @Date: 2023-03-03 10:17:59
* @LastEditors: Kane
* @FilePath: /task_schedule/src/assets/css/public/normalize.scss
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */
text-size-adjust: 100%;
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box;
/* 1 */
height: 0;
/* 1 */
overflow: visible;
/* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none;
/* 1 */
text-decoration: underline;
/* 2 */
text-decoration: underline dotted;
/* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
/* 1 */
font-size: 100%;
/* 1 */
line-height: 1.15;
/* 1 */
margin: 0;
/* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
/* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
/* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box;
/* 1 */
color: inherit;
/* 2 */
display: table;
/* 1 */
max-width: 100%;
/* 1 */
padding: 0;
/* 3 */
white-space: normal;
/* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

View File

@@ -0,0 +1,48 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

View File

@@ -0,0 +1,31 @@
/*
* @Author: Kane
* @Date: 2023-02-28 19:25:30
* @LastEditors: Kane
* @FilePath: /task_schedule/src/assets/css/public/variables.scss
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
// color
/*
$color-bg-01: #fecb96;
$color-bg-02: #f7954e;
$color-bg-03: #f27620;
$color-bg-04: #da3703;
$color-bg-05: #ba1800;
*/
$color-bg-01: #00b2f8;
$color-bg-02: #00b0fb;
$color-bg-03: #0279ea;
$color-bg-04: #046ed6;
$color-bg-05: #033eb6;
$color-title-font: #046ed6;
$color-charts-bg: #ffffff9f;
$color-honorlist-bg: rgba(255, 255, 255, 0.3);
$banner-background-color: #1d74b2;

View File

@@ -0,0 +1,11 @@
@font-face {
font-family: "FZ-ZHUOHEI";
src: url("FZZhuoHJW.TTF");
font-weight: normal;
}
@font-face {
font-family: "FZ-RGAQSAY";
src: url("FZSJ-RUGAQSAY.TTF");
font-weight: normal;
}

View File

@@ -0,0 +1,86 @@
<!--
* @Author: Kane
* @Date: 2023-03-23 15:07:31
* @LastEditors: Kane
* @FilePath: /task_schedule/src/layout/Index.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
<el-container class="layout-container">
<el-header class="layout-header">
<LayoutHeader />
</el-header>
<el-container class="layout-container-down">
<el-aside class="layout-aside">
<LayoutAside />
</el-aside>
<el-main class="layout-main">
<LayoutMain />
</el-main>
</el-container>
</el-container>
</template>
<script lang="ts">
// 组件
import LayoutHeader from "./components/Header.vue";
import LayoutAside from "./components/Aside.vue";
import LayoutMain from "./components/Main.vue";
export default {
name: "MainFrame",
components: {
LayoutHeader,
LayoutAside,
LayoutMain,
},
setup()
{
return {};
},
};
</script>
<style lang="scss" scoped>
@media screen {
.layout-container {
height: 100vh;
width: 100vw;
max-height: 100vh;
max-width: 100vw;
.layout-header {
height: 50px;
width: 100vw;
max-height: 50px;
max-width: 100vw;
padding: 0px;
}
.layout-container-down {
height: calc(100vh - 50px);
max-height: calc(100vh - 50px);
width: 100vw;
max-width: 100vw;
.layout-aside {
height: calc(100vh - 50px);
max-height: calc(100vh - 50px);
min-height: calc(100vh - 50px);
width: 200px;
overflow-x: hidden;
background-color: #2f4156;
}
.layout-main {
padding: 0px;
height: calc(100vh - 50px);
width: calc(100vw - 200px);
}
}
}
}
</style>

View File

@@ -0,0 +1,146 @@
<!--
author: Kane Wang <wangkane@qq.com>
date: 2025-10-23 15:32:30
component: Aside
Copyright © CPIC All rights reserved
-->
<template>
<el-scrollbar class="sidebar-wrapper">
<el-menu
class="side-bar"
router
:default-active="currentPath"
background-color="#2f4156"
text-color="#fff"
active-text-color="#ffd04b"
>
<template v-for="route in routes">
<template v-if="!route.hidden">
<template v-if="hasOnlyChild(route.children)">
<!-- 当只有一个子路由时将这个子路由作为顶级菜单项 -->
<el-menu-item
:key="route.children[0].path"
:index="route.children[0].path"
class="sidebar-submenu"
>
<component
:is="route.children[0] && route.children[0].meta.icon"
class="icons"
/>
<template #title>
{{ route.children[0].meta && route.children[0].meta.title }}
</template>
</el-menu-item>
</template>
<template v-else>
<!-- 不止一个子路由可能是咩有子s路由或者有多个子路由 -->
<!-- 如果没有子路由就不渲染 -->
<el-sub-menu
v-if="route.children && route.children.length"
:key="route.path"
:index="route.path"
class="sidebar-submenu"
>
<template #title>
<component
:is="route.meta && route.meta.icon"
class="icons"
/>
<span>{{ route.meta && route.meta.title }}</span>
</template>
<template v-for="child in route.children">
<el-menu-item
v-if="!child.hidden"
:key="child.path"
:index="child.path"
class="sidebar-item"
>
<component
:is="child.meta && child.meta.icon"
class="icons"
/>
<template #title>
{{ child.meta && child.meta.title }}
</template>
</el-menu-item>
</template>
</el-sub-menu>
</template>
</template>
</template>
</el-menu>
</el-scrollbar>
</template>
<script lang="js">
import { hasOnlyChild } from "@/router/index.ts";
import { useRoute, useRouter } from "vue-router";
import { computed } from "vue";
export default {
name: "LayoutAside",
setup()
{
const userRout = useRoute();
const router = useRouter();
const routes = router.getRoutes();// as SideBarRouteRecordNormalized[];
const currentPath = computed(() =>
{
return userRout.path;
});
return { userRout, routes, currentPath, hasOnlyChild, };
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/public/variables.scss";
@import "@/assets/css/public/mixin.scss";
.sidebar-wrapper {
@include no-select;
height: 100%;
width: 100%;
}
:deep(.el-menu) {
border-right: none;
/* border-left: 5px solid #1d74b2; */
overflow: auto;
.el-menu-item {
font-weight: normal;
}
.el-sub-menu {
font-weight: normal;
}
.el-menu-item.is-active {
// background-color: #ffffff1f !important;
font-weight: 1000;
font-size: 15px;
color: #ffd04b;
}
}
.sidebar-submenu {
background-color: #2f4156 !important;
}
.sidebar-item {
background-color: #223142 !important;
}
/* .is-opened {
border-left: 5px solid #1d74b2;
} */
.icons {
width: 1em;
height: 1em;
margin-right: 8px;
}
</style>

View File

@@ -0,0 +1,118 @@
<!--
author: Kane Wang <wangkane@qq.com>
date: 2025-10-23 15:32:30
component: Header
Copyright © CPIC All rights reserved
-->
<template>
<div class="header-wrapper">
<span class="company-name">CPIC</span>
<div class="version-wrapper">
<span>制度库后台管理</span>
<span>Build-20251021</span>
</div>
<div class="buttons-wrapper">
<component
:is="'SwitchButton'"
class="icons"
@click="Logout"
/>
</div>
</div>
</template>
<script lang="ts">
import { ElMessageBox } from "element-plus";
// import { logout } from "@/utils/account.js";
export default {
name: "LayoutHeader",
setup()
{
/**
* 退出登录
*/
const Logout = (): void =>
{
ElMessageBox.confirm(
"是否要退出系统?",
"",
{
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
}
)
.then((): void =>
{
// debugger;
console.log( "退出" );
// logout();
})
.catch((): void => {});
};
return { Logout, };
},
};
</script>
<style lang="scss" scoped>
.header-wrapper {
// @include no-select;
height: 50px;
max-height: 50px;
padding: 0px 15px;
// position: relative;
display: flex;
justify-content: start;
align-items: center;
background-color: #1d74b2;
color: #fff;
// background-color: $banner-background-color;
span {
text-align: left;
}
>*+* {
margin-left: 10px;
}
.version-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: start;
font: {
size: 0.75rem;
}
>*+* {
margin-top: 1px;
}
}
.company-name {
font-size: 2rem;
}
.buttons-wrapper {
margin-left: auto;
padding-top: 5px;
// border: 1px solid salmon;
}
.icons {
width: 25px;
height: 25px;
// margin-right: 8px;
cursor: pointer;
}
}
</style>

View File

@@ -0,0 +1,29 @@
<!--
author: Kane Wang <wangkane@qq.com>
date: 2025-10-23 17:52:01
component: Main
Copyright © CPIC All rights reserved
-->
<template>
<el-scrollbar>
<router-view />
</el-scrollbar>
</template>
<script lang="ts">
export default {
name: "LayoutMain",
setup()
{
return {};
},
};
</script>
<style scoped>
.el-scrollbar {
height: 100%;
width: 100%;
/* background-color: #ecf2f9; */
}
</style>

View File

@@ -1,15 +1,33 @@
// eslint-disable-next-line // eslint-disable-next-line
import { createApp, VueElement } from "vue"; import { createApp, VueElement } from "vue";
import "./style.css"; import "./assets/css/index.scss";
import App from "./App.vue"; import "./style.scss";
// 路由
// import { router, hasOnlyChild } from "./router/RouteIndex";
import { router } from "./router/index.ts";
// import App from "./App.vue";
import AppMain from "./AppMain.vue";
import ElementPlus from "element-plus"; import ElementPlus from "element-plus";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import "element-plus/dist/index.css"; import "element-plus/dist/index.css";
// eslint-disable-next-line // eslint-disable-next-line
const app = createApp( App ); const app = createApp( AppMain );
app.use( ElementPlus ); app.use( ElementPlus );
app.use( router );
// 引入element-icon
for ( const [key, component,] of Object.entries( ElementPlusIconsVue ))
{
app.component( key, component );
}
app.mount( "#app" );
// eslint-disable-next-line // eslint-disable-next-line
createApp( App ).mount( "#app" ); // createApp( App ).mount( "#app" );

View File

@@ -0,0 +1,125 @@
/**
* @Author: Kane Wang <wangkane@qq.com>
* @Date: 2025-10-13 15:31:41
* @LastEditors: Kane Wang
* @LastModified: 2025-10-31 15:10:46
* @FilePath: src/router/index.ts
* @Description:
*
* Copyright (c) 2025 by Kane All rights reserved
*/
import { createRouter, createWebHashHistory } from "vue-router";
import { type RouteRecordNormalized } from "vue-router";
// import index from "../layout/console/index.vue";
export declare interface SideBarRouteRecordNormalized extends RouteRecordNormalized
{
hidden?: boolean;
}
const routes = [
{
path: "/",
name: "root",
redirect: "Overview",
hidden: true,
},
{
path: "/desktop",
name: "Desktop",
meta: {
title: "工作台",
icon: "house",
},
component: () => import( "../layout/console/Index.vue" ),
children:[
{
path: "/overview",
name: "Overview",
meta: {
title: "总览",
icon: "house",
},
component: () => import( "@/views/console/desktop/Overview.vue" ),
},
],
},
{
path: "/data",
name: "Data",
meta: {
title: "制度库管理",
icon:"Collection",
},
component: () => import( "../layout/console/Index.vue" ),
children:[
{
path: "/regulatory-management",
name:"RegulatoryManagement",
meta: {
title: "制度文件管理",
icon:"document",
},
component: ()=> import( "@/views/console/data/RegulatoryManagement.vue" ),
},
{
path: "/department-management",
name: "DepartmentManagement",
meta:{
title: "组织机构管理",
icon: "OfficeBuilding",
},
component: ()=> import( "@/views/console/data/RegulatoryManagement.vue" ),
},
{
path: "/new-regulatory",
name: "NewRegulatory",
meta: {
title: "测试用 - 新建",
icon: "OfficeBuilding",
},
hidden: false,
component: () => import( "@/views/console/data/NewRegulatory.vue" ),
},
{
path: "/upload-regulatory",
name: "UploadRegulatory",
meta: {
title: "测试用 - 上传制度",
icon: "OfficeBuilding",
},
hidden: false,
component: () => import( "@/views/console/data/UploadRegulatory.vue" ),
},
],
},
];
const router = createRouter({
history: createWebHashHistory(),
routes: routes,
});
// 工具函数
/* eslint-disable */
function hasOnlyChild( children: any ): boolean
{
if ( !children )
{
return false;
}
const routes = children.filter(( item: any )=>
{
return !item.hidden;
});
if ( routes.length === 1 )
{
return true;
}
return false;
}
export { router, hasOnlyChild };

View File

@@ -0,0 +1,21 @@
body
{
width: 100vw;
height: 100vh;
padding: 0px;
margin: 0px;
overflow: hidden;
// @include no-select
-webkit-touch-callout: none;
-moz-user-select: none;
/*火狐*/
-webkit-user-select: none;
/*webkit浏览器*/
-ms-user-select: none;
/*IE10*/
-khtml-user-select: none;
/*早期浏览器*/
user-select: none;
}

View File

@@ -0,0 +1,26 @@
/**
* @Author: Kane Wang <wangkane@qq.com>
* @Date: 2025-10-28 10:13:04
* @LastEditors: Kane Wang
* @LastModified: 2025-10-28 10:13:04
* @FilePath: src/types/regulatory.ts
* @Description: 和制度相关的类型定义
*
* Copyright (c) 2025 by Kane All rights reserved
*/
interface RegulatoryData {
department_name: string;
release_year: string;
regulatory_name: string;
comment: string;
regulatory_files: null | RegulatoryFile[]
}
interface RegulatoryFile {
regulatory_file_name: string;
file_url: string;
file_type: string
}
export { type RegulatoryData, type RegulatoryFile };

View File

@@ -0,0 +1,10 @@
/**
* @Author: Kane Wang <wangkane@qq.com>
* @Date: 2025-10-23 16:52:10
* @LastEditors: Kane Wang
* @LastModified: 2025-10-23 17:04:54
* @FilePath: src/utils/utils.ts
* @Description:
*
* Copyright (c) 2025 by Kane All rights reserved
*/

View File

@@ -0,0 +1,173 @@
<!--
author: Kane Wang <wangkane@qq.com>
date: 2025-10-30 15:06:18
component: NewRegulatory
Copyright © CPIC All rights reserved
-->
<template>
<div class="wrapper">
<div class="query-box-wrapper">
<el-row :gutter="10">
<el-col :span="1">
<span>名称</span>
</el-col>
<el-col :span="10">
<el-input style="text-align:center;" />
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="1">
<span>部门</span>
</el-col>
<el-col :span="4">
<el-input />
</el-col>
<el-col :span="2">
<span>发布修订年份</span>
</el-col>
<el-col :span="4">
<el-input />
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="1">
<span>备注</span>
</el-col>
<el-col :span="10">
<el-input type="textarea" :rows="3" />
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="3">
<div class="button-wrapper-left">
<el-button type="primary" icon="document" @click="showUploadFileDialog">
新增文档
</el-button>
<el-button type="primary" icon="document">
新增文档
</el-button>
</div>
</el-col>
<el-col :span="5" />
<el-col :span="3">
<div class="button-wrapper-right">
<el-button type="primary" icon="document">
提交
</el-button>
</div>
</el-col>
</el-row>
</div>
<el-table
width="100%" stripe
border
:head-cell-style="headerCellStyle"
>
<el-table-column label="文件名" align="center" width="200px">
<template #default="file">
<span>{{ file.row.filename }}</span>
</template>
</el-table-column>
<el-table-column label="文件类型" align="center">
<template #default="file">
<span>{{ file.row.filename }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px">
<el-button type="primary" icon="search">
查看
</el-button>
</el-table-column>
</el-table>
<div class="upload-dialog-wrapper">
<el-dialog
v-model="ui.showUploadDialog" title="上传文件"
width="600px"
:close-on-click-model="false" :close-on-press-escape="false"
:show-close="true"
>
<el-upload
drag
:action="ui.urlFileUpload"
name="files"
:show-file-list="false"
:data="ui.uploadParameters"
:on-success="onUploadSuccess"
>
<el-icon class="el-icon--upload">
<upload-filled />
</el-icon>
<div class="el-upload__text">
将文件拖到此处<em>点击上传</em>
</div>
</el-upload>
</el-dialog>
</div>
</div>
</template>
<script lang="ts">
import {reactive, ref} from "vue";
export default {
name: "NewRegulatory",
components: {},
setup()
{
const ui = reactive({
showUI: true,
showUploadDialog: false,
urlFileUpload: "",
uploadParameters: {
"file-name": "1234",
},
showFileList: false,
});
const headerCellStyle = reactive(
{
textAlign: "center",
}
);
const cellStyle = reactive({
textAlign: "center",
});
const onUploadSuccess = ()=> {};
const showUploadFileDialog = (): void =>
{
ui.showUploadDialog = true;
};
return {
ui,
headerCellStyle,
cellStyle,
onUploadSuccess,
showUploadFileDialog,
};
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/public/_public.scss";
.wrapper {
// max-width: 800px;
min-width: 1024px;
margin: 10px 10px 10px 10px;
>*+* {
margin-top: 10px;
}
}
.query-box-wrapper
{
@include query-box-wrap;
}
:deep(.el-input) .el-input__inner {
text-align: center;
}
</style>

View File

@@ -0,0 +1,127 @@
<!--
author: Kane Wang <wangkane@qq.com>
date: 2025-10-23 21:40:24
component: RegulatoryManagement
Copyright © CPIC All rights reserved
-->
<template>
<div class="wrapper">
<el-row :gutter="10">
<el-col span="24">
<el-button
type="warning"
icon="upload"
>
上传
</el-button>
<el-button
type="primary"
icon="refresh"
>
刷新
</el-button>
</el-col>
</el-row>
<el-table
width="100%" stripe
:header-cell-style="headerCellStyle"
border
:data="ui.regulatoryData"
>
<el-table-column label="部门" align="center" width="200px">
<template #default="regulatory">
<span>{{ regulatory.row.department_name }}</span>
</template>
</el-table-column>
<el-table-column width="150px" label="发布、修订年份" align="center">
<template #default="regulatory">
<span>{{ regulatory.row.release_year }}</span>
</template>
</el-table-column>
<el-table-column label="制度名称" align="center" :cell-style="cellStyle">
<template #default="regulatory">
<span>{{ regulatory.row.regulatory_name }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px">
<el-button
type="primary"
icon="search"
>
查看
</el-button>
<el-button type="warning" icon="document">
编辑
</el-button>
</el-table-column>
</el-table>
</div>
</template>
<script lang="ts">
import { reactive } from "vue";
import { type RegulatoryData } from "@/types/regulatory/regulatory.ts";
interface UI
{
showUI: boolean,
showUploadDialog: boolean,
tablePageSize: number,
tableCurrentPageIndex: number,
regulatoryData: RegulatoryData[],
}
export default {
name: "RegulatoryManagement",
setup()
{
const headerCellStyle = reactive(
{
textAlign: "center",
}
);
const cellStyle = reactive({
textAlign: "center",
});
const ui:UI = reactive({
showUI: true,
showUploadDialog: false,
tablePageSize: 10,
tableCurrentPageIndex: 1,
regulatoryData: [
{
department_name: "信息技术部",
release_year: "2019",
regulatory_name: "关于印发修订后的《太平洋产险厦门分公司信息系统账号权限管理实施细则》的通知",
comment:"",
regulatory_files: [],
},
{
department_name: "信息技术部",
release_year: "2019",
regulatory_name: "关于印发修订后的《太平洋产险厦门分公司个人信息保护管理实施细则》的通知",
comment:"",
regulatory_files: [],
},
],
});
return { ui, headerCellStyle, cellStyle, };
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/public/mixin.scss";
.wrapper {
margin: 10px 10px 10px 10px;
>*+* {
margin-top: 10px;
}
}
.pagination_wrapper {
display: flex;
justify-content: flex-end;
}
</style>

View File

@@ -0,0 +1,78 @@
<!--
author: Kane Wang <wangkane@qq.com>
date: 2025-10-28 11:18:51
component: UploadRegulatory
Copyright © CPIC All rights reserved
-->
<template>
<div class="wrapper">
<!-- <VuePdfEmbed v-if="ui.isPDF" :source="ui.fileURL" text-layer annotation-layer /> -->
<!-- <VueOfficePdf v-if="ui.isPDF" :src="ui.fileURL" @error="errorHandle" /> -->
<VueOfficeDocx v-if="ui.isXlsx" :src="ui.fileURL" @error="errorHandle" />
<VueOfficeExcel
v-if="ui.isXlsx"
:src="ui.fileURL"
@error="errorHandle"
/>
</div>
</template>
<script lang="ts">
import {reactive, ref } from "vue";
import { ElMessage } from "element-plus";
// import VuePdfEmbed, { useVuePdfEmbed } from "vue-pdf-embed";
import VueOfficePdf from "@vue-office/pdf";
import VueOfficeDocx from "@vue-office/docx";
import VueOfficeExcel from "@vue-office/excel";
import "vue-pdf-embed/dist/styles/annotationLayer.css";
import "vue-pdf-embed/dist/styles/textLayer.css";
import "@vue-office/excel/lib/index.css";
export default {
name:"UploadRegulatory",
components: {
// VueOfficePdf,
VueOfficeDocx,
VueOfficeExcel,
},
setup()
{
const ui = reactive({
showUI: true,
isPDF: false,
isDocx: false,
isXlsx: true,
// fileURL: "http://10.39.0.1:8080/regulatory/%E4%BF%A1%E6%81%AF%E6%8A%80%E6%9C%AF%E9%83%A8/%E5%85%B3%E4%BA%8E%E5%8D%B0%E5%8F%91%E3%80%8A%E5%A4%AA%E5%B9%B3%E6%B4%8B%E4%BA%A7%E9%99%A9%E5%8E%A6%E9%97%A8%E5%88%86%E5%85%AC%E5%8F%B8IT%E8%B5%84%E4%BA%A7%E7%AE%A1%E7%90%86%E5%8A%9E%E6%B3%95%E3%80%8B%EF%BC%882019%E5%B9%B4%E4%BF%AE%E8%AE%A2%EF%BC%89%E7%9A%84%E9%80%9A%E7%9F%A5/%E5%8E%A6%E5%A4%AA%E4%BF%9D%E4%BA%A7%E5%8F%91%E3%80%902019%E3%80%9146%E5%8F%B7%E5%85%B3%E4%BA%8E%E5%8D%B0%E5%8F%91%E3%80%8A%E5%A4%AA%E5%B9%B3%E6%B4%8B%E4%BA%A7%E9%99%A9%E5%8E%A6%E9%97%A8%E5%88%86%E5%85%AC%E5%8F%B8IT%E8%B5%84%E4%BA%A7%E7%AE%A1%E7%90%86%E5%8A%9E%E6%B3%95%E3%80%8B%EF%BC%882019%E5%B9%B4%E4%BF%AE%E8%AE%A2%EF%BC%89%E7%9A%84%E9%80%9A%E7%9F%A5.pdf",
// fileURL: "http://10.39.0.1:8080/regulatory/%E4%BF%A1%E6%81%AF%E6%8A%80%E6%9C%AF%E9%83%A8/%E5%85%B3%E4%BA%8E%E5%8D%B0%E5%8F%91%E3%80%8A%E5%A4%AA%E5%B9%B3%E6%B4%8B%E4%BA%A7%E9%99%A9%E5%8E%A6%E9%97%A8%E5%88%86%E5%85%AC%E5%8F%B8%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E9%9C%80%E6%B1%82%E7%AE%A1%E7%90%86%E5%8A%9E%E6%B3%95%EF%BC%882020%E5%B9%B4%E4%BF%AE%E8%AE%A2%EF%BC%89%E3%80%8B%E7%9A%84%E9%80%9A%E7%9F%A5/%E9%99%84%E4%BB%B62%EF%BC%9A%E4%B8%9A%E5%8A%A1%E9%9C%80%E6%B1%82%E8%AF%B4%E6%98%8E%E4%B9%A6.docx",
fileURL: "http://10.39.0.1:8080/regulatory/%E4%BF%A1%E6%81%AF%E6%8A%80%E6%9C%AF%E9%83%A8/%E5%85%B3%E4%BA%8E%E5%8D%B0%E5%8F%91%E3%80%8A%E5%A4%AA%E5%B9%B3%E6%B4%8B%E4%BA%A7%E9%99%A9%E5%8E%A6%E9%97%A8%E5%88%86%E5%85%AC%E5%8F%B8%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E9%9C%80%E6%B1%82%E7%AE%A1%E7%90%86%E5%8A%9E%E6%B3%95%EF%BC%882020%E5%B9%B4%E4%BF%AE%E8%AE%A2%EF%BC%89%E3%80%8B%E7%9A%84%E9%80%9A%E7%9F%A5/%E9%99%84%E4%BB%B64%EF%BC%9A%E5%88%86%E5%85%AC%E5%8F%B8%E8%87%AA%E5%BB%BA%E7%B3%BB%E7%BB%9F%E9%83%A8%E7%BD%B2%E6%83%85%E5%86%B5%E7%99%BB%E8%AE%B0%E8%A1%A8.xlsx",
});
const errorHandle = ()=>
{
ElMessage.error( "渲染文档出错!" );
};
return {
ui,
errorHandle, };
},
};
</script>
<style lang="scss">
.wrapper {
margin: 10px 10px 10px 10px;
width: calc(100% - 20px);
height: calc( 100vh - 70px);
// .VueOfficeExcel {
// height: calc( 100vh - 70px);
// }
>*+* {
margin-top: 10px;
}
}
</style>

View File

@@ -0,0 +1,32 @@
<!--
author: Kane Wang <wangkane@qq.com>
date: 2025-10-23 21:40:24
component: RegulatoryManagement
Copyright © CPIC All rights reserved
-->
<template>
<div class="wrapper">
总览
</div>
</template>
<script lang="ts">
export default {
name: "OverViews",
setup()
{
const ui = {};
return { ui, };
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/public/mixin.scss";
.wrapper {
@include no-select;
margin: 5px;
border: 1px solid red;
}
</style>

View File

@@ -1 +1,8 @@
/// <reference types="vite/client" /> // / <reference types="vite/client" />
declare module "*.vue"
{
import type { DefineComponent } from "vue";
const vueComponent: DefineComponent<unknown, unknown, any>;
export default vueComponent;
}

View File

@@ -1,16 +1,9 @@
// {
// "files": [],
// "references": [
// {
// "path": "./tsconfig.node.json"
// },
// {
// "path": "./tsconfig.app.json"
// }
// ],
// }
{ {
"compilerOptions": { "compilerOptions": {
// "allowJs": true,
// "declaration": true,
"noEmit": true,
"allowImportingTsExtensions": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true, "useDefineForClassFields": true,
@@ -45,7 +38,7 @@
"src/**/*.tsx", "src/**/*.tsx",
"src/**/*.vue", "src/**/*.vue",
"*.d.ts", "*.d.ts",
"src/router/index.d.ts", ".vscode/bak/RouteIndex.d.ts",
"vite.config.*", "vite.config.*",
"vitest.config.*", "vitest.config.*",
"cypress.config.*", "cypress.config.*",

View File

@@ -19,7 +19,8 @@
"noUnusedParameters": true, "noUnusedParameters": true,
"erasableSyntaxOnly": true, "erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true "noUncheckedSideEffectImports": true,
"declaration":true,
}, },
"include": ["vite.config.ts"] "include": ["vite.config.ts"]
} }

View File

@@ -1,7 +1,30 @@
import { defineConfig } from 'vite' import { defineConfig } from "vite";
import vue from '@vitejs/plugin-vue' import vue from "@vitejs/plugin-vue";
import path from "path";
/* eslint-disable */
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [vue()], plugins: [vue(),],
}) resolve: {
//配置别名
alias: [
{
find: /^~/,
replacement: "",
},
{
find: "@",
replacement: path.resolve( __dirname, "src" ),
},
],
},
css: {
preprocessorOptions: {
scss: {
// additionalData: '@import "./src/assets/css/public/variables.scss";@import "./src/assets/css/public/mixin.scss";',
// additionalData: '@import "@/assets/css/public/variables.scss";',
},
},
},
});

68
开发日志.md Normal file
View File

@@ -0,0 +1,68 @@
# 前端
## 问题
### vue3 引入@路径
#### 引入path模块问题
node.js 自带的path模块是JavaScript代码要引入ts文件需要安装@type/node模块
```shell
npm install @types/node --save-dev
```
之后就可以加载path。在 vite.config.ts 中加上
```typescript
import path from "path";
resolve: {
//配置别名
alias: [
{
find: /^~/,
replacement: "",
},
{
find: "@",
replacement: path.resolve( __dirname, "src" ),
},
],
},
```
### tomcat 跨域下载文件
tomcat 默认是不支持跨域的不做配置使用vue下载文件会有Access-Control-Allow-Origin问题。
解决方法: 编辑 web.xml 文件,找到
```xml
<!-- The mapping for the HTTP header security Filter -->
```
在下面添加
```xml
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.origins</param-name>
<param-value>*</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
```
重启 tomcat 解决。
## 组件
### pdf预览组件
使用