|
@ -8,25 +8,25 @@ |
|
|
> |
|
|
> |
|
|
<div style="max-height: 60vh; overflow-y: auto; padding: 0px 20px"> |
|
|
<div style="max-height: 60vh; overflow-y: auto; padding: 0px 20px"> |
|
|
<!-- <Form ref="formRefMain" :schema="formAllSchemasMain" :is-col="true" :rules="rules" /> --> |
|
|
<!-- <Form ref="formRefMain" :schema="formAllSchemasMain" :is-col="true" :rules="rules" /> --> |
|
|
<el-form :model="data" label-width="auto"> |
|
|
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef"> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item label="编码"> |
|
|
|
|
|
<el-input v-model="data.code" placeholder="根据系统生成" :disabled="true"/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="描述"> |
|
|
<el-form-item label="编码" prop="code"> |
|
|
<el-input v-model="data.description" placeholder="请填写描述"/> |
|
|
<el-input v-model="data.code" placeholder="根据系统生成" :disabled="true" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="版本"> |
|
|
<el-form-item label="描述" prop="description"> |
|
|
<el-input v-model="data.version" placeholder="请填写版本"/> |
|
|
<el-input v-model="data.description" placeholder="请填写描述" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
<el-col :span="12"> |
|
|
</el-form> |
|
|
<el-form-item label="版本" prop="version"> |
|
|
|
|
|
<el-input v-model="data.version" placeholder="请填写版本" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
<el-tabs |
|
|
<el-tabs |
|
|
v-model="editableTabsValue" |
|
|
v-model="editableTabsValue" |
|
|
editable |
|
|
editable |
|
@ -50,89 +50,168 @@ |
|
|
labelWidth="150px" |
|
|
labelWidth="150px" |
|
|
:rules="rules" |
|
|
:rules="rules" |
|
|
/> --> |
|
|
/> --> |
|
|
<el-form :model="item" label-width="auto"> |
|
|
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef"> |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="编码"> |
|
|
<el-form-item label="编码" prop="code"> |
|
|
<el-input v-model="item.code" placeholder="根据系统生成" :disabled="true"/> |
|
|
<el-input v-model="item.code" placeholder="根据系统生成" :disabled="true" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="检验方案模板编码"> |
|
|
<el-form-item label="检验方案模板编码"> |
|
|
<el-input v-model="item.inspectionCode" placeholder="根据系统生成" :disabled="true"/> |
|
|
<el-input |
|
|
|
|
|
v-model="item.inspectionCode" |
|
|
|
|
|
placeholder="根据系统生成" |
|
|
|
|
|
:disabled="true" |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="描述"> |
|
|
<el-form-item label="描述" prop="description"> |
|
|
<el-input v-model="item.description" /> |
|
|
<el-input v-model="item.description" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="顺序号"> |
|
|
<el-form-item label="顺序号" prop="sequenceCode"> |
|
|
<el-input v-model="item.sequenceCode" /> |
|
|
<el-input v-model="item.sequenceCode" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="检验特性编码"> |
|
|
<el-form-item label="检验特性编码"> |
|
|
<el-input v-model="item.inspectionCharCode" placeholder="根据系统生成" :disabled="true"/> |
|
|
<el-input |
|
|
|
|
|
v-model="item.inspectionCharCode" |
|
|
|
|
|
placeholder="根据系统生成" |
|
|
|
|
|
:disabled="true" |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div class="small-title">检验特性</div> |
|
|
<div class="small-title">检验特性</div> |
|
|
<el-form :model="item" label-width="auto"> |
|
|
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef"> |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="编码"> |
|
|
<el-form-item label="编码"> |
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.code" placeholder="根据系统生成" :disabled="true"/> |
|
|
<el-input |
|
|
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.code" |
|
|
|
|
|
placeholder="根据系统生成" |
|
|
|
|
|
:disabled="true" |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="描述"> |
|
|
<el-form-item label="描述" prop="inspectionCharacteristicsBaseVO.description"> |
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.description" /> |
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.description" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="检验方法编码"> |
|
|
<el-form-item |
|
|
<el-select v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodCode" placeholder="请选择检验方法编码"> |
|
|
label="检验方法编码" |
|
|
<el-option |
|
|
prop="inspectionCharacteristicsBaseVO.inspectionMethodCode" |
|
|
v-for="item in inspectionProcessList" |
|
|
> |
|
|
:key="item.id" |
|
|
<div style="display: flex; width: 100%"> |
|
|
:label="item.description" |
|
|
<el-input |
|
|
:value="item.id" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodCode" |
|
|
|
|
|
disabled |
|
|
|
|
|
placeholder="请选择检验方法编码" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
<el-button |
|
|
|
|
|
type="info" |
|
|
|
|
|
plain |
|
|
|
|
|
style="width: 40px" |
|
|
|
|
|
@click=" |
|
|
|
|
|
opensearchTable( |
|
|
|
|
|
'inspectionMethodCode', |
|
|
|
|
|
null, |
|
|
|
|
|
'检验方法', |
|
|
|
|
|
SamplingProcess.allSchemas, |
|
|
|
|
|
SamplingProcessApi.getSamplingProcessPage, |
|
|
|
|
|
null, |
|
|
|
|
|
false, |
|
|
|
|
|
null, |
|
|
|
|
|
item |
|
|
|
|
|
) |
|
|
|
|
|
" |
|
|
|
|
|
><Icon icon="ep:search" |
|
|
|
|
|
/></el-button> |
|
|
|
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="采样过程编码"> |
|
|
<el-form-item |
|
|
<el-select v-model="item.inspectionCharacteristicsBaseVO.inspectionProcessPage" placeholder="请选择采样过程编码"> |
|
|
label="采样过程编码" |
|
|
<el-option |
|
|
prop="inspectionCharacteristicsBaseVO.dynamicUpdateCode" |
|
|
v-for="item in inspectionProcessList" |
|
|
> |
|
|
:key="item.id" |
|
|
<div style="display: flex; width: 100%"> |
|
|
:label="item.description" |
|
|
<el-input |
|
|
:value="item.id" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.dynamicUpdateCode" |
|
|
|
|
|
disabled |
|
|
|
|
|
placeholder="请选择采样过程编码" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
<el-button |
|
|
|
|
|
type="info" |
|
|
|
|
|
plain |
|
|
|
|
|
style="width: 40px" |
|
|
|
|
|
@click=" |
|
|
|
|
|
opensearchTable( |
|
|
|
|
|
'dynamicUpdateCode', |
|
|
|
|
|
null, |
|
|
|
|
|
'采样过程编码', |
|
|
|
|
|
SamplingProcess.allSchemas, |
|
|
|
|
|
SamplingProcessApi.getSamplingProcessPage, |
|
|
|
|
|
null, |
|
|
|
|
|
false, |
|
|
|
|
|
null, |
|
|
|
|
|
item |
|
|
|
|
|
) |
|
|
|
|
|
" |
|
|
|
|
|
><Icon icon="ep:search" |
|
|
|
|
|
/></el-button> |
|
|
|
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="动态修改规则编码"> |
|
|
<el-form-item |
|
|
<el-select v-model="item.inspectionCharacteristicsBaseVO.inspectionMethod" placeholder="请选择动态修改规则编码"> |
|
|
label="动态修改规则编码" |
|
|
<el-option |
|
|
prop="inspectionCharacteristicsBaseVO.inspectionMethod" |
|
|
v-for="item in inspectionProcessList" |
|
|
> |
|
|
:key="item.id" |
|
|
<div style="display: flex; width: 100%"> |
|
|
:label="item.description" |
|
|
<el-input |
|
|
:value="item.id" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethod" |
|
|
|
|
|
disabled |
|
|
|
|
|
placeholder="请选择动态修改规则编码" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
<el-button |
|
|
|
|
|
type="info" |
|
|
|
|
|
plain |
|
|
|
|
|
style="width: 40px" |
|
|
|
|
|
@click=" |
|
|
|
|
|
opensearchTable( |
|
|
|
|
|
'inspectionMethod', |
|
|
|
|
|
null, |
|
|
|
|
|
'动态修改规则编码', |
|
|
|
|
|
SamplingProcess.allSchemas, |
|
|
|
|
|
SamplingProcessApi.getSamplingProcessPage, |
|
|
|
|
|
null, |
|
|
|
|
|
false, |
|
|
|
|
|
null, |
|
|
|
|
|
item |
|
|
|
|
|
) |
|
|
|
|
|
" |
|
|
|
|
|
><Icon icon="ep:search" |
|
|
|
|
|
/></el-button> |
|
|
|
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="是否允许修改特征值"> |
|
|
<el-form-item |
|
|
<el-select v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" placeholder="请选择是否允许修改特征值"> |
|
|
label="是否允许修改特征值" |
|
|
|
|
|
prop="inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
|
|
> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
|
|
placeholder="请选择是否允许修改特征值" |
|
|
|
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in isYesList" |
|
|
v-for="item in isYesList" |
|
|
:key="item.value" |
|
|
:key="item.value" |
|
@ -143,10 +222,18 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="结果录入方式"> |
|
|
<el-form-item |
|
|
<el-select v-model="item.inspectionCharacteristicsBaseVO.resultEntryMethod" placeholder="请选择结果录入方式"> |
|
|
label="结果录入方式" |
|
|
|
|
|
prop="inspectionCharacteristicsBaseVO.resultEntryMethod" |
|
|
|
|
|
> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.resultEntryMethod" |
|
|
|
|
|
placeholder="请选择结果录入方式" |
|
|
|
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)" |
|
|
v-for="dict in getStrDictOptions( |
|
|
|
|
|
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY |
|
|
|
|
|
)" |
|
|
:key="dict.value" |
|
|
:key="dict.value" |
|
|
:label="dict.label" |
|
|
:label="dict.label" |
|
|
:value="dict.value" |
|
|
:value="dict.value" |
|
@ -155,11 +242,17 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="特征类型"> |
|
|
<el-form-item label="特征类型" prop="inspectionCharacteristicsBaseVO.featureType"> |
|
|
<!-- <el-input v-model="item.featureType" /> --> |
|
|
<!-- <el-input v-model="item.featureType" /> --> |
|
|
<el-select v-model="item.inspectionCharacteristicsBaseVO.featureType" placeholder="请选择特征类型"> |
|
|
<el-select |
|
|
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.featureType" |
|
|
|
|
|
placeholder="请选择特征类型" |
|
|
|
|
|
@change="changeFeatureType" |
|
|
|
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE)" |
|
|
v-for="dict in getStrDictOptions( |
|
|
|
|
|
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE |
|
|
|
|
|
)" |
|
|
:key="dict.value" |
|
|
:key="dict.value" |
|
|
:label="dict.label" |
|
|
:label="dict.label" |
|
|
:value="dict.value" |
|
|
:value="dict.value" |
|
@ -168,9 +261,16 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
<el-form-item label="是否设定上限"> |
|
|
<el-form-item |
|
|
<el-select v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" placeholder="请选择是否设定上限"> |
|
|
label="是否设定上限" |
|
|
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
|
|
> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
|
|
placeholder="请选择是否设定上限" |
|
|
|
|
|
@change="changeIsCapping" |
|
|
|
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in isYesList" |
|
|
v-for="item in isYesList" |
|
|
:key="item.value" |
|
|
:key="item.value" |
|
@ -181,8 +281,25 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="是否设定下限"> |
|
|
<el-form-item |
|
|
<el-select v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" placeholder="请选择是否设定下限"> |
|
|
label="上限值" |
|
|
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item |
|
|
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
|
|
label="是否设定下限" |
|
|
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
|
|
placeholder="请选择是否设定下限" |
|
|
|
|
|
@change="changeLowlimit" |
|
|
|
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in isYesList" |
|
|
v-for="item in isYesList" |
|
|
:key="item.value" |
|
|
:key="item.value" |
|
@ -193,40 +310,94 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="目标值"> |
|
|
<el-form-item |
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" /> |
|
|
label="下限值" |
|
|
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="上限值"> |
|
|
<el-form-item |
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" /> |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
|
|
|
label="是否设定目标值" |
|
|
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
|
|
|
placeholder="请选择是否设定目标值" |
|
|
|
|
|
@change="changeIsTarget" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in isYesList" |
|
|
|
|
|
:key="item.value" |
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
:value="item.value" |
|
|
|
|
|
/> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="下限值"> |
|
|
<el-form-item |
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" /> |
|
|
label="目标值" |
|
|
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="计量单位"> |
|
|
<el-form-item |
|
|
|
|
|
label="计量单位" |
|
|
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" /> |
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="小数位"> |
|
|
<el-form-item |
|
|
|
|
|
label="小数位" |
|
|
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" /> |
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="选择集编码"> |
|
|
<el-form-item |
|
|
<el-select v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode" placeholder="请选择集编码"> |
|
|
label="选择集编码" |
|
|
<el-option |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|
|
v-for="item in inspectionProcessList" |
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 1" |
|
|
:key="item.id" |
|
|
> |
|
|
:label="item.description" |
|
|
<div style="display: flex; width: 100%"> |
|
|
:value="item.id" |
|
|
<el-input |
|
|
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|
|
|
|
|
disabled |
|
|
|
|
|
placeholder="请选择选择集编码" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
<el-button |
|
|
|
|
|
type="info" |
|
|
|
|
|
plain |
|
|
|
|
|
style="width: 40px" |
|
|
|
|
|
@click=" |
|
|
|
|
|
opensearchTable( |
|
|
|
|
|
'quantifyQuantifyCode', |
|
|
|
|
|
null, |
|
|
|
|
|
'选择集编码', |
|
|
|
|
|
SamplingProcess.allSchemas, |
|
|
|
|
|
SamplingProcessApi.getSamplingProcessPage, |
|
|
|
|
|
null, |
|
|
|
|
|
false, |
|
|
|
|
|
null, |
|
|
|
|
|
item |
|
|
|
|
|
) |
|
|
|
|
|
" |
|
|
|
|
|
><Icon icon="ep:search" |
|
|
|
|
|
/></el-button> |
|
|
|
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
@ -240,12 +411,20 @@ |
|
|
</Dialog> |
|
|
</Dialog> |
|
|
<Dialog title="修改名称" v-model="dialogVisibleName" width="500px" :close-on-click-modal="false"> |
|
|
<Dialog title="修改名称" v-model="dialogVisibleName" width="500px" :close-on-click-modal="false"> |
|
|
<div style="padding: 0px 20px"> |
|
|
<div style="padding: 0px 20px"> |
|
|
<el-input v-model="name" style="width: 240px" placeholder="请输入名称" /> |
|
|
<el-form ref="nameRef" :model="nameForm"> |
|
|
|
|
|
<el-form-item |
|
|
|
|
|
:rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]" |
|
|
|
|
|
prop="name" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input v-model="nameForm.name" style="width: 240px" placeholder="请输入名称" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
</div> |
|
|
</div> |
|
|
<template #footer> |
|
|
<template #footer> |
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick1" /> |
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick1" /> |
|
|
</template> |
|
|
</template> |
|
|
</Dialog> |
|
|
</Dialog> |
|
|
|
|
|
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" /> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
@ -253,21 +432,11 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import { getCurrentInstance } from 'vue' |
|
|
import { getCurrentInstance } from 'vue' |
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate' |
|
|
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate' |
|
|
const inspectionProcessList = ref([]) |
|
|
import { SearchTable } from '@/components/SearchTable' |
|
|
const isYesList = ref([]) |
|
|
import { SamplingProcess } from '@/views/qms/samplingProcess/samplingProcess.data' |
|
|
onMounted(async()=>{ |
|
|
import * as SamplingProcessApi from '@/api/qms/samplingProcess' |
|
|
let inspectionProcessPage = await InspectionProcessPageApi.getInspectionProcessPage() |
|
|
const message = useMessage() // 消息弹窗 |
|
|
inspectionProcessList.value = inspectionProcessPage.list |
|
|
|
|
|
console.log(inspectionProcessList) |
|
|
|
|
|
|
|
|
|
|
|
isYesList.value =[{ |
|
|
|
|
|
value:0, |
|
|
|
|
|
label:'是' |
|
|
|
|
|
},{ |
|
|
|
|
|
value:1, |
|
|
|
|
|
label:'否' |
|
|
|
|
|
}] |
|
|
|
|
|
}) |
|
|
|
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
|
// 显示窗口宽度设置 |
|
|
// 显示窗口宽度设置 |
|
|
basicFormWidth: { |
|
|
basicFormWidth: { |
|
@ -297,40 +466,106 @@ const props = defineProps({ |
|
|
type: Array, |
|
|
type: Array, |
|
|
required: false, |
|
|
required: false, |
|
|
default: null |
|
|
default: null |
|
|
}, |
|
|
|
|
|
// 校验rules |
|
|
|
|
|
rules: { |
|
|
|
|
|
type: Object, |
|
|
|
|
|
required: true, |
|
|
|
|
|
default: null |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
const { t } = useI18n() // 国际化 |
|
|
const { t } = useI18n() // 国际化 |
|
|
|
|
|
|
|
|
const dialogVisible = ref(true) // 弹窗的是否展示 |
|
|
const dialogVisible = ref(false) // 弹窗的是否展示 |
|
|
const dialogTitle = ref('') // 弹窗的标题 |
|
|
const dialogTitle = ref('') // 弹窗的标题 |
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
|
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改 |
|
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改 |
|
|
const dialogWidth = ref() |
|
|
const dialogWidth = ref() |
|
|
|
|
|
const formMainRef = ref() |
|
|
|
|
|
const formFeaturesRef = ref() |
|
|
|
|
|
const formProcessRef = ref() |
|
|
|
|
|
|
|
|
const data = ref({ |
|
|
const data = ref({ |
|
|
code: '', |
|
|
code: '', |
|
|
description:'', |
|
|
description: '', |
|
|
version:'', |
|
|
version: '', |
|
|
process:[] |
|
|
process: [] |
|
|
}) |
|
|
}) |
|
|
|
|
|
const isYesList = [ |
|
|
|
|
|
{ |
|
|
|
|
|
value: true, |
|
|
|
|
|
label: '是' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
value: false, |
|
|
|
|
|
label: '否' |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
const dialogVisibleName = ref(false) |
|
|
const dialogVisibleName = ref(false) |
|
|
const name = ref('') |
|
|
const nameForm = ref({ |
|
|
const onSubmit = () => { |
|
|
name: '' |
|
|
console.log('submit!') |
|
|
}) |
|
|
} |
|
|
const nameRef = ref() |
|
|
if (props.basicFormWidth) { |
|
|
if (props.basicFormWidth) { |
|
|
dialogWidth.value = props.basicFormWidth + '%' |
|
|
dialogWidth.value = props.basicFormWidth + '%' |
|
|
} else { |
|
|
} else { |
|
|
dialogWidth.value = props.isBusiness ? '60%' : '40%' |
|
|
dialogWidth.value = props.isBusiness ? '60%' : '40%' |
|
|
} |
|
|
} |
|
|
|
|
|
const rules = ref({ |
|
|
|
|
|
description: [{ required: true, message: '请填写描述', trigger: 'blur' }], |
|
|
|
|
|
version: [{ required: true, message: '请填写版本', trigger: 'blur' }], |
|
|
|
|
|
inspectionCode: [{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' }], |
|
|
|
|
|
sequenceCode: [{ required: true, message: '请填写顺序号', trigger: 'blur' }], |
|
|
|
|
|
inspectionCharCode: [{ required: true, message: '请选择检验特性编码', trigger: 'blur' }], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.description': [ |
|
|
|
|
|
{ required: true, message: '请填写描述', trigger: ['blur', 'change'] } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.inspectionMethodCode': [ |
|
|
|
|
|
{ required: true, message: '请选择检验方法编码', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.dynamicUpdateCode': [ |
|
|
|
|
|
{ required: true, message: '请选择采样过程编码', trigger: ['blur', 'change'] } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.inspectionMethod': [ |
|
|
|
|
|
{ required: true, message: '请选择动态修改规则编码', trigger: ['blur', 'change'] } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.isCanUpdate': [ |
|
|
|
|
|
{ required: true, message: '请选择是否允许修改特征值', trigger: ['blur', 'change'] } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.isDestructionInspection': [ |
|
|
|
|
|
{ required: true, message: '请选择是否破坏性检验', trigger: ['blur', 'change'] } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.resultEntryMethod': [ |
|
|
|
|
|
{ required: true, message: '请选择结果录入方式', trigger: ['blur', 'change'] } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.featureType': [ |
|
|
|
|
|
{ required: true, message: '请选择特征类型', trigger: ['blur', 'change'] } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.quantifyIsCapping': [ |
|
|
|
|
|
{ required: true, message: '请选择是否设定上限', trigger: ['blur', 'change'] } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.quantifyIsLowlimit': [ |
|
|
|
|
|
{ required: true, message: '请选择是否设定下限', trigger: ['blur', 'change'] } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.quantifyIsTarget': [ |
|
|
|
|
|
{ required: true, message: '请选择是否设定目标值', trigger: ['blur', 'change'] } |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
'inspectionCharacteristicsBaseVO.quantifyTarget': [ |
|
|
|
|
|
{ required: true, message: '请输入目标值', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.quantifyCapping': [ |
|
|
|
|
|
{ required: true, message: '请输入上限值', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.quantifyLowlimit': [ |
|
|
|
|
|
{ required: true, message: '请输入下限值', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.quantifyUom': [ |
|
|
|
|
|
{ required: true, message: '请选择计量单位', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.quantifyDecimal': [ |
|
|
|
|
|
{ required: true, message: '请输入小数位', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
'inspectionCharacteristicsBaseVO.quantifyQuantifyCode': [ |
|
|
|
|
|
{ required: true, message: '请输入选择集编码', trigger: 'blur' } |
|
|
|
|
|
] |
|
|
|
|
|
}) |
|
|
/** 打开弹窗 */ |
|
|
/** 打开弹窗 */ |
|
|
|
|
|
let tabIndex = 1 |
|
|
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { |
|
|
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { |
|
|
dialogVisible.value = true |
|
|
dialogVisible.value = true |
|
|
if (titleName) { |
|
|
if (titleName) { |
|
@ -338,17 +573,35 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
} else { |
|
|
} else { |
|
|
dialogTitle.value = t('action.' + type) |
|
|
dialogTitle.value = t('action.' + type) |
|
|
} |
|
|
} |
|
|
|
|
|
formType.value = type |
|
|
|
|
|
if (row) { |
|
|
|
|
|
data.value = row |
|
|
|
|
|
let list = await InspectionProcessPageApi.getListByTempleteCode(row.code) |
|
|
|
|
|
list.forEach((item, index) => { |
|
|
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
|
|
item.name = index + 1 |
|
|
|
|
|
}) |
|
|
|
|
|
data.value.process = list |
|
|
|
|
|
} else { |
|
|
|
|
|
data.value = { |
|
|
|
|
|
code: '', |
|
|
|
|
|
description: '', |
|
|
|
|
|
version: '', |
|
|
|
|
|
process: [] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tabIndex = data.value.process.length + 1 |
|
|
} |
|
|
} |
|
|
defineExpose({ open, dialogVisible, formLoading }) // 提供 open 方法,用于打开弹窗 |
|
|
defineExpose({ open, dialogVisible, formLoading }) // 提供 open 方法,用于打开弹窗 |
|
|
import type { TabPaneName } from 'element-plus' |
|
|
import type { TabPaneName } from 'element-plus' |
|
|
|
|
|
|
|
|
let tabIndex = 1 |
|
|
|
|
|
const editableTabsValue = ref('1') |
|
|
const editableTabsValue = ref('1') |
|
|
// const editableTabs = ref([]) |
|
|
// const editableTabs = ref([]) |
|
|
|
|
|
|
|
|
const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' | 'add') => { |
|
|
const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' | 'add') => { |
|
|
if (action === 'add') { |
|
|
if (action === 'add') { |
|
|
name.value = '' |
|
|
nameForm.value.name = '' |
|
|
dialogVisibleName.value = true |
|
|
dialogVisibleName.value = true |
|
|
} else if (action === 'remove') { |
|
|
} else if (action === 'remove') { |
|
|
const tabs = data.value.process |
|
|
const tabs = data.value.process |
|
@ -370,39 +623,45 @@ const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' | |
|
|
/** 修改名称时间 */ |
|
|
/** 修改名称时间 */ |
|
|
const buttonBaseClick1 = (val) => { |
|
|
const buttonBaseClick1 = (val) => { |
|
|
// 保存 |
|
|
// 保存 |
|
|
console.log(val) |
|
|
|
|
|
if (val == 'save') { |
|
|
if (val == 'save') { |
|
|
const newTabName = `${++tabIndex}` |
|
|
if (!nameRef.value) return |
|
|
data.value.process.push({ |
|
|
nameRef.value.validate((valid, fields) => { |
|
|
description: name.value, |
|
|
if (valid) { |
|
|
name: newTabName, |
|
|
const newTabName = `${++tabIndex}` |
|
|
inspectionCode: '', |
|
|
data.value.process.push({ |
|
|
sequenceCode: '', |
|
|
description: nameForm.value.name, |
|
|
inspectionCharCode: '', |
|
|
name: newTabName, |
|
|
inspectionCharacteristicsBaseVO:{ |
|
|
inspectionCode: '', |
|
|
describe: '', |
|
|
sequenceCode: '', |
|
|
inspectionMethodCode: '', |
|
|
inspectionCharCode: '', |
|
|
dynamicUpdateCode: '', |
|
|
inspectionCharacteristicsBaseVO: { |
|
|
inspectionMethod: '', |
|
|
describe: '', |
|
|
isCanUpdate: '', |
|
|
inspectionMethodCode: '', |
|
|
isDestructionInspection: '', |
|
|
dynamicUpdateCode: '', |
|
|
resultEntryMethod: '', |
|
|
inspectionMethod: '', |
|
|
featureType: '', |
|
|
isCanUpdate: '', |
|
|
quantifyIsCapping: '', |
|
|
isDestructionInspection: '', |
|
|
quantifyIsLowlimit: '', |
|
|
resultEntryMethod: '', |
|
|
quantifyTarget: '', |
|
|
featureType: '', |
|
|
quantifyCapping: '', |
|
|
quantifyIsCapping: '', |
|
|
quantifyLowlimit: '', |
|
|
quantifyIsLowlimit: '', |
|
|
quantifyUom: '', |
|
|
quantifyTarget: '', |
|
|
quantifyDecimal: '', |
|
|
quantifyCapping: '', |
|
|
quantifyQuantifyCode: '' |
|
|
quantifyLowlimit: '', |
|
|
|
|
|
quantifyUom: '', |
|
|
|
|
|
quantifyDecimal: '', |
|
|
|
|
|
quantifyQuantifyCode: '' |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(data.value.process) |
|
|
|
|
|
|
|
|
|
|
|
editableTabsValue.value = newTabName |
|
|
|
|
|
dialogVisibleName.value = false |
|
|
|
|
|
} else { |
|
|
|
|
|
console.log('error submit!') |
|
|
|
|
|
return false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
console.log( data.value.process) |
|
|
|
|
|
|
|
|
|
|
|
editableTabsValue.value = newTabName |
|
|
|
|
|
dialogVisibleName.value = false |
|
|
|
|
|
} |
|
|
} |
|
|
// 关闭 |
|
|
// 关闭 |
|
|
else if (val == 'close') { |
|
|
else if (val == 'close') { |
|
@ -419,14 +678,44 @@ const buttonBaseClick = (val) => { |
|
|
dialogVisible.value = false |
|
|
dialogVisible.value = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
// 传递给父类 |
|
|
|
|
|
const emit = defineEmits(['submitForm', 'searchTableSuccess']) |
|
|
|
|
|
const validateForm = (formRef) => { |
|
|
|
|
|
// console.log(TableBaseForm_Ref.value) |
|
|
|
|
|
let _lists = formRef?.map((v) => v.validate()) |
|
|
|
|
|
return Promise.all(_lists) |
|
|
|
|
|
.then(() => { |
|
|
|
|
|
return true |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
return false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
const submitForm = async () => { |
|
|
const submitForm = async () => { |
|
|
// const data1= unref(formRefMain)?.formModel |
|
|
try { |
|
|
// const data2= unref(formRefProcess)?.formModel |
|
|
const validateForm1 = await validateForm(formProcessRef.value) |
|
|
// const data3= unref(formRefFeatures)?.formModel |
|
|
console.log(validateForm1) |
|
|
// console.log(data1) |
|
|
await formMainRef.value.validate() |
|
|
// console.log(data2) |
|
|
if (!data.value.process || data.value.process.length == 0) { |
|
|
console.log(data.list) |
|
|
message.error(`请添加工序`) |
|
|
emit('submitForm', formType.value, data) |
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
const bol1 = await validateForm(formProcessRef.value) |
|
|
|
|
|
const bol2 = await validateForm(formFeaturesRef.value) |
|
|
|
|
|
if (!bol1 || !bol2) { |
|
|
|
|
|
message.error(`模板中有检验工序和检验特性未填写完全`) |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (formType.value == 'create') { |
|
|
|
|
|
// 主子表——提交请求 |
|
|
|
|
|
emit('submitForm', formType.value, data) |
|
|
|
|
|
} else { |
|
|
|
|
|
// 编辑 |
|
|
|
|
|
emit('submitForm', formType.value, data) |
|
|
|
|
|
} |
|
|
|
|
|
} catch { |
|
|
|
|
|
console.log(111) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
/** 弹窗按钮 */ |
|
|
/** 弹窗按钮 */ |
|
|
let Butttondata: any = [] |
|
|
let Butttondata: any = [] |
|
@ -438,6 +727,123 @@ if (props.footButttondata) { |
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
// 选择特征类型 |
|
|
|
|
|
const changeFeatureType = (e) => { |
|
|
|
|
|
console.log(e) |
|
|
|
|
|
} |
|
|
|
|
|
const searchTableRef = ref() |
|
|
|
|
|
const opensearchTable = ( |
|
|
|
|
|
formField, |
|
|
|
|
|
searchField, |
|
|
|
|
|
searchTitle, |
|
|
|
|
|
searchAllSchemas, |
|
|
|
|
|
searchPage, |
|
|
|
|
|
searchCondition, |
|
|
|
|
|
multiple, |
|
|
|
|
|
type, |
|
|
|
|
|
row |
|
|
|
|
|
) => { |
|
|
|
|
|
console.log(988, row) |
|
|
|
|
|
const _searchCondition = {} |
|
|
|
|
|
// 判断查询条件中,是否存在指向主表的数据 |
|
|
|
|
|
if (searchCondition && searchCondition.length > 0) { |
|
|
|
|
|
// 转换筛选条件所需 |
|
|
|
|
|
let filters: any[] = [] |
|
|
|
|
|
for (var i = 0; i < searchCondition.length; i++) { |
|
|
|
|
|
// searchCondition.forEach((item) => { |
|
|
|
|
|
// 查询条件为主表某字段,需要赋值主表数据,数据来源是详情的,赋值需要从row中获取 |
|
|
|
|
|
if (searchCondition[i].isMainValue) { |
|
|
|
|
|
_searchCondition[searchCondition[i].key] = formRef.value.formModel[searchCondition[i].value] |
|
|
|
|
|
? formRef.value.formModel[searchCondition[i].value] |
|
|
|
|
|
: props.detailData |
|
|
|
|
|
? props.detailData[searchCondition[i].value] |
|
|
|
|
|
: row |
|
|
|
|
|
? row[searchCondition[i].value] |
|
|
|
|
|
: '' |
|
|
|
|
|
// 是否含有空参数情况 |
|
|
|
|
|
let isNull = false |
|
|
|
|
|
if ( |
|
|
|
|
|
_searchCondition[searchCondition[i].key] == '' || |
|
|
|
|
|
_searchCondition[searchCondition[i].key] == undefined |
|
|
|
|
|
) { |
|
|
|
|
|
isNull = true |
|
|
|
|
|
} |
|
|
|
|
|
if (isNull) { |
|
|
|
|
|
message.warning( |
|
|
|
|
|
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' |
|
|
|
|
|
) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
// 扩展 转换为筛选条件进行查询 |
|
|
|
|
|
if (searchCondition[i].isSearch) { |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
action: searchCondition[i].action, |
|
|
|
|
|
column: searchCondition[i].key, |
|
|
|
|
|
value: searchCondition[i].value |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
_searchCondition[searchCondition[i].key] = searchCondition[i].value |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (filters.length > 0) { |
|
|
|
|
|
_searchCondition.isSearch = true |
|
|
|
|
|
_searchCondition.filters = filters |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const _searchTableTitle = searchTitle |
|
|
|
|
|
const _searchTableAllSchemas = searchAllSchemas |
|
|
|
|
|
const _searchTablePage = searchPage |
|
|
|
|
|
searchTableRef.value.open( |
|
|
|
|
|
_searchTableTitle, |
|
|
|
|
|
_searchTableAllSchemas, |
|
|
|
|
|
_searchTablePage, |
|
|
|
|
|
formField, |
|
|
|
|
|
searchField, |
|
|
|
|
|
multiple, |
|
|
|
|
|
type, |
|
|
|
|
|
row, |
|
|
|
|
|
_searchCondition |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
// 弹层确定返回所选数据 |
|
|
|
|
|
// val : 弹层列表row 数据 |
|
|
|
|
|
const searchTableSuccess = (formField, searchField, val, type, row) => { |
|
|
|
|
|
console.log(row) |
|
|
|
|
|
data.value.process.forEach((item) => { |
|
|
|
|
|
if (item.description == row.description) { |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO[formField] = val[0].code |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// row.inspectionCharacteristicsBaseVO.inspectionMethodCode = val[0].code |
|
|
|
|
|
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) |
|
|
|
|
|
} |
|
|
|
|
|
// 选择是否设定上限值 |
|
|
|
|
|
const changeIsCapping = (e) => { |
|
|
|
|
|
if (e) { |
|
|
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
|
|
} else { |
|
|
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 选择是否设定下限值 |
|
|
|
|
|
const changeLowlimit = (e) => { |
|
|
|
|
|
if (e) { |
|
|
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
|
|
} else { |
|
|
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 选择是否设定目标值 |
|
|
|
|
|
const changeIsTarget = (e) => { |
|
|
|
|
|
if (e) { |
|
|
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
|
|
} else { |
|
|
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
<style scoped> |
|
|
<style scoped> |
|
|
.small-title { |
|
|
.small-title { |
|
|