|
|
@ -93,7 +93,7 @@ |
|
|
<template |
|
|
<template |
|
|
v-if="col.bodyType === 'input' || col.bodyType === 'inputNumber' || col.bodyType === 'select' || col.bodyType === 'dateTimeRange' || col.bodyType === 'radio'"> |
|
|
v-if="col.bodyType === 'input' || col.bodyType === 'inputNumber' || col.bodyType === 'select' || col.bodyType === 'dateTimeRange' || col.bodyType === 'radio'"> |
|
|
<div class="flex flex1"> |
|
|
<div class="flex flex1"> |
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" |
|
|
|
|
|
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id" |
|
|
:fieldItemLabel="fieldItemLabel" :type="col.bodyType" |
|
|
:fieldItemLabel="fieldItemLabel" :type="col.bodyType" |
|
|
@blur="onBlur(rowIndex, col.prop, $event)" @copy="onCopy(rowIndex, col)" |
|
|
@blur="onBlur(rowIndex, col.prop, $event)" @copy="onCopy(rowIndex, col)" |
|
|
class="body-input" :item="getBodyItem(col, rowIndex)" |
|
|
class="body-input" :item="getBodyItem(col, rowIndex)" |
|
|
@ -120,7 +120,7 @@ |
|
|
:class="{ 'full-row': row[col.prop] && row[col.prop].length == 1 }" |
|
|
:class="{ 'full-row': row[col.prop] && row[col.prop].length == 1 }" |
|
|
v-for="(opItem, itemIndex) in row[col.prop]" :key="itemIndex"> |
|
|
v-for="(opItem, itemIndex) in row[col.prop]" :key="itemIndex"> |
|
|
<HandleFormItem |
|
|
<HandleFormItem |
|
|
:fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex + '_' + itemIndex" |
|
|
|
|
|
|
|
|
:fieldKey="prefixKey + '_' + col.prop + '_' + row.id + '_' + itemIndex" |
|
|
:fieldItemLabel="fieldItemLabel" type="input" |
|
|
:fieldItemLabel="fieldItemLabel" type="input" |
|
|
@blur="onOperableInputBlur(opItem, $event)" class="body-input" |
|
|
@blur="onOperableInputBlur(opItem, $event)" class="body-input" |
|
|
:item="getBodyItem(col, rowIndex)" :value="opItem.value" |
|
|
:item="getBodyItem(col, rowIndex)" :value="opItem.value" |
|
|
@ -140,7 +140,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="flex flex1" v-else-if="col.bodyType === 'clickable'"> |
|
|
<div class="flex flex1" v-else-if="col.bodyType === 'clickable'"> |
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" |
|
|
|
|
|
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id" |
|
|
:fieldItemLabel="fieldItemLabel" type="clickable" class="body-clickable" |
|
|
:fieldItemLabel="fieldItemLabel" type="clickable" class="body-clickable" |
|
|
:item="getBodyItem(col, rowIndex)" :value="row[col.prop]" |
|
|
:item="getBodyItem(col, rowIndex)" :value="row[col.prop]" |
|
|
:error="hasError(rowIndex, colIndex, col.prop)" |
|
|
:error="hasError(rowIndex, colIndex, col.prop)" |
|
|
@ -150,7 +150,7 @@ |
|
|
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> |
|
|
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> |
|
|
</div> |
|
|
</div> |
|
|
<div class="flex flex1" v-else-if="isRegent(col, 'bodyType')"> |
|
|
<div class="flex flex1" v-else-if="isRegent(col, 'bodyType')"> |
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" |
|
|
|
|
|
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id" |
|
|
:fieldItemLabel="fieldItemLabel" :type="col.bodyType" class="body-clickable" |
|
|
:fieldItemLabel="fieldItemLabel" :type="col.bodyType" class="body-clickable" |
|
|
sourceFrom="customTable" :item="getBodyItem(col, rowIndex)" |
|
|
sourceFrom="customTable" :item="getBodyItem(col, rowIndex)" |
|
|
:value="row[col.prop]" :error="hasError(rowIndex, colIndex, col.prop)" |
|
|
:value="row[col.prop]" :error="hasError(rowIndex, colIndex, col.prop)" |
|
|
@ -167,7 +167,7 @@ |
|
|
<template v-else-if="col.bodyType === 'checkboxTag'"> |
|
|
<template v-else-if="col.bodyType === 'checkboxTag'"> |
|
|
<div class="flex flex-wrap" |
|
|
<div class="flex flex-wrap" |
|
|
:class="{ 'row-error-border': hasError(rowIndex, colIndex, col.prop) }"> |
|
|
:class="{ 'row-error-border': hasError(rowIndex, colIndex, col.prop) }"> |
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" |
|
|
|
|
|
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id" |
|
|
:fieldItemLabel="fieldItemLabel" type="checkboxTag" :value="row[col.prop]" |
|
|
:fieldItemLabel="fieldItemLabel" type="checkboxTag" :value="row[col.prop]" |
|
|
:item="getBodyItem(col, rowIndex)" |
|
|
:item="getBodyItem(col, rowIndex)" |
|
|
@change="onCheckboxTagChange(rowIndex, colIndex, col, $event)" |
|
|
@change="onCheckboxTagChange(rowIndex, colIndex, col, $event)" |
|
|
@ -177,7 +177,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<template v-else-if="col.bodyType === 'checkbox'"> |
|
|
<template v-else-if="col.bodyType === 'checkbox'"> |
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" |
|
|
|
|
|
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + row.id" |
|
|
:fieldItemLabel="fieldItemLabel" type="checkbox" v-model="row[col.prop]" |
|
|
:fieldItemLabel="fieldItemLabel" type="checkbox" v-model="row[col.prop]" |
|
|
:item="getBodyItem(col, rowIndex)" |
|
|
:item="getBodyItem(col, rowIndex)" |
|
|
@change="onCheckboxChange(rowIndex, colIndex, col, $event)" |
|
|
@change="onCheckboxChange(rowIndex, colIndex, col, $event)" |
|
|
@ -204,7 +204,7 @@ |
|
|
v-if="isShowBodySub(col, row)"> |
|
|
v-if="isShowBodySub(col, row)"> |
|
|
<template |
|
|
<template |
|
|
v-if="col.bodySubType === 'inputNumber' || col.bodySubType === 'input' || col.bodySubType === 'select'"> |
|
|
v-if="col.bodySubType === 'inputNumber' || col.bodySubType === 'input' || col.bodySubType === 'select'"> |
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex" |
|
|
|
|
|
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + row.id" |
|
|
:fieldItemLabel="fieldItemLabel" :type="col.bodySubType" |
|
|
:fieldItemLabel="fieldItemLabel" :type="col.bodySubType" |
|
|
@blur="onSubBlur(rowIndex, col.bodySubKey, $event)" |
|
|
@blur="onSubBlur(rowIndex, col.bodySubKey, $event)" |
|
|
@copy="onCopy(rowIndex, col)" :item="getBodySubItem(col)" |
|
|
@copy="onCopy(rowIndex, col)" :item="getBodySubItem(col)" |
|
|
@ -225,7 +225,7 @@ |
|
|
@clickButton="(e, data) => handleClickButton(e, data, col.bodySubKey, rowIndex, colIndex)" /> |
|
|
@clickButton="(e, data) => handleClickButton(e, data, col.bodySubKey, rowIndex, colIndex)" /> |
|
|
</template> |
|
|
</template> |
|
|
<div class="flex flex1" v-else-if="isRegent(col, 'bodySubType')"> |
|
|
<div class="flex flex1" v-else-if="isRegent(col, 'bodySubType')"> |
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex" |
|
|
|
|
|
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + row.id" |
|
|
:fieldItemLabel="fieldItemLabel" :type="col.bodySubType" class="body-clickable" |
|
|
:fieldItemLabel="fieldItemLabel" :type="col.bodySubType" class="body-clickable" |
|
|
sourceFrom="customTable" :item="getBodySubItem(col, rowIndex)" |
|
|
sourceFrom="customTable" :item="getBodySubItem(col, rowIndex)" |
|
|
:value="row[col.bodySubKey]" |
|
|
:value="row[col.bodySubKey]" |
|
|
@ -1012,6 +1012,12 @@ export default { |
|
|
this.checkCompareToOnDataLoad(); |
|
|
this.checkCompareToOnDataLoad(); |
|
|
justUpdateFilledFormData(); |
|
|
justUpdateFilledFormData(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
pushDataSource(data=[]) { |
|
|
|
|
|
this.localDataSource.push(...data); |
|
|
|
|
|
this.localDataSource = [...this.localDataSource]; |
|
|
|
|
|
this.checkCompareToOnDataLoad(); |
|
|
|
|
|
justUpdateFilledFormData(); |
|
|
|
|
|
}, |
|
|
// 比较newData和oldData的值是否相等,只要有一对不相等就返回false |
|
|
// 比较newData和oldData的值是否相等,只要有一对不相等就返回false |
|
|
compareOldAndCurrentFormFields(newData, oldData) { |
|
|
compareOldAndCurrentFormFields(newData, oldData) { |
|
|
for (const key in newData) { |
|
|
for (const key in newData) { |
|
|
@ -1062,6 +1068,7 @@ export default { |
|
|
actSolutionConcentrationPrecision: 3,//小数点精度默认为3 |
|
|
actSolutionConcentrationPrecision: 3,//小数点精度默认为3 |
|
|
targetDiluentVolumePrecision: 3,//小数点精度默认为3 |
|
|
targetDiluentVolumePrecision: 3,//小数点精度默认为3 |
|
|
targetStartSolutionVolumePrecision: 3,//小数点精度默认为3 |
|
|
targetStartSolutionVolumePrecision: 3,//小数点精度默认为3 |
|
|
|
|
|
id:getuuid(), |
|
|
}); |
|
|
}); |
|
|
justUpdateFilledFormData() |
|
|
justUpdateFilledFormData() |
|
|
}, |
|
|
}, |
|
|
|