Browse Source

feat: [模板管理] 基础双语修改

feat: [模板管理] 新增生物样品分析方法学样品制备表(全血稳定)
lkf
memorylkf 3 months ago
parent
commit
64c16e0cec
6 changed files with 409 additions and 24 deletions
  1. +22
    -22
      src/lang/en/template/commonTemplate.js
  2. +5
    -0
      src/lang/en/template/sp.js
  3. +4
    -0
      src/lang/zh/template/sp.js
  4. +4
    -1
      src/views/business/comps/template/TemplateTable.vue
  5. +373
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue
  6. +1
    -1
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue

+ 22
- 22
src/lang/en/template/commonTemplate.js View File

@ -3,33 +3,33 @@ export default {
pageTitle: 'Biological Sample Analysis Solution Preparation Table',
// 标签
baseInfo: 'Test Basic Information',
baseInfo: 'Study Basic Information',
reagentInfo: 'Test Reagent Information',
instrumentInfo: 'Instrument Usage Information',
instrumentInfo: 'Instrument Usage',
storageCondition: 'Storage Conditions',
operationSteps: 'Operation Steps',
remark: 'Remarks',
operationSteps: 'Operation Workflow',
remark: 'Comments',
// 字段标签
storageConditionLabel: 'Storage Conditions',
testName: 'Test Name',
testNumber: 'Test Number',
methodCode: 'Method Code',
versionNumber: 'Version Number',
testConfigurationConditions: 'Test Configuration Conditions',
preFill: 'Pre-Fill',
storageConditionLabel: 'Storage Condition',
testName: 'Study Name',
testNumber: 'Study Number',
methodCode: 'Method Number',
versionNumber: 'Version',
testConfigurationConditions: 'Work Condition',
preFill: 'Preset',
actualFill: 'Actual',
configurationTime: 'Configuration Time',
configurationTime: 'Work Time',
startTime: 'Start Time',
endTime: 'End Time',
targetSolutionName: 'Target Solution Name',
targetSolutionCode: 'Target Solution Code',
targetPreConcentration: 'Target Solution Expected Concentration',
targetActConcentration: 'Target Solution Actual Concentration',
targetPreVolume: 'Target Solution Expected Volume',
targetActVolume: 'Target Solution Actual Volume',
effectivePeriod: 'Effective Period',
expireDate: 'Expiry Date',
targetSolutionCode: 'Target Solution ID',
targetPreConcentration: 'Expected Concentration of Target Solution',
targetActConcentration: 'Actual Concentration of Target Solution',
targetPreVolume: 'Expected Volume of Target Solution',
targetActVolume: 'Actual Volume of Target Solution',
effectivePeriod: 'Validity Period',
expireDate: 'Expiration Date',
// 占位符
remarkPlaceholder: 'Please enter remarks',
@ -42,16 +42,16 @@ export default {
// 试剂信息列
reagentName: 'Reagent Name',
reagentCode: 'Code',
reagentCode: 'Item Number',
reagentNo: 'Batch Number',
concentration: 'Concentration/Content/Purity',
source: 'Source',
reagentExpireDate: 'Expiry Date',
reagentExpireDate: 'Expiration Date',
// 仪器使用信息列
instrumentName: 'Instrument Name',
instrumentModel: 'Instrument Model',
instrumentCode: 'Instrument Number',
instrumentCode: 'Instrument ID',
nextTestDate: 'Next Test/Calibration/Verification Date',
// 试验物质配制计划列

+ 5
- 0
src/lang/en/template/sp.js View File

@ -16,5 +16,10 @@ export default {
yjjzxql: 'Expected Blank Substrate Extraction Volume',
sjjzxql: 'Actual Blank Substrate Extraction Volume',
hhwznd: 'Target Solution Concentration'
},
//生物样品分析方法学样品制备表(全血稳定)
sp010: {
title:
'Bioanalytical Methods Sample Preparation Record (Whole Blood Stability)'
}
}

+ 4
- 0
src/lang/zh/template/sp.js View File

@ -15,5 +15,9 @@ export default {
yjjzxql: '预计基质吸取量',
sjjzxql: '实际基质吸取量',
hhwznd: '化合物终浓度'
},
//生物样品分析方法学样品制备表(全血稳定)
sp010: {
title: '生物样品分析方法学样品制备表(全血稳定)'
}
}

+ 4
- 1
src/views/business/comps/template/TemplateTable.vue View File

@ -15,7 +15,9 @@ import SWYPFXRYPZB from "./comps/sp/SWYPFXRYPZB.vue";
import SWYPFXCBYPZB from "./comps/sp/SWYPFXCBYPZB.vue";
import SWYPBQGZYZBB from "./comps/sp/SWYPBQGZYZBB.vue";
import SWYPNBGZYZBB from "./comps/sp/SWYPNBGZYZBB.vue";
//-10
import ZQDYJMD from "./comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue";
import QXWDX from "./comps/sp/SWYPFXFFXYPZBB/QXWDX.vue";
import Demo from "./comps/sp/Demo.vue";
//
import SYWZPZJHB from "./comps/gy/SYWZPZJHB.vue";
@ -25,7 +27,7 @@ export default {
name: "TemplateTable",
components: {
MJYLQSQD, SYWZPZJHB,
SP001, SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB,ZQDYJMD
SP001, SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB,ZQDYJMD,QXWDX
},
props: {
sn: {
@ -55,6 +57,7 @@ export default {
'SP003': 'SWYPBQGZYZBB',
'SP004': 'SWYPNBGZYZBB',
'SP008': 'ZQDYJMD',
'SP010': 'QXWDX',
'SYWZPZJHB': 'SYWZPZJHB',
'MJYLQSQD': 'MJYLQSQD',
}

+ 373
- 0
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue View File

@ -0,0 +1,373 @@
<!-- 生物样品分析方法学样品制备表-全血稳定性 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.templateMc ||
$t('template.sp.sp010.title') }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPcakge fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" ref="baseInfoRef"
:formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns"
:dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqsColumns"
:dataSource="resource" />
<BaseInfoFormPcakge fieldItemLabel="template.common.storageCondition" label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig"
:formData="formData" @clickable="handleJzClickable" />
<CustomTable
@blur="onHandleTableBlur"
:ref="`tableRef`"
:columns="tableStepColumns"
:formData="formData"
:prefixKey = "`table`"
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
<template slot="operation" slot-scope="{ row, rowIndex}">
<TableOpertaion
:fillType="fillType"
:row="row"
:rowIndex="rowIndex"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"
></TableOpertaion>
</template>
</CustomTable>
</div>
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPcakge fieldItemLabel="template.common.remark" label="template.common.remark" ref="remarkRef" :formConfig="remarkConig"
:formData="formData" />
</div>
</div>
</div>
<!-- <button @click = "onSave">保存</button> -->
<SelectReagentDialog
@submit="onSelectReagentSubmit"
ref="selectReagentDialogRef" >
</SelectReagentDialog>
</div>
</template>
<script>
import BaseInfoFormPcakge from "@/components/Template/BaseInfoFormPcakge";
import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
import {getSWYPFXFFXYPZBBTableConfig} from "../../../formConfig/SWYPFXFFXYPZBBTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import SelectReagentDialog from '../../../dialog/SelectReagentDialog.vue';
export default {
name: "QXWDX",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion,SelectReagentDialog },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
storageFormConfig() {
return [
{
type: "conditionItem",
config: {
storageCondition: {
label: 'template.common.storageConditionLabel',
type: "select",
fillType: "preFill",
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
}
}
];
},
remarkConig() {
return [
{
type: "cellItem",
config: {
remark: {
label: "",
type: "textarea",
fillType: "actFill",
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
},
baseInfoFormConfig() {
return [
{
type: "cardItem",
config: {
studyMc: {
label: 'template.common.testName',
type: "input",
disabled: true,
},
studySn: {
label: 'template.common.testNumber',
type: "input",
disabled: true,
},
methodCode: {
label: 'template.common.methodCode',
type: "input",
fillType: "preFill",
maxlength: 50
},
versionNum: {
label: 'template.common.versionNumber',
type: "input",
fillType: "actFill",
maxlength: 50
},
//
clpbg: {
label: 'template.sp.sp008.clpbh',
type: "input",
fillType: "actFill",
maxlength: 50
},
}
},
{
type: "conditionItem",
label: 'template.common.testConfigurationConditions',
config: {
pre: {
label: 'template.common.preFill',
type: "select",
multiple: true,
fillType: "preFill",
options: this.getDictOptions('business_pztj'),
otherCode: "preOther",
},
act: {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: 'template.sp.sp008.rqcz',
config: {
rqcz: {
type: "select",
multiple: true,
fillType: "actFill",
options: this.getDictOptions('business_rqcz'),
otherCode: "rqczOther",
},
}
},
{
type: "cellItem",
label: 'template.sp.sp008.clsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
stepFormConfig() {
return [
{
type: "step",
config: {
jz: {
label: 'template.sp.sp008.xzjz',
type: "input",
fillType: "preFill",
subType: "clickable",
subKey: "subJz",
subFillType: "actFill",
maxlength: 20,
},
}
}
]
},
tableStepColumns() {
return getSWYPFXFFXYPZBBTableConfig(this);
},
},
data() {
return {
reagentType: "",//12
currentSubKey: "",//key
rowIndex:0,//
resource: [],
sysjColumns: [
{ label: 'template.common.reagentName', prop: "mc" },//
{ label: 'template.common.reagentCode', prop: "bh" },//
{ label: 'template.common.reagentNo', prop: "ph" },//
{ label: 'template.common.concentration', prop: "nd" },//
{ label: 'template.common.source', prop: "source" },//
{ label: 'template.common.reagentExpireDate', prop: "sxrq" },//
],
yqsColumns: [
{ label: 'template.common.instrumentName', prop: "instrumentName" },
{ label: 'template.common.instrumentModel', prop: "instrumentModel" },
{ label: 'template.common.instrumentCode', prop: "instrumentCode" },
{ label: 'template.common.nextTestDate', prop: "nextTestDate" },
],
formData: {}
};
},
mounted() {
},
watch: {
formData: {
immediate: true,
handler(v) {
if(this.fillType === "actFill"){
this.getCode(v);
}
}
}
},
methods: {
//
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
},
//
onSelectReagentSubmit(code,row){
if(this.reagentType===1){
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code);
}else{
this.$refs.tableRef.updateDataSourceByRowIndex(this.rowIndex,{
[this.currentSubKey]: code,
})
}
this.$refs.selectReagentDialogRef.onCancel()
},
//
handleClickable(col, rowIndex) {
//
this.reagentType = 2
this.rowIndex = rowIndex
this.currentSubKey = col.prop;
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
}
},
//
async getCode(v){
const {stepTableFormData = []} = v;
if(stepTableFormData && stepTableFormData.length>0 && !stepTableFormData[0].bhCode){
const result = await getLatestSn({
count: stepTableFormData.length,
})
if(result.code == 200){
if(stepTableFormData.length===0){
this.$refs.tableRef.updateDataSourceByRowIndex(0,{
[bhCode]: result.data,
})
}else{
for(let i=0;i<stepTableFormData.length;i++){
this.$refs.tableRef.updateDataSourceByRowIndex(i,{
bhCode: result.data[i],
})
}
}
}
}
},
//
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef","stepRef", "remarkRef"])
},
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef","tableRef" ,"stepRef", "remarkRef"]);
//resource
let tmpResource = []
let tableList = content.stepTableFormData
for(let i=0;i<tableList.length;i++){
//
let item = tableList[i]
tmpResource.push({
mc: null,
bh: item.bh+item.bhCode,
ph: null,
nd: item.hhwznd + content.headerSelectFields.hhwzndUnit,
source: 'ELN配制',
sxrq: null,
ndz: item.hhwznd,
nddw: content.headerSelectFields.hhwzndUnit,
kc: item.sjjzxql+item.sjryxql,//todo -
kcdw: content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --
syl: null,
syldw:content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --,
yxzq:null,
yxzqdw:null,
})
}
//使
this.resource=tmpResource
return content;
},
async onSave() {
const formData = await this.getFilledFormData();
console.log(formData, "formData")
},
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
</style>

+ 1
- 1
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue View File

@ -16,7 +16,7 @@
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig"
:formData="formData" @clickable="handleJzClickable" />
<CustomTable

Loading…
Cancel
Save