实现设备采购模块的数据库更新,页面搭建和分页查询

This commit is contained in:
Mr.j 2025-08-05 16:22:09 +08:00
parent 7246e8dc99
commit 749b24a17f
14 changed files with 3478 additions and 143 deletions

View File

@ -1,48 +1,11 @@
import antfu from '@antfu/eslint-config' import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import { defineConfig } from "eslint/config";
// https://github.com/antfu/eslint-config export default defineConfig([
export default antfu( { files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } },
{ tseslint.configs.recommended,
vue: { pluginReact.configs.flat.recommended,
overrides: { ]);
'vue/block-order': ['error', {
order: [['script', 'template'], 'style'],
}], // 强制组件顶级元素的顺序
'vue/define-macros-order': ['error', {
order: ['defineOptions', 'defineModel', 'defineProps', 'defineEmits', 'defineSlots'],
defineExposeLast: true,
}], // 强制执行定义限制和定义弹出编译器宏的顺序
'vue/singleline-html-element-content-newline': 'off', // 要求在单行元素的内容前后换行
'vue/html-self-closing': ['off', {
html: {
void: 'never',
normal: 'always',
component: 'never',
},
}], // 强制自结束样式
'vue/custom-event-name-casing': ['error', 'kebab-case'], // 对自定义事件名称强制使用特定大小写
},
},
typescript: true,
ignores: [
'**/*.md',
'.github',
'.image',
'src/types/shims-vue.d.ts',
],
},
{
rules: {
'curly': ['off', 'all'], // 对所有控制语句强制使用一致的大括号样式
'no-new': 'off', // 不允许在赋值或比较之外使用 new 运算符
'no-console': 'off', // 允许使用 console
'style/arrow-parens': ['error', 'always'], // 箭头函数参数需要括号
'style/brace-style': ['error', '1tbs', { allowSingleLine: true }], // 对块执行一致的大括号样式
'regexp/no-unused-capturing-group': 'off',
'regexp/no-super-linear-backtracking': 'off',
'node/prefer-global/process': 'off',
'antfu/top-level-function': 'off',
'antfu/if-newline': 'off',
},
},
)

570
package-lock.json generated
View File

@ -58,21 +58,27 @@
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^2.16.3", "@antfu/eslint-config": "^2.16.3",
"@arco-design/web-vue": "^2.57.0", "@arco-design/web-vue": "^2.57.0",
"@eslint/js": "^9.32.0",
"@types/crypto-js": "^4.2.2", "@types/crypto-js": "^4.2.2",
"@types/lodash-es": "^4.17.12", "@types/lodash-es": "^4.17.12",
"@types/node": "^20.2.5", "@types/node": "^20.2.5",
"@types/query-string": "^6.3.0", "@types/query-string": "^6.3.0",
"@typescript-eslint/eslint-plugin": "^8.39.0",
"@typescript-eslint/parser": "^8.39.0",
"@vitejs/plugin-vue": "^5.2.1", "@vitejs/plugin-vue": "^5.2.1",
"@vitejs/plugin-vue-jsx": "^3.1.0", "@vitejs/plugin-vue-jsx": "^3.1.0",
"@vue/tsconfig": "^0.1.3", "@vue/tsconfig": "^0.1.3",
"boxen": "^7.1.1", "boxen": "^7.1.1",
"eslint": "^9.0.0", "eslint": "^9.32.0",
"eslint-plugin-react": "^7.37.5",
"globals": "^16.3.0",
"less": "^4.1.3", "less": "^4.1.3",
"less-loader": "^11.0.0", "less-loader": "^11.0.0",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"sass": "^1.62.1", "sass": "^1.62.1",
"sass-loader": "^13.2.2", "sass-loader": "^13.2.2",
"typescript": "~5.0.4", "typescript": "~5.0.4",
"typescript-eslint": "^8.39.0",
"unplugin-auto-import": "^0.16.4", "unplugin-auto-import": "^0.16.4",
"unplugin-vue-components": "^0.25.1", "unplugin-vue-components": "^0.25.1",
"vite": "^5.1.5", "vite": "^5.1.5",
@ -205,6 +211,18 @@
} }
} }
}, },
"node_modules/@antfu/eslint-config/node_modules/globals": {
"version": "15.15.0",
"resolved": "https://registry.npmmirror.com/globals/-/globals-15.15.0.tgz",
"integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==",
"dev": true,
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@antfu/install-pkg": { "node_modules/@antfu/install-pkg": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmmirror.com/@antfu/install-pkg/-/install-pkg-0.4.1.tgz", "resolved": "https://registry.npmmirror.com/@antfu/install-pkg/-/install-pkg-0.4.1.tgz",
@ -719,7 +737,6 @@
}, },
"node_modules/@clack/prompts/node_modules/is-unicode-supported": { "node_modules/@clack/prompts/node_modules/is-unicode-supported": {
"version": "1.3.0", "version": "1.3.0",
"dev": true,
"inBundle": true, "inBundle": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@ -3074,16 +3091,16 @@
"integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==" "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow=="
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.38.0.tgz", "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.39.0.tgz",
"integrity": "sha512-CPoznzpuAnIOl4nhj4tRr4gIPj5AfKgkiJmGQDaq+fQnRJTYlcBjbX3wbciGmpoPf8DREufuPRe1tNMZnGdanA==", "integrity": "sha512-bhEz6OZeUR+O/6yx9Jk6ohX6H9JSFTaiY0v9/PuKT3oGK0rn0jNplLmyFUGV+a9gfYnVNwGDwS/UkLIuXNb2Rw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.10.0", "@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.38.0", "@typescript-eslint/scope-manager": "8.39.0",
"@typescript-eslint/type-utils": "8.38.0", "@typescript-eslint/type-utils": "8.39.0",
"@typescript-eslint/utils": "8.38.0", "@typescript-eslint/utils": "8.39.0",
"@typescript-eslint/visitor-keys": "8.38.0", "@typescript-eslint/visitor-keys": "8.39.0",
"graphemer": "^1.4.0", "graphemer": "^1.4.0",
"ignore": "^7.0.0", "ignore": "^7.0.0",
"natural-compare": "^1.4.0", "natural-compare": "^1.4.0",
@ -3097,9 +3114,9 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"@typescript-eslint/parser": "^8.38.0", "@typescript-eslint/parser": "^8.39.0",
"eslint": "^8.57.0 || ^9.0.0", "eslint": "^8.57.0 || ^9.0.0",
"typescript": ">=4.8.4 <5.9.0" "typescript": ">=4.8.4 <6.0.0"
} }
}, },
"node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
@ -3112,15 +3129,15 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-8.38.0.tgz", "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-8.39.0.tgz",
"integrity": "sha512-Zhy8HCvBUEfBECzIl1PKqF4p11+d0aUJS1GeUiuqK9WmOug8YCmC4h4bjyBvMyAMI9sbRczmrYL5lKg/YMbrcQ==", "integrity": "sha512-g3WpVQHngx0aLXn6kfIYCZxM6rRJlWzEkVpqEFLT3SgEDsp9cpCbxxgwnE504q4H+ruSDh/VGS6nqZIDynP+vg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "8.38.0", "@typescript-eslint/scope-manager": "8.39.0",
"@typescript-eslint/types": "8.38.0", "@typescript-eslint/types": "8.39.0",
"@typescript-eslint/typescript-estree": "8.38.0", "@typescript-eslint/typescript-estree": "8.39.0",
"@typescript-eslint/visitor-keys": "8.38.0", "@typescript-eslint/visitor-keys": "8.39.0",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@ -3132,17 +3149,17 @@
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0", "eslint": "^8.57.0 || ^9.0.0",
"typescript": ">=4.8.4 <5.9.0" "typescript": ">=4.8.4 <6.0.0"
} }
}, },
"node_modules/@typescript-eslint/project-service": { "node_modules/@typescript-eslint/project-service": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/project-service/-/project-service-8.38.0.tgz", "resolved": "https://registry.npmmirror.com/@typescript-eslint/project-service/-/project-service-8.39.0.tgz",
"integrity": "sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg==", "integrity": "sha512-CTzJqaSq30V/Z2Og9jogzZt8lJRR5TKlAdXmWgdu4hgcC9Kww5flQ+xFvMxIBWVNdxJO7OifgdOK4PokMIWPew==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/tsconfig-utils": "^8.38.0", "@typescript-eslint/tsconfig-utils": "^8.39.0",
"@typescript-eslint/types": "^8.38.0", "@typescript-eslint/types": "^8.39.0",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@ -3153,17 +3170,17 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"typescript": ">=4.8.4 <5.9.0" "typescript": ">=4.8.4 <6.0.0"
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-8.38.0.tgz", "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-8.39.0.tgz",
"integrity": "sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ==", "integrity": "sha512-8QOzff9UKxOh6npZQ/4FQu4mjdOCGSdO3p44ww0hk8Vu+IGbg0tB/H1LcTARRDzGCC8pDGbh2rissBuuoPgH8A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.38.0", "@typescript-eslint/types": "8.39.0",
"@typescript-eslint/visitor-keys": "8.38.0" "@typescript-eslint/visitor-keys": "8.39.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -3174,9 +3191,9 @@
} }
}, },
"node_modules/@typescript-eslint/tsconfig-utils": { "node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.38.0.tgz", "resolved": "https://registry.npmmirror.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.39.0.tgz",
"integrity": "sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ==", "integrity": "sha512-Fd3/QjmFV2sKmvv3Mrj8r6N8CryYiCS8Wdb/6/rgOXAWGcFuc+VkQuG28uk/4kVNVZBQuuDHEDUpo/pQ32zsIQ==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -3186,18 +3203,18 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"typescript": ">=4.8.4 <5.9.0" "typescript": ">=4.8.4 <6.0.0"
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-8.38.0.tgz", "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-8.39.0.tgz",
"integrity": "sha512-c7jAvGEZVf0ao2z+nnz8BUaHZD09Agbh+DY7qvBQqLiz8uJzRgVPj5YvOh8I8uEiH8oIUGIfHzMwUcGVco/SJg==", "integrity": "sha512-6B3z0c1DXVT2vYA9+z9axjtc09rqKUPRmijD5m9iv8iQpHBRYRMBcgxSiKTZKm6FwWw1/cI4v6em35OsKCiN5Q==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.38.0", "@typescript-eslint/types": "8.39.0",
"@typescript-eslint/typescript-estree": "8.38.0", "@typescript-eslint/typescript-estree": "8.39.0",
"@typescript-eslint/utils": "8.38.0", "@typescript-eslint/utils": "8.39.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"ts-api-utils": "^2.1.0" "ts-api-utils": "^2.1.0"
}, },
@ -3210,13 +3227,13 @@
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0", "eslint": "^8.57.0 || ^9.0.0",
"typescript": ">=4.8.4 <5.9.0" "typescript": ">=4.8.4 <6.0.0"
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-8.38.0.tgz", "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-8.39.0.tgz",
"integrity": "sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw==", "integrity": "sha512-ArDdaOllnCj3yn/lzKn9s0pBQYmmyme/v1HbGIGB0GB/knFI3fWMHloC+oYTJW46tVbYnGKTMDK4ah1sC2v0Kg==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -3227,15 +3244,15 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.38.0.tgz", "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.0.tgz",
"integrity": "sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ==", "integrity": "sha512-ndWdiflRMvfIgQRpckQQLiB5qAKQ7w++V4LlCHwp62eym1HLB/kw7D9f2e8ytONls/jt89TEasgvb+VwnRprsw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/project-service": "8.38.0", "@typescript-eslint/project-service": "8.39.0",
"@typescript-eslint/tsconfig-utils": "8.38.0", "@typescript-eslint/tsconfig-utils": "8.39.0",
"@typescript-eslint/types": "8.38.0", "@typescript-eslint/types": "8.39.0",
"@typescript-eslint/visitor-keys": "8.38.0", "@typescript-eslint/visitor-keys": "8.39.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"fast-glob": "^3.3.2", "fast-glob": "^3.3.2",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -3251,19 +3268,19 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"typescript": ">=4.8.4 <5.9.0" "typescript": ">=4.8.4 <6.0.0"
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-8.38.0.tgz", "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-8.39.0.tgz",
"integrity": "sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg==", "integrity": "sha512-4GVSvNA0Vx1Ktwvf4sFE+exxJ3QGUorQG1/A5mRfRNZtkBT2xrA/BCO2H0eALx/PnvCS6/vmYwRdDA41EoffkQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.7.0", "@eslint-community/eslint-utils": "^4.7.0",
"@typescript-eslint/scope-manager": "8.38.0", "@typescript-eslint/scope-manager": "8.39.0",
"@typescript-eslint/types": "8.38.0", "@typescript-eslint/types": "8.39.0",
"@typescript-eslint/typescript-estree": "8.38.0" "@typescript-eslint/typescript-estree": "8.39.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -3274,16 +3291,16 @@
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0", "eslint": "^8.57.0 || ^9.0.0",
"typescript": ">=4.8.4 <5.9.0" "typescript": ">=4.8.4 <6.0.0"
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "8.38.0", "version": "8.39.0",
"resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.38.0.tgz", "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.0.tgz",
"integrity": "sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g==", "integrity": "sha512-ldgiJ+VAhQCfIjeOgu8Kj5nSxds0ktPOSO9p4+0VDH2R2pLvQraaM5Oen2d7NxzMCm+Sn/vJT+mv2H5u6b/3fA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.38.0", "@typescript-eslint/types": "8.39.0",
"eslint-visitor-keys": "^4.2.1" "eslint-visitor-keys": "^4.2.1"
}, },
"engines": { "engines": {
@ -4465,6 +4482,28 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/array-includes": {
"version": "3.1.9",
"resolved": "https://registry.npmmirror.com/array-includes/-/array-includes-3.1.9.tgz",
"integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.8",
"call-bound": "^1.0.4",
"define-properties": "^1.2.1",
"es-abstract": "^1.24.0",
"es-object-atoms": "^1.1.1",
"get-intrinsic": "^1.3.0",
"is-string": "^1.1.1",
"math-intrinsics": "^1.1.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/array-unique": { "node_modules/array-unique": {
"version": "0.3.2", "version": "0.3.2",
"resolved": "https://registry.npmmirror.com/array-unique/-/array-unique-0.3.2.tgz", "resolved": "https://registry.npmmirror.com/array-unique/-/array-unique-0.3.2.tgz",
@ -4474,6 +4513,78 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/array.prototype.findlast": {
"version": "1.2.5",
"resolved": "https://registry.npmmirror.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz",
"integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.2",
"es-errors": "^1.3.0",
"es-object-atoms": "^1.0.0",
"es-shim-unscopables": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/array.prototype.flat": {
"version": "1.3.3",
"resolved": "https://registry.npmmirror.com/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz",
"integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.8",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.5",
"es-shim-unscopables": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/array.prototype.flatmap": {
"version": "1.3.3",
"resolved": "https://registry.npmmirror.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz",
"integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.8",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.5",
"es-shim-unscopables": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/array.prototype.tosorted": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz",
"integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.3",
"es-errors": "^1.3.0",
"es-shim-unscopables": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/arraybuffer.prototype.slice": { "node_modules/arraybuffer.prototype.slice": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmmirror.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", "resolved": "https://registry.npmmirror.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz",
@ -5901,6 +6012,18 @@
"url": "https://github.com/sponsors/wooorm" "url": "https://github.com/sponsors/wooorm"
} }
}, },
"node_modules/doctrine": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/doctrine/-/doctrine-2.1.0.tgz",
"integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
"dev": true,
"dependencies": {
"esutils": "^2.0.2"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/dom-serializer": { "node_modules/dom-serializer": {
"version": "0.2.2", "version": "0.2.2",
"resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-0.2.2.tgz", "resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-0.2.2.tgz",
@ -6192,6 +6315,33 @@
"node": ">= 0.4" "node": ">= 0.4"
} }
}, },
"node_modules/es-iterator-helpers": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz",
"integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.8",
"call-bound": "^1.0.3",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.6",
"es-errors": "^1.3.0",
"es-set-tostringtag": "^2.0.3",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.6",
"globalthis": "^1.0.4",
"gopd": "^1.2.0",
"has-property-descriptors": "^1.0.2",
"has-proto": "^1.2.0",
"has-symbols": "^1.1.0",
"internal-slot": "^1.1.0",
"iterator.prototype": "^1.1.4",
"safe-array-concat": "^1.1.3"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-module-lexer": { "node_modules/es-module-lexer": {
"version": "0.9.3", "version": "0.9.3",
"resolved": "https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz", "resolved": "https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz",
@ -6223,6 +6373,18 @@
"node": ">= 0.4" "node": ">= 0.4"
} }
}, },
"node_modules/es-shim-unscopables": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz",
"integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==",
"dev": true,
"dependencies": {
"hasown": "^2.0.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-to-primitive": { "node_modules/es-to-primitive": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmmirror.com/es-to-primitive/-/es-to-primitive-1.3.0.tgz", "resolved": "https://registry.npmmirror.com/es-to-primitive/-/es-to-primitive-1.3.0.tgz",
@ -7025,6 +7187,18 @@
"eslint": ">=8.23.0" "eslint": ">=8.23.0"
} }
}, },
"node_modules/eslint-plugin-n/node_modules/globals": {
"version": "15.15.0",
"resolved": "https://registry.npmmirror.com/globals/-/globals-15.15.0.tgz",
"integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==",
"dev": true,
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/eslint-plugin-no-only-tests": { "node_modules/eslint-plugin-no-only-tests": {
"version": "3.3.0", "version": "3.3.0",
"resolved": "https://registry.npmmirror.com/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.3.0.tgz", "resolved": "https://registry.npmmirror.com/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.3.0.tgz",
@ -7070,6 +7244,86 @@
} }
} }
}, },
"node_modules/eslint-plugin-react": {
"version": "7.37.5",
"resolved": "https://registry.npmmirror.com/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz",
"integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==",
"dev": true,
"dependencies": {
"array-includes": "^3.1.8",
"array.prototype.findlast": "^1.2.5",
"array.prototype.flatmap": "^1.3.3",
"array.prototype.tosorted": "^1.1.4",
"doctrine": "^2.1.0",
"es-iterator-helpers": "^1.2.1",
"estraverse": "^5.3.0",
"hasown": "^2.0.2",
"jsx-ast-utils": "^2.4.1 || ^3.0.0",
"minimatch": "^3.1.2",
"object.entries": "^1.1.9",
"object.fromentries": "^2.0.8",
"object.values": "^1.2.1",
"prop-types": "^15.8.1",
"resolve": "^2.0.0-next.5",
"semver": "^6.3.1",
"string.prototype.matchall": "^4.0.12",
"string.prototype.repeat": "^1.0.0"
},
"engines": {
"node": ">=4"
},
"peerDependencies": {
"eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7"
}
},
"node_modules/eslint-plugin-react/node_modules/brace-expansion": {
"version": "1.1.12",
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.12.tgz",
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"node_modules/eslint-plugin-react/node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/eslint-plugin-react/node_modules/resolve": {
"version": "2.0.0-next.5",
"resolved": "https://registry.npmmirror.com/resolve/-/resolve-2.0.0-next.5.tgz",
"integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==",
"dev": true,
"dependencies": {
"is-core-module": "^2.13.0",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
},
"bin": {
"resolve": "bin/resolve"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/eslint-plugin-react/node_modules/semver": {
"version": "6.3.1",
"resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
}
},
"node_modules/eslint-plugin-regexp": { "node_modules/eslint-plugin-regexp": {
"version": "2.9.0", "version": "2.9.0",
"resolved": "https://registry.npmmirror.com/eslint-plugin-regexp/-/eslint-plugin-regexp-2.9.0.tgz", "resolved": "https://registry.npmmirror.com/eslint-plugin-regexp/-/eslint-plugin-regexp-2.9.0.tgz",
@ -7160,6 +7414,18 @@
"eslint": ">=8.56.0" "eslint": ">=8.56.0"
} }
}, },
"node_modules/eslint-plugin-unicorn/node_modules/globals": {
"version": "15.15.0",
"resolved": "https://registry.npmmirror.com/globals/-/globals-15.15.0.tgz",
"integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==",
"dev": true,
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/eslint-plugin-unused-imports": { "node_modules/eslint-plugin-unused-imports": {
"version": "4.1.4", "version": "4.1.4",
"resolved": "https://registry.npmmirror.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", "resolved": "https://registry.npmmirror.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz",
@ -8127,9 +8393,9 @@
"peer": true "peer": true
}, },
"node_modules/globals": { "node_modules/globals": {
"version": "15.15.0", "version": "16.3.0",
"resolved": "https://registry.npmmirror.com/globals/-/globals-15.15.0.tgz", "resolved": "https://registry.npmmirror.com/globals/-/globals-16.3.0.tgz",
"integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", "integrity": "sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=18" "node": ">=18"
@ -9180,6 +9446,23 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/iterator.prototype": {
"version": "1.1.5",
"resolved": "https://registry.npmmirror.com/iterator.prototype/-/iterator.prototype-1.1.5.tgz",
"integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==",
"dev": true,
"dependencies": {
"define-data-property": "^1.1.4",
"es-object-atoms": "^1.0.0",
"get-intrinsic": "^1.2.6",
"get-proto": "^1.0.0",
"has-symbols": "^1.1.0",
"set-function-name": "^2.0.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/jest-worker": { "node_modules/jest-worker": {
"version": "27.5.1", "version": "27.5.1",
"resolved": "https://registry.npmmirror.com/jest-worker/-/jest-worker-27.5.1.tgz", "resolved": "https://registry.npmmirror.com/jest-worker/-/jest-worker-27.5.1.tgz",
@ -9341,6 +9624,21 @@
"graceful-fs": "^4.1.6" "graceful-fs": "^4.1.6"
} }
}, },
"node_modules/jsx-ast-utils": {
"version": "3.3.5",
"resolved": "https://registry.npmmirror.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",
"integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==",
"dev": true,
"dependencies": {
"array-includes": "^3.1.6",
"array.prototype.flat": "^1.3.1",
"object.assign": "^4.1.4",
"object.values": "^1.1.6"
},
"engines": {
"node": ">=4.0"
}
},
"node_modules/keyv": { "node_modules/keyv": {
"version": "4.5.4", "version": "4.5.4",
"resolved": "https://registry.npmmirror.com/keyv/-/keyv-4.5.4.tgz", "resolved": "https://registry.npmmirror.com/keyv/-/keyv-4.5.4.tgz",
@ -9697,6 +9995,18 @@
"url": "https://github.com/chalk/wrap-ansi?sponsor=1" "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
} }
}, },
"node_modules/loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmmirror.com/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"dependencies": {
"js-tokens": "^3.0.0 || ^4.0.0"
},
"bin": {
"loose-envify": "cli.js"
}
},
"node_modules/lower-case": { "node_modules/lower-case": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/lower-case/-/lower-case-2.0.2.tgz", "resolved": "https://registry.npmmirror.com/lower-case/-/lower-case-2.0.2.tgz",
@ -10460,6 +10770,39 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/object.entries": {
"version": "1.1.9",
"resolved": "https://registry.npmmirror.com/object.entries/-/object.entries-1.1.9.tgz",
"integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.8",
"call-bound": "^1.0.4",
"define-properties": "^1.2.1",
"es-object-atoms": "^1.1.1"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/object.fromentries": {
"version": "2.0.8",
"resolved": "https://registry.npmmirror.com/object.fromentries/-/object.fromentries-2.0.8.tgz",
"integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.2",
"es-object-atoms": "^1.0.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/object.pick": { "node_modules/object.pick": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmmirror.com/object.pick/-/object.pick-1.3.0.tgz", "resolved": "https://registry.npmmirror.com/object.pick/-/object.pick-1.3.0.tgz",
@ -10481,6 +10824,24 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/object.values": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/object.values/-/object.values-1.2.1.tgz",
"integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.8",
"call-bound": "^1.0.3",
"define-properties": "^1.2.1",
"es-object-atoms": "^1.0.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/on-finished": { "node_modules/on-finished": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.3.0.tgz", "resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.3.0.tgz",
@ -11040,6 +11401,17 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/prop-types": {
"version": "15.8.1",
"resolved": "https://registry.npmmirror.com/prop-types/-/prop-types-15.8.1.tgz",
"integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
"dev": true,
"dependencies": {
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
"react-is": "^16.13.1"
}
},
"node_modules/prosemirror-changeset": { "node_modules/prosemirror-changeset": {
"version": "2.3.1", "version": "2.3.1",
"resolved": "https://registry.npmmirror.com/prosemirror-changeset/-/prosemirror-changeset-2.3.1.tgz", "resolved": "https://registry.npmmirror.com/prosemirror-changeset/-/prosemirror-changeset-2.3.1.tgz",
@ -11316,6 +11688,12 @@
"safe-buffer": "^5.1.0" "safe-buffer": "^5.1.0"
} }
}, },
"node_modules/react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
"dev": true
},
"node_modules/read-pkg": { "node_modules/read-pkg": {
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmmirror.com/read-pkg/-/read-pkg-5.2.0.tgz", "resolved": "https://registry.npmmirror.com/read-pkg/-/read-pkg-5.2.0.tgz",
@ -12706,6 +13084,43 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/string.prototype.matchall": {
"version": "4.0.12",
"resolved": "https://registry.npmmirror.com/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz",
"integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.8",
"call-bound": "^1.0.3",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.6",
"es-errors": "^1.3.0",
"es-object-atoms": "^1.0.0",
"get-intrinsic": "^1.2.6",
"gopd": "^1.2.0",
"has-symbols": "^1.1.0",
"internal-slot": "^1.1.0",
"regexp.prototype.flags": "^1.5.3",
"set-function-name": "^2.0.2",
"side-channel": "^1.1.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/string.prototype.repeat": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz",
"integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==",
"dev": true,
"dependencies": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.5"
}
},
"node_modules/string.prototype.trim": { "node_modules/string.prototype.trim": {
"version": "1.2.10", "version": "1.2.10",
"resolved": "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", "resolved": "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
@ -13610,6 +14025,29 @@
"node": ">=12.20" "node": ">=12.20"
} }
}, },
"node_modules/typescript-eslint": {
"version": "8.39.0",
"resolved": "https://registry.npmmirror.com/typescript-eslint/-/typescript-eslint-8.39.0.tgz",
"integrity": "sha512-lH8FvtdtzcHJCkMOKnN73LIn6SLTpoojgJqDAxPm1jCR14eWSGPX8ul/gggBdPMk/d5+u9V854vTYQ8T5jF/1Q==",
"dev": true,
"dependencies": {
"@typescript-eslint/eslint-plugin": "8.39.0",
"@typescript-eslint/parser": "8.39.0",
"@typescript-eslint/typescript-estree": "8.39.0",
"@typescript-eslint/utils": "8.39.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/uc.micro": { "node_modules/uc.micro": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-2.1.0.tgz",

View File

@ -64,21 +64,27 @@
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^2.16.3", "@antfu/eslint-config": "^2.16.3",
"@arco-design/web-vue": "^2.57.0", "@arco-design/web-vue": "^2.57.0",
"@eslint/js": "^9.32.0",
"@types/crypto-js": "^4.2.2", "@types/crypto-js": "^4.2.2",
"@types/lodash-es": "^4.17.12", "@types/lodash-es": "^4.17.12",
"@types/node": "^20.2.5", "@types/node": "^20.2.5",
"@types/query-string": "^6.3.0", "@types/query-string": "^6.3.0",
"@typescript-eslint/eslint-plugin": "^8.39.0",
"@typescript-eslint/parser": "^8.39.0",
"@vitejs/plugin-vue": "^5.2.1", "@vitejs/plugin-vue": "^5.2.1",
"@vitejs/plugin-vue-jsx": "^3.1.0", "@vitejs/plugin-vue-jsx": "^3.1.0",
"@vue/tsconfig": "^0.1.3", "@vue/tsconfig": "^0.1.3",
"boxen": "^7.1.1", "boxen": "^7.1.1",
"eslint": "^9.0.0", "eslint": "^9.32.0",
"eslint-plugin-react": "^7.37.5",
"globals": "^16.3.0",
"less": "^4.1.3", "less": "^4.1.3",
"less-loader": "^11.0.0", "less-loader": "^11.0.0",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
"sass": "^1.62.1", "sass": "^1.62.1",
"sass-loader": "^13.2.2", "sass-loader": "^13.2.2",
"typescript": "~5.0.4", "typescript": "~5.0.4",
"typescript-eslint": "^8.39.0",
"unplugin-auto-import": "^0.16.4", "unplugin-auto-import": "^0.16.4",
"unplugin-vue-components": "^0.25.1", "unplugin-vue-components": "^0.25.1",
"vite": "^5.1.5", "vite": "^5.1.5",

View File

@ -0,0 +1,125 @@
import http from '@/utils/http'
import type { EquipmentListReq, EquipmentReq, EquipmentResp } from './type'
/**
* API
*/
export const equipmentProcurementApi = {
/**
*
*/
page: (params: EquipmentListReq) => {
console.log('🔍 API - equipmentProcurementApi.page 被调用')
console.log('🔍 API - 接收到的参数:', params)
console.log('🔍 API - 参数类型:', typeof params)
console.log('🔍 API - 参数的键值对:')
Object.entries(params).forEach(([key, value]) => {
console.log(` ${key}: ${value} (${typeof value})`)
})
// 确保参数格式正确
const requestParams = {
...params,
// 确保分页参数存在
page: params.page || 1,
pageSize: params.pageSize || 10,
}
console.log('🔍 API - 最终请求参数:', requestParams)
console.log('🔍 API - 准备发送GET请求到 /equipment/procurement/page')
console.log('🔍 API - 请求参数序列化前:', requestParams)
// 手动序列化参数进行调试使用URLSearchParams
const searchParams = new URLSearchParams()
Object.entries(requestParams).forEach(([key, value]) => {
if (value !== undefined && value !== null && value !== '') {
searchParams.append(key, String(value))
}
})
console.log('🔍 API - 手动序列化后的参数:', searchParams.toString())
// 参考设备模块的调用方式,直接将参数作为第二个参数传递
return http.get<ApiRes<PageRes<EquipmentResp>>>('/equipment/procurement/page', requestParams)
},
/**
* - 使API文档中的参数格式
*/
testPage: () => {
console.log('🧪 API - 测试参数传递')
// 使用API文档中的参数格式进行测试
const testParams = {
page: 1,
pageSize: 10,
equipmentName: '测试设备',
supplierName: '测试供应商',
quantity: 10,
unitPrice: 100.50,
totalPrice: 1005.00,
accountNumber: 'TEST001',
brand: '测试品牌',
locationStatus: 'spare',
physicalLocation: '测试位置',
purchaseOrder: 'PO001',
inventoryBasis: '测试依据',
dynamicRecord: '测试记录'
}
console.log('🧪 API - 测试参数:', testParams)
return http.get<ApiRes<PageRes<EquipmentResp>>>('/equipment/procurement/page', testParams)
},
/**
*
*/
add: (data: EquipmentReq) => {
return http.post<ApiRes<null>>('/equipment/procurement', data)
},
/**
*
*/
update: (equipmentId: string, data: EquipmentReq) => {
return http.put<ApiRes<null>>(`/equipment/procurement/${equipmentId}`, data)
},
/**
*
*/
delete: (equipmentId: string) => {
return http.del<ApiRes<null>>(`/equipment/procurement/${equipmentId}`)
},
/**
*
*/
detail: (equipmentId: string) => {
return http.get<ApiRes<EquipmentResp>>(`/equipment/procurement/detail/${equipmentId}`)
},
/**
*
*/
getStats: () => {
return http.get<ApiRes<unknown>>('/equipment/procurement/stats')
},
/**
*
*/
batchDelete: (equipmentIds: string[]) => {
return http.del<ApiRes<null>>('/equipment/procurement/batch', { data: equipmentIds })
},
/**
*
*/
export: (params: EquipmentListReq) => {
return http.get<Blob>('/equipment/procurement/export', {
params,
responseType: 'blob'
})
}
}

View File

@ -26,6 +26,44 @@ export interface EquipmentListReq {
projectId?: string projectId?: string
/** 使用人ID */ /** 使用人ID */
userId?: string userId?: string
/** 设备型号 */
equipmentModel?: string
/** 配置规格/参数 */
specification?: string
/** 设备当前物理位置 */
physicalLocation?: string
/** 供应商名称 */
supplierName?: string
/** 采购订单号 */
purchaseOrder?: string
/** 维护人员 */
maintenancePerson?: string
/** 次户号 */
accountNumber?: string
/** 数量 */
quantity?: number
/** 单价 */
unitPrice?: number
/** 总价 */
totalPrice?: number
/** 盘点依据 */
inventoryBasis?: string
/** 动态记录 */
dynamicRecord?: string
/** 资产备注 */
assetRemark?: string
/** 采购时间开始 */
purchaseTimeStart?: string
/** 采购时间结束 */
purchaseTimeEnd?: string
/** 入库时间开始 */
inStockTimeStart?: string
/** 入库时间结束 */
inStockTimeEnd?: string
/** 启用时间开始 */
activationTimeStart?: string
/** 启用时间结束 */
activationTimeEnd?: string
/** 当前页码 */ /** 当前页码 */
pageNum?: number pageNum?: number
/** 每页大小 */ /** 每页大小 */
@ -34,6 +72,8 @@ export interface EquipmentListReq {
orderBy?: string orderBy?: string
/** 排序方向 */ /** 排序方向 */
orderDirection?: string orderDirection?: string
/** 页码 */
page?: number
} }
/** /**
@ -136,6 +176,18 @@ export interface EquipmentResp {
createTime?: string createTime?: string
/** 更新时间 */ /** 更新时间 */
updateTime?: string updateTime?: string
/** 次户号 */
accountNumber?: string
/** 数量 */
quantity?: number
/** 单价 */
unitPrice?: number
/** 总价 */
totalPrice?: number
/** 盘点依据 */
inventoryBasis?: string
/** 动态记录 */
dynamicRecord?: string
} }
/** /**
@ -204,4 +256,16 @@ export interface EquipmentReq {
inventoryBarcode?: string inventoryBarcode?: string
/** 资产备注 */ /** 资产备注 */
assetRemark?: string assetRemark?: string
/** 次户号 */
accountNumber?: string
/** 数量 */
quantity?: number
/** 单价 */
unitPrice?: number
/** 总价 */
totalPrice?: number
/** 盘点依据 */
inventoryBasis?: string
/** 动态记录 */
dynamicRecord?: string
} }

View File

@ -270,7 +270,7 @@ export const systemRoutes: RouteRecordRaw[] = [
{ {
path: '/asset-management/device-management/procurement', path: '/asset-management/device-management/procurement',
name: 'DeviceProcurement', name: 'DeviceProcurement',
component: () => import('@/views/system-resource/device-management/index.vue'), component: () => import('@/views/system-resource/device-management/procurement/index.vue'),
meta: { meta: {
title: '设备采购', title: '设备采购',
icon: 'shopping-cart', icon: 'shopping-cart',

View File

@ -181,8 +181,10 @@ const storeSetup = () => {
}] }]
// 使用已转换的数据生成路由 // 使用已转换的数据生成路由
const asyncRoutes = formatAsyncRoutes(data as unknown as RouteItem[]) const asyncRoutes = formatAsyncRoutes(data as unknown as RouteItem[])
const flatRoutes = flatMultiLevelRoutes(cloneDeep(asyncRoutes)) // 合并systemRoutes中的路由
setRoutes(asyncRoutes) const allRoutes = [...asyncRoutes, ...systemRoutes]
const flatRoutes = flatMultiLevelRoutes(cloneDeep(allRoutes))
setRoutes(allRoutes)
return flatRoutes return flatRoutes
} }

44
src/utils/date.ts Normal file
View File

@ -0,0 +1,44 @@
import dayjs from 'dayjs'
/**
*
* @param date
* @param format 'YYYY-MM-DD HH:mm:ss'
* @returns
*/
export function formatDateTime(date: string | Date | null | undefined, format = 'YYYY-MM-DD HH:mm:ss'): string {
if (!date) return '-'
return dayjs(date).format(format)
}
/**
*
* @param date
* @param format 'YYYY-MM-DD'
* @returns
*/
export function formatDate(date: string | Date | null | undefined, format = 'YYYY-MM-DD'): string {
if (!date) return '-'
return dayjs(date).format(format)
}
/**
*
* @param date
* @param format 'HH:mm:ss'
* @returns
*/
export function formatTime(date: string | Date | null | undefined, format = 'HH:mm:ss'): string {
if (!date) return '-'
return dayjs(date).format(format)
}
/**
*
* @param date
* @returns
*/
export function getRelativeTime(date: string | Date | null | undefined): string {
if (!date) return '-'
return dayjs(date).fromNow()
}

View File

@ -293,22 +293,32 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="采购价格" field="purchasePrice"> <a-form-item label="次户号" field="accountNumber">
<a-input-number <a-input
v-model="formData.purchasePrice" v-model="formData.accountNumber"
placeholder="请输入采购价格" placeholder="请输入次户号"
:disabled="isView" :disabled="isView"
style="width: 100%" show-word-limit
:precision="2" :max-length="50"
:min="0"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="8">
<a-form-item label="当前净值" field="currentNetValue"> <a-form-item label="数量" field="quantity">
<a-input-number <a-input-number
v-model="formData.currentNetValue" v-model="formData.quantity"
placeholder="请输入当前净值" placeholder="请输入数量"
:disabled="isView"
style="width: 100%"
:min="1"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="单价" field="unitPrice">
<a-input-number
v-model="formData.unitPrice"
placeholder="请输入单价"
:disabled="isView" :disabled="isView"
style="width: 100%" style="width: 100%"
:precision="2" :precision="2"
@ -320,10 +330,10 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="残值" field="salvageValue"> <a-form-item label="总价" field="totalPrice">
<a-input-number <a-input-number
v-model="formData.salvageValue" v-model="formData.totalPrice"
placeholder="请输入残值" placeholder="请输入总价"
:disabled="isView" :disabled="isView"
style="width: 100%" style="width: 100%"
:precision="2" :precision="2"
@ -332,14 +342,41 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="折旧年限" field="depreciationYears"> <a-form-item label="采购价格" field="purchasePrice">
<a-input-number <a-input-number
v-model="formData.depreciationYears" v-model="formData.purchasePrice"
placeholder="请输入折旧年限" placeholder="请输入采购价格"
:disabled="isView" :disabled="isView"
style="width: 100%" style="width: 100%"
:precision="2"
:min="0" :min="0"
:max="100" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="盘点依据" field="inventoryBasis">
<a-textarea
v-model="formData.inventoryBasis"
placeholder="请输入盘点依据"
:disabled="isView"
:rows="3"
show-word-limit
:max-length="500"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="动态记录" field="dynamicRecord">
<a-textarea
v-model="formData.dynamicRecord"
placeholder="请输入动态记录"
:disabled="isView"
:rows="3"
show-word-limit
:max-length="1000"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -803,6 +840,14 @@ const formData = ref<FormDataType>({
purchaseOrder: '', purchaseOrder: '',
supplierName: '', supplierName: '',
//
accountNumber: '',
quantity: 1,
unitPrice: undefined,
totalPrice: undefined,
inventoryBasis: '',
dynamicRecord: '',
// //
assetRemark: '', assetRemark: '',
@ -880,6 +925,26 @@ const rules = {
{ maxLength: 200, message: '供应商名称长度不能超过200个字' }, { maxLength: 200, message: '供应商名称长度不能超过200个字' },
], ],
//
accountNumber: [
{ maxLength: 50, message: '次户号长度不能超过50个字' },
],
quantity: [
{ type: 'number', min: 1, message: '数量必须大于等于1' },
],
unitPrice: [
{ type: 'number', min: 0, message: '单价必须大于等于0' },
],
totalPrice: [
{ type: 'number', min: 0, message: '总价必须大于等于0' },
],
inventoryBasis: [
{ maxLength: 500, message: '盘点依据长度不能超过500个字' },
],
dynamicRecord: [
{ maxLength: 1000, message: '动态记录长度不能超过1000个字' },
],
// //
purchasePrice: [ purchasePrice: [
{ type: 'number', min: 0, message: '采购价格必须大于等于0' }, { type: 'number', min: 0, message: '采购价格必须大于等于0' },
@ -1049,6 +1114,14 @@ const resetFormData = () => {
purchaseOrder: '', purchaseOrder: '',
supplierName: '', supplierName: '',
//
accountNumber: '',
quantity: 1,
unitPrice: undefined,
totalPrice: undefined,
inventoryBasis: '',
dynamicRecord: '',
// //
assetRemark: '', assetRemark: '',
@ -1239,6 +1312,14 @@ const fillTestData = () => {
purchaseOrder: 'PO20250101001', purchaseOrder: 'PO20250101001',
supplierName: '测试供应商有限公司', supplierName: '测试供应商有限公司',
//
accountNumber: '001',
quantity: 10,
unitPrice: 1000.00,
totalPrice: 10000.00,
inventoryBasis: '盘点',
dynamicRecord: '设备正常使用,无异常',
// //
assetRemark: '这是一台测试设备,用于系统功能验证和演示。设备性能良好,维护记录完整。', assetRemark: '这是一台测试设备,用于系统功能验证和演示。设备性能良好,维护记录完整。',

View File

@ -220,15 +220,15 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, reactive, ref, watch } from 'vue' import { onMounted, reactive, ref, watch } from 'vue'
import { Modal } from '@arco-design/web-vue' import { Modal } from '@arco-design/web-vue'
import { import {
IconCheckCircle,
IconClockCircle,
IconDesktop,
IconDownload,
IconExclamationCircle,
IconPlus, IconPlus,
IconRefresh, IconRefresh,
IconSearch, IconSearch
IconDesktop,
IconCheckCircle,
IconClockCircle,
IconExclamationCircle,
IconDownload
} from '@arco-design/web-vue/es/icon' } from '@arco-design/web-vue/es/icon'
import message from '@arco-design/web-vue/es/message' import message from '@arco-design/web-vue/es/message'
import DeviceModal from './components/DeviceModal.vue' import DeviceModal from './components/DeviceModal.vue'

View File

@ -0,0 +1,661 @@
<template>
<div class="procurement-search-container">
<!-- 搜索按钮 -->
<div class="search-trigger">
<a-button type="primary" @click="showSearchModal = true">
<template #icon>
<IconSearch />
</template>
搜索采购记录
</a-button>
</div>
<!-- 搜索弹窗 -->
<a-modal
v-model:visible="showSearchModal"
class="search-modal"
title="采购记录搜索"
width="1200px"
:footer="false"
@cancel="handleCancel"
>
<div class="search-content">
<a-form layout="vertical" :model="searchForm" class="search-form">
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="设备名称">
<a-input
v-model="searchForm.equipmentName"
placeholder="请输入设备名称"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="设备类型">
<a-select
v-model="searchForm.equipmentType"
:options="equipmentTypeOptions"
placeholder="请选择设备类型"
allow-clear
@change="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="设备状态">
<a-select
v-model="searchForm.equipmentStatus"
:options="equipmentStatusOptions"
placeholder="请选择设备状态"
allow-clear
@change="debouncedSearch"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="位置状态">
<a-select
v-model="searchForm.locationStatus"
:options="locationStatusOptions"
placeholder="请选择位置状态"
allow-clear
@change="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="健康状态">
<a-select
v-model="searchForm.healthStatus"
:options="healthStatusOptions"
placeholder="请选择健康状态"
allow-clear
@change="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="使用状态">
<a-select
v-model="searchForm.useStatus"
:options="useStatusOptions"
placeholder="请选择使用状态"
allow-clear
@change="debouncedSearch"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="次户号">
<a-input
v-model="searchForm.accountNumber"
placeholder="请输入次户号"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="设备序列号">
<a-input
v-model="searchForm.equipmentSn"
placeholder="请输入设备序列号"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="资产编号">
<a-input
v-model="searchForm.assetCode"
placeholder="请输入资产编号"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="品牌">
<a-input
v-model="searchForm.brand"
placeholder="请输入品牌"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="设备型号">
<a-input
v-model="searchForm.equipmentModel"
placeholder="请输入设备型号"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="规格型号">
<a-input
v-model="searchForm.specification"
placeholder="请输入规格型号"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="物理位置">
<a-input
v-model="searchForm.physicalLocation"
placeholder="请输入物理位置"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="负责人">
<a-input
v-model="searchForm.responsiblePerson"
placeholder="请输入负责人"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="维护人员">
<a-input
v-model="searchForm.maintenancePerson"
placeholder="请输入维护人员"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="采购订单">
<a-input
v-model="searchForm.purchaseOrder"
placeholder="请输入采购订单号"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="供应商">
<a-input
v-model="searchForm.supplierName"
placeholder="请输入供应商名称"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="数量">
<a-input-number
v-model="searchForm.quantity"
placeholder="请输入数量"
:min="1"
style="width: 100%"
@change="debouncedSearch"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="单价">
<a-input-number
v-model="searchForm.unitPrice"
placeholder="请输入单价"
:precision="2"
:min="0"
style="width: 100%"
@change="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="总价">
<a-input-number
v-model="searchForm.totalPrice"
placeholder="请输入总价"
:precision="2"
:min="0"
style="width: 100%"
@change="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="盘点依据">
<a-input
v-model="searchForm.inventoryBasis"
placeholder="请输入盘点依据"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="动态记录">
<a-input
v-model="searchForm.dynamicRecord"
placeholder="请输入动态记录"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="资产备注">
<a-input
v-model="searchForm.assetRemark"
placeholder="请输入资产备注"
allow-clear
@input="debouncedSearch"
/>
</a-form-item>
</a-col>
</a-row>
<!-- 时间范围搜索 -->
<a-row :gutter="24">
<a-col :span="8">
<a-form-item label="采购时间范围">
<a-range-picker
v-model="purchaseTimeRange"
placeholder="['开始时间', '结束时间']"
style="width: 100%"
@change="handleTimeRangeChange"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="入库时间范围">
<a-range-picker
v-model="inStockTimeRange"
placeholder="['开始时间', '结束时间']"
style="width: 100%"
@change="handleTimeRangeChange"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="启用时间范围">
<a-range-picker
v-model="activationTimeRange"
placeholder="['开始时间', '结束时间']"
style="width: 100%"
@change="handleTimeRangeChange"
/>
</a-form-item>
</a-col>
</a-row>
<!-- 搜索操作按钮 -->
<div class="search-actions">
<a-space>
<a-button :loading="loading" type="primary" @click="handleSearch">
<template #icon>
<IconSearch />
</template>
搜索
</a-button>
<a-button @click="handleReset">
<template #icon>
<IconRefresh />
</template>
重置
</a-button>
<a-button type="dashed" @click="handleTestSearch">
测试搜索
</a-button>
<a-button @click="handleCancel">
取消
</a-button>
</a-space>
</div>
</a-form>
</div>
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { reactive, ref } from 'vue'
import { IconRefresh, IconSearch } from '@arco-design/web-vue/es/icon'
import type { EquipmentListReq } from '@/apis/equipment/type'
interface Props {
loading?: boolean
}
// eslint-disable-next-line unused-imports/no-unused-vars
const props = withDefaults(defineProps<Props>(), {
loading: false,
})
const emit = defineEmits<{
search: [params: EquipmentListReq]
reset: []
}>()
//
const showSearchModal = ref(false)
//
// eslint-disable-next-line ts/no-unsafe-function-type
const debounce = (func: Function, delay: number) => {
let timeoutId: NodeJS.Timeout
return (...args: any[]) => {
clearTimeout(timeoutId)
// eslint-disable-next-line prefer-spread
timeoutId = setTimeout(() => func.apply(null, args), delay)
}
}
const searchForm = reactive<EquipmentListReq>({
equipmentName: '',
equipmentType: '',
equipmentStatus: '',
equipmentSn: '',
assetCode: '',
brand: '',
locationStatus: '',
healthStatus: '',
responsiblePerson: '',
useStatus: '',
equipmentModel: '',
specification: '',
physicalLocation: '',
supplierName: '',
purchaseOrder: '',
maintenancePerson: '',
accountNumber: '',
quantity: undefined,
unitPrice: undefined,
totalPrice: undefined,
inventoryBasis: '',
dynamicRecord: '',
assetRemark: '',
//
purchaseTimeStart: '',
purchaseTimeEnd: '',
inStockTimeStart: '',
inStockTimeEnd: '',
activationTimeStart: '',
activationTimeEnd: '',
})
//
const purchaseTimeRange = ref<[string, string] | null>(null)
const inStockTimeRange = ref<[string, string] | null>(null)
const activationTimeRange = ref<[string, string] | null>(null)
const equipmentTypeOptions = [
{ label: '检测设备', value: 'detection' },
{ label: '安防设备', value: 'security' },
{ label: '办公设备', value: 'office' },
{ label: '车辆', value: 'car' },
{ label: '其他设备', value: 'other' },
]
const equipmentStatusOptions = [
{ label: '正常', value: 'normal' },
{ label: '维修中', value: 'repair' },
{ label: '保养中', value: 'maintain' },
{ label: '报废', value: 'scrap' },
]
const locationStatusOptions = [
{ label: '正常', value: 'normal' },
{ label: '备用', value: 'spare' },
{ label: '使用中', value: 'in_use' },
{ label: '维护中', value: 'maintenance' },
{ label: '维修中', value: 'repair' },
]
const healthStatusOptions = [
{ label: '待认证', value: 'pending' },
{ label: '已认证', value: 'certified' },
{ label: '已过期', value: 'expired' },
{ label: '正常', value: 'normal' },
{ label: '警告', value: 'warning' },
{ label: '严重', value: 'critical' },
]
const useStatusOptions = [
{ label: '空闲中', value: '0' },
{ label: '使用中', value: '1' },
]
//
const debouncedSearch = debounce(() => {
console.log('🔍 ProcurementSearch - 防抖搜索触发')
console.log('🔍 ProcurementSearch - 搜索表单数据:', searchForm)
emit('search', { ...searchForm })
}, 300)
const handleSearch = () => {
console.log('🔍 ProcurementSearch - 搜索按钮被点击')
console.log('🔍 ProcurementSearch - 原始搜索表单数据:', searchForm)
//
const processedParams = {
...searchForm,
//
quantity: searchForm.quantity ? Number(searchForm.quantity) : undefined,
unitPrice: searchForm.unitPrice ? Number(searchForm.unitPrice) : undefined,
totalPrice: searchForm.totalPrice ? Number(searchForm.totalPrice) : undefined,
//
equipmentName: searchForm.equipmentName?.trim() || undefined,
equipmentType: searchForm.equipmentType?.trim() || undefined,
supplierName: searchForm.supplierName?.trim() || undefined,
purchaseOrder: searchForm.purchaseOrder?.trim() || undefined,
accountNumber: searchForm.accountNumber?.trim() || undefined,
inventoryBasis: searchForm.inventoryBasis?.trim() || undefined,
dynamicRecord: searchForm.dynamicRecord?.trim() || undefined,
}
// undefinednull
const filteredParams = Object.fromEntries(
Object.entries(processedParams).filter(([_, value]) => value !== undefined && value !== null && value !== ''),
)
console.log('🔍 ProcurementSearch - 处理后的参数:', filteredParams)
console.log('🔍 ProcurementSearch - 参数类型检查:')
Object.entries(filteredParams).forEach(([key, value]) => {
console.log(` ${key}: ${value} (${typeof value})`)
})
emit('search', filteredParams)
showSearchModal.value = false
}
const handleReset = () => {
console.log('🔄 ProcurementSearch - 重置按钮被点击')
console.log('🔄 ProcurementSearch - 重置前的表单数据:', { ...searchForm })
Object.keys(searchForm).forEach((key) => {
searchForm[key as keyof EquipmentListReq] = '' as any
})
//
purchaseTimeRange.value = null
inStockTimeRange.value = null
activationTimeRange.value = null
console.log('🔄 ProcurementSearch - 重置后的表单数据:', { ...searchForm })
emit('reset')
}
const handleCancel = () => {
showSearchModal.value = false
}
//
const handleTimeRangeChange = () => {
//
if (purchaseTimeRange.value) {
searchForm.purchaseTimeStart = purchaseTimeRange.value[0]
searchForm.purchaseTimeEnd = purchaseTimeRange.value[1]
} else {
searchForm.purchaseTimeStart = ''
searchForm.purchaseTimeEnd = ''
}
if (inStockTimeRange.value) {
searchForm.inStockTimeStart = inStockTimeRange.value[0]
searchForm.inStockTimeEnd = inStockTimeRange.value[1]
} else {
searchForm.inStockTimeStart = ''
searchForm.inStockTimeEnd = ''
}
if (activationTimeRange.value) {
searchForm.activationTimeStart = activationTimeRange.value[0]
searchForm.activationTimeEnd = activationTimeRange.value[1]
} else {
searchForm.activationTimeStart = ''
searchForm.activationTimeEnd = ''
}
debouncedSearch()
}
const handleTestSearch = () => {
console.log('🔍 ProcurementSearch - 测试搜索按钮被点击')
console.log('🔍 ProcurementSearch - 当前搜索表单数据:', searchForm)
console.log('🔍 ProcurementSearch - 当前搜索表单数据类型:', typeof searchForm)
console.log('🔍 ProcurementSearch - 当前搜索表单的键值对:')
Object.entries(searchForm).forEach(([key, value]) => {
console.log(` ${key}: ${value} (${typeof value})`)
})
emit('search', { ...searchForm })
showSearchModal.value = false
}
defineExpose({
reset: handleReset,
getSearchForm: () => ({ ...searchForm }),
showModal: () => { showSearchModal.value = true },
})
</script>
<style lang="scss" scoped>
.procurement-search-container {
.search-trigger {
margin-bottom: 16px;
}
}
.search-modal {
.arco-modal-header {
padding: 20px 24px 16px;
border-bottom: 1px solid var(--color-border);
.arco-modal-title {
font-size: 18px;
font-weight: 600;
color: var(--color-text-1);
}
}
.arco-modal-body {
padding: 24px;
}
}
.search-content {
.search-form {
.arco-form-item {
margin-bottom: 20px;
.arco-form-item-label {
font-weight: 500;
color: var(--color-text-1);
margin-bottom: 8px;
font-size: 14px;
}
}
.arco-input,
.arco-select,
.arco-input-number {
border-radius: 6px;
border: 1px solid var(--color-border);
transition: all 0.2s ease;
&:hover {
border-color: var(--color-primary-light-3);
}
&:focus,
&.arco-input-focus,
&.arco-select-focus {
border-color: var(--color-primary);
box-shadow: 0 0 0 2px rgba(var(--primary-6), 0.1);
}
}
.arco-input-inner {
padding: 8px 12px;
font-size: 14px;
}
.arco-select-view {
padding: 8px 12px;
font-size: 14px;
}
.arco-select-arrow {
color: var(--color-text-3);
}
.arco-input-inner::placeholder {
color: var(--color-text-3);
font-size: 14px;
}
.arco-input-clear-btn {
color: var(--color-text-3);
&:hover {
color: var(--color-text-2);
}
}
}
.search-actions {
display: flex;
justify-content: center;
margin-top: 32px;
padding-top: 24px;
border-top: 1px solid var(--color-border);
}
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long