-
-
+
diff --git a/src/views/business/comps/template/comps/sp/SP00456.vue b/src/views/business/comps/template/comps/sp/SP00456.vue
index a20ca1d..6b27430 100644
--- a/src/views/business/comps/template/comps/sp/SP00456.vue
+++ b/src/views/business/comps/template/comps/sp/SP00456.vue
@@ -8,8 +8,7 @@
-
-
+
Date: Sat, 28 Feb 2026 12:51:36 +0800
Subject: [PATCH 3/8] =?UTF-8?q?fix:[=E7=89=A9=E8=B5=84=E5=88=97=E8=A1=A8]?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/lang/en/template/commonTemplate.js | 2 +-
src/lang/zh/template/commonTemplate.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lang/en/template/commonTemplate.js b/src/lang/en/template/commonTemplate.js
index 08f96da..631b9c8 100644
--- a/src/lang/en/template/commonTemplate.js
+++ b/src/lang/en/template/commonTemplate.js
@@ -70,7 +70,7 @@ export default {
reagentExpireDate: 'Expiration Date',
// 物资信息列
- wzName: 'Name',
+ wzName: 'Name/Code',
wzCode: 'Item Number',
wzConcentration: 'Concentration',
wzSource: 'Source',
diff --git a/src/lang/zh/template/commonTemplate.js b/src/lang/zh/template/commonTemplate.js
index 1fa0ae9..5c63563 100644
--- a/src/lang/zh/template/commonTemplate.js
+++ b/src/lang/zh/template/commonTemplate.js
@@ -71,7 +71,7 @@ export default {
reagentExpireDate: '失效日',
// 物资信息列
- wzName: '名称',
+ wzName: '名称/代号',
wzCode: '编号',
wzConcentration: '浓度',
wzSource: '物资来源',
From c60c45d9da3ac89e7c58c3dd49114f8894293907 Mon Sep 17 00:00:00 2001
From: HanLong <404402223@qq.com>
Date: Sat, 28 Feb 2026 14:07:24 +0800
Subject: [PATCH 4/8] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]e?=
=?UTF-8?q?xcel=E5=AF=BC=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/index.js | 18 +++++++
.../comps/template/mixins/templateMixin.js | 57 ++++------------------
2 files changed, 28 insertions(+), 47 deletions(-)
diff --git a/src/utils/index.js b/src/utils/index.js
index 2eb7065..7c1eceb 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -563,3 +563,21 @@ export function isRegent(item, fieldCode = 'type') {
]
return typeList.includes(type)
}
+/**
+ * 估算字符串在 Excel 中的显示宽度(简单规则:中文字符算2,英文字符算1)
+ * @param {string} str 要计算的字符串
+ * @returns {number} 估算宽度
+ */
+export function getStringWidth(str) {
+ if (!str) return 0
+ let width = 0
+ for (let char of str.toString()) {
+ // 中文字符范围(可根据需要扩展)
+ if (/[\u4e00-\u9fa5]/.test(char)) {
+ width += 2
+ } else {
+ width += 1
+ }
+ }
+ return width
+}
diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js
index 46b73ea..7ccff69 100644
--- a/src/views/business/comps/template/mixins/templateMixin.js
+++ b/src/views/business/comps/template/mixins/templateMixin.js
@@ -1,10 +1,11 @@
import moment from 'moment'
import { getLatestSn, getLatestSnArr } from '@/api/template';
-import { isValueEmpty } from '@/utils/index';
+import { isValueEmpty, getStringWidth } from '@/utils/index';
import { isCommonUnit } from "@/utils/conTools";
import { sj_subpackage, sj_startConfiguration, sj_configurationCompleted } from '@/api/business/sj/sj';
import {convertConcentration} from "@/utils/conConverter";//浓度单位转换
import {volumeConverter} from "@/utils/volConverter";//体积单位转换
+import * as XLSX from 'xlsx'
export default {
dicts: [
'business_pztj',
@@ -602,54 +603,16 @@ export default {
}
},
// 导出excel模板
- exportExcel(rows, title) {
+ exportExcel(headerArray, title = '导出模板') {
this.$modal.loading()
- // 生成表头
- let tableHtml = '';
- tableHtml += '';
- rows.forEach(item => {
- tableHtml += '| ' + item + ' | ';
- });
- tableHtml += '
'; // 正确闭合
-
- // Worksheet 名称
- const worksheet = title ? title : '导入模板';
-
- // 完整的 HTML 模板(包含编码声明和 Excel 兼容命名空间)
- const exportTemplate = `
-
-
-
-
-
-
- ${tableHtml}
-
- `;
-
- // 使用 Blob 生成文件(指定 MIME 类型为 application/vnd.ms-excel)
- const blob = new Blob([exportTemplate], { type: 'application/vnd.ms-excel;charset=utf-8' });
- const link = document.createElement('a');
- link.href = URL.createObjectURL(blob);
- link.download = worksheet + '.xls';
- link.click();
- URL.revokeObjectURL(link.href); // 释放内存
+ const ws = XLSX.utils.aoa_to_sheet([headerArray]);
+ const colWidths = headerArray.map(cell => getStringWidth(cell) + 2);
+ ws['!cols'] = colWidths.map(width => ({ wch: width }));
+ const wb = XLSX.utils.book_new();
+ XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
+ XLSX.writeFile(wb, `${title}.xlsx`);
this.$modal.closeLoading()
},
+
}
}
From 382344b2dce825e2ed9ed87ab9fc3c89881e0083 Mon Sep 17 00:00:00 2001
From: HanLong <404402223@qq.com>
Date: Sat, 28 Feb 2026 14:23:36 +0800
Subject: [PATCH 5/8] =?UTF-8?q?fix:[=E8=AF=95=E9=AA=8C=E7=AE=A1=E7=90=86][?=
=?UTF-8?q?=E8=AF=95=E9=AA=8C=E9=94=81=E5=AE=9A]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/business/form/nonTrial/comp/syffList.vue | 5 +++--
src/views/business/study/comp/syffList.vue | 11 ++++++-----
src/views/business/study/comp/syjList.vue | 5 +++--
src/views/business/study/comp/wzlb/bacteriaList.vue | 2 +-
src/views/business/study/comp/wzlb/cellList.vue | 4 ++--
src/views/business/study/comp/wzlb/gspList.vue | 2 +-
src/views/business/study/comp/wzlb/gyzjList.vue | 2 +-
src/views/business/study/comp/wzlb/mjyList.vue | 2 +-
src/views/business/study/comp/wzlb/sjList.vue | 2 +-
9 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/src/views/business/form/nonTrial/comp/syffList.vue b/src/views/business/form/nonTrial/comp/syffList.vue
index 463f1d5..d574c8b 100644
--- a/src/views/business/form/nonTrial/comp/syffList.vue
+++ b/src/views/business/form/nonTrial/comp/syffList.vue
@@ -41,7 +41,7 @@
-
+
{{
$t('page.business.study.studyMethod.scff') }}
@@ -58,7 +58,7 @@
-
+
{{
$t('page.business.study.studyMethod.yuedu') }}
@@ -108,6 +108,7 @@ export default {
this.searchForm.studySn = newVal.sn
this.searchForm.studyMc = newVal.name
this.searchForm.studyId = newVal.id
+ this.searchForm.studyStatus = newVal.status
this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader
this.search()
diff --git a/src/views/business/study/comp/syffList.vue b/src/views/business/study/comp/syffList.vue
index dbd6354..722809f 100644
--- a/src/views/business/study/comp/syffList.vue
+++ b/src/views/business/study/comp/syffList.vue
@@ -40,7 +40,7 @@
-
+
{{
$t('page.business.study.studyMethod.scff') }}
@@ -51,20 +51,20 @@
-
+
{{ $t('page.business.study.studyMethod.yidu') }}
{{ $t('page.business.study.studyMethod.weidu') }}
-
+
{{ $t('page.business.study.studyMethod.s') }}
{{ $t('page.business.study.studyMethod.f') }}
-
-
+
+
{{
$t('page.business.study.studyMethod.yuedu') }}
@@ -121,6 +121,7 @@ export default {
this.searchForm.studySn = newVal.sn
this.searchForm.studyMc = newVal.name
this.searchForm.studyId = newVal.id
+ this.searchForm.studyStatus = newVal.status
this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader
this.search()
diff --git a/src/views/business/study/comp/syjList.vue b/src/views/business/study/comp/syjList.vue
index 25f8589..a645847 100644
--- a/src/views/business/study/comp/syjList.vue
+++ b/src/views/business/study/comp/syjList.vue
@@ -42,7 +42,7 @@
-
+
{{
$t('page.business.study.studyRoom.xzqy') }}
@@ -69,7 +69,7 @@
-
+
{{
$t('page.business.study.studyRoom.xq') }}
@@ -136,6 +136,7 @@ export default {
this.searchForm.studySn = newVal.sn
this.searchForm.studyMc = newVal.name
this.searchForm.studyId = newVal.id
+ this.searchForm.studyStatus = newVal.status
this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader
this.search()
diff --git a/src/views/business/study/comp/wzlb/bacteriaList.vue b/src/views/business/study/comp/wzlb/bacteriaList.vue
index 1c9ac1c..9c9a0ae 100644
--- a/src/views/business/study/comp/wzlb/bacteriaList.vue
+++ b/src/views/business/study/comp/wzlb/bacteriaList.vue
@@ -55,7 +55,7 @@
-
+
{{
$t('page.business.study.cell.cz') }}
diff --git a/src/views/business/study/comp/wzlb/cellList.vue b/src/views/business/study/comp/wzlb/cellList.vue
index 720fbb3..c4a42aa 100644
--- a/src/views/business/study/comp/wzlb/cellList.vue
+++ b/src/views/business/study/comp/wzlb/cellList.vue
@@ -55,9 +55,9 @@
-
+
- {{
+ {{
$t('page.business.study.cell.cz') }}
diff --git a/src/views/business/study/comp/wzlb/gspList.vue b/src/views/business/study/comp/wzlb/gspList.vue
index f27c9d0..26662ac 100644
--- a/src/views/business/study/comp/wzlb/gspList.vue
+++ b/src/views/business/study/comp/wzlb/gspList.vue
@@ -76,7 +76,7 @@
{{
$t('page.business.resource.gsp.detail') }}
-
+
{{
$t('page.business.resource.gyzj.detail') }}
-
+
diff --git a/src/views/business/study/comp/wzlb/mjyList.vue b/src/views/business/study/comp/wzlb/mjyList.vue
index a9bb41e..414e1a8 100644
--- a/src/views/business/study/comp/wzlb/mjyList.vue
+++ b/src/views/business/study/comp/wzlb/mjyList.vue
@@ -86,7 +86,7 @@
{{
$t('page.business.resource.mjy.detail') }}
-
+
{{
$t('page.business.resource.sj.detail') }}
-
+
{{
From c2deb2f25edb899a0c3705f18ee0ee060509d856 Mon Sep 17 00:00:00 2001
From: HanLong <404402223@qq.com>
Date: Sat, 28 Feb 2026 14:43:02 +0800
Subject: [PATCH 6/8] =?UTF-8?q?fix:[=E8=AF=95=E9=AA=8C=E7=AE=A1=E7=90=86][?=
=?UTF-8?q?=E8=AF=95=E9=AA=8C=E6=96=B9=E6=B3=95]=E5=85=B3=E9=97=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/lang/en/business/study/studyMethod.js | 3 ++
src/lang/zh/business/study/studyMethod.js | 2 +
src/views/business/form/nonTrial/comp/syffList.vue | 61 ++++++++++++++++++----
src/views/business/study/comp/syffList.vue | 14 ++---
4 files changed, 63 insertions(+), 17 deletions(-)
diff --git a/src/lang/en/business/study/studyMethod.js b/src/lang/en/business/study/studyMethod.js
index 58f03d1..5cf34a1 100644
--- a/src/lang/en/business/study/studyMethod.js
+++ b/src/lang/en/business/study/studyMethod.js
@@ -17,6 +17,9 @@ export default {
qmsj: 'Date',
qmyy: 'Meaning of Signature',
remark: 'Comment',
+ ts: '',
+ gbts: 'This method has been closed, no need to read!',
+ jcyd: '坚持阅读',
qyd:'Go Read',
gb: 'Close',
sfgb: 'Closed',
diff --git a/src/lang/zh/business/study/studyMethod.js b/src/lang/zh/business/study/studyMethod.js
index 7d42696..48cb5c9 100644
--- a/src/lang/zh/business/study/studyMethod.js
+++ b/src/lang/zh/business/study/studyMethod.js
@@ -20,6 +20,8 @@ export default {
qyd:'去阅读',
gb: '关闭',
sfgb: '是否关闭',
+ gbts: '该方法已关闭,无需阅读!',
+ jcyd: '坚持阅读',
s: '是',
f: '否',
qrgb: '确认关闭?',
diff --git a/src/views/business/form/nonTrial/comp/syffList.vue b/src/views/business/form/nonTrial/comp/syffList.vue
index d574c8b..96c6941 100644
--- a/src/views/business/form/nonTrial/comp/syffList.vue
+++ b/src/views/business/form/nonTrial/comp/syffList.vue
@@ -40,8 +40,8 @@
-
-
+
+
{{
$t('page.business.study.studyMethod.scff') }}
@@ -51,13 +51,19 @@
-
+
{{ $t('page.business.study.studyMethod.yidu') }}
{{ $t('page.business.study.studyMethod.weidu') }}
-
+
+
+ {{ $t('page.business.study.studyMethod.s') }}
+ {{ $t('page.business.study.studyMethod.f') }}
+
+
+
{{
@@ -65,6 +71,10 @@
{{
$t('page.business.study.studyMethod.daochu') }}
+
+ {{
+ $t('page.business.study.studyMethod.gb') }}
@@ -76,15 +86,18 @@
-
+
+
+