diff --git a/package.json b/package.json
index b8f8638..40c461d 100644
--- a/package.json
+++ b/package.json
@@ -54,7 +54,8 @@
"vue-pdf": "^4.3.0",
"vue-router": "3.4.9",
"vuedraggable": "2.24.3",
- "vuex": "3.6.0"
+ "vuex": "3.6.0",
+ "xlsx": "^0.18.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.6",
diff --git a/src/views/business/comps/template/TemplateTable.vue b/src/views/business/comps/template/TemplateTable.vue
index 8fc3186..9f2eb55 100644
--- a/src/views/business/comps/template/TemplateTable.vue
+++ b/src/views/business/comps/template/TemplateTable.vue
@@ -44,6 +44,7 @@ import Demo from "./comps/sp/Demo.vue";
import GSP002 from "./comps/gsp/GSP002.vue";
import GSP003 from "./comps/gsp/GSP003.vue";
import GSP004 from "./comps/gsp/GSP004.vue";
+import GSP009 from "./comps/gsp/GSP009.vue";
import GSP010 from "./comps/gsp/GSP010.vue";
//试验物质配制计划表/麻精药领取申请单/毒麻药品配制记录表
@@ -82,7 +83,7 @@ export default {
//试验物质配制计划表/麻精药领取申请单/毒麻药品配制记录表
MJYLQSQD, SYWZPZJHB, DMYPPZJLB,
//供试品
- GSP002, GSP003, GSP004, GSP010,
+ GSP002, GSP003, GSP004,GSP009, GSP010,
//色谱
SP001, SP003, SP00456,SP007, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018,
// PCR
@@ -143,6 +144,7 @@ export default {
'GSP004': 'GSP004',
'GSP006': 'GSP002',
'GSP008': 'GSP002',
+ 'GSP009': 'GSP009',
'GSP010': 'GSP010',
'GSP012': 'GSP002',
'GSP013': 'GSP002',
diff --git a/src/views/business/comps/template/comps/gsp/GSP009.vue b/src/views/business/comps/template/comps/gsp/GSP009.vue
new file mode 100644
index 0000000..42452ea
--- /dev/null
+++ b/src/views/business/comps/template/comps/gsp/GSP009.vue
@@ -0,0 +1,307 @@
+
+
+
+
+

{{ formData.bdmc }}

+
+
+
+
+
+
+
+ {{ $t('template.lba.lba004.xz')
+ }}
+
+
+
+
+
+
+
+ handleClickable('paralle', paralleIndex, e)"
+ :ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig"
+ :formData="paralleConfig" :prefixKey="'paralle' + paralleIndex"
+ :fieldItemLabel="$t('template.lba.lba004.xszj')" />
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/business/comps/template/comps/lba/LBA006.vue b/src/views/business/comps/template/comps/lba/LBA006.vue
index cc9270c..0537695 100644
--- a/src/views/business/comps/template/comps/lba/LBA006.vue
+++ b/src/views/business/comps/template/comps/lba/LBA006.vue
@@ -10,14 +10,18 @@
+
+ {{ $t('template.lba.lba004.xz')
+ }}
+
+
-
@@ -68,10 +70,10 @@ import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import { getLadderColumnsConfig } from "../../formConfig/PCRTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import { addTj,uniqeResource,uniqeResourceOne,addDecimals } from "@/utils/calUnitTools";
-
+import ImportExcelDialog from '../../dialog/ImportExcelDialog'
export default {
name: "PCR002",
- components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion, SelectReagentDialog },
+ components: { ImportExcelDialog, BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion, SelectReagentDialog },
mixins: [templateMixin],
props: {
fillType: {
@@ -259,6 +261,13 @@ export default {
},
methods: {
+ showImportExcelDialog() {
+ this.$refs.ImportExcelDialog.show()
+ },
+ onLoadData(excelData) {
+ console.log('onLoadData')
+ console.log(excelData)
+ },
//更新记录
onSureModifyRecord(key) {
if (key === "subStartSolution") {//选择起始源溶液需要同步更新table的变更记录。
diff --git a/src/views/business/comps/template/dialog/ImportExcelDialog.vue b/src/views/business/comps/template/dialog/ImportExcelDialog.vue
new file mode 100644
index 0000000..94aabfe
--- /dev/null
+++ b/src/views/business/comps/template/dialog/ImportExcelDialog.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+ 将文件拖到此处,或点击上传
+
+ 仅允许导入xls、xlsx格式文件
+
+
+
+
+
+
+
+
diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js
index a55d8e8..a10174d 100644
--- a/src/views/business/comps/template/mixins/templateMixin.js
+++ b/src/views/business/comps/template/mixins/templateMixin.js
@@ -29,7 +29,7 @@ export default {
'business_sp_xskkx', //色谱-编号-稀释可靠性
'business_sp_cbydb', //色谱-编号-储备液对比
'business_pcr_gzy', // PCR-编号-工作液
-
+
'business_lba_jg' // LBA006-结果
],
props: {
@@ -383,7 +383,7 @@ export default {
subTargetStartSolution,
headerSelectFields
}
-
+
arr.forEach((item, rowIndex) => {
this.updateTargetStartSolutionVolume(
item,
@@ -471,7 +471,7 @@ export default {
// 实际目标溶液浓度 = 实际源溶液浓度÷(实际终体积÷源溶液加入体积);
const actNd = (
parseFloat(targetAcSolution) / (
- parseFloat(actVol)/parseFloat(actStartSolutionVolume)
+ parseFloat(actVol)/parseFloat(actStartSolutionVolume)
)
).toFixed(precision)
const nd = actNd === 'Infinity' ? 0 : Number(actNd)
@@ -492,19 +492,19 @@ export default {
const {subTargetStartSolution,headerSelectFields} = unitParams
const {targetSolutionConcentrationUnit,targetSolutionVolumeUnit,targetStartSolutionVolumeUnit,targetDiluentVolumeUnit} = headerSelectFields
const targetStartVolUnit = targetSolutionConcentrationUnit.split("/")[1];//先按照预设目标溶液浓度的单位标准
-
+
if(
- isValueEmpty(concentration) ||
+ isValueEmpty(concentration) ||
isValueEmpty(targetVolume)||
isValueEmpty(subTargetStartSolution)||
isValueEmpty(targetSolutionConcentrationUnit)||
isValueEmpty(targetSolutionVolumeUnit)||
- isValueEmpty(targetStartSolutionVolumeUnit)||
+ isValueEmpty(targetStartSolutionVolumeUnit)||
isValueEmpty(targetDiluentVolumeUnit)
){
return;
}
- //将起始溶液浓度转换为和预设目标溶液浓度一样的单位再计算;
+ //将起始溶液浓度转换为和预设目标溶液浓度一样的单位再计算;
const converStartCon = convertConcentration.convert(volume+subTargetStartSolution,targetSolutionConcentrationUnit)
//将预设目标溶液体积转换为和预设目标溶液浓度单位的分母一样的单位再计算;如:预设目标溶液浓度单位为mg/mL,预设目标溶液体积单位为uL,则将预设目标溶液体积转换为mL
const convertTargetVol = volumeConverter.convert(targetVolume+targetSolutionVolumeUnit,targetStartVolUnit)
@@ -526,6 +526,40 @@ export default {
item.targetDiluentVolume = volumeConverter.convert(result1+targetStartSolutionVolumeUnit,targetDiluentVolumeUnit)
// this.$refs.stepTableRef.updateDataSourceByRowIndex(rowIndex, { targetDiluentVolume: result1 });
}
- }
+ },
+ // 导出excel模板
+ exportExcel(rows, title) {
+ let that = this
+ that.$modal.loading()
+ var tabelStr =
+ '
' +
+ ''
+
+ rows.forEach(item => {
+ tabelStr = tabelStr + '| ' + item + ' | '
+ })
+ tabelStr = tabelStr + '
'
+
+ // Worksheet名
+ var worksheet = title ? title : '导入模板'
+ var uri = 'data:application/vnd.ms-excel;base64,'
+ // 真正要导出(下载)的HTML模板
+ var exportTemplate = `
+
+
+
+ ${tabelStr}
+
+ `
+ var a = document.createElement('a')
+ a.download = worksheet + '.xls'
+ a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate)))
+ a.click()
+ that.$modal.closeLoading()
+ },
}
}