+
{{ scope.technicalIndexSymbol }}
-
+
%
@@ -585,17 +601,26 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
@@ -606,8 +631,10 @@
@@ -624,8 +651,10 @@
@@ -641,8 +670,10 @@
@@ -666,12 +697,17 @@
-
+
{{ scope.technicalIndexSymbol }}
@@ -686,19 +722,27 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
diff --git a/src/assets/json/readme.json b/src/assets/json/readme.json
index 2be131f..cec774f 100644
--- a/src/assets/json/readme.json
+++ b/src/assets/json/readme.json
@@ -1,4 +1,3 @@
-
{
"first": "多功能校准源_字典:1",
"second": "直流稳压电源检定装置_字典:2",
@@ -6,16 +5,16 @@
"fourth": "0.02级活塞式压力计_字典:4",
"fifth": "二等铂电阻温度计标准装置 _字典:5",
"sixth": "安全阀校验装置_字典:6",
- "seventh":"精密露点仪标准装置_字典:7",
- "eighth":"E2等砝码标准装置_字典:8",
- "ninth":"频谱分析仪检定装置_字典:9",
- "tenth":"信号发生器检定装置_字典:10",
- "eleventh":"微波衰减标准装置_字典:11",
- "twelfth":"频率短期稳定度标准装置_字典:12",
- "thirteenth":"示波器检定装置_字典:13",
- "fourteenth":"铯原子频率标准装置_字典:14",
- "fifteenth":"小功率标准装置_字典:15",
- "sixteenth":"低频信号源检定装置_字典:16",
- "seventeenth":"S参数标准装置_字典:17",
- "eighteenth":"失真度标准装置_字典:18"
+ "seventh": "精密露点仪标准装置_字典:7",
+ "eighth": "E2等砝码标准装置_字典:8",
+ "ninth": "频谱分析仪检定装置_字典:9",
+ "tenth": "信号发生器检定装置_字典:10",
+ "eleventh": "微波衰减标准装置_字典:11",
+ "twelfth": "频率短期稳定度标准装置_字典:12",
+ "thirteenth": "示波器检定装置_字典:13",
+ "fourteenth": "铯原子频率标准装置_字典:14",
+ "fifteenth": "小功率标准装置_字典:15",
+ "sixteenth": "低频信号源检定装置_字典:16",
+ "seventeenth": "S参数标准装置_字典:17",
+ "eighteenth": "失真度标准装置_字典:18"
}
diff --git a/src/utils/String.ts b/src/utils/String.ts
index 1943b0f..7ee7c1e 100644
--- a/src/utils/String.ts
+++ b/src/utils/String.ts
@@ -2,6 +2,10 @@
// 1.去除字符串中的特殊符号
export const clearSymbol = (str: any) => {
+ str = String(str)
+ if (!str) {
+ return ''
+ }
if (str.includes('e') || str.includes('E')) {
return str
}
diff --git a/src/views/business/measure/item/components/sixteen/templateDetail.vue b/src/views/business/measure/item/components/sixteen/templateDetail.vue
index 8dbaec5..a951929 100644
--- a/src/views/business/measure/item/components/sixteen/templateDetail.vue
+++ b/src/views/business/measure/item/components/sixteen/templateDetail.vue
@@ -396,7 +396,7 @@
fun(props.pageType === 'detail')
}
// 每个table对应的下拉框内容 字典
-const tableDict = ref<{ [key: string]: { value: string;name: string;id: string }[] }>({})
+const tableDict = ref<{ [key: string]: { value: string; name: string; id: string }[] }>({})
const changeLoadSituationa = (value: any, index: number, text: string, type: string, list: any[], item: string) => {
if (item === '正弦信号平坦度') {
if (text === '是否为基准点') {
@@ -416,12 +416,12 @@
}
// 获取字典
-const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位
-const amplitudeUnit = ref<{ value: string;name: string;id: string }[]>([]) // 幅度单位
-const symbolList = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号
-const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位
-const TechnicalIndexSymbolList = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标前符号
-const secondList = ref<{ value: string;name: string;id: string }[]>([]) // 秒单位
+const nominalValueUnit = ref<{ value: string; name: string; id: string }[]>([]) // 标称值单位
+const amplitudeUnit = ref<{ value: string; name: string; id: string }[]>([]) // 幅度单位
+const symbolList = ref<{ value: string; name: string; id: string }[]>([]) // 技术指标符号
+const standardVoltage = ref<{ value: string; name: string; id: string }[]>([]) // 电压单位
+const TechnicalIndexSymbolList = ref<{ value: string; name: string; id: string }[]>([]) // 技术指标前符号
+const secondList = ref<{ value: string; name: string; id: string }[]>([]) // 秒单位
const fetchDict = async () => {
// 标称值单位
const res1 = await getDictByCode('standardFrequencyUnit')
@@ -467,22 +467,24 @@
-
+
外观及功能性检查
-
+
频率
@@ -491,24 +493,26 @@
{{ scope.technicalIndexSymbol }}
-
+
-
+
交流电压
@@ -522,11 +526,17 @@
(
-
+
%
+
-
+
mV )
@@ -534,17 +544,16 @@
-
+
直流电压
@@ -557,11 +566,17 @@
(
-
+
%
+
-
+
mV )
@@ -569,25 +584,21 @@
-
+
上升时间
-
+
@@ -595,9 +606,7 @@
@@ -608,27 +617,22 @@
-
+
正弦信号平坦度
-
+
@@ -643,27 +647,22 @@
-
+
总谐波失真
-
+
diff --git a/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
index 24b943b..83ba5df 100644
--- a/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
@@ -520,6 +520,7 @@
itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查 1有外观,2没有外观
mesureItemData.value = JSON.parse(JSON.stringify(res.data.measureItemDataSpectrumAnalyzerList))
initInputData(res.data.measureItemDataSpectrumAnalyzerList)
+ console.log(res.data.measureItemDataSpectrumAnalyzerList, 'res.data.measureItemDataSpectrumAnalyzerList')
})
}
diff --git a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
index e7af854..c89cbb1 100644
--- a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
@@ -53,6 +53,7 @@
})
// -------------------------------------------路由参数------------------------------------------
const pageType = ref('add') // 页面类型: add, edit, detail
+const isFirstPage = ref(true)
const infoId = ref('') // 列表id
if ($route.params && $route.params.type) {
pageType.value = $route.params.type as string
@@ -232,6 +233,7 @@
// 有关于检定项的数据
itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查
initInputData(res.data.measureDataDcPowerList)
+ isFirstPage.value = false
// =======================================表单公共组件数据处理=======================================================
useSolveFormData(res, templateFormAndTableRef.value)
// ==================================检定数据========================================================================
@@ -272,7 +274,9 @@
const decimal = item.resolution.includes('.') ? item.resolution.substring(item.resolution.indexOf('.'), item.resolution.length - 1).length : 0
item.standardValue = Number(item.standardValue || 0).toFixed(decimal + 1)
item.maximumError = Number(item.maximumError || 0).toFixed(decimal + 1)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(decimal + 1)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(decimal + 1)
+ }
switch (item.dataType) {
case '3':
// 标准值、最大允许误差、绝对误差,比分辨力配置的,小数点后多一位
@@ -291,25 +295,32 @@
else {
switch (item.dataType) {
case '3':
- // 标准值、最大允许误差、绝对误差,保留小数点后2位
+ // 标准值、最大允许误差、绝对误差,保留小数点后2位
item.params = '电压示值误差'
item.standardValue = Number(item.standardValue || 0).toFixed(2)
item.maximumError = Number(item.maximumError || 0).toFixed(2)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(2)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(2)
+ }
break
case '4':
- // 标准值、最大允许误差、绝对误差,保留小数点后3位
+ // 标准值、最大允许误差、绝对误差,保留小数点后3位
item.params = '电流示值误差(直接测量)'
item.standardValue = Number(item.standardValue || 0).toFixed(3)
item.maximumError = Number(item.maximumError || 0).toFixed(3)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ }
break
case '5':
- // 标准值、最大允许误差、绝对误差,保留小数点后3位
+ // 标准值、最大允许误差、绝对误差,保留小数点后3位
item.params = '电流示值误差(间接测量)'
item.standardValue = Number(item.standardValue || 0).toFixed(3)
item.maximumError = Number(item.maximumError || 0).toFixed(3)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ }
+
break
}
}
@@ -397,10 +408,11 @@
itemFormData.value.voltageOutputStability = res.data.voltageOutputStability // 输出电压短期稳定性
measureItemData.value = JSON.parse(JSON.stringify(res.data.measureItemDataDcPowerList))
initInputData(res.data.measureItemDataDcPowerList.map((item: IDetailMeasureList) => ({ ...item, id: '' })))
+ isFirstPage.value = false
})
}
// -----------------------------------------字典----------------------------------------
-const RegulatorOutputValue = ref<{ value: string;name: string;id: string }[]>([]) // 调压器输出值
+const RegulatorOutputValue = ref<{ value: string; name: string; id: string }[]>([]) // 调压器输出值
const fetchDict = async () => {
const res1 = await getDictByCode('voltageRegulatorOutputValue')
RegulatorOutputValue.value = res1.data
@@ -493,7 +505,7 @@
outputVoltageStabilityList.value = result || outputVoltageStabilityList.value
setListDict()
break
- case '' :
+ case '':
if (!checkAllList()) { return }
initInputData(await calculateFun(getList()))
}
@@ -531,7 +543,10 @@
-
+
@@ -541,22 +556,15 @@
@@ -564,18 +572,26 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
@@ -585,17 +601,26 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
@@ -606,8 +631,10 @@
@@ -624,8 +651,10 @@
@@ -641,8 +670,10 @@
@@ -666,12 +697,17 @@
-
+
{{ scope.technicalIndexSymbol }}
@@ -686,19 +722,27 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
diff --git a/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
index 2170368..73962a0 100644
--- a/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
@@ -217,11 +217,23 @@
break
case '2':
// 交流电压
- acVoltageList.value.push({ ...item, params: '交流电压', ...params, measureValueUnit: item.unit })
+ acVoltageList.value.push({
+ ...item,
+ params: '交流电压',
+ ...params,
+ measureValueUnit: item.unit,
+ technicalIndex: item.valueOne * item.nominalValue * (item.unit === 'mV' ? 1 : item.unit === 'V' ? 1000000 : item.unit === 'kV' ? 1000000000 : item.unit === 'kV' ? 0.001 : 1) + item.valueTwo,
+ })
break
case '3':
// 直流电压
- dcVoltageList.value.push({ ...item, params: '直流电压', ...params, measureValueUnit: item.unit })
+ dcVoltageList.value.push({
+ ...item,
+ params: '直流电压',
+ ...params,
+ measureValueUnit: item.unit,
+ technicalIndex: item.valueOne * item.nominalValue * (item.unit === 'mV' ? 1 : item.unit === 'V' ? 1000000 : item.unit === 'kV' ? 1000000000 : item.unit === 'kV' ? 0.001 : 1) + item.valueTwo,
+ })
break
case '4':
// 上升时间
@@ -358,7 +370,10 @@
-
+
diff --git a/src/assets/json/readme.json b/src/assets/json/readme.json
index 2be131f..cec774f 100644
--- a/src/assets/json/readme.json
+++ b/src/assets/json/readme.json
@@ -1,4 +1,3 @@
-
{
"first": "多功能校准源_字典:1",
"second": "直流稳压电源检定装置_字典:2",
@@ -6,16 +5,16 @@
"fourth": "0.02级活塞式压力计_字典:4",
"fifth": "二等铂电阻温度计标准装置 _字典:5",
"sixth": "安全阀校验装置_字典:6",
- "seventh":"精密露点仪标准装置_字典:7",
- "eighth":"E2等砝码标准装置_字典:8",
- "ninth":"频谱分析仪检定装置_字典:9",
- "tenth":"信号发生器检定装置_字典:10",
- "eleventh":"微波衰减标准装置_字典:11",
- "twelfth":"频率短期稳定度标准装置_字典:12",
- "thirteenth":"示波器检定装置_字典:13",
- "fourteenth":"铯原子频率标准装置_字典:14",
- "fifteenth":"小功率标准装置_字典:15",
- "sixteenth":"低频信号源检定装置_字典:16",
- "seventeenth":"S参数标准装置_字典:17",
- "eighteenth":"失真度标准装置_字典:18"
+ "seventh": "精密露点仪标准装置_字典:7",
+ "eighth": "E2等砝码标准装置_字典:8",
+ "ninth": "频谱分析仪检定装置_字典:9",
+ "tenth": "信号发生器检定装置_字典:10",
+ "eleventh": "微波衰减标准装置_字典:11",
+ "twelfth": "频率短期稳定度标准装置_字典:12",
+ "thirteenth": "示波器检定装置_字典:13",
+ "fourteenth": "铯原子频率标准装置_字典:14",
+ "fifteenth": "小功率标准装置_字典:15",
+ "sixteenth": "低频信号源检定装置_字典:16",
+ "seventeenth": "S参数标准装置_字典:17",
+ "eighteenth": "失真度标准装置_字典:18"
}
diff --git a/src/utils/String.ts b/src/utils/String.ts
index 1943b0f..7ee7c1e 100644
--- a/src/utils/String.ts
+++ b/src/utils/String.ts
@@ -2,6 +2,10 @@
// 1.去除字符串中的特殊符号
export const clearSymbol = (str: any) => {
+ str = String(str)
+ if (!str) {
+ return ''
+ }
if (str.includes('e') || str.includes('E')) {
return str
}
diff --git a/src/views/business/measure/item/components/sixteen/templateDetail.vue b/src/views/business/measure/item/components/sixteen/templateDetail.vue
index 8dbaec5..a951929 100644
--- a/src/views/business/measure/item/components/sixteen/templateDetail.vue
+++ b/src/views/business/measure/item/components/sixteen/templateDetail.vue
@@ -396,7 +396,7 @@
fun(props.pageType === 'detail')
}
// 每个table对应的下拉框内容 字典
-const tableDict = ref<{ [key: string]: { value: string;name: string;id: string }[] }>({})
+const tableDict = ref<{ [key: string]: { value: string; name: string; id: string }[] }>({})
const changeLoadSituationa = (value: any, index: number, text: string, type: string, list: any[], item: string) => {
if (item === '正弦信号平坦度') {
if (text === '是否为基准点') {
@@ -416,12 +416,12 @@
}
// 获取字典
-const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位
-const amplitudeUnit = ref<{ value: string;name: string;id: string }[]>([]) // 幅度单位
-const symbolList = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号
-const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位
-const TechnicalIndexSymbolList = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标前符号
-const secondList = ref<{ value: string;name: string;id: string }[]>([]) // 秒单位
+const nominalValueUnit = ref<{ value: string; name: string; id: string }[]>([]) // 标称值单位
+const amplitudeUnit = ref<{ value: string; name: string; id: string }[]>([]) // 幅度单位
+const symbolList = ref<{ value: string; name: string; id: string }[]>([]) // 技术指标符号
+const standardVoltage = ref<{ value: string; name: string; id: string }[]>([]) // 电压单位
+const TechnicalIndexSymbolList = ref<{ value: string; name: string; id: string }[]>([]) // 技术指标前符号
+const secondList = ref<{ value: string; name: string; id: string }[]>([]) // 秒单位
const fetchDict = async () => {
// 标称值单位
const res1 = await getDictByCode('standardFrequencyUnit')
@@ -467,22 +467,24 @@
-
+
外观及功能性检查
-
+
频率
@@ -491,24 +493,26 @@
{{ scope.technicalIndexSymbol }}
-
+
-
+
交流电压
@@ -522,11 +526,17 @@
(
-
+
%
+
-
+
mV )
@@ -534,17 +544,16 @@
-
+
直流电压
@@ -557,11 +566,17 @@
(
-
+
%
+
-
+
mV )
@@ -569,25 +584,21 @@
-
+
上升时间
-
+
@@ -595,9 +606,7 @@
@@ -608,27 +617,22 @@
-
+
正弦信号平坦度
-
+
@@ -643,27 +647,22 @@
-
+
总谐波失真
-
+
diff --git a/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
index 24b943b..83ba5df 100644
--- a/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
@@ -520,6 +520,7 @@
itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查 1有外观,2没有外观
mesureItemData.value = JSON.parse(JSON.stringify(res.data.measureItemDataSpectrumAnalyzerList))
initInputData(res.data.measureItemDataSpectrumAnalyzerList)
+ console.log(res.data.measureItemDataSpectrumAnalyzerList, 'res.data.measureItemDataSpectrumAnalyzerList')
})
}
diff --git a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
index e7af854..c89cbb1 100644
--- a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
@@ -53,6 +53,7 @@
})
// -------------------------------------------路由参数------------------------------------------
const pageType = ref('add') // 页面类型: add, edit, detail
+const isFirstPage = ref(true)
const infoId = ref('') // 列表id
if ($route.params && $route.params.type) {
pageType.value = $route.params.type as string
@@ -232,6 +233,7 @@
// 有关于检定项的数据
itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查
initInputData(res.data.measureDataDcPowerList)
+ isFirstPage.value = false
// =======================================表单公共组件数据处理=======================================================
useSolveFormData(res, templateFormAndTableRef.value)
// ==================================检定数据========================================================================
@@ -272,7 +274,9 @@
const decimal = item.resolution.includes('.') ? item.resolution.substring(item.resolution.indexOf('.'), item.resolution.length - 1).length : 0
item.standardValue = Number(item.standardValue || 0).toFixed(decimal + 1)
item.maximumError = Number(item.maximumError || 0).toFixed(decimal + 1)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(decimal + 1)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(decimal + 1)
+ }
switch (item.dataType) {
case '3':
// 标准值、最大允许误差、绝对误差,比分辨力配置的,小数点后多一位
@@ -291,25 +295,32 @@
else {
switch (item.dataType) {
case '3':
- // 标准值、最大允许误差、绝对误差,保留小数点后2位
+ // 标准值、最大允许误差、绝对误差,保留小数点后2位
item.params = '电压示值误差'
item.standardValue = Number(item.standardValue || 0).toFixed(2)
item.maximumError = Number(item.maximumError || 0).toFixed(2)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(2)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(2)
+ }
break
case '4':
- // 标准值、最大允许误差、绝对误差,保留小数点后3位
+ // 标准值、最大允许误差、绝对误差,保留小数点后3位
item.params = '电流示值误差(直接测量)'
item.standardValue = Number(item.standardValue || 0).toFixed(3)
item.maximumError = Number(item.maximumError || 0).toFixed(3)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ }
break
case '5':
- // 标准值、最大允许误差、绝对误差,保留小数点后3位
+ // 标准值、最大允许误差、绝对误差,保留小数点后3位
item.params = '电流示值误差(间接测量)'
item.standardValue = Number(item.standardValue || 0).toFixed(3)
item.maximumError = Number(item.maximumError || 0).toFixed(3)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ }
+
break
}
}
@@ -397,10 +408,11 @@
itemFormData.value.voltageOutputStability = res.data.voltageOutputStability // 输出电压短期稳定性
measureItemData.value = JSON.parse(JSON.stringify(res.data.measureItemDataDcPowerList))
initInputData(res.data.measureItemDataDcPowerList.map((item: IDetailMeasureList) => ({ ...item, id: '' })))
+ isFirstPage.value = false
})
}
// -----------------------------------------字典----------------------------------------
-const RegulatorOutputValue = ref<{ value: string;name: string;id: string }[]>([]) // 调压器输出值
+const RegulatorOutputValue = ref<{ value: string; name: string; id: string }[]>([]) // 调压器输出值
const fetchDict = async () => {
const res1 = await getDictByCode('voltageRegulatorOutputValue')
RegulatorOutputValue.value = res1.data
@@ -493,7 +505,7 @@
outputVoltageStabilityList.value = result || outputVoltageStabilityList.value
setListDict()
break
- case '' :
+ case '':
if (!checkAllList()) { return }
initInputData(await calculateFun(getList()))
}
@@ -531,7 +543,10 @@
-
+
@@ -541,22 +556,15 @@
@@ -564,18 +572,26 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
@@ -585,17 +601,26 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
@@ -606,8 +631,10 @@
@@ -624,8 +651,10 @@
@@ -641,8 +670,10 @@
@@ -666,12 +697,17 @@
-
+
{{ scope.technicalIndexSymbol }}
@@ -686,19 +722,27 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
diff --git a/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
index 2170368..73962a0 100644
--- a/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
@@ -217,11 +217,23 @@
break
case '2':
// 交流电压
- acVoltageList.value.push({ ...item, params: '交流电压', ...params, measureValueUnit: item.unit })
+ acVoltageList.value.push({
+ ...item,
+ params: '交流电压',
+ ...params,
+ measureValueUnit: item.unit,
+ technicalIndex: item.valueOne * item.nominalValue * (item.unit === 'mV' ? 1 : item.unit === 'V' ? 1000000 : item.unit === 'kV' ? 1000000000 : item.unit === 'kV' ? 0.001 : 1) + item.valueTwo,
+ })
break
case '3':
// 直流电压
- dcVoltageList.value.push({ ...item, params: '直流电压', ...params, measureValueUnit: item.unit })
+ dcVoltageList.value.push({
+ ...item,
+ params: '直流电压',
+ ...params,
+ measureValueUnit: item.unit,
+ technicalIndex: item.valueOne * item.nominalValue * (item.unit === 'mV' ? 1 : item.unit === 'V' ? 1000000 : item.unit === 'kV' ? 1000000000 : item.unit === 'kV' ? 0.001 : 1) + item.valueTwo,
+ })
break
case '4':
// 上升时间
@@ -358,7 +370,10 @@
-
+
diff --git a/src/views/equipement/standard/book/components/standard.vue b/src/views/equipement/standard/book/components/standard.vue
index 81fabba..9ab130c 100644
--- a/src/views/equipement/standard/book/components/standard.vue
+++ b/src/views/equipement/standard/book/components/standard.vue
@@ -341,6 +341,7 @@
const confirmSelectCheckItem = (list: any, type: string) => {
// console.log(list)
const pathPart = solvePath()
+ console.log(standardMap.value, props.standardName)
if (standardMap.value[props.standardName as string] === '1') { // 多功能校准源标准装置
$router.push({
path: `/standardEquipmentConfig/first/${type}/${checkoutRow.value.id}`,
@@ -408,6 +409,7 @@
// 处理跳转页面
function solvePath() {
+ console.log(standardMap.value, props.standardName)
let pathPart = 'first'
if (standardMap.value[props.standardName as string] === '1') { // 多功能校准源
pathPart = 'first'
@@ -486,7 +488,15 @@
})
})
}
-
+// const getStandardCode = () => {
+// return standardMap.value[props.standardName as string]
+// }
+const getStandardCode = computed(() => {
+ return () => {
+ console.log(standardMap.value, props.standardName)
+ return standardMap.value[props.standardName as string]
+ }
+})
// -------------------------------------------钩子------------------------------------------------
onMounted(async () => {
fetchData()
@@ -539,7 +549,7 @@
-
+
配置核查项
diff --git a/src/assets/json/readme.json b/src/assets/json/readme.json
index 2be131f..cec774f 100644
--- a/src/assets/json/readme.json
+++ b/src/assets/json/readme.json
@@ -1,4 +1,3 @@
-
{
"first": "多功能校准源_字典:1",
"second": "直流稳压电源检定装置_字典:2",
@@ -6,16 +5,16 @@
"fourth": "0.02级活塞式压力计_字典:4",
"fifth": "二等铂电阻温度计标准装置 _字典:5",
"sixth": "安全阀校验装置_字典:6",
- "seventh":"精密露点仪标准装置_字典:7",
- "eighth":"E2等砝码标准装置_字典:8",
- "ninth":"频谱分析仪检定装置_字典:9",
- "tenth":"信号发生器检定装置_字典:10",
- "eleventh":"微波衰减标准装置_字典:11",
- "twelfth":"频率短期稳定度标准装置_字典:12",
- "thirteenth":"示波器检定装置_字典:13",
- "fourteenth":"铯原子频率标准装置_字典:14",
- "fifteenth":"小功率标准装置_字典:15",
- "sixteenth":"低频信号源检定装置_字典:16",
- "seventeenth":"S参数标准装置_字典:17",
- "eighteenth":"失真度标准装置_字典:18"
+ "seventh": "精密露点仪标准装置_字典:7",
+ "eighth": "E2等砝码标准装置_字典:8",
+ "ninth": "频谱分析仪检定装置_字典:9",
+ "tenth": "信号发生器检定装置_字典:10",
+ "eleventh": "微波衰减标准装置_字典:11",
+ "twelfth": "频率短期稳定度标准装置_字典:12",
+ "thirteenth": "示波器检定装置_字典:13",
+ "fourteenth": "铯原子频率标准装置_字典:14",
+ "fifteenth": "小功率标准装置_字典:15",
+ "sixteenth": "低频信号源检定装置_字典:16",
+ "seventeenth": "S参数标准装置_字典:17",
+ "eighteenth": "失真度标准装置_字典:18"
}
diff --git a/src/utils/String.ts b/src/utils/String.ts
index 1943b0f..7ee7c1e 100644
--- a/src/utils/String.ts
+++ b/src/utils/String.ts
@@ -2,6 +2,10 @@
// 1.去除字符串中的特殊符号
export const clearSymbol = (str: any) => {
+ str = String(str)
+ if (!str) {
+ return ''
+ }
if (str.includes('e') || str.includes('E')) {
return str
}
diff --git a/src/views/business/measure/item/components/sixteen/templateDetail.vue b/src/views/business/measure/item/components/sixteen/templateDetail.vue
index 8dbaec5..a951929 100644
--- a/src/views/business/measure/item/components/sixteen/templateDetail.vue
+++ b/src/views/business/measure/item/components/sixteen/templateDetail.vue
@@ -396,7 +396,7 @@
fun(props.pageType === 'detail')
}
// 每个table对应的下拉框内容 字典
-const tableDict = ref<{ [key: string]: { value: string;name: string;id: string }[] }>({})
+const tableDict = ref<{ [key: string]: { value: string; name: string; id: string }[] }>({})
const changeLoadSituationa = (value: any, index: number, text: string, type: string, list: any[], item: string) => {
if (item === '正弦信号平坦度') {
if (text === '是否为基准点') {
@@ -416,12 +416,12 @@
}
// 获取字典
-const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位
-const amplitudeUnit = ref<{ value: string;name: string;id: string }[]>([]) // 幅度单位
-const symbolList = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号
-const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位
-const TechnicalIndexSymbolList = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标前符号
-const secondList = ref<{ value: string;name: string;id: string }[]>([]) // 秒单位
+const nominalValueUnit = ref<{ value: string; name: string; id: string }[]>([]) // 标称值单位
+const amplitudeUnit = ref<{ value: string; name: string; id: string }[]>([]) // 幅度单位
+const symbolList = ref<{ value: string; name: string; id: string }[]>([]) // 技术指标符号
+const standardVoltage = ref<{ value: string; name: string; id: string }[]>([]) // 电压单位
+const TechnicalIndexSymbolList = ref<{ value: string; name: string; id: string }[]>([]) // 技术指标前符号
+const secondList = ref<{ value: string; name: string; id: string }[]>([]) // 秒单位
const fetchDict = async () => {
// 标称值单位
const res1 = await getDictByCode('standardFrequencyUnit')
@@ -467,22 +467,24 @@
-
+
外观及功能性检查
-
+
频率
@@ -491,24 +493,26 @@
{{ scope.technicalIndexSymbol }}
-
+
-
+
交流电压
@@ -522,11 +526,17 @@
(
-
+
%
+
-
+
mV )
@@ -534,17 +544,16 @@
-
+
直流电压
@@ -557,11 +566,17 @@
(
-
+
%
+
-
+
mV )
@@ -569,25 +584,21 @@
-
+
上升时间
-
+
@@ -595,9 +606,7 @@
@@ -608,27 +617,22 @@
-
+
正弦信号平坦度
-
+
@@ -643,27 +647,22 @@
-
+
总谐波失真
-
+
diff --git a/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
index 24b943b..83ba5df 100644
--- a/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
@@ -520,6 +520,7 @@
itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查 1有外观,2没有外观
mesureItemData.value = JSON.parse(JSON.stringify(res.data.measureItemDataSpectrumAnalyzerList))
initInputData(res.data.measureItemDataSpectrumAnalyzerList)
+ console.log(res.data.measureItemDataSpectrumAnalyzerList, 'res.data.measureItemDataSpectrumAnalyzerList')
})
}
diff --git a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
index e7af854..c89cbb1 100644
--- a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
@@ -53,6 +53,7 @@
})
// -------------------------------------------路由参数------------------------------------------
const pageType = ref('add') // 页面类型: add, edit, detail
+const isFirstPage = ref(true)
const infoId = ref('') // 列表id
if ($route.params && $route.params.type) {
pageType.value = $route.params.type as string
@@ -232,6 +233,7 @@
// 有关于检定项的数据
itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查
initInputData(res.data.measureDataDcPowerList)
+ isFirstPage.value = false
// =======================================表单公共组件数据处理=======================================================
useSolveFormData(res, templateFormAndTableRef.value)
// ==================================检定数据========================================================================
@@ -272,7 +274,9 @@
const decimal = item.resolution.includes('.') ? item.resolution.substring(item.resolution.indexOf('.'), item.resolution.length - 1).length : 0
item.standardValue = Number(item.standardValue || 0).toFixed(decimal + 1)
item.maximumError = Number(item.maximumError || 0).toFixed(decimal + 1)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(decimal + 1)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(decimal + 1)
+ }
switch (item.dataType) {
case '3':
// 标准值、最大允许误差、绝对误差,比分辨力配置的,小数点后多一位
@@ -291,25 +295,32 @@
else {
switch (item.dataType) {
case '3':
- // 标准值、最大允许误差、绝对误差,保留小数点后2位
+ // 标准值、最大允许误差、绝对误差,保留小数点后2位
item.params = '电压示值误差'
item.standardValue = Number(item.standardValue || 0).toFixed(2)
item.maximumError = Number(item.maximumError || 0).toFixed(2)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(2)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(2)
+ }
break
case '4':
- // 标准值、最大允许误差、绝对误差,保留小数点后3位
+ // 标准值、最大允许误差、绝对误差,保留小数点后3位
item.params = '电流示值误差(直接测量)'
item.standardValue = Number(item.standardValue || 0).toFixed(3)
item.maximumError = Number(item.maximumError || 0).toFixed(3)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ }
break
case '5':
- // 标准值、最大允许误差、绝对误差,保留小数点后3位
+ // 标准值、最大允许误差、绝对误差,保留小数点后3位
item.params = '电流示值误差(间接测量)'
item.standardValue = Number(item.standardValue || 0).toFixed(3)
item.maximumError = Number(item.maximumError || 0).toFixed(3)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ }
+
break
}
}
@@ -397,10 +408,11 @@
itemFormData.value.voltageOutputStability = res.data.voltageOutputStability // 输出电压短期稳定性
measureItemData.value = JSON.parse(JSON.stringify(res.data.measureItemDataDcPowerList))
initInputData(res.data.measureItemDataDcPowerList.map((item: IDetailMeasureList) => ({ ...item, id: '' })))
+ isFirstPage.value = false
})
}
// -----------------------------------------字典----------------------------------------
-const RegulatorOutputValue = ref<{ value: string;name: string;id: string }[]>([]) // 调压器输出值
+const RegulatorOutputValue = ref<{ value: string; name: string; id: string }[]>([]) // 调压器输出值
const fetchDict = async () => {
const res1 = await getDictByCode('voltageRegulatorOutputValue')
RegulatorOutputValue.value = res1.data
@@ -493,7 +505,7 @@
outputVoltageStabilityList.value = result || outputVoltageStabilityList.value
setListDict()
break
- case '' :
+ case '':
if (!checkAllList()) { return }
initInputData(await calculateFun(getList()))
}
@@ -531,7 +543,10 @@
-
+
@@ -541,22 +556,15 @@
@@ -564,18 +572,26 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
@@ -585,17 +601,26 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
@@ -606,8 +631,10 @@
@@ -624,8 +651,10 @@
@@ -641,8 +670,10 @@
@@ -666,12 +697,17 @@
-
+
{{ scope.technicalIndexSymbol }}
@@ -686,19 +722,27 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
diff --git a/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
index 2170368..73962a0 100644
--- a/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
@@ -217,11 +217,23 @@
break
case '2':
// 交流电压
- acVoltageList.value.push({ ...item, params: '交流电压', ...params, measureValueUnit: item.unit })
+ acVoltageList.value.push({
+ ...item,
+ params: '交流电压',
+ ...params,
+ measureValueUnit: item.unit,
+ technicalIndex: item.valueOne * item.nominalValue * (item.unit === 'mV' ? 1 : item.unit === 'V' ? 1000000 : item.unit === 'kV' ? 1000000000 : item.unit === 'kV' ? 0.001 : 1) + item.valueTwo,
+ })
break
case '3':
// 直流电压
- dcVoltageList.value.push({ ...item, params: '直流电压', ...params, measureValueUnit: item.unit })
+ dcVoltageList.value.push({
+ ...item,
+ params: '直流电压',
+ ...params,
+ measureValueUnit: item.unit,
+ technicalIndex: item.valueOne * item.nominalValue * (item.unit === 'mV' ? 1 : item.unit === 'V' ? 1000000 : item.unit === 'kV' ? 1000000000 : item.unit === 'kV' ? 0.001 : 1) + item.valueTwo,
+ })
break
case '4':
// 上升时间
@@ -358,7 +370,10 @@
-
+
diff --git a/src/views/equipement/standard/book/components/standard.vue b/src/views/equipement/standard/book/components/standard.vue
index 81fabba..9ab130c 100644
--- a/src/views/equipement/standard/book/components/standard.vue
+++ b/src/views/equipement/standard/book/components/standard.vue
@@ -341,6 +341,7 @@
const confirmSelectCheckItem = (list: any, type: string) => {
// console.log(list)
const pathPart = solvePath()
+ console.log(standardMap.value, props.standardName)
if (standardMap.value[props.standardName as string] === '1') { // 多功能校准源标准装置
$router.push({
path: `/standardEquipmentConfig/first/${type}/${checkoutRow.value.id}`,
@@ -408,6 +409,7 @@
// 处理跳转页面
function solvePath() {
+ console.log(standardMap.value, props.standardName)
let pathPart = 'first'
if (standardMap.value[props.standardName as string] === '1') { // 多功能校准源
pathPart = 'first'
@@ -486,7 +488,15 @@
})
})
}
-
+// const getStandardCode = () => {
+// return standardMap.value[props.standardName as string]
+// }
+const getStandardCode = computed(() => {
+ return () => {
+ console.log(standardMap.value, props.standardName)
+ return standardMap.value[props.standardName as string]
+ }
+})
// -------------------------------------------钩子------------------------------------------------
onMounted(async () => {
fetchData()
@@ -539,7 +549,7 @@
-
+
配置核查项
diff --git a/src/views/equipement/standard/checkData/components/eleventh/checkDataCom.vue b/src/views/equipement/standard/checkData/components/eleventh/checkDataCom.vue
index 51134f8..c05573e 100644
--- a/src/views/equipement/standard/checkData/components/eleventh/checkDataCom.vue
+++ b/src/views/equipement/standard/checkData/components/eleventh/checkDataCom.vue
@@ -67,16 +67,16 @@
required: false,
width: '180',
children: [
- { text: '第1次', value: 'testValueOne', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第2次', value: 'testValueTwo', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第3次', value: 'testValueThree', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第4次', value: 'testValueFour', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第5次', value: 'testValueFive', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第6次', value: 'testValueSix', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第7次', value: 'testValueSeven', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第8次', value: 'testValueEight', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第9次', value: 'testValueNine', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第10次', value: 'testValueTen', align: 'center', required: true, width: '180', type: 'inputNumber' },
+ { text: '第1次', value: 'testValueOne', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第2次', value: 'testValueTwo', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第3次', value: 'testValueThree', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第4次', value: 'testValueFour', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第5次', value: 'testValueFive', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第6次', value: 'testValueSix', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第7次', value: 'testValueSeven', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第8次', value: 'testValueEight', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第9次', value: 'testValueNine', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第10次', value: 'testValueTen', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
],
},
{ text: '平均值', value: 'averageValue', align: 'center', required: false, type: 'text' },
@@ -209,6 +209,8 @@
testValueEight: 0, // 测量值8
testValueNine: 0, // 测量值9
testValueTen: 0, // 测量值10
+ showUnitData: e.attenuationAmountUnit,
+ // averageValue: `${e.averageValue}${e.averageValue ? e.attenuationAmountUnit : ''}`,
}
}) as any
// 衰减量稳定性
@@ -231,6 +233,7 @@
stability: '', // 稳定性
lessThan: '', // 结论
lessThanValue: '', // 结论
+ showUnitData: e.attenuationAmountUnit,
}
})
}
@@ -288,13 +291,19 @@
if (current.value === 'repeatability') { // 重复性
switch (type) {
case '衰减量':
- listFrequencyRepeatability.value = result
+ listFrequencyRepeatability.value = result.map((item: any) => ({
+ ...item,
+ showUnitData: item.attenuationAmountUnit,
+ averageValue: Number(item.averageValue).toFixed(3) + item.attenuationAmountUnit,
+ standardDeviation: Number(item.standardDeviation).toFixed(3) + item.attenuationAmountUnit,
+ }))
// 填充稳定性最后一列的日期和数值
listFrequencyStability.value = listFrequencyStability.value.map((item, index: number) => {
return {
...item,
testValueSix: listFrequencyRepeatability.value[index].averageValue, // 测量差值
testValueSixDate: props.checkDate, // 核查读数6日期(本次核查日期)
+
}
})
break
diff --git a/src/assets/json/readme.json b/src/assets/json/readme.json
index 2be131f..cec774f 100644
--- a/src/assets/json/readme.json
+++ b/src/assets/json/readme.json
@@ -1,4 +1,3 @@
-
{
"first": "多功能校准源_字典:1",
"second": "直流稳压电源检定装置_字典:2",
@@ -6,16 +5,16 @@
"fourth": "0.02级活塞式压力计_字典:4",
"fifth": "二等铂电阻温度计标准装置 _字典:5",
"sixth": "安全阀校验装置_字典:6",
- "seventh":"精密露点仪标准装置_字典:7",
- "eighth":"E2等砝码标准装置_字典:8",
- "ninth":"频谱分析仪检定装置_字典:9",
- "tenth":"信号发生器检定装置_字典:10",
- "eleventh":"微波衰减标准装置_字典:11",
- "twelfth":"频率短期稳定度标准装置_字典:12",
- "thirteenth":"示波器检定装置_字典:13",
- "fourteenth":"铯原子频率标准装置_字典:14",
- "fifteenth":"小功率标准装置_字典:15",
- "sixteenth":"低频信号源检定装置_字典:16",
- "seventeenth":"S参数标准装置_字典:17",
- "eighteenth":"失真度标准装置_字典:18"
+ "seventh": "精密露点仪标准装置_字典:7",
+ "eighth": "E2等砝码标准装置_字典:8",
+ "ninth": "频谱分析仪检定装置_字典:9",
+ "tenth": "信号发生器检定装置_字典:10",
+ "eleventh": "微波衰减标准装置_字典:11",
+ "twelfth": "频率短期稳定度标准装置_字典:12",
+ "thirteenth": "示波器检定装置_字典:13",
+ "fourteenth": "铯原子频率标准装置_字典:14",
+ "fifteenth": "小功率标准装置_字典:15",
+ "sixteenth": "低频信号源检定装置_字典:16",
+ "seventeenth": "S参数标准装置_字典:17",
+ "eighteenth": "失真度标准装置_字典:18"
}
diff --git a/src/utils/String.ts b/src/utils/String.ts
index 1943b0f..7ee7c1e 100644
--- a/src/utils/String.ts
+++ b/src/utils/String.ts
@@ -2,6 +2,10 @@
// 1.去除字符串中的特殊符号
export const clearSymbol = (str: any) => {
+ str = String(str)
+ if (!str) {
+ return ''
+ }
if (str.includes('e') || str.includes('E')) {
return str
}
diff --git a/src/views/business/measure/item/components/sixteen/templateDetail.vue b/src/views/business/measure/item/components/sixteen/templateDetail.vue
index 8dbaec5..a951929 100644
--- a/src/views/business/measure/item/components/sixteen/templateDetail.vue
+++ b/src/views/business/measure/item/components/sixteen/templateDetail.vue
@@ -396,7 +396,7 @@
fun(props.pageType === 'detail')
}
// 每个table对应的下拉框内容 字典
-const tableDict = ref<{ [key: string]: { value: string;name: string;id: string }[] }>({})
+const tableDict = ref<{ [key: string]: { value: string; name: string; id: string }[] }>({})
const changeLoadSituationa = (value: any, index: number, text: string, type: string, list: any[], item: string) => {
if (item === '正弦信号平坦度') {
if (text === '是否为基准点') {
@@ -416,12 +416,12 @@
}
// 获取字典
-const nominalValueUnit = ref<{ value: string;name: string;id: string }[]>([]) // 标称值单位
-const amplitudeUnit = ref<{ value: string;name: string;id: string }[]>([]) // 幅度单位
-const symbolList = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标符号
-const standardVoltage = ref<{ value: string;name: string;id: string }[]>([]) // 电压单位
-const TechnicalIndexSymbolList = ref<{ value: string;name: string;id: string }[]>([]) // 技术指标前符号
-const secondList = ref<{ value: string;name: string;id: string }[]>([]) // 秒单位
+const nominalValueUnit = ref<{ value: string; name: string; id: string }[]>([]) // 标称值单位
+const amplitudeUnit = ref<{ value: string; name: string; id: string }[]>([]) // 幅度单位
+const symbolList = ref<{ value: string; name: string; id: string }[]>([]) // 技术指标符号
+const standardVoltage = ref<{ value: string; name: string; id: string }[]>([]) // 电压单位
+const TechnicalIndexSymbolList = ref<{ value: string; name: string; id: string }[]>([]) // 技术指标前符号
+const secondList = ref<{ value: string; name: string; id: string }[]>([]) // 秒单位
const fetchDict = async () => {
// 标称值单位
const res1 = await getDictByCode('standardFrequencyUnit')
@@ -467,22 +467,24 @@
-
+
外观及功能性检查
-
+
频率
@@ -491,24 +493,26 @@
{{ scope.technicalIndexSymbol }}
-
+
-
+
交流电压
@@ -522,11 +526,17 @@
(
-
+
%
+
-
+
mV )
@@ -534,17 +544,16 @@
-
+
直流电压
@@ -557,11 +566,17 @@
(
-
+
%
+
-
+
mV )
@@ -569,25 +584,21 @@
-
+
上升时间
-
+
@@ -595,9 +606,7 @@
@@ -608,27 +617,22 @@
-
+
正弦信号平坦度
-
+
@@ -643,27 +647,22 @@
-
+
总谐波失真
-
+
diff --git a/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
index 24b943b..83ba5df 100644
--- a/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
@@ -520,6 +520,7 @@
itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查 1有外观,2没有外观
mesureItemData.value = JSON.parse(JSON.stringify(res.data.measureItemDataSpectrumAnalyzerList))
initInputData(res.data.measureItemDataSpectrumAnalyzerList)
+ console.log(res.data.measureItemDataSpectrumAnalyzerList, 'res.data.measureItemDataSpectrumAnalyzerList')
})
}
diff --git a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
index e7af854..c89cbb1 100644
--- a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
@@ -53,6 +53,7 @@
})
// -------------------------------------------路由参数------------------------------------------
const pageType = ref('add') // 页面类型: add, edit, detail
+const isFirstPage = ref(true)
const infoId = ref('') // 列表id
if ($route.params && $route.params.type) {
pageType.value = $route.params.type as string
@@ -232,6 +233,7 @@
// 有关于检定项的数据
itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查
initInputData(res.data.measureDataDcPowerList)
+ isFirstPage.value = false
// =======================================表单公共组件数据处理=======================================================
useSolveFormData(res, templateFormAndTableRef.value)
// ==================================检定数据========================================================================
@@ -272,7 +274,9 @@
const decimal = item.resolution.includes('.') ? item.resolution.substring(item.resolution.indexOf('.'), item.resolution.length - 1).length : 0
item.standardValue = Number(item.standardValue || 0).toFixed(decimal + 1)
item.maximumError = Number(item.maximumError || 0).toFixed(decimal + 1)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(decimal + 1)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(decimal + 1)
+ }
switch (item.dataType) {
case '3':
// 标准值、最大允许误差、绝对误差,比分辨力配置的,小数点后多一位
@@ -291,25 +295,32 @@
else {
switch (item.dataType) {
case '3':
- // 标准值、最大允许误差、绝对误差,保留小数点后2位
+ // 标准值、最大允许误差、绝对误差,保留小数点后2位
item.params = '电压示值误差'
item.standardValue = Number(item.standardValue || 0).toFixed(2)
item.maximumError = Number(item.maximumError || 0).toFixed(2)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(2)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(2)
+ }
break
case '4':
- // 标准值、最大允许误差、绝对误差,保留小数点后3位
+ // 标准值、最大允许误差、绝对误差,保留小数点后3位
item.params = '电流示值误差(直接测量)'
item.standardValue = Number(item.standardValue || 0).toFixed(3)
item.maximumError = Number(item.maximumError || 0).toFixed(3)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ }
break
case '5':
- // 标准值、最大允许误差、绝对误差,保留小数点后3位
+ // 标准值、最大允许误差、绝对误差,保留小数点后3位
item.params = '电流示值误差(间接测量)'
item.standardValue = Number(item.standardValue || 0).toFixed(3)
item.maximumError = Number(item.maximumError || 0).toFixed(3)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ }
+
break
}
}
@@ -397,10 +408,11 @@
itemFormData.value.voltageOutputStability = res.data.voltageOutputStability // 输出电压短期稳定性
measureItemData.value = JSON.parse(JSON.stringify(res.data.measureItemDataDcPowerList))
initInputData(res.data.measureItemDataDcPowerList.map((item: IDetailMeasureList) => ({ ...item, id: '' })))
+ isFirstPage.value = false
})
}
// -----------------------------------------字典----------------------------------------
-const RegulatorOutputValue = ref<{ value: string;name: string;id: string }[]>([]) // 调压器输出值
+const RegulatorOutputValue = ref<{ value: string; name: string; id: string }[]>([]) // 调压器输出值
const fetchDict = async () => {
const res1 = await getDictByCode('voltageRegulatorOutputValue')
RegulatorOutputValue.value = res1.data
@@ -493,7 +505,7 @@
outputVoltageStabilityList.value = result || outputVoltageStabilityList.value
setListDict()
break
- case '' :
+ case '':
if (!checkAllList()) { return }
initInputData(await calculateFun(getList()))
}
@@ -531,7 +543,10 @@
-
+
@@ -541,22 +556,15 @@
@@ -564,18 +572,26 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
@@ -585,17 +601,26 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
@@ -606,8 +631,10 @@
@@ -624,8 +651,10 @@
@@ -641,8 +670,10 @@
@@ -666,12 +697,17 @@
-
+
{{ scope.technicalIndexSymbol }}
@@ -686,19 +722,27 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
diff --git a/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
index 2170368..73962a0 100644
--- a/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/sixteen/templateDetail.vue
@@ -217,11 +217,23 @@
break
case '2':
// 交流电压
- acVoltageList.value.push({ ...item, params: '交流电压', ...params, measureValueUnit: item.unit })
+ acVoltageList.value.push({
+ ...item,
+ params: '交流电压',
+ ...params,
+ measureValueUnit: item.unit,
+ technicalIndex: item.valueOne * item.nominalValue * (item.unit === 'mV' ? 1 : item.unit === 'V' ? 1000000 : item.unit === 'kV' ? 1000000000 : item.unit === 'kV' ? 0.001 : 1) + item.valueTwo,
+ })
break
case '3':
// 直流电压
- dcVoltageList.value.push({ ...item, params: '直流电压', ...params, measureValueUnit: item.unit })
+ dcVoltageList.value.push({
+ ...item,
+ params: '直流电压',
+ ...params,
+ measureValueUnit: item.unit,
+ technicalIndex: item.valueOne * item.nominalValue * (item.unit === 'mV' ? 1 : item.unit === 'V' ? 1000000 : item.unit === 'kV' ? 1000000000 : item.unit === 'kV' ? 0.001 : 1) + item.valueTwo,
+ })
break
case '4':
// 上升时间
@@ -358,7 +370,10 @@
-
+
diff --git a/src/views/equipement/standard/book/components/standard.vue b/src/views/equipement/standard/book/components/standard.vue
index 81fabba..9ab130c 100644
--- a/src/views/equipement/standard/book/components/standard.vue
+++ b/src/views/equipement/standard/book/components/standard.vue
@@ -341,6 +341,7 @@
const confirmSelectCheckItem = (list: any, type: string) => {
// console.log(list)
const pathPart = solvePath()
+ console.log(standardMap.value, props.standardName)
if (standardMap.value[props.standardName as string] === '1') { // 多功能校准源标准装置
$router.push({
path: `/standardEquipmentConfig/first/${type}/${checkoutRow.value.id}`,
@@ -408,6 +409,7 @@
// 处理跳转页面
function solvePath() {
+ console.log(standardMap.value, props.standardName)
let pathPart = 'first'
if (standardMap.value[props.standardName as string] === '1') { // 多功能校准源
pathPart = 'first'
@@ -486,7 +488,15 @@
})
})
}
-
+// const getStandardCode = () => {
+// return standardMap.value[props.standardName as string]
+// }
+const getStandardCode = computed(() => {
+ return () => {
+ console.log(standardMap.value, props.standardName)
+ return standardMap.value[props.standardName as string]
+ }
+})
// -------------------------------------------钩子------------------------------------------------
onMounted(async () => {
fetchData()
@@ -539,7 +549,7 @@
-
+
配置核查项
diff --git a/src/views/equipement/standard/checkData/components/eleventh/checkDataCom.vue b/src/views/equipement/standard/checkData/components/eleventh/checkDataCom.vue
index 51134f8..c05573e 100644
--- a/src/views/equipement/standard/checkData/components/eleventh/checkDataCom.vue
+++ b/src/views/equipement/standard/checkData/components/eleventh/checkDataCom.vue
@@ -67,16 +67,16 @@
required: false,
width: '180',
children: [
- { text: '第1次', value: 'testValueOne', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第2次', value: 'testValueTwo', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第3次', value: 'testValueThree', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第4次', value: 'testValueFour', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第5次', value: 'testValueFive', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第6次', value: 'testValueSix', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第7次', value: 'testValueSeven', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第8次', value: 'testValueEight', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第9次', value: 'testValueNine', align: 'center', required: true, width: '180', type: 'inputNumber' },
- { text: '第10次', value: 'testValueTen', align: 'center', required: true, width: '180', type: 'inputNumber' },
+ { text: '第1次', value: 'testValueOne', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第2次', value: 'testValueTwo', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第3次', value: 'testValueThree', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第4次', value: 'testValueFour', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第5次', value: 'testValueFive', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第6次', value: 'testValueSix', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第7次', value: 'testValueSeven', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第8次', value: 'testValueEight', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第9次', value: 'testValueNine', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
+ { text: '第10次', value: 'testValueTen', align: 'center', required: true, width: '180', type: 'inputNumber', precision: 3, unit: 'attenuationAmountUnit', showUnit: true },
],
},
{ text: '平均值', value: 'averageValue', align: 'center', required: false, type: 'text' },
@@ -209,6 +209,8 @@
testValueEight: 0, // 测量值8
testValueNine: 0, // 测量值9
testValueTen: 0, // 测量值10
+ showUnitData: e.attenuationAmountUnit,
+ // averageValue: `${e.averageValue}${e.averageValue ? e.attenuationAmountUnit : ''}`,
}
}) as any
// 衰减量稳定性
@@ -231,6 +233,7 @@
stability: '', // 稳定性
lessThan: '', // 结论
lessThanValue: '', // 结论
+ showUnitData: e.attenuationAmountUnit,
}
})
}
@@ -288,13 +291,19 @@
if (current.value === 'repeatability') { // 重复性
switch (type) {
case '衰减量':
- listFrequencyRepeatability.value = result
+ listFrequencyRepeatability.value = result.map((item: any) => ({
+ ...item,
+ showUnitData: item.attenuationAmountUnit,
+ averageValue: Number(item.averageValue).toFixed(3) + item.attenuationAmountUnit,
+ standardDeviation: Number(item.standardDeviation).toFixed(3) + item.attenuationAmountUnit,
+ }))
// 填充稳定性最后一列的日期和数值
listFrequencyStability.value = listFrequencyStability.value.map((item, index: number) => {
return {
...item,
testValueSix: listFrequencyRepeatability.value[index].averageValue, // 测量差值
testValueSixDate: props.checkDate, // 核查读数6日期(本次核查日期)
+
}
})
break
diff --git a/src/views/equipement/standard/checkData/components/ninth/checkDataCom.vue b/src/views/equipement/standard/checkData/components/ninth/checkDataCom.vue
index 71fd5ec..61095d1 100644
--- a/src/views/equipement/standard/checkData/components/ninth/checkDataCom.vue
+++ b/src/views/equipement/standard/checkData/components/ninth/checkDataCom.vue
@@ -13,6 +13,7 @@
import { getCheckItemDetail, getJobInstructionList } from '@/api/equipment/standard/book'
import { addCheckData, calculateHandle, getHistoryIndication, getInfo, updateCheckData } from '@/api/equipment/standard/checkData'
import { uniqueMultiArray } from '@/utils/Array'
+import { useCheckList } from '@/commonMethods/useCheckList'
import { useScientificNotation } from '@/commonMethods/useScientificNotation'
// 表单ref
const props = defineProps({
@@ -82,13 +83,13 @@
const repeatabilityColumnsCheckData = ref([]) // 重复性表头
const stabilityColumnsCheckData = ref([]) // 稳定性表头
const columns_repeatability_frequency = ref([ // 重复性表头--频率
- { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
- { text: '频率点', value: 'checkPoint', align: 'center', required: true, type: 'text', unit: 'unit' },
+ { text: '核查项目', value: 'params', align: 'center', required: false, type: 'text' },
+ { text: '频率点', value: 'checkPoint', align: 'center', required: false, type: 'text', unit: 'unit' },
{
text: '测量值',
value: 'indicatingValue',
align: 'center',
- required: true,
+ required: false,
width: '160',
children: [
{ text: '第1次', value: 'testValueOne', align: 'center', required: true, width: '180', type: 'inputNumber', unit: 'unit', precision: 3 },
@@ -103,8 +104,8 @@
{ text: '第10次', value: 'testValueTen', align: 'center', required: true, width: '180', type: 'inputNumber', unit: 'unit', precision: 3 },
],
},
- { text: '平均值x', value: 'averageValue', align: 'center', required: true, type: 'text', unit: 'unit' },
- { text: '重复性S(x)/x', value: 'standardDeviation', align: 'center', required: true, type: 'text' },
+ { text: '平均值x', value: 'averageValue', align: 'center', required: false, type: 'text', unit: 'unit' },
+ { text: '重复性S(x)/x', value: 'standardDeviation', align: 'center', required: false, type: 'text' },
])
const columns_repeatability_frequency_check_data = ref([ // 重复性表头--频率 -- 日期选择
{ text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
@@ -128,14 +129,14 @@
{ text: '重复性S(x)/x', value: 'standardDeviation', align: 'center', required: true, type: 'text' },
])
const columns_repeatability_power = ref([ // 重复性表头--功率
- { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
- { text: '频率点', value: 'checkPoint', align: 'center', required: true, type: 'text', unit: 'unit' },
- { text: '功率', value: 'power', align: 'center', required: true, type: 'text', unit: 'powerUnit' },
+ { text: '核查项目', value: 'params', align: 'center', required: false, type: 'text' },
+ { text: '频率点', value: 'checkPoint', align: 'center', required: false, type: 'text', unit: 'unit' },
+ { text: '功率', value: 'power', align: 'center', required: false, type: 'text', unit: 'powerUnit' },
{
text: '测量值',
value: 'indicatingValue',
align: 'center',
- required: true,
+ required: false,
width: '160',
children: [
{ text: '第1次', value: 'testValueOne', align: 'center', required: true, width: '180', type: 'inputNumber', unit: 'powerUnit', precision: 3 },
@@ -150,8 +151,8 @@
{ text: '第10次', value: 'testValueTen', align: 'center', required: true, width: '180', type: 'inputNumber', unit: 'powerUnit', precision: 3 },
],
},
- { text: '平均值x', value: 'averageValue', align: 'center', required: true, type: 'text', unit: 'powerUnit' },
- { text: '重复性S(x)/x', value: 'standardDeviation', align: 'center', required: true, type: 'text' },
+ { text: '平均值x', value: 'averageValue', align: 'center', required: false, type: 'text', unit: 'powerUnit' },
+ { text: '重复性S(x)/x', value: 'standardDeviation', align: 'center', required: false, type: 'text' },
])
const columns_repeatability_power_check_data = ref([ // 重复性表头--功率 -- 日期选择
{ text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
@@ -176,14 +177,14 @@
{ text: '重复性S(x)/x', value: 'standardDeviation', align: 'center', required: true, type: 'text' },
])
const columns_repeatability_relative_level = ref([ // 重复性表头--相对电平
- { text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
- { text: '频率点', value: 'checkPoint', align: 'center', required: true, type: 'text', unit: 'unit' },
- { text: '相对电平', value: 'relativeLevel', align: 'center', required: true, type: 'text', unit: 'relativeLevelUnit' },
+ { text: '核查项目', value: 'params', align: 'center', required: false, type: 'text' },
+ { text: '频率点', value: 'checkPoint', align: 'center', required: false, type: 'text', unit: 'unit' },
+ { text: '相对电平', value: 'relativeLevel', align: 'center', required: false, type: 'text', unit: 'relativeLevelUnit' },
{
text: '测量值',
value: 'indicatingValue',
align: 'center',
- required: true,
+ required: false,
width: '160',
children: [
{ text: '第1次', value: 'testValueOne', align: 'center', required: true, width: '180', type: 'inputNumber', unit: 'relativeLevelUnit', precision: 3 },
@@ -198,8 +199,8 @@
{ text: '第10次', value: 'testValueTen', align: 'center', required: true, width: '180', type: 'inputNumber', unit: 'relativeLevelUnit', precision: 3 },
],
},
- { text: '平均值x', value: 'averageValue', align: 'center', required: true, type: 'text', unit: 'relativeLevelUnit' },
- { text: '重复性S(x)/x', value: 'standardDeviation', align: 'center', required: true, type: 'text' },
+ { text: '平均值x', value: 'averageValue', align: 'center', required: false, type: 'text', unit: 'relativeLevelUnit' },
+ { text: '重复性S(x)/x', value: 'standardDeviation', align: 'center', required: false, type: 'text' },
])
const columns_repeatability_relative_level_check_data = ref([ // 重复性表头--相对电平 -- 日期选择
{ text: '核查项目', value: 'params', align: 'center', required: true, type: 'text' },
@@ -478,7 +479,7 @@
stability: '',
lessThan: '',
lessThanValue: '',
- // urel: item.urel,
+ // urel: item.urel,
}
result = data.filter((item: any) => (Number(item.params) ? dict[item.params] : item.params) === paramsName).map((item: any) => ({
...item,
@@ -582,7 +583,9 @@
}
switch (type) {
case '重复性':
- repeatabilityResult('1')
+ if (useCheckList(frequencyListRepeatability.value, columns_repeatability_frequency.value, '频率重复性')) {
+ repeatabilityResult('1')
+ }
break
case '稳定性':
if (!frequencyListRepeatability.value[0].averageValue) {
@@ -601,7 +604,9 @@
}
switch (type) {
case '重复性':
- repeatabilityResult('2')
+ if (useCheckList(powerListRepeatability.value, columns_repeatability_power.value, '功率重复性')) {
+ repeatabilityResult('2')
+ }
break
case '稳定性':
if (!powerListRepeatability.value[0].averageValue) {
@@ -620,7 +625,9 @@
}
switch (type) {
case '重复性':
- repeatabilityResult('3')
+ if (useCheckList(relativeLevelListRepeatability.value, columns_repeatability_relative_level.value, '相对电平重复性')) {
+ repeatabilityResult('3')
+ }
break
case '稳定性':
if (!relativeLevelListRepeatability.value[0].averageValue) {
@@ -1048,7 +1055,10 @@
-
+
@@ -1063,20 +1073,13 @@
@@ -1087,46 +1090,42 @@
-
+
-
+
-
+
-
+
-
+
频率
@@ -491,24 +493,26 @@
{{ scope.technicalIndexSymbol }}
-
+
-
+
交流电压
@@ -522,11 +526,17 @@
(
-
+
%
+
-
+
mV )
@@ -534,17 +544,16 @@
-
+
直流电压
@@ -557,11 +566,17 @@
(
-
+
%
+
-
+
mV )
@@ -569,25 +584,21 @@
-
+
上升时间
-
+
@@ -595,9 +606,7 @@
@@ -608,27 +617,22 @@
-
+
正弦信号平坦度
-
+
@@ -643,27 +647,22 @@
-
+
总谐波失真
-
+
diff --git a/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
index 24b943b..83ba5df 100644
--- a/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/ninth/templateDetail.vue
@@ -520,6 +520,7 @@
itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查 1有外观,2没有外观
mesureItemData.value = JSON.parse(JSON.stringify(res.data.measureItemDataSpectrumAnalyzerList))
initInputData(res.data.measureItemDataSpectrumAnalyzerList)
+ console.log(res.data.measureItemDataSpectrumAnalyzerList, 'res.data.measureItemDataSpectrumAnalyzerList')
})
}
diff --git a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
index e7af854..c89cbb1 100644
--- a/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/second/templateDetail.vue
@@ -53,6 +53,7 @@
})
// -------------------------------------------路由参数------------------------------------------
const pageType = ref('add') // 页面类型: add, edit, detail
+const isFirstPage = ref(true)
const infoId = ref('') // 列表id
if ($route.params && $route.params.type) {
pageType.value = $route.params.type as string
@@ -232,6 +233,7 @@
// 有关于检定项的数据
itemFormData.value.appearanceFunctionCheck = res.data.appearanceFunctionCheck // 外观及功能检查
initInputData(res.data.measureDataDcPowerList)
+ isFirstPage.value = false
// =======================================表单公共组件数据处理=======================================================
useSolveFormData(res, templateFormAndTableRef.value)
// ==================================检定数据========================================================================
@@ -272,7 +274,9 @@
const decimal = item.resolution.includes('.') ? item.resolution.substring(item.resolution.indexOf('.'), item.resolution.length - 1).length : 0
item.standardValue = Number(item.standardValue || 0).toFixed(decimal + 1)
item.maximumError = Number(item.maximumError || 0).toFixed(decimal + 1)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(decimal + 1)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(decimal + 1)
+ }
switch (item.dataType) {
case '3':
// 标准值、最大允许误差、绝对误差,比分辨力配置的,小数点后多一位
@@ -291,25 +295,32 @@
else {
switch (item.dataType) {
case '3':
- // 标准值、最大允许误差、绝对误差,保留小数点后2位
+ // 标准值、最大允许误差、绝对误差,保留小数点后2位
item.params = '电压示值误差'
item.standardValue = Number(item.standardValue || 0).toFixed(2)
item.maximumError = Number(item.maximumError || 0).toFixed(2)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(2)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(2)
+ }
break
case '4':
- // 标准值、最大允许误差、绝对误差,保留小数点后3位
+ // 标准值、最大允许误差、绝对误差,保留小数点后3位
item.params = '电流示值误差(直接测量)'
item.standardValue = Number(item.standardValue || 0).toFixed(3)
item.maximumError = Number(item.maximumError || 0).toFixed(3)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ }
break
case '5':
- // 标准值、最大允许误差、绝对误差,保留小数点后3位
+ // 标准值、最大允许误差、绝对误差,保留小数点后3位
item.params = '电流示值误差(间接测量)'
item.standardValue = Number(item.standardValue || 0).toFixed(3)
item.maximumError = Number(item.maximumError || 0).toFixed(3)
- item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ if (pageType.value !== 'add' && !isFirstPage.value) {
+ item.absoluteError = Number(calcMaxError(item, index, 'all') || 0).toFixed(3)
+ }
+
break
}
}
@@ -397,10 +408,11 @@
itemFormData.value.voltageOutputStability = res.data.voltageOutputStability // 输出电压短期稳定性
measureItemData.value = JSON.parse(JSON.stringify(res.data.measureItemDataDcPowerList))
initInputData(res.data.measureItemDataDcPowerList.map((item: IDetailMeasureList) => ({ ...item, id: '' })))
+ isFirstPage.value = false
})
}
// -----------------------------------------字典----------------------------------------
-const RegulatorOutputValue = ref<{ value: string;name: string;id: string }[]>([]) // 调压器输出值
+const RegulatorOutputValue = ref<{ value: string; name: string; id: string }[]>([]) // 调压器输出值
const fetchDict = async () => {
const res1 = await getDictByCode('voltageRegulatorOutputValue')
RegulatorOutputValue.value = res1.data
@@ -493,7 +505,7 @@
outputVoltageStabilityList.value = result || outputVoltageStabilityList.value
setListDict()
break
- case '' :
+ case '':
if (!checkAllList()) { return }
initInputData(await calculateFun(getList()))
}
@@ -531,7 +543,10 @@
-
+
@@ -541,22 +556,15 @@
@@ -564,18 +572,26 @@
-
+
{{ scope.technicalIndexSymbol }}
-
+
%
@@ -585,17 +601,26 @@
-
+
{{ scope.technicalIndexSymbol }}
-