保存进度
This commit is contained in:
@@ -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",
|
||||
},
|
||||
},
|
||||
]);
|
||||
320
code/web/regulatory-management-util/package-lock.json
generated
320
code/web/regulatory-management-util/package-lock.json
generated
@@ -14,7 +14,14 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.2",
|
||||
"@eslint/css": "^0.14.1",
|
||||
"@eslint/js": "^9.39.2",
|
||||
"@eslint/json": "^1.0.0",
|
||||
"@stylistic/eslint-plugin": "^5.7.1",
|
||||
"@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.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
||||
"@typescript-eslint/parser": "^8.54.0",
|
||||
@@ -26,12 +33,16 @@
|
||||
"axios": "^1.13.4",
|
||||
"element-plus": "^2.13.2",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-vue": "^10.7.0",
|
||||
"globals": "^17.3.0",
|
||||
"jiti": "^2.6.1",
|
||||
"lodash": "^4.17.23",
|
||||
"lodash-es": "^4.17.23",
|
||||
"path": "^0.12.7",
|
||||
"sass": "^1.97.3",
|
||||
"typescript": "~5.9.3",
|
||||
"typescript-eslint": "^8.54.0",
|
||||
"vite": "^7.3.1",
|
||||
"vue-demi": "^0.14.10",
|
||||
"vue-eslint-parser": "^10.2.0",
|
||||
@@ -40,9 +51,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator": {
|
||||
"version": "7.29.1",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.29.1.tgz",
|
||||
"integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==",
|
||||
"version": "7.29.0",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.29.0.tgz",
|
||||
"integrity": "sha512-vSH118/wwM/pLR38g/Sgk05sNtro6TlTJKuiMXDaZqPUfjTFcudpCOt00IhOfj+1BFAX+UFAlzCU+6WXr3GLFQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.29.0",
|
||||
@@ -657,6 +668,35 @@
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/css": {
|
||||
"version": "0.14.1",
|
||||
"resolved": "https://registry.npmmirror.com/@eslint/css/-/css-0.14.1.tgz",
|
||||
"integrity": "sha512-NXiteSacmpaXqgyIW3+GcNzexXyfC0kd+gig6WTjD4A74kBGJeNx1tV0Hxa0v7x0+mnIyKfGPhGNs1uhRFdh+w==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^0.17.0",
|
||||
"@eslint/css-tree": "^3.6.6",
|
||||
"@eslint/plugin-kit": "^0.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/css-tree": {
|
||||
"version": "3.6.8",
|
||||
"resolved": "https://registry.npmmirror.com/@eslint/css-tree/-/css-tree-3.6.8.tgz",
|
||||
"integrity": "sha512-s0f40zY7dlMp8i0Jf0u6l/aSswS0WRAgkhgETgiCJRcxIWb4S/Sp9uScKHWbkM3BnoFLbJbmOYk5AZUDFVxaLA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mdn-data": "2.23.0",
|
||||
"source-map-js": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz",
|
||||
@@ -692,6 +732,19 @@
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc/node_modules/globals": {
|
||||
"version": "14.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/globals/-/globals-14.0.0.tgz",
|
||||
"integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc/node_modules/ignore": {
|
||||
"version": "5.3.2",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
|
||||
@@ -728,6 +781,49 @@
|
||||
"url": "https://eslint.org/donate"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/json": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/@eslint/json/-/json-1.0.0.tgz",
|
||||
"integrity": "sha512-x0YjhxhUIG9yiS6KcB2SRmyzDM/eSac2IuhfLMyjAyxyCzH0gFjrHGPFahJlgiOt8dfaCpPDygcCmoCm9rzlyA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^1.0.1",
|
||||
"@eslint/plugin-kit": "^0.5.1",
|
||||
"@humanwhocodes/momoa": "^3.3.10",
|
||||
"natural-compare": "^1.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/json/node_modules/@eslint/core": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/@eslint/core/-/core-1.1.0.tgz",
|
||||
"integrity": "sha512-/nr9K9wkr3P1EzFTdFdMoLuo1PmIxjmwvPozwoSodjNBdefGujXQUF93u1DDZpEaTuDvMsIQddsd35BwtrW9Xw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.15"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/json/node_modules/@eslint/plugin-kit": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/@eslint/plugin-kit/-/plugin-kit-0.5.1.tgz",
|
||||
"integrity": "sha512-hZ2uC1jbf6JMSsF2ZklhRQqf6GLpYyux6DlzegnW/aFlpu6qJj5GO7ub7WOETCrEl6pl6DAX7RgTgj/fyG+6BQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^1.0.1",
|
||||
"levn": "^0.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/object-schema": {
|
||||
"version": "2.1.7",
|
||||
"resolved": "https://registry.npmmirror.com/@eslint/object-schema/-/object-schema-2.1.7.tgz",
|
||||
@@ -832,6 +928,16 @@
|
||||
"url": "https://github.com/sponsors/nzakas"
|
||||
}
|
||||
},
|
||||
"node_modules/@humanwhocodes/momoa": {
|
||||
"version": "3.3.10",
|
||||
"resolved": "https://registry.npmmirror.com/@humanwhocodes/momoa/-/momoa-3.3.10.tgz",
|
||||
"integrity": "sha512-KWiFQpSAqEIyrTXko3hFNLeQvSK8zXlJQzhhxsyVn58WFRYXST99b3Nqnu+ttOtjds2Pl2grUHGpe2NzhPynuQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@humanwhocodes/retry": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
|
||||
@@ -1717,6 +1823,126 @@
|
||||
"eslint": ">=9.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@stylistic/eslint-plugin-js": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmmirror.com/@stylistic/eslint-plugin-js/-/eslint-plugin-js-4.4.1.tgz",
|
||||
"integrity": "sha512-eLisyHvx7Sel8vcFZOEwDEBGmYsYM1SqDn81BWgmbqEXfXRf8oe6Rwp+ryM/8odNjlxtaaxp0Ihmt86CnLAxKg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"eslint-visitor-keys": "^4.2.0",
|
||||
"espree": "^10.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=9.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@stylistic/eslint-plugin-js/node_modules/eslint-visitor-keys": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
|
||||
"integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@stylistic/eslint-plugin-jsx": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmmirror.com/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-4.4.1.tgz",
|
||||
"integrity": "sha512-83SInq4u7z71vWwGG+6ViOtlOmZ6tSrDkMPhrvdBBTGMLA0gs22WSdhQ4vZP3oJ5Xg4ythvqeUiFSedvVxzhyA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"eslint-visitor-keys": "^4.2.0",
|
||||
"espree": "^10.3.0",
|
||||
"estraverse": "^5.3.0",
|
||||
"picomatch": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=9.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@stylistic/eslint-plugin-jsx/node_modules/eslint-visitor-keys": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
|
||||
"integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@stylistic/eslint-plugin-plus": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmmirror.com/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-4.4.1.tgz",
|
||||
"integrity": "sha512-4w2Ktg7OuJrn0QwJPdTWmrweJ91UoIUEiSPLUVTurAR+Qx9rLHGnycAocUcoRMtPRmCNmw1BP61JKsl7Jug38g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"eslint-visitor-keys": "^4.2.0",
|
||||
"espree": "^10.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=9.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@stylistic/eslint-plugin-plus/node_modules/eslint-visitor-keys": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
|
||||
"integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@stylistic/eslint-plugin-ts": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmmirror.com/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-4.4.1.tgz",
|
||||
"integrity": "sha512-2r6cLcmdF6til66lx8esBYvBvsn7xCmLT50gw/n1rGGlTq/OxeNjBIh4c3VEaDGMa/5TybrZTia6sQUHdIWx1w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/utils": "^8.32.1",
|
||||
"eslint-visitor-keys": "^4.2.0",
|
||||
"espree": "^10.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=9.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@stylistic/eslint-plugin-ts/node_modules/eslint-visitor-keys": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
|
||||
"integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@stylistic/eslint-plugin/node_modules/eslint-visitor-keys": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
|
||||
@@ -2192,21 +2418,21 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/devtools-api": {
|
||||
"version": "8.0.6",
|
||||
"resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-8.0.6.tgz",
|
||||
"integrity": "sha512-+lGBI+WTvJmnU2FZqHhEB8J1DXcvNlDeEalz77iYgOdY1jTj1ipSBaKj3sRhYcy+kqA8v/BSuvOz1XJucfQmUA==",
|
||||
"version": "8.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-8.0.5.tgz",
|
||||
"integrity": "sha512-DgVcW8H/Nral7LgZEecYFFYXnAvGuN9C3L3DtWekAncFBedBczpNW8iHKExfaM559Zm8wQWrwtYZ9lXthEHtDw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vue/devtools-kit": "^8.0.6"
|
||||
"@vue/devtools-kit": "^8.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/devtools-kit": {
|
||||
"version": "8.0.6",
|
||||
"resolved": "https://registry.npmmirror.com/@vue/devtools-kit/-/devtools-kit-8.0.6.tgz",
|
||||
"integrity": "sha512-9zXZPTJW72OteDXeSa5RVML3zWDCRcO5t77aJqSs228mdopYj5AiTpihozbsfFJ0IodfNs7pSgOGO3qfCuxDtw==",
|
||||
"version": "8.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/@vue/devtools-kit/-/devtools-kit-8.0.5.tgz",
|
||||
"integrity": "sha512-q2VV6x1U3KJMTQPUlRMyWEKVbcHuxhqJdSr6Jtjz5uAThAIrfJ6WVZdGZm5cuO63ZnSUz0RCsVwiUUb0mDV0Yg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vue/devtools-shared": "^8.0.6",
|
||||
"@vue/devtools-shared": "^8.0.5",
|
||||
"birpc": "^2.6.1",
|
||||
"hookable": "^5.5.3",
|
||||
"mitt": "^3.0.1",
|
||||
@@ -2216,9 +2442,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/devtools-shared": {
|
||||
"version": "8.0.6",
|
||||
"resolved": "https://registry.npmmirror.com/@vue/devtools-shared/-/devtools-shared-8.0.6.tgz",
|
||||
"integrity": "sha512-Pp1JylTqlgMJvxW6MGyfTF8vGvlBSCAvMFaDCYa82Mgw7TT5eE5kkHgDvmOGHWeJE4zIDfCpCxHapsK2LtIAJg==",
|
||||
"version": "8.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/@vue/devtools-shared/-/devtools-shared-8.0.5.tgz",
|
||||
"integrity": "sha512-bRLn6/spxpmgLk+iwOrR29KrYnJjG9DGpHGkDFG82UM21ZpJ39ztUT9OXX3g+usW7/b2z+h46I9ZiYyB07XMXg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"rfdc": "^1.4.1"
|
||||
@@ -2949,6 +3175,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-config-prettier": {
|
||||
"version": "10.1.8",
|
||||
"resolved": "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz",
|
||||
"integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"eslint-config-prettier": "bin/cli.js"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint-config-prettier"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-vue": {
|
||||
"version": "10.7.0",
|
||||
"resolved": "https://registry.npmmirror.com/eslint-plugin-vue/-/eslint-plugin-vue-10.7.0.tgz",
|
||||
@@ -3366,9 +3608,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/globals": {
|
||||
"version": "14.0.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
|
||||
"integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
|
||||
"version": "17.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/globals/-/globals-17.3.0.tgz",
|
||||
"integrity": "sha512-yMqGUQVVCkD4tqjOJf3TnrvaaHDMYp4VlUSObbkIiuCPe/ofdMBFIAcBbCSRFWOnos6qRiTVStDwqPLUclaxIw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3553,6 +3795,17 @@
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/jiti": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/jiti/-/jiti-2.6.1.tgz",
|
||||
"integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"jiti": "lib/jiti-cli.mjs"
|
||||
}
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
|
||||
@@ -3737,6 +3990,13 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/mdn-data": {
|
||||
"version": "2.23.0",
|
||||
"resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.23.0.tgz",
|
||||
"integrity": "sha512-786vq1+4079JSeu2XdcDjrhi/Ry7BWtjDl9WtGPWLiIHb2T66GvIVflZTBoSNZ5JqTtJGYEVMuFA/lbQlMOyDQ==",
|
||||
"dev": true,
|
||||
"license": "CC0-1.0"
|
||||
},
|
||||
"node_modules/memoize-one": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz",
|
||||
@@ -4443,6 +4703,30 @@
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-eslint": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmmirror.com/typescript-eslint/-/typescript-eslint-8.54.0.tgz",
|
||||
"integrity": "sha512-CKsJ+g53QpsNPqbzUsfKVgd3Lny4yKZ1pP4qN3jdMOg/sisIDLGyDMezycquXLE5JsEU0wp3dGNdzig0/fmSVQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "8.54.0",
|
||||
"@typescript-eslint/parser": "8.54.0",
|
||||
"@typescript-eslint/typescript-estree": "8.54.0",
|
||||
"@typescript-eslint/utils": "8.54.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ufo": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.6.3.tgz",
|
||||
@@ -4648,7 +4932,7 @@
|
||||
},
|
||||
"node_modules/vue-eslint-parser": {
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-10.2.0.tgz",
|
||||
"resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-10.2.0.tgz",
|
||||
"integrity": "sha512-CydUvFOQKD928UzZhTp4pr2vWz1L+H99t7Pkln2QSPdvmURT0MoC4wUccfCnuEaihNsu9aYYyk+bep8rlfkUXw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
|
||||
@@ -15,7 +15,14 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.2",
|
||||
"@eslint/css": "^0.14.1",
|
||||
"@eslint/js": "^9.39.2",
|
||||
"@eslint/json": "^1.0.0",
|
||||
"@stylistic/eslint-plugin": "^5.7.1",
|
||||
"@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.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
||||
"@typescript-eslint/parser": "^8.54.0",
|
||||
@@ -27,12 +34,16 @@
|
||||
"axios": "^1.13.4",
|
||||
"element-plus": "^2.13.2",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-vue": "^10.7.0",
|
||||
"globals": "^17.3.0",
|
||||
"jiti": "^2.6.1",
|
||||
"lodash": "^4.17.23",
|
||||
"lodash-es": "^4.17.23",
|
||||
"path": "^0.12.7",
|
||||
"sass": "^1.97.3",
|
||||
"typescript": "~5.9.3",
|
||||
"typescript-eslint": "^8.54.0",
|
||||
"vite": "^7.3.1",
|
||||
"vue-demi": "^0.14.10",
|
||||
"vue-eslint-parser": "^10.2.0",
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
src="/vite.svg"
|
||||
class="logo"
|
||||
src="/vite.svg"
|
||||
alt="Vite logo"
|
||||
>
|
||||
</a>
|
||||
@@ -28,17 +28,17 @@ import HelloWorld from "./components/HelloWorld.vue";
|
||||
</script>
|
||||
<style scoped>
|
||||
.logo {
|
||||
height: 6em;
|
||||
padding: 1.5em;
|
||||
will-change: filter;
|
||||
transition: filter 300ms;
|
||||
height: 6em;
|
||||
padding: 1.5em;
|
||||
will-change: filter;
|
||||
transition: filter 300ms;
|
||||
}
|
||||
|
||||
.logo:hover {
|
||||
filter: drop-shadow(0 0 2em #646cffaa);
|
||||
filter: drop-shadow(0 0 2em #646cffaa);
|
||||
}
|
||||
|
||||
.logo.vue:hover {
|
||||
filter: drop-shadow(0 0 2em #42b883aa);
|
||||
filter: drop-shadow(0 0 2em #42b883aa);
|
||||
}
|
||||
</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>
|
||||
<router-view />
|
||||
</template>
|
||||
@@ -11,7 +5,7 @@ Copyright © CPIC All rights reserved
|
||||
export default {
|
||||
name: "AppMain",
|
||||
components: [],
|
||||
setup() {},
|
||||
setup() { },
|
||||
};
|
||||
</script>
|
||||
<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>
|
||||
<el-container class="layout-container">
|
||||
<el-header class="layout-header">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!--
|
||||
author: Kane Wang <wangkane@qq.com>
|
||||
date: 2025-10-23 15:32:30
|
||||
date: 2025-10-23 17:52:01
|
||||
component: Header
|
||||
Copyright © CPIC All rights reserved
|
||||
-->
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: Kane Wang <wangkane@qq.com>
|
||||
* @Date: 2026-01-05 10:42:42
|
||||
* @LastEditors: Kane Wang
|
||||
* @LastModified: 2026-01-05 19:21:09
|
||||
* @LastModified: 2026-02-04 15:37:20
|
||||
* @FilePath: src/utils/regulatory_utils.ts
|
||||
* @Description:
|
||||
*
|
||||
@@ -19,8 +19,7 @@ interface AddNewRegulatoryResponse
|
||||
}
|
||||
|
||||
interface Render {
|
||||
( resonse: AddNewRegulatoryResponse ) :void,
|
||||
}
|
||||
( resonse: AddNewRegulatoryResponse ) :void, }
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -12,7 +12,11 @@ Copyright © CPIC All rights reserved
|
||||
<span>名称</span>
|
||||
</el-col>
|
||||
<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-row>
|
||||
<el-row :gutter="10">
|
||||
@@ -20,7 +24,10 @@ Copyright © CPIC All rights reserved
|
||||
<span>部门</span>
|
||||
</el-col>
|
||||
<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 :span="2">
|
||||
<span>发布、修订年份</span>
|
||||
@@ -34,13 +41,21 @@ Copyright © CPIC All rights reserved
|
||||
<span>备注</span>
|
||||
</el-col>
|
||||
<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-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="3">
|
||||
<div class="button-wrapper-left">
|
||||
<el-button type="primary" icon="document" @click="showUploadFileDialog">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="document"
|
||||
@click="showUploadFileDialog"
|
||||
>
|
||||
新增文档
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -49,8 +64,9 @@ Copyright © CPIC All rights reserved
|
||||
<el-col :span="3">
|
||||
<div class="button-wrapper-right">
|
||||
<el-button
|
||||
type="primary" icon="document"
|
||||
@click="onPreviewUploadedFile(1)"
|
||||
type="primary"
|
||||
icon="document"
|
||||
@click="onCreateNewRegulatory()"
|
||||
>
|
||||
提交
|
||||
</el-button>
|
||||
@@ -59,32 +75,46 @@ Copyright © CPIC All rights reserved
|
||||
</el-row>
|
||||
</div>
|
||||
<el-table
|
||||
width="100%" stripe
|
||||
width="100%"
|
||||
stripe
|
||||
border="true"
|
||||
:head-cell-style="headerCellStyle"
|
||||
:row-class-name="tableRowClassName"
|
||||
empty-text="请上传文件"
|
||||
:data="ui.newRegulatory.regulatory_files"
|
||||
>
|
||||
<el-table-column label="文件名" align="center">
|
||||
<el-table-column
|
||||
label="文件名"
|
||||
align="center"
|
||||
>
|
||||
<template #default="file">
|
||||
<span>{{ file.row.regulatory_file_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件类型" align="center" width="200px">
|
||||
<el-table-column
|
||||
label="文件类型"
|
||||
align="center"
|
||||
width="200px"
|
||||
>
|
||||
<template #default="file">
|
||||
<span>{{ file.row.file_type }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200px">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="200px"
|
||||
>
|
||||
<template #default="file">
|
||||
<el-button
|
||||
type="primary" icon="search"
|
||||
type="primary"
|
||||
icon="search"
|
||||
circle
|
||||
@click="onPreviewUploadedFile(file.row.rowIndex)"
|
||||
/>
|
||||
<el-button
|
||||
type="danger" icon="delete"
|
||||
type="danger"
|
||||
icon="delete"
|
||||
circle
|
||||
@click="onDeleteUploadedFile(file.row.rowIndex)"
|
||||
/>
|
||||
@@ -93,9 +123,11 @@ Copyright © CPIC All rights reserved
|
||||
</el-table>
|
||||
<div class="upload-dialog-wrapper">
|
||||
<el-dialog
|
||||
v-model="ui.showUploadDialog" title="上传文件"
|
||||
v-model="ui.showUploadDialog"
|
||||
title="上传文件"
|
||||
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"
|
||||
>
|
||||
<el-upload
|
||||
@@ -115,7 +147,8 @@ Copyright © CPIC All rights reserved
|
||||
</el-upload>
|
||||
</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"
|
||||
:show-close="true"
|
||||
align-center
|
||||
@@ -123,13 +156,15 @@ Copyright © CPIC All rights reserved
|
||||
width="1024px"
|
||||
>
|
||||
<VueOfficePdf
|
||||
v-if="ui.isPDF" :src="ui.fileURL"
|
||||
v-if="ui.isPDF"
|
||||
:src="ui.fileURL"
|
||||
style="height:calc(100vh - 100px);"
|
||||
@error="errorHandle"
|
||||
/>
|
||||
</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"
|
||||
:show-close="true"
|
||||
align-center
|
||||
@@ -137,13 +172,15 @@ Copyright © CPIC All rights reserved
|
||||
width="1024px"
|
||||
>
|
||||
<VueOfficeDocx
|
||||
v-if="ui.isDOCX" :src="ui.fileURL"
|
||||
v-if="ui.isDOCX"
|
||||
:src="ui.fileURL"
|
||||
style="height:calc(100vh - 100px);"
|
||||
@error="errorHandle"
|
||||
/>
|
||||
</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"
|
||||
:show-close="true"
|
||||
align-center
|
||||
@@ -171,7 +208,7 @@ import VueOfficePdf from "@vue-office/pdf";
|
||||
import VueOfficeDocx from "@vue-office/docx";
|
||||
import VueOfficeExcel from "@vue-office/excel";
|
||||
|
||||
//引入相关样式
|
||||
// 引入相关样式
|
||||
import "@vue-office/docx/lib/index.css";
|
||||
import "@vue-office/excel/lib/index.css";
|
||||
|
||||
@@ -193,7 +230,9 @@ interface UI{
|
||||
|
||||
export default {
|
||||
name: "NewRegulatory",
|
||||
components: {VueOfficePdf, VueOfficeDocx, VueOfficeExcel,},
|
||||
components: {VueOfficePdf,
|
||||
VueOfficeDocx,
|
||||
VueOfficeExcel,},
|
||||
setup()
|
||||
{
|
||||
const ui: UI = reactive({
|
||||
@@ -238,7 +277,7 @@ export default {
|
||||
ui.showUploadDialog = true;
|
||||
};
|
||||
|
||||
/*表格操作相关 */
|
||||
/* 表格操作相关 */
|
||||
/**
|
||||
* 删除对应的上传文件记录。
|
||||
* @param rowId 行号
|
||||
@@ -298,10 +337,13 @@ export default {
|
||||
* 其中给row加一个参数rowIndex,用行号赋值。
|
||||
* @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}。` );
|
||||
|
||||
const regulatoryName = ref();
|
||||
|
||||
row.rowIndex = rowIndex;
|
||||
};
|
||||
|
||||
@@ -371,6 +413,11 @@ export default {
|
||||
ElMessage.error( "渲染文档出错!" );
|
||||
};
|
||||
|
||||
const onCreateNewRegulatory = () =>
|
||||
{
|
||||
console.log( "制度对象:", ui.newRegulatory );
|
||||
};
|
||||
|
||||
return {
|
||||
ui,
|
||||
headerCellStyle,
|
||||
@@ -380,6 +427,7 @@ export default {
|
||||
showUploadFileDialog,
|
||||
onDeleteUploadedFile,
|
||||
onPreviewUploadedFile,
|
||||
onCreateNewRegulatory,
|
||||
errorHandle,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user