From a679fc1700244bdd1d66673e62a518510cf6fb53 Mon Sep 17 00:00:00 2001 From: wangjian963 <15215920+aprilry@user.noreply.gitee.com> Date: Fri, 26 Jun 2026 12:10:03 +0800 Subject: [PATCH] =?UTF-8?q?=20fix(ui):=20=E4=BF=AE=E5=A4=8D=E5=89=A9?= =?UTF-8?q?=E4=BD=99=20TS=20strict=20=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=8F=8A=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - EditableTable.d.ts: fixed 类型调整,新增 extraprops - FormItem.d.ts: 新增 disabled、onClick 属性 - EditableTable/Form/FormItem/FormLayout: 添加参数类型注解 - DataDashboard: screenData 类型修正 + 隐式 any 修复 - api/datacollection: 新增 index.d.ts 声明文件 - patientList/receipt: 补充缺失函数声明 --- healthlink-his-ui/src/api/datacollection/index.d.ts | 4 ++++ .../src/components/TableLayout/EditableTable.vue | 12 ++++++------ .../src/components/TableLayout/Form.vue | 12 ++++++------ .../src/components/TableLayout/FormItem.vue | 2 +- .../src/components/TableLayout/FormLayout.vue | 10 +++++----- .../src/components/types/EditableTable.d.ts | 4 +++- healthlink-his-ui/src/components/types/FormItem.d.ts | 4 ++++ .../src/views/datacollection/DataDashboard.vue | 8 ++++---- .../components/home/components/patientList.vue | 2 ++ .../components/home/components/receipt.vue | 1 + 10 files changed, 36 insertions(+), 23 deletions(-) create mode 100644 healthlink-his-ui/src/api/datacollection/index.d.ts diff --git a/healthlink-his-ui/src/api/datacollection/index.d.ts b/healthlink-his-ui/src/api/datacollection/index.d.ts new file mode 100644 index 000000000..ab4582b43 --- /dev/null +++ b/healthlink-his-ui/src/api/datacollection/index.d.ts @@ -0,0 +1,4 @@ +export function collectClinicalData(data: any): Promise; +export function collectOperationalData(data: any): Promise; +export function getRealtimeData(): Promise; +export function getHistoricalData(params?: any): Promise; diff --git a/healthlink-his-ui/src/components/TableLayout/EditableTable.vue b/healthlink-his-ui/src/components/TableLayout/EditableTable.vue index 6dfa4bd75..7e2129fbf 100755 --- a/healthlink-his-ui/src/components/TableLayout/EditableTable.vue +++ b/healthlink-his-ui/src/components/TableLayout/EditableTable.vue @@ -183,7 +183,7 @@ style="width: 100%" :class="row.error ? 'error-border' : ''" @change=" - async (value) => { + async (value: any) => { const checkBeforeChange = col.extraprops?.checkBeforeChange; if (checkBeforeChange && typeof checkBeforeChange === 'function') { const result = await checkBeforeChange(row, rowIndex, value); @@ -399,7 +399,7 @@ watch( { deep: true } ); -const handleAdd = (index) => { +const handleAdd = (index: number) => { const newRow = { ...props.defaultRow }; tableData.value.splice(index + 1, 0, newRow); nextTick(() => { @@ -407,7 +407,7 @@ const handleAdd = (index) => { }); }; -const handleDelete = (index) => { +const handleDelete = (index: number) => { if (tableData.value.length === 1) { Object.keys(tableData.value[0]).forEach((key) => { tableData.value[0][key] = ''; @@ -484,13 +484,13 @@ const handleSearch = () => { // 搜索逻辑已在 computed 中处理 }; -const validate = (callback) => { +const validate = (callback: any) => { if (formRef.value) { return formRef.value.validate(callback); } }; -const validateField = (props, callback) => { +const validateField = (props: any, callback: any) => { if (formRef.value) { return formRef.value.validateField(props, callback); } @@ -502,7 +502,7 @@ const resetFields = () => { } }; -const clearValidate = (props) => { +const clearValidate = (props: any) => { if (formRef.value) { formRef.value.clearValidate(props); } diff --git a/healthlink-his-ui/src/components/TableLayout/Form.vue b/healthlink-his-ui/src/components/TableLayout/Form.vue index 5259f6aec..3a65f1014 100755 --- a/healthlink-his-ui/src/components/TableLayout/Form.vue +++ b/healthlink-his-ui/src/components/TableLayout/Form.vue @@ -15,8 +15,8 @@