Browse Source

fix[模板开发]DL018-024完善

ouqian
lslaiwy 1 month ago
parent
commit
15e8569c23
4 changed files with 98 additions and 127 deletions
  1. +14
    -8
      src/views/business/comps/template/comps/dl/DL018.vue
  2. +16
    -27
      src/views/business/comps/template/comps/dl/DL022.vue
  3. +15
    -18
      src/views/business/comps/template/comps/dl/DL023.vue
  4. +53
    -74
      src/views/business/comps/template/comps/dl/DL024.vue

+ 14
- 8
src/views/business/comps/template/comps/dl/DL018.vue View File

@ -192,10 +192,13 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
disabled: true,
subType: 'button',
subKey: 'rsks',
buttonName: 'template.dl.dl018.ksButton',
// disabled: true,
// showOtherLabel: false,
bodySubType: 'button',
subodySubKeybKey: 'rsks',
bodySubButtonName: 'template.dl.dl018.ksButton',
showBodySub:this.fillType === "actFill",
},
{
label: "template.dl.dl018.rsjs",
@ -203,10 +206,13 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
disabled: true,
subType: 'button',
subKey: 'rsjs',
buttonName: 'template.dl.dl018.jsButton',
// disabled: true,
// showOtherLabel: false,
bodySubType: 'button',
subodySubKeybKey: 'rsjs',
bodySubButtonName: 'template.dl.dl018.jsButton',
showBodySub:this.fillType === "actFill",
},
{
label: "template.dl.dl018.zs",

+ 16
- 27
src/views/business/comps/template/comps/dl/DL022.vue View File

@ -14,7 +14,7 @@
<!-- 观察情况 -->
<div class="template-form-item">
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
@onRegentSubmit="onRegentSubmit" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<div style="color:#999;font-size:14px;">
畸变类型以代号填写断片(b)裂隙(g)互换及射体(t)环状染色体(r)多倍体(p)双着丝点染色体(d)内复制(e)染色体碎化(z)缺失(l)粘着(s)微小体(m)
@ -26,9 +26,9 @@
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="deleteRow"></TableOpertaionDelete>
<div v-if="fillType === 'actFill'" class="edit-button" @click="onEditClick(row, rowIndex)">
<button v-if="fillType === 'actFill'" class="edit-button" @click="onEditClick(row, rowIndex)">
{{ row.isComplete ? '编辑' : '完成' }}
</div>
</button>
</template>
</CustomTable>
</div>
@ -154,42 +154,42 @@ export default {
prop: 'bpbh',
bodyType: 'input',
bodyFillType: 'actFill',
width: 100,
width: 200,
bodyMaxlength: 50,
}, {
label: 'template.dl.dl022.gcxps',
prop: 'gcxps',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 100,
width: 200,
bodyMaxlength: 10,
}, {
label: 'template.dl.dl022.jgjxjbs',
prop: 'jgjxjbs',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 80,
width: 200,
disabled: true
}, {
label: 'template.dl.dl022.lxjbs',
prop: 'lxjbs',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 100,
width: 200,
disabled: true
}, {
label: 'template.dl.dl022.dbtjbs',
prop: 'dbtjbs',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 100,
width: 200,
disabled: true
}, {
label: 'template.dl.dl022.nfzjbs',
prop: 'nfzjbs',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 80,
width: 200,
disabled: true
}, {
label: 'template.dl.dl022.jblx',
@ -223,8 +223,6 @@ export default {
},
handleEdit(){
const {currentItem, currentRowIndex} = this;
currentItem.isComplete = !currentItem.isComplete;
this.$refs.tableRef.updateDataSourceByRowIndex(currentRowIndex, currentItem)
},
@ -240,7 +238,7 @@ export default {
EventBus.$emit('showEditSignDialog', { uuid: this.uuid });
this.currentItem = item;
this.currentRowIndex = rowIndex;
},
//
onAddRow() {
@ -248,20 +246,6 @@ export default {
jblx: [{value: undefined}],
})
},
//
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)
},
@ -363,7 +347,12 @@ export default {
<style rel="stylesheet/scss" lang="scss">
.edit-button{
color: #409eff;
margin-left: 10px;
font-size: 13px;
border-radius: 3px;
padding: 5px 9px;
cursor: pointer;
border-color: transparent;
background: transparent;
margin: 0 0 5px 10px !important;
}
</style>

+ 15
- 18
src/views/business/comps/template/comps/dl/DL023.vue View File

@ -47,7 +47,7 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion
export default {
name: "dl023",
dicts: [
'business_dl_xbmc'
'business_dl_xbmc',"business_sydd"
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete },
mixins: [templateMixin],
@ -100,13 +100,11 @@ export default {
//yqsyxxColumns使
yqsyxxColumns() {
return [{
label: 'template.dl.dl023.yqbh',
prop: 'yqbh',
bodyType: 'input',
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
}, {
label: 'template.dl.dl023.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
}, {
label: 'template.dl.dl023.yqmc',
prop: 'yqmc',
bodyType: 'input',
@ -153,7 +151,7 @@ export default {
label: 'template.dl.dl023.sydd',
type: 'select',
fillType: 'actFill',
options: this.getDictOptions('business_dl_sydd'),
options: this.getDictOptions('business_sydd'),
otherCode: 'syddOther',
showOtherLabel: false
},
@ -226,15 +224,14 @@ export default {
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)
// }
if (key === 'yqbh' && this.$refs.tableRef) {
const params = {
yqmc: row.mc,
yqxh: row.xh,
xcrq: row.jzrq,
}
this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex, params)
}
},
onFormSelect(fields) {
this.onHandleBlur(fields)

+ 53
- 74
src/views/business/comps/template/comps/dl/DL024.vue View File

@ -15,7 +15,7 @@
<!-- 操作记录 -->
<div class="template-form-item">
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
:formConfig="stepFormConfig" @blur="onHandleBlur"
:formConfig="stepFormConfig" @blur="onHandleBlur" @onRegentSubmit="onRegentSubmit"
:formData="formData" />
<CustomTable
:ref="`tableRef`"
@ -56,7 +56,7 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion
export default {
name: "dl024",
dicts: [
'business_dl_xbmc'
'business_dl_xbmc','business_sydd'
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
@ -67,6 +67,13 @@ export default {
},
},
computed: {
//
tableFormData() {
return {
stepTableFormData: this.formData.stepTableFormData || [],
headerSelectFields: {}
}
},
//
remarkConig() {
return [
@ -145,6 +152,7 @@ export default {
label: 'template.dl.dl024.qxbd',
type: 'qxbd',
fillType: 'actFill',
qxbdType:'DL003',
filledCodes:['bdmc','bdbh'],
},
pykssj:{
@ -152,7 +160,7 @@ export default {
type: 'input',
fillType: 'actFill',
subType: 'button',
subKey: 'pyjssj',
subKey: 'pykssj',
buttonName: 'template.dl.dl024.jsButton',
},
pyjssj: {
@ -188,87 +196,49 @@ export default {
mounted() {
},
methods: {
//
//
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('选择仪器编号预留===',row)
// if (key === 'yqbh' && this.$refs.yqsyTableRef) {
try {
//
const bdnr = JSON.parse(row.bdnr)
//
const stepTableFormData = bdnr.jlzTableData || []
if (stepTableFormData.length === 0) {
//
this.$set(this.formData, 'stepTableFormData', [])
this.$message.warning('前序表单中没有细胞编号数据')
return
}
//
const itemData = stepTableFormData.map(item => ({
xbbh: item.jlzb || '', //
}))
// 使 $set formData CustomTable
this.$set(this.formData, 'stepTableFormData', itemData)
this.$message.success(`已从前序表单加载 ${itemData.length} 条细胞编号数据`)
} catch (error) {
this.$set(this.formData, 'stepTableFormData', [])
console.error('解析前序表单数据失败:', error)
this.$message.error('解析前序表单数据失败')
}
// if (key === 'qxbd' && this.$refs.tableRef) {
// const params = {
// yqmc: row.mc,
// yqmc: row.xbbh,
// yqxh: row.xh,
// xccsjzjdrq: row.jzrq
// }
// this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
// this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex, params)
// }
},
onFormSelect(fields){
this.onHandleBlur(fields)
},
//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();
const params = {
subTargetStartSolution,
headerSelectFields
}
this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
}
},
beforeSaveRecord(data){
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields,data);
},
configComplete(val) {
const { rowData, headerSelectFields } = val;
//(+)
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
let postData = {
mc: null,
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
nd: rowData.actSolutionConcentration,//
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
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;
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
})
let postData = {
studyId: this.formData.studyId,
studyFormId: this.formData.id,
bh: mybh,
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
list: list
}
this.subPackageRequest(postData);
}
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef","remarkRef","tableRef"])
@ -280,9 +250,18 @@ export default {
},
getResource() {
//使
// stepRef
this.resourceTmp = []
this.yqResourceTmp = []
const stepResource = this.$refs.stepRef.getStepResource()
const tableList = this.$refs.qcxjjyqkTableRef?.getFilledFormData()?.stepTableFormData || []
//
this.resourceTmp = stepResource.sjResource || []
const tableFromHyqk = tableList
.filter(item => item.xybh)
.map(item => ({
bh: item.xybh,
type: 'cell'
}))
this.resourceTmp = [...this.resourceTmp, ...tableFromHyqk]
return this.resourceTmp;
},
//

Loading…
Cancel
Save