Browse Source

fix: [模板管理] dl018

luojie
memorylkf 2 weeks ago
parent
commit
71cc7c5151
3 changed files with 10 additions and 45 deletions
  1. +1
    -1
      src/lang/en/template/dl.js
  2. +1
    -1
      src/lang/zh/template/dl.js
  3. +8
    -43
      src/views/business/comps/template/comps/dl/DL018.vue

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

@ -288,7 +288,7 @@ export default {
},
dl018: {
xbxx: '细胞信息',
sydd: '试验地点',
sydd: '测定地点',
czsj: '操作时间',
qxbd: '前序表单',
dlbz: '备注',

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

@ -282,7 +282,7 @@ export default {
},
dl018: {
xbxx: '细胞信息',
sydd: '试验地点',
sydd: '测定地点',
czsj: '操作时间',
qxbd: '前序表单',
dlbz: '备注',

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

@ -17,10 +17,10 @@
<LineLabel label="template.dl.dl018.xbczqk" />
<CustomTable
fieldItemLabel="template.common.operationSteps"
fieldItemLabel="template.dl.dl018.xbczqk"
@clickButton="handleClickButton"
:showAddRow="false" :showOperation="false"
ref="stepTableRef" :prefixKey = "`tableSecond`" :columns="stepColumns" :formData="tableFormData">
ref="stepTableRef" :prefixKey = "`tableSecond`" :columns="stepColumns" :formData="formData">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow(rowIndex,'secondTable')" ></TableOpertaionDelete>
</template>
@ -65,13 +65,6 @@ export default {
},
},
computed: {
//
tableFormData() {
return {
stepTableFormData: this.formData.stepTableFormData || [],
headerSelectFields: {}
}
},
//
remarkConig() {
return [
@ -193,6 +186,7 @@ export default {
bodySubFillType: 'actFill',
bodyFillType: 'actFill',
bodyDisabled: true,
bodySubDisabled:this.fillType !== 'actFill',
width: 280,
bodyMaxlength: 50,
},
@ -205,6 +199,7 @@ export default {
bodySubKey: 'rsjs1',
bodySubFillType: 'actFill',
bodyFillType: 'actFill',
bodySubDisabled:this.fillType !== 'actFill',
bodyDisabled: true,
width: 280,
bodyMaxlength: 50,
@ -256,11 +251,10 @@ export default {
},
methods: {
//
handleClickButton(e, rowIndex) {
handleClickButton(e, rowIndex,colIndex,key,data) {
const arrStr = typeof e === 'string' ? e.slice(0, -1) : '';
const updateData = { [arrStr]: moment().format('YYYY/MM/DD HH:mm') };
this.$refs.stepTableRef?.updateDataSourceByRowIndex(rowIndex, updateData);
// console.log(this.getFilledFormData())
this.$refs.stepTableRef?.updateDataSourceByRowIndex(rowIndex, updateData,{signData:data,updateFields:[arrStr]});
},
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
@ -272,13 +266,6 @@ export default {
//
const stepTableFormData = bdnr.jlzTableData || []
if (stepTableFormData.length === 0) {
//
this.$set(this.formData, 'stepTableFormData', [])
this.$message.warning('前序表单中没有剂量组数据')
return
}
//
const itemData = stepTableFormData.map(item => ({
jlzb: item.jlzb || '', //
@ -290,37 +277,15 @@ export default {
zy: '', //
yx: '', //
tj: '', //
id:this.getuuid(),
}))
// 使 $set formData CustomTable
this.$set(this.formData, 'stepTableFormData', itemData)
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
this.$refs.stepTableRef.updateDataSource(itemData);
} catch (error) {
this.$set(this.formData, 'stepTableFormData', [])
console.error('解析前序表单数据失败:', error)
this.$message.error('解析前序表单数据失败')
}
}
},
//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)
}
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])

Loading…
Cancel
Save