|
|
@ -11,21 +11,29 @@ |
|
|
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> |
|
|
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> |
|
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl021.gcqk" /> |
|
|
<LineLabel label="template.dl.dl021.gcqk" /> |
|
|
<CustomTable |
|
|
|
|
|
:ref="`tableRef`" |
|
|
|
|
|
:columns="tableColumns" |
|
|
|
|
|
:formData="formData" |
|
|
|
|
|
operationWidth = "80px" |
|
|
|
|
|
:prefixKey = "`table`" |
|
|
|
|
|
fieldItemLabel = "template.dl.dl021.gcqk" |
|
|
|
|
|
@clickButton="handleClickButton" |
|
|
|
|
|
@onCheckboxTagChange="onCheckboxTagChange" |
|
|
|
|
|
:showOperation="fillType === 'preFill'" |
|
|
|
|
|
> |
|
|
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete> |
|
|
|
|
|
</template> |
|
|
|
|
|
</CustomTable> |
|
|
|
|
|
|
|
|
<!-- 观察情况 --> |
|
|
|
|
|
<div class="template-form-item"> |
|
|
|
|
|
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps" |
|
|
|
|
|
@onRegentSubmit="onRegentSubmit" |
|
|
|
|
|
:formConfig="stepFormConfig" @blur="onHandleBlur" |
|
|
|
|
|
:formData="formData" /> |
|
|
|
|
|
<CustomTable |
|
|
|
|
|
:ref="`tableRef`" |
|
|
|
|
|
:columns="tableColumns" |
|
|
|
|
|
:formData="formData" |
|
|
|
|
|
operationWidth = "80px" |
|
|
|
|
|
:prefixKey = "`table`" |
|
|
|
|
|
fieldItemLabel = "template.dl.dl021.gcqk" |
|
|
|
|
|
:showAddRow="fillType === 'preFill'" |
|
|
|
|
|
:showOperation="fillType === 'preFill'" |
|
|
|
|
|
> |
|
|
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete> |
|
|
|
|
|
</template> |
|
|
|
|
|
</CustomTable> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" |
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" |
|
|
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> |
|
|
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> |
|
|
@ -50,6 +58,9 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "DL021", |
|
|
name: "DL021", |
|
|
|
|
|
dicts: [ |
|
|
|
|
|
'business_dl_xbmc' |
|
|
|
|
|
], |
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete }, |
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete }, |
|
|
mixins: [templateMixin], |
|
|
mixins: [templateMixin], |
|
|
props: { |
|
|
props: { |
|
|
@ -112,33 +123,57 @@ export default { |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
// 样本信息 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 观察情况 |
|
|
tableColumns() { |
|
|
tableColumns() { |
|
|
return [{ |
|
|
return [{ |
|
|
label: 'template.dl.dl021.bpbh', |
|
|
label: 'template.dl.dl021.bpbh', |
|
|
prop: 'cyd', |
|
|
|
|
|
|
|
|
prop: 'bpbh', |
|
|
bodyType: 'input', |
|
|
bodyType: 'input', |
|
|
bodyFillType: 'actFill', |
|
|
bodyFillType: 'actFill', |
|
|
width: 100, |
|
|
width: 100, |
|
|
bodyMaxlength: 50, |
|
|
bodyMaxlength: 50, |
|
|
},{ |
|
|
},{ |
|
|
label: 'template.dl.dl021.gcxps', |
|
|
label: 'template.dl.dl021.gcxps', |
|
|
prop: 'cyd', |
|
|
|
|
|
|
|
|
prop: 'gcxps', |
|
|
bodyType: 'input', |
|
|
bodyType: 'input', |
|
|
bodyFillType: 'actFill', |
|
|
bodyFillType: 'actFill', |
|
|
width: 100, |
|
|
width: 100, |
|
|
bodyMaxlength: 10, |
|
|
|
|
|
|
|
|
bodyMaxlength: 50, |
|
|
},{ |
|
|
},{ |
|
|
label: 'template.dl.dl021.zqxxbs', |
|
|
label: 'template.dl.dl021.zqxxbs', |
|
|
label: 'template.dl.dl021.gcxps', |
|
|
|
|
|
prop: 'cyd', |
|
|
|
|
|
|
|
|
prop: 'zqxxbs', |
|
|
bodyType: 'input', |
|
|
bodyType: 'input', |
|
|
bodyFillType: 'actFill', |
|
|
bodyFillType: 'actFill', |
|
|
width: 80, |
|
|
width: 80, |
|
|
bodyMaxlength: 10, |
|
|
|
|
|
|
|
|
bodyMaxlength: 50, |
|
|
}] |
|
|
}] |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 观察情况 |
|
|
|
|
|
stepFormConfig() { |
|
|
|
|
|
return [ |
|
|
|
|
|
{ |
|
|
|
|
|
type: "step", |
|
|
|
|
|
config: { |
|
|
|
|
|
xbmc: { |
|
|
|
|
|
label: 'template.dl.dl021.xbmc', |
|
|
|
|
|
type: 'select', |
|
|
|
|
|
fillType: 'actFill', |
|
|
|
|
|
options: this.getDictOptions('business_dl_xbmc'), |
|
|
|
|
|
otherCode: 'xbmcOther', |
|
|
|
|
|
showOtherLabel:false |
|
|
|
|
|
}, |
|
|
|
|
|
xwj: { |
|
|
|
|
|
// span:1, |
|
|
|
|
|
label: 'template.dl.dl021.xwj', |
|
|
|
|
|
type: 'qxbd', |
|
|
|
|
|
fillType: 'actFill', |
|
|
|
|
|
filledCodes:['bdmc','bdbh'], |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
@ -148,6 +183,23 @@ export default { |
|
|
mounted() { |
|
|
mounted() { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
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){ |
|
|
|
|
|
this.onHandleBlur(fields) |
|
|
|
|
|
}, |
|
|
//选择table header下拉框也要更新体积 |
|
|
//选择table header下拉框也要更新体积 |
|
|
onHeaderSelectChange(data){ |
|
|
onHeaderSelectChange(data){ |
|
|
const {key, headerSelectFields,dataSource=[]} = data; |
|
|
const {key, headerSelectFields,dataSource=[]} = data; |
|
|
@ -214,32 +266,32 @@ export default { |
|
|
}, |
|
|
}, |
|
|
//获取已填写的表单数据 |
|
|
//获取已填写的表单数据 |
|
|
getFilledFormData() { |
|
|
getFilledFormData() { |
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]) |
|
|
|
|
|
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef","remarkRef","tableRef"]) |
|
|
}, |
|
|
}, |
|
|
//获取填写完成的表单数据 |
|
|
//获取填写完成的表单数据 |
|
|
async getFormData() { |
|
|
async getFormData() { |
|
|
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]); |
|
|
|
|
|
|
|
|
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef","remarkRef","tableRef"]); |
|
|
return content; |
|
|
return content; |
|
|
}, |
|
|
}, |
|
|
getResource() { |
|
|
getResource() { |
|
|
//使用的试剂、仪器 |
|
|
//使用的试剂、仪器 |
|
|
const stepResource = this.$refs.stepRef.getStepResource() |
|
|
|
|
|
this.resourceTmp = stepResource.sjResource || [] |
|
|
|
|
|
this.yqResourceTmp = stepResource.yqResource || [] |
|
|
|
|
|
|
|
|
// stepRef不存在,直接返回空数组 |
|
|
|
|
|
this.resourceTmp = [] |
|
|
|
|
|
this.yqResourceTmp = [] |
|
|
return this.resourceTmp; |
|
|
return this.resourceTmp; |
|
|
}, |
|
|
}, |
|
|
//保存 |
|
|
//保存 |
|
|
async onSave() { |
|
|
async onSave() { |
|
|
let content = await this.$refs.stepRef.getFormData(); |
|
|
|
|
|
console.log(content); |
|
|
|
|
|
|
|
|
// stepRef不存在,直接返回空对象 |
|
|
|
|
|
console.log({}); |
|
|
}, |
|
|
}, |
|
|
// 删除表格行 |
|
|
// 删除表格行 |
|
|
// deleteRow(rowIndex) { |
|
|
|
|
|
// const tableRef = this.$refs['tableRef']; |
|
|
|
|
|
// if (tableRef) { |
|
|
|
|
|
// tableRef.deleteRow(rowIndex); |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
deleteRow(rowIndex) { |
|
|
|
|
|
const tableRef = this.$refs['tableRef']; |
|
|
|
|
|
if (tableRef) { |
|
|
|
|
|
tableRef.deleteRow(rowIndex); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|