Browse Source

Merge branch 'master' into zhangteng

ouqian
ZHANGTENG\张腾 1 month ago
parent
commit
495913fbed
105 changed files with 3037 additions and 719 deletions
  1. +27
    -2
      src/components/Template/BaseInfoFormPackage.vue
  2. +144
    -23
      src/components/Template/CustomTable.vue
  3. +211
    -102
      src/components/Template/DecimalInput.vue
  4. +14
    -15
      src/components/Template/HandleFormItem.vue
  5. +47
    -27
      src/components/Template/Step.vue
  6. +1
    -1
      src/components/Template/StepComponents/b/cl.vue
  7. +1
    -1
      src/components/Template/StepComponents/b/jrry_b.vue
  8. +1
    -1
      src/components/Template/StepComponents/ry/bdtj.vue
  9. +1
    -1
      src/components/Template/StepComponents/ry/bdzl.vue
  10. +1
    -1
      src/components/Template/StepComponents/ry/clcz.vue
  11. +1
    -1
      src/components/Template/StepComponents/ry/clfcz.vue
  12. +1
    -1
      src/components/Template/StepComponents/ry/cs.vue
  13. +1
    -1
      src/components/Template/StepComponents/ry/czdd.vue
  14. +1
    -1
      src/components/Template/StepComponents/ry/czhj.vue
  15. +1
    -1
      src/components/Template/StepComponents/ry/dc.vue
  16. +1
    -1
      src/components/Template/StepComponents/ry/ddhy.vue
  17. +1
    -1
      src/components/Template/StepComponents/ry/fb.vue
  18. +1
    -1
      src/components/Template/StepComponents/ry/fr.vue
  19. +1
    -1
      src/components/Template/StepComponents/ry/frdrq.vue
  20. +1
    -1
      src/components/Template/StepComponents/ry/fs.vue
  21. +1
    -1
      src/components/Template/StepComponents/ry/fy.vue
  22. +1
    -1
      src/components/Template/StepComponents/ry/glsd.vue
  23. +1
    -1
      src/components/Template/StepComponents/ry/glzd.vue
  24. +1
    -1
      src/components/Template/StepComponents/ry/hb.vue
  25. +1
    -1
      src/components/Template/StepComponents/ry/hwhy.vue
  26. +1
    -1
      src/components/Template/StepComponents/ry/jb.vue
  27. +1
    -1
      src/components/Template/StepComponents/ry/jd.vue
  28. +1
    -1
      src/components/Template/StepComponents/ry/jr.vue
  29. +1
    -1
      src/components/Template/StepComponents/ry/jrjb.vue
  30. +1
    -1
      src/components/Template/StepComponents/ry/jrry.vue
  31. +1
    -1
      src/components/Template/StepComponents/ry/js.vue
  32. +1
    -1
      src/components/Template/StepComponents/ry/jz.vue
  33. +1
    -1
      src/components/Template/StepComponents/ry/kb.vue
  34. +1
    -1
      src/components/Template/StepComponents/ry/kbsjgsp.vue
  35. +1
    -1
      src/components/Template/StepComponents/ry/kbyq.vue
  36. +1
    -1
      src/components/Template/StepComponents/ry/lx.vue
  37. +1
    -1
      src/components/Template/StepComponents/ry/mj.vue
  38. +1
    -1
      src/components/Template/StepComponents/ry/qcyy.vue
  39. +1
    -1
      src/components/Template/StepComponents/ry/qywz.vue
  40. +1
    -1
      src/components/Template/StepComponents/ry/rs.vue
  41. +1
    -1
      src/components/Template/StepComponents/ry/sy.vue
  42. +1
    -1
      src/components/Template/StepComponents/ry/tjphcz.vue
  43. +1
    -1
      src/components/Template/StepComponents/ry/tjphfcz.vue
  44. +1
    -1
      src/components/Template/StepComponents/ry/tpjydd.vue
  45. +1
    -1
      src/components/Template/StepComponents/ry/tpjysd.vue
  46. +1
    -1
      src/components/Template/StepComponents/ry/wxhy.vue
  47. +1
    -1
      src/components/Template/StepComponents/ry/xzrq.vue
  48. +1
    -1
      src/components/Template/StepComponents/ry/ym.vue
  49. +1
    -1
      src/components/Template/StepComponents/ry/zlfz.vue
  50. +1
    -1
      src/components/Template/StepComponents/ry/zy.vue
  51. +1
    -1
      src/components/Template/StepComponents/ry/zyhy.vue
  52. +1
    -1
      src/components/Template/StepComponents/spyjzzb/jszz.vue
  53. +1
    -1
      src/components/Template/StepComponents/swypfx/hhspe.vue
  54. +1
    -1
      src/components/Template/StepComponents/swypfx/jryp.vue
  55. +1
    -1
      src/components/Template/StepComponents/swypfx/zyfc.vue
  56. +7
    -8
      src/components/Template/StepFormPackage.vue
  57. +34
    -3
      src/components/Template/mixins/formPackageMixins.js
  58. +4
    -0
      src/components/Template/mixins/stepMixins.js
  59. +82
    -5
      src/lang/en/template/dl.js
  60. +3
    -1
      src/lang/en/template/pcr.js
  61. +82
    -5
      src/lang/zh/template/dl.js
  62. +4
    -2
      src/lang/zh/template/pcr.js
  63. +12
    -1
      src/utils/index.js
  64. +6
    -1
      src/views/business/comps/template/TemplateTable.vue
  65. +57
    -2
      src/views/business/comps/template/comps/dl/DL006.vue
  66. +24
    -5
      src/views/business/comps/template/comps/dl/DL007.vue
  67. +1
    -0
      src/views/business/comps/template/comps/dl/DL008.vue
  68. +3
    -4
      src/views/business/comps/template/comps/dl/DL009.vue
  69. +7
    -1
      src/views/business/comps/template/comps/dl/DL010.vue
  70. +108
    -5
      src/views/business/comps/template/comps/dl/DL011.vue
  71. +163
    -7
      src/views/business/comps/template/comps/dl/DL012.vue
  72. +363
    -11
      src/views/business/comps/template/comps/dl/DL013.vue
  73. +560
    -149
      src/views/business/comps/template/comps/dl/DL014.vue
  74. +168
    -132
      src/views/business/comps/template/comps/dl/DL015.vue
  75. +50
    -13
      src/views/business/comps/template/comps/dl/DL016.vue
  76. +11
    -9
      src/views/business/comps/template/comps/dl/DL017.vue
  77. +28
    -15
      src/views/business/comps/template/comps/dl/DL018.vue
  78. +17
    -5
      src/views/business/comps/template/comps/dl/DL019.vue
  79. +64
    -59
      src/views/business/comps/template/comps/dl/DL024.vue
  80. +1
    -1
      src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue
  81. +1
    -1
      src/views/business/comps/template/comps/gsp/GSP001.vue
  82. +1
    -2
      src/views/business/comps/template/comps/gsp/GSP002.vue
  83. +1
    -1
      src/views/business/comps/template/comps/gsp/GSP003.vue
  84. +1
    -1
      src/views/business/comps/template/comps/gsp/GSP004.vue
  85. +159
    -19
      src/views/business/comps/template/comps/gsp/GSP005.vue
  86. +1
    -1
      src/views/business/comps/template/comps/gsp/GSP010.vue
  87. +1
    -1
      src/views/business/comps/template/comps/lba/LBA002.vue
  88. +1
    -1
      src/views/business/comps/template/comps/lba/LBA003.vue
  89. +1
    -1
      src/views/business/comps/template/comps/lba/LBA004.vue
  90. +1
    -1
      src/views/business/comps/template/comps/lba/LBA006.vue
  91. +10
    -6
      src/views/business/comps/template/comps/pcr/PCR008.vue
  92. +346
    -0
      src/views/business/comps/template/comps/pcr/PCR011.vue
  93. +1
    -1
      src/views/business/comps/template/comps/sp/SP001.vue
  94. +1
    -1
      src/views/business/comps/template/comps/sp/SP003.vue
  95. +1
    -1
      src/views/business/comps/template/comps/sp/SP008.vue
  96. +1
    -1
      src/views/business/comps/template/comps/sp/SP009.vue
  97. +17
    -4
      src/views/business/comps/template/dialog/SelectMixReagentDialog.vue
  98. +102
    -1
      src/views/business/comps/template/formConfig/PCRTableConfig.js
  99. +1
    -1
      src/views/business/comps/template/formConfig/paralleAndLadderConfig.js
  100. +1
    -1
      src/views/business/comps/template/formConfig/sp/SP0019.js

+ 27
- 2
src/components/Template/BaseInfoFormPackage.vue View File

@ -290,7 +290,24 @@
@update:error="errors[key] = false" :item="getRegentItem(sItem)"
:value="formFields[key]" />
<span v-if="sItem.subType === 'text'" class="sub-text">{{ $t(sItem.subText) }}</span>
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.subKey" class="ml-10"
v-else-if="sItem.subType === 'input' || sItem.subType === 'inputNumber' || sItem.subType === 'select'" :type="sItem.subType" :item="getSubItem(sItem)"
v-model="formFields[sItem.subKey]" @copy="onCopy(sItem, key)"
:error="errors[sItem.subKey]" @blur="onBlur(sItem.subKey, $event)"
@update:error="errors[sItem.subKey] = false"
:orange-bg="orangeBgFields[sItem.subKey]" />
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.thirdKey" class="ml-10"
v-if="sItem.thirdType === 'select' || sItem.thirdType === 'input'" :type="sItem.thirdType" :item="getThirdItem(sItem)"
v-model="formFields[sItem.thirdKey]" @copy="onCopy(sItem, key)"
:error="errors[sItem.thirdKey]" @blur="onBlur(sItem.thirdKey, $event)"
@update:error="errors[sItem.thirdKey] = false"
:orange-bg="orangeBgFields[sItem.thirdKey]" />
<HandleFormItem class="ml-10" v-if="sItem.fourthType === 'button'" type="button"
:item="getFourthButtonItem(sItem)" :value="formFields[sItem.fourthKey]"
@clickButton="(e, val, data) => handleClickButton(e, sItem, val, data)" />
</div>
</div>
</div>
@ -394,7 +411,15 @@ export default {
return {
...sItem,
key: sItem.subKey,
fillType: sItem.subFillType || sItem.fillType
fillType: sItem.fourthFillType || sItem.fillType
}
},
getFourthButtonItem(sItem) {
return {
...sItem,
key: sItem.fourthKey,
buttonName:sItem.fourthButtonName,
fillType: sItem.fourthFillType || sItem.fillType
}
},
// fqyq

+ 144
- 23
src/components/Template/CustomTable.vue View File

@ -12,9 +12,41 @@
@change="handleCheckAllChange"></el-checkbox>
</div>
</div>
<div v-for="(col, index) in columns" :key="index" class="custom-table-cell header-cell"
<div v-for="(col, colIndex) in columns" :key="colIndex" class="custom-table-cell header-cell"
:style="getCellWidth(col)">
<div class="header-cell-content">
<div class="header-cell-content" v-if="col.headerColumns && col.headerColumns.length > 0">
<div class="header-columns-grid"
:style="{ 'grid-template-columns': `repeat(${col.span || 2}, 1fr)` }">
<div v-for="(headerCol, headerIndex) in col.headerColumns" :key="headerIndex"
class="header-column-item">
<template v-if="headerCol.type === 'span'">
<div class="span-content">{{ $t(headerCol.label) }}</div>
</template>
<template v-else-if="isRegent(headerCol)">
<HandleFormItem
:fieldKey="prefixKey + colIndex + '_' + headerCol.key + '_' + headerIndex"
:fieldItemLabel="fieldItemLabel" :type="headerCol.type"
class="body-clickable" sourceFrom="customTable"
:item="getHeaderColumnItem(headerCol)"
:value="headerFields[`${colIndex}_${headerIndex}`]"
:error="hasHeaderError(colIndex, headerIndex, headerCol.key)"
@update:error="onHeaderColumnErrorUpdate(colIndex, headerIndex, headerCol.key, $event)"
@onRegentSubmit="(data, inputValue) => onHeaderRegentSubmit(data, inputValue, colIndex, headerIndex)" />
</template>
<template v-else-if="headerCol.type === 'input' || headerCol.type === 'select'|| headerCol.type === 'inputNumber'">
<HandleFormItem
:fieldKey="prefixKey + '_header_' + colIndex + '_' + headerIndex"
:fieldItemLabel="fieldItemLabel" :type="headerCol.type"
:item="getHeaderColumnItem(headerCol)"
v-model="headerFields[`${colIndex}_${headerIndex}`]"
@change="onHeaderColumnChange(colIndex, headerIndex, headerCol, $event)"
:error="hasHeaderError(colIndex, headerIndex, headerCol.key)"
@update:error="onHeaderColumnErrorUpdate(colIndex, headerIndex, headerCol.key, $event)" />
</template>
</div>
</div>
</div>
<div class="header-cell-content" v-else>
<div>{{ $t(col.label) }}</div>
<template
v-if="col.headerSelectKey && col.headerOptions && (showHeaderSelect || templateFillType === 'preFill')">
@ -22,8 +54,8 @@
:fieldItemLabel="fieldItemLabel" type="select" class="header-select"
:item="getHeaderItem(col)" v-model="headerSelectFields[col.headerSelectKey]"
@change="onHeaderSelectChange(col, $event)"
:error="hasError(-1, index, col.headerSelectKey)"
@update:error="onErrorUpdate(-1, index, col.headerSelectKey, $event)" />
:error="hasError(-1, colIndex, col.headerSelectKey)"
@update:error="onErrorUpdate(-1, colIndex, col.headerSelectKey, $event)" />
</template>
<div v-else-if="headerSelectFields[col.headerSelectKey]" class="fill-type-icon"
:style="{ width: (templateFillType !== 'actFill') ? '60px' : 'auto' }">({{
@ -203,7 +235,7 @@ import HandleFormItem from "./HandleFormItem.vue";
import { isEqual } from "@/utils/index.js";
import { isShowOther } from "@/utils/formPackageCommon.js";
import { EventBus } from "@/utils/eventBus";
import { getuuid } from "@/utils/index.js";
import { getuuid, justUpdateFilledFormData } from "@/utils/index.js";
import { isRegent } from "@/utils/index.js";
import { isValueEmpty } from '@/utils/index.js';
@ -247,7 +279,7 @@ export default {
default: () => {
return {
stepTableFormData: [],
headerSelectFields: {}
headerSelectFields: {},
}
}
},
@ -279,6 +311,7 @@ export default {
return {
localDataSource: [],
headerSelectFields: {},
headerFields: {}, // headerColumns
formErrors: [], //
orangeBgCells: {}, // {rowIndex-colIndex: true/false}
isShowOther,
@ -294,9 +327,10 @@ export default {
formData: {
immediate: true,
handler(newData) {
const { stepTableFormData = [], headerSelectFields = {} } = newData;
const { stepTableFormData = [], headerSelectFields = {}, headerFields = {} } = newData;
this.updateDataSource(stepTableFormData);
this.headerSelectFields = JSON.parse(JSON.stringify(headerSelectFields));
this.headerFields = JSON.parse(JSON.stringify(headerFields));
// compareTo
this.checkCompareToOnDataLoad();
}
@ -318,11 +352,56 @@ export default {
this.oldLocalDataSource = [];
},
methods: {
getHeaderColumnItem(headerCol) {
return {
label: headerCol.label || '',
fillType: headerCol.fillType,
options: headerCol.options,
maxlength: headerCol.maxlength,
checkType: headerCol.checkType,
regentFillType: headerCol.regentFillType,
type: headerCol.type,
};
},
onHeaderColumnChange(colIndex, headerIndex, headerCol, value) {
const fieldKey = `${colIndex}_${headerIndex}`;
this.headerFields[fieldKey] = value;
this.$emit('headerColumnChange', {
colIndex,
headerIndex,
key: fieldKey,
value,
headerFields: this.headerFields
});
},
hasHeaderError(colIndex, headerIndex, key) {
console.log(colIndex, headerIndex, key,this.formErrors,"headerError")
return this.formErrors.some(error =>
error.rowIndex === -1 &&
error.colIndex === colIndex &&
error.headerIndex === headerIndex &&
error.field === key
);
},
onHeaderColumnErrorUpdate(colIndex, headerIndex, key, isError) {
if (!isError) {
this.formErrors = this.formErrors.filter(error =>
!(error.rowIndex === -1 &&
error.colIndex === colIndex &&
error.headerIndex === headerIndex &&
error.field === key)
);
}
},
// checkboxTag
onDeleteCheckboxTag(rowIndex, col, tagIndex) {
this.localDataSource[rowIndex][col.prop].splice(tagIndex, 1);
this.$emit("onDeleteTag", rowIndex, col, tagIndex);
this.justUpdateFilledFormData();
justUpdateFilledFormData();
},
onCheckboxTagChange(rowIndex, colIndex, col, value) {
// value
@ -349,7 +428,7 @@ export default {
error.field === col.prop)
);
this.$emit("onCheckboxChange", rowIndex, col, value);
this.justUpdateFilledFormData();
justUpdateFilledFormData();
},
handleClickButton(e, data, key, rowIndex, colIndex) {
this.$emit("clickButton", key, rowIndex, colIndex, e, data,)
@ -408,10 +487,16 @@ export default {
}
this.$emit("beforeReagentSubmit", { selectData: data, callback, key: col.prop, rowData: row })
},
onHeaderRegentSubmit(data, inputValue, colIndex, headerIndex) {
this.headerFields[`${colIndex}_${headerIndex}`] = inputValue;
console.log("onHeaderRegentSubmit", data, inputValue, colIndex, headerIndex,this.headerFields)
this.$emit("onHeaderRegentSubmit", { selectInfo: data, headerIndex, colIndex, headerFields: this.headerFields })
},
onRegentSubmit(data, inputValue, col, rowIndex, colIndex, row) {
if (this.templateFillType !== 'actFill') {
return
}
// if (this.templateFillType !== 'actFill') {
// return
// }
this.updateDataSourceByRowIndex(rowIndex, { [col.prop]: inputValue })
this.$emit("onRegentSubmit", { selectInfo: data, key: col.prop, col, rowIndex, colIndex, rowData: row })
},
@ -447,6 +532,7 @@ export default {
return {
stepTableFormData: [...this.localDataSource],
headerSelectFields: this.headerSelectFields,
headerFields: this.headerFields,
};
},
//
@ -461,6 +547,7 @@ export default {
resolve({
stepTableFormData: [...this.localDataSource],
headerSelectFields: this.headerSelectFields,
headerFields: this.headerFields,
})
} else {
// this.$message.error(",");
@ -478,6 +565,7 @@ export default {
// HandleFormItem
this.columns.forEach((col, colIndex) => {
console.log(col.headerColumns, col, "ttt")
if (col.headerSelectKey && col.headerOptions && col.fillType === this.templateFillType) {
const headerValue = this.headerSelectFields[col.headerSelectKey];
if (isValueEmpty(headerValue)) {
@ -491,6 +579,26 @@ export default {
errors.push(errorItem);
this.formErrors.push(errorItem);
}
} else if (col.headerColumns && col.headerColumns.length > 0) {
col.headerColumns.forEach((headerCol, headerColIndex) => {
const headerValue = this.headerFields[`${colIndex}_${headerColIndex}`];
if (headerCol.fillType === this.templateFillType) {
if (isValueEmpty(headerValue) && headerCol.type !== "span") {
const errorItem = {
rowIndex: -1, //
colIndex,
field: headerCol.key,
label: this.$t(headerCol.label),
headerIndex: headerColIndex,
error: `请选择${this.$t(headerCol.label)}`
};
errors.push(errorItem);
this.formErrors.push(errorItem);
}
}
});
}
});
@ -819,6 +927,12 @@ export default {
});
},
deleteSelectedRows(rowsIndex){
this.deleteRows(rowsIndex);
this.selectedRows = [];
this.isIndeterminate = false;
this.$emit('selectionChange', this.selectedRows);
},
// formData
updateDataSource(dataSource = []) {
this.oldLocalDataSource = JSON.parse(JSON.stringify(this.localDataSource));
@ -836,7 +950,7 @@ export default {
this.localDataSource[rowIndex] = { ...this.localDataSource[rowIndex], ...data };
this.localDataSource = [...this.localDataSource];
this.checkCompareToOnDataLoad();
this.justUpdateFilledFormData();
justUpdateFilledFormData();
},
// newDataoldDatafalse
compareOldAndCurrentFormFields(newData, oldData) {
@ -852,15 +966,6 @@ export default {
return true;
},
//
justUpdateFilledFormData() {
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
EventBus.$emit('onModifyRecord', params,)
},
//
handleCheckAllChange(val) {
this.localDataSource.forEach(row => {
@ -898,7 +1003,7 @@ export default {
targetDiluentVolumePrecision: 3,//3
targetStartSolutionVolumePrecision: 3,//3
});
this.justUpdateFilledFormData()
justUpdateFilledFormData()
},
//
@ -1054,6 +1159,17 @@ export default {
justify-content: center;
}
.header-columns-grid {
display: grid;
gap: 10px;
}
.header-column-item {
display: flex;
align-items: center;
padding: 0 5px;
}
/* 共同行样式 */
.custom-table-row {
display: table;
@ -1211,4 +1327,9 @@ export default {
.c-cell {
width: 50px;
}
.span-content {
width: -webkit-fill-available;
text-align: center;
}
</style>

+ 211
- 102
src/components/Template/DecimalInput.vue View File

@ -35,29 +35,52 @@ export default {
},
data() {
return {
internalValue: this.value !== null && this.value !== undefined ? String(this.value) : ''
internalValue: this.value !== null && this.value !== undefined ? String(this.value) : '',
oldValue: null,
oldPattern: null,
patternRules: [
{ name: 'NA', pattern: /^NA$/i, inputPattern: /^N?A?$/i },
{ name: 'FRACTION', pattern: /^\d+(\/\d+)*$/, inputPattern: /^(\d+\/?)*$/ }
]
};
},
watch: {
value(newVal) {
//
if (newVal === '' || newVal == null) {
this.internalValue = '';
} else {
// "NA" "20/30/40"
if ((this.internalValue && this.internalValue.toUpperCase() === 'NA') || (this.internalValue && /^\d+(\/\d+)*$/.test(this.internalValue))) {
return;
}
// "NA" "20/30/40"
if (String(newVal).toUpperCase() === 'NA' || /^[Nn]?[Aa]?$/.test(String(newVal)) || /^\d+(\/\d*)*$/.test(String(newVal))) {
this.internalValue = String(newVal);
value: {
handler(newVal) {
if (newVal === '' || newVal == null) {
this.internalValue = '';
this.oldValue = null;
this.oldPattern = null;
} else {
this.internalValue = this.handleDecimalDigits(String(newVal));
const strVal = String(newVal);
this.internalValue = strVal;
this.updateOldValue(strVal);
}
}
},
immediate: true
}
},
methods: {
updateOldValue(val) {
for (const rule of this.patternRules) {
if (rule.pattern.test(val)) {
this.oldValue = val;
this.oldPattern = rule;
return true;
}
}
return false;
},
getMatchingRule(val) {
for (const rule of this.patternRules) {
if (rule.inputPattern.test(val)) {
return rule;
}
}
return null;
},
handleInput(val) {
if (val === '') {
this.internalValue = '';
@ -65,117 +88,142 @@ export default {
return;
}
// "NA"
if (val.toUpperCase() === 'NA' || /^[Nn]?[Aa]?$/.test(val)) {
this.internalValue = val;
this.$emit('input', val);
return;
}
// "20/30/40"
if (/^\d+(\/\d*)*$/.test(val)) {
this.internalValue = val;
this.$emit('input', val);
return;
}
const upperVal = val.toUpperCase();
let cleaned = val;
let matchedRule = null;
if (this.oldPattern) {
// oldValue
if (val.startsWith(this.oldValue)) {
// inputPattern
if (this.oldPattern.inputPattern.test(val)) {
matchedRule = this.oldPattern;
cleaned = val;
} else {
// FRACTION
if (this.oldPattern.name === 'FRACTION') {
cleaned = val.replace(/[^\d/]/g, '');
const parts = cleaned.split('/');
const validParts = [];
for (let i = 0; i < parts.length; i++) {
if (parts[i] !== '') {
validParts.push(parts[i]);
}
}
cleaned = validParts.join('/');
matchedRule = this.oldPattern;
} else {
cleaned = this.oldValue || '';
this.internalValue = cleaned;
return;
}
}
} else if (this.oldPattern.inputPattern.test(val)) {
// inputPattern
matchedRule = this.oldPattern;
cleaned = val;
} else {
//
matchedRule = this.getMatchingRule(val);
if (!matchedRule) {
cleaned = this.oldValue || '';
this.internalValue = cleaned;
return;
}
}
} else {
matchedRule = this.getMatchingRule(val);
if (matchedRule) {
if (matchedRule.name === 'FRACTION') {
cleaned = val.replace(/[^\d/]/g, '');
const parts = cleaned.split('/');
const validParts = [];
for (let i = 0; i < parts.length; i++) {
if (parts[i] !== '') {
validParts.push(parts[i]);
}
}
cleaned = validParts.join('/');
} else {
cleaned = upperVal;
}
} else {
cleaned = val
.replace(/[^\d.-]/g, '')
.replace(/^(-)\1+/, '$1');
// "NA" "20/30/40"
if ((this.internalValue && this.internalValue.toUpperCase() === 'NA') || (this.internalValue && /^\d+(\/\d+)*$/.test(this.internalValue))) {
//
this.$emit('input', this.internalValue);
return;
}
const firstDotIndex = cleaned.indexOf('.');
if (firstDotIndex !== -1) {
const before = cleaned.slice(0, firstDotIndex);
const after = cleaned.slice(firstDotIndex + 1).replace(/\./g, '');
cleaned = before + '.' + after;
}
// 1.
let cleaned = val
.replace(/[^\d.-]/g, '')
.replace(/^(-)\1+/, '$1'); //
// 2.
const firstDotIndex = cleaned.indexOf('.');
if (firstDotIndex !== -1) {
const before = cleaned.slice(0, firstDotIndex);
const after = cleaned.slice(firstDotIndex + 1).replace(/\./g, '');
cleaned = before + '.' + after;
}
if (this.decimalDigits > 0 && cleaned.includes('.')) {
const [intPart, decPart = ''] = cleaned.split('.');
cleaned = intPart + '.' + decPart.slice(0, this.decimalDigits);
} else if (this.decimalDigits === 0) {
cleaned = cleaned.split('.')[0];
}
// 3.
if (this.decimalDigits > 0 && cleaned.includes('.')) {
const [intPart, decPart = ''] = cleaned.split('.');
cleaned = intPart + '.' + decPart.slice(0, this.decimalDigits);
} else if (this.decimalDigits === 0) {
cleaned = cleaned.split('.')[0]; //
}
if (cleaned === '.') cleaned = '0.';
else if (cleaned === '-.') cleaned = '-0.';
else if (cleaned.startsWith('.')) cleaned = '0' + cleaned;
else if (cleaned.startsWith('-.')) cleaned = '-0.' + cleaned.slice(2);
// 4. . -.
if (cleaned === '.') cleaned = '0.';
else if (cleaned === '-.') cleaned = '-0.';
else if (cleaned.startsWith('.')) cleaned = '0' + cleaned;
else if (cleaned.startsWith('-.')) cleaned = '-0.' + cleaned.slice(2);
// 5. 0
if (cleaned.includes('.')) {
//
const [int, dec] = cleaned.split('.');
// -0012 -1200 00 0-0 0 -0
let newInt = int;
if (/^-?0+\d/.test(int)) {
newInt = int.replace(/^-?0+(\d)/, '$1');
} else if (int === '' || int === '-') {
newInt = int + '0';
} else if (int === '00' || /^-00+$/.test(int)) {
newInt = int.startsWith('-') ? '-0' : '0';
}
cleaned = newInt + '.' + dec;
} else {
//
if (/^-?0+\d/.test(cleaned)) {
cleaned = cleaned.replace(/^-?0+(\d)/, '$1');
} else if (cleaned === '00' || /^-00+$/.test(cleaned)) {
cleaned = cleaned.startsWith('-') ? '-0' : '0';
if (cleaned.includes('.')) {
const [int, dec] = cleaned.split('.');
let newInt = int;
if (/^-?0+\d/.test(int)) {
newInt = int.replace(/^-?0+(\d)/, '$1');
} else if (int === '' || int === '-') {
newInt = int + '0';
} else if (int === '00' || /^-00+$/.test(int)) {
newInt = int.startsWith('-') ? '-0' : '0';
}
cleaned = newInt + '.' + dec;
} else {
if (/^-?0+\d/.test(cleaned)) {
cleaned = cleaned.replace(/^-?0+(\d)/, '$1');
} else if (cleaned === '00' || /^-00+$/.test(cleaned)) {
cleaned = cleaned.startsWith('-') ? '-0' : '0';
}
}
}
// '0' ''
}
this.internalValue = cleaned;
// emit
if (cleaned === '' || cleaned === '-') {
this.$emit('input', cleaned === '-' ? '-' : '');
} else if (matchedRule && matchedRule.name !== 'FRACTION') {
this.$emit('input', cleaned);
} else if (cleaned.includes('/')) {
this.$emit('input', cleaned);
} else {
const num = parseFloat(cleaned);
this.$emit('input', isNaN(num) ? '' : num);
}
},
handleDecimalDigits(val) {
const actVal = val || this.internalValue;
let finalValue = actVal.trim();
// "NA" "20/30/40"
if (finalValue.toUpperCase() === 'NA' || /^\d+(\/\d+)+$/.test(finalValue)) {
return finalValue;
}
if (finalValue === '' || finalValue === '-') {
this.internalValue = '';
this.$emit('input', '');
return;
return '';
}
const num = parseFloat(finalValue);
if (isNaN(num)) {
this.internalValue = '';
this.$emit('input', '');
return;
return '';
}
//
let formatted = String(num);
//
if (!finalValue.includes('.')) {
formatted = String(Math.floor(num));
} else {
//
const decPart = finalValue.split('.')[1];
const actualDecimalDigits = decPart.length;
const displayDecimalDigits = Math.min(actualDecimalDigits, this.decimalDigits);
@ -185,19 +233,80 @@ export default {
},
handleBlur() {
// "NA" "20/30/40"
if ((this.internalValue && this.internalValue.toUpperCase() === 'NA') || (this.internalValue && /^\d+(\/\d+)*$/.test(this.internalValue))) {
this.$emit('input', this.internalValue);
this.$emit('blur', this.internalValue);
const val = this.internalValue.trim();
if (val === '') {
this.oldValue = null;
this.oldPattern = null;
this.$emit('input', '');
this.$emit('blur', '');
return;
}
let formatted = this.handleDecimalDigits(this.internalValue);
const upperVal = val.toUpperCase();
for (const rule of this.patternRules) {
if (rule.pattern.test(upperVal)) {
this.oldValue = upperVal;
this.oldPattern = rule;
this.internalValue = upperVal;
this.$emit('input', upperVal);
this.$emit('blur', upperVal);
return;
}
}
if (val.includes('/')) {
const parts = val.split('/');
const validParts = parts.filter(part => part !== '');
if (validParts.length === 0) {
if (this.oldValue) {
this.internalValue = this.oldValue;
this.$emit('input', this.oldValue);
this.$emit('blur', this.oldValue);
} else {
this.internalValue = '';
this.$emit('input', '');
this.$emit('blur', '');
}
return;
}
if (validParts.length === 1) {
const result = validParts[0];
this.oldValue = result;
this.oldPattern = this.patternRules.find(r => r.name === 'FRACTION');
this.internalValue = result;
this.$emit('input', result);
this.$emit('blur', result);
return;
}
const formattedValue = validParts.join('/');
this.oldValue = formattedValue;
this.oldPattern = this.patternRules.find(r => r.name === 'FRACTION');
this.internalValue = formattedValue;
this.$emit('input', formattedValue);
this.$emit('blur', formattedValue);
return;
}
if (this.oldValue && this.oldPattern) {
const partialMatch = this.oldPattern.inputPattern && this.oldPattern.inputPattern.test(val);
if (!partialMatch) {
this.internalValue = this.oldValue;
this.$emit('input', this.oldValue);
this.$emit('blur', this.oldValue);
return;
}
}
let formatted = this.handleDecimalDigits(val);
this.internalValue = formatted;
// emit emit
this.$emit('input', parseFloat(formatted));
this.$emit('blur', parseFloat(formatted));
}
}
};
</script>
</script>

+ 14
- 15
src/components/Template/HandleFormItem.vue View File

@ -90,7 +90,7 @@
</div>
<div class="clickable"
:class="getFillTypeStyle() + (getDisabled() ? ' disabled' : '') + (orangeBg ? ' orange-bg' : '')"
v-else-if="regentType.includes(item.type)" @click="onCommonHandleRegent(item, item.type)">
v-else-if="isRegent(item)" @click="onCommonHandleRegent(item, item.type)">
<span v-if="inputValue">{{ inputValue }}</span>
<span v-else class="default-placeholder-text">{{ getPlaceholder() }}</span>
</div>
@ -216,7 +216,7 @@ import Question from "./icons/Question.vue";
import DecimalInput from "./DecimalInput.vue";
import { EventBus } from "@/utils/eventBus";
import moment from "moment";
import { getuuid, isEqual, deepClone, getDefaultValueByOptions, isValueEmpty } from "@/utils/index.js";
import { getuuid, isEqual, deepClone, getDefaultValueByOptions, isValueEmpty,isRegent } from "@/utils/index.js";
import { getToken } from "@/utils/auth";
import { isShowOtherByCheckboxTree } from "@/utils/formPackageCommon";
@ -277,7 +277,6 @@ export default {
},
data() {
let initialValue = this.value;
console.log(this.value, "check value");
let initialOtherValues = {}, checkboxTagList = [];
if (this.type === 'checkboxTag' && Array.isArray(this.value)) {
@ -309,7 +308,7 @@ export default {
fqyqValue: initialValue, // fqyq
oldFqyqValue: { ...initialValue }, // fqyq
uuid: getuuid(), // EventBus
regentType: ['sj', 'gsp', 'mix', 'xj', 'xb', 'gyzj', 'mjy', 'yq', 'jcb', 'qxbd'], ////
isRegent, ////
selectRegentInfo: {},////
fileList: [],//
uploadFileUrl: process.env.VUE_APP_BASE_API + "/file/upload",
@ -340,8 +339,6 @@ export default {
watch: {
value(newVal) {
console.log(newVal, "newVal")
if (this.type === 'checkboxTag' && Array.isArray(newVal)) {
// checkboxTagvalue
this.checkboxTagList = newVal.map(tag => ({
@ -594,8 +591,8 @@ export default {
this.inputValue = data.selectedId;
const { filledCodes = [] } = this.item;
console.log(filledCodes, "filledCodes")
const { selectInfo, row } = data;
if (filledCodes.length > 0) {
const { selectInfo, row,checkType } = data;
if (filledCodes.length > 0 && checkType !=="checkbox") {
this.inputValue = row[filledCodes[0]] + "(" + row[filledCodes[1]] + ")";
}
this.selectRegentInfo = data;
@ -604,8 +601,8 @@ export default {
},
///
onCommonHandleRegent(item, type) {
const {regentFillType = "actFill"} = item;
if (this.templateFillType !== regentFillType) {
const {fillType = "actFill"} = item;
if (this.templateFillType !== fillType) {
return
}
let params = {
@ -634,9 +631,11 @@ export default {
};
if (type === "mix") {
params.mixType = true;
} else if (item.qxbdType) {
}
if (item.qxbdType) {
params.qxbdType = item.qxbdType;
} else if (item.checkType) {
}
if (item.checkType) {
params.checkType = item.checkType;
}
}
@ -1302,7 +1301,7 @@ export default {
this.$nextTick(() => {
EventBus.$emit('onModifyRecord', params,)
console.log(params, "onModifyRecord")
if (this.regentType.includes(this.item.type)) {
if (isRegent(this.item)) {
this.$emit("onRegentSubmit", this.selectRegentInfo, this.inputValue);
}
})
@ -1381,7 +1380,7 @@ export default {
if (this.getDisabled()) {
return ""
}
if (this.regentType.includes(type) || type === "clickable" || type === "fqyq") {
if (isRegent(this.item) || type === "clickable" || type === "fqyq") {
return this.$t("template.common.pleaseSelect")
}
let prex = "template.common.pleaseFillIn"
@ -1805,7 +1804,7 @@ export default {
font-weight: normal;
color: #606266;
flex: 1;
background-color: #fff;
&.disabled {
cursor: not-allowed;
color: #c0c4cc;

+ 47
- 27
src/components/Template/Step.vue View File

@ -2,36 +2,36 @@
<div class="step-container">
<el-button v-if="isShowAddStep()" type="primary" @click="addStep" icon="el-icon-plus">添加步骤</el-button>
<div class="step-list">
<div v-for="(step, index) in steps" :key="step.id" class="step-list-item">
<div class="step-content">
<span class="step-title">{{ index + 1 }}</span>
<HandleFormItem type="select" placeholder="请选择" class="step-type-select" :item="stepSelectConfig"
v-model="step.type" @change="onTypeChange(index)" />
<!-- 根据步骤类型显示对应的表单 -->
<!-- 根据步骤类型显示对应的表单 -->
<component class="flex1" :sn="step.type" :is="getStepComponent(step.type)" :formData="step.formData"
@update="onFormUpdate(index, $event)" :stepIndex = "index" :ref="'stepCompRef_' + index">
</component>
<div v-if="templateFillType === 'preFill'" class="step-header-item">
<el-popconfirm
@confirm="removeStep(index)"
title="确定删除当前步骤吗?"
>
<el-button type="text" slot="reference" icon="el-icon-delete"
class="delete-btn"></el-button>
</el-popconfirm>
<draggable v-model="steps" ghost-class="ghost" handle=".drag-handle" @end="onDragEnd" :animation="200">
<div v-for="(step, index) in steps" :key="step.id" class="step-list-item">
<div class="step-content">
<i class="el-icon-rank drag-handle" v-if="templateFillType === 'preFill'" style="cursor: move; margin-right: 10px; margin-top: 6px;"></i>
<span class="step-title">{{ index + 1 }}</span>
<HandleFormItem type="select" placeholder="请选择" class="step-type-select" :item="stepSelectConfig"
v-model="step.type" @change="onTypeChange(index)" />
<!-- 根据步骤类型显示对应的表单 -->
<component class="flex1" :sn="step.type" :is="getStepComponent(step.type)" :formData="step.formData"
@update="onFormUpdate(index, $event)" :stepIndex = "index" :ref="'stepCompRef_' + index">
</component>
<div v-if="templateFillType === 'preFill'" class="step-header-item">
<el-popconfirm
@confirm="removeStep(index)"
title="确定删除当前步骤吗?"
>
<el-button type="text" slot="reference" icon="el-icon-delete"
class="delete-btn"></el-button>
</el-popconfirm>
</div>
</div>
</div>
</div>
</draggable>
</div>
</div>
</template>
<script>
import { duplicateResource } from '@/utils/index.js';
import draggable from 'vuedraggable';
import { duplicateResource,justUpdateFilledFormData } from '@/utils/index.js';
import HandleFormItem from './HandleFormItem.vue';
import Czdd from './StepComponents/ry/czdd.vue';//-
import Czhj from './StepComponents/ry/czhj.vue';//-
@ -197,6 +197,7 @@ export default {
}
},
components: {
draggable,
HandleFormItem,
Czdd,
Czhj,
@ -373,10 +374,7 @@ export default {
watch: {
// steps: {
// handler(newVal) {
// this.$emit('input', newVal.map(step => ({
// type: step.type,
// formData: step.formData
// })))
// this.$emit('input', newVal);
// },
// deep: true
// },
@ -390,6 +388,10 @@ export default {
}
},
methods: {
onDragEnd(evt) {
justUpdateFilledFormData();
},
getStepList(){
public_templateStepList({templateId:this.templateData.templateId}).then(response => {
let options = []
@ -637,6 +639,24 @@ export default {
padding-top: 10px;
border-radius: 6px;
overflow: hidden;
transition: background-color 0.2s;
&:hover {
// background-color: #f5f7fa;
}
&.ghost {
background-color: transparent !important;
}
.drag-handle {
color: #909399;
transition: color 0.2s;
&:hover {
color: #409eff;
}
}
.step-title {
margin-right: 10px;

+ 1
- 1
src/components/Template/StepComponents/b/cl.vue View File

@ -1,6 +1,6 @@
<!-- 称量 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="b_cl" @resetRecord="resetRecord" :form-config="formConfig"
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'b_cl'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/b/jrry_b.vue View File

@ -1,6 +1,6 @@
<!-- 加入溶液 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="b_jrry_b" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'b_jrry_b'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/bdtj.vue View File

@ -1,6 +1,6 @@
<!-- 标定(体积) -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_bdtj" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_bdtj'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/bdzl.vue View File

@ -1,6 +1,6 @@
<!-- 标定(质量) -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_bdzl" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_bdzl'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/clcz.vue View File

@ -1,6 +1,6 @@
<!-- 称量非传值 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_clcz" @resetRecord="resetRecord" :form-config="formConfig"
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_clcz'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/ry/clfcz.vue View File

@ -1,6 +1,6 @@
<!-- 称量传值 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_clfcz" @resetRecord="resetRecord" :form-config="formConfig"
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_clfcz'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/ry/cs.vue View File

@ -1,6 +1,6 @@
<!-- 超声 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_cs" @resetRecord="resetRecord" :form-config="formConfig"
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_cs'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/ry/czdd.vue View File

@ -1,6 +1,6 @@
<!-- 操作地点 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_czdd" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_czdd'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/czhj.vue View File

@ -1,6 +1,6 @@
<!-- 操作环境 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_czhj" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_czhj'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/dc.vue View File

@ -1,6 +1,6 @@
<!-- 氮吹 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_dc" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_dc'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/ddhy.vue View File

@ -1,6 +1,6 @@
<!-- 颠倒混匀 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_ddhy" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_ddhy'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/fb.vue View File

@ -1,6 +1,6 @@
<!-- 封板 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_fb" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_fb'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/fr.vue View File

@ -1,6 +1,6 @@
<!-- 复溶 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_fr" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_fr'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/frdrq.vue View File

@ -1,6 +1,6 @@
<!-- 复溶(多容器) -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_frdrq" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_frdrq'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/fs.vue View File

@ -1,6 +1,6 @@
<!-- 复苏 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_fs" @resetRecord="resetRecord" :form-config="formConfig"
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_fs'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/ry/fy.vue View File

@ -1,6 +1,6 @@
<!-- 孵育 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_fy" @resetRecord="resetRecord" :form-config="formConfig"
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_fy'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/ry/glsd.vue View File

@ -1,6 +1,6 @@
<!-- 过滤(手动) -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_glsd" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_glsd'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/glzd.vue View File

@ -1,6 +1,6 @@
<!-- 过滤(自动) -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_glzd" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_glzd'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/hb.vue View File

@ -1,6 +1,6 @@
<!-- 合并 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_hb" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_hb'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/hwhy.vue View File

@ -1,6 +1,6 @@
<!-- 恒温混匀 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_hwhy" @resetRecord="resetRecord" :form-config="formConfig"
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_hwhy'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/ry/jb.vue View File

@ -1,6 +1,6 @@
<!-- 搅拌 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_jb" @resetRecord="resetRecord" :form-config="formConfig"
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_jb'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/ry/jd.vue View File

@ -1,6 +1,6 @@
<!-- 解冻 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_jd" @resetRecord="resetRecord" :form-config="formConfig"
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_jd'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/ry/jr.vue View File

@ -1,6 +1,6 @@
<!-- 加热 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_jr" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_jr'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/jrjb.vue View File

@ -1,6 +1,6 @@
<!-- 加热搅拌 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_jrjb" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_jrjb'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/jrry.vue View File

@ -1,6 +1,6 @@
<!-- 加入溶液 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_jrry" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_jrry'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/js.vue View File

@ -1,6 +1,6 @@
<!-- 计数 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_js" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_js'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/jz.vue View File

@ -1,6 +1,6 @@
<!-- 静置 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_jz" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_jz'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/kb.vue View File

@ -1,6 +1,6 @@
<!-- 空白 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_kb" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_kb'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/kbsjgsp.vue View File

@ -1,6 +1,6 @@
<!-- 空白试剂/供试品 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_kbsjgsp" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_kbsjgsp'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/kbyq.vue View File

@ -1,6 +1,6 @@
<!-- 空白仪器 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_kbyq" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_kbyq'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/lx.vue View File

@ -1,6 +1,6 @@
<!-- 离心 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_lx" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_lx'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/mj.vue View File

@ -1,6 +1,6 @@
<!-- 灭菌 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_mj" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_mj'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/qcyy.vue View File

@ -1,6 +1,6 @@
<!-- 取出原药 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_qcyy" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_qcyy'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/qywz.vue View File

@ -1,6 +1,6 @@
<!-- 取用物质 -->
<template>
<StepFormPackage @onDialogSubmit="onDialogSubmit" prefixKey="ry_qywz" ref = "stepFormPackageRef" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage @onDialogSubmit="onDialogSubmit" :prefixKey="stepIndex+'_'+'ry_qywz'" ref = "stepFormPackageRef" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/rs.vue View File

@ -1,6 +1,6 @@
<!-- 染色 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_rs" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_rs'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/sy.vue View File

@ -1,6 +1,6 @@
<!-- 水浴 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_sy" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_sy'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/tjphcz.vue View File

@ -1,6 +1,6 @@
<!-- 调节PH(传值) -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_tjphcz" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_tjphcz'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/tjphfcz.vue View File

@ -1,6 +1,6 @@
<!-- 调节PH(非传值) -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_tjphfcz" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_tjphfcz'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/tpjydd.vue View File

@ -1,7 +1,7 @@
<!-- 天平校验(单点) -->
<template>
<StepFormPackage
ref = "stepFormPackageRef" prefixKey="ry_tpjydd" @resetRecord = "resetRecord"
ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_tpjydd'" @resetRecord = "resetRecord"
@clickButton="handleClickButton"
:form-config="formConfig" :formData = "formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/ry/tpjysd.vue View File

@ -1,6 +1,6 @@
<!-- 天平校验(双点) -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_tpjysd" @resetRecord="resetRecord"
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_tpjysd'" @resetRecord="resetRecord"
@clickButton="handleClickButton" :form-config="formConfig" :formData="formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/ry/wxhy.vue View File

@ -1,6 +1,6 @@
<!-- 涡旋混匀 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_wxhy" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_wxhy'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/xzrq.vue View File

@ -1,6 +1,6 @@
<!-- 选择容器 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="ry_xzrq" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_xzrq'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/ym.vue View File

@ -1,6 +1,6 @@
<!-- 研磨 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_ym" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_ym'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/zlfz.vue View File

@ -2,7 +2,7 @@
<template>
<StepFormPackage
@onDialogSubmit = "onDialogSubmit"
ref="stepFormPackageRef" prefixKey="ry_zlfz" @resetRecord="resetRecord" :form-config="formConfig"
ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_zlfz'" @resetRecord="resetRecord" :form-config="formConfig"
:formData="formData" />
</template>

+ 1
- 1
src/components/Template/StepComponents/ry/zy.vue View File

@ -1,6 +1,6 @@
<!-- 正压 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_zy" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_zy'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/ry/zyhy.vue View File

@ -1,6 +1,6 @@
<!-- 振摇混匀 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="ry_zyhy" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'ry_zyhy'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/spyjzzb/jszz.vue View File

@ -1,6 +1,6 @@
<!-- 剪碎组织 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" prefixKey="spyjzzb_jszz" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'spyjzzb_jszz'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/swypfx/hhspe.vue View File

@ -1,6 +1,6 @@
<!-- 活化SPE -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="swypfx_hhspe" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'swypfx_hhspe'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/swypfx/jryp.vue View File

@ -1,6 +1,6 @@
<!-- 加入样品 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="swypfx_jryp" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'swypfx_jryp'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>

+ 1
- 1
src/components/Template/StepComponents/swypfx/zyfc.vue View File

@ -1,6 +1,6 @@
<!-- 转移分层 -->
<template>
<StepFormPackage ref="stepFormPackageRef" prefixKey="swypfx_zyfc" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'swypfx_zyfc'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>

+ 7
- 8
src/components/Template/StepFormPackage.vue View File

@ -4,25 +4,25 @@
<div v-for="(sItem, key) in item.config" class="step-item" :key="key">
<template v-if="sItem.type === 'input'">
<HandleFormItem class="step-row" :field-item-label="fieldItemLabel" @blur="onBlur(key, $event)"
:item="sItem" v-model="formFields[key]" :field-key="prefixKey+uuid + '_' + key"
:item="sItem" v-model="formFields[key]" :field-key="prefixKey+'_' + key"
@copy="onCopy(sItem, key)" :error="errors[key]" @update:error="errors[key] = false"
:orange-bg="orangeBgFields[key]" />
</template>
<template v-else-if="sItem.type === 'inputNumber'">
<HandleFormItem class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey+uuid + '_' + key"
<HandleFormItem class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey+'_' + key"
type="inputNumber" @blur="onBlur(key, $event)" :item="sItem"
@input="onInputNumberChange(key, $event)" v-model="formFields[key]" @copy="onCopy(sItem, key)"
:error="errors[key]" @update:error="errors[key] = false" :orange-bg="orangeBgFields[key]" />
</template>
<template v-else-if="sItem.type === 'select'">
<HandleFormItem class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey+uuid + '_' + key"
<HandleFormItem class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey+'_' + key"
type="select" @blur="onBlur(key, $event)" :item="sItem" v-model="formFields[key]"
@change="onSelectChange(key, $event, sItem.type)"
@copy="onCopy(sItem, key)" :error="errors[key]" @update:error="errors[key] = false"
:orange-bg="orangeBgFields[key]" />
</template>
<template v-else-if="sItem.type === 'checkbox'">
<HandleFormItem class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey+uuid + '_' + key"
<HandleFormItem class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey+'_' + key"
type="checkbox" :item="sItem" v-model="formFields[key]"
@change="onSelectChange(key, $event, sItem.type)"
@copy="onCopy(sItem, key)" :error="errors[key]" @update:error="errors[key] = false"
@ -36,7 +36,7 @@
</template>
<!-- 仪器instrumentsj(药剂) gsp(供试品) mix药剂/供试品/给药制剂 -->
<template v-else-if="isRegent(sItem)">
<HandleFormItem class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey+uuid + '_' + key"
<HandleFormItem class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey+ '_' + key"
:type="sItem.type" :error="errors[key]"
@onRegentSubmit="(data)=>onRegentSubmit(data,key,sItem)"
@update:error="errors[key] = false" :item="getRegentItem(sItem)"
@ -55,7 +55,7 @@
<div v-show="isShowOther(formFields[key])" class="flex flex1">
<div class="other-title">{{sItem.otherLabel ? $t(sItem.otherLabel) : $t("template.common.other") }}</div>
<HandleFormItem sourceFrom = "step" class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey+uuid+'_'+sItem.otherCode" @blur="onBlur(key, $event)" :item="getOtherItem(sItem)"
<HandleFormItem sourceFrom = "step" class="step-row" :field-item-label="fieldItemLabel" :field-key="prefixKey+'_'+sItem.otherCode" @blur="onBlur(key, $event)" :item="getOtherItem(sItem)"
v-model="formFields[sItem.otherCode]" @copy="onCopy(sItem, key)"
:error="errors[sItem.otherCode]" @update:error="errors[sItem.otherCode] = false"
:orange-bg="orangeBgFields[sItem.otherCode]" />
@ -72,7 +72,7 @@ import formPackageMixins from '@/components/Template/mixins/formPackageMixins.js
import ZLSubPackage from '@/components/Template/StepComponents/ZLSubPackage.vue'
import { isShowOther } from "@/utils/formPackageCommon.js";
import { EventBus } from "@/utils/eventBus";
import { getuuid,isRegent} from "@/utils/index.js";
import { isRegent} from "@/utils/index.js";
import moment from 'moment'
export default {
inject: ['templateFillType','templateData'],
@ -112,7 +112,6 @@ export default {
orangeBgFields: {},//
isShowOther,
currentClickKey: "",//key
uuid:getuuid(),
isRegent,
}
},

+ 34
- 3
src/components/Template/mixins/formPackageMixins.js View File

@ -67,11 +67,11 @@ export default {
},
getRegentItem(item, fieldCode = "type") {
const type = item[fieldCode];
console.log(item, "type")
const fillType = fieldCode === "type" ? item.fillType : (item.subFillType || item.fillType);
return {
label: "",
type,
fillType: item.subFillType || item.fillType,
fillType,
parentLabel: item.label,
filledCodes: item.filledCodes,
qxbdType: item.qxbdType,
@ -184,6 +184,20 @@ export default {
}
return config;
},
//获取第三个的配置
getThirdItem(sItem) {
const config = {
label: "",
options: sItem.thirdOptions || [],
fillType: sItem.thirdFillType,
parentLabel: sItem.label,
maxlength: sItem.thirdMaxlength || 50,
}
if (sItem.thirdDisabled) {
config.disabled = sItem.thirdDisabled;
}
return config;
},
// 根据formConfig回填form表单数据
handleFormField(update = false) {
const result = {};
@ -235,6 +249,24 @@ export default {
}
config[subKey] = { label: currentConfig.label, subKey, type: currentConfig.subType, fillType: currentConfig.subFillType || currentConfig.fillType, selectTo: currentConfig.selectTo }
}
if(currentConfig.thirdKey){
const { thirdKey } = currentConfig;
if (update) {
result[thirdKey] = formFields[thirdKey] || formData[thirdKey] || '';
} else {
result[thirdKey] = formFields[thirdKey] || formData[thirdKey] || '';
}
config[thirdKey] = { label: currentConfig.label, thirdKey, type: currentConfig.thirdType, fillType: currentConfig.thirdFillType, selectTo: currentConfig.selectTo }
}
if(currentConfig.fourthKey){
const { fourthKey } = currentConfig;
if (update) {
result[fourthKey] = formFields[fourthKey] || formData[fourthKey] || '';
} else {
result[fourthKey] = formFields[fourthKey] || formData[fourthKey] || '';
}
config[fourthKey] = { label: currentConfig.label, fourthKey, type: currentConfig.fourthType, fillType: currentConfig.fourthFillType, selectTo: currentConfig.selectTo }
}
// 检查compareTo字段
if (currentConfig.compareTo && formData[currentConfig.compareTo] && result[key]) {
@ -391,7 +423,6 @@ export default {
const {otherCode} = o;
const otherValue = formFields[otherCode] || "";
const isShow = this.isShowOtherByRadioAndOther(radioValue,o)
console.log(o,radioValue,isShow,otherValue,"radioValue")
if(isShow&&!otherValue){
errors.push({
field: key,

+ 4
- 0
src/components/Template/mixins/stepMixins.js View File

@ -8,6 +8,10 @@ export default {
formData: {
type: Object,
default: () => ({})
},
stepIndex: {
type: Number,
default: 0
}
},
methods: {

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

@ -138,27 +138,90 @@ export default {
dl011: {
...common,
fxbz: 'Resuscitation Steps',
pyxx: 'Culture Information'
pyxx: 'Culture Information',
xbxx: 'Cell Information',
xbmc: 'Cell Name',
xbdcbh: 'Cell Cryopreservation Number',
fshxbbh: 'Cell Number After Resuscitation',
fshxbyjtj: 'Expected Cell Volume After Resuscitation',
fshxbsjtj: 'Actual Cell Volume After Resuscitation',
pyxbh: 'Incubator Number',
pytjText: 'Culture Conditions',
pykssj: 'Culture Start Time',
pykssjButton: 'Start'
},
dl012: {
...common,
zbbz: 'Preparation Steps',
pyxx: 'Culture Information'
pyxx: 'Culture Information',
xbxx: 'Cell Information',
xbmc: 'Cell Name',
xbzbqbh: 'Cell Number Before Preparation',
zbxbs: 'Number of Cells Prepared',
zbhxbbh: 'Cell Number After Preparation',
zbhxbyjtj: 'Expected Cell Volume After Preparation',
zbhxbsjtj: 'Actual Cell Volume After Preparation',
pyxbh: 'Incubator Number',
pytjText: 'Culture Conditions',
pykssj: 'Culture Start Time',
pykssjButton: 'Start'
},
dl013: {
...common,
cdxx: 'Measurement Information'
cdxx: 'Measurement Information',
xbmc: 'Cell Name',
xbbh: 'Cell Number',
xbxytj: 'Cell Suspension Volume',
sjmcdptj: 'Actual Volume per Drop (ul)',
cdcs: 'Measurement Times',
pjxbmd: 'Average Cell Density',
xsbs: 'Dilution Factor',
xbmd: 'Cell Density (cells/ml)',
zsg: 'Upper Left Grid (cells)',
ysg: 'Upper Right Grid (cells)',
zxg: 'Lower Left Grid (cells)',
yxg: 'Lower Right Grid (cells)',
cdxxTime: 'Time {index}',
addCdxx: 'Add'
},
dl014: {
...common,
gyzjxx: 'Drug Administration Information',
wzly: 'Material Source',
xbmc: 'Cell Name',
jlzpzxx: 'Dose Group Preparation Information'
jlzpzxx: 'Dose Group Preparation Information',
addJlz: 'Add Dose Group',
pxpb: 'Parallel Bottles',
sftjs9: 'Add S9',
s9hhybh: 'S9 Mix Number',
jlzzs: 'Dose Group Quantity',
jlzzmc: 'Dose Group Name',
pyy: 'Culture Medium',
jlzb: 'Dose Group',
xybh: 'Suspension Number',
gysqgc: 'Pre-dose Observation',
ysplyjrl: 'Preset Culture Medium Volume',
sjplyjrl: 'Actual Culture Medium Volume',
yss9hhyjrl: 'Preset S9 Mix Volume',
sjs9hhyjrl: 'Actual S9 Mix Volume',
gspbh: 'Test Article Number',
ysgspjrl: 'Preset Test Article Volume',
sjgspjrl: 'Actual Test Article Volume',
gyhzqk: 'Post-dose Status',
qrButton: 'Confirm',
wcButton: 'Complete'
},
dl015: {
...common,
hyqk: 'Medium Change Status'
hyqk: 'Medium Change Status',
jlzb: 'Dose Group',
xybh: 'Suspension Number',
hyqszqk: 'Growth Before Medium Change',
hyqcdjqk: 'Precipitation Before Medium Change',
hyqqtqk: 'Other Conditions Before Medium Change',
qqpyy: 'Discard Culture Medium',
pbsxd: 'PBS Wash',
pyybrl: 'Culture Medium Volume Added (ul)'
},
dl016: {
xbxx:'细胞信息',
@ -211,6 +274,8 @@ export default {
xybh:'悬液编号',
rsks:'染色开始',
rsjs:'染色结束',
ksButton:'开始',
jsButton:'结束',
zs:'左上(个)',
ys:'右上(个)',
zy:'左下(个)',
@ -291,4 +356,16 @@ export default {
ksButton:'开始',
jsButton:'结束',
},
dl024: {
sydd:'实验地点',
czsj:'操作时间',
dlbz: '备注',
xbpyxx: '细胞培养信息',
qxbd:'前序表单',
pykssj:'培养开始时间',
pyjssj:'培养结束时间',
jsButton:'培养结束时间',
xbbh:'细胞编号',
},
}

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

@ -73,7 +73,9 @@ export default {
yjyjry: '已加匀浆溶液',
dztpbh: '电子天平编号',
ypmc: '样品名称',
zzz: '组织重',
cjgz: '采集管重',
lzzcz: '连组织称重',
zzzl: '组织重量',
ysyjrybjrl: '预设匀浆溶液补加入量',
sjyjrybjrl: '实际匀浆溶液补加入量',
},

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

@ -139,27 +139,90 @@ export default {
dl011: {
...common,
fxbz: '复苏步骤',
pyxx: '培养信息'
pyxx: '培养信息',
xbxx: '细胞信息',
xbmc: '细胞名称',
xbdcbh: '细胞冻存编号',
fshxbbh: '复苏后细胞编号',
fshxbyjtj: '复苏后细胞预计体积',
fshxbsjtj: '复苏后细胞实际体积',
pyxbh: '培养箱编号',
pytjText: '培养条件',
pykssj: '培养开始时间',
pykssjButton: '开始'
},
dl012: {
...common,
zbbz: '制备步骤',
pyxx: '培养信息'
pyxx: '培养信息',
xbxx: '细胞信息',
xbmc: '细胞名称',
xbzbqbh: '细胞制备前编号',
zbxbs: '制备细胞数',
zbhxbbh: '制备后细胞编号',
zbhxbyjtj: '制备后细胞预计体积',
zbhxbsjtj: '制备后细胞实际体积',
pyxbh: '培养箱编号',
pytjText: '培养条件',
pykssj: '培养开始时间',
pykssjButton: '开始'
},
dl013: {
...common,
cdxx: '测定信息'
cdxx: '测定信息',
xbmc: '细胞名称',
xbbh: '细胞编号',
xbxytj: '细胞悬液体积',
sjmcdptj: '实际每次滴片体积(ul)',
cdcs: '测定次数',
pjxbmd: '平均细胞密度',
xsbs: '稀释倍数',
xbmd: '细胞密度(个/ml)',
zsg: '左上格(个)',
ysg: '右上格(个)',
zxg: '左下格(个)',
yxg: '右下格(个)',
cdxxTime: '第{index}次',
addCdxx: '新增'
},
dl014: {
...common,
gyzjxx: '给药制剂信息',
wzly: '物质来源',
xbmc: '细胞名称',
jlzpzxx: '剂量组配制信息'
jlzpzxx: '剂量组配制信息',
addJlz: '新增剂量组',
pxpb: '平行瓶数',
sftjs9: '是否添加S9',
s9hhybh: 'S9混合液编号',
jlzzs: '剂量组数量',
jlzzmc: '剂量组名称',
pyy: '培养液',
jlzb: '剂量组别',
xybh: '悬液编号',
gysqgc: '给药前观察',
ysplyjrl: '预设培养液加入量',
sjplyjrl: '实际培养液加入量',
yss9hhyjrl: '预设S9混合液加入量',
sjs9hhyjrl: '实际S9混合液加入量',
gspbh: '供试品编号',
ysgspjrl: '预设供试品加入量',
sjgspjrl: '实际供试品加入量',
gyhzqk: '给药后状态情况',
qrButton: '确认',
wcButton: '完成'
},
dl015: {
...common,
hyqk: '换液情况'
hyqk: '换液情况',
jlzb: '剂量组别',
xybh: '悬液编号',
hyqszqk: '换液前生长情况',
hyqcdjqk: '换液前沉淀情况',
hyqqtqk: '换液前其他情况',
qqpyy: '倾去培养液',
pbsxd: 'PBS洗涤',
pyybrl: '培养液补入量(ul)'
},
dl016: {
xbxx:'细胞信息',
@ -212,6 +275,8 @@ export default {
xybh:'悬液编号',
rsks:'染色开始',
rsjs:'染色结束',
ksButton:'开始',
jsButton:'结束',
zs:'左上(个)',
ys:'右上(个)',
zy:'左下(个)',
@ -291,4 +356,16 @@ export default {
ksButton:'开始',
jsButton:'结束',
},
dl024: {
sydd:'实验地点',
czsj:'操作时间',
dlbz: '备注',
xbpyxx: '细胞培养信息',
qxbd:'前序表单',
pykssj:'培养开始时间',
pyjssj:'培养结束时间',
jsButton:'培养结束时间',
xbbh:'细胞编号',
},
}

+ 4
- 2
src/lang/zh/template/pcr.js View File

@ -66,13 +66,15 @@ export default {
},
pcr008: {
czb: '称重表',
clsj: '处理时间',
clsj: 'Work Time',
yjry: '匀浆溶液',
bs: '倍数',
yjyjry: '已加匀浆溶液',
dztpbh: '电子天平编号',
ypmc: '样品名称',
zzz: '组织重',
cjgz: '采集管重',
lzzcz: '连组织称重',
zzzl: '组织重量',
ysyjrybjrl: '预设匀浆溶液补加入量',
sjyjrybjrl: '实际匀浆溶液补加入量',
},

+ 12
- 1
src/utils/index.js View File

@ -1,6 +1,7 @@
import { parseTime } from './ruoyi'
import { encrypt, decrypt } from '@/utils/encryptUtil'
import moment from 'moment'
import {EventBus} from './eventBus'
/**
* 表格时间格式化
*/
@ -441,7 +442,7 @@ export function isValueEmpty(value) {
if (Array.isArray(value) && value.length === 0) {
return true
}
if (Object.keys(value).length === 0 && typeof value=='object') {
if (Object.keys(value).length === 0 && typeof value == 'object') {
return true;
}
return false
@ -600,4 +601,14 @@ export const getDefaultValueByOptions = (options = []) => {
}
})
return arr;
}
// 只是更新已填写的表单数据,不触发其他事件
export const justUpdateFilledFormData = () => {
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
EventBus.$emit('onModifyRecord', params,)
}

+ 6
- 1
src/views/business/comps/template/TemplateTable.vue View File

@ -59,6 +59,7 @@ import PCR007 from "./comps/pcr/PCR007.vue";
import PCR008 from "./comps/pcr/PCR008.vue";
import PCR009 from "./comps/pcr/PCR009.vue";
import PCR010 from "./comps/pcr/PCR010.vue";
import PCR011 from "./comps/pcr/PCR011.vue";
//LBA
// LBA001-使SP001
@ -128,7 +129,7 @@ export default {
//
SP001, SP003, SP00456,SP007, SP008, SP009,SP0019,SP0020,SP0021,
// PCR
PCR002, PCR003, PCR004, PCR005,PCR007, PCR008, PCR009,PCR010,
PCR002, PCR003, PCR004, PCR005,PCR007, PCR008, PCR009,PCR010, PCR011,
//LBA
LBA002,
LBA003,
@ -259,6 +260,7 @@ export default {
'PCR008': 'PCR008',
'PCR009': 'PCR009',
'PCR010': 'PCR010',
'PCR011': 'PCR011',
//LBA
'LBA001': 'SP001',
'LBA002': 'LBA002',
@ -479,6 +481,9 @@ export default {
getJcbList() {
return this.$refs.templateComponent.getJcbList();
},
getXbxj() {
return this.$refs.templateComponent.getXbxj();
},
getFilledFormData() {
return this.$refs.templateComponent.getFilledFormData();
},

+ 57
- 2
src/views/business/comps/template/comps/dl/DL006.vue View File

@ -49,6 +49,20 @@
</CustomTable>
</div>
<LineLabel label="操作信息" />
<CustomTable
fieldItemLabel="操作信息"
:columns="czxxColumns"
:ref="'czxxTableRef'"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="false"
:showAddRow="false"
:formData="{stepTableFormData:formData.stepTableFormData_1,headerSelectFields:{},headerFields:formData.headerFields}"
:showHeaderSelect="fillType === 'preFill'"
:prefixKey="`czxxTable`"
>
</CustomTable>
<BaseInfoFormPackage
fieldItemLabel="template.dl.dl007.bz"
@ -77,10 +91,10 @@ import moment from 'moment'
const refConf = {
base: 'baseInfoRef',
czInfo: 'czInfoRef',
gyzj: 'gyzjTableRef',
remark: 'remarkRef',
jzjz: 'jlzpzxxTableRef',
bz: 'stepRef'
bz: 'stepRef',
czxx: 'czxxTableRef'
}
const refNames = Object.values(refConf)
@ -102,6 +116,47 @@ export default {
}
},
computed: {
czxxColumns() {
return [
{
prop: 'jlzb',
label: '剂量组别',
bodyType: 'input',
bodyTypeFillType: 'preFill',
placeholder: '请输入剂量组别'
},
{
prop: 'czrxm',
label: '菌种编号',
bodyType: 'checkbox',
width: 300,
headerColumns:[
{
label: '菌种编号',
type:"span",
},
{
type:"sj",
fillType: 'preFill',
key:"bh",
},
{
type: 'input',
fillType:"preFill",
key:"srbh"
},
{
type:"select",
fillType:"preFill",
key:"dw",
options: [
{label:"mg/皿",value:"mg/皿"},
],
},
]
}
]
},
//
remarkConig() {
return [

+ 24
- 5
src/views/business/comps/template/comps/dl/DL007.vue View File

@ -209,6 +209,7 @@ export default {
qxbd: {
label: 'template.dl.dl007.qxbd',
type: 'qxbd',
qxbdType: 'DL006',
fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
},
@ -264,10 +265,18 @@ export default {
return await this.validFormFields(refNames)
},
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) => ({
bh: item.yqbh,
type: 'yq'
}))
this.resourceTmp = []
return this.resourceTmp
},
onRegentSubmit(e) {
@ -283,7 +292,17 @@ export default {
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
if (key === 'qxbd') {
this.$refs.czInfoRef.updateFormData('pykssj', row.startDate)
try {
const bdnr = JSON.parse(row.bdnr)
if (bdnr.startDate) {
const formattedDate = moment(bdnr.startDate).format(
'YYYY/MM/DD HH:mm'
)
this.$refs.czInfoRef.updateFormData('pykssj', formattedDate)
}
} catch (error) {
console.error('解析前序表单数据失败:', error)
}
}
},
//

+ 1
- 0
src/views/business/comps/template/comps/dl/DL008.vue View File

@ -220,6 +220,7 @@ export default {
prop: 'jlzb',
bodyType: 'input',
bodyFillType: 'actFill',
disabled: true,
width: 100
},
{

+ 3
- 4
src/views/business/comps/template/comps/dl/DL009.vue View File

@ -198,16 +198,15 @@ export default {
{
type: 'cellItem',
config: {
kssj: {
startDate: {
label: 'template.dl.dl009.kssj',
type: 'input',
disabled: true
},
jssj: {
endDate: {
label: 'template.dl.dl009.jssj',
type: 'input',
fillType: 'actFill',
maxlength: 200
disabled: true
}
}
}

+ 7
- 1
src/views/business/comps/template/comps/dl/DL010.vue View File

@ -376,7 +376,13 @@ export default {
prop: 'sjgs',
bodyType: 'checkbox',
checkboxLabel: '',
bodyFillType: 'actFill'
bodyFillType: 'actFill',
headerColumns: [
{ type: 'span', label: '收集' },
{ type: 'inputNumber', fillType: 'actFill', key: 'gs' },
{ type: 'span', label: '骨髓' }
],
span: 3
},
{
label: 'template.dl.dl010.lx',

+ 108
- 5
src/views/business/comps/template/comps/dl/DL011.vue View File

@ -55,14 +55,32 @@
</template>
</CustomTable>
<!-- 预留区域 - 细胞信息 -->
<!-- 细胞信息 -->
<LineLabel label="template.dl.dl011.xbxx" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.xbxx"
:formConfig="xbxxConfig"
:formData="formData"
/>
</div>
<LineLabel label="template.dl.dl011.fxbz" />
<Step :ref="refConf.step" :formData="formData.stepData" />
<!-- 预留区域 - 培养信息 -->
<LineLabel label="template.dl.dl011.pyxx" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.pyxx"
:formConfig="pyxxConfig"
:formData="formData"
/>
</div>
<BaseInfoFormPackage
fieldItemLabel="template.dl.dl007.bz"
@ -92,7 +110,9 @@ const refConf = {
sysj: 'sysjTableRef',
yqsy: 'yqsyTableRef',
step: 'stepRef',
remark: 'remarkRef'
remark: 'remarkRef',
xbxx: 'xbxxRef',
pyxx: 'pyxxRef'
}
const refNames = Object.values(refConf)
@ -165,7 +185,7 @@ export default {
},
{
type: 'cellItem',
label:'操作时间',
label: '操作时间',
config: {
kssj: {
label: 'template.dl.dl011.kssj',
@ -175,8 +195,7 @@ export default {
jssj: {
label: 'template.dl.dl011.jssj',
type: 'input',
fillType: 'actFill',
maxlength: 200
disabled: true
}
}
}
@ -253,8 +272,92 @@ export default {
disabled: true
}
]
},
pyxxConfig() {
return [
{
type: 'step',
config: {
pyxbh: {
label: 'template.dl.dl011.pyxbh',
type: 'yq',
fillType: 'actFill'
},
pytjText: {
type: 'span',
label: ''
},
pykssj: {
label: 'template.dl.dl011.pykssj',
type: 'input',
fillType: 'actFill',
subType: 'button',
subKey: 'pykssjButton',
buttonName: 'template.dl.dl011.pykssjButton'
}
}
}
]
},
xbxxConfig() {
return [
{
type: 'step',
config: {
xbmc: {
label: 'template.dl.dl011.xbmc',
type: 'select',
options: [],
fillType: 'preFill',
otherCode: 'xbmcOther'
},
xbdcbh: {
label: 'template.dl.dl011.xbdcbh',
type: 'xb',
fillType: 'actFill'
},
fshxbbh: {
label: 'template.dl.dl011.fshxbbh',
type: 'input',
subType: 'span',
maxlength: 20,
subKey: 'fshxbbhCodeSn',
fillType: 'preFill'
},
fshxbyjtj: {
label: 'template.dl.dl011.fshxbyjtj',
type: 'inputNumber',
subType: 'select',
subKey: 'fshxbyjtjUnit',
fillType: 'preFill',
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
selectTo: 'fshxbsjtjUnit' //
},
fshxbsjtj: {
label: 'template.dl.dl011.fshxbsjtj',
type: 'inputNumber',
subType: 'select',
subKey: 'fshxbsjtjUnit',
fillType: 'actFill',
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
copyFrom: 'fshxbyjtj' //
}
}
}
]
}
},
mounted() {
this.$nextTick(() => {
this.$refs[refConf.pyxx]?.updateFormData(
'pytjText',
'培养条件:温度为温度为37℃±2℃,CO2浓度为5%±0.5%',
{ isUpdateRecord: false, signData: null }
)
})
},
data() {
return {
formData: {},

+ 163
- 7
src/views/business/comps/template/comps/dl/DL012.vue View File

@ -55,14 +55,33 @@
</template>
</CustomTable>
<!-- 预留区域 - 细胞信息 -->
<!-- 细胞信息 -->
<LineLabel label="template.dl.dl012.xbxx" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.xbxx"
:formConfig="xbxxConfig"
:formData="formData"
/>
</div>
<LineLabel label="template.dl.dl012.zbbz" />
<Step :ref="refConf.step" :formData="formData.stepData" />
<!-- 预留区域 - 培养信息 -->
<!-- 培养信息 -->
<LineLabel label="template.dl.dl012.pyxx" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.pyxx"
:formConfig="pyxxConfig"
@clickButton="handleClickButton"
:formData="formData"
/>
</div>
<BaseInfoFormPackage
fieldItemLabel="template.dl.dl007.bz"
@ -91,7 +110,9 @@ const refConf = {
base: 'baseInfoRef',
sysj: 'sysjTableRef',
yqsy: 'yqsyTableRef',
xbxx: 'xbxxRef',
step: 'stepRef',
pyxx: 'pyxxRef',
remark: 'remarkRef'
}
const refNames = Object.values(refConf)
@ -168,16 +189,15 @@ export default {
type: 'cellItem',
label: 'template.dl.dl012.czsj',
config: {
kssj: {
startDate: {
label: 'template.dl.dl012.kssj',
type: 'input',
disabled: true
},
jssj: {
endDate: {
label: 'template.dl.dl012.jssj',
type: 'input',
fillType: 'actFill',
maxlength: 200
disabled: true
}
}
}
@ -254,15 +274,151 @@ export default {
disabled: true
}
]
},
//
pyxxConfig() {
return [
{
type: 'step',
config: {
pyxbh: {
label: 'template.dl.dl012.pyxbh',
type: 'yq',
fillType: 'actFill'
},
pytjText: {
type: 'span',
label: ''
},
pykssj: {
label: 'template.dl.dl012.pykssj',
type: 'input',
fillType: 'actFill',
subType: 'button',
subKey: 'pykssjButton',
buttonName: 'template.dl.dl012.pykssjButton'
}
}
}
]
},
//
xbxxConfig() {
const config = {
xbmc: {
label: 'template.dl.dl012.xbmc',
type: 'select',
options: this.getDictOptions('business_dl_xbmc'),
fillType: 'preFill',
otherCode: 'xbmcOther'
},
xbzbqbh: {
label: 'template.dl.dl012.xbzbqbh',
type: 'xb',
fillType: 'actFill'
},
zbxbs: {
label: 'template.dl.dl012.zbxbs',
type: 'inputNumber',
fillType: 'preFill'
}
}
for (let index = 1; index <= this.zbxbs; index++) {
config['zbhxbbh_' + index] = {
label: 'template.dl.dl012.zbhxbbh',
type: 'input',
subType: 'span',
maxlength: 20,
subKey: 'zbhxbbhCodeSn_' + index,
fillType: 'preFill'
}
}
return [
{
type: 'step',
config: {
...config,
// zbhxbbh: {
// label: 'template.dl.dl012.zbhxbbh',
// type: 'input',
// subType: 'span',
// maxlength: 20,
// subKey: 'zbhxbbhCodeSn',
// fillType: 'preFill'
// },
zbhxbyjtj: {
label: 'template.dl.dl012.zbhxbyjtj',
type: 'inputNumber',
subType: 'select',
subKey: 'fshxbyjtjUnit',
fillType: 'preFill',
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
selectTo: 'zbhxbsjtjUnit' //
},
zbhxbsjtj: {
label: 'template.dl.dl012.zbhxbsjtj',
type: 'inputNumber',
subType: 'select',
subKey: 'zbhxbsjtjUnit',
fillType: 'actFill',
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
copyFrom: 'zbhxbyjtj' //
}
}
}
]
}
},
mounted() {
this.$nextTick(() => {
this.$refs[refConf.pyxx]?.updateFormData(
'pytjText',
'培养条件:温度为温度为37℃±2℃,CO2浓度为5%±0.5%',
{ isUpdateRecord: false, signData: null }
)
})
const data = this.getFilledFormDataByRefs([refConf.xbxx, refConf.base])
console.log(data)
const { zbxbs, zbhxbbh_1, startDate } = data || {}
if (!zbxbs) return
try {
this.zbxbs = Number(zbxbs)
} catch (error) {
this.zbxbs = 1
}
this.$nextTick(() => {
const updateData = {}
// Convert startDate from "2026-03-07 14:02:15" to "260307" (YYMMDD)
const formattedDate = startDate ? moment(startDate).format('YYMMDD') : ''
for (let index = 1; index <= this.zbxbs; index++) {
updateData['zbhxbbh_' + index] = zbhxbbh_1
updateData['zbhxbbhCodeSn_' + index] =
formattedDate + '-' + `${index}`.padStart(2, '0')
}
this.$refs[refConf.xbxx].batchUpdateFormData(updateData)
})
},
data() {
return {
formData: {},
refConf
refConf,
zbxbs: 1
}
},
methods: {
handleClickButton(e,signData) {
console.log(e)
const { subKey } = e || {}
if (subKey === 'pykssjButton') {
this.$refs[refConf.pyxx].updateFormData(
'pykssj',
moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData }
)
}
},
//
deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)

+ 363
- 11
src/views/business/comps/template/comps/dl/DL013.vue View File

@ -36,11 +36,59 @@
</template>
</CustomTable>
<!-- 预留区域 - 细胞信息 -->
<!-- 细胞信息 -->
<LineLabel label="template.dl.dl013.xbxx" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.xbxx"
:formConfig="xbxxConfig"
:formData="formData"
/>
</div>
<!-- 预留区域 - 测定信息 -->
<!-- 测定信息 -->
<LineLabel label="template.dl.dl013.cdxx" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.cdxx"
:formConfig="cdxxConfig"
:formData="formData"
/>
<div v-if="fillType === 'actFill'">
<el-button type="primary" @click="handleCdxxAdd">{{
$t('template.dl.dl013.addCdxx')
}}</el-button>
</div>
</div>
<!-- 测定信息第X次 -->
<div
class="template-form-item"
v-for="(cdxxItem, index) in formData.cdxxConfigs"
:key="'cdxx_' + cdxxItem.id"
>
<div class="flex-between">
<span>{{ $t('template.dl.dl013.cdxxTime', { index: index + 1 }) }}</span>
<el-button
v-if="fillType === 'actFill'"
type="danger"
plain
@click="handleCdxxDelete(cdxxItem)"
>{{ $t('template.common.deleteBtn') }}</el-button
>
</div>
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="`cdxx${index}Ref`"
:formConfig="getCdxxTimeConfig(index)"
:formData="cdxxItem"
@blur="(e) => onBlur(e, index)"
/>
</div>
<BaseInfoFormPackage
fieldItemLabel="template.dl.dl007.bz"
@ -63,12 +111,15 @@ 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'
import { getuuid } from '@/utils/index.js'
import { EventBus } from '@/utils/eventBus'
const refConf = {
base: 'baseInfoRef',
yqsy: 'yqsyTableRef',
remark: 'remarkRef'
remark: 'remarkRef',
xbxx: 'xbxxRef',
cdxx: 'cdxxRef'
}
const refNames = Object.values(refConf)
@ -145,16 +196,15 @@ export default {
type: 'cellItem',
label: 'template.dl.dl013.czsj',
config: {
kssj: {
startDate: {
label: 'template.dl.dl013.kssj',
type: 'input',
disabled: true
},
jssj: {
endDate: {
label: 'template.dl.dl013.jssj',
type: 'input',
fillType: 'actFill',
maxlength: 200
disabled: true
}
}
}
@ -194,6 +244,62 @@ export default {
disabled: true
}
]
},
xbxxConfig() {
return [
{
type: 'step',
config: {
xbmc: {
label: 'template.dl.dl013.xbmc',
type: 'select',
options: this.getDictOptions('business_dl_xbmc'),
fillType: 'actFill',
otherCode: 'xbmcOther'
},
xbbh: {
label: 'template.dl.dl013.xbbh',
type: 'xb',
fillType: 'actFill'
},
xbxytj: {
label: 'template.dl.dl013.xbxytj',
type: 'inputNumber',
subType: 'select',
subKey: 'xbxytjUnit',
fillType: 'actFill',
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10
}
}
}
]
},
cdxxConfig() {
return [
{
type: 'step',
config: {
sjmcdptj: {
label: 'template.dl.dl013.sjmcdptj',
type: 'inputNumber',
fillType: 'actFill'
},
cdcs: {
label: 'template.dl.dl013.cdcs',
type: 'inputNumber',
fillType: 'actFill',
disabled: true
},
pjxbmd: {
label: 'template.dl.dl013.pjxbmd',
type: 'inputNumber',
fillType: 'actFill',
disabled: true
}
}
}
]
}
},
data() {
@ -202,22 +308,263 @@ export default {
refConf
}
},
mounted() {
const formData = this.getFormDataByTemplateData()
// cdxxConfigs
if (!this.formData.cdxxConfigs) {
this.$set(this.formData, 'cdxxConfigs', [])
}
},
methods: {
//
getCdxxTimeConfig(index) {
return [
{
type: 'step',
config: {
xsbs: {
label: 'template.dl.dl013.xsbs',
type: 'inputNumber',
maxlength: 4,
fillType: 'actFill'
},
xbmd: {
label: 'template.dl.dl013.xbmd',
type: 'input',
fillType: 'actFill',
disabled: true
},
zsg: {
label: 'template.dl.dl013.zsg',
type: 'inputNumber',
fillType: 'actFill',
maxlength: 10
},
ysg: {
label: 'template.dl.dl013.ysg',
type: 'inputNumber',
fillType: 'actFill',
maxlength: 10
},
zxg: {
label: 'template.dl.dl013.zxg',
type: 'inputNumber',
fillType: 'actFill',
maxlength: 10
},
yxg: {
label: 'template.dl.dl013.yxg',
type: 'inputNumber',
fillType: 'actFill',
maxlength: 10
}
}
}
]
},
onBlur(e, index) {
console.log(e, 'e+++')
let xbmd = undefined
let xsbs = e.xsbs
let zsg = e.zsg
let ysg = e.ysg
let zxg = e.zxg
let yxg = e.yxg
if (xsbs && zsg && ysg && zxg && yxg) {
xsbs = this.getNumber(xsbs)
zsg = this.getNumber(zsg)
ysg = this.getNumber(ysg)
zxg = this.getNumber(zxg)
yxg = this.getNumber(yxg)
xbmd = (((zsg + zxg + ysg + yxg) / 4) * xsbs * 10000).toFixed(1)
}
this.$refs[`cdxx${index}Ref`]?.[0]?.updateFormData('xbmd', xbmd, {
isUpdateRecord: false,
signData: null
})
//
this.updatePjxbmd()
},
//
updatePjxbmd() {
if (!this.formData.cdxxConfigs || this.formData.cdxxConfigs.length === 0) {
return
}
let total = 0
let count = 0
for (let i = 0; i < this.formData.cdxxConfigs.length; i++) {
const cdxxData = this.$refs[`cdxx${i}Ref`]?.[0]?.getFilledFormData()
if (cdxxData && cdxxData.xbmd) {
total += this.getNumber(cdxxData.xbmd)
count++
}
}
const pjxbmd = count > 0 ? (total / count).toFixed(1) : undefined
this.$refs[refConf.cdxx]?.updateFormData('pjxbmd', pjxbmd, {
isUpdateRecord: false,
signData: null
})
},
// 0
getNumber(data) {
try {
return data ? Number(data) : 0
} catch (error) {
return 0
}
},
//
handleCdxxDelete(cdxxItem) {
const configIndex = this.formData.cdxxConfigs.findIndex(
(config) => config.id === cdxxItem.id
)
if (configIndex !== -1) {
//
const newConfigs = [...this.formData.cdxxConfigs]
newConfigs.splice(configIndex, 1)
this.$set(this.formData, 'cdxxConfigs', newConfigs)
//
this.$refs[refConf.cdxx]?.updateFormData('cdcs', newConfigs.length, {
isUpdateRecord: false,
signData: null
})
this.$nextTick(() => {
//
this.updatePjxbmd()
//
EventBus.$emit('onModifyRecord', {
type: 'fieldChanged',
newRecord: null,
resourceList: null
})
})
}
},
//
handleCdxxAdd() {
//
if (!this.formData.cdxxConfigs) {
this.$set(this.formData, 'cdxxConfigs', [])
}
//
this.formData.cdxxConfigs.push({
id: getuuid(),
xsbs: null,
xbmd: null,
zsg: null,
ysg: null,
zxg: null,
yxg: null
})
//
this.$refs[refConf.cdxx]?.updateFormData(
'cdcs',
this.formData.cdxxConfigs.length,
{
isUpdateRecord: false,
signData: null
}
)
this.$nextTick(() => {
//
EventBus.$emit('onModifyRecord', {
type: 'fieldChanged',
newRecord: null,
resourceList: null
})
})
},
//
deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(refNames)
const baseData = this.$refs[refConf.base]?.getFilledFormData() || {}
const yqsyData = this.$refs[refConf.yqsy]?.getFilledFormData() || {}
const xbxxData = this.$refs[refConf.xbxx]?.getFilledFormData() || {}
const cdxxData = this.$refs[refConf.cdxx]?.getFilledFormData() || {}
const remarkData = this.$refs[refConf.remark]?.getFilledFormData() || {}
//
const cdxxConfigsData = []
if (this.formData.cdxxConfigs && this.formData.cdxxConfigs.length > 0) {
for (let i = 0; i < this.formData.cdxxConfigs.length; i++) {
const id = this.formData.cdxxConfigs[i].id
const cdxxItemData =
this.$refs[`cdxx${i}Ref`]?.[0]?.getFilledFormData() || {}
cdxxConfigsData.push({
...cdxxItemData,
id
})
}
}
return {
...baseData,
...yqsyData,
...xbxxData,
...cdxxData,
cdxxConfigs: cdxxConfigsData,
...remarkData
}
},
//
async getFormData() {
return await this.validFormFields(refNames)
//
let refsToValidate = [
refConf.base,
refConf.yqsy,
refConf.xbxx,
refConf.cdxx,
refConf.remark
]
//
if (this.formData.cdxxConfigs && this.formData.cdxxConfigs.length > 0) {
for (let i = 0; i < this.formData.cdxxConfigs.length; i++) {
refsToValidate.push(`cdxx${i}Ref`)
}
}
const validFlag = await this.validFormFields(refsToValidate)
if (!validFlag) {
return false
}
return this.getFilledFormData()
},
//
async validFields() {
return await this.validFormFields(refNames)
//
let refsToValidate = [
refConf.base,
refConf.yqsy,
refConf.xbxx,
refConf.cdxx,
refConf.remark
]
//
if (this.formData.cdxxConfigs && this.formData.cdxxConfigs.length > 0) {
for (let i = 0; i < this.formData.cdxxConfigs.length; i++) {
refsToValidate.push(`cdxx${i}Ref`)
}
}
return await this.validFormFields(refsToValidate)
},
getResource() {
const stepResource = this.$refs.yqsyTableRef.getStepResource()
@ -264,4 +611,9 @@ export default {
font-size: 16px;
color: #303133;
}
.flex-between {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>

+ 560
- 149
src/views/business/comps/template/comps/dl/DL014.vue View File

@ -16,43 +16,8 @@
:formData="formData"
/>
<LineLabel label="template.dl.dl014.gyzjxx" />
<CustomTable
:columns="gyzjColumns"
:ref="refConf.gyzj"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`gyzjTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'gyzjTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<LineLabel label="template.dl.dl014.sysj" />
<CustomTable
:columns="sysjColumns"
:ref="refConf.sysj"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`sysjTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'sysjTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<TableList label="template.common.gyzjInfo" :columns="gyzjColumns" :dataSource="resourceGyzj" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
@ -81,8 +46,60 @@
:formData="formData"
/>
<!-- 预留区域 - 剂量组配制信息 -->
<!-- 剂量组配制信息 -->
<LineLabel label="template.dl.dl014.jlzpzxx" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
label=""
:ref="refConf.jlzInfo"
:formConfig="jlzInfoFormConfig"
:formData="formData"
@select="onSftjs9Change"
@clickButton="handleJlzzsButton"
@blur="onJlzInfoBlur"
/>
<!-- 剂量组名称列表 -->
<CustomTable
:columns="jlzmcTableColumns"
:ref="refConf.jlzmcTable"
:showOperation="false"
:showAddRow="false"
:formData="jlzmcTableFormData"
:prefixKey="`jlzmcTable`"
@blur="onJlzmcTableBlur"
></CustomTable>
<!-- 完成按钮 -->
<div class="jlzmc-complete-btn" v-if="fillType === 'preFill'">
<el-button type="primary" @click="handleJlzmcComplete">{{
$t('template.dl.dl014.wcButton')
}}</el-button>
</div>
<!-- 剂量组列表 -->
<CustomTable
:columns="jlzTableColumns"
:ref="refConf.jlzTable"
:showOperation="false"
:showAddRow="false"
:formData="jlzTableFormData"
:prefixKey="`jlzTable`"
>
<template
slot="operation"
slot-scope="{ row, rowIndex, columns }"
>
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'jlzTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<BaseInfoFormPackage
fieldItemLabel="template.dl.dl007.bz"
@ -105,14 +122,14 @@ 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',
gyzj: 'gyzjTableRef',
sysj: 'sysjTableRef',
yqsy: 'yqsyTableRef',
xbInfo: 'xbInfoRef',
jlzInfo: 'jlzInfoRef',
jlzmcTable: 'jlzmcTableRef',
jlzTable: 'jlzTableRef',
remark: 'remarkRef'
}
const refNames = Object.values(refConf)
@ -135,6 +152,20 @@ export default {
}
},
computed: {
//
jlzmcTableFormData() {
return {
stepTableFormData: this.formData.jlzmcTableData || [],
headerSelectFields: {}
}
},
//
jlzTableFormData() {
return {
stepTableFormData: this.formData.jlzTableData || [],
headerSelectFields: this.formData.jlzHeaderSelectFields || {}
}
},
//
remarkConfig() {
return [
@ -190,12 +221,12 @@ export default {
type: 'cellItem',
label: 'template.dl.dl014.czsj',
config: {
kssj: {
startDate: {
label: 'template.dl.dl014.kssj',
type: 'input',
disabled: true
},
jssj: {
endDate: {
label: 'template.dl.dl014.jssj',
type: 'input',
disabled: true
@ -204,142 +235,276 @@ export default {
}
]
},
//
gyzjColumns() {
// 使
yqsyColumns() {
return [
{
label: 'template.dl.dl014.mc',
prop: 'mc',
bodyType: 'input',
label: 'template.dl.dl007.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl014.bh',
prop: 'bh',
label: 'template.dl.dl007.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyFillType: 'actFill'
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl014.wzly',
prop: 'wzly',
label: 'template.dl.dl007.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyFillType: 'actFill'
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl014.nd',
prop: 'nd',
label: 'template.dl.dl007.xccsjzjdrq',
prop: 'jzrq',
bodyType: 'input',
bodyFillType: 'actFill'
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
}
]
},
//
xbInfoFormConfig() {
return [
{
type: 'cellItem',
config: {
bltj: {
label: 'template.dl.dl014.bltj',
type: 'select',
options: this.getDictOptions('business_dl_qsxjbltj'),
fillType: 'preFill',
otherCode: 'bltjOther'
},
xbmc: {
label: 'template.dl.dl014.xbmc',
type: 'select',
options: this.getDictOptions('business_dl_xbmc'),
fillType: 'preFill',
otherCode: 'xbmcOther'
}
}
}
]
},
//
jlzInfoFormConfig() {
const firstStepConfig = {
pxpb: {
label: 'template.dl.dl014.pxpb',
type: 'inputNumber',
fillType: 'preFill'
},
sftjs9: {
label: 'template.dl.dl014.sftjs9',
type: 'select',
options: [
{ label: '是', value: '是' },
{ label: '否', value: '否' }
],
fillType: 'preFill'
}
}
// S9S9
if (this.isSftjs9Yes) {
firstStepConfig.s9hhybh = {
label: 'template.dl.dl014.s9hhybh',
type: 'sj',
fillType: 'actFill'
}
}
//
const jlzzsConfig = {
label: 'template.dl.dl014.jlzzs',
type: 'inputNumber',
fillType: 'preFill'
}
// preFill
if (this.fillType === 'preFill') {
jlzzsConfig.subType = 'button'
jlzzsConfig.subKey = 'jlzzsButton'
jlzzsConfig.buttonName = 'template.dl.dl014.qrButton'
}
firstStepConfig.jlzzs = jlzzsConfig
return [
{
label: 'template.dl.dl014.sxr',
prop: 'sxr',
bodyType: 'input',
bodyFillType: 'actFill'
type: 'step',
config: firstStepConfig
}
]
},
//
sysjColumns() {
//
jlzmcTableColumns() {
return [
{
label: 'template.dl.dl014.sjmc',
prop: 'sjmc',
label: 'template.dl.dl014.jlzzmc',
prop: 'jlzzmc',
bodyType: 'input',
bodyFillType: 'actFill'
},
bodyFillType: 'preFill'
}
]
},
//
jlzTableColumns() {
const columns = [
{
label: 'template.dl.dl014.bh',
prop: 'bh',
label: 'template.dl.dl014.jlzb',
prop: 'jlzb',
bodyType: 'input',
bodyFillType: 'actFill'
bodyFillType: 'preFill'
},
{
label: 'template.dl.dl014.ph',
prop: 'ph',
bodyType: 'input',
label: 'template.dl.dl014.xybh',
prop: 'xybh',
bodyType: 'sj',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl014.ndhlcd',
prop: 'ndhlcd',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl014.gysqgc',
prop: 'gysqgc',
bodyType: 'select',
bodyFillType: 'actFill',
bodyOptions: [
{ label: '良好', value: '良好' },
{ label: '中', value: '中' },
{ label: '差', value: '差' }
]
},
{
label: 'template.dl.dl014.ly',
prop: 'ly',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl014.ysplyjrl',
prop: 'ysplyjrl',
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
headerSelectKey: 'ysplyjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'),
fillType: 'preFill'
},
{
label: 'template.dl.dl014.sxr',
prop: 'sxr',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl014.sjplyjrl',
prop: 'sjplyjrl',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
headerSelectKey: 'ysplyjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'),
copyFrom: 'ysplyjrl',
compareTo: 'ysplyjrl',
fillType: 'preFill'
}
]
},
// 使
yqsyColumns() {
return [
// S9S9
if (this.isSftjs9Yes) {
columns.push(
{
label: 'template.dl.dl014.yss9hhyjrl',
prop: 'yss9hhyjrl',
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
headerSelectKey: 'yss9hhyjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'),
fillType: 'preFill'
},
{
label: 'template.dl.dl014.sjs9hhyjrl',
prop: 'sjs9hhyjrl',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
headerSelectKey: 'yss9hhyjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'),
copyFrom: 'yss9hhyjrl',
compareTo: 'yss9hhyjrl',
fillType: 'preFill'
}
)
}
//
columns.push(
{
label: 'template.dl.dl014.yqmc',
prop: 'yqmc',
label: 'template.dl.dl014.gspbh',
prop: 'gspbh',
bodyType: 'input',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl014.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl014.ysgspjrl',
prop: 'ysgspjrl',
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
headerSelectKey: 'ysgspjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'),
fillType: 'preFill'
},
{
label: 'template.dl.dl014.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
label: 'template.dl.dl014.sjgspjrl',
prop: 'sjgspjrl',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
headerSelectKey: 'ysgspjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'),
copyFrom: 'ysgspjrl',
compareTo: 'ysgspjrl',
fillType: 'preFill'
},
{
label: 'template.dl.dl014.xccsjzjdrq',
prop: 'xccsjzjdrq',
bodyType: 'input',
bodyDisabled: true,
label: 'template.dl.dl014.gyhzqk',
prop: 'gyhzqk',
bodyType: 'select',
bodyFillType: 'actFill',
disabled: true
bodyOptions: [
{ label: '严重', value: '严重' },
{ label: '中等', value: '中等' },
{ label: '较少', value: '较少' },
{ label: '无', value: '无' }
]
}
]
},
//
xbInfoFormConfig() {
return [
{
type: 'cellItem',
config: {
bltj: {
label: 'template.dl.dl014.bltj',
type: 'select',
options: this.getDictOptions('business_bltj'),
fillType: 'preFill',
otherCode: 'bltjOther'
},
xbmc: {
label: 'template.dl.dl014.xbmc',
type: 'select',
options: this.getDictOptions('business_xbmc'),
fillType: 'preFill',
otherCode: 'xbmcOther'
}
}
}
]
)
return columns
}
},
data() {
return {
formData: {},
refConf
refConf,
isSftjs9Yes: false, // S9
oldJlzzs: null, //
oldPxpb: null //
}
},
mounted() {
// isSftjs9Yes
if (this.formData.sftjs9) {
this.isSftjs9Yes =
this.formData.sftjs9 === '是' || this.formData.sftjs9 === 'Yes'
}
//
if (this.formData.jlzzs) {
this.oldJlzzs = this.formData.jlzzs
}
//
if (this.formData.pxpb) {
this.oldPxpb = this.formData.pxpb
}
},
methods: {
@ -349,25 +514,131 @@ export default {
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(refNames)
const baseData = this.$refs[refConf.base]?.getFilledFormData() || {}
const yqsyData = this.$refs[refConf.yqsy]?.getFilledFormData() || {}
const xbInfoData = this.$refs[refConf.xbInfo]?.getFilledFormData() || {}
const jlzInfoData = this.$refs[refConf.jlzInfo]?.getFilledFormData() || {}
const jlzmcTableData =
this.$refs[refConf.jlzmcTable]?.getFilledFormData() || {}
const jlzTableData =
this.$refs[refConf.jlzTable]?.getFilledFormData() || {}
const remarkData = this.$refs[refConf.remark]?.getFilledFormData() || {}
return {
...baseData,
...yqsyData,
...xbInfoData,
...jlzInfoData,
...remarkData,
// formData
jlzmcTableData: jlzmcTableData.stepTableFormData || [],
jlzTableData: jlzTableData.stepTableFormData || [],
jlzHeaderSelectFields: jlzTableData.headerSelectFields || {}
}
},
//
async getFormData() {
return await this.validFormFields(refNames)
const refsToValidate = [
refConf.base,
refConf.yqsy,
refConf.xbInfo,
refConf.jlzInfo,
refConf.jlzmcTable,
refConf.jlzTable,
refConf.remark
]
const validFlag = await this.validFormFields(refsToValidate)
if (!validFlag) {
return false
}
//
const jlzmcTableData = this.$refs[refConf.jlzmcTable]?.getFilledFormData()
const jlzmcList = jlzmcTableData?.stepTableFormData || []
if (jlzmcList.length === 0) {
this.$message.warning('请先生成剂量组名称')
return false
}
const jlzTableData = this.$refs[refConf.jlzTable]?.getFilledFormData()
const jlzList = jlzTableData?.stepTableFormData || []
if (jlzList.length === 0) {
this.$message.warning('请先生成剂量组列表数据')
return false
}
return this.getFilledFormData()
},
//
async validFields() {
return await this.validFormFields(refNames)
const refsToValidate = [
refConf.base,
refConf.yqsy,
refConf.xbInfo,
refConf.jlzInfo,
refConf.jlzmcTable,
refConf.jlzTable,
refConf.remark
]
const validFlag = await this.validFormFields(refsToValidate)
if (!validFlag) {
return false
}
//
const jlzmcTableData = this.$refs[refConf.jlzmcTable]?.getFilledFormData()
const jlzmcList = jlzmcTableData?.stepTableFormData || []
if (jlzmcList.length === 0) {
this.$message.warning('请先生成剂量组名称')
return false
}
const jlzTableData = this.$refs[refConf.jlzTable]?.getFilledFormData()
const jlzList = jlzTableData?.stepTableFormData || []
if (jlzList.length === 0) {
this.$message.warning('请先生成剂量组列表数据')
return false
}
return true
},
getResource() {
const sysjStepResource = this.$refs.sysjTableRef.getStepResource()
const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource()
// 使
this.resourceTmp = [
...(sysjStepResource.sjResource || []),
...(yqsyStepResource.sjResource || [])
]
this.yqResourceTmp = yqsyStepResource.yqResource || []
// 使
const yqsyData = this.$refs.yqsyTableRef?.getFilledFormData()
const yqsyList = yqsyData?.stepTableFormData || []
//
this.yqResourceTmp = yqsyList
.filter(item => item.yqbh)
.map(item => ({
bh: item.yqbh,
mc: item.yqmc,
xh: item.yqxh
}))
// S9
const jlzData = this.$refs.jlzTableRef?.getFilledFormData()
const jlzList = jlzData?.stepTableFormData || []
const sjResourceFromJlz = []
jlzList.forEach(item => {
//
if (item.xybh) {
sjResourceFromJlz.push({
bh: item.xybh,
type: 'cell'
})
}
})
this.resourceTmp = sjResourceFromJlz
return this.resourceTmp
},
onRegentSubmit(e) {
@ -378,11 +649,154 @@ export default {
const params = {
yqmc: row.mc,
yqxh: row.xh,
xccsjzjdrq: row.jzrq
jzrq: row.jzrq
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
},
// S9
onSftjs9Change(e) {
const { key, value } = e
if (key === 'sftjs9') {
// isSftjs9Yes computed
this.isSftjs9Yes = value === '是' || value === 'Yes'
}
},
// blur
onJlzInfoBlur(e) {
const { key, value } = e
//
if (key === 'jlzzs') {
//
if (this.oldJlzzs !== null && this.oldJlzzs !== value) {
//
this.$set(this.formData, 'jlzmcTableData', [])
//
this.$set(this.formData, 'jlzTableData', [])
this.$message.info('剂量组总数已改变,已清空剂量组名称和剂量组列表数据')
}
//
this.oldJlzzs = value
}
//
if (key === 'pxpb') {
//
if (this.oldPxpb !== null && this.oldPxpb !== value) {
//
this.$set(this.formData, 'jlzTableData', [])
this.$message.info('平行瓶数已改变,已清空剂量组列表数据')
}
//
this.oldPxpb = value
}
},
// blur
onJlzmcTableBlur(e) {
const { colKey } = e
//
if (colKey === 'jlzzmc') {
//
const jlzTableData = this.formData.jlzTableData || []
if (jlzTableData.length > 0) {
//
this.$set(this.formData, 'jlzTableData', [])
this.$message.info('剂量组名称已改变,已清空剂量组列表数据')
}
}
},
//
handleJlzzsButton(item) {
const { subKey } = item || {}
if (subKey === 'jlzzsButton') {
//
const jlzInfoData = this.$refs[refConf.jlzInfo]?.getFilledFormData()
const jlzzs = jlzInfoData?.jlzzs
// 0
if (!jlzzs || jlzzs <= 0) {
this.$message.warning('请输入大于0的剂量组总数')
return
}
//
const newJlzmcRows = []
for (let i = 0; i < jlzzs; i++) {
newJlzmcRows.push({
jlzzmc: ''
})
}
// formDataCustomTable
this.$set(this.formData, 'jlzmcTableData', newJlzmcRows)
this.$message.success(`已生成 ${jlzzs} 个剂量组名称`)
}
},
//
async handleJlzmcComplete() {
// 1.
const jlzInfoData = this.$refs[refConf.jlzInfo]?.getFilledFormData()
const pxpb = jlzInfoData?.pxpb
if (!pxpb || pxpb <= 0) {
this.$message.warning('请先输入平行瓶数')
return
}
// 2.
try {
await this.$refs[refConf.jlzmcTable]?.getFormData()
} catch (error) {
this.$message.warning('请完善剂量组名称信息')
return
}
// 3.
const jlzmcTableData = this.$refs[refConf.jlzmcTable]?.getFilledFormData()
const jlzmcList = jlzmcTableData?.stepTableFormData || []
if (jlzmcList.length === 0) {
this.$message.warning('请先设置剂量组名称')
return
}
//
const newRows = []
//
jlzmcList.forEach((jlzmcItem) => {
const jlzzmc = jlzmcItem.jlzzmc
// pxpb
for (let i = 0; i < pxpb; i++) {
newRows.push({
jlzb: jlzzmc, // 使
xybh: '',
gysqgc: '',
ysplyjrl: '',
sjplyjrl: '',
yss9hhyjrl: '',
sjs9hhyjrl: '',
gspbh: '',
ysgspjrl: '',
sjgspjrl: '',
gyhzqk: ''
})
}
})
// formDataCustomTable
this.$set(this.formData, 'jlzTableData', newRows)
this.$message.success(`已生成 ${newRows.length} 行剂量组数据`)
},
//
async onSave() {
const formData = this.getStepResource()
@ -399,13 +813,10 @@ export default {
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
.jlzmc-complete-btn {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
justify-content: center;
margin: 15px 0;
}
</style>

+ 168
- 132
src/views/business/comps/template/comps/dl/DL015.vue View File

@ -16,55 +16,38 @@
:formData="formData"
/>
<LineLabel label="template.dl.dl015.sysj" />
<CustomTable
:columns="sysjColumns"
:ref="refConf.sysj"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.dl.dl015.xbxx" />
<BaseInfoFormPackage
:ref="refConf.xbInfo"
:formConfig="xbInfoFormConfig"
:formData="formData"
:prefixKey="`sysjTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'sysjTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
@onRegentSubmit="onRegentSubmit"
/>
<LineLabel label="template.dl.dl007.yqsyxx" />
<!-- 换液情况 -->
<LineLabel label="template.dl.dl015.hyqk" />
<CustomTable
:columns="yqsyColumns"
:ref="refConf.yqsy"
:columns="hyqkColumns"
:ref="refConf.hyqk"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`yqsyTable`"
:showOperation="false"
:showAddRow="false"
:formData="hyqkFormData"
:prefixKey="`hyqkTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'yqsyTableRef')"
@deleteRow="() => deleteTableRow(rowIndex, 'hyqkTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<LineLabel label="template.dl.dl015.xbxx" />
<BaseInfoFormPackage
:ref="refConf.xbInfo"
:formConfig="xbInfoFormConfig"
:formData="formData"
/>
<!-- 预留区域 - 换液情况 -->
<LineLabel label="template.dl.dl015.hyqk" />
<LineLabel label="template.dl.dl015.czbz" />
<Step :ref="refConf.step" :formData="formData.stepData" />
@ -89,13 +72,11 @@ 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',
sysj: 'sysjTableRef',
yqsy: 'yqsyTableRef',
xbInfo: 'xbInfoRef',
hyqk: 'hyqkTableRef',
step: 'stepRef',
remark: 'remarkRef'
}
@ -119,6 +100,13 @@ export default {
}
},
computed: {
//
hyqkFormData() {
return {
stepTableFormData: this.formData.hyqkTableData || [],
headerSelectFields: {}
}
},
//
remarkConfig() {
return [
@ -174,12 +162,12 @@ export default {
type: 'cellItem',
label: 'template.dl.dl015.czsj',
config: {
kssj: {
startDate: {
label: 'template.dl.dl015.kssj',
type: 'input',
disabled: true
},
jssj: {
endDate: {
label: 'template.dl.dl015.jssj',
type: 'input',
disabled: true
@ -188,98 +176,102 @@ export default {
}
]
},
//
sysjColumns() {
//
xbInfoFormConfig() {
return [
{
label: 'template.dl.dl015.sjmc',
prop: 'sjmc',
bodyType: 'input',
bodyFillType: 'actFill'
},
type: 'cellItem',
config: {
qxbd: {
label: 'template.dl.dl015.qxbd',
type: 'qxbd',
qxbdType:'DL014',
fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
},
bltj: {
label: 'template.dl.dl015.bltj',
type: 'select',
options: this.getDictOptions('business_dl_qsxjbltj'),
fillType: 'preFill',
otherCode: 'bltjOther'
}
}
}
]
},
//
hyqkColumns() {
return [
{
label: 'template.dl.dl015.bh',
prop: 'bh',
label: 'template.dl.dl015.jlzb',
prop: 'jlzb',
bodyType: 'input',
bodyFillType: 'actFill'
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
},
{
label: 'template.dl.dl015.ph',
prop: 'ph',
label: 'template.dl.dl015.xybh',
prop: 'xybh',
bodyType: 'input',
bodyFillType: 'actFill'
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
},
{
label: 'template.dl.dl015.ndhlcd',
prop: 'ndhlcd',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl015.hyqszqk',
prop: 'hyqszqk',
bodyType: 'select',
bodyFillType: 'actFill',
bodyOptions: [
{ label: '良好', value: '良好' },
{ label: '中', value: '中' },
{ label: '差', value: '差' }
]
},
{
label: 'template.dl.dl015.ly',
prop: 'ly',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl015.hyqcdjqk',
prop: 'hyqcdjqk',
bodyType: 'select',
bodyFillType: 'actFill',
bodyOptions: [
{ label: '严重', value: '严重' },
{ label: '中等', value: '中等' },
{ label: '较少', value: '较少' },
{ label: '无', value: '无' }
]
},
{
label: 'template.dl.dl015.sxr',
prop: 'sxr',
bodyType: 'input',
bodyFillType: 'actFill'
}
]
},
// 使
yqsyColumns() {
return [
{
label: 'template.dl.dl015.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl015.hyqqtqk',
prop: 'hyqqtqk',
bodyType: 'select',
bodyFillType: 'actFill',
bodyOptions: [
{ label: '大量贴壁细胞变圆', value: '大量贴壁细胞变圆' },
{ label: '无', value: '无' }
]
},
{
label: 'template.dl.dl015.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl015.qqpyy',
prop: 'qqpyy',
bodyType: 'checkbox',
bodyFillType: 'actFill',
checkboxLabel: ''
},
{
label: 'template.dl.dl015.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
label: 'template.dl.dl015.pbsxd',
prop: 'pbsxd',
bodyType: 'checkbox',
bodyFillType: 'actFill',
checkboxLabel: ''
},
{
label: 'template.dl.dl015.xccsjzjdrq',
prop: 'xccsjzjdrq',
bodyType: 'input',
bodyDisabled: true,
label: 'template.dl.dl015.pyybrl',
prop: 'pyybrl',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
disabled: true
}
]
},
//
xbInfoFormConfig() {
return [
{
type: 'cellItem',
config: {
qxbd: {
label: 'template.dl.dl015.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
},
bltj: {
label: 'template.dl.dl015.bltj',
type: 'select',
options: this.getDictOptions('business_bltj'),
fillType: 'preFill',
otherCode: 'bltjOther'
}
}
bodyMaxlength: 10
}
]
}
@ -297,7 +289,15 @@ export default {
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(refNames)
const baseData = this.getFilledFormDataByRefs(refNames)
//
const hyqkData = this.$refs[refConf.hyqk]?.getFilledFormData()
if (hyqkData) {
baseData.hyqkTableData = hyqkData.stepTableFormData || []
}
return baseData
},
//
async getFormData() {
@ -308,32 +308,68 @@ export default {
return await this.validFormFields(refNames)
},
getResource() {
const sysjStepResource = this.$refs.sysjTableRef.getStepResource()
const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource()
const stepResource = this.$refs.stepRef.getStepResource()
// 使
this.resourceTmp = [
...(sysjStepResource.sjResource || []),
...(yqsyStepResource.sjResource || []),
...(stepResource.sjResource || [])
]
this.yqResourceTmp = [
...(yqsyStepResource.yqResource || []),
...(stepResource.yqResource || [])
]
const hyqkData = this.$refs.hyqkTableRef?.getFilledFormData()
const hyqkList = hyqkData?.stepTableFormData || []
//
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
//
const sjResourceFromHyqk = hyqkList
.filter(item => item.xybh)
.map(item => ({
bh: item.xybh,
type: 'cell'
}))
this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk]
return this.resourceTmp
},
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { selectInfo, key } = e
const { row } = selectInfo
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
yqxh: row.xh,
xccsjzjdrq: row.jzrq
if (key === 'qxbd') {
try {
//
const bdnr = JSON.parse(row.bdnr)
console.log('前序表单数据:', bdnr)
//
const jlzTableData = bdnr.jlzTableData || []
if (jlzTableData.length === 0) {
//
this.$set(this.formData, 'hyqkTableData', [])
this.$message.warning('前序表单中没有剂量组数据')
return
}
//
const hyqkData = jlzTableData.map(item => ({
jlzb: item.jlzb || '', //
xybh: item.xybh || '', //
hyqszqk: '', //
hyqcdjqk: '', //
hyqqtqk: '', //
qqpyy: '', //
pbsxd: '', // PBS
pyybrl: '' //
}))
// 使 $set formData CustomTable
this.$set(this.formData, 'hyqkTableData', hyqkData)
this.$message.success(`已从前序表单加载 ${hyqkData.length} 条剂量组数据`)
} catch (error) {
console.error('解析前序表单数据失败:', error)
//
this.$set(this.formData, 'hyqkTableData', [])
this.$message.error('解析前序表单数据失败')
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
},
//

+ 50
- 13
src/views/business/comps/template/comps/dl/DL016.vue View File

@ -12,16 +12,16 @@
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl016.xbxx" label="template.dl.dl016.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" @onRegentSubmit="onRegentSubmit"
/>
<LineLabel label="template.dl.dl016.qcxjjyqk" />
<CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord" @onRegentSubmit="(e) => onRegentSubmit"
@beforeSaveRecord = "beforeSaveRecord"
:showAddRow="false" :showOperation="false"
ref="stepTableRef" :columns="stepColumns" :formData="formData">
ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="qcxjjyqkFormData">
</CustomTable>
<LineLabel label="template.dl.dl016.czbz" />
@ -62,6 +62,13 @@ export default {
},
},
computed: {
//
qcxjjyqkFormData() {
return {
stepTableFormData: this.formData.qcxjjyqkData || [],
headerSelectFields: {}
}
},
//
remarkConig() {
return [
@ -136,7 +143,7 @@ export default {
label: 'template.dl.dl016.qxbd',
type: 'qxbd',
fillType: 'actFill',
qxbdType:'DL017',
qxbdType:'DL014',
filledCodes:['bdmc','bdbh'],
},
bltj: {
@ -160,6 +167,7 @@ export default {
bodyType: "input",
bodyFillType: "actFill",
width: 180,
bodyDisabled: true,
},
{
label: "template.dl.dl016.xybh",
@ -168,7 +176,7 @@ export default {
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
// bodyDisabled: true,
bodyDisabled: true,
},
{
label: "template.dl.dl016.qsxjjrl",
@ -191,16 +199,45 @@ export default {
},
methods: {
onRegentSubmit(e) {
debugger
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('selectInfo==============',selectInfo,key,rowIndex)
if (key === 'qxbd') {
try {
//
const bdnr = JSON.parse(row.bdnr)
console.log('前序表单数据:', bdnr)
//
const qcxjjyqkData = bdnr.jlzTableData || []
// if (qcxjjyqkData.length === 0) {
// this.$message.warning('')
// return
// }
//
const itemData = qcxjjyqkData.map(item => ({
jlzb: item.jlzb || '', //
xybh: item.xybh || '', //
hyqszqk: '', //
hyqcdjqk: '', //
hyqqtqk: '', //
qqpyy: '', //
pbsxd: '', // PBS
pyybrl: '' //
}))
debugger
// 使 $set formData CustomTable
this.$set(this.formData, 'qcxjjyqkData', itemData)
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
yqxh: row.xh,
xccsjzjdrq: row.jzrq
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
} catch (error) {
console.error('解析前序表单数据失败:', error)
this.$message.error('解析前序表单数据失败')
}
// this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
},
//table header
@ -269,11 +306,11 @@ export default {
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "qcxjjyqkTableRef", "stepRef","remarkRef"])
},
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]);
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "qcxjjyqkTableRef", "stepRef","remarkRef"]);
return content;
},
getResource() {

+ 11
- 9
src/views/business/comps/template/comps/dl/DL017.vue View File

@ -57,7 +57,7 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion
export default {
name: "DL017",
dicts: [
'business_dl_qsxjbltj','business_tjdw','business_dl_sjqszqk','business_dl_sjqcdqk','business_dl_sjqqtqk'
'business_dl_qsxjbltj','business_tjdw','business_dl_sjqszqk','business_dl_sjqcdqk','business_dl_sjqqtqk','business_dl_xbmc'
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
@ -111,8 +111,11 @@ export default {
config: {
sydd: {
label: 'template.dl.dl017.sydd',
type: "input",
fillType: "actFill",
type: 'select',
fillType: 'actFill',
options: this.getDictOptions('business_dl_xbmc'),
otherCode: 'xbmcOther',
showOtherLabel:false
},
}
},
@ -158,7 +161,7 @@ export default {
}
]
},
//
//
stepColumns() {
return [
{
@ -278,14 +281,13 @@ export default {
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('selectInfo==============',selectInfo)
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
yqxh: row.xh,
xccsjzjdrq: row.jzrq
jlzb: row.mc,
xybh: row.xh,
}
// this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
},
//table header

+ 28
- 15
src/views/business/comps/template/comps/dl/DL018.vue View File

@ -19,7 +19,7 @@
<CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord"
@beforeSaveRecord = "beforeSaveRecord" @onRegentSubmit="(e) => onRegentSubmit"
:showAddRow="false" :showOperation="false"
ref="stepTableRef" :columns="stepColumns" :formData="formData">
<!-- <template slot="operation" slot-scope="{ row, rowIndex, columns }">
@ -167,7 +167,7 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
disabled: true,
bodyDisabled: true,
},
{
@ -176,7 +176,7 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
disabled: true,
bodyDisabled: true,
},
{
@ -185,8 +185,11 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
disabled: true,
subType: 'button',
subKey: 'rsks',
buttonName: 'template.dl.dl018.ksButton',
},
{
label: "template.dl.dl018.rsjs",
@ -194,52 +197,50 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
disabled: true,
subType: 'button',
subKey: 'rsjs',
buttonName: 'template.dl.dl018.jsButton',
},
{
label: "template.dl.dl018.zs",
prop: "zs",
width: 180,
bodyType: "input",
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},
{
label: "template.dl.dl018.ys",
prop: "ys",
width: 180,
bodyType: "input",
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},
{
label: "template.dl.dl018.zy",
prop: "zy",
width: 180,
bodyType: "input",
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},
{
label: "template.dl.dl018.yx",
prop: "yx",
width: 180,
bodyType: "input",
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
},
{
label: "template.dl.dl018.tj",
prop: "tj",
width: 180,
bodyType: "input",
bodyType: "inputNumber",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyDisabled: true,
}
]
@ -253,6 +254,18 @@ export default {
mounted() {
},
methods: {
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('selectInfo==============',selectInfo)
if (key === 'yqbh') {
const params = {
jlzb: row.mc,
xybh: row.xh,
}
this.$refs.stepTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
},
//table header
onHeaderSelectChange(data){
const {key, headerSelectFields,dataSource=[]} = data;

+ 17
- 5
src/views/business/comps/template/comps/dl/DL019.vue View File

@ -19,7 +19,7 @@
<CustomTable
@headerSelectChange="onHeaderSelectChange"
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur"
@beforeSaveRecord = "beforeSaveRecord"
@beforeSaveRecord = "beforeSaveRecord" @onRegentSubmit="(e) => onRegentSubmit"
:showAddRow="false" :showOperation="false"
ref="stepTableRef" :columns="stepColumns" :formData="formData">
<!-- <template slot="operation" slot-scope="{ row, rowIndex, columns }">
@ -167,7 +167,7 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
disabled: true,
bodyDisabled: true,
},
{
@ -176,7 +176,7 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
disabled: true,
bodyDisabled: true,
},
{
@ -185,7 +185,7 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyMaxlength: 50,
bodyDisabled: true,
},
{
@ -194,7 +194,7 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
bodyMaxlength: 10,
bodyMaxlength: 50,
bodyDisabled: true,
}
]
@ -208,6 +208,18 @@ export default {
mounted() {
},
methods: {
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('selectInfo==============',selectInfo)
if (key === 'yqbh') {
const params = {
jlzb: row.mc,
xybh: row.xh,
}
this.$refs.stepTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
},
//table header
onHeaderSelectChange(data){
const {key, headerSelectFields,dataSource=[]} = data;

+ 64
- 59
src/views/business/comps/template/comps/dl/DL024.vue View File

@ -8,33 +8,30 @@
<div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- 仪器使用信息 -->
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<LineLabel label="template.dl.dl021.gcqk" />
<!-- 观察情况 -->
<LineLabel label="template.dl.dl024.xbpyxx" />
<!-- 操作记录 -->
<div class="template-form-item">
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
@onRegentSubmit="onRegentSubmit"
:formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
:formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable
:ref="`tableRef`"
:columns="tableColumns"
:formData="formData"
operationWidth = "80px"
:prefixKey = "`table`"
fieldItemLabel = "template.dl.dl021.gcqk"
:showAddRow="fillType === 'actFill'"
:showOperation="fillType === 'actFill'"
fieldItemLabel = "template.dl.dl024.gcqk"
:showAddRow="false"
:showOperation="false"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
</template>
</CustomTable>
</div>
</div>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
@ -57,7 +54,7 @@ import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
export default {
name: "DL024",
name: "dl024",
dicts: [
'business_dl_xbmc'
],
@ -106,10 +103,23 @@ export default {
disabled: true,
},
}
},{
type: "cellItem",
label: 'template.dl.dl024.sydd',
config: {
sydd: {
label: 'template.dl.dl024.sydd',
type: 'select',
fillType: 'actFill',
options: this.getDictOptions('business_sydd'),
otherCode: 'syddOther',
showOtherLabel:false
},
}
},
{
{
type: "cellItem",
label: 'template.dl.dl021.czsj',
label: 'template.dl.dl024.czsj',
config: {
startDate: {
label: 'template.common.startTime',
@ -124,55 +134,50 @@ export default {
]
},
//
tableColumns() {
return [{
label: 'template.dl.dl021.bpbh',
prop: 'bpbh',
bodyType: 'input',
bodyFillType: 'actFill',
width: 100,
bodyMaxlength: 50,
},{
label: 'template.dl.dl021.gcxps',
prop: 'gcxps',
bodyType: 'input',
bodyFillType: 'actFill',
width: 100,
bodyMaxlength: 50,
},{
label: 'template.dl.dl021.zqxxbs',
prop: 'zqxxbs',
bodyType: 'input',
bodyFillType: 'actFill',
width: 80,
bodyMaxlength: 50,
}]
},
//
stepFormConfig() {
return [
//
stepFormConfig(){
return [
{
type: "step",
type: "cellItem",
config: {
xbmc: {
label: 'template.dl.dl021.xbmc',
type: 'select',
fillType: 'actFill',
options: this.getDictOptions('business_dl_xbmc'),
otherCode: 'xbmcOther',
showOtherLabel:false
},
xwj: {
qxbd: {
// span:1,
label: 'template.dl.dl021.xwj',
label: 'template.dl.dl024.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
pykssj:{
label: 'template.dl.dl024.pykssj',
type: 'input',
fillType: 'actFill',
subType: 'button',
subKey: 'pyjssj',
buttonName: 'template.dl.dl024.jsButton',
},
pyjssj: {
label: 'template.dl.dl024.pyjssj',
type: 'input',
fillType: 'actFill',
subType: 'button',
subKey: 'pyjssj',
buttonName: 'template.dl.dl024.jsButton',
},
}
}
]
},
tableColumns() {
return [
{
label: 'template.dl.dl024.xbbh',
prop: 'xbbh',
bodyType: 'input',
bodyFillType: 'actFill',
width: 100,
bodyMaxlength: 50,
}
]
},
},
data() {
@ -183,11 +188,11 @@ export default {
mounted() {
},
methods: {
//
//
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('选择显微镜预留===',row)
console.log('选择仪器编号预留===',row)
// if (key === 'yqbh' && this.$refs.yqsyTableRef) {
// const params = {
// yqmc: row.mc,

+ 1
- 1
src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue View File

@ -133,7 +133,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},

+ 1
- 1
src/views/business/comps/template/comps/gsp/GSP001.vue View File

@ -132,7 +132,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},

+ 1
- 2
src/views/business/comps/template/comps/gsp/GSP002.vue View File

@ -149,7 +149,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: 'inputNumber',
fillType: 'actFill',
fillType: 'preFill',
prepend: 'V',
maxlength: 50
}
@ -519,7 +519,6 @@ export default {
const { rowData, headerSelectFields } = val;
//(+)
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
debugger
let postData = {
mc: null,
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,

+ 1
- 1
src/views/business/comps/template/comps/gsp/GSP003.vue View File

@ -155,7 +155,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},

+ 1
- 1
src/views/business/comps/template/comps/gsp/GSP004.vue View File

@ -162,7 +162,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: 'inputNumber',
fillType: 'actFill',
fillType: 'preFill',
prepend: 'V',
maxlength: 50
}

+ 159
- 19
src/views/business/comps/template/comps/gsp/GSP005.vue View File

@ -34,7 +34,7 @@
$t('template.common.deleteBtn')
}}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.gsp.GSP005.kspz') }}</el-button>
@click="zlKspz(zlIndex)">{{ $t('template.gsp.GSP005.kspz') }}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.common.bqdy') }}</el-button>
</div>
@ -47,7 +47,7 @@
:formData="formzlConfig.stepData" :fieldItemLabel="$t('template.common.jtpz')"
:prefixKey="'form_' + zlIndex"></Step>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.gsp.GSP005.jspz') }}</el-button>
@click="zlJspz(zlIndex)">{{ $t('template.gsp.GSP005.jspz') }}</el-button>
</div>
</div>
<!-- 溶液 -->
@ -62,7 +62,7 @@
$t('template.common.deleteBtn')
}}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.gsp.GSP005.kspz') }}</el-button>
@click="ryKspz(ryIndex)">{{ $t('template.gsp.GSP005.kspz') }}</el-button>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.common.bqdy') }}</el-button>
</div>
@ -75,7 +75,7 @@
:formData="formryConfig.stepData" :fieldItemLabel="$t('template.common.jtpz')"
:prefixKey="'form_' + ryIndex"></Step>
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">{{ $t('template.gsp.GSP005.jspz') }}</el-button>
@click="ryJspz(ryIndex)">{{ $t('template.gsp.GSP005.jspz') }}</el-button>
</div>
</div>
<!-- 备注 -->
@ -96,10 +96,11 @@ import templateMixin from "../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { uniqeResource, subTj } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import { duplicateResource, getExpireDate } from "@/utils/index.js";
import { isCommonUnit } from "@/utils/conTools";
import moment from "moment";
export default {
name: "GSP005",
@ -156,7 +157,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},
@ -313,6 +314,7 @@ export default {
label: 'template.gsp.GSP005.sywzmc',
type: "input",
subType: "input",
subDisabled: true,
subKey: "sywzmcSub",
fillType: "preFill",
subFillType: "actFill",
@ -336,12 +338,19 @@ export default {
},
sywzsjclz: {
label: 'template.gsp.GSP005.sywzsjclz',
type: "inputNumber",
subType: "select",
subKey: "sywzsjclzUnit",
type: "yq",
subType: "inputNumber",
subKey: "sywzsjclzValue",
thirdType: "select",
thirdKey: "sywzsjclzUnit",
thirdFillType: "preFill",
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_zldw'),
subFillType: "actFill",
fourthType: "button",
fourthKey: "sywzsjclzButtonValue",
fourthFillType: "actFill",
fourthButtonName:"获取值",
thirdOptions: this.getDictOptions('business_zldw'),
maxlength: 10
},
rjbhph: {
@ -356,6 +365,7 @@ export default {
rjmc: {
label: 'template.gsp.GSP005.rjmc',
type: "input",
disabled: true,
fillType: "actFill",
maxlength: 50,
},
@ -495,6 +505,7 @@ export default {
label: 'template.gsp.GSP005.yrymc',
type: "input",
subType: "input",
subDisabled: true,
subKey: "yrymcSub",
fillType: "preFill",
subFillType: "actFill",
@ -560,6 +571,7 @@ export default {
rjmc: {
label: 'template.gsp.GSP005.rjmc',
type: "input",
disabled: true,
fillType: "actFill",
maxlength: 50,
},
@ -614,6 +626,64 @@ export default {
}
},
methods: {
//
ryKspz(zlIndex) {
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('pzkssj', moment().format("YYYY-MM-DD HH:mm:ss"))
const rowData = this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].getFilledFormData()
let postData = {
bh: rowData.targetCode + rowData.targetCodeSn,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
}
this.startConfigRequest(postData);
},
//
ryJspz(zlIndex) {
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('pzjssj', moment().format("YYYY-MM-DD HH:mm:ss"))
const rowData = this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].getFilledFormData()
let postData = {
mc: rowData.targetName,
bh: rowData.targetCode + rowData.targetCodeSn,
nd: rowData.targetActConcentration,
nddw: rowData.targetActConcentrationUnit,
kc: rowData.targetActVolume,
kcdw: rowData.targetActVolumeUnit,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
}
this.configCompleteRequest(postData);
},
//
zlKspz(zlIndex) {
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('pzkssj', moment().format("YYYY-MM-DD HH:mm:ss"))
const rowData = this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].getFilledFormData()
let postData = {
bh: rowData.targetCode + rowData.targetCodeSn,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
}
this.startConfigRequest(postData);
},
//
zlJspz(zlIndex) {
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('pzjssj', moment().format("YYYY-MM-DD HH:mm:ss"))
const rowData = this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].getFilledFormData()
let postData = {
mc: rowData.targetName,
bh: rowData.targetCode + rowData.targetCodeSn,
nd: rowData.targetActConcentration,
nddw: rowData.targetActConcentrationUnit,
kc: rowData.targetActVolume,
kcdw: rowData.targetActVolumeUnit,
studySubjectId: this.formData.studySubjectId,
studyId: this.formData.studyId,
studyFormId: this.formData.id,
}
this.configCompleteRequest(postData);
},
//
onTableBeforeReagentRySubmit(data, zlIndex, formZlConfig) {
const { selectData, callback, key, formFields } = data;
@ -632,13 +702,13 @@ export default {
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubType', data.selectInfo.selectType)
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubKcdw', data.selectInfo.row.kcdw)
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubNddw', data.selectInfo.row.nddw)
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrymc', data.selectInfo.row.mc||'NA')
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrymcSub', data.selectInfo.row.mc || 'NA')
}
if (data.key === 'rjbhphSub') {
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubType', data.selectInfo.selectType)
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubKcdw', data.selectInfo.row.kcdw)
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubNddw', data.selectInfo.row.nddw)
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc||'NA')
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc || 'NA')
}
},
//
@ -659,13 +729,13 @@ export default {
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubType', data.selectInfo.selectType)
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubKcdw', data.selectInfo.row.kcdw)
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubNddw', data.selectInfo.row.nddw)
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzmcSub', data.selectInfo.row.mc||'NA')
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzmcSub', data.selectInfo.row.mc || 'NA')
}
if (data.key === 'rjbhphSub') {
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubType', data.selectInfo.selectType)
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubKcdw', data.selectInfo.row.kcdw)
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubNddw', data.selectInfo.row.nddw)
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc||'NA')
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc || 'NA')
}
},
//
@ -832,10 +902,45 @@ export default {
yxzq: item.effectivePeriod,
yxzqdw: item.effectivePeriodUnit,
})
///
tmpResource.push({
mc: null,
bh: item.sywzbhphSub,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: item.sywzbhphSubType,
syl: item.sywzyjclz,
syldw: item.sywzyjclzUnit,
yxzq: null,
yxzqdw: null,
})
///
tmpResource.push({
mc: null,
bh: item.rjbhphSub,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: item.rjbhphSubType,
syl: item.rjsjtj,
syldw: item.rjsjtjUnit,
yxzq: null,
yxzqdw: null,
})
}
}
//使
let tableListRy = content.formRyConfigs
if (tableListRy && tableListRy.length > 0) {
for (let i = 0; i < tableListRy.length; i++) {
@ -858,10 +963,45 @@ export default {
yxzq: item.effectivePeriod,
yxzqdw: item.effectivePeriodUnit,
})
///
tmpResource.push({
mc: null,
bh: item.yrybhphSub,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: item.yrybhphSubType,
syl: item.yrysjtj,
syldw: item.yrysjtjUnit,
yxzq: null,
yxzqdw: null,
})
///
tmpResource.push({
mc: null,
bh: item.rjbhphSub,
ph: null,
nd: null,
nddw: null,
ndz: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
type: item.rjbhphSubType,
syl: item.rjsjtj,
syldw: item.rjsjtjUnit,
yxzq: null,
yxzqdw: null,
})
}
}
//使
}
//使
const stepResource = this.getStepResource()

+ 1
- 1
src/views/business/comps/template/comps/gsp/GSP010.vue View File

@ -112,7 +112,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},

+ 1
- 1
src/views/business/comps/template/comps/lba/LBA002.vue View File

@ -105,7 +105,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},

+ 1
- 1
src/views/business/comps/template/comps/lba/LBA003.vue View File

@ -90,7 +90,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},

+ 1
- 1
src/views/business/comps/template/comps/lba/LBA004.vue View File

@ -166,7 +166,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},

+ 1
- 1
src/views/business/comps/template/comps/lba/LBA006.vue View File

@ -111,7 +111,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},

+ 10
- 6
src/views/business/comps/template/comps/pcr/PCR008.vue View File

@ -15,9 +15,9 @@
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" @onRegentSubmit="onRegentSubmit" />
<div v-if="fillType == 'preFill'">
<el-button type="danger" @click="onClickDelete">{{
<el-button :disabled="deleteRows.length === 0" type="danger" @click="onClickDelete">{{
$t('form.delete') }}</el-button>
</div>
@ -55,12 +55,12 @@ import { EventBus } from "@/utils/eventBus";
import { volumeConverter } from "@/utils/volConverter";//
import { convertConcentration } from "@/utils/conConverter";//
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import { getPCR010Config } from "../../formConfig/PCRTableConfig.js";
import { getPCR008Config } from "../../formConfig/PCRTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import { addTj, subTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
import ImportExcelDialog from '../../dialog/ImportExcelDialog'
export default {
name: "PCR005",
name: "PCR008",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion, SelectReagentDialog, ImportExcelDialog },
mixins: [templateMixin],
props: {
@ -71,7 +71,7 @@ export default {
},
computed: {
tableStepColumns() {
return getPCR010Config(this);
return getPCR008Config(this);
},
//
storageFormConfig() {
@ -177,6 +177,7 @@ export default {
type: 'qxbd',
fillType: 'preFill',
qxbdType: 'PCR007',
checkType: 'checkbox',
filledCodes: ['bdmc', 'bdbh'],
},
yjry: {
@ -229,10 +230,13 @@ export default {
this.onHandleTableBlur()
},
methods: {
onRegentSubmit(data){
console.log(data,"回调")
},
onClickDelete() {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
this.$refs.stepTableRef.deleteRows(this.deleteRows)
this.$refs.stepTableRef.deleteSelectedRows(this.deleteRows)
this.$refs.stepTableRef.justUpdateFilledFormData();
}).catch(() => { });

+ 346
- 0
src/views/business/comps/template/comps/pcr/PCR011.vue View File

@ -0,0 +1,346 @@
<!-- PCR分析核酸提取样品处理表 -->
<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="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
<div v-if="fillType == 'preFill'">
<el-button type="primary" @click="downloadExcelTemplate">{{
$t('template.common.downloadTemplate') }}</el-button>
<el-button type="primary" @click="showImportExcelDialog">{{
$t('template.common.importTemplate')
}}</el-button>
</div>
<CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur"
:ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`"
:showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"></TableOpertaion>
</template>
</CustomTable>
</div>
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
<!-- <button @click="onSave">保存</button> -->
<ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" />
</div>
</template>
<script>
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage";
import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin.js";
import CustomTable from '@/components/Template/CustomTable.vue';
import { isValueEmpty } from '@/utils/index';
import { getLatestSnArr } from '@/api/template';
import { EventBus } from "@/utils/eventBus";
import { volumeConverter } from "@/utils/volConverter";//
import { convertConcentration } from "@/utils/conConverter";//
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import { getPCR010Config } from "../../formConfig/PCRTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import { addTj, subTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
import ImportExcelDialog from '../../dialog/ImportExcelDialog'
export default {
name: "PCR011",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion, SelectReagentDialog, ImportExcelDialog },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
tableStepColumns() {
return getPCR010Config(this);
},
//
storageFormConfig() {
return [
{
type: "conditionItem",
config: {
storageCondition: {
label: 'template.common.storageConditionLabel',
type: "select",
fillType: "preFill",
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
}
}
];
},
//
remarkConig() {
return [
{
type: "cellItem",
config: {
remark: {
label: "",
type: "textarea",
fillType: "actFill",
span: 1,
placeholder: 'template.common.remarkPlaceholder',
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: "conditionItem",
label: 'template.common.processCondition',
config: {
pre: {
label: 'template.common.preFill',
type: "select",
multiple: true,
fillType: "preFill",
options: this.getDictOptions('business_pztj'),
otherCode: "preOther",
},
act: {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: 'template.pcr.pcr010.clsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
stepFormConfig() {
return [
{
type: 'step',
config: {
yjry: {
label: 'template.pcr.pcr010.yjry',
type: 'input',
fillType: 'preFill',
subType: 'sj',
subKey: 'yjrybh',
subFillType: 'actFill',
maxlength: 20
},
bs: {
label: 'template.pcr.pcr010.bs',
type: 'inputNumber',
fillType: 'actFill',
maxlength: 20
},
dztpbh: {
label: 'template.pcr.pcr010.dztpbh',
type: 'yq',
fillType: 'actFill',
},
}
}
]
},
},
data() {
return {
reagentType: null, // 1- 2-
formData: {},
currentSubKey: "",//key
currentType: "",//
currentRowIndex: "",//
};
},
mounted() {
const formData = this.getFormDataByTemplateData();
this.onHandleTableBlur()
},
methods: {
downloadExcelTemplate() {
this.exportExcel(['样品名称'], 'PCR分析组织匀浆表-常规导入模板')
},
showImportExcelDialog() {
this.$refs.ImportExcelDialog.show()
},
onLoadExcelData(excelData) {
excelData.shift()
let list = []
excelData.forEach(item => {
list.push({
ypmc: item[0],
targetStartSolutionVolumePrecision: 3
})
})
this.$refs.stepTableRef.addRows(list)
this.$refs.ImportExcelDialog.cancel()
setTimeout(() => {
this.justUpdateFilledFormData();
}, 100);
},
//
onHandleTableBlur() {
this.updateTable()
},
onHandleBlur(fields) {
this.updateTable()
},
//
updateTable() {
let content = this.getFilledFormData();
let bs = content.bs
content
if (this.fillType === "actFill") {
let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
let item = tableList[i]
let cqzl = item.cqzl * bs
//
let ysyjrybjrl = volumeConverter.convert(cqzl + content.headerSelectFields.cqzlUnit, content.headerSelectFields.ysyjrybjrlUnit)
tableList[i].ysyjrybjrl = ysyjrybjrl
}
}
this.$refs.stepTableRef.updateDataSource(tableList);
}
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"])
},
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]);
return content;
},
getResource() {
let content = this.getFilledFormData();
//resource
let tmpResource = []
if (this.fillType === "actFill") {
let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
//
let item = tableList[i]
console.log('表格item:' + JSON.stringify(item))
//使
tmpResource.push({
mc: null,
bh: content.subSolution,
ph: null,
ndz: null,
nd: null,
nddw: null,
ly: 'ELN配制',
sxrq: null,
kc: null,
kcdw: null,
syl: item.ysxsyxytj,
type: 1,
elnType: this.product,
syldw: content.headerSelectFields.sjxsyxytjUnit,
yxzq: null,
yxzqdw: null,
})
}
}
}
if (tmpResource.length > 0) {
tmpResource = uniqeResourceOne(tmpResource)
}
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
let content = this.$refs.stepRef.getStepResource();
console.log(content);
},
//
deleteRow(rowIndex) {
const stepTableRef = this.$refs['stepTableRef'];
if (stepTableRef) {
stepTableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
</style>

+ 1
- 1
src/views/business/comps/template/comps/sp/SP001.vue View File

@ -129,7 +129,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},

+ 1
- 1
src/views/business/comps/template/comps/sp/SP003.vue View File

@ -131,7 +131,7 @@ export default {
versionNum: {
label: "template.common.versionNumber",
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50,
},

+ 1
- 1
src/views/business/comps/template/comps/sp/SP008.vue View File

@ -140,7 +140,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},

+ 1
- 1
src/views/business/comps/template/comps/sp/SP009.vue View File

@ -144,7 +144,7 @@ export default {
versionNum: {
label: 'template.common.versionNumber',
type: "inputNumber",
fillType: "actFill",
fillType: "preFill",
prepend: "V",
maxlength: 50
},

+ 17
- 4
src/views/business/comps/template/dialog/SelectMixReagentDialog.vue View File

@ -188,16 +188,29 @@ export default {
ndz: (row.nd||"")+(row.nddw||""),
type: Number(this.selectType),
}
if(this.qxbdType && row.templateSn !== this.qxbdType){
this.$message.error(`请选择正确前序表单`);
return
const {qxbdType,checkType} = this;
if(qxbdType){
if(checkType === "radio"&& row.templateSn !== qxbdType){
this.$message.error(`请选择正确前序表单`);
return
}
if(checkType === "checkbox" ){
const isAllType = row.every((item)=>item.templateSn === qxbdType)
if(!isAllType){
this.$message.error(`请选择正确前序表单`);
return
}
}
}
this.$emit('submit', selectedValue, row);
let callbackData = { selectInfo, uuid: this.uuid, selectedId: selectedValue, row,selectType:this.selectType };
let callbackData = { selectInfo, uuid: this.uuid, selectedId: selectedValue, row,selectType:this.selectType,checkType };
if(this.checkType === "checkbox"){
callbackData = {
uuid: this.uuid,
selectedRows: row,
selectedId:row.map((item)=>item.bdbh).join(","),
checkType
}
}
// eventBus

+ 102
- 1
src/views/business/comps/template/formConfig/PCRTableConfig.js View File

@ -453,7 +453,7 @@ export const getBaseInfoFormConfig = ($this) => {
versionNum: {
label: 'template.common.versionNumber',
type: 'inputNumber',
fillType: 'actFill',
fillType: 'preFill',
prepend: 'V',
maxlength: 50
}
@ -758,6 +758,107 @@ export const getPCR007Config = ($this) => {
]
}
// PCR008
export const getPCR008Config = ($this) => {
return [
{
label: 'template.pcr.pcr008.ypmc',
prop: 'ypmc',
width: 280,
bodyType: 'input',
fillType: 'preFill',
otherCode: 'bhOther',
bodyFillType: 'preFill',
},
{
label: 'template.pcr.pcr008.cjgz',
prop: 'cjgz',
width: 280,
showWidth: 180,
fillType: 'preFill',
headerSelectKey: 'cjgzUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
},
{
label: 'template.pcr.pcr008.lzzcz',
prop: 'lzzcz',
width: 280,
showWidth: 180,
fillType: 'preFill',
headerSelectKey: 'lzzczUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
bodySubType: 'inputNumber',
bodyFillType: 'actFill',
bodySubType: 'button',
bodySubButtonName: 'form.hqz',
},
{
label: 'template.pcr.pcr008.zzzl',
prop: 'zzzl',
width: 280,
showWidth: 180,
fillType: 'preFill',
headerSelectKey: 'zzzlUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
bodySubType: 'inputNumber',
bodySubKey: 'targetStartSolutionVolumePrecision',
bodySubFillType: 'preFill',
showBodySub: $this.fillType === 'preFill',
bodyPrecisionKey: 'targetStartSolutionVolumePrecision',
bodyMaxlength: 10,
bodyDisabled: $this.fillType === 'preFill',
bodySubPlaceholder: 'template.common.xswsPlaceholder',
headerSelectTo:"actStartSolutionVolumeUnit",
},
{
label: 'template.pcr.pcr008.ysyjrybjrl',
prop: 'ysyjrybjrl',
width: 280,
showWidth: 180,
fillType: 'preFill',
headerSelectKey: 'ysyjrybjrlUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
bodySubType: 'inputNumber',
bodySubKey: 'targetDiluentVolumePrecision',
bodySubFillType: 'preFill',
showBodySub: $this.fillType === 'preFill',
bodyPrecisionKey: 'targetDiluentVolumePrecision',
bodyMaxlength: 10,
bodyDisabled: $this.fillType === 'preFill',
bodySubPlaceholder: 'template.common.xswsPlaceholder',
headerSelectTo:"actStartSolutionVolumeUnit",
},
{
label: 'template.pcr.pcr008.sjyjrybjrl',
prop: 'sjyjrybjrl',
width: 280,
showWidth: 180,
fillType: 'preFill',
headerSelectKey: 'sjyjrybjrlUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
copyFrom: 'ysyjrybjrl', //复制哪个字段
bodyMaxlength: 10,
}
]
}
// PCR009
export const getPCR009Config = ($this) => {
return [

+ 1
- 1
src/views/business/comps/template/formConfig/paralleAndLadderConfig.js View File

@ -498,7 +498,7 @@ export const getBaseInfoFormConfig = ($this) => {
versionNum: {
label: 'template.common.versionNumber',
type: 'inputNumber',
fillType: 'actFill',
fillType: 'preFill',
prepend: 'V',
maxlength: 50
}

+ 1
- 1
src/views/business/comps/template/formConfig/sp/SP0019.js View File

@ -22,7 +22,7 @@ export const getBaseInfoFormConfig = (formType) => {
versionNum: {
label: 'template.common.versionNumber',
type: 'inputNumber',
fillType: 'actFill',
fillType: 'preFill',
prepend: 'V',
maxlength: 50
},

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save