检验项目界面修改
This commit is contained in:
parent
132b87b4c3
commit
decd86b217
@ -2,29 +2,80 @@ import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
import pluginVue from "eslint-plugin-vue";
|
||||
import { defineConfig } from "eslint/config";
|
||||
|
||||
// 引入 TypeScript ESLint 插件和解析器
|
||||
import tsParser from "@typescript-eslint/parser";
|
||||
import tsPlugin from "@typescript-eslint/eslint-plugin";
|
||||
|
||||
export default defineConfig([
|
||||
{ files: ["**/*.{js,mjs,cjs,vue}"], plugins: { js }, extends: ["js/recommended"] },
|
||||
{ files: ["**/*.{js,mjs,cjs,vue}"], languageOptions: { globals: globals.browser } },
|
||||
// 1. 基础 JS 规则(适用于 JS/Vue 文件)
|
||||
{
|
||||
files: ["**/*.{js,mjs,cjs,vue}"],
|
||||
plugins: { js },
|
||||
extends: ["js/recommended"]
|
||||
},
|
||||
// 2. 浏览器环境全局变量(适用于 JS/Vue/TS 文件)
|
||||
{
|
||||
files: ["**/*.{js,mjs,cjs,vue,ts,tsx}"],
|
||||
languageOptions: {
|
||||
globals: globals.browser
|
||||
}
|
||||
},
|
||||
// 3. Vue 基础规则
|
||||
pluginVue.configs["flat/essential"],
|
||||
// 4. Auto-import 插件配置(保持不变)
|
||||
{
|
||||
plugins: {
|
||||
'auto-import': {
|
||||
extensions: ['.js', '.mjs', '.jsx', '.vue'],
|
||||
extensions: ['.js', '.mjs', '.jsx', '.vue', '.ts', '.tsx'], // 增加 TS 扩展名
|
||||
},
|
||||
},
|
||||
},
|
||||
// 5. TypeScript 专属配置(核心)
|
||||
{
|
||||
// 仅对 TS/TSX 文件生效
|
||||
files: ["**/*.{ts,tsx}"],
|
||||
// 指定 TS 解析器
|
||||
languageOptions: {
|
||||
parser: tsParser,
|
||||
// 解析器选项(需与 tsconfig.json 匹配)
|
||||
parserOptions: {
|
||||
ecmaVersion: "latest", // 支持最新 ES 语法
|
||||
sourceType: "module", // 模块类型(ESM)
|
||||
project: "./tsconfig.json", // 指向项目的 tsconfig.json(启用类型检查)
|
||||
tsconfigRootDir: process.cwd(), // 确保找到 tsconfig.json 的根目录
|
||||
},
|
||||
},
|
||||
// 引入 TS 插件
|
||||
plugins: {
|
||||
"@typescript-eslint": tsPlugin,
|
||||
},
|
||||
// 继承 TS 推荐规则(可选,按需调整)
|
||||
extends: [
|
||||
"plugin:@typescript-eslint/recommended", // 基础推荐规则
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking" // 依赖类型检查的规则(需 project 配置)
|
||||
],
|
||||
// TS 专属规则(可自定义)
|
||||
rules: {
|
||||
// 示例:禁用某些严格规则(根据需求调整)
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/no-explicit-any": "warn"
|
||||
}
|
||||
},
|
||||
// 6. 全局规则(覆盖所有文件)
|
||||
{
|
||||
rules: {
|
||||
//'auto-import/export': 'error',
|
||||
// 可在此处添加适用于所有文件的规则
|
||||
// 例如关闭不必要的规则
|
||||
"no-undef": "off" // TS 已有类型检查,可关闭 JS 的 undef 检查
|
||||
},
|
||||
},
|
||||
// 7. Auto-import 配置(增加 TS 支持)
|
||||
{
|
||||
settings: {
|
||||
'auto-import': {
|
||||
// 自动导入的模块配置,与 unplugin-auto-import 配置一致
|
||||
imports: ['vue'],
|
||||
imports: ['vue', 'vue-router'], // 自动导入的模块
|
||||
// 增加 TS 扩展名
|
||||
extensions: ['.js', '.mjs', '.jsx', '.vue', '.ts', '.tsx'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -47,6 +47,8 @@
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.27.0",
|
||||
"@types/vue": "^2.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
||||
"@typescript-eslint/parser": "^8.46.2",
|
||||
"@vitejs/plugin-vue": "5.0.1",
|
||||
"@vue/compiler-sfc": "3.4.0",
|
||||
"eslint": "^9.27.0",
|
||||
|
||||
185
pnpm-lock.yaml
generated
185
pnpm-lock.yaml
generated
@ -108,6 +108,12 @@ importers:
|
||||
'@types/vue':
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0(typescript@5.9.3)
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
specifier: ^8.46.2
|
||||
version: 8.46.2(@typescript-eslint/parser@8.46.2(eslint@9.27.0)(typescript@5.9.3))(eslint@9.27.0)(typescript@5.9.3)
|
||||
'@typescript-eslint/parser':
|
||||
specifier: ^8.46.2
|
||||
version: 8.46.2(eslint@9.27.0)(typescript@5.9.3)
|
||||
'@vitejs/plugin-vue':
|
||||
specifier: 5.0.1
|
||||
version: 5.0.1(vite@5.0.4(@types/node@22.13.9)(sass@1.69.5))(vue@3.4.0(typescript@5.9.3))
|
||||
@ -592,6 +598,65 @@ packages:
|
||||
'@types/web-bluetooth@0.0.20':
|
||||
resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.46.2':
|
||||
resolution: {integrity: sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': ^8.46.2
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/parser@8.46.2':
|
||||
resolution: {integrity: sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/project-service@8.46.2':
|
||||
resolution: {integrity: sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/scope-manager@8.46.2':
|
||||
resolution: {integrity: sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.46.2':
|
||||
resolution: {integrity: sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/type-utils@8.46.2':
|
||||
resolution: {integrity: sha512-HbPM4LbaAAt/DjxXaG9yiS9brOOz6fabal4uvUmaUYe6l3K1phQDMQKBRUrr06BQkxkvIZVVHttqiybM9nJsLA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/types@8.46.2':
|
||||
resolution: {integrity: sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.46.2':
|
||||
resolution: {integrity: sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/utils@8.46.2':
|
||||
resolution: {integrity: sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.46.2':
|
||||
resolution: {integrity: sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@vitejs/plugin-vue@5.0.1':
|
||||
resolution: {integrity: sha512-lwvZX5tDhJpRJEKsjoUSWgaD26Lk9X4aDYGAPpr/Q6cLTT3PC8LPu2dsnYEweAZiNgHsbyKL2Svc/CDrFOsbtw==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
@ -1170,6 +1235,10 @@ packages:
|
||||
resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
eslint-visitor-keys@4.2.1:
|
||||
resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
eslint@9.27.0:
|
||||
resolution: {integrity: sha512-ixRawFQuMB9DZ7fjU3iGGganFDp3+45bPOdaRurcFHSXO1e/sYwUX/FtQZpLZJR6SjMoJH8hR2pPEAfDyCoU2Q==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
@ -1388,6 +1457,9 @@ packages:
|
||||
graceful-fs@4.2.11:
|
||||
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||
|
||||
graphemer@1.4.0:
|
||||
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
|
||||
|
||||
has-ansi@2.0.0:
|
||||
resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@ -1454,6 +1526,10 @@ packages:
|
||||
resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
|
||||
engines: {node: '>= 4'}
|
||||
|
||||
ignore@7.0.5:
|
||||
resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==}
|
||||
engines: {node: '>= 4'}
|
||||
|
||||
image-size@0.5.5:
|
||||
resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@ -2394,6 +2470,12 @@ packages:
|
||||
resolution: {integrity: sha512-vxXDZg8/+p3gblxB6BhhG5yWVn1kGRlaL8O78UDXc3wRnPizB5g83dcvWV1jpDMIPnjZjOFuxlMmE82XJ4407w==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
ts-api-utils@2.1.0:
|
||||
resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==}
|
||||
engines: {node: '>=18.12'}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4'
|
||||
|
||||
ts-morph@9.1.0:
|
||||
resolution: {integrity: sha512-sei4u651MBenr27sD6qLDXN3gZ4thiX71E3qV7SuVtDas0uvK2LtgZkIYUf9DKm/fLJ6AB/+yhRJ1vpEBJgy7Q==}
|
||||
|
||||
@ -2983,6 +3065,99 @@ snapshots:
|
||||
|
||||
'@types/web-bluetooth@0.0.20': {}
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.46.2(@typescript-eslint/parser@8.46.2(eslint@9.27.0)(typescript@5.9.3))(eslint@9.27.0)(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.12.1
|
||||
'@typescript-eslint/parser': 8.46.2(eslint@9.27.0)(typescript@5.9.3)
|
||||
'@typescript-eslint/scope-manager': 8.46.2
|
||||
'@typescript-eslint/type-utils': 8.46.2(eslint@9.27.0)(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.46.2(eslint@9.27.0)(typescript@5.9.3)
|
||||
'@typescript-eslint/visitor-keys': 8.46.2
|
||||
eslint: 9.27.0
|
||||
graphemer: 1.4.0
|
||||
ignore: 7.0.5
|
||||
natural-compare: 1.4.0
|
||||
ts-api-utils: 2.1.0(typescript@5.9.3)
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/parser@8.46.2(eslint@9.27.0)(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 8.46.2
|
||||
'@typescript-eslint/types': 8.46.2
|
||||
'@typescript-eslint/typescript-estree': 8.46.2(typescript@5.9.3)
|
||||
'@typescript-eslint/visitor-keys': 8.46.2
|
||||
debug: 4.4.0
|
||||
eslint: 9.27.0
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/project-service@8.46.2(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/tsconfig-utils': 8.46.2(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.46.2
|
||||
debug: 4.4.0
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/scope-manager@8.46.2':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.46.2
|
||||
'@typescript-eslint/visitor-keys': 8.46.2
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.46.2(typescript@5.9.3)':
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
'@typescript-eslint/type-utils@8.46.2(eslint@9.27.0)(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.46.2
|
||||
'@typescript-eslint/typescript-estree': 8.46.2(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.46.2(eslint@9.27.0)(typescript@5.9.3)
|
||||
debug: 4.4.0
|
||||
eslint: 9.27.0
|
||||
ts-api-utils: 2.1.0(typescript@5.9.3)
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/types@8.46.2': {}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.46.2(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/project-service': 8.46.2(typescript@5.9.3)
|
||||
'@typescript-eslint/tsconfig-utils': 8.46.2(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.46.2
|
||||
'@typescript-eslint/visitor-keys': 8.46.2
|
||||
debug: 4.4.0
|
||||
fast-glob: 3.3.3
|
||||
is-glob: 4.0.3
|
||||
minimatch: 9.0.5
|
||||
semver: 7.7.1
|
||||
ts-api-utils: 2.1.0(typescript@5.9.3)
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/utils@8.46.2(eslint@9.27.0)(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.7.0(eslint@9.27.0)
|
||||
'@typescript-eslint/scope-manager': 8.46.2
|
||||
'@typescript-eslint/types': 8.46.2
|
||||
'@typescript-eslint/typescript-estree': 8.46.2(typescript@5.9.3)
|
||||
eslint: 9.27.0
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.46.2':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.46.2
|
||||
eslint-visitor-keys: 4.2.1
|
||||
|
||||
'@vitejs/plugin-vue@5.0.1(vite@5.0.4(@types/node@22.13.9)(sass@1.69.5))(vue@3.4.0(typescript@5.9.3))':
|
||||
dependencies:
|
||||
vite: 5.0.4(@types/node@22.13.9)(sass@1.69.5)
|
||||
@ -3707,6 +3882,8 @@ snapshots:
|
||||
|
||||
eslint-visitor-keys@4.2.0: {}
|
||||
|
||||
eslint-visitor-keys@4.2.1: {}
|
||||
|
||||
eslint@9.27.0:
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.7.0(eslint@9.27.0)
|
||||
@ -3974,6 +4151,8 @@ snapshots:
|
||||
|
||||
graceful-fs@4.2.11: {}
|
||||
|
||||
graphemer@1.4.0: {}
|
||||
|
||||
has-ansi@2.0.0:
|
||||
dependencies:
|
||||
ansi-regex: 2.1.1
|
||||
@ -4040,6 +4219,8 @@ snapshots:
|
||||
|
||||
ignore@5.3.2: {}
|
||||
|
||||
ignore@7.0.5: {}
|
||||
|
||||
image-size@0.5.5: {}
|
||||
|
||||
immutable@4.3.7: {}
|
||||
@ -5081,6 +5262,10 @@ snapshots:
|
||||
typedarray.prototype.slice: 1.0.5
|
||||
which-typed-array: 1.1.18
|
||||
|
||||
ts-api-utils@2.1.0(typescript@5.9.3):
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
ts-morph@9.1.0:
|
||||
dependencies:
|
||||
'@dsherret/to-absolute-glob': 2.0.2
|
||||
|
||||
28
src/store/modules/dictData.ts
Normal file
28
src/store/modules/dictData.ts
Normal file
@ -0,0 +1,28 @@
|
||||
//字典数据管理
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
// export const useDictDataStore = defineStore('dictData', {
|
||||
// state: () => ({
|
||||
// dictData: {
|
||||
// XMGL: [],
|
||||
// ITEMCLASS: []
|
||||
// }
|
||||
// }),
|
||||
// actions: {
|
||||
// setDictData(data: any) {
|
||||
// this.dictData = { ...this.dictData, ...data }
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
|
||||
//仪器数据
|
||||
export const useYQStore = defineStore('yqStore', {
|
||||
state: () => ({
|
||||
yqList: [] as any[], // 存储仪器列表
|
||||
}),
|
||||
actions: {
|
||||
setYQList(data: any[]) {
|
||||
this.yqList = data
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -3,34 +3,40 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="14" :xs="24">
|
||||
<!-- 表单区域-->
|
||||
<el-form :inline="true" :model="queryParams" class="mb8">
|
||||
<el-form-item label="项目类别" prop="userName">
|
||||
<el-input clearable placeholder="项目类别" prefix-icon="Search" style="width: 150px"/>
|
||||
<el-form inline :model="queryParams" class="mb8">
|
||||
<el-form-item label="项目类别">
|
||||
<SelectTable v-model:data="queryParams.xmgl" :fields="xmglFields" :tableData="dictData.XMGL" label="label" value="value" objKey="value" width="140px" placeholder="项目类别"
|
||||
@getDataValue="getList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="细菌标志" prop="bacteriaFlag">
|
||||
<el-input clearable placeholder="细菌标志" prefix-icon="Search" style="width: 150px"/>
|
||||
<el-form-item label="细菌标志">
|
||||
<SelectTable v-model:data="queryParams.itemclass" :fields="itemclassFields" :tableData="dictData.ITEMCLASS" label="label" value="value" objKey="value" width="140px" placeholder="细菌标志"
|
||||
@getDataValue="getList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仪器代号" prop="instrumentCode">
|
||||
<el-input clearable placeholder="仪器代号" prefix-icon="Search" style="width: 130px"/>
|
||||
<el-form-item label="仪器代号">
|
||||
<SelectTable v-model:data="queryParams.yq" :fields="yqFields" :tableData="instrOptions" label="yqmc" value="yq" objKey="yq" :border="true" width="140px" placeholder="请选择仪器"
|
||||
@getDataValue="getList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="快速查找">
|
||||
<el-input clearable placeholder="快速查找" prefix-icon="Search" style="width: 150px"/>
|
||||
<el-input clearable placeholder="快速查找" v-model="queryParams.inputcode" prefix-icon="Search" style="width: 150px"
|
||||
@change="getList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仪器大类">
|
||||
<el-input clearable placeholder="仪器大类" prefix-icon="Search" style="width: 150px"/>
|
||||
<SelectTable v-model:data="queryParams.yqdl" :fields="yqdlFields" :tableData="yqdlList" label="label" value="value" objKey="value" :border="true" width="140px" placeholder="仪器大类"
|
||||
@getDataValue="getList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目ID">
|
||||
<el-input clearable placeholder="项目ID" prefix-icon="Search" style="width: 150px"/>
|
||||
<el-input clearable placeholder="项目ID" prefix-icon="Search" v-model="queryParams.xmid" style="width: 150px"
|
||||
@change="getList"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio-group v-model="status" fill="primary" size="large">
|
||||
<el-radio value="1">在用</el-radio>
|
||||
<el-radio value="2">停用</el-radio>
|
||||
<el-radio value="3">所有</el-radio>
|
||||
<el-radio-group v-model="queryParams.uflag" fill="primary" size="large" @change="changeStauts">
|
||||
<el-radio value="0">在用</el-radio>
|
||||
<el-radio value="1">停用</el-radio>
|
||||
<el-radio value="">所有</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="isMIC" label="隐藏微生物项目" size="large" />
|
||||
<el-checkbox v-model="queryParams.isMIC" label="隐藏微生物项目" size="large" @change="getList" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@ -42,44 +48,27 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 表格区域-->
|
||||
<el-table :data="dataList" height="65vh" border >
|
||||
<el-table-column label="项目类别" align="center" prop="xmgl">
|
||||
<template #default="{ row }">
|
||||
<CustomTable ref="tableRef" :data="dataList" :columns="columns" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||
:config="tableConfig">
|
||||
<template #xmgl ="{ row }">
|
||||
{{ formatDict(row.xmgl, 'XMGL') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="英文缩写" align="center" prop="xmdh"></el-table-column>
|
||||
<el-table-column label="名称" align="center" prop="xmmc" width="200"></el-table-column>
|
||||
<el-table-column label="参考值" align="center" prop="dyckz"></el-table-column>
|
||||
<el-table-column label="单位" align="center" prop="dw"></el-table-column>
|
||||
<el-table-column label="结果类型" align="center" prop="xmlb"></el-table-column>
|
||||
<el-table-column label="计算项目" align="center" prop="jsxm"></el-table-column>
|
||||
<el-table-column label="序号" align="center" prop="dyxh"></el-table-column>
|
||||
<el-table-column label="调整系数" align="center" prop="xs"></el-table-column>
|
||||
<el-table-column label="小数位数" align="center" prop="xsws"></el-table-column>
|
||||
<el-table-column label="稀释倍数" align="center" prop="xsbs"></el-table-column>
|
||||
<el-table-column label="停用" align="center" prop="uflag"></el-table-column>
|
||||
<el-table-column label="仪器大类" align="center" prop="yqdl"></el-table-column>
|
||||
<el-table-column label="项目ID" align="center" prop="xmid"></el-table-column>
|
||||
<el-table-column label="项目编码" align="center" prop="knowledge"></el-table-column>
|
||||
<el-table-column label="外部代码1" align="center" prop="val1"></el-table-column>
|
||||
<el-table-column label="外部代码2" align="center" prop="val2"></el-table-column>
|
||||
<el-table-column label="外部代码3" align="center" prop="val3"></el-table-column>
|
||||
<el-table-column label="英文名称" align="center" prop="yymc" width="200"></el-table-column>
|
||||
<el-table-column label="允许CA(%)" align="center" prop="qccv"></el-table-column>
|
||||
</el-table>
|
||||
<template #xmlb ="{ row }">
|
||||
{{ formatDict(row.xmlb, 'XMLB') }}
|
||||
</template>
|
||||
</CustomTable>
|
||||
</el-col>
|
||||
<!-- 右侧区域-->
|
||||
<el-col :span="10" :xs="24">
|
||||
<div class="flex gap-2 mt-4">
|
||||
<el-check-tag checked type="primary" @click="handleTabClick('1')">基本资料</el-check-tag>
|
||||
<el-check-tag checked type="primary" @click="handleTabClick('2')">常用取值</el-check-tag>
|
||||
<el-check-tag checked type="primary" @click="handleTabClick('3')">使用仪器</el-check-tag>
|
||||
<el-check-tag checked type="primary" @click="handleTabClick('4')">知识库</el-check-tag>
|
||||
<el-check-tag checked type="primary" @click="handleTabClick('5')">整体排序</el-check-tag>
|
||||
<el-check-tag checked type="primary" @click="handleTabClick('6')">常见描述</el-check-tag>
|
||||
<el-check-tag :checked="tabCheck === '1'" type="primary" @click="handleTabClick('1')">基本资料</el-check-tag>
|
||||
<el-check-tag :checked="tabCheck === '2'" type="primary" @click="handleTabClick('2')">常用取值</el-check-tag>
|
||||
<el-check-tag :checked="tabCheck === '3'" type="primary" @click="handleTabClick('3')">使用仪器</el-check-tag>
|
||||
<el-check-tag :checked="tabCheck === '4'" type="primary" @click="handleTabClick('4')">知识库</el-check-tag>
|
||||
<el-check-tag :checked="tabCheck === '5'" type="primary" @click="handleTabClick('5')">整体排序</el-check-tag>
|
||||
<el-check-tag :checked="tabCheck === '6'" type="primary" @click="handleTabClick('6')">常见描述</el-check-tag>
|
||||
</div>
|
||||
<div>
|
||||
<div class="tabDiv">
|
||||
<Basic :visible="tabVisible === '1'"/>
|
||||
<CommmonlyValues :visible="tabVisible === '2'"/>
|
||||
<UseInstr :visible="tabVisible === '3'"/>
|
||||
@ -99,58 +88,142 @@ import CommmonlyValues from './tab/commmonlyValues.vue'
|
||||
import UseInstr from './tab/useInstr.vue'
|
||||
import Knowledge from './tab/knowledge.vue'
|
||||
import CommonDescriptions from './tab/commonDescriptions.vue'
|
||||
import CustomTable from '@/components/elTable/index.vue'
|
||||
import Sort from './tab/sort.vue'
|
||||
import { queryXmInfoNewService } from '@/api/liswork/labItem/LabItem';
|
||||
//@ts-ignore
|
||||
import { comDict } from '@/utils/dict'
|
||||
import SelectTable from '@/components/SelectTable/index.vue'
|
||||
import { getGroupInstrdList } from '@/api/liswork/work/LisWork';
|
||||
|
||||
|
||||
interface DictData {
|
||||
XMGL?: Array<any>;
|
||||
ITEMCLASS?: Array<any>;
|
||||
YQDL?: Array<any>;
|
||||
xmlbList?: Array<any>;
|
||||
[key: string]: any[] | undefined; // 添加索引签名以支持动态访问
|
||||
}
|
||||
|
||||
|
||||
|
||||
const status = ref(1);
|
||||
const isMIC = ref(false);
|
||||
const dataList = ref([])
|
||||
const tabVisible = ref('1')
|
||||
const queryParams = ref()
|
||||
const xmlbList = ref<Array<any>>([
|
||||
{ label: '数值型', value: '1' },
|
||||
{ label: '文字型', value: '2' },
|
||||
{ label: '阴阳性型', value: '3' },
|
||||
{ label: '数值文字混合型', value: '4' }
|
||||
])
|
||||
const dataList = ref<Array<any>>([])
|
||||
const tabVisible = ref<string>('1')
|
||||
const queryParams = ref({
|
||||
xmgl: '', //项目归类
|
||||
itemclass: '' , //细菌标志
|
||||
yq: '', //仪器代号
|
||||
inputcode: '', //快速查找
|
||||
yqdl: '', //仪器大类
|
||||
xmid: '' , //项目ID
|
||||
uflag: '0' , //状态
|
||||
isMIC: false || null //是否隐藏微生物项目
|
||||
})
|
||||
//字典数据
|
||||
const dictData = ref<DictData>({});
|
||||
const tableRef = ref()
|
||||
const tabCheck = ref('1');
|
||||
const xmglFields = ref([
|
||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||
{ prop: 'label', label: '名称', enablePinyinSearch: true },
|
||||
])
|
||||
const itemclassFields = ref([
|
||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||
{ prop: 'label', label: '名称', enablePinyinSearch: true },
|
||||
])
|
||||
const instrOptions = ref<{ yq: string; yqmc: string }[]>([])
|
||||
|
||||
//table表格列
|
||||
const columns = ref([
|
||||
{ prop: 'xmgl', label: '项目归类', visible: true, align: 'center', slot: 'xmgl', width: 100 },
|
||||
{ prop: 'xmdh', label: '英文缩写', visible: true, align: 'center'},
|
||||
{ prop: 'xmmc', label: '名称', visible: true, align: 'center', width: 200 },
|
||||
{ prop: 'dyckz', label: '参考值', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'dw', label: '单位', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xmlb', label: '结果类型', visible: true, align: 'center', slot: 'xmlb', width: 100 },
|
||||
{ prop: 'jsxm', label: '计算项目', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'dyxh', label: '序号', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xs', label: '调整系数', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xsws', label: '小数位数', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xsbs', label: '稀释倍数', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'uflag', label: '停用', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'yqdl', label: '仪器大类', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'xmid', label: '项目ID', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'knowledge', label: '项目编码', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val1', label: '外部代码1', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val2', label: '外部代码2', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'val3', label: '外部代码3', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'yymc', label: '英文名称', visible: true, align: 'center', width: 100 },
|
||||
{ prop: 'qccv', label: '允许CA(%)', visible: true, align: 'center', width: 100 },
|
||||
])
|
||||
|
||||
onMounted(async () => {
|
||||
// 初始化数据
|
||||
const dictRefs = await comDict('XMGL');
|
||||
// 从 ref 中获取实际数据
|
||||
dictData.value = {
|
||||
XMGL: toRaw(dictRefs.XMGL.value) || []
|
||||
};
|
||||
const tableConfig = ref({
|
||||
border: true, // 边框
|
||||
height: '66vh', // 高度
|
||||
highlightCurrentRow: true, // 高亮当前行
|
||||
// cellStyle: cellStyleHd
|
||||
})
|
||||
//仪器
|
||||
const yqFields = ref([
|
||||
{ prop: 'yq', label: '代号', width: 80, enablePinyinSearch: true },
|
||||
{ prop: 'yqmc', label: '名称', width: 150, enablePinyinSearch: true },
|
||||
])
|
||||
//仪器大类
|
||||
const yqdlFields = ref([
|
||||
{ prop: 'value', label: '代号', width: 80, enablePinyinSearch: true },
|
||||
{ prop: 'label', label: '名称', width: 150, enablePinyinSearch: true },
|
||||
])
|
||||
const yqdlList = ref<Array<any>>()
|
||||
|
||||
// 仪器选择变化
|
||||
const yqHandleChange = (val: any) => {
|
||||
queryParams.value.yq = val;
|
||||
}
|
||||
|
||||
// 仪器
|
||||
const getYqConfig = () => {
|
||||
getGroupInstrdList()
|
||||
.then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
instrOptions.value = res.data.map((item: any) => ({
|
||||
yq: item.yq.trim(),
|
||||
yqmc: item.yqmc
|
||||
}))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//获取表格数据
|
||||
const getList = () => {
|
||||
queryXmInfoNewService(queryParams.value).then((res: any) => {
|
||||
dataList.value = res.rows;
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
// 初始化数据
|
||||
const dictRefs = await comDict('XMGL','ITEMCLASS', 'YQDL');
|
||||
// 从 ref 中获取实际数据
|
||||
dictData.value = {
|
||||
XMGL: toRaw(dictRefs.XMGL.value) || [],
|
||||
ITEMCLASS: toRaw(dictRefs.ITEMCLASS.value) || [],
|
||||
YQDL: toRaw(dictRefs.YQDL.value) || [],
|
||||
XMLB: xmlbList.value || []
|
||||
};
|
||||
getList()
|
||||
getYqConfig();
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 引入公共组件的字典格式化方法
|
||||
const formatDict = (v: string, dictType: string) => {
|
||||
console.log('传入的值v:', v);
|
||||
const dictArray = dictData.value[dictType];
|
||||
console.log('对应的字典数组dictArray:', dictArray);
|
||||
dictArray?.forEach(item => {
|
||||
console.log('数组元素value:', item.value, '类型:', typeof item.value);
|
||||
});
|
||||
const matchedItem = dictArray?.find((item: any) => item.value == v);
|
||||
console.log('匹配到的item:', matchedItem); // 关键:看是否为undefined
|
||||
const abc = matchedItem?.label;
|
||||
console.log('字典数据abc', abc);
|
||||
return abc;
|
||||
|
||||
return dictData.value[dictType]?.find((item: any) => item.value == v.trim())?.label;
|
||||
}
|
||||
|
||||
//新增
|
||||
@ -175,7 +248,29 @@ const handleSave = () => {
|
||||
|
||||
//标签切换
|
||||
const handleTabClick = (tab: string) => {
|
||||
tabCheck.value = tab;
|
||||
tabVisible.value = tab
|
||||
}
|
||||
|
||||
//退拽属性
|
||||
const handleColumnDragEnd = (data: any) => {
|
||||
// 更新列配置
|
||||
columns.value = data.columns;
|
||||
}
|
||||
|
||||
//状态改变
|
||||
const changeStauts = () => {
|
||||
if(!queryParams.value.isMIC){
|
||||
queryParams.value.isMIC = null;
|
||||
}
|
||||
getList();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="css">
|
||||
.tabDiv {
|
||||
height: 88vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
@ -1,16 +1,178 @@
|
||||
<template>
|
||||
<!-- 基本资料 -->
|
||||
<div v-show="visible" class="app-container">
|
||||
<div v-show="visible">
|
||||
<el-form ref="formRef" :model="formData" size="small" class="form-inline" inline :rules="rules" label-width="80px">
|
||||
<span class="text-span">基本参数:</span>
|
||||
<el-divider style="margin: 5px 0;"/>
|
||||
<el-form-item label="项目类别" prop="xmgl">
|
||||
<el-input placeholder="项目类别" v-model="formData.xmgl">
|
||||
<template #default="{ row }">
|
||||
{{ formatDict(row.xmgl, 'XMGL') }}
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="英文缩写" prop="xmdh">
|
||||
<el-input placeholder="英文缩写" v-model="formData.xmdh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="xmmc">
|
||||
<el-input placeholder="项目名称" v-model="formData.xmmc"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="dw">
|
||||
<el-input placeholder="单位" v-model="formData.dw"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="结果类别" prop="xmlb">
|
||||
<el-input placeholder="结果类别" v-model="formData.xmlb"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="阴阳性" prop="mrz">
|
||||
<el-input placeholder="阴阳性" v-model="formData.mrz"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="仪器大类" prop="yqdl">
|
||||
<el-input placeholder="仪器大类" v-model="formData.yqdl"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="允许CV(%)" prop="qccv" label-width="100px">
|
||||
<el-input placeholder="允许CV(%)" v-model="formData.qccv"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="稀释倍数" prop="xsbs">
|
||||
<el-input placeholder="稀释倍数" v-model="formData.xsbs"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="稀释倍数" prop="xsbs">
|
||||
<el-input placeholder="稀释倍数" v-model="formData.xsbs"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="whonet编码" prop="whocode" label-width="100px">
|
||||
<el-input placeholder="whonet编码" v-model="formData.whocode"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Gram" prop="germflag">
|
||||
<el-input placeholder="Gram" v-model="formData.germflag"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="英文名称" prop="yymc">
|
||||
<el-input placeholder="英文名称" v-model="formData.yymc"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目ID" prop="xmid">
|
||||
<el-input placeholder="项目ID" v-model="formData.xmid"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="uflag">
|
||||
<el-checkbox value="uflag">停用</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="知识库编码" prop="knowledge" label-width="100px">
|
||||
<el-input placeholder="知识库编码" v-model="formData.knowledge"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="小数保留位数" prop="xsws" label-width="100px">
|
||||
<el-input placeholder="小数保留位数" v-model="formData.xsws"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="打印形式" prop="dylx">
|
||||
<el-input placeholder="打印形式" v-model="formData.dylx"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="总汇表代号" prop="zhbdh" label-width="100px">
|
||||
<el-input placeholder="总汇表代号" v-model="formData.zhbdh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="报告单代号" prop="bgdh" label-width="90px">
|
||||
<el-input placeholder="报告单代号" v-model="formData.bgdh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" prop="jg">
|
||||
<el-input placeholder="价格" v-model="formData.jg"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="助记符" prop="zjf">
|
||||
<el-input placeholder="助记符" v-model="formData.zjf"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="测试方法" prop="csff">
|
||||
<el-input placeholder="测试方法" v-model="formData.csff"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分组打印组号" prop="fzdyxh" label-width="100px">
|
||||
<el-input placeholder="分组打印组号" v-model="formData.fzdyxh"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="细菌项目类别" prop="itemclass" label-width="100px">
|
||||
<el-input placeholder="细菌项目类别" v-model="formData.itemclass"></el-input>
|
||||
</el-form-item>
|
||||
<span class="text-span">结果参考值计算:</span>
|
||||
<el-divider style="margin: 5px 0;"/>
|
||||
<el-form-item label="参考下限" prop="ckxx">
|
||||
<el-input placeholder="参考下限" v-model="formData.ckxx"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="参考上限" prop="cksx">
|
||||
<el-input placeholder="参考上限" v-model="formData.cksx"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="参考值" prop="dyckz" label-width="60px">
|
||||
<el-input placeholder="参考值" v-model="formData.dyckz"></el-input>
|
||||
<el-button type="primary">多行参考值向导...</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="公式" prop="jsgs" label-width="40px" >
|
||||
<el-input placeholder="公式" v-model="formData.jsgs"></el-input>
|
||||
<el-button type="primary">向导...</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item prop="ygxb" >
|
||||
<el-checkbox label="参考值与性别有关" v-model="formData.ygxb"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item prop="ygnl" >
|
||||
<el-checkbox label="与年龄有关" v-model="formData.ygnl"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item prop="ygbb">
|
||||
<el-checkbox label="与标本有关" v-model="formData.ygbb"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item prop="ygzq">
|
||||
<el-checkbox label="与生理周期有关" v-model="formData.ygzq"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item prop="ygzd">
|
||||
<el-checkbox label="与诊断有关" v-model="formData.ygzd"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item prop="jsxm">
|
||||
<el-checkbox label="计算项目" v-model="formData.jsxm"></el-checkbox>
|
||||
</el-form-item>
|
||||
<span class="text-span">医学审核条件:</span>
|
||||
<el-divider style="margin: 5px 0;"/>
|
||||
<el-form-item label="项目结果不可能大于" prop="sjx" label-width="140px">
|
||||
<el-input placeholder="项目结果不可能大于" v-model="formData.sjx" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="不可能小于" prop="xjx" label-width="90px">
|
||||
<el-input placeholder="不可能小于" v-model="formData.xjx" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="病人两次检验结果在" prop="jgjg" label-width="140px">
|
||||
<el-input placeholder="病人两次检验结果在" v-model="formData.jgjg" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<!--计算属性-->
|
||||
<el-form-item label="天内不可能相差" prop="cp_jgz" label-width="120px">
|
||||
<el-input placeholder="天内不可能相差" v-model="formData.cp_jgz" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<!--报警条件-->
|
||||
<span class="text-span">报警条件</span>
|
||||
<el-divider style="margin: 5px 0;"/>
|
||||
<el-form-item label="危急值">
|
||||
<el-input placeholder="上限极值" v-model="formData.hlimt"></el-input>
|
||||
<el-input placeholder="下限极值" v-model="formData.llimit"></el-input>
|
||||
<el-button type="primary">特定条件</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="复查">
|
||||
<el-input placeholder="上限极值" v-model="formData.redoxx"></el-input>
|
||||
<el-input placeholder="下限极值" v-model="formData.redosx"></el-input>
|
||||
</el-form-item>
|
||||
<span class="text-span">其他参数</span>
|
||||
<el-divider style="margin: 5px 0;"/>
|
||||
<el-form-item label="国标编码">
|
||||
<el-input v-model="formData.val1"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码2">
|
||||
<el-input v-model="formData.val2"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码3">
|
||||
<el-input v-model="formData.val3"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码4">
|
||||
<el-input v-model="formData.val4"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="外部代码5">
|
||||
<el-input v-model="formData.val5"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
基本资料内容
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import { computed, ref,onMounted,toRaw } from 'vue';
|
||||
//@ts-ignore
|
||||
import { comDict } from '@/utils/dict'
|
||||
|
||||
const props = defineProps({
|
||||
// 定义一个名为 'exampleProp' 的字符串类型的 prop
|
||||
//是否显示
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
@ -18,4 +180,122 @@ const props = defineProps({
|
||||
}
|
||||
});
|
||||
|
||||
interface DictData {
|
||||
XMGL?: Array<any>;
|
||||
[key: string]: any[] | undefined; // 添加索引签名以支持动态访问
|
||||
}
|
||||
|
||||
|
||||
const formRef = ref();
|
||||
const formData = ref<any>({
|
||||
xmgl: '',
|
||||
xmdh: '',
|
||||
xmmc: '',
|
||||
dw: '',
|
||||
xmlb: '',
|
||||
mrz: '',
|
||||
yqdl: '',
|
||||
qccv: '',
|
||||
xsbs: '',
|
||||
whocode: '',
|
||||
germflag: '',
|
||||
yymc: '',
|
||||
xmid: '',
|
||||
uflag: false,
|
||||
knowledge: '',
|
||||
xsws: 0,
|
||||
dylx: '',
|
||||
zhbdh: '',
|
||||
bgdh: '',
|
||||
jg: 0,
|
||||
zjf: '',
|
||||
csff: '',
|
||||
fzdyxh: 0,
|
||||
itemclass: '',
|
||||
ckxx: '',
|
||||
cksx: '',
|
||||
dyckz: '',
|
||||
jsgs: '',
|
||||
ygxb: false,
|
||||
ygnl: false,
|
||||
ygbb: false,
|
||||
ygzq: false,
|
||||
ygzd: false,
|
||||
jsxm: false,
|
||||
sjx: '',
|
||||
xjx: '',
|
||||
jgjg: '',
|
||||
cp_jgz: '',
|
||||
hlimt: '',
|
||||
llimit: '',
|
||||
redoxx: '',
|
||||
redosx: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
val5: ''
|
||||
}
|
||||
);
|
||||
//字典数据
|
||||
const dictData = ref<DictData>({});
|
||||
|
||||
const rules = ref({
|
||||
// name: [
|
||||
// { required: true, message: '请输入姓名', trigger: 'blur' },
|
||||
// { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' }
|
||||
// ],
|
||||
// sex: [
|
||||
// { required: true, message: '请选择性别', trigger: 'change' }
|
||||
// ]
|
||||
});
|
||||
|
||||
computed(() => {
|
||||
switch(formData.value.jgbz){
|
||||
case '1':
|
||||
formData.value.cp_jgz = formData.value.jgz;
|
||||
break;
|
||||
case '2':
|
||||
formData.value.cp_jgz = formData.value.jgz + '%';
|
||||
break
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
// 初始化数据
|
||||
const dictRefs = await comDict('XMGL');
|
||||
// 从 ref 中获取实际数据
|
||||
dictData.value = {
|
||||
XMGL: toRaw(dictRefs.XMGL.value) || []
|
||||
};
|
||||
|
||||
})
|
||||
|
||||
// 引入公共组件的字典格式化方法
|
||||
const formatDict = (v: string, dictType: string) => {
|
||||
return dictData.value[dictType]?.find((item: any) => item.value == v.trim())?.label;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped lang="scss">
|
||||
.form-inline {
|
||||
padding: 10px;
|
||||
background-color: #f5f7fa;
|
||||
height: auto;
|
||||
.el-input {
|
||||
width: 150px;
|
||||
}
|
||||
.el-form-item {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.text-span {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
x
Reference in New Issue
Block a user