Browse Source

feat:[customTable]radio传入

ouqian
ZHANGTENG\张腾 1 month ago
parent
commit
5b6bb5531b
10 changed files with 376 additions and 6 deletions
  1. +1
    -1
      src/components/Template/CustomTable.vue
  2. +3
    -0
      src/lang/en.js
  3. +16
    -0
      src/lang/en/template/bl.js
  4. +1
    -0
      src/lang/en/template/dj.js
  5. +3
    -0
      src/lang/zh.js
  6. +16
    -0
      src/lang/zh/template/bl.js
  7. +1
    -0
      src/lang/zh/template/dj.js
  8. +7
    -0
      src/views/business/comps/template/TemplateTable.vue
  9. +290
    -0
      src/views/business/comps/template/comps/bl/BL002.vue
  10. +38
    -5
      src/views/business/comps/template/comps/dj/DJ001.vue

+ 1
- 1
src/components/Template/CustomTable.vue View File

@ -90,7 +90,7 @@
{{ $t(col.label) }}
</div>
<template
v-if="col.bodyType === 'input' || col.bodyType === 'inputNumber' || col.bodyType === 'select' || col.bodyType === 'dateTimeRange'">
v-if="col.bodyType === 'input' || col.bodyType === 'inputNumber' || col.bodyType === 'select' || col.bodyType === 'dateTimeRange' || col.bodyType === 'radio'">
<div class="flex flex1">
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex"
:fieldItemLabel="fieldItemLabel" :type="col.bodyType"

+ 3
- 0
src/lang/en.js View File

@ -33,6 +33,8 @@ import dl from './en/template/dl'
import xb from './en/template/xb'
//动技模板
import dj from './en/template/dj'
//病理模板
import bl from './en/template/bl'
// 试验管理
import study from './en/business/study/study'
@ -211,5 +213,6 @@ export default {
dl: dl,
xb: xb,
dj: dj,
bl: bl
}
}

+ 16
- 0
src/lang/en/template/bl.js View File

@ -0,0 +1,16 @@
//病理
export default {
bl002: {
fhsj: '复核时间',
ybsm: '样本说明',
smybh: '扫描仪编号',
dwypbh: '动物/样品编号',
qprsbh: '切片/染色编号',
smryqrxx: '扫描人员确认信息',
ztblxjqrxx: '专题病理学家确认信息',
smybz: '扫描员备注',
ztblxjbz: '专题病理学家备注',
txmmzq: '图像命名准确',
txwzqx: '图像完整清晰'
},
}

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

@ -2,6 +2,7 @@
export default {
dj001: {
syts: '试验天数',
fhfw: '复核范围',
},
dj003: {
yplx: '样品类型',

+ 3
- 0
src/lang/zh.js View File

@ -33,6 +33,8 @@ import dl from './zh/template/dl'
import xb from './zh/template/xb'
//动技模板
import dj from './zh/template/dj'
//病理模板
import bl from './en/template/bl'
// 试验管理
import study from './zh/business/study/study'
@ -207,5 +209,6 @@ export default {
dl: dl,
xb: xb,
dj: dj,
bl: bl
}
}

+ 16
- 0
src/lang/zh/template/bl.js View File

@ -0,0 +1,16 @@
//病理
export default {
bl002: {
fhsj: '复核时间',
ybsm: '样本说明',
smybh: '扫描仪编号',
dwypbh: '动物/样品编号',
qprsbh: '切片/染色编号',
smryqrxx: '扫描人员确认信息',
ztblxjqrxx: '专题病理学家确认信息',
smybz: '扫描员备注',
ztblxjbz: '专题病理学家备注',
txmmzq: '图像命名准确',
txwzqx: '图像完整清晰'
},
}

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

@ -2,6 +2,7 @@
export default {
dj001: {
syts: '试验天数',
fhfw: '复核范围',
},
dj003: {
yplx: '样品类型',

+ 7
- 0
src/views/business/comps/template/TemplateTable.vue View File

@ -91,6 +91,9 @@ import XB001 from "./comps/xb/XB001.vue";
import DJ001 from "./comps/dj/DJ001.vue";
import DJ003 from "./comps/dj/DJ003.vue";
//
import BL002 from "./comps/bl/BL002.vue";
//
// DL001-SYWZPZJHB
// DL002-使SP001
@ -171,6 +174,8 @@ export default {
//
DJ001,
DJ003,
//
BL002
},
data() {
return {
@ -288,6 +293,8 @@ export default {
//
'DJ001': 'DJ001',
'DJ003': 'DJ003',
//
'BL002': 'BL002',
//
//DL001-SYWZPZJHB
'DL002': 'SP001',

+ 290
- 0
src/views/business/comps/template/comps/bl/BL002.vue View File

@ -0,0 +1,290 @@
<!-- 全切片扫描图像复核记录表 -->
<template>
<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.bl.bl002.ybsm" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel="template.bl.bl002.ybsm"
:ref="refConf.ybsm"
:formConfig="ybsmFormConfig"
:formData="formData"
/>
<CustomTable
fieldItemLabel="template.bl.bl002.ybsm"
:columns="dwybColumns"
:ref="'dwybTableRef'"
:showOperation="fillType === 'preFill'"
:showAddRow="fillType === 'preFill'"
:formData="formData"
:prefixKey="`dwybTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'dwybTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<BaseInfoFormPackage
fieldItemLabel="template.bl.bl002.smybz"
label="template.bl.bl002.smybz"
:ref="refConf.smyRemark"
:formConfig="smyRemarkConig"
:formData="formData"
/>
<BaseInfoFormPackage
fieldItemLabel="template.bl.bl002.ztblxjbz"
label="template.bl.bl002.ztblxjbz"
:ref="refConf.ztblxjRemark"
:formConfig="ztblxjRemarkConig"
: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',
ybsm: 'ybsmRef',
smyRemark: 'smyRemarkRef',
ztblxjRemark: 'ztblxjRemarkRef',
dwyb: 'dwybTableRef'
}
const refNames = Object.values(refConf)
export default {
name: 'BL002',
components: {
BaseInfoFormPackage,
LineLabel,
TableList,
Step,
CustomTable,
TableOpertaionDelete
},
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill'
}
},
computed: {
//
smyRemarkConig() {
return [
{
type: 'cellItem',
config: {
smyRemark: {
label: '',
type: 'textarea',
fillType: 'actFill',
span: 1,
placeholder: 'template.bl.bl002.smybz',
maxlength: 1000,
rows: 5
}
}
}
]
},
//
ztblxjRemarkConig() {
return [
{
type: 'cellItem',
config: {
ztblxjRemark: {
label: '',
type: 'textarea',
fillType: 'actFill',
span: 1,
placeholder: 'template.bl.bl002.ztblxjbz',
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: 'cardItem',
config: {
studyMc: {
label: 'template.common.testName',
type: 'input',
disabled: true
},
studySn: {
label: 'template.common.testNumber',
type: 'input',
disabled: true
}
}
},
{
type: 'cellItem',
label: 'template.bl.bl002.fhsj',
config: {
startDate: {
label: 'template.common.startTime',
type: 'input',
disabled: true
},
endDate: {
label: 'template.common.endTime',
type: 'input',
disabled: true
}
}
}
]
},
//
ybsmFormConfig() {
return [
{
type: 'step',
config: {
smybh: {
label: 'template.bl.bl002.smybh',
type: 'yq',
fillType: 'actFill',
},
}
}
]
},
//
dwybColumns() {
return [
{
label: 'template.bl.bl002.dwypbh',
prop: "dwypbh",
bodyType: 'input',
bodyFillType: 'preFill'
},
{
label: 'template.bl.bl002.qprsbh',
prop: "qprsbh",
bodyType: 'input',
bodyFillType: 'preFill'
},
{
label: 'template.bl.bl002.smryqrxx',
prop: "smryqrxx",
bodyType: "radio",
bodyFillType: "actFill",
bodyOptions: [
{value:'图像命名准确',label:'图像命名准确'},
{value:'图像命名不准确',label:'图像命名不准确'},
],
checkboxLabel: 'template.bl.bl002.txmmzq'
},
{
label: 'template.bl.bl002.ztblxjqrxx',
prop: "ztblxjqrxx",
bodyType: 'radio',
bodyFillType: 'actFill',
bodyOptions: [
{value:'图像完整清晰',label:'图像完整清晰'},
{value:'图像不完整清晰',label:'图像不完整清晰'},
],
// checkboxLabel: 'template.bl.bl002.txwzqx'
},
]
},
},
data() {
return {
formData: {},
refConf
}
},
methods: {
//
async deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)
},
//
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
},
//
async onSave() {
const formData = this.getStepResource()
console.log(formData, 'formData')
},
}
}
</script>
<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>

+ 38
- 5
src/views/business/comps/template/comps/dj/DJ001.vue View File

@ -12,8 +12,30 @@
<!-- 操作步骤 -->
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.operationSteps"
ref="operateRef" :formConfig="operateConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo"
ref="operateStepRef" :formConfig="operateConfig" :formData="formData" />
<CustomTable
:columns="operateColumns"
ref="operateTableRef"
:showOperation="fillType === 'preFill'"
:showAddRow="fillType === 'preFill'"
:formData="formData"
:isBorder="false"
:prefixKey="`operateTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'operateTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
@ -93,7 +115,7 @@ export default {
operateConfig() {
return [
{
type: "cellItem",
type: "step",
config: {
syts: {
label: 'template.dj.dj001.syts',
@ -104,7 +126,18 @@ export default {
},
]
}
},
operateColumns() {
return [
{
label: 'template.dj.dj001.fhfw',
prop: 'fhfw',
bodyType: 'select',
bodyOptions: this.getDictOptions('business_fhfw'),
bodyFillType: 'preFill'
},
]
},
},
data() {
return {
@ -149,7 +182,7 @@ export default {
},
//
deleteRow(rowIndex,type) {
const tableRef1 = this.$refs['tableFirstRef'];
const tableRef1 = this.$refs['operateTableRef'];
const tableRef2 = this.$refs['tableSecondRef'];
if (type == 'firstTable' && tableRef1) {
tableRef1.deleteRow(rowIndex);

Loading…
Cancel
Save