Browse Source

feat:[模板管理][DL007国际化、DL008页面暂存]

ouqian
欧骞 1 month ago
parent
commit
0cd43f76f5
5 changed files with 419 additions and 69 deletions
  1. +18
    -0
      src/lang/en/template/dl.js
  2. +18
    -0
      src/lang/zh/template/dl.js
  3. +54
    -65
      src/views/business/comps/template/comps/dl/DL007.vue
  4. +327
    -4
      src/views/business/comps/template/comps/dl/DL008.vue
  5. +2
    -0
      src/views/business/comps/template/mixins/templateMixin.js

+ 18
- 0
src/lang/en/template/dl.js View File

@ -1,6 +1,24 @@
//毒理
export default {
dl001: {},
dl007: {
sydd: 'Test Location',
yqsyxx: 'Instrument Usage Information',
yqbh: 'Instrument Number',
yqmc: 'Instrument Name',
yqxh: 'Instrument Model',
xccsjzjdrq: 'Next Test/Calibration/Verification Date',
czxx: 'Operation Information',
qxbd: 'Previous Form',
pykssj: 'Cultivation Start Time',
pyjssj: 'Cultivation End Time',
jsButton: 'End',
bz: 'Remarks'
},
dl008: {
cxqk: 'Imaging Status',
wrqk: 'Contamination Status'
},
dl020: {
swdljlbxx: '毒理记录表信息',
xbxx:'细胞信息',

+ 18
- 0
src/lang/zh/template/dl.js View File

@ -1,6 +1,24 @@
//毒理
export default {
dl001: {},
dl007: {
sydd: '试验地点',
yqsyxx: '仪器使用信息',
yqbh: '仪器编号',
yqmc: '仪器名称',
yqxh: '仪器型号',
xccsjzjdrq: '下次测试/校准/检定日期',
czxx: '操作信息',
qxbd: '前序表单',
pykssj: '培养开始时间',
pyjssj: '培养结束时间',
jsButton: '结束',
bz: '备注'
},
dl008: {
cxqk: '成像情况',
wrqk: '污染情况'
},
dl020: {
swdljlbxx: '毒理记录表信息',
xbxx:'细胞信息',

+ 54
- 65
src/views/business/comps/template/comps/dl/DL007.vue View File

@ -11,15 +11,15 @@
<BaseInfoFormPackage
fieldItemLabel="template.common.baseInfo"
label="template.common.baseInfo"
ref="baseInfoRef"
:ref="refConf.base"
:formConfig="baseInfoFormConfig"
:formData="formData"
/>
<LineLabel label="仪器使用信息" />
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
:columns="yqsyColumns"
ref="yqsyTableRef"
:ref="refConf.yqsy"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
@ -37,18 +37,19 @@
</CustomTable>
<BaseInfoFormPackage
fieldItemLabel="操作信息"
label="操作信息"
ref="czInfoRef"
fieldItemLabel="template.dl.dl007.czxx"
label="template.dl.dl007.czxx"
:ref="refConf.czInfo"
:formConfig="czInfoFormConfig"
:formData="formData"
@clickButton="handleClickButton"
@onRegentSubmit="onRegentSubmit"
/>
<BaseInfoFormPackage
fieldItemLabel="template.yp.yp002.jsbz"
label="template.yp.yp002.jsbz"
ref="remarkRef"
fieldItemLabel="template.dl.dl007.bz"
label="template.dl.dl007.bz"
:ref="refConf.remark"
:formConfig="remarkConig"
:formData="formData"
/>
@ -68,6 +69,14 @@ import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin'
import moment from 'moment'
const refConf = {
base: 'baseInfoRef',
yqsy: 'yqsyTableRef',
czInfo: 'czInfoRef',
remark: 'remarkRef'
}
const refNames = Object.values(refConf)
export default {
name: 'DL007',
components: {
@ -125,13 +134,13 @@ export default {
},
{
type: 'conditionItem',
label: '试验地点',
label: 'template.dl.dl007.sydd',
config: {
sydd: {
span: 1,
label: '试验地点',
label: 'template.dl.dl007.sydd',
type: 'select',
options: this.getDictOptions('business_cctj'),
options: this.getDictOptions('business_sydd'),
fillType: 'actFill',
otherCode: 'syddOther'
}
@ -139,15 +148,15 @@ export default {
},
{
type: 'cellItem',
label: '操作时间',
label: 'template.common.configurationTime',
config: {
kssj: {
label: '开始时间',
startDate: {
label: 'template.common.startTime',
type: 'input',
disabled: true
},
jssj: {
label: '结束时间',
endDate: {
label: 'template.common.endTime',
type: 'input',
disabled: true
}
@ -159,13 +168,13 @@ export default {
yqsyColumns() {
return [
{
label: '仪器编号',
label: 'template.dl.dl007.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
},
{
label: '仪器名称',
label: 'template.dl.dl007.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyDisabled: true,
@ -173,7 +182,7 @@ export default {
disabled: true
},
{
label: '仪器型号',
label: 'template.dl.dl007.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyDisabled: true,
@ -181,7 +190,7 @@ export default {
disabled: true
},
{
label: '下次测试/检准/检定日期',
label: 'template.dl.dl007.xccsjzjdrq',
prop: 'jzrq',
bodyType: 'input',
bodyDisabled: true,
@ -198,23 +207,25 @@ export default {
type: 'cellItem',
config: {
qxbd: {
label: 'template.yp.yp002.qxbd',
label: 'template.dl.dl007.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
},
pykssj: {
label: '培养开始时间',
label: 'template.dl.dl007.pykssj',
fillType: 'actFill',
type: 'input',
disabled: true
},
pyjssj: {
label: 'template.dl.dl007.pyjssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'pyjssjButton',
buttonName: '获取时间'
buttonName: 'template.dl.dl007.jsButton'
}
}
}
@ -223,68 +234,46 @@ export default {
},
data() {
return {
formData: {}
formData: {},
refConf
}
},
mounted() {},
methods: {
//
deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)
},
//
handleClickButton(item, signData) {
handleClickButton(_item, signData) {
this.$refs.czInfoRef.updateFormData(
'pyjssj',
moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData }
)
},
//
//
getFilledFormData() {
const baseData = this.$refs.baseInfoRef.getFilledFormData()
const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData()
const ypjsData = this.$refs.ypjsInfoRef.getFilledFormData()
const remarkData = this.$refs.remarkRef.getFilledFormData()
return {
...baseData,
...swypyjData,
...ypjsData,
...remarkData
}
return this.getFilledFormDataByRefs(refNames)
},
//
//
async getFormData() {
//
const validFlag = await this.validFields()
if (!validFlag) {
return false
}
let content = this.getFilledFormData()
return content
return await this.validFormFields(refNames)
},
//
//
async validFields() {
//
let refsToValidate = [
'baseInfoRef',
'yqsyTableRef',
'czInfoRef',
'remarkRef'
]
return await this.validFormFields(refsToValidate)
return await this.validFormFields(refNames)
},
getResource() {
let content = this.getFilledFormData()
//使
this.resourceTmp = []
this.yqResourceTmp = []
const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp
},
onRegentSubmit(e) {
const { selectInfo, key, col, rowIndex, colIndex, rowData } = e
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
@ -293,11 +282,11 @@ export default {
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
if (key === 'qxbd') {
this.$refs.czInfoRef.updateFormData('pykssj', row.startDate)
}
},
// beforeReagentSubmit(val,val1,val2){
// debugger
// },
//
//
async onSave() {
const formData = this.getStepResource()
console.log(formData, 'formData')

+ 327
- 4
src/views/business/comps/template/comps/dl/DL008.vue View File

@ -1,16 +1,339 @@
<!-- Ames试验平皿成像确认记录表 -->
<template>
<div></div>
<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="refConf.base"
:formConfig="baseInfoFormConfig"
:formData="formData"
/>
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
:columns="yqsyColumns"
:ref="refConf.yqsy"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`yqsyTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'yqsyTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<!-- 成像情况 -->
<LineLabel label="template.dl.dl008.cxqk" />
<BaseInfoFormPackage
:ref="refConf.cxqkqxbb"
:formConfig="cxqkqxbbInfoFormConfig"
:formData="formData"
@clickButton="handleClickButton"
@onRegentSubmit="onRegentSubmit"
/>
<CustomTable
:columns="cxqkColumns"
:ref="refConf.cxqk"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:formData="formData"
:prefixKey="`cxqkTable`"
>
</CustomTable>
<BaseInfoFormPackage
:ref="refConf.cxqkwrqk"
:formConfig="cxqkwrqkConfig"
:formData="formData"
/>
<BaseInfoFormPackage
fieldItemLabel="template.dl.dl007.bz"
label="template.dl.dl007.bz"
:ref="refConf.remark"
:formConfig="remarkConfig"
:formData="formData"
/>
</div>
</div>
</div>
</div>
</template>
<script>
import BaseInfoFormPackage from '@/components/Template/BaseInfoFormPackage'
import TableOpertaionDelete from '@/components/Template/operation/TableOpertaionDelete.vue'
import CustomTable from '@/components/Template/CustomTable.vue'
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'
const refConf = {
base: 'baseInfoRef',
yqsy: 'yqsyTableRef',
cxqkqxbb: 'cxqkqxbbInfoRef',
cxqk: 'cxqkTableRef',
cxqkwrqk: 'cxqkwrqkInfoRef',
remark: 'remarkRef'
}
const refNames = Object.values(refConf)
export default {
name: 'DL008',
components: {
BaseInfoFormPackage,
LineLabel,
TableList,
Step,
CustomTable,
TableOpertaionDelete
},
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill'
}
},
computed: {
//
remarkConfig() {
return [
{
type: 'cellItem',
config: {
remark: {
label: '',
type: 'textarea',
fillType: 'actFill',
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
},
// -
cxqkwrqkConfig() {
return [
{
type: 'conditionItem',
config: {
cxqkwrqk: {
// ''
span: 1,
label: 'template.dl.dl008.wrqk',
type: 'select',
options: this.getDictOptions('business_dl_ameswrqk'),
fillType: 'actFill',
otherCode: 'cxqkwrqkOther'
}
}
}
]
},
//
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.dl.dl007.sydd',
config: {
sydd: {
span: 1,
label: 'template.dl.dl007.sydd',
type: 'select',
options: this.getDictOptions('business_sydd'),
fillType: 'actFill',
otherCode: 'syddOther'
}
}
},
{
type: 'cellItem',
label: 'template.common.configurationTime',
config: {
startDate: {
label: 'template.common.startTime',
type: 'input',
disabled: true
},
endDate: {
label: 'template.common.endTime',
type: 'input',
disabled: true
}
}
}
]
},
// - TODO:
cxqkColumns() {
return []
},
// 使
yqsyColumns() {
return [
{
label: 'template.dl.dl007.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl007.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl007.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl007.xccsjzjdrq',
prop: 'jzrq',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
}
]
},
// -
cxqkqxbbInfoFormConfig() {
return [
{
type: 'cellItem',
config: {
cxqkqxbd: {
label: 'template.dl.dl007.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
}
}
}
]
}
},
data() {
return {}
return {
formData: {},
refConf
}
},
mounted() {},
methods: {}
methods: {
//
deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)
},
//
handleClickButton(_item, signData) {
this.$refs.cxqkqxbbInfoRef.updateFormData(
'pyjssj',
moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData }
)
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(refNames)
},
//
async getFormData() {
return await this.validFormFields(refNames)
},
//
async validFields() {
return await this.validFormFields(refNames)
},
getResource() {
const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp
},
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
yqxh: row.xh,
jzrq: row.jzrq
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
if (key === 'qxbd') {
this.$refs.cxqkqxbbInfoRef.updateFormData('pykssj', row.startDate)
}
},
//
async onSave() {
const formData = this.getStepResource()
console.log(formData, 'formData')
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss"></style>
<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>

+ 2
- 0
src/views/business/comps/template/mixins/templateMixin.js View File

@ -33,6 +33,8 @@ export default {
'business_lba_jg', // LBA006-结果
'business_cftj', // 存放条件
'business_yplx', // 样品类型
'business_sydd', // 毒理-Ames实验地点
'business_dl_ameswrqk', // 毒理-Ames污染情况
],
props: {
templateData: {

Loading…
Cancel
Save