diff --git a/src/components/SelectByDict/index.vue b/src/components/SelectByDict/index.vue index 83fc909..f7035dd 100644 --- a/src/components/SelectByDict/index.vue +++ b/src/components/SelectByDict/index.vue @@ -89,6 +89,7 @@ const inputValue = value.value // 先判断字典中是否存在该值 const data = dictList.value.filter(item => item.name === inputValue).length + console.log() if (!data) { console.log(inputValue, '该值不存在添加字典') emit('changeValue', inputValue) @@ -117,10 +118,11 @@ dictList.value = dict.map((item: any) => ({ ...item, value1: item.value, value: item.name })) // 发送 绑定的value (可用可不用) emit('getDictValue', dictList.value.filter(item => item.name === inputValue)[0].value1) - // setTimeout(() => { - // input.value.blur() - // }) + }).catch(() => { + emit('getDictValue', inputValue) }) + }).catch(() => { + emit('getDictValue', inputValue) }) } else { diff --git a/src/components/SelectByDict/index.vue b/src/components/SelectByDict/index.vue index 83fc909..f7035dd 100644 --- a/src/components/SelectByDict/index.vue +++ b/src/components/SelectByDict/index.vue @@ -89,6 +89,7 @@ const inputValue = value.value // 先判断字典中是否存在该值 const data = dictList.value.filter(item => item.name === inputValue).length + console.log() if (!data) { console.log(inputValue, '该值不存在添加字典') emit('changeValue', inputValue) @@ -117,10 +118,11 @@ dictList.value = dict.map((item: any) => ({ ...item, value1: item.value, value: item.name })) // 发送 绑定的value (可用可不用) emit('getDictValue', dictList.value.filter(item => item.name === inputValue)[0].value1) - // setTimeout(() => { - // input.value.blur() - // }) + }).catch(() => { + emit('getDictValue', inputValue) }) + }).catch(() => { + emit('getDictValue', inputValue) }) } else { diff --git a/src/views/business/measure/item/components/ninth/templateDetail.vue b/src/views/business/measure/item/components/ninth/templateDetail.vue index e58a8ba..0783c6c 100644 --- a/src/views/business/measure/item/components/ninth/templateDetail.vue +++ b/src/views/business/measure/item/components/ninth/templateDetail.vue @@ -721,10 +721,10 @@ const changeLoadSituationa = (value: any, index: number, text: string, type: string, list: any[], item: string) => { if (item === '频率显示') { if (text === '标称值') { - list[index].frequency = value + frequencyList.value[index].frequency = value } if (text === '标称值单位') { - list[index].frequencyUnit = typeof value === 'string' ? value : '' + frequencyList.value[index].frequencyUnit = typeof value === 'string' ? value : '' } } if (item === '中频带宽') { diff --git a/src/components/SelectByDict/index.vue b/src/components/SelectByDict/index.vue index 83fc909..f7035dd 100644 --- a/src/components/SelectByDict/index.vue +++ b/src/components/SelectByDict/index.vue @@ -89,6 +89,7 @@ const inputValue = value.value // 先判断字典中是否存在该值 const data = dictList.value.filter(item => item.name === inputValue).length + console.log() if (!data) { console.log(inputValue, '该值不存在添加字典') emit('changeValue', inputValue) @@ -117,10 +118,11 @@ dictList.value = dict.map((item: any) => ({ ...item, value1: item.value, value: item.name })) // 发送 绑定的value (可用可不用) emit('getDictValue', dictList.value.filter(item => item.name === inputValue)[0].value1) - // setTimeout(() => { - // input.value.blur() - // }) + }).catch(() => { + emit('getDictValue', inputValue) }) + }).catch(() => { + emit('getDictValue', inputValue) }) } else { diff --git a/src/views/business/measure/item/components/ninth/templateDetail.vue b/src/views/business/measure/item/components/ninth/templateDetail.vue index e58a8ba..0783c6c 100644 --- a/src/views/business/measure/item/components/ninth/templateDetail.vue +++ b/src/views/business/measure/item/components/ninth/templateDetail.vue @@ -721,10 +721,10 @@ const changeLoadSituationa = (value: any, index: number, text: string, type: string, list: any[], item: string) => { if (item === '频率显示') { if (text === '标称值') { - list[index].frequency = value + frequencyList.value[index].frequency = value } if (text === '标称值单位') { - list[index].frequencyUnit = typeof value === 'string' ? value : '' + frequencyList.value[index].frequencyUnit = typeof value === 'string' ? value : '' } } if (item === '中频带宽') { diff --git a/src/views/business/taskMeasure/measureData/components/eleventh/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/eleventh/templateDetail.vue index c86808e..dd7314c 100644 --- a/src/views/business/taskMeasure/measureData/components/eleventh/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/eleventh/templateDetail.vue @@ -66,7 +66,7 @@ { text: '直通测量值', value: 'directMeasureValue', align: 'center', required: false, type: 'number' }, { text: '加入衰减测量值', value: 'addMeasureValue', align: 'center', required: false, type: 'number' }, { text: '指标下限', value: 'lowerIndex', align: 'center', required: false, type: 'text' }, - { text: '衰减量', value: 'attenuationAmount', align: 'center', required: false, type: 'text' }, + { text: '衰减量', value: 'attenuationAmount', align: 'center', required: true, type: 'text' }, { text: '指标上限', value: 'upperIndex', align: 'center', required: false, type: 'text' }, { text: 'U(k=2)', value: 'urel', align: 'center', required: false, type: 'text' }, { text: '结论', value: 'conclusion', align: 'center', required: false, type: 'text' }, @@ -250,6 +250,8 @@ index="1" :show-btn="false" :calc-btn="pageType !== 'detail'" :show-title="true" :is-multi="false" :need-merge-cells="['frequency']" @calculate-result="calculate" > +