Compare commits
16 Commits
2913b10fe4
...
feature-制度
| Author | SHA1 | Date | |
|---|---|---|---|
| fe0f67a777 | |||
| 3c8bb51c41 | |||
| 858b79942d | |||
| e9c3aee252 | |||
| f6f9543455 | |||
| 7b4e79b2eb | |||
| 4d12c3b794 | |||
| dd9230e5a1 | |||
| fd6b77bdc3 | |||
| 02ee929029 | |||
| 3382fe7b3f | |||
| 9f2bc65a0e | |||
| 8879c6ed3c | |||
| be9d2177c4 | |||
| ad66144bc3 | |||
| 8ebb2d68d9 |
@@ -6,4 +6,6 @@
|
|||||||
|
|
||||||
# 密码
|
# 密码
|
||||||
## mysql
|
## mysql
|
||||||
root@localhost ^QaKwfmo#HNy&0D7
|
root@localhost ^QaKwfmo#HNy&0D7
|
||||||
|
|
||||||
|
zhiduguanli@192.168.39.183 Cpic#1234
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/**
|
||||||
|
* @Author: Kane Wang <wangkane@qq.com>
|
||||||
|
* @Date: 2026-01-15 15:06:41
|
||||||
|
* @LastEditors: Kane Wang
|
||||||
|
* @LastModified: 2026-01-15 15:06:41
|
||||||
|
* @FilePath: src/main/java/com/cpic/xim/utils/uuid.java
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 by Kane All rights reserved
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.utils;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public class UUIDUtil
|
||||||
|
{
|
||||||
|
public static String getUUID()
|
||||||
|
{
|
||||||
|
return UUID.randomUUID().toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane Wang <wangkane@qq.com>
|
* @Author: Kane Wang <wangkane@qq.com>
|
||||||
* @Date: 2025-10-16 09:46:42
|
* @Date: 2025-10-16 09:46:42
|
||||||
* @LastEditors: Kane Wang
|
* @LastEditors: Kane Wang
|
||||||
* @LastModified: 2025-12-01 18:42:31
|
* @LastModified: 2026-02-06 19:08:46
|
||||||
* @FilePath: src/main/java/com/cpic/xim/utils/files/SaveUploadFile.java
|
* @FilePath: src/main/java/com/cpic/xim/utils/files/SaveUploadFile.java
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@@ -128,7 +128,7 @@ public class SaveUploadFile
|
|||||||
|
|
||||||
file.transferTo( destFile );
|
file.transferTo( destFile );
|
||||||
|
|
||||||
uploadedFile = new UploadedFile( fileName, fullPath, relativeFilePath );
|
uploadedFile = new UploadedFile( file.getOriginalFilename(), fileName, fullPath, relativeFilePath );
|
||||||
|
|
||||||
savedFiles.add( uploadedFile );
|
savedFiles.add( uploadedFile );
|
||||||
}
|
}
|
||||||
@@ -175,4 +175,54 @@ public class SaveUploadFile
|
|||||||
throw new MoveUploadedFileException( "移动文件失败!" );
|
throw new MoveUploadedFileException( "移动文件失败!" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String encodeFileName( String originalFileName )
|
||||||
|
{
|
||||||
|
StringBuilder encodedFileName = new StringBuilder( originalFileName.length() * 3 );
|
||||||
|
char[] charArray = originalFileName.toCharArray();
|
||||||
|
|
||||||
|
for ( char c : charArray )
|
||||||
|
{
|
||||||
|
switch ( c )
|
||||||
|
{
|
||||||
|
case '%':
|
||||||
|
encodedFileName.append( PERCENT );
|
||||||
|
break;
|
||||||
|
case ' ':
|
||||||
|
encodedFileName.append( SPACING );
|
||||||
|
break;
|
||||||
|
case '+':
|
||||||
|
encodedFileName.append( PLUS );
|
||||||
|
break;
|
||||||
|
case '/':
|
||||||
|
encodedFileName.append( FORWARD_SLASH );
|
||||||
|
break;
|
||||||
|
case '?':
|
||||||
|
encodedFileName.append( QUESTION_MASK );
|
||||||
|
break;
|
||||||
|
case '&':
|
||||||
|
encodedFileName.append( AMPERSAND );
|
||||||
|
break;
|
||||||
|
case '#':
|
||||||
|
encodedFileName.append( SHARP );
|
||||||
|
break;
|
||||||
|
case '=':
|
||||||
|
encodedFileName.append( PLUS );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
encodedFileName.append( c );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return encodedFileName.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
static final String SHARP = "%23";
|
||||||
|
static final String PLUS = "%2B";
|
||||||
|
static final String FORWARD_SLASH = "%2F";
|
||||||
|
static final String QUESTION_MASK = "%3F";
|
||||||
|
static final String SPACING = "%20";
|
||||||
|
static final String EQUAL = "%3D";
|
||||||
|
static final String PERCENT = "%25";
|
||||||
|
static final String AMPERSAND = "%26";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane Wang <wangkane@qq.com>
|
* @Author: Kane Wang <wangkane@qq.com>
|
||||||
* @Date: 2025-10-31 17:33:13
|
* @Date: 2025-10-31 17:33:13
|
||||||
* @LastEditors: Kane Wang
|
* @LastEditors: Kane Wang
|
||||||
* @LastModified: 2025-12-26 21:58:32
|
* @LastModified: 2026-02-06 17:41:44
|
||||||
* @FilePath: src/main/java/com/cpic/xim/utils/files/UploadedFile.java
|
* @FilePath: src/main/java/com/cpic/xim/utils/files/UploadedFile.java
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@@ -18,6 +18,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
*/
|
*/
|
||||||
public class UploadedFile
|
public class UploadedFile
|
||||||
{
|
{
|
||||||
|
@JsonProperty("originFileName")
|
||||||
|
private String originFileName;
|
||||||
|
|
||||||
@JsonProperty( "fileName" )
|
@JsonProperty( "fileName" )
|
||||||
private String fileName;
|
private String fileName;
|
||||||
|
|
||||||
@@ -60,17 +63,21 @@ public class UploadedFile
|
|||||||
public UploadedFile()
|
public UploadedFile()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public UploadedFile( String fileName, String absoluteFilePath, String relativeFilePath )
|
public UploadedFile( String originFileName, String fileName, String absoluteFilePath, String relativeFilePath )
|
||||||
{
|
{
|
||||||
|
this.originFileName = originFileName;
|
||||||
this.fileName = fileName;
|
this.fileName = fileName;
|
||||||
this.absoluteFilePath = absoluteFilePath;
|
this.absoluteFilePath = absoluteFilePath;
|
||||||
this.relativeFilePath = relativeFilePath;
|
this.relativeFilePath = relativeFilePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UploadedFile( String fileName, String absoluteFilePath )
|
public String getOriginFileName()
|
||||||
{
|
{
|
||||||
this.fileName = fileName;
|
return originFileName;
|
||||||
this.absoluteFilePath = absoluteFilePath;
|
}
|
||||||
this.relativeFilePath = "";
|
|
||||||
|
public void setOriginFileName( String originFileName )
|
||||||
|
{
|
||||||
|
this.originFileName = originFileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
/**
|
||||||
|
* @Author: Kane Wang <wangkane@qq.com>
|
||||||
|
* @Date: 2026-02-07 21:36:35
|
||||||
|
* @LastEditors: Kane Wang
|
||||||
|
* @LastModified: 2026-02-07 21:36:35
|
||||||
|
* @FilePath: src/main/java/com/cpic/xim/utils/utils.java
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 by Kane All rights reserved
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.utils;
|
||||||
|
|
||||||
|
public class utils
|
||||||
|
{
|
||||||
|
public static String encodeURL( String urlString )
|
||||||
|
{
|
||||||
|
StringBuilder encodedURLString = new StringBuilder( urlString.length() * 3 );
|
||||||
|
char[] charArray = urlString.toCharArray();
|
||||||
|
|
||||||
|
for ( char c : charArray )
|
||||||
|
{
|
||||||
|
switch ( c )
|
||||||
|
{
|
||||||
|
case '%':
|
||||||
|
encodedURLString.append( PERCENT );
|
||||||
|
break;
|
||||||
|
case ' ':
|
||||||
|
encodedURLString.append( SPACING );
|
||||||
|
break;
|
||||||
|
case '+':
|
||||||
|
encodedURLString.append( PLUS );
|
||||||
|
break;
|
||||||
|
case '/':
|
||||||
|
encodedURLString.append( FORWARD_SLASH );
|
||||||
|
break;
|
||||||
|
case '?':
|
||||||
|
encodedURLString.append( QUESTION_MASK );
|
||||||
|
break;
|
||||||
|
case '&':
|
||||||
|
encodedURLString.append( AMPERSAND );
|
||||||
|
break;
|
||||||
|
case '#':
|
||||||
|
encodedURLString.append( SHARP );
|
||||||
|
break;
|
||||||
|
case '=':
|
||||||
|
encodedURLString.append( PLUS );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
encodedURLString.append( c );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return encodedURLString.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
static final String SHARP = "%23";
|
||||||
|
static final String PLUS = "%2B";
|
||||||
|
static final String FORWARD_SLASH = "%2F";
|
||||||
|
static final String QUESTION_MASK = "%3F";
|
||||||
|
static final String SPACING = "%20";
|
||||||
|
static final String EQUAL = "%3D";
|
||||||
|
static final String PERCENT = "%25";
|
||||||
|
static final String AMPERSAND = "%26";
|
||||||
|
|
||||||
|
}
|
||||||
@@ -18,4 +18,6 @@ VITE_APP_CACHE_ENABLED=true
|
|||||||
#上传文件
|
#上传文件
|
||||||
VITE_APP_URL_UPLOAD_FILE=http://222.76.244.118:8081/RegulatoryManagementBackend/file/file-upload.do
|
VITE_APP_URL_UPLOAD_FILE=http://222.76.244.118:8081/RegulatoryManagementBackend/file/file-upload.do
|
||||||
VITE_APP_URL_MOVE_FILE=http://222.76.244.118:8081/RegulatoryManagementBackend/file/move-file.do
|
VITE_APP_URL_MOVE_FILE=http://222.76.244.118:8081/RegulatoryManagementBackend/file/move-file.do
|
||||||
|
# 添加新制度库
|
||||||
|
VITE_APP_URL_ADD_NEW_REGULATORY=http://localhost:8080/RegulatoryManagementBackend/regulatory/add-new-regulatory.do
|
||||||
VITE_APP_URL_PREFIX=http://222.76.244.118:8081/RegulatoryManagementBackend/
|
VITE_APP_URL_PREFIX=http://222.76.244.118:8081/RegulatoryManagementBackend/
|
||||||
@@ -1,216 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2023-03-14 09:19:21
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @FilePath: /task_schedule/.eslintrc.cjs
|
|
||||||
* @Description: eslint 配置文件
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
env: { // 需要在env中指定运行的环境,这些环境其实就是一组预定义的全局变量,让 ESLint 知道当前环境存在这些全局变量
|
|
||||||
node: true,
|
|
||||||
browser: true,
|
|
||||||
es2021: true,
|
|
||||||
},
|
|
||||||
parser:"espree",
|
|
||||||
parserOptions:{
|
|
||||||
sourceType: "module",
|
|
||||||
ecmaVersion: 2021,
|
|
||||||
},
|
|
||||||
extends:["eslint:recommended",],
|
|
||||||
rules:{
|
|
||||||
// indent: ["warn", 4,],
|
|
||||||
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
|
|
||||||
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
|
||||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
||||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
||||||
"no-unused-vars": "warn",
|
|
||||||
semi: ["error", "always",], // 控制行尾部分号
|
|
||||||
quotes: ["error", "double",],
|
|
||||||
"comma-dangle": ["error", {
|
|
||||||
arrays: "always",
|
|
||||||
objects: "always",
|
|
||||||
imports: "never",
|
|
||||||
exports: "never",
|
|
||||||
functions: "never",
|
|
||||||
},], // 数组和对象键值对最后一个逗号
|
|
||||||
"comma-style": ["error", "last",], // 逗号在行位
|
|
||||||
"no-undef-init": "error",
|
|
||||||
"no-invalid-this": "error",
|
|
||||||
"no-use-before-define": "error",
|
|
||||||
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
|
||||||
"comma-spacing": ["error", { before: false, after: true, },],
|
|
||||||
"array-bracket-spacing": ["error", "never", {
|
|
||||||
singleValue: false,
|
|
||||||
objectsInArrays: false,
|
|
||||||
arraysInArrays: false,
|
|
||||||
},],
|
|
||||||
"brace-style": ["error", "allman", { allowSingleLine: true, },],
|
|
||||||
"prefer-const": "warn",
|
|
||||||
"space-before-function-paren": ["error", {
|
|
||||||
anonymous: "always",
|
|
||||||
named: "never",
|
|
||||||
asyncArrow: "always",
|
|
||||||
},],
|
|
||||||
},
|
|
||||||
overrides: [
|
|
||||||
{
|
|
||||||
files: ["*.vue",],
|
|
||||||
parser: "vue-eslint-parser",
|
|
||||||
parserOptions: {
|
|
||||||
ecmaVersion: 2021,
|
|
||||||
sourceType: "module",
|
|
||||||
parser: { // <script>标签中的lang属性配置不同的parser
|
|
||||||
ts: "@typescript-eslint/parser",
|
|
||||||
js: "espree",
|
|
||||||
"<template>": "espree",
|
|
||||||
},
|
|
||||||
// project: "tsconfig.json",
|
|
||||||
project: ["tsconfig.json", "tsconfig.app.json",],
|
|
||||||
extraFileExtensions: [".vue",],
|
|
||||||
},
|
|
||||||
plugins: ["eslint-plugin-vue", "@stylistic",],
|
|
||||||
extends: [
|
|
||||||
// "plugin:vue/vue3-essential",
|
|
||||||
"plugin:vue/recommended",
|
|
||||||
"eslint:recommended",
|
|
||||||
// "standard-with-typescript",
|
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
],
|
|
||||||
rules: {
|
|
||||||
// indent: ["warn", 4,],
|
|
||||||
"no-trailing-spaces": ["error", {"ignoreComments": true,},],
|
|
||||||
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
|
|
||||||
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
|
||||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
||||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
||||||
"no-unused-vars": "warn",
|
|
||||||
"semi-spacing": ["error", {"before": false, "after": true,},], // 控制行尾部分号
|
|
||||||
"quotes": ["error", "double",],
|
|
||||||
"comma-dangle": ["error", {
|
|
||||||
arrays: "always",
|
|
||||||
objects: "always",
|
|
||||||
imports: "never",
|
|
||||||
exports: "never",
|
|
||||||
functions: "never",
|
|
||||||
},], // 数组和对象键值对最后一个逗号
|
|
||||||
"comma-style": ["error", "last",], // 逗号在行位
|
|
||||||
"no-undef-init": "error",
|
|
||||||
"no-invalid-this": "error",
|
|
||||||
"no-use-before-define": "error",
|
|
||||||
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
|
||||||
"brace-style": ["error", "allman", { allowSingleLine: true, },],
|
|
||||||
"prefer-const": "warn",
|
|
||||||
"space-before-function-paren": ["error", {
|
|
||||||
anonymous: "always",
|
|
||||||
named: "never",
|
|
||||||
asyncArrow: "always",
|
|
||||||
},],
|
|
||||||
// vue
|
|
||||||
"vue/html-indent": ["error", 4,],
|
|
||||||
"vue/max-attributes-per-line": ["error", {
|
|
||||||
"singleline": {
|
|
||||||
"max": 3,
|
|
||||||
},
|
|
||||||
"multiline": {
|
|
||||||
"max": 2,
|
|
||||||
},
|
|
||||||
},],
|
|
||||||
// typescript
|
|
||||||
// "@typescript-eslint/indent": ["warn", 4,],
|
|
||||||
"@stylistic/indent": ["warn", 4, { "SwitchCase": 1, },],
|
|
||||||
"@typescript-eslint/no-explicit-any": "warn",
|
|
||||||
// "@typescript-eslint/no-unsafe-argument": "warn",
|
|
||||||
"@typescript-eslint/no-extra-semi": "off",
|
|
||||||
"@typescript-eslint/no-inferrable-types": "off",
|
|
||||||
"@typescript-eslint/no-unused-vars": "warn",
|
|
||||||
"@typescript-eslint/ban-ts-comment": "warn",
|
|
||||||
"@typescript-eslint/member-delimiter-style": "off",
|
|
||||||
"@stylistic/semi": ["error", "always",], // 控制行尾部分号
|
|
||||||
"@stylistic/brace-style": ["error", "allman", { allowSingleLine: true, },],
|
|
||||||
"@stylistic/comma-dangle": ["error", {
|
|
||||||
arrays: "always",
|
|
||||||
objects: "always",
|
|
||||||
imports: "never",
|
|
||||||
exports: "never",
|
|
||||||
functions: "never",
|
|
||||||
},], // 数组和对象键值对最后一个逗号
|
|
||||||
"@stylistic/quotes": ["error", "double",],
|
|
||||||
"@typescript-eslint/space-before-function-paren": "off",
|
|
||||||
// 方括号的空格问题
|
|
||||||
"comma-spacing": ["error", { before: false, after: true, },],
|
|
||||||
"@typescript-eslint/comma-spacing": ["off", { before: false, after: true, },], // 使用eslint的,不用ts的
|
|
||||||
"array-bracket-spacing": ["error", "never", {
|
|
||||||
singleValue: false,
|
|
||||||
objectsInArrays: false,
|
|
||||||
arraysInArrays: false,
|
|
||||||
},],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
files: ["*.ts",],
|
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
parserOptions: {
|
|
||||||
project: "./tsconfig.json",
|
|
||||||
// project: ["tsconfig.json", "tsconfig.app.json",],
|
|
||||||
},
|
|
||||||
plugins: ["@typescript-eslint", "@stylistic",],
|
|
||||||
extends: [
|
|
||||||
"eslint:recommended",
|
|
||||||
// "standard-with-typescript",
|
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
],
|
|
||||||
rules: {
|
|
||||||
"no-trailing-spaces": ["error", {"ignoreComments": true,},],
|
|
||||||
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
|
|
||||||
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
|
||||||
"no-console": 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-unsafe-argument": "warn",
|
|
||||||
// "@typescript-eslint/indent": ["error", 4,],
|
|
||||||
"@stylistic/indent": ["warn", 4, { "SwitchCase": 1, },],
|
|
||||||
"@typescript-eslint/no-extra-semi": "off",
|
|
||||||
"@typescript-eslint/no-inferrable-types": "off",
|
|
||||||
"@typescript-eslint/no-unused-vars": "warn",
|
|
||||||
"@typescript-eslint/ban-ts-comment": "warn",
|
|
||||||
"@typescript-eslint/member-delimiter-style": "off",
|
|
||||||
"@stylistic/semi": ["error", "always",], // 控制行尾部分号
|
|
||||||
// "@typescript-eslint/brace-style": ["error", "allman", { allowSingleLine: true, },],
|
|
||||||
"@stylistic/brace-style": ["error", "allman", { allowSingleLine: true, },],
|
|
||||||
"@stylistic/comma-dangle": ["error", {
|
|
||||||
arrays: "always",
|
|
||||||
objects: "always",
|
|
||||||
imports: "never",
|
|
||||||
exports: "never",
|
|
||||||
functions: "never",
|
|
||||||
},], // 数组和对象键值对最后一个逗号
|
|
||||||
"@stylistic/quotes": ["error", "double",],
|
|
||||||
"@typescript-eslint/space-before-function-paren": "off",
|
|
||||||
"@typescript-eslint/strict-boolean-expressions": ["error", {
|
|
||||||
allowString: false,
|
|
||||||
},],
|
|
||||||
"comma-style": ["error", "last",], // 逗号在行位
|
|
||||||
"comma-spacing": ["error", { before: false, after: true, },],
|
|
||||||
"@typescript-eslint/comma-spacing": ["off", { before: false, after: true, },], // 使用eslint的,不用ts的
|
|
||||||
"array-bracket-spacing": ["error", "never", {
|
|
||||||
singleValue: false,
|
|
||||||
objectsInArrays: false,
|
|
||||||
arraysInArrays: false,
|
|
||||||
},],
|
|
||||||
"no-undef-init": "error",
|
|
||||||
"no-invalid-this": "error",
|
|
||||||
"no-use-before-define": "error",
|
|
||||||
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
|
||||||
"prefer-const": "warn",
|
|
||||||
"spaced-comment": "error",
|
|
||||||
"space-before-function-paren": "off",
|
|
||||||
"semi-spacing": ["error", {"before": false, "after": true,},],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
111
code/web/regulatory-management-util/eslint.config copy.ts
Normal file
111
code/web/regulatory-management-util/eslint.config copy.ts
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
import js from "@eslint/js";
|
||||||
|
import globals from "globals";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
import pluginVue from "eslint-plugin-vue";
|
||||||
|
import { defineConfig } from "eslint/config";
|
||||||
|
import stylistic from "@stylistic/eslint-plugin";
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
{
|
||||||
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts,vue}",],
|
||||||
|
plugins: { js, },
|
||||||
|
extends: ["js/recommended",],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.node,}, },
|
||||||
|
},
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
{
|
||||||
|
files: ["src/**/*.ts", "eslint.config.ts",],
|
||||||
|
plugins: {
|
||||||
|
"@stylistic": stylistic,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"spaced-comment": "error",
|
||||||
|
"space-before-function-paren": "off",
|
||||||
|
"semi-spacing": ["error", {"before": false,
|
||||||
|
"after": true,},],
|
||||||
|
"@typescript-eslint/no-unused-vars": "warn",
|
||||||
|
"@stylistic/indent": ["error", 4, { SwitchCase: 1, },],
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-extra-semi": "off",
|
||||||
|
"@typescript-eslint/no-inferrable-types": "off",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "warn",
|
||||||
|
"@typescript-eslint/member-delimiter-style": "off",
|
||||||
|
"@stylistic/semi": ["error", "always",], // 控制行尾部分号
|
||||||
|
"@stylistic/brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||||
|
"@stylistic/comma-dangle": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
arrays: "always",
|
||||||
|
objects: "always",
|
||||||
|
imports: "never",
|
||||||
|
exports: "never",
|
||||||
|
functions: "never",
|
||||||
|
},
|
||||||
|
], // 数组和对象键值对最后一个逗号
|
||||||
|
"@stylistic/quotes": ["error", "double",],
|
||||||
|
"@typescript-eslint/space-before-function-paren": "off",
|
||||||
|
"@typescript-eslint/comma-spacing": ["off", { before: false,
|
||||||
|
after: true, },], // 使用eslint的,不用ts的
|
||||||
|
// "@typescript-eslint/strict-boolean-expressions": ["error", {
|
||||||
|
// allowString: false,
|
||||||
|
// },],
|
||||||
|
"@stylistic/object-property-newline": "warn",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pluginVue.configs["flat/essential"],
|
||||||
|
pluginVue.configs["flat/strongly-recommended"],
|
||||||
|
{
|
||||||
|
files: ["**/*.vue",],
|
||||||
|
plugins: {
|
||||||
|
"@stylistic": stylistic,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: { parser: tseslint.parser, },
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"vue/html-indent": ["error", 4,],
|
||||||
|
// "vue/max-attributes-per-line": ["error", {
|
||||||
|
// "singleline": {
|
||||||
|
// "max": 1,
|
||||||
|
// },
|
||||||
|
// "multiline": {
|
||||||
|
// "max": 1,
|
||||||
|
// },
|
||||||
|
// },],
|
||||||
|
"spaced-comment": "error",
|
||||||
|
"space-before-function-paren": "off",
|
||||||
|
"semi-spacing": ["error", {"before": false,
|
||||||
|
"after": true,},],
|
||||||
|
"@typescript-eslint/no-unused-vars": "warn",
|
||||||
|
"@stylistic/indent": ["error", 4, { SwitchCase: 1, },],
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-extra-semi": "off",
|
||||||
|
"@typescript-eslint/no-inferrable-types": "off",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "warn",
|
||||||
|
"@typescript-eslint/member-delimiter-style": "off",
|
||||||
|
"@stylistic/semi": ["error", "always",], // 控制行尾部分号
|
||||||
|
"@stylistic/brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||||
|
"@stylistic/comma-dangle": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
arrays: "always",
|
||||||
|
objects: "always",
|
||||||
|
imports: "never",
|
||||||
|
exports: "never",
|
||||||
|
functions: "never",
|
||||||
|
},
|
||||||
|
], // 数组和对象键值对最后一个逗号
|
||||||
|
"@stylistic/quotes": ["error", "double",],
|
||||||
|
"@typescript-eslint/space-before-function-paren": "off",
|
||||||
|
"@typescript-eslint/comma-spacing": ["off", { before: false,
|
||||||
|
after: true, },], // 使用eslint的,不用ts的
|
||||||
|
// "@typescript-eslint/strict-boolean-expressions": ["error", {
|
||||||
|
// allowString: false,
|
||||||
|
// },],
|
||||||
|
"@stylistic/object-property-newline": "warn",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
151
code/web/regulatory-management-util/eslint.config.js.bak
Normal file
151
code/web/regulatory-management-util/eslint.config.js.bak
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
import js from "@eslint/js";
|
||||||
|
import globals from "globals";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
import pluginVue from "eslint-plugin-vue";
|
||||||
|
// import json from "@eslint/json";
|
||||||
|
import css from "@eslint/css";
|
||||||
|
import { defineConfig } from "eslint/config";
|
||||||
|
import stylistic from "@stylistic/eslint-plugin";
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
{
|
||||||
|
name: "通用设置",
|
||||||
|
files: [
|
||||||
|
"src/**/*.{js,mjs,cjs,ts,mts,cts}",
|
||||||
|
"eslint.config.ts",
|
||||||
|
],
|
||||||
|
plugins: {
|
||||||
|
js,
|
||||||
|
"@stylistic": stylistic,
|
||||||
|
},
|
||||||
|
extends: ["js/recommended",],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.node, },
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"no-trailing-spaces": ["error", {"ignoreComments": true,},],
|
||||||
|
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
||||||
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
|
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
|
"no-unused-vars": "warn",
|
||||||
|
"semi-spacing": ["error", {"before": false,
|
||||||
|
"after": true,},], // 控制行尾部分号
|
||||||
|
"quotes": ["error", "double",],
|
||||||
|
"comma-dangle": ["error", {
|
||||||
|
arrays: "always",
|
||||||
|
objects: "always",
|
||||||
|
imports: "never",
|
||||||
|
exports: "never",
|
||||||
|
functions: "never",
|
||||||
|
},], // 数组和对象键值对最后一个逗号
|
||||||
|
"comma-style": ["error", "last",], // 逗号在行位
|
||||||
|
"no-undef-init": "error",
|
||||||
|
"no-invalid-this": "error",
|
||||||
|
"no-use-before-define": "error",
|
||||||
|
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
||||||
|
"brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||||
|
"prefer-const": "warn",
|
||||||
|
"space-before-function-paren": ["error", {
|
||||||
|
anonymous: "always",
|
||||||
|
named: "never",
|
||||||
|
asyncArrow: "always",
|
||||||
|
},],
|
||||||
|
"array-bracket-spacing": ["error", "never", {
|
||||||
|
singleValue: false,
|
||||||
|
objectsInArrays: false,
|
||||||
|
arraysInArrays: false,
|
||||||
|
},],
|
||||||
|
"comma-spacing": ["error", {
|
||||||
|
before: false,
|
||||||
|
after: true, },],
|
||||||
|
"@stylistic/quotes": ["error", "double",],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// vue设置
|
||||||
|
// pluginVue.configs["flat/base"],
|
||||||
|
pluginVue.configs["flat/essential"],
|
||||||
|
{
|
||||||
|
files: ["**/*.vue",],
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: { parser: tseslint.parser, },
|
||||||
|
},
|
||||||
|
// rules: {
|
||||||
|
// "vue/html-indent": ["error", 4,],
|
||||||
|
// "vue/max-attributes-per-line": ["error", {
|
||||||
|
// "singleline": {
|
||||||
|
// "max": 3,
|
||||||
|
// },
|
||||||
|
// "multiline": {
|
||||||
|
// "max": 2,
|
||||||
|
// },
|
||||||
|
// },],
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*.css",],
|
||||||
|
plugins: { css, },
|
||||||
|
language: "css/css",
|
||||||
|
extends: ["css/recommended",],
|
||||||
|
},
|
||||||
|
// Typescript设置
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
{
|
||||||
|
files: ["src/**/*.ts", "eslint.config.ts",],
|
||||||
|
plugins: {
|
||||||
|
"@stylistic": stylistic,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"spaced-comment": "error",
|
||||||
|
"space-before-function-paren": "off",
|
||||||
|
"semi-spacing": ["error", {"before": false,
|
||||||
|
"after": true,},],
|
||||||
|
"@typescript-eslint/no-unused-vars": "warn",
|
||||||
|
"@stylistic/indent": ["error", 4, { SwitchCase: 1, },],
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-extra-semi": "off",
|
||||||
|
"@typescript-eslint/no-inferrable-types": "off",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "warn",
|
||||||
|
"@typescript-eslint/member-delimiter-style": "off",
|
||||||
|
"@stylistic/semi": ["error", "always",], // 控制行尾部分号
|
||||||
|
"@stylistic/brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||||
|
"@stylistic/comma-dangle": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
arrays: "always",
|
||||||
|
objects: "always",
|
||||||
|
imports: "never",
|
||||||
|
exports: "never",
|
||||||
|
functions: "never",
|
||||||
|
},
|
||||||
|
], // 数组和对象键值对最后一个逗号
|
||||||
|
"@stylistic/quotes": ["error", "double",],
|
||||||
|
"@typescript-eslint/space-before-function-paren": "off",
|
||||||
|
"@typescript-eslint/comma-spacing": ["off", { before: false,
|
||||||
|
after: true, },], // 使用eslint的,不用ts的
|
||||||
|
// "@typescript-eslint/strict-boolean-expressions": ["error", {
|
||||||
|
// allowString: false,
|
||||||
|
// },],
|
||||||
|
"@stylistic/object-property-newline": "warn",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// files: ["**/*.json"],
|
||||||
|
// plugins: { json },
|
||||||
|
// language: "json/json",
|
||||||
|
// extends: ["json/recommended"],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// files: ["**/*.jsonc"],
|
||||||
|
// plugins: { json },
|
||||||
|
// language: "json/jsonc",
|
||||||
|
// extends: ["json/recommended"],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// files: ["**/*.json5"],
|
||||||
|
// plugins: { json },
|
||||||
|
// language: "json/json5",
|
||||||
|
// extends: ["json/recommended"],
|
||||||
|
// },
|
||||||
|
]);
|
||||||
169
code/web/regulatory-management-util/eslint.config.ts
Normal file
169
code/web/regulatory-management-util/eslint.config.ts
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
import js from "@eslint/js";
|
||||||
|
import globals from "globals";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
import pluginVue from "eslint-plugin-vue";
|
||||||
|
import { defineConfig } from "eslint/config";
|
||||||
|
import stylistic from "@stylistic/eslint-plugin";
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
{
|
||||||
|
name: "通用设置",
|
||||||
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts,vue}",],
|
||||||
|
plugins: { js, },
|
||||||
|
extends: ["js/recommended",],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.node,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rules:{
|
||||||
|
// indent: ["warn", 4,],
|
||||||
|
// 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格
|
||||||
|
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
||||||
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
|
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
|
"no-unused-vars": "warn",
|
||||||
|
semi: ["error", "always",], // 控制行尾部分号
|
||||||
|
quotes: ["error", "double",],
|
||||||
|
"comma-dangle": ["error", {
|
||||||
|
arrays: "always",
|
||||||
|
objects: "always",
|
||||||
|
imports: "never",
|
||||||
|
exports: "never",
|
||||||
|
functions: "never",
|
||||||
|
},], // 数组和对象键值对最后一个逗号
|
||||||
|
"comma-style": ["error", "last",], // 逗号在行尾
|
||||||
|
"no-undef-init": "error",
|
||||||
|
"no-invalid-this": "error",
|
||||||
|
"no-use-before-define": "error",
|
||||||
|
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
||||||
|
"comma-spacing": ["error", { before: false,
|
||||||
|
after: true, },],
|
||||||
|
"array-bracket-spacing": ["error", "never", {
|
||||||
|
singleValue: false,
|
||||||
|
objectsInArrays: false,
|
||||||
|
arraysInArrays: false,
|
||||||
|
},],
|
||||||
|
"brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||||
|
"prefer-const": "warn",
|
||||||
|
"space-before-function-paren": ["error", {
|
||||||
|
anonymous: "always",
|
||||||
|
named: "never",
|
||||||
|
asyncArrow: "always",
|
||||||
|
},],
|
||||||
|
"@stylistic/no-trailing-spaces": [ // 不允许末尾的空格
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"skipBlankLines": false,
|
||||||
|
"ignoreComments": false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
{
|
||||||
|
files: ["src/**/*.ts", "eslint.config.ts",],
|
||||||
|
plugins: {
|
||||||
|
"@stylistic": stylistic,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: { parser: tseslint.parser, },
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"spaced-comment": "error",
|
||||||
|
"space-before-function-paren": "off",
|
||||||
|
"semi-spacing": ["error", { before: false,
|
||||||
|
after: true, },],
|
||||||
|
"@typescript-eslint/no-unused-vars": "warn",
|
||||||
|
"@stylistic/indent": ["error", 4, { SwitchCase: 1, },],
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-extra-semi": "off",
|
||||||
|
"@typescript-eslint/no-inferrable-types": "off",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "warn",
|
||||||
|
"@typescript-eslint/member-delimiter-style": "off",
|
||||||
|
"@stylistic/semi": ["error", "always",], // 控制行尾部分号
|
||||||
|
"@stylistic/brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||||
|
"@stylistic/comma-dangle": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
arrays: "always",
|
||||||
|
objects: "always",
|
||||||
|
imports: "never",
|
||||||
|
exports: "never",
|
||||||
|
functions: "never",
|
||||||
|
},
|
||||||
|
], // 数组和对象键值对最后一个逗号
|
||||||
|
"@stylistic/quotes": ["error", "double",],
|
||||||
|
"@typescript-eslint/space-before-function-paren": "off",
|
||||||
|
"@typescript-eslint/comma-spacing": [
|
||||||
|
"off",
|
||||||
|
{ before: false,
|
||||||
|
after: true, },
|
||||||
|
], // 使用eslint的,不用ts的
|
||||||
|
// "@typescript-eslint/strict-boolean-expressions": ["error", {
|
||||||
|
// allowString: false,
|
||||||
|
// },],
|
||||||
|
"@stylistic/object-property-newline": "warn",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pluginVue.configs["flat/essential"],
|
||||||
|
pluginVue.configs["flat/strongly-recommended"],
|
||||||
|
{
|
||||||
|
files: ["**/*.vue", "**/.ts", "eslint.config.ts",],
|
||||||
|
plugins: {
|
||||||
|
"@stylistic": stylistic,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: { parser: tseslint.parser, },
|
||||||
|
ecmaVersion: "latest",
|
||||||
|
sourceType: "module",
|
||||||
|
globals: globals.browser,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"vue/html-indent": ["error", 4,],
|
||||||
|
// "vue/max-attributes-per-line": ["error", {
|
||||||
|
// "singleline": {
|
||||||
|
// "max": 1,
|
||||||
|
// },
|
||||||
|
// "multiline": {
|
||||||
|
// "max": 1,
|
||||||
|
// },
|
||||||
|
// },],
|
||||||
|
"spaced-comment": "error",
|
||||||
|
"space-before-function-paren": "off",
|
||||||
|
"semi-spacing": ["error", { before: false,
|
||||||
|
after: true, },],
|
||||||
|
"@typescript-eslint/no-unused-vars": "warn",
|
||||||
|
"@stylistic/indent": ["error", 4, { SwitchCase: 1, },],
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-extra-semi": "off",
|
||||||
|
"@typescript-eslint/no-inferrable-types": "off",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "warn",
|
||||||
|
"@typescript-eslint/member-delimiter-style": "off",
|
||||||
|
"@stylistic/semi": ["error", "always",], // 控制行尾部分号
|
||||||
|
"@stylistic/brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||||
|
"@stylistic/comma-dangle": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
arrays: "always",
|
||||||
|
objects: "always",
|
||||||
|
imports: "never",
|
||||||
|
exports: "never",
|
||||||
|
functions: "never",
|
||||||
|
},
|
||||||
|
], // 数组和对象键值对最后一个逗号
|
||||||
|
"@stylistic/quotes": ["error", "double",],
|
||||||
|
"@typescript-eslint/space-before-function-paren": "off",
|
||||||
|
"@typescript-eslint/comma-spacing": [
|
||||||
|
"off",
|
||||||
|
{ before: false,
|
||||||
|
after: true, },
|
||||||
|
], // 使用eslint的,不用ts的
|
||||||
|
// "@typescript-eslint/strict-boolean-expressions": ["error", {
|
||||||
|
// allowString: false,
|
||||||
|
// },],
|
||||||
|
"@stylistic/object-property-newline": "warn",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
1716
code/web/regulatory-management-util/package-lock.json
generated
1716
code/web/regulatory-management-util/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -10,33 +10,44 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"scss": "^0.2.4",
|
"scss": "^0.2.4",
|
||||||
"vue": "^3.5.26",
|
"vue": "^3.5.28",
|
||||||
"vue-router": "^4.6.4"
|
"vue-router": "^5.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@element-plus/icons-vue": "^2.3.2",
|
"@element-plus/icons-vue": "^2.3.2",
|
||||||
"@stylistic/eslint-plugin": "^5.6.1",
|
"@eslint/css": "^0.14.1",
|
||||||
"@types/node": "^25.0.3",
|
"@eslint/js": "^10.0.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.51.0",
|
"@eslint/json": "^1.0.1",
|
||||||
"@typescript-eslint/parser": "^8.51.0",
|
"@stylistic/eslint-plugin": "^5.8.0",
|
||||||
"@vitejs/plugin-vue": "^6.0.3",
|
"@stylistic/eslint-plugin-js": "^4.4.1",
|
||||||
|
"@stylistic/eslint-plugin-jsx": "^4.4.1",
|
||||||
|
"@stylistic/eslint-plugin-plus": "^4.4.1",
|
||||||
|
"@stylistic/eslint-plugin-ts": "^4.4.1",
|
||||||
|
"@types/node": "^25.2.3",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^8.55.0",
|
||||||
|
"@typescript-eslint/parser": "^8.55.0",
|
||||||
|
"@vitejs/plugin-vue": "^6.0.4",
|
||||||
"@vue-office/docx": "^1.6.3",
|
"@vue-office/docx": "^1.6.3",
|
||||||
"@vue-office/excel": "^1.7.14",
|
"@vue-office/excel": "^1.7.14",
|
||||||
"@vue-office/pdf": "^2.0.10",
|
"@vue-office/pdf": "^2.0.10",
|
||||||
"@vue/tsconfig": "^0.8.1",
|
"@vue/tsconfig": "^0.8.1",
|
||||||
"axios": "^1.13.2",
|
"axios": "^1.13.5",
|
||||||
"element-plus": "^2.13.0",
|
"element-plus": "^2.13.2",
|
||||||
"eslint": "^9.39.2",
|
"eslint": "^10.0.0",
|
||||||
"eslint-plugin-vue": "^10.6.2",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"lodash": "^4.17.21",
|
"eslint-plugin-vue": "^10.7.0",
|
||||||
"lodash-es": "^4.17.22",
|
"globals": "^17.3.0",
|
||||||
|
"jiti": "^2.6.1",
|
||||||
|
"lodash": "^4.17.23",
|
||||||
|
"lodash-es": "^4.17.23",
|
||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
"sass": "^1.97.1",
|
"sass": "^1.97.3",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"vite": "^7.3.0",
|
"typescript-eslint": "^8.55.0",
|
||||||
|
"vite": "^7.3.1",
|
||||||
"vue-demi": "^0.14.10",
|
"vue-demi": "^0.14.10",
|
||||||
"vue-eslint-parser": "^10.2.0",
|
"vue-eslint-parser": "^10.2.0",
|
||||||
"vue-pdf-embed": "^2.1.3",
|
"vue-pdf-embed": "^2.1.3",
|
||||||
"vue-tsc": "^3.2.1"
|
"vue-tsc": "^3.2.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src="/vite.svg"
|
|
||||||
class="logo"
|
class="logo"
|
||||||
|
src="/vite.svg"
|
||||||
alt="Vite logo"
|
alt="Vite logo"
|
||||||
>
|
>
|
||||||
</a>
|
</a>
|
||||||
@@ -28,17 +28,17 @@ import HelloWorld from "./components/HelloWorld.vue";
|
|||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.logo {
|
.logo {
|
||||||
height: 6em;
|
height: 6em;
|
||||||
padding: 1.5em;
|
padding: 1.5em;
|
||||||
will-change: filter;
|
will-change: filter;
|
||||||
transition: filter 300ms;
|
transition: filter 300ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo:hover {
|
.logo:hover {
|
||||||
filter: drop-shadow(0 0 2em #646cffaa);
|
filter: drop-shadow(0 0 2em #646cffaa);
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo.vue:hover {
|
.logo.vue:hover {
|
||||||
filter: drop-shadow(0 0 2em #42b883aa);
|
filter: drop-shadow(0 0 2em #42b883aa);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,9 +1,3 @@
|
|||||||
<!--
|
|
||||||
author: Kane Wang <wangkane@qq.com>
|
|
||||||
date: 2025-10-14 15:57:34
|
|
||||||
component: AppMain
|
|
||||||
Copyright © CPIC All rights reserved
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<router-view />
|
<router-view />
|
||||||
</template>
|
</template>
|
||||||
@@ -11,7 +5,7 @@ Copyright © CPIC All rights reserved
|
|||||||
export default {
|
export default {
|
||||||
name: "AppMain",
|
name: "AppMain",
|
||||||
components: [],
|
components: [],
|
||||||
setup() {},
|
setup() { },
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="sass" scoped></style>
|
<style lang="sass" scoped></style>
|
||||||
@@ -1,12 +1,3 @@
|
|||||||
<!--
|
|
||||||
* @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>
|
<template>
|
||||||
<el-container class="layout-container">
|
<el-container class="layout-container">
|
||||||
<el-header class="layout-header">
|
<el-header class="layout-header">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!--
|
<!--
|
||||||
author: Kane Wang <wangkane@qq.com>
|
author: Kane Wang <wangkane@qq.com>
|
||||||
date: 2025-10-23 15:32:30
|
date: 2025-10-23 17:52:01
|
||||||
component: Header
|
component: Header
|
||||||
Copyright © CPIC All rights reserved
|
Copyright © CPIC All rights reserved
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import * as ElementPlusIconsVue from "@element-plus/icons-vue";
|
|||||||
|
|
||||||
import "element-plus/dist/index.css";
|
import "element-plus/dist/index.css";
|
||||||
|
|
||||||
// eslint-disable-next-line
|
|
||||||
const app = createApp( AppMain );
|
const app = createApp( AppMain );
|
||||||
|
|
||||||
app.use( ElementPlus );
|
app.use( ElementPlus );
|
||||||
@@ -29,5 +28,4 @@ for ( const [key, component,] of Object.entries( ElementPlusIconsVue ))
|
|||||||
|
|
||||||
app.mount( "#app" );
|
app.mount( "#app" );
|
||||||
|
|
||||||
// eslint-disable-next-line
|
|
||||||
// createApp( App ).mount( "#app" );
|
// createApp( App ).mount( "#app" );
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ interface RegulatoryData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface RegulatoryFile {
|
interface RegulatoryFile {
|
||||||
|
regulatory_file_name_original: string;
|
||||||
regulatory_file_name: string;
|
regulatory_file_name: string;
|
||||||
file_url: string;
|
file_url: string;
|
||||||
local_file_path: string;
|
local_file_path: string;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane Wang <wangkane@qq.com>
|
* @Author: Kane Wang <wangkane@qq.com>
|
||||||
* @Date: 2025-11-21 10:19:11
|
* @Date: 2025-11-21 10:19:11
|
||||||
* @LastEditors: Kane Wang
|
* @LastEditors: Kane Wang
|
||||||
* @LastModified: 2025-11-27 17:41:28
|
* @LastModified: 2026-02-06 17:43:15
|
||||||
* @FilePath: src/types/upload_file.ts
|
* @FilePath: src/types/upload_file.ts
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@@ -18,6 +18,7 @@ interface UploadFileResponse
|
|||||||
|
|
||||||
interface UploadedFile
|
interface UploadedFile
|
||||||
{
|
{
|
||||||
|
originFileName: string;
|
||||||
fileName: string;
|
fileName: string;
|
||||||
absoluteFilePath: string;
|
absoluteFilePath: string;
|
||||||
relativeFilePath: string;
|
relativeFilePath: string;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ const API_URL= {
|
|||||||
URL_UPLOAD_FILE: import.meta.env.VITE_APP_URL_UPLOAD_FILE,
|
URL_UPLOAD_FILE: import.meta.env.VITE_APP_URL_UPLOAD_FILE,
|
||||||
URL_MOVE_FILE: import.meta.env.VITE_APP_URL_MOVE_FILE,
|
URL_MOVE_FILE: import.meta.env.VITE_APP_URL_MOVE_FILE,
|
||||||
URL_PREFIX: import.meta.env.VITE_APP_URL_PREFIX,
|
URL_PREFIX: import.meta.env.VITE_APP_URL_PREFIX,
|
||||||
|
URL_ADD_NEW_REGULATORY: import.meta.env.VITE_APP_URL_ADD_NEW_REGULATORY,
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log( API_URL );
|
console.log( API_URL );
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane Wang <wangkane@qq.com>
|
* @Author: Kane Wang <wangkane@qq.com>
|
||||||
* @Date: 2026-01-05 10:42:42
|
* @Date: 2026-01-05 10:42:42
|
||||||
* @LastEditors: Kane Wang
|
* @LastEditors: Kane Wang
|
||||||
* @LastModified: 2026-01-05 19:18:56
|
* @LastModified: 2026-02-04 15:37:20
|
||||||
* @FilePath: src/utils/regulatory_utils.ts
|
* @FilePath: src/utils/regulatory_utils.ts
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@@ -18,9 +18,57 @@ interface AddNewRegulatoryResponse
|
|||||||
message: string;
|
message: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addNewRegulatory( regulatory: RegulatoryData, render: any ): void
|
interface Render {
|
||||||
|
( resonse: AddNewRegulatoryResponse ) :void, }
|
||||||
|
|
||||||
|
type CallBackRender = ( response: AddNewRegulatoryResponse ) => void;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param regulatory RegulatoryData类型制度对象,用于发送请求。
|
||||||
|
* @param render 回调函数,请求成功后调用。
|
||||||
|
*/
|
||||||
|
function addNewRegulatory( regulatory: RegulatoryData, render: Render ): void
|
||||||
{
|
{
|
||||||
const url = API_URL.URL_UPLOAD_FILE;
|
// const url = API_URL.URL_ADD_NEW_REGULATORY;
|
||||||
|
|
||||||
|
// 响应对象
|
||||||
|
const resp: AddNewRegulatoryResponse = {
|
||||||
|
success: false,
|
||||||
|
message: "",
|
||||||
|
};
|
||||||
|
|
||||||
|
service.request({
|
||||||
|
method:"post",
|
||||||
|
url: API_URL.URL_ADD_NEW_REGULATORY,
|
||||||
|
data: regulatory,
|
||||||
|
})
|
||||||
|
.then(( response ):void=>
|
||||||
|
{
|
||||||
|
const data = response.data ?? {};
|
||||||
|
|
||||||
|
resp.success = data.success ?? false;
|
||||||
|
resp.message = data.message ?? "服务器没有返回调用结果消息,请检查日志!";
|
||||||
|
|
||||||
|
if ( render !== undefined )
|
||||||
|
{
|
||||||
|
render( resp );
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(( error ): void=>
|
||||||
|
{
|
||||||
|
resp.success = false;
|
||||||
|
resp.message = String( error );
|
||||||
|
|
||||||
|
if ( render !== undefined )
|
||||||
|
{
|
||||||
|
render( resp );
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export {addNewRegulatory, type AddNewRegulatoryResponse};
|
export {
|
||||||
|
addNewRegulatory,
|
||||||
|
type AddNewRegulatoryResponse,
|
||||||
|
type Render,
|
||||||
|
type CallBackRender
|
||||||
|
};
|
||||||
@@ -53,4 +53,35 @@ function getFileType( filePath: string ): string
|
|||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
export { getFileType };
|
/**
|
||||||
|
* 检查文件名中是否有无法使用的字符。
|
||||||
|
* @param filename 文件名字符串。
|
||||||
|
* @returns 检查结果。true 无问题;false表示文件名含有不合适的字符。
|
||||||
|
*/
|
||||||
|
function checkFileName( filename: string ): boolean
|
||||||
|
{
|
||||||
|
let result = true;
|
||||||
|
|
||||||
|
for ( const c of filename )
|
||||||
|
{
|
||||||
|
switch ( c )
|
||||||
|
{
|
||||||
|
case "%":
|
||||||
|
case " ":
|
||||||
|
case "+":
|
||||||
|
case "/":
|
||||||
|
case "?":
|
||||||
|
case "&":
|
||||||
|
case "#":
|
||||||
|
case "=":
|
||||||
|
result = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
export { getFileType, checkFileName };
|
||||||
@@ -12,7 +12,11 @@ Copyright © CPIC All rights reserved
|
|||||||
<span>名称</span>
|
<span>名称</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model.trim.lazy="ui.newRegulatory.regulatory_name" style="text-align:center;" />
|
<el-input
|
||||||
|
ref="regulatoryName"
|
||||||
|
v-model.trim.lazy="ui.newRegulatory.regulatory_name"
|
||||||
|
style="text-align:center;"
|
||||||
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
@@ -20,7 +24,10 @@ Copyright © CPIC All rights reserved
|
|||||||
<span>部门</span>
|
<span>部门</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-input v-model.trim="ui.newRegulatory.department_name" />
|
<el-input
|
||||||
|
ref="departmentName"
|
||||||
|
v-model.trim="ui.newRegulatory.department_name"
|
||||||
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2">
|
<el-col :span="2">
|
||||||
<span>发布、修订年份</span>
|
<span>发布、修订年份</span>
|
||||||
@@ -34,13 +41,21 @@ Copyright © CPIC All rights reserved
|
|||||||
<span>备注</span>
|
<span>备注</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model.lazy.trim="ui.newRegulatory.comment" type="textarea" :rows="3" />
|
<el-input
|
||||||
|
v-model.lazy.trim="ui.newRegulatory.comment"
|
||||||
|
type="textarea"
|
||||||
|
:rows="3"
|
||||||
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<div class="button-wrapper-left">
|
<div class="button-wrapper-left">
|
||||||
<el-button type="primary" icon="document" @click="showUploadFileDialog">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="document"
|
||||||
|
@click="showUploadFileDialog"
|
||||||
|
>
|
||||||
新增文档
|
新增文档
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -49,8 +64,9 @@ Copyright © CPIC All rights reserved
|
|||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<div class="button-wrapper-right">
|
<div class="button-wrapper-right">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary" icon="document"
|
type="primary"
|
||||||
@click="onPreviewUploadedFile(1)"
|
icon="document"
|
||||||
|
@click="onCreateNewRegulatory()"
|
||||||
>
|
>
|
||||||
提交
|
提交
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -59,32 +75,46 @@ Copyright © CPIC All rights reserved
|
|||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
width="100%" stripe
|
width="100%"
|
||||||
|
stripe
|
||||||
border="true"
|
border="true"
|
||||||
:head-cell-style="headerCellStyle"
|
:head-cell-style="headerCellStyle"
|
||||||
:row-class-name="tableRowClassName"
|
:row-class-name="tableRowClassName"
|
||||||
empty-text="请上传文件"
|
empty-text="请上传文件"
|
||||||
:data="ui.newRegulatory.regulatory_files"
|
:data="ui.newRegulatory.regulatory_files"
|
||||||
>
|
>
|
||||||
<el-table-column label="文件名" align="center">
|
<el-table-column
|
||||||
|
label="文件名"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
<template #default="file">
|
<template #default="file">
|
||||||
<span>{{ file.row.regulatory_file_name }}</span>
|
<span>{{ file.row.regulatory_file_name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="文件类型" align="center" width="200px">
|
<el-table-column
|
||||||
|
label="文件类型"
|
||||||
|
align="center"
|
||||||
|
width="200px"
|
||||||
|
>
|
||||||
<template #default="file">
|
<template #default="file">
|
||||||
<span>{{ file.row.file_type }}</span>
|
<span>{{ file.row.file_type }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="200px">
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
width="200px"
|
||||||
|
>
|
||||||
<template #default="file">
|
<template #default="file">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary" icon="search"
|
type="primary"
|
||||||
|
icon="search"
|
||||||
circle
|
circle
|
||||||
@click="onPreviewUploadedFile(file.row.rowIndex)"
|
@click="onPreviewUploadedFile(file.row.rowIndex)"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="danger" icon="delete"
|
type="danger"
|
||||||
|
icon="delete"
|
||||||
circle
|
circle
|
||||||
@click="onDeleteUploadedFile(file.row.rowIndex)"
|
@click="onDeleteUploadedFile(file.row.rowIndex)"
|
||||||
/>
|
/>
|
||||||
@@ -93,9 +123,11 @@ Copyright © CPIC All rights reserved
|
|||||||
</el-table>
|
</el-table>
|
||||||
<div class="upload-dialog-wrapper">
|
<div class="upload-dialog-wrapper">
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="ui.showUploadDialog" title="上传文件"
|
v-model="ui.showUploadDialog"
|
||||||
|
title="上传文件"
|
||||||
width="600px"
|
width="600px"
|
||||||
:close-on-click-model="false" :close-on-press-escape="false"
|
:close-on-click-model="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
>
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
@@ -105,6 +137,7 @@ Copyright © CPIC All rights reserved
|
|||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:data="ui.uploadParameters"
|
:data="ui.uploadParameters"
|
||||||
:on-success="onUploadSuccess"
|
:on-success="onUploadSuccess"
|
||||||
|
:before-upload="onBeforeUpload"
|
||||||
>
|
>
|
||||||
<el-icon class="el-icon--upload">
|
<el-icon class="el-icon--upload">
|
||||||
<upload-filled />
|
<upload-filled />
|
||||||
@@ -115,7 +148,8 @@ Copyright © CPIC All rights reserved
|
|||||||
</el-upload>
|
</el-upload>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="ui.isPDF" :close-on-click-model="false"
|
v-model="ui.isPDF"
|
||||||
|
:close-on-click-model="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
align-center
|
align-center
|
||||||
@@ -123,13 +157,15 @@ Copyright © CPIC All rights reserved
|
|||||||
width="1024px"
|
width="1024px"
|
||||||
>
|
>
|
||||||
<VueOfficePdf
|
<VueOfficePdf
|
||||||
v-if="ui.isPDF" :src="ui.fileURL"
|
v-if="ui.isPDF"
|
||||||
|
:src="ui.fileURL"
|
||||||
style="height:calc(100vh - 100px);"
|
style="height:calc(100vh - 100px);"
|
||||||
@error="errorHandle"
|
@error="errorHandle"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="ui.isDOCX" :close-on-click-model="false"
|
v-model="ui.isDOCX"
|
||||||
|
:close-on-click-model="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
align-center
|
align-center
|
||||||
@@ -137,13 +173,15 @@ Copyright © CPIC All rights reserved
|
|||||||
width="1024px"
|
width="1024px"
|
||||||
>
|
>
|
||||||
<VueOfficeDocx
|
<VueOfficeDocx
|
||||||
v-if="ui.isDOCX" :src="ui.fileURL"
|
v-if="ui.isDOCX"
|
||||||
|
:src="ui.fileURL"
|
||||||
style="height:calc(100vh - 100px);"
|
style="height:calc(100vh - 100px);"
|
||||||
@error="errorHandle"
|
@error="errorHandle"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="ui.isXLSX" :close-on-click-model="false"
|
v-model="ui.isXLSX"
|
||||||
|
:close-on-click-model="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
align-center
|
align-center
|
||||||
@@ -162,7 +200,8 @@ Copyright © CPIC All rights reserved
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {reactive, ref} from "vue";
|
import {reactive, ref} from "vue";
|
||||||
import { type UploadProps, type UploadFile, type UploadFiles, ElMessage, ElMessageBox } from "element-plus";
|
import { type UploadProps, type UploadFile, type UploadFiles, ElMessage, ElMessageBox } from "element-plus";
|
||||||
import {type RegulatoryData, type RegulatoryFile} from "@/types/regulatory/regulatory.ts";
|
import { type RegulatoryData, type RegulatoryFile} from "@/types/regulatory/regulatory.ts";
|
||||||
|
import { addNewRegulatory, type AddNewRegulatoryResponse, type Render} from "@/utils/regulatory_utils.ts";
|
||||||
import { type UploadedFile, type UploadFileResponse } from "@/types/upload_file.ts";
|
import { type UploadedFile, type UploadFileResponse } from "@/types/upload_file.ts";
|
||||||
import {API_URL} from "@/utils/config.ts";
|
import {API_URL} from "@/utils/config.ts";
|
||||||
import { getFileType } from "@/utils/utils";
|
import { getFileType } from "@/utils/utils";
|
||||||
@@ -170,7 +209,7 @@ import VueOfficePdf from "@vue-office/pdf";
|
|||||||
import VueOfficeDocx from "@vue-office/docx";
|
import VueOfficeDocx from "@vue-office/docx";
|
||||||
import VueOfficeExcel from "@vue-office/excel";
|
import VueOfficeExcel from "@vue-office/excel";
|
||||||
|
|
||||||
//引入相关样式
|
// 引入相关样式
|
||||||
import "@vue-office/docx/lib/index.css";
|
import "@vue-office/docx/lib/index.css";
|
||||||
import "@vue-office/excel/lib/index.css";
|
import "@vue-office/excel/lib/index.css";
|
||||||
|
|
||||||
@@ -192,7 +231,9 @@ interface UI{
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "NewRegulatory",
|
name: "NewRegulatory",
|
||||||
components: {VueOfficePdf, VueOfficeDocx, VueOfficeExcel,},
|
components: {VueOfficePdf,
|
||||||
|
VueOfficeDocx,
|
||||||
|
VueOfficeExcel,},
|
||||||
setup()
|
setup()
|
||||||
{
|
{
|
||||||
const ui: UI = reactive({
|
const ui: UI = reactive({
|
||||||
@@ -217,6 +258,15 @@ export default {
|
|||||||
fileURL: "",
|
fileURL: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const regulatoryName = ref<any>( null );
|
||||||
|
|
||||||
|
|
||||||
|
const render: Render = function ( response: AddNewRegulatoryResponse ) :void
|
||||||
|
{
|
||||||
|
// if ( response.success === true )
|
||||||
|
// { }
|
||||||
|
};
|
||||||
|
|
||||||
const headerCellStyle = reactive(
|
const headerCellStyle = reactive(
|
||||||
{
|
{
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
@@ -231,7 +281,7 @@ export default {
|
|||||||
ui.showUploadDialog = true;
|
ui.showUploadDialog = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*表格操作相关 */
|
/* 表格操作相关 */
|
||||||
/**
|
/**
|
||||||
* 删除对应的上传文件记录。
|
* 删除对应的上传文件记录。
|
||||||
* @param rowId 行号
|
* @param rowId 行号
|
||||||
@@ -255,14 +305,12 @@ export default {
|
|||||||
ui.newRegulatory.regulatory_files?.splice( rowId, 1 );
|
ui.newRegulatory.regulatory_files?.splice( rowId, 1 );
|
||||||
})
|
})
|
||||||
.catch(()=>{});
|
.catch(()=>{});
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onPreviewUploadedFile = ( rowId: number ): void =>
|
const onPreviewUploadedFile = ( rowId: number ): void =>
|
||||||
{
|
{
|
||||||
// ui.showPreviewDialog = true;
|
// ui.showPreviewDialog = true;
|
||||||
ui.fileURL = ui.newRegulatory.regulatory_files[rowId]?.file_url + "/" + ui.newRegulatory.regulatory_files[rowId]?.regulatory_file_name;
|
ui.fileURL = encodeURI( ui.newRegulatory.regulatory_files[rowId]?.file_url + "/" + ui.newRegulatory.regulatory_files[rowId]?.regulatory_file_name );
|
||||||
|
|
||||||
console.log( "完整路径:", ui.fileURL );
|
console.log( "完整路径:", ui.fileURL );
|
||||||
|
|
||||||
@@ -291,7 +339,8 @@ export default {
|
|||||||
* 其中给row加一个参数rowIndex,用行号赋值。
|
* 其中给row加一个参数rowIndex,用行号赋值。
|
||||||
* @param element-plus给于的参数
|
* @param element-plus给于的参数
|
||||||
*/
|
*/
|
||||||
const tableRowClassName = ({row, rowIndex,}: {row:any, rowIndex:number}): void =>
|
const tableRowClassName = ({row, rowIndex,}: {row:any,
|
||||||
|
rowIndex:number}): void =>
|
||||||
{
|
{
|
||||||
console.log( `行${row}设置行号${rowIndex}。` );
|
console.log( `行${row}设置行号${rowIndex}。` );
|
||||||
|
|
||||||
@@ -300,13 +349,13 @@ export default {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传成功的响应函数。
|
* 上传成功的响应函数。
|
||||||
* @param response
|
* @param response
|
||||||
* @param uploadFile
|
* @param uploadFile
|
||||||
* @param uploadFiles
|
* @param uploadFiles
|
||||||
*/
|
*/
|
||||||
const onUploadSuccess: UploadProps["onSuccess"] = ( response: UploadFileResponse, uploadFile: UploadFile, uploadFiles: UploadFiles ): void =>
|
const onUploadSuccess: UploadProps["onSuccess"] = ( response: UploadFileResponse, uploadFile: UploadFile, uploadFiles: UploadFiles ): void =>
|
||||||
{
|
{
|
||||||
console.log( `上传制度文件响应:${response}` );
|
console.log( "上传制度文件响应:", response.fileList );
|
||||||
console.log( `上传文件:${uploadFile}` );
|
console.log( `上传文件:${uploadFile}` );
|
||||||
console.log( `上传多文件:${uploadFiles}` );
|
console.log( `上传多文件:${uploadFiles}` );
|
||||||
|
|
||||||
@@ -333,6 +382,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const uploadedFile: RegulatoryFile = {
|
const uploadedFile: RegulatoryFile = {
|
||||||
|
regulatory_file_name_original: response.fileList[0].originFileName ?? "",
|
||||||
regulatory_file_name: response.fileList[0].fileName ?? "",
|
regulatory_file_name: response.fileList[0].fileName ?? "",
|
||||||
local_file_path: response.fileList[0]?.absoluteFilePath ?? "",
|
local_file_path: response.fileList[0]?.absoluteFilePath ?? "",
|
||||||
file_type: getFileType( response.fileList[0]?.fileName ),
|
file_type: getFileType( response.fileList[0]?.fileName ),
|
||||||
@@ -359,13 +409,39 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onBeforeUpload = ( uploadFile: UploadFile ): boolean =>
|
||||||
|
{
|
||||||
|
let result = true;
|
||||||
|
|
||||||
|
console.log( "上传的文件名", uploadFile.name );
|
||||||
|
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
const errorHandle = ()=>
|
const errorHandle = ()=>
|
||||||
{
|
{
|
||||||
ElMessage.error( "渲染文档出错!" );
|
ElMessage.error( "渲染文档出错!" );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建新制度事件
|
||||||
|
*/
|
||||||
|
const onCreateNewRegulatory = () =>
|
||||||
|
{
|
||||||
|
console.log( "制度对象:", ui.newRegulatory );
|
||||||
|
|
||||||
|
// 防御验证
|
||||||
|
if ( ui.newRegulatory.department_name.length === 0 )
|
||||||
|
{
|
||||||
|
ElMessage.error( "制度名称为空!" );
|
||||||
|
console.log( regulatoryName );
|
||||||
|
regulatoryName.value.focus();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
ui,
|
ui,
|
||||||
|
regulatoryName,
|
||||||
headerCellStyle,
|
headerCellStyle,
|
||||||
cellStyle,
|
cellStyle,
|
||||||
onUploadSuccess,
|
onUploadSuccess,
|
||||||
@@ -373,6 +449,8 @@ export default {
|
|||||||
showUploadFileDialog,
|
showUploadFileDialog,
|
||||||
onDeleteUploadedFile,
|
onDeleteUploadedFile,
|
||||||
onPreviewUploadedFile,
|
onPreviewUploadedFile,
|
||||||
|
onCreateNewRegulatory,
|
||||||
|
onBeforeUpload,
|
||||||
errorHandle,
|
errorHandle,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
139
开发日志.md
139
开发日志.md
@@ -160,3 +160,142 @@ new Error().stack.split('\n');
|
|||||||
new Error().stack!.split('\n');
|
new Error().stack!.split('\n');
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# mysql
|
||||||
|
|
||||||
|
my.cnf 文件
|
||||||
|
|
||||||
|
```
|
||||||
|
[client]
|
||||||
|
port = 3306
|
||||||
|
socket =/mysql/data/mysqltmp/mysqld.sock
|
||||||
|
default-character-set = utf8mb4
|
||||||
|
|
||||||
|
[mysql]
|
||||||
|
prompt = [\\u@\\h][\\d]>\\_
|
||||||
|
|
||||||
|
[mysqld]
|
||||||
|
# basic settings #
|
||||||
|
port = 3306 #服务器的端口号
|
||||||
|
#路径设置,必须和上文的一致
|
||||||
|
basedir = /mysql/mysql-9.5.0
|
||||||
|
datadir = /mysql/data/mysqldata_u01/mysqldb
|
||||||
|
socket = /mysql/data/mysqltmp/mysqld.sock
|
||||||
|
pid-file = /mysql/mysql-9.5.0/mysqld.pid
|
||||||
|
tmpdir = /mysql/data/mysqltmp
|
||||||
|
user = mysql
|
||||||
|
sql_mode = "STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER"
|
||||||
|
autocommit = 1
|
||||||
|
character_set_server=utf8mb4
|
||||||
|
transaction_isolation = READ-COMMITTED
|
||||||
|
explicit_defaults_for_timestamp = 1
|
||||||
|
max_allowed_packet = 96M
|
||||||
|
slave_pending_jobs_size_max= 100M
|
||||||
|
event_scheduler = 1
|
||||||
|
lower_case_table_names = 1
|
||||||
|
|
||||||
|
# connection #
|
||||||
|
interactive_timeout = 1800
|
||||||
|
wait_timeout = 1800
|
||||||
|
lock_wait_timeout = 1800
|
||||||
|
skip_name_resolve = 1
|
||||||
|
max_connections = 1000
|
||||||
|
max_user_connections = 1000
|
||||||
|
max_connect_errors = 10
|
||||||
|
|
||||||
|
# session memory setting #
|
||||||
|
read_buffer_size = 2M
|
||||||
|
read_rnd_buffer_size = 4M
|
||||||
|
sort_buffer_size = 4M
|
||||||
|
tmp_table_size = 8M
|
||||||
|
join_buffer_size = 8M
|
||||||
|
|
||||||
|
# log settings #
|
||||||
|
slow_query_log = 1
|
||||||
|
log-error =/mysqlslowlog/error.log
|
||||||
|
slow-query-log-file=/mysqlslowlog/slowquery.log
|
||||||
|
general_log_file = /mysqlslowlog/general.log
|
||||||
|
log_queries_not_using_indexes = 1
|
||||||
|
log_slow_admin_statements = 1
|
||||||
|
log_slow_slave_statements = 1
|
||||||
|
log_throttle_queries_not_using_indexes = 10
|
||||||
|
expire_logs_days = 5
|
||||||
|
long_query_time = 2
|
||||||
|
min_examined_row_limit = 100
|
||||||
|
binlog-rows-query-log-events = 1
|
||||||
|
log-bin-trust-function-creators = 1
|
||||||
|
log-slave-updates = 1
|
||||||
|
|
||||||
|
# innodb settings #
|
||||||
|
innodb_page_size = 16K
|
||||||
|
innodb_buffer_pool_size=20G
|
||||||
|
innodb_buffer_pool_instances = 16
|
||||||
|
innodb_buffer_pool_load_at_startup = 1
|
||||||
|
innodb_buffer_pool_dump_at_shutdown = 1
|
||||||
|
innodb_lru_scan_depth = 1024
|
||||||
|
innodb_lock_wait_timeout = 5
|
||||||
|
innodb_io_capacity = 2048
|
||||||
|
innodb_io_capacity_max = 4096
|
||||||
|
innodb_flush_method = O_DIRECT
|
||||||
|
innodb_file_format = Barracuda
|
||||||
|
innodb_file_format_max = Barracuda
|
||||||
|
innodb_undo_logs = 128
|
||||||
|
innodb_undo_tablespaces = 3
|
||||||
|
innodb_flush_neighbors = 1
|
||||||
|
innodb_log_file_size = 1G
|
||||||
|
innodb_log_files_in_group = 2
|
||||||
|
innodb_log_buffer_size = 2M
|
||||||
|
innodb_purge_threads = 4
|
||||||
|
innodb_large_prefix = 1
|
||||||
|
innodb_thread_concurrency = 16
|
||||||
|
innodb_print_all_deadlocks = 1
|
||||||
|
innodb_strict_mode = 1
|
||||||
|
innodb_sort_buffer_size = 4M
|
||||||
|
innodb_write_io_threads = 4
|
||||||
|
innodb_read_io_threads = 4
|
||||||
|
innodb_file_per_table = 1
|
||||||
|
innodb_stats_persistent_sample_pages = 64
|
||||||
|
innodb_autoinc_lock_mode = 2
|
||||||
|
|
||||||
|
# semi sync replication settings #
|
||||||
|
plugin_load = "validate_password.so;rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so"
|
||||||
|
rpl_semi_sync_master_enabled = 1
|
||||||
|
rpl_semi_sync_master_timeout = 3000
|
||||||
|
rpl_semi_sync_slave_enabled = 1
|
||||||
|
|
||||||
|
# password plugin #
|
||||||
|
#密码策略,密码16字节长,数字字母大小写和特殊字符,每种至少两个字符。
|
||||||
|
validate_password_policy=2
|
||||||
|
validate_password_length=16
|
||||||
|
validate_password_mixed_case_count=2
|
||||||
|
validate_password_number_count=2
|
||||||
|
validate_password_special_char_count=3
|
||||||
|
|
||||||
|
# 5.7 #
|
||||||
|
# new innodb setting #
|
||||||
|
loose_innodb_numa_interleave=1
|
||||||
|
innodb_buffer_pool_dump_pct = 40
|
||||||
|
innodb_page_cleaners = 4
|
||||||
|
innodb_undo_log_truncate = 1
|
||||||
|
innodb_max_undo_log_size = 2G
|
||||||
|
innodb_purge_rseg_truncate_frequency = 128
|
||||||
|
# new replication setting #
|
||||||
|
slave-parallel-type = LOGICAL_CLOCK
|
||||||
|
slave-parallel-workers = 8
|
||||||
|
slave_preserve_commit_order=1
|
||||||
|
slave_transaction_retries=128
|
||||||
|
# other change setting #
|
||||||
|
binlog_gtid_simple_recovery=1
|
||||||
|
log_timestamps=system
|
||||||
|
show_compatibility_56=on
|
||||||
|
|
||||||
|
# patch #
|
||||||
|
symbolic_links=0
|
||||||
|
```
|
||||||
|
|
||||||
|
初始化
|
||||||
|
|
||||||
|
```
|
||||||
|
/mysql/mysql-9.5.0/bin/mysqld --defaults-file=/etc/my.cnf --user=mysql --initialize --console
|
||||||
|
```
|
||||||
|
|
||||||
|
root密码 p)daqvACh5<s
|
||||||
|
|||||||
Reference in New Issue
Block a user