2 Commits

Author SHA1 Message Date
  ouqian c4628575f4 Merge branch 'master' into ouqian 1 month ago
  ouqian d660595881 fix:[模板管理][DL007~DL015流程校验] 1 month ago
9 changed files with 313 additions and 40 deletions
Unified View
  1. +5
    -2
      src/lang/zh/template/dl.js
  2. +8
    -1
      src/views/business/comps/template/comps/dl/DL009.vue
  3. +58
    -4
      src/views/business/comps/template/comps/dl/DL010.vue
  4. +49
    -3
      src/views/business/comps/template/comps/dl/DL011.vue
  5. +39
    -3
      src/views/business/comps/template/comps/dl/DL012.vue
  6. +33
    -5
      src/views/business/comps/template/comps/dl/DL013.vue
  7. +85
    -8
      src/views/business/comps/template/comps/dl/DL014.vue
  8. +35
    -14
      src/views/business/comps/template/comps/dl/DL015.vue
  9. +1
    -0
      src/views/business/comps/template/mixins/templateMixin.js

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

@ -197,7 +197,9 @@ export default {
zxg: '左下格(个)', zxg: '左下格(个)',
yxg: '右下格(个)', yxg: '右下格(个)',
cdxxTime: '第{index}次', cdxxTime: '第{index}次',
addCdxx: '新增'
addCdxx: '新增',
yqsyxxEmpty: '仪器使用信息不能为空,请添加后再提交',
cdxxEmpty: '测定信息不能为空,请添加后再提交'
}, },
dl014: { dl014: {
...common, ...common,
@ -224,7 +226,8 @@ export default {
sjgspjrl: '实际供试品加入量', sjgspjrl: '实际供试品加入量',
gyhzqk: '给药后状态情况', gyhzqk: '给药后状态情况',
qrButton: '确认', qrButton: '确认',
wcButton: '完成'
wcButton: '完成',
yqsyxxEmpty: '仪器使用信息不能为空,请添加后再提交'
}, },
dl015: { dl015: {
...common, ...common,

+ 8
- 1
src/views/business/comps/template/comps/dl/DL009.vue View File

@ -500,7 +500,14 @@ export default {
// //
async getFormData() { async getFormData() {
// //
return await this.validFields()
const validResult = await this.validFields()
// headerSelectFields
if (validResult) {
return this.getFilledFormData()
}
return validResult
}, },
// //
async validFields() { async validFields() {

+ 58
- 4
src/views/business/comps/template/comps/dl/DL010.vue View File

@ -19,7 +19,7 @@
<TableList <TableList
label="template.common.reagentInfo" label="template.common.reagentInfo"
:columns="sysjColumns" :columns="sysjColumns"
:dataSource="resource"
:dataSource="resourceSj"
/> />
<TableList <TableList
label="template.common.instrumentInfo" label="template.common.instrumentInfo"
@ -280,8 +280,7 @@ export default {
key: 'gs' key: 'gs'
}, },
{ type: 'span', label: 'template.dl.dl010.gusui' } { type: 'span', label: 'template.dl.dl010.gusui' }
],
span: 3
]
}, },
{ {
label: 'template.dl.dl010.lx', label: 'template.dl.dl010.lx',
@ -480,7 +479,62 @@ export default {
// 使 // 使
this.resourceTmp = sjxxStepResource.sjResource || [] this.resourceTmp = sjxxStepResource.sjResource || []
this.yqResourceTmp = sjxxStepResource.yqResource || [] this.yqResourceTmp = sjxxStepResource.yqResource || []
return this.resourceTmp
//
const sjxxTableData = this.$refs.sjxxTableRef?.getFilledFormData()
const sjxxList = sjxxTableData?.stepTableFormData || []
const headerSelectFields = sjxxTableData?.headerSelectFields || {}
// 0.9%
//
const sjxxResource = []
sjxxList.forEach((item) => {
// 0.9%
if (item.sjlhnzsjyjrl) {
sjxxResource.push({
mc: '0.9%氯化钠注射液', //
bh: null, //
ph: null, //
nd: null, //
nddw: null, //
ndz: null, //
ly: null, //
sxrq: null, //
kc: null, //
kcdw: null, //
type: 1, // 1使
syl: item.sjlhnzsjyjrl, // 使
syldw: headerSelectFields.sjlhnUnit || '', // 使
yxzq: null, //
yxzqdw: null //
})
}
//
if (item.sjjrxq) {
sjxxResource.push({
mc: '血清', //
bh: null, //
ph: null, //
nd: null, //
nddw: null, //
ndz: null, //
ly: null, //
sxrq: null, //
kc: null, //
kcdw: null, //
type: 1, // 1使
syl: item.sjjrxq, // 使
syldw: headerSelectFields.sjjrxqUnit || '', // 使
yxzq: null, //
yxzqdw: null //
})
}
})
//
return [...this.resourceTmp, ...sjxxResource]
}, },
onRegentSubmit(e) { onRegentSubmit(e) {
// //

+ 49
- 3
src/views/business/comps/template/comps/dl/DL011.vue View File

@ -19,7 +19,7 @@
<TableList <TableList
label="template.common.reagentInfo" label="template.common.reagentInfo"
:columns="sysjColumns" :columns="sysjColumns"
:dataSource="resource"
:dataSource="resourceSj"
/> />
<TableList <TableList
label="template.common.instrumentInfo" label="template.common.instrumentInfo"
@ -56,6 +56,7 @@
:ref="refConf.pyxx" :ref="refConf.pyxx"
:formConfig="pyxxConfig" :formConfig="pyxxConfig"
:formData="formData" :formData="formData"
@clickButton="handlePyxxClickButton"
/> />
</div> </div>
@ -80,6 +81,7 @@ import LineLabel from '@/components/Template/LineLabel'
import TableList from '@/components/Template/Table' import TableList from '@/components/Template/Table'
import Step from '@/components/Template/Step' import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin' import templateMixin from '../../mixins/templateMixin'
import moment from 'moment'
const refConf = { const refConf = {
base: 'baseInfoRef', base: 'baseInfoRef',
@ -270,6 +272,14 @@ export default {
} }
}, },
methods: { methods: {
//
handlePyxxClickButton(_item, signData) {
this.$refs.pyxxRef.updateFormData(
'pykssj',
moment().format('YYYY-MM-DD HH:mm:ss'),
{ isUpdateRecord: true, signData }
)
},
// //
deleteTableRow(rowIndex, refName) { deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex) this.$refs[refName].deleteRow(rowIndex)
@ -288,9 +298,45 @@ export default {
}, },
getResource() { getResource() {
const stepResource = this.$refs.stepRef.getStepResource() const stepResource = this.$refs.stepRef.getStepResource()
// 使
// 使
this.resourceTmp = stepResource.sjResource || [] this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
this.yqResourceTmp = [...(stepResource.yqResource || [])]
//
const xbxxData = this.$refs.xbxxRef?.getFilledFormData() || {}
//
if (xbxxData.xbdcbh) {
const xbInfo = xbxxData.selectInfo_xbdcbh || {}
// type StepFormPackage xb
this.xbxjTmp = [{
value: xbxxData.xbdcbh,
bh: xbInfo.bh || xbxxData.xbdcbh,
mc: xbInfo.mc || '',
xh: xbInfo.xh || '',
jzrq: xbInfo.jzrq || ''
}]
} else {
this.xbxjTmp = []
}
//
const pyxxData = this.$refs.pyxxRef?.getFilledFormData() || {}
//
if (pyxxData.pyxbh) {
const pyxInfo = pyxxData.selectInfo_pyxbh || {}
// type StepFormPackage yq
this.yqResourceTmp.push({
type: 'yq',
value: pyxxData.pyxbh,
bh: pyxInfo.bh || pyxxData.pyxbh,
mc: pyxInfo.mc || '',
xh: pyxInfo.xh || '',
jzrq: pyxInfo.jzrq || ''
})
}
return this.resourceTmp return this.resourceTmp
}, },
onRegentSubmit(e) { onRegentSubmit(e) {

+ 39
- 3
src/views/business/comps/template/comps/dl/DL012.vue View File

@ -19,7 +19,7 @@
<TableList <TableList
label="template.common.reagentInfo" label="template.common.reagentInfo"
:columns="sysjColumns" :columns="sysjColumns"
:dataSource="resource"
:dataSource="resourceSj"
/> />
<TableList <TableList
label="template.common.instrumentInfo" label="template.common.instrumentInfo"
@ -336,9 +336,45 @@ export default {
}, },
getResource() { getResource() {
const stepResource = this.$refs.stepRef.getStepResource() const stepResource = this.$refs.stepRef.getStepResource()
// 使
// 使
this.resourceTmp = stepResource.sjResource || [] this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
this.yqResourceTmp = [...(stepResource.yqResource || [])]
//
const xbxxData = this.$refs.xbxxRef?.getFilledFormData() || {}
//
if (xbxxData.xbzbqbh) {
const xbInfo = xbxxData.selectInfo_xbzbqbh || {}
// type
this.xbxjTmp = [{
value: xbxxData.xbzbqbh,
bh: xbInfo.bh || xbxxData.xbzbqbh,
mc: xbInfo.mc || '',
xh: xbInfo.xh || '',
jzrq: xbInfo.jzrq || ''
}]
} else {
this.xbxjTmp = []
}
//
const pyxxData = this.$refs.pyxxRef?.getFilledFormData() || {}
//
if (pyxxData.pyxbh) {
const pyxInfo = pyxxData.selectInfo_pyxbh || {}
// type
this.yqResourceTmp.push({
type: 'yq',
value: pyxxData.pyxbh,
bh: pyxInfo.bh || pyxxData.pyxbh,
mc: pyxInfo.mc || '',
xh: pyxInfo.xh || '',
jzrq: pyxInfo.jzrq || ''
})
}
return this.resourceTmp return this.resourceTmp
}, },
onRegentSubmit(e) { onRegentSubmit(e) {

+ 33
- 5
src/views/business/comps/template/comps/dl/DL013.vue View File

@ -522,7 +522,22 @@ export default {
}, },
// //
async getFormData() { async getFormData() {
//
// 1. 使
const yqsyTableRef = this.$refs[refConf.yqsy]
const yqsyTableData = yqsyTableRef?.getDataSource() || []
if (yqsyTableData.length === 0) {
this.$message.warning(this.$t('template.dl.dl013.yqsyxxEmpty'))
return Promise.reject(this.$t('template.dl.dl013.yqsyxxEmpty'))
}
// 2.
if (!this.formData.cdxxConfigs || this.formData.cdxxConfigs.length === 0) {
this.$message.warning(this.$t('template.dl.dl013.cdxxEmpty'))
return Promise.reject(this.$t('template.dl.dl013.cdxxEmpty'))
}
// 3.
let refsToValidate = [ let refsToValidate = [
refConf.base, refConf.base,
refConf.yqsy, refConf.yqsy,
@ -566,10 +581,23 @@ export default {
return await this.validFormFields(refsToValidate) return await this.validFormFields(refsToValidate)
}, },
getResource() { getResource() {
const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
// 使
const yqsyData = this.$refs.yqsyTableRef?.getFilledFormData()
const yqsyList = yqsyData?.stepTableFormData || []
// 使
this.yqResourceTmp = yqsyList
.filter((item) => item.yqbh)
.map((item) => ({
type: 'yq',
value: item.yqbh,
bh: item.yqbh,
mc: item.yqmc,
xh: item.yqxh,
jzrq: item.xccsjzjdrq
}))
this.resourceTmp = []
return this.resourceTmp return this.resourceTmp
}, },
onRegentSubmit(e) { onRegentSubmit(e) {

+ 85
- 8
src/views/business/comps/template/comps/dl/DL014.vue View File

@ -580,6 +580,16 @@ export default {
}, },
// //
async getFormData() { async getFormData() {
// 1. 使
const yqsyTableRef = this.$refs[refConf.yqsy]
const yqsyTableData = yqsyTableRef?.getDataSource() || []
if (yqsyTableData.length === 0) {
this.$message.warning(this.$t('template.dl.dl014.yqsyxxEmpty'))
return Promise.reject(this.$t('template.dl.dl014.yqsyxxEmpty'))
}
// 2.
const refsToValidate = [ const refsToValidate = [
refConf.base, refConf.base,
refConf.yqsy, refConf.yqsy,
@ -661,27 +671,94 @@ export default {
this.yqResourceTmp = yqsyList this.yqResourceTmp = yqsyList
.filter((item) => item.yqbh) .filter((item) => item.yqbh)
.map((item) => ({ .map((item) => ({
type: 'yq',
bh: item.yqbh, bh: item.yqbh,
mc: item.yqmc, mc: item.yqmc,
xh: item.yqxh
xh: item.yqxh,
jzrq: item.jzrq
})) }))
// S9
// S9
const jlzInfoData = this.$refs.jlzInfoRef?.getFilledFormData()
const resourceList = []
// S9S9
if (this.isSftjs9Yes && jlzInfoData?.s9hhybh) {
resourceList.push({
mc: 'S9混合液',
bh: jlzInfoData.s9hhybh,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: 1,
syl: null,
syldw: null,
yxzq: null,
yxzqdw: null
})
}
//
const jlzData = this.$refs.jlzTableRef?.getFilledFormData() const jlzData = this.$refs.jlzTableRef?.getFilledFormData()
const jlzList = jlzData?.stepTableFormData || [] const jlzList = jlzData?.stepTableFormData || []
const jlzHeaderSelectFields = jlzData?.headerSelectFields || {}
// Set
const xybhSet = new Set()
const gspbhSet = new Set()
const sjResourceFromJlz = []
jlzList.forEach((item) => { jlzList.forEach((item) => {
//
if (item.xybh) {
sjResourceFromJlz.push({
//
if (item.xybh && !xybhSet.has(item.xybh)) {
xybhSet.add(item.xybh)
resourceList.push({
mc: '细胞悬液',
bh: item.xybh, bh: item.xybh,
type: 'cell'
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: 1,
syl: item.sjplyjrl || null,
syldw: jlzHeaderSelectFields.ysplyjrlUnit || null,
yxzq: null,
yxzqdw: null
})
}
//
if (item.gspbh && !gspbhSet.has(item.gspbh)) {
gspbhSet.add(item.gspbh)
resourceList.push({
mc: '供试品',
bh: item.gspbh,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: 1,
syl: item.sjgspjrl || null,
syldw: jlzHeaderSelectFields.ysgspjrlUnit || null,
yxzq: null,
yxzqdw: null
}) })
} }
}) })
this.resourceTmp = sjResourceFromJlz
this.resourceTmp = resourceList
return this.resourceTmp return this.resourceTmp
}, },

+ 35
- 14
src/views/business/comps/template/comps/dl/DL015.vue View File

@ -16,7 +16,7 @@
:formData="formData" :formData="formData"
/> />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.dl.dl015.xbxx" /> <LineLabel label="template.dl.dl015.xbxx" />
@ -103,8 +103,8 @@ export default {
// //
hyqkFormData() { hyqkFormData() {
return { return {
stepTableFormData: this.formData.hyqkTableData || [],
headerSelectFields: {}
stepTableFormData: this.formData.stepTableFormData || [],
headerSelectFields: this.formData.headerSelectFields || {}
} }
}, },
// //
@ -291,10 +291,11 @@ export default {
getFilledFormData() { getFilledFormData() {
const baseData = this.getFilledFormDataByRefs(refNames) const baseData = this.getFilledFormDataByRefs(refNames)
//
// stepTableFormData
const hyqkData = this.$refs[refConf.hyqk]?.getFilledFormData() const hyqkData = this.$refs[refConf.hyqk]?.getFilledFormData()
if (hyqkData) { if (hyqkData) {
baseData.hyqkTableData = hyqkData.stepTableFormData || []
baseData.stepTableFormData = hyqkData.stepTableFormData || []
baseData.headerSelectFields = hyqkData.headerSelectFields || {}
} }
return baseData return baseData
@ -317,12 +318,32 @@ export default {
this.yqResourceTmp = stepResource.yqResource || [] this.yqResourceTmp = stepResource.yqResource || []
// //
const sjResourceFromHyqk = hyqkList
.filter(item => item.xybh)
.map(item => ({
bh: item.xybh,
type: 'cell'
}))
// Set
const xybhSet = new Set()
const sjResourceFromHyqk = []
hyqkList.forEach((item) => {
if (item.xybh && !xybhSet.has(item.xybh)) {
xybhSet.add(item.xybh)
sjResourceFromHyqk.push({
mc: '细胞悬液',
bh: item.xybh,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: 1,
syl: item.pyybrl || null,
syldw: item.pyybrl ? 'mL' : null,
yxzq: null,
yxzqdw: null
})
}
})
this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk] this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk]
@ -343,7 +364,7 @@ export default {
if (jlzTableData.length === 0) { if (jlzTableData.length === 0) {
// //
this.$set(this.formData, 'hyqkTableData', [])
this.$set(this.formData, 'stepTableFormData', [])
this.$message.warning('前序表单中没有剂量组数据') this.$message.warning('前序表单中没有剂量组数据')
return return
} }
@ -361,13 +382,13 @@ export default {
})) }))
// 使 $set formData CustomTable // 使 $set formData CustomTable
this.$set(this.formData, 'hyqkTableData', hyqkData)
this.$set(this.formData, 'stepTableFormData', hyqkData)
this.$message.success(`已从前序表单加载 ${hyqkData.length} 条剂量组数据`) this.$message.success(`已从前序表单加载 ${hyqkData.length} 条剂量组数据`)
} catch (error) { } catch (error) {
console.error('解析前序表单数据失败:', error) console.error('解析前序表单数据失败:', error)
// //
this.$set(this.formData, 'hyqkTableData', [])
this.$set(this.formData, 'stepTableFormData', [])
this.$message.error('解析前序表单数据失败') this.$message.error('解析前序表单数据失败')
} }
} }

+ 1
- 0
src/views/business/comps/template/mixins/templateMixin.js View File

@ -58,6 +58,7 @@ export default {
'business_dwzs', // 动物种属 'business_dwzs', // 动物种属
'business_cjdd', // 采集地点 'business_cjdd', // 采集地点
'business_zpdd', // 制片地点 'business_zpdd', // 制片地点
'business_cjbw', // 制片部位
], ],
props: { props: {
templateData: { templateData: {

Loading…
Cancel
Save