zhang_li
3 months ago
12 changed files with 2179 additions and 1152 deletions
@ -0,0 +1,430 @@ |
|||
<template> |
|||
<div class="main-body"> |
|||
<div class="left"> |
|||
<div |
|||
class="tabs-label" |
|||
:class="element.name == editableTabsValue ? 'active' : ''" |
|||
v-for="(element, index) in data.process" |
|||
:key="index" |
|||
@click.stop="chooseTabs(element, index)" |
|||
> |
|||
<span>{{ element.description }}</span> |
|||
</div> |
|||
</div> |
|||
<div class="right"> |
|||
<div v-for="(item, index) in data.process" :key="index"> |
|||
<div v-show="item.name == editableTabsValue"> |
|||
<div class="small-title">检验工序</div> |
|||
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="编码" prop="code"> |
|||
<el-input v-model="item.code" placeholder="根据系统生成" :disabled="true" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="检验方案模板编码"> |
|||
<el-input |
|||
v-model="item.inspectionCode" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="描述" prop="description"> |
|||
<el-input v-model="item.description" :disabled="true"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="顺序号" prop="sequenceCode"> |
|||
<el-input v-model="item.sequenceCode" disabled /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="检验特性编码"> |
|||
<el-input |
|||
v-model="item.inspectionCharCode" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div class="small-title">检验特性</div> |
|||
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="编码"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.code" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="描述" prop="inspectionCharacteristicsBaseVO.description"> |
|||
<el-input v-model="item.inspectionCharacteristicsBaseVO.description" disabled/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="检验方法" |
|||
prop="inspectionCharacteristicsBaseVO.inspectionMethodCode" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodCode" |
|||
placeholder="请选择检验方法" |
|||
disabled |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="检验方法描述" |
|||
prop="inspectionCharacteristicsBaseVO.inspectionMethodName" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName" |
|||
disabled |
|||
placeholder="请选择检验方法" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="采样过程" |
|||
prop="inspectionCharacteristicsBaseVO.samplingProcessCode" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.samplingProcessCode" |
|||
placeholder="请选择采样过程" |
|||
disabled |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="采样过程描述" |
|||
prop="inspectionCharacteristicsBaseVO.inspectionMethodName" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName" |
|||
disabled |
|||
placeholder="请选择采样过程描述" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="是否允许修改特征值" |
|||
prop="inspectionCharacteristicsBaseVO.isCanUpdate" |
|||
> |
|||
<el-switch v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" disabled /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="结果录入方式" |
|||
prop="inspectionCharacteristicsBaseVO.resultEntryMethod" |
|||
> |
|||
<el-select |
|||
v-model="item.inspectionCharacteristicsBaseVO.resultEntryMethod" |
|||
placeholder="请选择结果录入方式" |
|||
disabled |
|||
> |
|||
<el-option |
|||
v-for="dict in getStrDictOptions( |
|||
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY |
|||
)" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="特征类型" prop="inspectionCharacteristicsBaseVO.featureType"> |
|||
<!-- <el-input v-model="item.featureType" /> --> |
|||
<el-select |
|||
v-model="item.inspectionCharacteristicsBaseVO.featureType" |
|||
placeholder="请选择特征类型" |
|||
@change="changeFeatureType($event, item)" |
|||
disabled |
|||
> |
|||
<el-option |
|||
v-for="dict in getStrDictOptions( |
|||
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE |
|||
)" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|||
<el-form-item label="计量单位" prop="inspectionCharacteristicsBaseVO.quantifyUom"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|||
<el-form-item label="小数位" prop="inspectionCharacteristicsBaseVO.quantifyDecimal"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|||
<el-form-item |
|||
label="是否设定上限" |
|||
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|||
> |
|||
<el-switch |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|||
<el-form-item |
|||
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|||
label="是否设定下限" |
|||
> |
|||
<el-switch |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|||
<el-form-item |
|||
prop="inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|||
label="是否设定目标值" |
|||
> |
|||
<el-switch |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col |
|||
:span="12" |
|||
v-if=" |
|||
item.inspectionCharacteristicsBaseVO.featureType == 0 && |
|||
item.inspectionCharacteristicsBaseVO.quantifyIsCapping |
|||
" |
|||
> |
|||
<el-form-item label="上限值" prop="inspectionCharacteristicsBaseVO.quantifyCapping"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" |
|||
disabled |
|||
type="number" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col |
|||
:span="12" |
|||
v-if=" |
|||
item.inspectionCharacteristicsBaseVO.featureType == 0 && |
|||
item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit |
|||
" |
|||
> |
|||
<el-form-item |
|||
label="下限值" |
|||
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|||
> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|||
disabled |
|||
type="number" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col |
|||
:span="12" |
|||
v-if=" |
|||
item.inspectionCharacteristicsBaseVO.featureType == 0 && |
|||
item.inspectionCharacteristicsBaseVO.quantifyIsTarget |
|||
" |
|||
> |
|||
<el-form-item label="目标值" prop="inspectionCharacteristicsBaseVO.quantifyTarget"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" |
|||
disabled |
|||
type="number" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1"> |
|||
<el-form-item |
|||
label="选定集" |
|||
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|||
placeholder="请选择选定集" |
|||
disabled |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1"> |
|||
<el-form-item |
|||
label="选定集描述" |
|||
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyName" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyName" |
|||
disabled |
|||
placeholder="请选择选定集描述" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate' |
|||
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|||
|
|||
const props = defineProps({ |
|||
data: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
} |
|||
}) |
|||
console.log(props.data) |
|||
const data = ref(props.data.data) |
|||
|
|||
const editableTabsValue = ref('1') |
|||
onMounted(async () => { |
|||
data.value.process = [] |
|||
let list = [] |
|||
if (data.value.content) { |
|||
list = JSON.parse(data.value.content) |
|||
} else { |
|||
list = await InspectionProcessPageApi.getListByTempleteCode(data.value.programmeTemplateCode) |
|||
} |
|||
console.log(99, data.value) |
|||
console.log(99, list) |
|||
editableTabsValue.value = '1' |
|||
let arr = [] |
|||
list.forEach((item, index) => { |
|||
let obj = { |
|||
inspectionCode: item.inspectionCode, |
|||
description: item.description, |
|||
inspectionCharCode: item.inspectionCharCode, |
|||
sequenceCode: item.sequenceCode, |
|||
name: String(index + 1), |
|||
inspectionCharacteristicsBaseVO: { |
|||
description: item.inspectionCharacteristicsBaseVO.description, |
|||
featureType: item.inspectionCharacteristicsBaseVO.featureType, |
|||
inspectionMethodCode: item.inspectionCharacteristicsBaseVO.inspectionMethodCode, |
|||
inspectionMethodName: item.inspectionCharacteristicsBaseVO.inspectionMethodName, |
|||
samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode, |
|||
|
|||
isCanUpdate: item.inspectionCharacteristicsBaseVO.isCanUpdate, |
|||
isDestructionInspection: item.inspectionCharacteristicsBaseVO.isDestructionInspection, |
|||
quantifyCapping: item.inspectionCharacteristicsBaseVO.quantifyCapping, |
|||
quantifyDecimal: item.inspectionCharacteristicsBaseVO.quantifyDecimal, |
|||
quantifyIsCapping: item.inspectionCharacteristicsBaseVO.quantifyIsCapping, |
|||
quantifyIsLowlimit: item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit, |
|||
quantifyIsTarget: item.inspectionCharacteristicsBaseVO.quantifyIsTarget, |
|||
quantifyLowlimit: item.inspectionCharacteristicsBaseVO.quantifyLowlimit, |
|||
quantifyQuantifyCode: item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode, |
|||
quantifyQuantifyName: item.inspectionCharacteristicsBaseVO.quantifyQuantifyName, |
|||
quantifyTarget: item.inspectionCharacteristicsBaseVO.quantifyTarget, |
|||
quantifyUom: item.inspectionCharacteristicsBaseVO.quantifyUom, |
|||
resultEntryMethod: item.inspectionCharacteristicsBaseVO.resultEntryMethod, |
|||
samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode, |
|||
samplingProcessName: item.inspectionCharacteristicsBaseVO.samplingProcessName |
|||
} |
|||
} |
|||
data.value.process.push(obj) |
|||
}) |
|||
}) |
|||
const chooseTabs = (element, index) => { |
|||
if (element.name == editableTabsValue.value) return |
|||
editableTabsValue.value = element.name |
|||
} |
|||
console.log(data.value.process) |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.small-title { |
|||
font-weight: bold; |
|||
padding: 0px 10px 10px; |
|||
color: #1a8bfc; |
|||
font-size: 16px; |
|||
} |
|||
.main-body { |
|||
display: flex; |
|||
margin-top: 20px; |
|||
.left { |
|||
width: 200px; |
|||
background: rgb(245, 247, 250); |
|||
border: 1px solid rgb(220, 223, 230); |
|||
min-height: 60px; |
|||
position: relative; |
|||
padding: 6px 0px; |
|||
font-size: 14px; |
|||
.plus-icon { |
|||
cursor: pointer; |
|||
position: absolute; |
|||
right: 0px; |
|||
top: 0px; |
|||
border: 1px solid rgb(220, 223, 230); |
|||
background: rgb(245, 247, 250); |
|||
display: flex; |
|||
align-items: center; |
|||
justify-items: center; |
|||
padding: 1px; |
|||
} |
|||
} |
|||
} |
|||
.tabs-label { |
|||
padding: 4px 20px 4px 20px; |
|||
min-height: 30px; |
|||
justify-content: flex-end; |
|||
display: flex; |
|||
align-items: center; |
|||
cursor: pointer; |
|||
word-break: break-all; |
|||
} |
|||
.active { |
|||
background: white; |
|||
} |
|||
.right { |
|||
border: 1px solid rgb(220, 223, 230); |
|||
flex: 1; |
|||
width: 0px; |
|||
padding: 20px; |
|||
} |
|||
</style> |
@ -0,0 +1,423 @@ |
|||
<template> |
|||
<div class="main-body"> |
|||
<div class="left"> |
|||
<div |
|||
class="tabs-label" |
|||
:class="element.name == editableTabsValue ? 'active' : ''" |
|||
v-for="(element, index) in data.process" |
|||
:key="index" |
|||
@click.stop="chooseTabs(element, index)" |
|||
> |
|||
<span>{{ element.description }}</span> |
|||
</div> |
|||
</div> |
|||
<div class="right"> |
|||
<div v-for="(item, index) in data.process" :key="index"> |
|||
<div v-show="item.name == editableTabsValue"> |
|||
<div class="small-title">检验工序</div> |
|||
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="编码" prop="code"> |
|||
<el-input v-model="item.code" placeholder="根据系统生成" :disabled="true" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="检验方案模板编码"> |
|||
<el-input |
|||
v-model="item.inspectionCode" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="描述" prop="description"> |
|||
<el-input v-model="item.description" :disabled="true"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="顺序号" prop="sequenceCode"> |
|||
<el-input v-model="item.sequenceCode" disabled /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="检验特性编码"> |
|||
<el-input |
|||
v-model="item.inspectionCharCode" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div class="small-title">检验特性</div> |
|||
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="编码"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.code" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="描述" prop="inspectionCharacteristicsBaseVO.description"> |
|||
<el-input v-model="item.inspectionCharacteristicsBaseVO.description" disabled/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="检验方法" |
|||
prop="inspectionCharacteristicsBaseVO.inspectionMethodCode" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodCode" |
|||
placeholder="请选择检验方法" |
|||
disabled |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="检验方法描述" |
|||
prop="inspectionCharacteristicsBaseVO.inspectionMethodName" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName" |
|||
disabled |
|||
placeholder="请选择检验方法" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="采样过程" |
|||
prop="inspectionCharacteristicsBaseVO.samplingProcessCode" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.samplingProcessCode" |
|||
placeholder="请选择采样过程" |
|||
disabled |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="采样过程描述" |
|||
prop="inspectionCharacteristicsBaseVO.inspectionMethodName" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName" |
|||
disabled |
|||
placeholder="请选择采样过程描述" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="是否允许修改特征值" |
|||
prop="inspectionCharacteristicsBaseVO.isCanUpdate" |
|||
> |
|||
<el-switch v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" disabled /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="结果录入方式" |
|||
prop="inspectionCharacteristicsBaseVO.resultEntryMethod" |
|||
> |
|||
<el-select |
|||
v-model="item.inspectionCharacteristicsBaseVO.resultEntryMethod" |
|||
placeholder="请选择结果录入方式" |
|||
disabled |
|||
> |
|||
<el-option |
|||
v-for="dict in getStrDictOptions( |
|||
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY |
|||
)" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="特征类型" prop="inspectionCharacteristicsBaseVO.featureType"> |
|||
<!-- <el-input v-model="item.featureType" /> --> |
|||
<el-select |
|||
v-model="item.inspectionCharacteristicsBaseVO.featureType" |
|||
placeholder="请选择特征类型" |
|||
@change="changeFeatureType($event, item)" |
|||
disabled |
|||
> |
|||
<el-option |
|||
v-for="dict in getStrDictOptions( |
|||
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE |
|||
)" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|||
<el-form-item label="计量单位" prop="inspectionCharacteristicsBaseVO.quantifyUom"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|||
<el-form-item label="小数位" prop="inspectionCharacteristicsBaseVO.quantifyDecimal"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|||
<el-form-item |
|||
label="是否设定上限" |
|||
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|||
> |
|||
<el-switch |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|||
<el-form-item |
|||
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|||
label="是否设定下限" |
|||
> |
|||
<el-switch |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|||
<el-form-item |
|||
prop="inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|||
label="是否设定目标值" |
|||
> |
|||
<el-switch |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col |
|||
:span="12" |
|||
v-if=" |
|||
item.inspectionCharacteristicsBaseVO.featureType == 0 && |
|||
item.inspectionCharacteristicsBaseVO.quantifyIsCapping |
|||
" |
|||
> |
|||
<el-form-item label="上限值" prop="inspectionCharacteristicsBaseVO.quantifyCapping"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" |
|||
disabled |
|||
type="number" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col |
|||
:span="12" |
|||
v-if=" |
|||
item.inspectionCharacteristicsBaseVO.featureType == 0 && |
|||
item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit |
|||
" |
|||
> |
|||
<el-form-item |
|||
label="下限值" |
|||
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|||
> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|||
disabled |
|||
type="number" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col |
|||
:span="12" |
|||
v-if=" |
|||
item.inspectionCharacteristicsBaseVO.featureType == 0 && |
|||
item.inspectionCharacteristicsBaseVO.quantifyIsTarget |
|||
" |
|||
> |
|||
<el-form-item label="目标值" prop="inspectionCharacteristicsBaseVO.quantifyTarget"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" |
|||
disabled |
|||
type="number" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1"> |
|||
<el-form-item |
|||
label="选定集" |
|||
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|||
placeholder="请选择选定集" |
|||
disabled |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1"> |
|||
<el-form-item |
|||
label="选定集描述" |
|||
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyName" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyName" |
|||
disabled |
|||
placeholder="请选择选定集描述" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate' |
|||
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|||
|
|||
const props = defineProps({ |
|||
data: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
} |
|||
}) |
|||
console.log(props.data) |
|||
const data = ref(props.data.data) |
|||
|
|||
const editableTabsValue = ref('1') |
|||
onMounted(async () => { |
|||
data.value.process = [] |
|||
let list = await InspectionProcessPageApi.getListByTempleteCode(data.value.code) |
|||
editableTabsValue.value = '1' |
|||
let arr = [] |
|||
list.forEach((item, index) => { |
|||
let obj = { |
|||
inspectionCode: item.inspectionCode, |
|||
description: item.description, |
|||
inspectionCharCode: item.inspectionCharCode, |
|||
sequenceCode: item.sequenceCode, |
|||
name: String(index + 1), |
|||
inspectionCharacteristicsBaseVO: { |
|||
description: item.inspectionCharacteristicsBaseVO.description, |
|||
featureType: item.inspectionCharacteristicsBaseVO.featureType, |
|||
inspectionMethodCode: item.inspectionCharacteristicsBaseVO.inspectionMethodCode, |
|||
inspectionMethodName: item.inspectionCharacteristicsBaseVO.inspectionMethodName, |
|||
samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode, |
|||
|
|||
isCanUpdate: item.inspectionCharacteristicsBaseVO.isCanUpdate, |
|||
isDestructionInspection: item.inspectionCharacteristicsBaseVO.isDestructionInspection, |
|||
quantifyCapping: item.inspectionCharacteristicsBaseVO.quantifyCapping, |
|||
quantifyDecimal: item.inspectionCharacteristicsBaseVO.quantifyDecimal, |
|||
quantifyIsCapping: item.inspectionCharacteristicsBaseVO.quantifyIsCapping, |
|||
quantifyIsLowlimit: item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit, |
|||
quantifyIsTarget: item.inspectionCharacteristicsBaseVO.quantifyIsTarget, |
|||
quantifyLowlimit: item.inspectionCharacteristicsBaseVO.quantifyLowlimit, |
|||
quantifyQuantifyCode: item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode, |
|||
quantifyQuantifyName: item.inspectionCharacteristicsBaseVO.quantifyQuantifyName, |
|||
quantifyTarget: item.inspectionCharacteristicsBaseVO.quantifyTarget, |
|||
quantifyUom: item.inspectionCharacteristicsBaseVO.quantifyUom, |
|||
resultEntryMethod: item.inspectionCharacteristicsBaseVO.resultEntryMethod, |
|||
samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode, |
|||
samplingProcessName: item.inspectionCharacteristicsBaseVO.samplingProcessName |
|||
} |
|||
} |
|||
data.value.process.push(obj) |
|||
}) |
|||
}) |
|||
const chooseTabs = (element, index) => { |
|||
if (element.name == editableTabsValue.value) return |
|||
editableTabsValue.value = element.name |
|||
} |
|||
console.log(data.value.process) |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.small-title { |
|||
font-weight: bold; |
|||
padding: 0px 10px 10px; |
|||
color: #1a8bfc; |
|||
font-size: 16px; |
|||
} |
|||
.main-body { |
|||
display: flex; |
|||
margin-top: 20px; |
|||
.left { |
|||
width: 200px; |
|||
background: rgb(245, 247, 250); |
|||
border: 1px solid rgb(220, 223, 230); |
|||
min-height: 60px; |
|||
position: relative; |
|||
padding: 6px 0px; |
|||
font-size: 14px; |
|||
.plus-icon { |
|||
cursor: pointer; |
|||
position: absolute; |
|||
right: 0px; |
|||
top: 0px; |
|||
border: 1px solid rgb(220, 223, 230); |
|||
background: rgb(245, 247, 250); |
|||
display: flex; |
|||
align-items: center; |
|||
justify-items: center; |
|||
padding: 1px; |
|||
} |
|||
} |
|||
} |
|||
.tabs-label { |
|||
padding: 4px 20px 4px 20px; |
|||
min-height: 30px; |
|||
justify-content: flex-end; |
|||
display: flex; |
|||
align-items: center; |
|||
cursor: pointer; |
|||
word-break: break-all; |
|||
} |
|||
.active { |
|||
background: white; |
|||
} |
|||
.right { |
|||
border: 1px solid rgb(220, 223, 230); |
|||
flex: 1; |
|||
width: 0px; |
|||
padding: 20px; |
|||
} |
|||
</style> |
Loading…
Reference in new issue