Browse Source

feat:[模板管理][update]

ouqian
luojie 1 month ago
parent
commit
4b50da8d3a
2 changed files with 103 additions and 107 deletions
  1. +2
    -2
      src/components/Template/BaseInfoFormPackage.vue
  2. +101
    -105
      src/views/business/comps/template/comps/dl/DL023.vue

+ 2
- 2
src/components/Template/BaseInfoFormPackage.vue View File

@ -167,9 +167,9 @@
:error="errors[key]" @update:error="errors[key] = false"
:orange-bg="orangeBgFields[key]" />
</div>
<div v-else-if="sItem.type === 'select'" class="flex flex1">
<div v-else-if="sItem.type === 'select' ||sItem.type === 'radio'" class="flex flex1">
<HandleFormItem :field-item-label="fieldItemLabel" :field-key="prefixKey + '_' + key"
type="select" :item="sItem" style="width: auto;flex:1" v-model="formFields[key]"
:type="sItem.type" :item="sItem" style="width: auto;flex:1" v-model="formFields[key]"
@copy="onCopy(sItem, key)" @change="(e, type) => onSelectChange(key, e, type)"
:error="errors[key]" @update:error="errors[key] = false"
:orange-bg="orangeBgFields[key]" />

+ 101
- 105
src/views/business/comps/template/comps/dl/DL023.vue View File

@ -8,27 +8,21 @@
<div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<!-- 仪器使用信息 -->
<LineLabel label="template.dl.dl023.yqsyxx" />
<CustomTable
:ref="`tableRef`"
:columns="yqsyxxColumns"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:formData="formData"
operationWidth = "80px"
:showAddRow="fillType === 'actFill'"
:showOperation="fillType === 'actFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
</template>
</CustomTable>
<!-- 仪器使用信息 -->
<LineLabel label="template.dl.dl023.yqsyxx" />
<CustomTable :ref="`tableRef`" :columns="yqsyxxColumns" @onRegentSubmit="(e) => onRegentSubmit(e)"
:formData="formData" operationWidth="80px" :showAddRow="fillType === 'actFill'"
:showOperation="fillType === 'actFill'">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="deleteRow"></TableOpertaionDelete>
</template>
</CustomTable>
<LineLabel label="template.dl.dl023.czjl" />
<!-- 操作记录 -->
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
:formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<LineLabel label="template.dl.dl023.czjl" />
<!-- 操作记录 -->
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
@ -52,10 +46,10 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion
export default {
name: "dl023",
dicts: [
'business_dl_xbmc'
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
dicts: [
'business_dl_xbmc'
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
@ -103,67 +97,70 @@ export default {
}
]
},
//yqsyxxColumns使
yqsyxxColumns() {
//yqsyxxColumns使
yqsyxxColumns() {
return [{
label: 'template.dl.dl023.yqbh',
prop: 'yqbh',
bodyType: 'input',
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
},{
disabled: true
}, {
label: 'template.dl.dl023.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
},{
disabled: true
}, {
label: 'template.dl.dl023.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
},{
disabled: true
}, {
label: 'template.dl.dl023.xcrq',
prop: 'xcrq',
bodyType: 'input',
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
disabled: true
}]
},
//
//
stepFormConfig() {
return [
{
type: "cellItem",
type: "step",
config: {
dwzshxbx: {
dwzshxbx: {
// span:1,
label: 'template.dl.dl023.dwzshxbx',
type: 'qxbd',
type: 'radio',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
options:[
{label:"动物种属",value:"动物种属"},
{label:"细胞系",value:"细胞系"}
]
},
sydd: {
sydd: {
label: 'template.dl.dl023.sydd',
type: 'select',
fillType: 'actFill',
options: this.getDictOptions('business_dl_sydd'),
otherCode: 'syddOther',
showOtherLabel:false
showOtherLabel: false
},
zwbh: {
label: 'template.dl.dl023.zwbh',
type: 'input',
fillType: 'actFill',
bodyMaxlength: 50,
},
zwbh:{
label: 'template.dl.dl023.zwbh',
type: 'input',
fillType: 'actFill',
bodyMaxlength: 50,
},
uvazsjl: {
uvazsjl: {
label: "template.dl.dl023.uvazsjl",
type: "input",
fillType: "actFill",
@ -172,32 +169,32 @@ export default {
subFillType: "actFill",
maxlength: 20,
},
zszsj:{
span:1,
label: 'template.dl.dl023.zszsj',
type: 'input',
with:100,
fillType: 'actFill',
bodyMaxlength: 50,
},
zskssj: {
label: 'template.dl.dl023.zskssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'zskssj',
buttonName: 'template.dl.dl023.ksButton',
},
zsjssj: {
label: 'template.dl.dl023.zsjssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'zsjssj',
buttonName: 'template.dl.dl023.jsButton',
},
zszsj: {
span: 1,
label: 'template.dl.dl023.zszsj',
type: 'input',
with: 100,
fillType: 'actFill',
bodyMaxlength: 50,
},
zskssj: {
label: 'template.dl.dl023.zskssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'zskssj',
buttonName: 'template.dl.dl023.ksButton',
},
zsjssj: {
label: 'template.dl.dl023.zsjssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'zsjssj',
buttonName: 'template.dl.dl023.jsButton',
},
}
}
]
@ -211,46 +208,46 @@ export default {
mounted() {
},
methods: {
//
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('选择仪器编号预留===',row)
// if (key === 'yqbh' && this.$refs.yqsyTableRef) {
// const params = {
// yqmc: row.mc,
// yqxh: row.xh,
// xccsjzjdrq: row.jzrq
// }
// this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
// }
},
onFormSelect(fields){
//
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('选择仪器编号预留===', row)
// if (key === 'yqbh' && this.$refs.yqsyTableRef) {
// const params = {
// yqmc: row.mc,
// yqxh: row.xh,
// xccsjzjdrq: row.jzrq
// }
// this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
// }
},
onFormSelect(fields) {
this.onHandleBlur(fields)
},
//table header
onHeaderSelectChange(data){
const {key, headerSelectFields,dataSource=[]} = data;
//table header
onHeaderSelectChange(data) {
const { key, headerSelectFields, dataSource = [] } = data;
const keys = [
'targetStartSolutionVolumeUnit',
'targetDiluentVolumeUnit',
'targetSolutionConcentrationUnit',
'targetSolutionVolumeUnit',
]
if(keys.includes(key)){
const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
if (keys.includes(key)) {
const { targetStartSolution, subTargetStartSolution } = this.$refs.swypyjInfoRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
this.batchUpdateTargetStartSolutionVolume(dataSource, targetStartSolution, params)
}
},
beforeSaveRecord(data){
beforeSaveRecord(data) {
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields,data);
this.onCommonVerifyNdException(formFields, data);
},
configComplete(val) {
configComplete(val) {
const { rowData, headerSelectFields } = val;
//(+)
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
@ -260,14 +257,14 @@ export default {
nd: rowData.actSolutionConcentration,//
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
studyId:this.formData.studyId,
studyFormId: this.formData.id,
studyId: this.formData.studyId,
kc: total,
kcdw: unit,
}
this.configCompleteRequest(postData);
},
//
//
subPackageSubmit(data) {
const { fzsj, rowData, headerSelectFields } = data;
const { fzList = [], dw = "", mybh } = fzsj;
@ -286,7 +283,7 @@ export default {
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
studyFormId: this.formData.id,
list: list
}
this.subPackageRequest(postData);
@ -294,11 +291,11 @@ export default {
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef","remarkRef","tableRef"])
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "remarkRef", "tableRef"])
},
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef","remarkRef","tableRef"]);
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "remarkRef", "tableRef"]);
return content;
},
getResource() {
@ -323,5 +320,4 @@ export default {
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
</style>
<style rel="stylesheet/scss" lang="scss"></style>

Loading…
Cancel
Save