luojie 1 month ago
parent
commit
92e2895fc4
5 changed files with 456 additions and 4 deletions
  1. +10
    -1
      src/lang/en/template/dl.js
  2. +10
    -1
      src/lang/zh/template/dl.js
  3. +25
    -2
      src/views/business/comps/template/TemplateTable.vue
  4. +208
    -0
      src/views/business/comps/template/comps/dl/DL016.vue
  5. +203
    -0
      src/views/business/comps/template/comps/dl/DL020.vue

+ 10
- 1
src/lang/en/template/dl.js View File

@ -1,4 +1,13 @@
//毒理
export default {
dl001: {}
dl001: {},
dl020: {
swdljlbxx: '毒理记录表信息',
xbxx:'细胞信息',
sydd:'实验地点',
czsj:'操作时间',
qxbd: '前序表单',
dlbz: '备注',
czbz: '操作步骤',
}
}

+ 10
- 1
src/lang/zh/template/dl.js View File

@ -1,4 +1,13 @@
//毒理
export default {
dl001: {}
dl001: {},
dl020: {
swdljlbxx: '毒理记录表信息',
xbxx:'细胞信息',
sydd:'实验地点',
czsj:'操作时间',
qxbd: '前序表单',
dlbz: '备注',
czbz: '操作步骤',
}
}

+ 25
- 2
src/views/business/comps/template/TemplateTable.vue View File

@ -77,6 +77,9 @@ import YP005 from "./comps/yp/YP005.vue";
//
// DL001-SYWZPZJHB
// DL002-使SP001
import DL016 from "./comps/dl/DL016.vue";
import DL020 from "./comps/dl/DL020.vue";
export default {
name: "TemplateTable",
@ -103,6 +106,25 @@ export default {
YP003,
YP004,
YP005,
//
DL016,
DL020
},
data() {
return {
componentMap: null,
}
},
methods: {
getTemplateComponent() {
if (!this.sn) return 'Demo';
let componentName = this.componentMap[this.sn] || 'Demo';
return componentName;
},
handleEditSignCancel(e) {
EventBus.$emit('edit-sign-cancel', e);
},
},
props: {
sn: {
@ -193,7 +215,8 @@ export default {
'YP005': 'YP005',
//
//DL001-SYWZPZJHB
'DL002': 'SP001',
'DL016': 'DL016',
'DL020': 'DL020',
}
}
return this.componentMap || "Demo"
@ -380,4 +403,4 @@ export default {
padding: 10px 10px;
width: 100%;
}
</style>
</style>

+ 208
- 0
src/views/business/comps/template/comps/dl/DL016.vue View File

@ -0,0 +1,208 @@
<!-- 生物分析生物样品采集管制备表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc }}<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage 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="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.yp.yp004.zbxx" />
<CustomTable
:ref="`tableRef`"
:columns="tableColumns"
:formData="formData"
:prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
</template>
</CustomTable>
<LineLabel label="template.yp.yp004.zbbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
<!-- <button @click="onSave">保存</button> -->
</div>
</template>
<script>
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage";
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 { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
export default {
name: "DL016",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
//
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,
},
}
},
{
type: "conditionItem",
label: 'template.yp.yp004.pztj',
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,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: 'template.lba.lba002.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
tableColumns() {
return [{
label: 'template.yp.yp004.zbdx',
prop: 'zbdx',
bodyType: 'input',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 50,
},{
label: 'template.yp.yp004.yjzbs',
prop: 'yjzbs',
bodyType: 'inputNumber',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 10,
},{
label: 'template.yp.yp004.sjzbs',
prop: 'sjzbs',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 280,
bodyMaxlength: 10,
copyFrom:'yjzbs',
compareTo:'yjzbs'
}]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "remarkRef"])
},
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "tableRef", "stepRef", "remarkRef"]);
return content;
},
getResource() {
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
let content = await this.$refs.stepRef.getFormData();
console.log(content);
},
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
</style>

+ 203
- 0
src/views/business/comps/template/comps/dl/DL020.vue View File

@ -0,0 +1,203 @@
<!-- 生物样品接收记录表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage 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="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
<!-- <button @click="onSave">保存</button> -->
</div>
</template>
<script>
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage";
import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import moment from "moment";
export default {
name: "DL020",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
//
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,
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
pre: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
swypyjInfoFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl020.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
}
},
]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
// handleClickButton(item,signData){
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData();
const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
const remarkData = this.$refs.remarkRef.getFilledFormData();
return {
...baseData,
...swypyjData,
...remarkData,
}
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
},
getResource() {
let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

Loading…
Cancel
Save