diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue index c709472..cdd1730 100644 --- a/src/components/Template/HandleFormItem.vue +++ b/src/components/Template/HandleFormItem.vue @@ -650,8 +650,8 @@ export default { mix: "1",//试剂/供试品/试剂 gyzj: "3",//给药制剂 mjy: "5",//麻精药 - xj: "9",//细菌 - xb: "11",//细胞 + xb: "9",//细胞 + xj: "11",//细菌 jcb: "13",//检测板 qxbd: "15",//前序表单 } diff --git a/src/components/Template/StepFormPackage.vue b/src/components/Template/StepFormPackage.vue index 321006d..24e2a23 100644 --- a/src/components/Template/StepFormPackage.vue +++ b/src/components/Template/StepFormPackage.vue @@ -235,6 +235,61 @@ export default { getSjResource(){ const {allFieldsConfig,formFields} = this; const sjResource = [],yqResource = []; + if(formFields && formFields.fzInfo){ + let fzInfo = formFields.fzInfo + let myInfo = fzInfo.myInfo || {}; + let fzList = fzInfo.fzList || []; + + let myCount = 0 + //分装生成的 + if(fzList.length>0){ + for(let j=0;j { - if(effectivePeriod === "NA" || effectivePeriodUnit === "NA"){ - return "NA"; + if (effectivePeriod === 'NA' || effectivePeriodUnit === 'NA') { + return 'NA' } const start = moment(startDate) const unit = effectivePeriodUnit === '天' ? 'days' : 'hours' @@ -436,7 +436,12 @@ export function getuuid() { // 判断值是否为空 export function isValueEmpty(value) { - if (value === null || value === undefined || value === '' || value === false) { + if ( + value === null || + value === undefined || + value === '' || + value === false + ) { return true } if (typeof value === 'string' && value.trim() === '') { @@ -446,7 +451,7 @@ export function isValueEmpty(value) { return true } if (Object.keys(value).length === 0 && typeof value == 'object') { - return true; + return true } return false } @@ -591,31 +596,31 @@ export function getStringWidth(str) { //根据选项获取默认值,为了 export const getDefaultValueByOptions = (options = []) => { - const arr = []; - options.forEach(item => { - const { children = [], label } = item; + const arr = [] + options.forEach((item) => { + const { children = [], label } = item //目前只考虑2层,也不考虑label值重复的问题; if (children.length > 0) { - children.forEach(child => { + children.forEach((child) => { arr.push({ label: child.label, checked: undefined }) }) } else { arr.push({ label, checked: undefined }) } }) - return arr; + return arr } // 只是更新已填写的表单数据,不触发其他事件 export const justUpdateFilledFormData = () => { const params = { - type: "fieldChanged", + type: 'fieldChanged', newRecord: null, - resourceList: null, + resourceList: null } - EventBus.$emit('onModifyRecord', params,) + EventBus.$emit('onModifyRecord', params) } -export const formatNumberByDigits =(num, digits = 3)=> { - return num.toString().padStart(digits, '0'); -} \ No newline at end of file +export const formatNumberByDigits = (num, digits = 3) => { + return num.toString().padStart(digits, '0') +} diff --git a/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue b/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue index 2646ca9..b3461ac 100644 --- a/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue +++ b/src/views/business/comps/template/dialog/SelectMixReagentDialog.vue @@ -37,6 +37,12 @@ const typeMap = { listApi: public_sjList, title:"选择试剂" }, + "3": { + searchForm: getGyzjSearchForm(), + columns: getGyzjColumns(), + listApi: public_gyzjList, + title:"选择给药制剂" + }, '7': { searchForm: getGspSearchForm(), columns: getGspColumns(), @@ -44,22 +50,16 @@ const typeMap = { title:"选择供试品" }, "9": { - searchForm: getXjSearchForm(), - columns: getXjColumns(), - listApi: public_xjList, - title:"选择细菌" - }, - "11": { searchForm: getXbSearchForm(), columns: getXbColumns(), listApi: public_xbList, title:"选择细胞" }, - "3": { - searchForm: getGyzjSearchForm(), - columns: getGyzjColumns(), - listApi: public_gyzjList, - title:"选择给药制剂" + "11": { + searchForm: getXjSearchForm(), + columns: getXjColumns(), + listApi: public_xjList, + title:"选择细菌" }, "13": { searchForm: getJcbSearchForm(),