+
{{ scope.row[item.value] }}
- %
+ {{ props.type === '剩余调幅' ? '%' : scope.row.upperIndexUnit }}
*
diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue
index 7031e67..0a462df 100644
--- a/src/components/Approval/ApprovalDialog.vue
+++ b/src/components/Approval/ApprovalDialog.vue
@@ -119,8 +119,8 @@
同意
+ 驳回
+ -->
拒绝
diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue
index 15a9741..7f14ac9 100644
--- a/src/components/MultiHeaderTable/tableColumn.vue
+++ b/src/components/MultiHeaderTable/tableColumn.vue
@@ -95,13 +95,23 @@
@change="handleInputChange(scope)"
@blur="handleInputBlur(scope.row)"
/>
-
+ /> -->
+
+
+ {{ scope.row.showUnitData }}
+
{{ scope.row[item.value] }}
diff --git a/src/views/business/measure/item/useCalculateResolution.ts b/src/views/business/measure/item/useCalculateResolution.ts
index 3e1e08a..2615de8 100644
--- a/src/views/business/measure/item/useCalculateResolution.ts
+++ b/src/views/business/measure/item/useCalculateResolution.ts
@@ -27,7 +27,7 @@
*/
export function caculateDecimalDigits(value: any) {
if (!value || `${value}` === '' || `${value}` === 'undefined') {
- return false
+ return value
}
const data = Number(value)
console.log('计算分辨力小数点后面有几位分辨力数值:', value)
diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue
index f9b9632..7b71b09 100644
--- a/src/views/business/taskMeasure/certificate/components/basic.vue
+++ b/src/views/business/taskMeasure/certificate/components/basic.vue
@@ -86,20 +86,20 @@
background: 'rgba(255, 255, 255, 0.8)',
})
getInfo({ id: infoId.value }).then((res) => {
- if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) {
- createMeasureCert({ id: infoId.value }).then((res) => {
- form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
- form.value.certificateFile = res.data.certificateFile // 检定证书
- emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
- loading.close()
- })
- }
- else {
- loading.close()
- form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
- form.value.certificateFile = res.data.certificateFile // 检定证书
- emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
- }
+ // if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) {
+ // createMeasureCert({ id: infoId.value }).then((res) => {
+ // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ // form.value.certificateFile = res.data.certificateFile // 检定证书
+ // emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // loading.close()
+ // })
+ // }
+ // else {
+ loading.close()
+ form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ form.value.certificateFile = res.data.certificateFile // 检定证书
+ emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // }
})
}
diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue
index f2d837b..67fadfe 100644
--- a/src/views/business/taskMeasure/certificate/list.vue
+++ b/src/views/business/taskMeasure/certificate/list.vue
@@ -15,11 +15,13 @@
import {
approvalDelete,
cancelApproval,
+ createMeasureCert,
draftDelete,
exportCertificateList,
getCertificateList,
refuseApproval,
} from '@/api/business/taskMeasure/certificate'
+
const buttonBoxActive = 'businessCertificate' // 存储在sessionstorage里面的字段名,用于记录右上角buttonbox点击状态
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -147,7 +149,9 @@
}
// ----------------------------------------------操作---------------------------------------------------
+const approvalId = ref('') // 操作的行id
const handleEdit = (row: IList, type: string) => {
+ approvalId.value = row.id
if (type === 'detail') { // 详情
$router.push({
path: `/businessCertificate/${type}/${row.id}`,
@@ -236,9 +240,16 @@
})
}
// -----------------------------------------审批------------------------------------------------
-// 审批结束回调
+// 审批结束回调(同意)
const approvalSuccess = () => {
- fetchData(true)
+ loadingTable.value = true
+ createMeasureCert({ id: approvalId.value }).then((res) => {
+ // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ // form.value.certificateFile = res.data.certificateFile // 检定证书
+ // emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // loading.close()
+ fetchData(true)
+ })
}
// 切换tab状态
diff --git a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
index afe1fa1..5639925 100644
--- a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
+++ b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
@@ -3,6 +3,7 @@
import { ref } from 'vue'
import { ElLoading, ElMessage } from 'element-plus'
import dayjs from 'dayjs'
+import { PageActionEventType } from 'pdfjs-dist/types/src/shared/util'
import selectStandard from '../dialog/selectStandardDialog.vue'
import type { ITempelateForm } from '../measureData-interface'
import useUserStore from '@/store/modules/user'
@@ -258,17 +259,19 @@
getClassificationList(fetchClassificationListQuery.value).then((response) => {
if (response.data.rows.length) {
- if (user.bizLabCode === 'H') { // 当前用户是海口实验室的
- form.value.measureAddress = response.data.rows[0].labH
- }
- else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的
- form.value.measureAddress = response.data.rows[0].labX
- }
- if (form.value.measureAddress) {
- const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress)
- if (index !== -1) {
- form.value.temperature = positionList.value[index].temperature
- form.value.humidity = positionList.value[index].humidity
+ if (props.pageType === 'add') {
+ if (user.bizLabCode === 'H') { // 当前用户是海口实验室的
+ form.value.measureAddress = response.data.rows[0].labH
+ }
+ else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的
+ form.value.measureAddress = response.data.rows[0].labX
+ }
+ if (form.value.measureAddress) {
+ const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress)
+ if (index !== -1) {
+ form.value.temperature = positionList.value[index].temperature
+ form.value.humidity = positionList.value[index].humidity
+ }
}
}
form.value.technologyFile = response.data.rows[0].technologyFile.split(';')
diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
index 1615c82..5f68915 100644
--- a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
@@ -95,7 +95,7 @@
{ text: '检定项目', value: 'params', align: 'center', required: true },
{ text: '标称值', value: 'nominalValueDefineFront', align: 'center', required: true },
{ text: '指标下限', value: 'lowerIndex', align: 'center', required: false },
- { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '220' },
+ { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '320' },
{ text: '指标上限', value: 'upperIndex', align: 'center', required: false },
{ text: '相对误差', value: 'relativeError', align: 'center', required: false },
{ text: 'U(k=2)', value: 'urel', align: 'center', required: true },
@@ -212,7 +212,7 @@
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -231,7 +231,7 @@
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
measureValueUnit: item.unit, // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
@@ -248,7 +248,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -264,7 +264,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -280,7 +280,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
amplitudeDefineFront: item.amplitude + item.amplitudeUnit, // 幅度
measureValueDefineFront: item.measureValue + item.measureValueUnit, // 测量值
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -299,7 +299,7 @@
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
measureValueUnit: item.unit, // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -316,7 +316,7 @@
powerDefineFront: item.power + item.powerUnit, // 功率
offsetFrequencyDefineFront: item.offsetFrequency + item.offsetFrequencyUnit, // 偏移频率
// measureValueUnit: 'dBc', // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
@@ -370,7 +370,7 @@
upperIndex: '', // 指标上限
lowerIndex: '', // 指标下限
measureValue: '', // 测量值
- measureValueUnit: item.nominalValueUnit, // 测量值单位
+ measureValueUnit: item.unit, // 测量值单位
relativeError: '', // 相对误差
urel: item.urel, // U(k=2)
technicalIndex: item.technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
index 0da1053..aabbefb 100644
--- a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
+++ b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
@@ -152,8 +152,25 @@
+
+
+
+ {{ scope.row[item.value] }}
+
+ {{ scope.row.measureValueUnit }}
+
+ *
+
+
-
+
{{ scope.row[item.value] }}
- %
+ {{ props.type === '剩余调幅' ? '%' : scope.row.upperIndexUnit }}
*
diff --git a/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
index fc2ee0d..33e42ac 100644
--- a/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
@@ -132,7 +132,7 @@
{ text: '差值大小(Ω)', value: 'differenceSize', align: 'center', required: false },
{ text: '分辨力', value: 'resolution', align: 'center', required: true },
])
-
+const originTopList = ref([]) as any // 上面表格检定项原始数据
// -------------------------------------------获取详情信息--------------------------------------------------
// 获取页面详情信息
const fetchInfo = () => {
@@ -158,7 +158,7 @@
useSolveFormData(res, templateFormAndTableRef.value)
// ==================================检定数据========================================================================
const topData = res.data.measureDataElectricalSafetyList.filter((item: { dataType: string }) => item.dataType === '1')
- listTop.value = topData.map((item: IDetailMeasureList) => {
+ listTop.value = topData.map((item: IDetailMeasureList, index: number) => {
return {
...item,
editable: pageType.value !== 'detail',
@@ -170,6 +170,7 @@
standardValueRedStar: Number(item.standardValue) < Number(item.minimumAllowValue) || Number(item.standardValue) > Number(item.maximumAllowValue)
? 'error'
: 'normal', // 开路电压标准值标*
+ MaximumErrorFormula: originTopList.value[index].maximumError,
}
}) // 检定数据上面表格数据
@@ -203,17 +204,17 @@
if (index % 10 === 0) {
return '/'
}
- else {
- return useRound(calc(Number(list[index].measureIndicationValue), Number(list[index - 1].measureIndicationValue), '-'), caculateDecimalDigits(list[index].resolution))
- }
+ // else {
+ // return useRound(calc(Number(list[index].measureIndicationValue), Number(list[index - 1].measureIndicationValue), '-'), caculateDecimalDigits(list[index].resolution) as number)
+ // }
}
else if (itemFormData.value.itemCategoryName === '模拟式接地电阻表') {
if (index % 11 === 0) {
return '/'
}
- else {
- return useRound(calc(Number(list[index].standardValue), Number(list[index - 1].standardValue), '-'), caculateDecimalDigits(list[index].resolution))
- }
+ // else {
+ // return useRound(calc(Number(list[index].standardValue), Number(list[index - 1].standardValue), '-'), caculateDecimalDigits(list[index].resolution) as number)
+ // }
}
}
@@ -265,11 +266,11 @@
standardValue: itemFormData.value.itemCategoryName === '模拟式接地电阻表' ? undefined : item.standardValue, // 标准值
unit: item.unit, // 单位
measureIndicationValue: itemFormData.value.itemCategoryName === '数字式接地电阻表' ? item.standardValue : item.measureIndicationValue, // 被检表示值
- // zeroRemoveMeasureIndicationValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后被检表示值
- zeroRemoveMeasureIndicationValue: '', // 消除零位误差后被检表示值
+ zeroRemoveMeasureIndicationValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后被检表示值
+ // zeroRemoveMeasureIndicationValue: '', // 消除零位误差后被检表示值
indicationValueUnit: '', // 消除零位误差后被检表示值单位
- // zeroRemoveMeasureStandardValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后标准值
- zeroRemoveMeasureStandardValue: '', // 消除零位误差后标准值
+ zeroRemoveMeasureStandardValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后标准值
+ // zeroRemoveMeasureStandardValue: '', // 消除零位误差后标准值
standardValueUnit: item.unit, // 消除零位误差后标准值单位
maximumError: item.maximumError, // 最大允许误差
maximumErrorFormula: item.maximumError, // 最大允许误差公式
@@ -312,16 +313,18 @@
* @param itemCategoryName 检定项分类名字
* @param belongStandardEquipment 检校标准装置字典
*/
-const fetchItemInfo = (itemId: string, itemCategoryName: string, belongStandardEquipment = '') => {
+const fetchItemInfo = async (itemId: string, itemCategoryName: string, belongStandardEquipment = '', solveData = true) => {
const params = {
id: itemId,
itemCategoryName, // 检定项分类名字
belongStandardEquipment, // 检校标准装置字典code
}
- getItemInfo(params).then((res) => {
- itemFormData.value.appearanceFunctionCheck = `${res.data.appearanceFunctionCheck}` === '1' ? '外观完好,工作正常' : '' // 外观及功能检查 1有外观,2没有外观
+ const res = await getItemInfo(params)
+ itemFormData.value.appearanceFunctionCheck = `${res.data.appearanceFunctionCheck}` === '1' ? '外观完好,工作正常' : '' // 外观及功能检查 1有外观,2没有外观
+ originTopList.value = res.data.measureItemDataElectricalSafetyList.filter((item: { dataType: string }) => item.dataType === '1')
+ if (solveData) {
initInputData(res.data.measureItemDataElectricalSafetyList)
- })
+ }
}
// ----------------------------------------点击保存时校验---------------------------------------
@@ -429,7 +432,7 @@
return {
...item,
// 根据分辨力修约,先保留几位小数再四舍五入
- standardValue: useRound(item.standardValue, caculateDecimalDigits(item.resolution)),
+ standardValue: useRound(item.standardValue, caculateDecimalDigits(item.resolution) as number),
}
})
}
@@ -542,8 +545,9 @@
fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string)
}
else {
- // fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string)
- fetchInfo()
+ fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string).then(() => {
+ // fetchInfo()
+ })
}
})
@@ -630,7 +634,7 @@
:placeholder="pageType === 'detail' ? '' : `${item.text}`"
:disabled="pageType === 'detail'"
class="full-width-input"
- :precision="caculateDecimalDigits(scope.row.resolution)"
+ :precision="caculateDecimalDigits(scope.row.resolution) as number"
/>
+ 驳回
+ -->
拒绝
diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue
index 15a9741..7f14ac9 100644
--- a/src/components/MultiHeaderTable/tableColumn.vue
+++ b/src/components/MultiHeaderTable/tableColumn.vue
@@ -95,13 +95,23 @@
@change="handleInputChange(scope)"
@blur="handleInputBlur(scope.row)"
/>
-
+ /> -->
+
+
+ {{ scope.row.showUnitData }}
+
{{ scope.row[item.value] }}
diff --git a/src/views/business/measure/item/useCalculateResolution.ts b/src/views/business/measure/item/useCalculateResolution.ts
index 3e1e08a..2615de8 100644
--- a/src/views/business/measure/item/useCalculateResolution.ts
+++ b/src/views/business/measure/item/useCalculateResolution.ts
@@ -27,7 +27,7 @@
*/
export function caculateDecimalDigits(value: any) {
if (!value || `${value}` === '' || `${value}` === 'undefined') {
- return false
+ return value
}
const data = Number(value)
console.log('计算分辨力小数点后面有几位分辨力数值:', value)
diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue
index f9b9632..7b71b09 100644
--- a/src/views/business/taskMeasure/certificate/components/basic.vue
+++ b/src/views/business/taskMeasure/certificate/components/basic.vue
@@ -86,20 +86,20 @@
background: 'rgba(255, 255, 255, 0.8)',
})
getInfo({ id: infoId.value }).then((res) => {
- if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) {
- createMeasureCert({ id: infoId.value }).then((res) => {
- form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
- form.value.certificateFile = res.data.certificateFile // 检定证书
- emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
- loading.close()
- })
- }
- else {
- loading.close()
- form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
- form.value.certificateFile = res.data.certificateFile // 检定证书
- emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
- }
+ // if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) {
+ // createMeasureCert({ id: infoId.value }).then((res) => {
+ // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ // form.value.certificateFile = res.data.certificateFile // 检定证书
+ // emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // loading.close()
+ // })
+ // }
+ // else {
+ loading.close()
+ form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ form.value.certificateFile = res.data.certificateFile // 检定证书
+ emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // }
})
}
diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue
index f2d837b..67fadfe 100644
--- a/src/views/business/taskMeasure/certificate/list.vue
+++ b/src/views/business/taskMeasure/certificate/list.vue
@@ -15,11 +15,13 @@
import {
approvalDelete,
cancelApproval,
+ createMeasureCert,
draftDelete,
exportCertificateList,
getCertificateList,
refuseApproval,
} from '@/api/business/taskMeasure/certificate'
+
const buttonBoxActive = 'businessCertificate' // 存储在sessionstorage里面的字段名,用于记录右上角buttonbox点击状态
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -147,7 +149,9 @@
}
// ----------------------------------------------操作---------------------------------------------------
+const approvalId = ref('') // 操作的行id
const handleEdit = (row: IList, type: string) => {
+ approvalId.value = row.id
if (type === 'detail') { // 详情
$router.push({
path: `/businessCertificate/${type}/${row.id}`,
@@ -236,9 +240,16 @@
})
}
// -----------------------------------------审批------------------------------------------------
-// 审批结束回调
+// 审批结束回调(同意)
const approvalSuccess = () => {
- fetchData(true)
+ loadingTable.value = true
+ createMeasureCert({ id: approvalId.value }).then((res) => {
+ // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ // form.value.certificateFile = res.data.certificateFile // 检定证书
+ // emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // loading.close()
+ fetchData(true)
+ })
}
// 切换tab状态
diff --git a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
index afe1fa1..5639925 100644
--- a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
+++ b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
@@ -3,6 +3,7 @@
import { ref } from 'vue'
import { ElLoading, ElMessage } from 'element-plus'
import dayjs from 'dayjs'
+import { PageActionEventType } from 'pdfjs-dist/types/src/shared/util'
import selectStandard from '../dialog/selectStandardDialog.vue'
import type { ITempelateForm } from '../measureData-interface'
import useUserStore from '@/store/modules/user'
@@ -258,17 +259,19 @@
getClassificationList(fetchClassificationListQuery.value).then((response) => {
if (response.data.rows.length) {
- if (user.bizLabCode === 'H') { // 当前用户是海口实验室的
- form.value.measureAddress = response.data.rows[0].labH
- }
- else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的
- form.value.measureAddress = response.data.rows[0].labX
- }
- if (form.value.measureAddress) {
- const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress)
- if (index !== -1) {
- form.value.temperature = positionList.value[index].temperature
- form.value.humidity = positionList.value[index].humidity
+ if (props.pageType === 'add') {
+ if (user.bizLabCode === 'H') { // 当前用户是海口实验室的
+ form.value.measureAddress = response.data.rows[0].labH
+ }
+ else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的
+ form.value.measureAddress = response.data.rows[0].labX
+ }
+ if (form.value.measureAddress) {
+ const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress)
+ if (index !== -1) {
+ form.value.temperature = positionList.value[index].temperature
+ form.value.humidity = positionList.value[index].humidity
+ }
}
}
form.value.technologyFile = response.data.rows[0].technologyFile.split(';')
diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
index 1615c82..5f68915 100644
--- a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
@@ -95,7 +95,7 @@
{ text: '检定项目', value: 'params', align: 'center', required: true },
{ text: '标称值', value: 'nominalValueDefineFront', align: 'center', required: true },
{ text: '指标下限', value: 'lowerIndex', align: 'center', required: false },
- { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '220' },
+ { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '320' },
{ text: '指标上限', value: 'upperIndex', align: 'center', required: false },
{ text: '相对误差', value: 'relativeError', align: 'center', required: false },
{ text: 'U(k=2)', value: 'urel', align: 'center', required: true },
@@ -212,7 +212,7 @@
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -231,7 +231,7 @@
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
measureValueUnit: item.unit, // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
@@ -248,7 +248,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -264,7 +264,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -280,7 +280,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
amplitudeDefineFront: item.amplitude + item.amplitudeUnit, // 幅度
measureValueDefineFront: item.measureValue + item.measureValueUnit, // 测量值
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -299,7 +299,7 @@
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
measureValueUnit: item.unit, // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -316,7 +316,7 @@
powerDefineFront: item.power + item.powerUnit, // 功率
offsetFrequencyDefineFront: item.offsetFrequency + item.offsetFrequencyUnit, // 偏移频率
// measureValueUnit: 'dBc', // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
@@ -370,7 +370,7 @@
upperIndex: '', // 指标上限
lowerIndex: '', // 指标下限
measureValue: '', // 测量值
- measureValueUnit: item.nominalValueUnit, // 测量值单位
+ measureValueUnit: item.unit, // 测量值单位
relativeError: '', // 相对误差
urel: item.urel, // U(k=2)
technicalIndex: item.technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
index 0da1053..aabbefb 100644
--- a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
+++ b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
@@ -152,8 +152,25 @@
+
+
+
+ {{ scope.row[item.value] }}
+
+ {{ scope.row.measureValueUnit }}
+
+ *
+
+
-
+
{{ scope.row[item.value] }}
- %
+ {{ props.type === '剩余调幅' ? '%' : scope.row.upperIndexUnit }}
*
diff --git a/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
index fc2ee0d..33e42ac 100644
--- a/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
@@ -132,7 +132,7 @@
{ text: '差值大小(Ω)', value: 'differenceSize', align: 'center', required: false },
{ text: '分辨力', value: 'resolution', align: 'center', required: true },
])
-
+const originTopList = ref([]) as any // 上面表格检定项原始数据
// -------------------------------------------获取详情信息--------------------------------------------------
// 获取页面详情信息
const fetchInfo = () => {
@@ -158,7 +158,7 @@
useSolveFormData(res, templateFormAndTableRef.value)
// ==================================检定数据========================================================================
const topData = res.data.measureDataElectricalSafetyList.filter((item: { dataType: string }) => item.dataType === '1')
- listTop.value = topData.map((item: IDetailMeasureList) => {
+ listTop.value = topData.map((item: IDetailMeasureList, index: number) => {
return {
...item,
editable: pageType.value !== 'detail',
@@ -170,6 +170,7 @@
standardValueRedStar: Number(item.standardValue) < Number(item.minimumAllowValue) || Number(item.standardValue) > Number(item.maximumAllowValue)
? 'error'
: 'normal', // 开路电压标准值标*
+ MaximumErrorFormula: originTopList.value[index].maximumError,
}
}) // 检定数据上面表格数据
@@ -203,17 +204,17 @@
if (index % 10 === 0) {
return '/'
}
- else {
- return useRound(calc(Number(list[index].measureIndicationValue), Number(list[index - 1].measureIndicationValue), '-'), caculateDecimalDigits(list[index].resolution))
- }
+ // else {
+ // return useRound(calc(Number(list[index].measureIndicationValue), Number(list[index - 1].measureIndicationValue), '-'), caculateDecimalDigits(list[index].resolution) as number)
+ // }
}
else if (itemFormData.value.itemCategoryName === '模拟式接地电阻表') {
if (index % 11 === 0) {
return '/'
}
- else {
- return useRound(calc(Number(list[index].standardValue), Number(list[index - 1].standardValue), '-'), caculateDecimalDigits(list[index].resolution))
- }
+ // else {
+ // return useRound(calc(Number(list[index].standardValue), Number(list[index - 1].standardValue), '-'), caculateDecimalDigits(list[index].resolution) as number)
+ // }
}
}
@@ -265,11 +266,11 @@
standardValue: itemFormData.value.itemCategoryName === '模拟式接地电阻表' ? undefined : item.standardValue, // 标准值
unit: item.unit, // 单位
measureIndicationValue: itemFormData.value.itemCategoryName === '数字式接地电阻表' ? item.standardValue : item.measureIndicationValue, // 被检表示值
- // zeroRemoveMeasureIndicationValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后被检表示值
- zeroRemoveMeasureIndicationValue: '', // 消除零位误差后被检表示值
+ zeroRemoveMeasureIndicationValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后被检表示值
+ // zeroRemoveMeasureIndicationValue: '', // 消除零位误差后被检表示值
indicationValueUnit: '', // 消除零位误差后被检表示值单位
- // zeroRemoveMeasureStandardValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后标准值
- zeroRemoveMeasureStandardValue: '', // 消除零位误差后标准值
+ zeroRemoveMeasureStandardValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后标准值
+ // zeroRemoveMeasureStandardValue: '', // 消除零位误差后标准值
standardValueUnit: item.unit, // 消除零位误差后标准值单位
maximumError: item.maximumError, // 最大允许误差
maximumErrorFormula: item.maximumError, // 最大允许误差公式
@@ -312,16 +313,18 @@
* @param itemCategoryName 检定项分类名字
* @param belongStandardEquipment 检校标准装置字典
*/
-const fetchItemInfo = (itemId: string, itemCategoryName: string, belongStandardEquipment = '') => {
+const fetchItemInfo = async (itemId: string, itemCategoryName: string, belongStandardEquipment = '', solveData = true) => {
const params = {
id: itemId,
itemCategoryName, // 检定项分类名字
belongStandardEquipment, // 检校标准装置字典code
}
- getItemInfo(params).then((res) => {
- itemFormData.value.appearanceFunctionCheck = `${res.data.appearanceFunctionCheck}` === '1' ? '外观完好,工作正常' : '' // 外观及功能检查 1有外观,2没有外观
+ const res = await getItemInfo(params)
+ itemFormData.value.appearanceFunctionCheck = `${res.data.appearanceFunctionCheck}` === '1' ? '外观完好,工作正常' : '' // 外观及功能检查 1有外观,2没有外观
+ originTopList.value = res.data.measureItemDataElectricalSafetyList.filter((item: { dataType: string }) => item.dataType === '1')
+ if (solveData) {
initInputData(res.data.measureItemDataElectricalSafetyList)
- })
+ }
}
// ----------------------------------------点击保存时校验---------------------------------------
@@ -429,7 +432,7 @@
return {
...item,
// 根据分辨力修约,先保留几位小数再四舍五入
- standardValue: useRound(item.standardValue, caculateDecimalDigits(item.resolution)),
+ standardValue: useRound(item.standardValue, caculateDecimalDigits(item.resolution) as number),
}
})
}
@@ -542,8 +545,9 @@
fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string)
}
else {
- // fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string)
- fetchInfo()
+ fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string).then(() => {
+ // fetchInfo()
+ })
}
})
@@ -630,7 +634,7 @@
:placeholder="pageType === 'detail' ? '' : `${item.text}`"
:disabled="pageType === 'detail'"
class="full-width-input"
- :precision="caculateDecimalDigits(scope.row.resolution)"
+ :precision="caculateDecimalDigits(scope.row.resolution) as number"
/>
{
templateFormAndTableRef.form.measureAddress = res.data.measureAddress // 测试、校准或检定地点
+ templateFormAndTableRef.form.temperature = res.data.temperature // 温度
+ templateFormAndTableRef.form.humidity = res.data.humidity // 相对湿度
}, 2500)
- templateFormAndTableRef.form.temperature = res.data.temperature // 温度
- templateFormAndTableRef.form.humidity = res.data.humidity // 相对湿度
templateFormAndTableRef.form.orderId = res.data.orderId // 任务单id
templateFormAndTableRef.form.orderNo = res.data.orderNo // 任务单编号
templateFormAndTableRef.form.createUserId = res.data.createUserId // 检定员id
diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue
index 7031e67..0a462df 100644
--- a/src/components/Approval/ApprovalDialog.vue
+++ b/src/components/Approval/ApprovalDialog.vue
@@ -119,8 +119,8 @@
同意
+ 驳回
+ -->
拒绝
diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue
index 15a9741..7f14ac9 100644
--- a/src/components/MultiHeaderTable/tableColumn.vue
+++ b/src/components/MultiHeaderTable/tableColumn.vue
@@ -95,13 +95,23 @@
@change="handleInputChange(scope)"
@blur="handleInputBlur(scope.row)"
/>
-
+ /> -->
+
+
+ {{ scope.row.showUnitData }}
+
{{ scope.row[item.value] }}
diff --git a/src/views/business/measure/item/useCalculateResolution.ts b/src/views/business/measure/item/useCalculateResolution.ts
index 3e1e08a..2615de8 100644
--- a/src/views/business/measure/item/useCalculateResolution.ts
+++ b/src/views/business/measure/item/useCalculateResolution.ts
@@ -27,7 +27,7 @@
*/
export function caculateDecimalDigits(value: any) {
if (!value || `${value}` === '' || `${value}` === 'undefined') {
- return false
+ return value
}
const data = Number(value)
console.log('计算分辨力小数点后面有几位分辨力数值:', value)
diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue
index f9b9632..7b71b09 100644
--- a/src/views/business/taskMeasure/certificate/components/basic.vue
+++ b/src/views/business/taskMeasure/certificate/components/basic.vue
@@ -86,20 +86,20 @@
background: 'rgba(255, 255, 255, 0.8)',
})
getInfo({ id: infoId.value }).then((res) => {
- if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) {
- createMeasureCert({ id: infoId.value }).then((res) => {
- form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
- form.value.certificateFile = res.data.certificateFile // 检定证书
- emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
- loading.close()
- })
- }
- else {
- loading.close()
- form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
- form.value.certificateFile = res.data.certificateFile // 检定证书
- emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
- }
+ // if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) {
+ // createMeasureCert({ id: infoId.value }).then((res) => {
+ // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ // form.value.certificateFile = res.data.certificateFile // 检定证书
+ // emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // loading.close()
+ // })
+ // }
+ // else {
+ loading.close()
+ form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ form.value.certificateFile = res.data.certificateFile // 检定证书
+ emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // }
})
}
diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue
index f2d837b..67fadfe 100644
--- a/src/views/business/taskMeasure/certificate/list.vue
+++ b/src/views/business/taskMeasure/certificate/list.vue
@@ -15,11 +15,13 @@
import {
approvalDelete,
cancelApproval,
+ createMeasureCert,
draftDelete,
exportCertificateList,
getCertificateList,
refuseApproval,
} from '@/api/business/taskMeasure/certificate'
+
const buttonBoxActive = 'businessCertificate' // 存储在sessionstorage里面的字段名,用于记录右上角buttonbox点击状态
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -147,7 +149,9 @@
}
// ----------------------------------------------操作---------------------------------------------------
+const approvalId = ref('') // 操作的行id
const handleEdit = (row: IList, type: string) => {
+ approvalId.value = row.id
if (type === 'detail') { // 详情
$router.push({
path: `/businessCertificate/${type}/${row.id}`,
@@ -236,9 +240,16 @@
})
}
// -----------------------------------------审批------------------------------------------------
-// 审批结束回调
+// 审批结束回调(同意)
const approvalSuccess = () => {
- fetchData(true)
+ loadingTable.value = true
+ createMeasureCert({ id: approvalId.value }).then((res) => {
+ // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ // form.value.certificateFile = res.data.certificateFile // 检定证书
+ // emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // loading.close()
+ fetchData(true)
+ })
}
// 切换tab状态
diff --git a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
index afe1fa1..5639925 100644
--- a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
+++ b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
@@ -3,6 +3,7 @@
import { ref } from 'vue'
import { ElLoading, ElMessage } from 'element-plus'
import dayjs from 'dayjs'
+import { PageActionEventType } from 'pdfjs-dist/types/src/shared/util'
import selectStandard from '../dialog/selectStandardDialog.vue'
import type { ITempelateForm } from '../measureData-interface'
import useUserStore from '@/store/modules/user'
@@ -258,17 +259,19 @@
getClassificationList(fetchClassificationListQuery.value).then((response) => {
if (response.data.rows.length) {
- if (user.bizLabCode === 'H') { // 当前用户是海口实验室的
- form.value.measureAddress = response.data.rows[0].labH
- }
- else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的
- form.value.measureAddress = response.data.rows[0].labX
- }
- if (form.value.measureAddress) {
- const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress)
- if (index !== -1) {
- form.value.temperature = positionList.value[index].temperature
- form.value.humidity = positionList.value[index].humidity
+ if (props.pageType === 'add') {
+ if (user.bizLabCode === 'H') { // 当前用户是海口实验室的
+ form.value.measureAddress = response.data.rows[0].labH
+ }
+ else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的
+ form.value.measureAddress = response.data.rows[0].labX
+ }
+ if (form.value.measureAddress) {
+ const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress)
+ if (index !== -1) {
+ form.value.temperature = positionList.value[index].temperature
+ form.value.humidity = positionList.value[index].humidity
+ }
}
}
form.value.technologyFile = response.data.rows[0].technologyFile.split(';')
diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
index 1615c82..5f68915 100644
--- a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
@@ -95,7 +95,7 @@
{ text: '检定项目', value: 'params', align: 'center', required: true },
{ text: '标称值', value: 'nominalValueDefineFront', align: 'center', required: true },
{ text: '指标下限', value: 'lowerIndex', align: 'center', required: false },
- { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '220' },
+ { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '320' },
{ text: '指标上限', value: 'upperIndex', align: 'center', required: false },
{ text: '相对误差', value: 'relativeError', align: 'center', required: false },
{ text: 'U(k=2)', value: 'urel', align: 'center', required: true },
@@ -212,7 +212,7 @@
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -231,7 +231,7 @@
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
measureValueUnit: item.unit, // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
@@ -248,7 +248,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -264,7 +264,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -280,7 +280,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
amplitudeDefineFront: item.amplitude + item.amplitudeUnit, // 幅度
measureValueDefineFront: item.measureValue + item.measureValueUnit, // 测量值
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -299,7 +299,7 @@
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
measureValueUnit: item.unit, // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -316,7 +316,7 @@
powerDefineFront: item.power + item.powerUnit, // 功率
offsetFrequencyDefineFront: item.offsetFrequency + item.offsetFrequencyUnit, // 偏移频率
// measureValueUnit: 'dBc', // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
@@ -370,7 +370,7 @@
upperIndex: '', // 指标上限
lowerIndex: '', // 指标下限
measureValue: '', // 测量值
- measureValueUnit: item.nominalValueUnit, // 测量值单位
+ measureValueUnit: item.unit, // 测量值单位
relativeError: '', // 相对误差
urel: item.urel, // U(k=2)
technicalIndex: item.technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
index 0da1053..aabbefb 100644
--- a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
+++ b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
@@ -152,8 +152,25 @@
+
+
+
+ {{ scope.row[item.value] }}
+
+ {{ scope.row.measureValueUnit }}
+
+ *
+
+
-
+
{{ scope.row[item.value] }}
- %
+ {{ props.type === '剩余调幅' ? '%' : scope.row.upperIndexUnit }}
*
diff --git a/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
index fc2ee0d..33e42ac 100644
--- a/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
@@ -132,7 +132,7 @@
{ text: '差值大小(Ω)', value: 'differenceSize', align: 'center', required: false },
{ text: '分辨力', value: 'resolution', align: 'center', required: true },
])
-
+const originTopList = ref([]) as any // 上面表格检定项原始数据
// -------------------------------------------获取详情信息--------------------------------------------------
// 获取页面详情信息
const fetchInfo = () => {
@@ -158,7 +158,7 @@
useSolveFormData(res, templateFormAndTableRef.value)
// ==================================检定数据========================================================================
const topData = res.data.measureDataElectricalSafetyList.filter((item: { dataType: string }) => item.dataType === '1')
- listTop.value = topData.map((item: IDetailMeasureList) => {
+ listTop.value = topData.map((item: IDetailMeasureList, index: number) => {
return {
...item,
editable: pageType.value !== 'detail',
@@ -170,6 +170,7 @@
standardValueRedStar: Number(item.standardValue) < Number(item.minimumAllowValue) || Number(item.standardValue) > Number(item.maximumAllowValue)
? 'error'
: 'normal', // 开路电压标准值标*
+ MaximumErrorFormula: originTopList.value[index].maximumError,
}
}) // 检定数据上面表格数据
@@ -203,17 +204,17 @@
if (index % 10 === 0) {
return '/'
}
- else {
- return useRound(calc(Number(list[index].measureIndicationValue), Number(list[index - 1].measureIndicationValue), '-'), caculateDecimalDigits(list[index].resolution))
- }
+ // else {
+ // return useRound(calc(Number(list[index].measureIndicationValue), Number(list[index - 1].measureIndicationValue), '-'), caculateDecimalDigits(list[index].resolution) as number)
+ // }
}
else if (itemFormData.value.itemCategoryName === '模拟式接地电阻表') {
if (index % 11 === 0) {
return '/'
}
- else {
- return useRound(calc(Number(list[index].standardValue), Number(list[index - 1].standardValue), '-'), caculateDecimalDigits(list[index].resolution))
- }
+ // else {
+ // return useRound(calc(Number(list[index].standardValue), Number(list[index - 1].standardValue), '-'), caculateDecimalDigits(list[index].resolution) as number)
+ // }
}
}
@@ -265,11 +266,11 @@
standardValue: itemFormData.value.itemCategoryName === '模拟式接地电阻表' ? undefined : item.standardValue, // 标准值
unit: item.unit, // 单位
measureIndicationValue: itemFormData.value.itemCategoryName === '数字式接地电阻表' ? item.standardValue : item.measureIndicationValue, // 被检表示值
- // zeroRemoveMeasureIndicationValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后被检表示值
- zeroRemoveMeasureIndicationValue: '', // 消除零位误差后被检表示值
+ zeroRemoveMeasureIndicationValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后被检表示值
+ // zeroRemoveMeasureIndicationValue: '', // 消除零位误差后被检表示值
indicationValueUnit: '', // 消除零位误差后被检表示值单位
- // zeroRemoveMeasureStandardValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后标准值
- zeroRemoveMeasureStandardValue: '', // 消除零位误差后标准值
+ zeroRemoveMeasureStandardValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后标准值
+ // zeroRemoveMeasureStandardValue: '', // 消除零位误差后标准值
standardValueUnit: item.unit, // 消除零位误差后标准值单位
maximumError: item.maximumError, // 最大允许误差
maximumErrorFormula: item.maximumError, // 最大允许误差公式
@@ -312,16 +313,18 @@
* @param itemCategoryName 检定项分类名字
* @param belongStandardEquipment 检校标准装置字典
*/
-const fetchItemInfo = (itemId: string, itemCategoryName: string, belongStandardEquipment = '') => {
+const fetchItemInfo = async (itemId: string, itemCategoryName: string, belongStandardEquipment = '', solveData = true) => {
const params = {
id: itemId,
itemCategoryName, // 检定项分类名字
belongStandardEquipment, // 检校标准装置字典code
}
- getItemInfo(params).then((res) => {
- itemFormData.value.appearanceFunctionCheck = `${res.data.appearanceFunctionCheck}` === '1' ? '外观完好,工作正常' : '' // 外观及功能检查 1有外观,2没有外观
+ const res = await getItemInfo(params)
+ itemFormData.value.appearanceFunctionCheck = `${res.data.appearanceFunctionCheck}` === '1' ? '外观完好,工作正常' : '' // 外观及功能检查 1有外观,2没有外观
+ originTopList.value = res.data.measureItemDataElectricalSafetyList.filter((item: { dataType: string }) => item.dataType === '1')
+ if (solveData) {
initInputData(res.data.measureItemDataElectricalSafetyList)
- })
+ }
}
// ----------------------------------------点击保存时校验---------------------------------------
@@ -429,7 +432,7 @@
return {
...item,
// 根据分辨力修约,先保留几位小数再四舍五入
- standardValue: useRound(item.standardValue, caculateDecimalDigits(item.resolution)),
+ standardValue: useRound(item.standardValue, caculateDecimalDigits(item.resolution) as number),
}
})
}
@@ -542,8 +545,9 @@
fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string)
}
else {
- // fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string)
- fetchInfo()
+ fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string).then(() => {
+ // fetchInfo()
+ })
}
})
@@ -630,7 +634,7 @@
:placeholder="pageType === 'detail' ? '' : `${item.text}`"
:disabled="pageType === 'detail'"
class="full-width-input"
- :precision="caculateDecimalDigits(scope.row.resolution)"
+ :precision="caculateDecimalDigits(scope.row.resolution) as number"
/>
{
templateFormAndTableRef.form.measureAddress = res.data.measureAddress // 测试、校准或检定地点
+ templateFormAndTableRef.form.temperature = res.data.temperature // 温度
+ templateFormAndTableRef.form.humidity = res.data.humidity // 相对湿度
}, 2500)
- templateFormAndTableRef.form.temperature = res.data.temperature // 温度
- templateFormAndTableRef.form.humidity = res.data.humidity // 相对湿度
templateFormAndTableRef.form.orderId = res.data.orderId // 任务单id
templateFormAndTableRef.form.orderNo = res.data.orderNo // 任务单编号
templateFormAndTableRef.form.createUserId = res.data.createUserId // 检定员id
diff --git a/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue b/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue
index c92d797..991704f 100644
--- a/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue
+++ b/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue
@@ -2254,6 +2254,7 @@
class="full-width-input"
@change="(val: any) => changeTestValueOne(val, scope.$index)"
/>
+ {{ scope.row[item.value] }}
{{ scope.row.unit }}
diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue
index 7031e67..0a462df 100644
--- a/src/components/Approval/ApprovalDialog.vue
+++ b/src/components/Approval/ApprovalDialog.vue
@@ -119,8 +119,8 @@
同意
+ 驳回
+ -->
拒绝
diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue
index 15a9741..7f14ac9 100644
--- a/src/components/MultiHeaderTable/tableColumn.vue
+++ b/src/components/MultiHeaderTable/tableColumn.vue
@@ -95,13 +95,23 @@
@change="handleInputChange(scope)"
@blur="handleInputBlur(scope.row)"
/>
-
+ /> -->
+
+
+ {{ scope.row.showUnitData }}
+
{{ scope.row[item.value] }}
diff --git a/src/views/business/measure/item/useCalculateResolution.ts b/src/views/business/measure/item/useCalculateResolution.ts
index 3e1e08a..2615de8 100644
--- a/src/views/business/measure/item/useCalculateResolution.ts
+++ b/src/views/business/measure/item/useCalculateResolution.ts
@@ -27,7 +27,7 @@
*/
export function caculateDecimalDigits(value: any) {
if (!value || `${value}` === '' || `${value}` === 'undefined') {
- return false
+ return value
}
const data = Number(value)
console.log('计算分辨力小数点后面有几位分辨力数值:', value)
diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue
index f9b9632..7b71b09 100644
--- a/src/views/business/taskMeasure/certificate/components/basic.vue
+++ b/src/views/business/taskMeasure/certificate/components/basic.vue
@@ -86,20 +86,20 @@
background: 'rgba(255, 255, 255, 0.8)',
})
getInfo({ id: infoId.value }).then((res) => {
- if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) {
- createMeasureCert({ id: infoId.value }).then((res) => {
- form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
- form.value.certificateFile = res.data.certificateFile // 检定证书
- emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
- loading.close()
- })
- }
- else {
- loading.close()
- form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
- form.value.certificateFile = res.data.certificateFile // 检定证书
- emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
- }
+ // if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) {
+ // createMeasureCert({ id: infoId.value }).then((res) => {
+ // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ // form.value.certificateFile = res.data.certificateFile // 检定证书
+ // emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // loading.close()
+ // })
+ // }
+ // else {
+ loading.close()
+ form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ form.value.certificateFile = res.data.certificateFile // 检定证书
+ emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // }
})
}
diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue
index f2d837b..67fadfe 100644
--- a/src/views/business/taskMeasure/certificate/list.vue
+++ b/src/views/business/taskMeasure/certificate/list.vue
@@ -15,11 +15,13 @@
import {
approvalDelete,
cancelApproval,
+ createMeasureCert,
draftDelete,
exportCertificateList,
getCertificateList,
refuseApproval,
} from '@/api/business/taskMeasure/certificate'
+
const buttonBoxActive = 'businessCertificate' // 存储在sessionstorage里面的字段名,用于记录右上角buttonbox点击状态
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -147,7 +149,9 @@
}
// ----------------------------------------------操作---------------------------------------------------
+const approvalId = ref('') // 操作的行id
const handleEdit = (row: IList, type: string) => {
+ approvalId.value = row.id
if (type === 'detail') { // 详情
$router.push({
path: `/businessCertificate/${type}/${row.id}`,
@@ -236,9 +240,16 @@
})
}
// -----------------------------------------审批------------------------------------------------
-// 审批结束回调
+// 审批结束回调(同意)
const approvalSuccess = () => {
- fetchData(true)
+ loadingTable.value = true
+ createMeasureCert({ id: approvalId.value }).then((res) => {
+ // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ // form.value.certificateFile = res.data.certificateFile // 检定证书
+ // emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // loading.close()
+ fetchData(true)
+ })
}
// 切换tab状态
diff --git a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
index afe1fa1..5639925 100644
--- a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
+++ b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
@@ -3,6 +3,7 @@
import { ref } from 'vue'
import { ElLoading, ElMessage } from 'element-plus'
import dayjs from 'dayjs'
+import { PageActionEventType } from 'pdfjs-dist/types/src/shared/util'
import selectStandard from '../dialog/selectStandardDialog.vue'
import type { ITempelateForm } from '../measureData-interface'
import useUserStore from '@/store/modules/user'
@@ -258,17 +259,19 @@
getClassificationList(fetchClassificationListQuery.value).then((response) => {
if (response.data.rows.length) {
- if (user.bizLabCode === 'H') { // 当前用户是海口实验室的
- form.value.measureAddress = response.data.rows[0].labH
- }
- else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的
- form.value.measureAddress = response.data.rows[0].labX
- }
- if (form.value.measureAddress) {
- const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress)
- if (index !== -1) {
- form.value.temperature = positionList.value[index].temperature
- form.value.humidity = positionList.value[index].humidity
+ if (props.pageType === 'add') {
+ if (user.bizLabCode === 'H') { // 当前用户是海口实验室的
+ form.value.measureAddress = response.data.rows[0].labH
+ }
+ else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的
+ form.value.measureAddress = response.data.rows[0].labX
+ }
+ if (form.value.measureAddress) {
+ const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress)
+ if (index !== -1) {
+ form.value.temperature = positionList.value[index].temperature
+ form.value.humidity = positionList.value[index].humidity
+ }
}
}
form.value.technologyFile = response.data.rows[0].technologyFile.split(';')
diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
index 1615c82..5f68915 100644
--- a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
@@ -95,7 +95,7 @@
{ text: '检定项目', value: 'params', align: 'center', required: true },
{ text: '标称值', value: 'nominalValueDefineFront', align: 'center', required: true },
{ text: '指标下限', value: 'lowerIndex', align: 'center', required: false },
- { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '220' },
+ { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '320' },
{ text: '指标上限', value: 'upperIndex', align: 'center', required: false },
{ text: '相对误差', value: 'relativeError', align: 'center', required: false },
{ text: 'U(k=2)', value: 'urel', align: 'center', required: true },
@@ -212,7 +212,7 @@
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -231,7 +231,7 @@
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
measureValueUnit: item.unit, // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
@@ -248,7 +248,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -264,7 +264,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -280,7 +280,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
amplitudeDefineFront: item.amplitude + item.amplitudeUnit, // 幅度
measureValueDefineFront: item.measureValue + item.measureValueUnit, // 测量值
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -299,7 +299,7 @@
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
measureValueUnit: item.unit, // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -316,7 +316,7 @@
powerDefineFront: item.power + item.powerUnit, // 功率
offsetFrequencyDefineFront: item.offsetFrequency + item.offsetFrequencyUnit, // 偏移频率
// measureValueUnit: 'dBc', // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
@@ -370,7 +370,7 @@
upperIndex: '', // 指标上限
lowerIndex: '', // 指标下限
measureValue: '', // 测量值
- measureValueUnit: item.nominalValueUnit, // 测量值单位
+ measureValueUnit: item.unit, // 测量值单位
relativeError: '', // 相对误差
urel: item.urel, // U(k=2)
technicalIndex: item.technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
index 0da1053..aabbefb 100644
--- a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
+++ b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
@@ -152,8 +152,25 @@
+
+
+
+ {{ scope.row[item.value] }}
+
+ {{ scope.row.measureValueUnit }}
+
+ *
+
+
-
+
{{ scope.row[item.value] }}
- %
+ {{ props.type === '剩余调幅' ? '%' : scope.row.upperIndexUnit }}
*
diff --git a/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
index fc2ee0d..33e42ac 100644
--- a/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
@@ -132,7 +132,7 @@
{ text: '差值大小(Ω)', value: 'differenceSize', align: 'center', required: false },
{ text: '分辨力', value: 'resolution', align: 'center', required: true },
])
-
+const originTopList = ref([]) as any // 上面表格检定项原始数据
// -------------------------------------------获取详情信息--------------------------------------------------
// 获取页面详情信息
const fetchInfo = () => {
@@ -158,7 +158,7 @@
useSolveFormData(res, templateFormAndTableRef.value)
// ==================================检定数据========================================================================
const topData = res.data.measureDataElectricalSafetyList.filter((item: { dataType: string }) => item.dataType === '1')
- listTop.value = topData.map((item: IDetailMeasureList) => {
+ listTop.value = topData.map((item: IDetailMeasureList, index: number) => {
return {
...item,
editable: pageType.value !== 'detail',
@@ -170,6 +170,7 @@
standardValueRedStar: Number(item.standardValue) < Number(item.minimumAllowValue) || Number(item.standardValue) > Number(item.maximumAllowValue)
? 'error'
: 'normal', // 开路电压标准值标*
+ MaximumErrorFormula: originTopList.value[index].maximumError,
}
}) // 检定数据上面表格数据
@@ -203,17 +204,17 @@
if (index % 10 === 0) {
return '/'
}
- else {
- return useRound(calc(Number(list[index].measureIndicationValue), Number(list[index - 1].measureIndicationValue), '-'), caculateDecimalDigits(list[index].resolution))
- }
+ // else {
+ // return useRound(calc(Number(list[index].measureIndicationValue), Number(list[index - 1].measureIndicationValue), '-'), caculateDecimalDigits(list[index].resolution) as number)
+ // }
}
else if (itemFormData.value.itemCategoryName === '模拟式接地电阻表') {
if (index % 11 === 0) {
return '/'
}
- else {
- return useRound(calc(Number(list[index].standardValue), Number(list[index - 1].standardValue), '-'), caculateDecimalDigits(list[index].resolution))
- }
+ // else {
+ // return useRound(calc(Number(list[index].standardValue), Number(list[index - 1].standardValue), '-'), caculateDecimalDigits(list[index].resolution) as number)
+ // }
}
}
@@ -265,11 +266,11 @@
standardValue: itemFormData.value.itemCategoryName === '模拟式接地电阻表' ? undefined : item.standardValue, // 标准值
unit: item.unit, // 单位
measureIndicationValue: itemFormData.value.itemCategoryName === '数字式接地电阻表' ? item.standardValue : item.measureIndicationValue, // 被检表示值
- // zeroRemoveMeasureIndicationValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后被检表示值
- zeroRemoveMeasureIndicationValue: '', // 消除零位误差后被检表示值
+ zeroRemoveMeasureIndicationValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后被检表示值
+ // zeroRemoveMeasureIndicationValue: '', // 消除零位误差后被检表示值
indicationValueUnit: '', // 消除零位误差后被检表示值单位
- // zeroRemoveMeasureStandardValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后标准值
- zeroRemoveMeasureStandardValue: '', // 消除零位误差后标准值
+ zeroRemoveMeasureStandardValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后标准值
+ // zeroRemoveMeasureStandardValue: '', // 消除零位误差后标准值
standardValueUnit: item.unit, // 消除零位误差后标准值单位
maximumError: item.maximumError, // 最大允许误差
maximumErrorFormula: item.maximumError, // 最大允许误差公式
@@ -312,16 +313,18 @@
* @param itemCategoryName 检定项分类名字
* @param belongStandardEquipment 检校标准装置字典
*/
-const fetchItemInfo = (itemId: string, itemCategoryName: string, belongStandardEquipment = '') => {
+const fetchItemInfo = async (itemId: string, itemCategoryName: string, belongStandardEquipment = '', solveData = true) => {
const params = {
id: itemId,
itemCategoryName, // 检定项分类名字
belongStandardEquipment, // 检校标准装置字典code
}
- getItemInfo(params).then((res) => {
- itemFormData.value.appearanceFunctionCheck = `${res.data.appearanceFunctionCheck}` === '1' ? '外观完好,工作正常' : '' // 外观及功能检查 1有外观,2没有外观
+ const res = await getItemInfo(params)
+ itemFormData.value.appearanceFunctionCheck = `${res.data.appearanceFunctionCheck}` === '1' ? '外观完好,工作正常' : '' // 外观及功能检查 1有外观,2没有外观
+ originTopList.value = res.data.measureItemDataElectricalSafetyList.filter((item: { dataType: string }) => item.dataType === '1')
+ if (solveData) {
initInputData(res.data.measureItemDataElectricalSafetyList)
- })
+ }
}
// ----------------------------------------点击保存时校验---------------------------------------
@@ -429,7 +432,7 @@
return {
...item,
// 根据分辨力修约,先保留几位小数再四舍五入
- standardValue: useRound(item.standardValue, caculateDecimalDigits(item.resolution)),
+ standardValue: useRound(item.standardValue, caculateDecimalDigits(item.resolution) as number),
}
})
}
@@ -542,8 +545,9 @@
fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string)
}
else {
- // fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string)
- fetchInfo()
+ fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string).then(() => {
+ // fetchInfo()
+ })
}
})
@@ -630,7 +634,7 @@
:placeholder="pageType === 'detail' ? '' : `${item.text}`"
:disabled="pageType === 'detail'"
class="full-width-input"
- :precision="caculateDecimalDigits(scope.row.resolution)"
+ :precision="caculateDecimalDigits(scope.row.resolution) as number"
/>
{
templateFormAndTableRef.form.measureAddress = res.data.measureAddress // 测试、校准或检定地点
+ templateFormAndTableRef.form.temperature = res.data.temperature // 温度
+ templateFormAndTableRef.form.humidity = res.data.humidity // 相对湿度
}, 2500)
- templateFormAndTableRef.form.temperature = res.data.temperature // 温度
- templateFormAndTableRef.form.humidity = res.data.humidity // 相对湿度
templateFormAndTableRef.form.orderId = res.data.orderId // 任务单id
templateFormAndTableRef.form.orderNo = res.data.orderNo // 任务单编号
templateFormAndTableRef.form.createUserId = res.data.createUserId // 检定员id
diff --git a/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue b/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue
index c92d797..991704f 100644
--- a/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue
+++ b/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue
@@ -2254,6 +2254,7 @@
class="full-width-input"
@change="(val: any) => changeTestValueOne(val, scope.$index)"
/>
+ {{ scope.row[item.value] }}
{{ scope.row.unit }}
diff --git a/src/views/equipement/standard/checkRecord/components/basic.vue b/src/views/equipement/standard/checkRecord/components/basic.vue
index 66eab39..3453c6d 100644
--- a/src/views/equipement/standard/checkRecord/components/basic.vue
+++ b/src/views/equipement/standard/checkRecord/components/basic.vue
@@ -62,18 +62,18 @@
// if (form.value.checkRecordFile.slice(form.value.checkRecordFile.length - 4) === 'docx') {
// fileType.value = 'word'
// }
- if (`${res.data.checkRecordFile}` === '') {
- createCheckCert({ id: infoId.value }).then((res) => {
- form.value.checkRecordFile = res.data.checkRecordFile
- emits('reportData', form.value.checkRecordFile)
- loading.close()
- })
- }
- else {
- form.value.checkRecordFile = res.data.checkRecordFile
- emits('reportData', form.value.checkRecordFile)
- loading.close()
- }
+ // if (`${res.data.checkRecordFile}` === '') {
+ // createCheckCert({ id: infoId.value }).then((res) => {
+ // form.value.checkRecordFile = res.data.checkRecordFile
+ // emits('reportData', form.value.checkRecordFile)
+ // loading.close()
+ // })
+ // }
+ // else {
+ form.value.checkRecordFile = res.data.checkRecordFile
+ emits('reportData', form.value.checkRecordFile)
+ loading.close()
+ // }
form.value.recordNo = res.data.recordNo// 核查记录编号
form.value.recordName = res.data.recordName// 核查记录名称
diff --git a/src/components/Approval/ApprovalDialog.vue b/src/components/Approval/ApprovalDialog.vue
index 7031e67..0a462df 100644
--- a/src/components/Approval/ApprovalDialog.vue
+++ b/src/components/Approval/ApprovalDialog.vue
@@ -119,8 +119,8 @@
同意
+ 驳回
+ -->
拒绝
diff --git a/src/components/MultiHeaderTable/tableColumn.vue b/src/components/MultiHeaderTable/tableColumn.vue
index 15a9741..7f14ac9 100644
--- a/src/components/MultiHeaderTable/tableColumn.vue
+++ b/src/components/MultiHeaderTable/tableColumn.vue
@@ -95,13 +95,23 @@
@change="handleInputChange(scope)"
@blur="handleInputBlur(scope.row)"
/>
-
+ /> -->
+
+
+ {{ scope.row.showUnitData }}
+
{{ scope.row[item.value] }}
diff --git a/src/views/business/measure/item/useCalculateResolution.ts b/src/views/business/measure/item/useCalculateResolution.ts
index 3e1e08a..2615de8 100644
--- a/src/views/business/measure/item/useCalculateResolution.ts
+++ b/src/views/business/measure/item/useCalculateResolution.ts
@@ -27,7 +27,7 @@
*/
export function caculateDecimalDigits(value: any) {
if (!value || `${value}` === '' || `${value}` === 'undefined') {
- return false
+ return value
}
const data = Number(value)
console.log('计算分辨力小数点后面有几位分辨力数值:', value)
diff --git a/src/views/business/taskMeasure/certificate/components/basic.vue b/src/views/business/taskMeasure/certificate/components/basic.vue
index f9b9632..7b71b09 100644
--- a/src/views/business/taskMeasure/certificate/components/basic.vue
+++ b/src/views/business/taskMeasure/certificate/components/basic.vue
@@ -86,20 +86,20 @@
background: 'rgba(255, 255, 255, 0.8)',
})
getInfo({ id: infoId.value }).then((res) => {
- if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) {
- createMeasureCert({ id: infoId.value }).then((res) => {
- form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
- form.value.certificateFile = res.data.certificateFile // 检定证书
- emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
- loading.close()
- })
- }
- else {
- loading.close()
- form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
- form.value.certificateFile = res.data.certificateFile // 检定证书
- emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
- }
+ // if ((`${res.data.originalRecordFile}` === '') || (`${res.data.originalRecordFile}` === '' && `${res.data.certificateFile}`)) {
+ // createMeasureCert({ id: infoId.value }).then((res) => {
+ // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ // form.value.certificateFile = res.data.certificateFile // 检定证书
+ // emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // loading.close()
+ // })
+ // }
+ // else {
+ loading.close()
+ form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ form.value.certificateFile = res.data.certificateFile // 检定证书
+ emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // }
})
}
diff --git a/src/views/business/taskMeasure/certificate/list.vue b/src/views/business/taskMeasure/certificate/list.vue
index f2d837b..67fadfe 100644
--- a/src/views/business/taskMeasure/certificate/list.vue
+++ b/src/views/business/taskMeasure/certificate/list.vue
@@ -15,11 +15,13 @@
import {
approvalDelete,
cancelApproval,
+ createMeasureCert,
draftDelete,
exportCertificateList,
getCertificateList,
refuseApproval,
} from '@/api/business/taskMeasure/certificate'
+
const buttonBoxActive = 'businessCertificate' // 存储在sessionstorage里面的字段名,用于记录右上角buttonbox点击状态
const { proxy } = getCurrentInstance() as any
const $router = useRouter()
@@ -147,7 +149,9 @@
}
// ----------------------------------------------操作---------------------------------------------------
+const approvalId = ref('') // 操作的行id
const handleEdit = (row: IList, type: string) => {
+ approvalId.value = row.id
if (type === 'detail') { // 详情
$router.push({
path: `/businessCertificate/${type}/${row.id}`,
@@ -236,9 +240,16 @@
})
}
// -----------------------------------------审批------------------------------------------------
-// 审批结束回调
+// 审批结束回调(同意)
const approvalSuccess = () => {
- fetchData(true)
+ loadingTable.value = true
+ createMeasureCert({ id: approvalId.value }).then((res) => {
+ // form.value.originalRecordFile = res.data.originalRecordFile // 原始记录
+ // form.value.certificateFile = res.data.certificateFile // 检定证书
+ // emits('reportData', res.data.certificateFile, res.data.originalRecordFile)
+ // loading.close()
+ fetchData(true)
+ })
}
// 切换tab状态
diff --git a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
index afe1fa1..5639925 100644
--- a/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
+++ b/src/views/business/taskMeasure/measureData/components/templateFormAndTable.vue
@@ -3,6 +3,7 @@
import { ref } from 'vue'
import { ElLoading, ElMessage } from 'element-plus'
import dayjs from 'dayjs'
+import { PageActionEventType } from 'pdfjs-dist/types/src/shared/util'
import selectStandard from '../dialog/selectStandardDialog.vue'
import type { ITempelateForm } from '../measureData-interface'
import useUserStore from '@/store/modules/user'
@@ -258,17 +259,19 @@
getClassificationList(fetchClassificationListQuery.value).then((response) => {
if (response.data.rows.length) {
- if (user.bizLabCode === 'H') { // 当前用户是海口实验室的
- form.value.measureAddress = response.data.rows[0].labH
- }
- else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的
- form.value.measureAddress = response.data.rows[0].labX
- }
- if (form.value.measureAddress) {
- const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress)
- if (index !== -1) {
- form.value.temperature = positionList.value[index].temperature
- form.value.humidity = positionList.value[index].humidity
+ if (props.pageType === 'add') {
+ if (user.bizLabCode === 'H') { // 当前用户是海口实验室的
+ form.value.measureAddress = response.data.rows[0].labH
+ }
+ else if (user.bizLabCode === 'X') { // 当前用户是西昌实验室的
+ form.value.measureAddress = response.data.rows[0].labX
+ }
+ if (form.value.measureAddress) {
+ const index = positionList.value.findIndex((item: { name: string }) => item.name === form.value.measureAddress)
+ if (index !== -1) {
+ form.value.temperature = positionList.value[index].temperature
+ form.value.humidity = positionList.value[index].humidity
+ }
}
}
form.value.technologyFile = response.data.rows[0].technologyFile.split(';')
diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
index 1615c82..5f68915 100644
--- a/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/tenth/templateDetail.vue
@@ -95,7 +95,7 @@
{ text: '检定项目', value: 'params', align: 'center', required: true },
{ text: '标称值', value: 'nominalValueDefineFront', align: 'center', required: true },
{ text: '指标下限', value: 'lowerIndex', align: 'center', required: false },
- { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '220' },
+ { text: '测量值', value: 'measureValue', align: 'center', required: true, width: '320' },
{ text: '指标上限', value: 'upperIndex', align: 'center', required: false },
{ text: '相对误差', value: 'relativeError', align: 'center', required: false },
{ text: 'U(k=2)', value: 'urel', align: 'center', required: true },
@@ -212,7 +212,7 @@
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -231,7 +231,7 @@
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
measureValueUnit: item.unit, // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
@@ -248,7 +248,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -264,7 +264,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
highPassFilterDefineFront: item.highPassFilter + item.highPassFilterUnit, // 高通滤波
lowerPassFilterDefineFront: item.lowerPassFilter + item.lowerPassFilterUnit, // 低通滤波
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -280,7 +280,7 @@
frequencyDefineFront: item.frequency + item.frequencyUnit, // 频率
amplitudeDefineFront: item.amplitude + item.amplitudeUnit, // 幅度
measureValueDefineFront: item.measureValue + item.measureValueUnit, // 测量值
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -299,7 +299,7 @@
modulationRateDefineFront: item.modulationRate + item.modulationRateUnit, // 调制速率
nominalValueDefineFront: item.nominalValue + item.unit, // 标称值
measureValueUnit: item.unit, // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexUnit: originList.value[index].technicalIndexUnit, // 技术指标单位(计
@@ -316,7 +316,7 @@
powerDefineFront: item.power + item.powerUnit, // 功率
offsetFrequencyDefineFront: item.offsetFrequency + item.offsetFrequencyUnit, // 偏移频率
// measureValueUnit: 'dBc', // 测量值单位
- upperThdDefineFront: item.upperIndexSymbol + item.upperIndex + item.upperIndexUnit, // 指标上限/THD上限
+ upperThdDefineFront: item.upperIndexSymbol + item.upperThd + item.upperIndexUnit, // 指标上限/THD上限
technicalIndexDefineFront: item.technicalIndexSymbol + item.technicalIndex + item.technicalIndexUnit, // 技术指标
technicalIndex: originList.value[index].technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
technicalIndexSymbol: originList.value[index].technicalIndexSymbol, // 技术指标符号(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
@@ -370,7 +370,7 @@
upperIndex: '', // 指标上限
lowerIndex: '', // 指标下限
measureValue: '', // 测量值
- measureValueUnit: item.nominalValueUnit, // 测量值单位
+ measureValueUnit: item.unit, // 测量值单位
relativeError: '', // 相对误差
urel: item.urel, // U(k=2)
technicalIndex: item.technicalIndex, // 技术指标(计算时传参,含指标上限/指标下限的检定项目都要传该参数)
diff --git a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
index 0da1053..aabbefb 100644
--- a/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
+++ b/src/views/business/taskMeasure/measureData/components/tenth/templateTable.vue
@@ -152,8 +152,25 @@
+
+
+
+ {{ scope.row[item.value] }}
+
+ {{ scope.row.measureValueUnit }}
+
+ *
+
+
-
+
{{ scope.row[item.value] }}
- %
+ {{ props.type === '剩余调幅' ? '%' : scope.row.upperIndexUnit }}
*
diff --git a/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
index fc2ee0d..33e42ac 100644
--- a/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
+++ b/src/views/business/taskMeasure/measureData/components/third/templateDetail.vue
@@ -132,7 +132,7 @@
{ text: '差值大小(Ω)', value: 'differenceSize', align: 'center', required: false },
{ text: '分辨力', value: 'resolution', align: 'center', required: true },
])
-
+const originTopList = ref([]) as any // 上面表格检定项原始数据
// -------------------------------------------获取详情信息--------------------------------------------------
// 获取页面详情信息
const fetchInfo = () => {
@@ -158,7 +158,7 @@
useSolveFormData(res, templateFormAndTableRef.value)
// ==================================检定数据========================================================================
const topData = res.data.measureDataElectricalSafetyList.filter((item: { dataType: string }) => item.dataType === '1')
- listTop.value = topData.map((item: IDetailMeasureList) => {
+ listTop.value = topData.map((item: IDetailMeasureList, index: number) => {
return {
...item,
editable: pageType.value !== 'detail',
@@ -170,6 +170,7 @@
standardValueRedStar: Number(item.standardValue) < Number(item.minimumAllowValue) || Number(item.standardValue) > Number(item.maximumAllowValue)
? 'error'
: 'normal', // 开路电压标准值标*
+ MaximumErrorFormula: originTopList.value[index].maximumError,
}
}) // 检定数据上面表格数据
@@ -203,17 +204,17 @@
if (index % 10 === 0) {
return '/'
}
- else {
- return useRound(calc(Number(list[index].measureIndicationValue), Number(list[index - 1].measureIndicationValue), '-'), caculateDecimalDigits(list[index].resolution))
- }
+ // else {
+ // return useRound(calc(Number(list[index].measureIndicationValue), Number(list[index - 1].measureIndicationValue), '-'), caculateDecimalDigits(list[index].resolution) as number)
+ // }
}
else if (itemFormData.value.itemCategoryName === '模拟式接地电阻表') {
if (index % 11 === 0) {
return '/'
}
- else {
- return useRound(calc(Number(list[index].standardValue), Number(list[index - 1].standardValue), '-'), caculateDecimalDigits(list[index].resolution))
- }
+ // else {
+ // return useRound(calc(Number(list[index].standardValue), Number(list[index - 1].standardValue), '-'), caculateDecimalDigits(list[index].resolution) as number)
+ // }
}
}
@@ -265,11 +266,11 @@
standardValue: itemFormData.value.itemCategoryName === '模拟式接地电阻表' ? undefined : item.standardValue, // 标准值
unit: item.unit, // 单位
measureIndicationValue: itemFormData.value.itemCategoryName === '数字式接地电阻表' ? item.standardValue : item.measureIndicationValue, // 被检表示值
- // zeroRemoveMeasureIndicationValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后被检表示值
- zeroRemoveMeasureIndicationValue: '', // 消除零位误差后被检表示值
+ zeroRemoveMeasureIndicationValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后被检表示值
+ // zeroRemoveMeasureIndicationValue: '', // 消除零位误差后被检表示值
indicationValueUnit: '', // 消除零位误差后被检表示值单位
- // zeroRemoveMeasureStandardValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后标准值
- zeroRemoveMeasureStandardValue: '', // 消除零位误差后标准值
+ zeroRemoveMeasureStandardValue: casulateZeroRemoveMeasure(topData, index), // 消除零位误差后标准值
+ // zeroRemoveMeasureStandardValue: '', // 消除零位误差后标准值
standardValueUnit: item.unit, // 消除零位误差后标准值单位
maximumError: item.maximumError, // 最大允许误差
maximumErrorFormula: item.maximumError, // 最大允许误差公式
@@ -312,16 +313,18 @@
* @param itemCategoryName 检定项分类名字
* @param belongStandardEquipment 检校标准装置字典
*/
-const fetchItemInfo = (itemId: string, itemCategoryName: string, belongStandardEquipment = '') => {
+const fetchItemInfo = async (itemId: string, itemCategoryName: string, belongStandardEquipment = '', solveData = true) => {
const params = {
id: itemId,
itemCategoryName, // 检定项分类名字
belongStandardEquipment, // 检校标准装置字典code
}
- getItemInfo(params).then((res) => {
- itemFormData.value.appearanceFunctionCheck = `${res.data.appearanceFunctionCheck}` === '1' ? '外观完好,工作正常' : '' // 外观及功能检查 1有外观,2没有外观
+ const res = await getItemInfo(params)
+ itemFormData.value.appearanceFunctionCheck = `${res.data.appearanceFunctionCheck}` === '1' ? '外观完好,工作正常' : '' // 外观及功能检查 1有外观,2没有外观
+ originTopList.value = res.data.measureItemDataElectricalSafetyList.filter((item: { dataType: string }) => item.dataType === '1')
+ if (solveData) {
initInputData(res.data.measureItemDataElectricalSafetyList)
- })
+ }
}
// ----------------------------------------点击保存时校验---------------------------------------
@@ -429,7 +432,7 @@
return {
...item,
// 根据分辨力修约,先保留几位小数再四舍五入
- standardValue: useRound(item.standardValue, caculateDecimalDigits(item.resolution)),
+ standardValue: useRound(item.standardValue, caculateDecimalDigits(item.resolution) as number),
}
})
}
@@ -542,8 +545,9 @@
fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string)
}
else {
- // fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string)
- fetchInfo()
+ fetchItemInfo($route.query.itemId! as string, $route.query.itemCategoryName! as string, $route.query.belongStandardEquipment as string).then(() => {
+ // fetchInfo()
+ })
}
})
@@ -630,7 +634,7 @@
:placeholder="pageType === 'detail' ? '' : `${item.text}`"
:disabled="pageType === 'detail'"
class="full-width-input"
- :precision="caculateDecimalDigits(scope.row.resolution)"
+ :precision="caculateDecimalDigits(scope.row.resolution) as number"
/>
{
templateFormAndTableRef.form.measureAddress = res.data.measureAddress // 测试、校准或检定地点
+ templateFormAndTableRef.form.temperature = res.data.temperature // 温度
+ templateFormAndTableRef.form.humidity = res.data.humidity // 相对湿度
}, 2500)
- templateFormAndTableRef.form.temperature = res.data.temperature // 温度
- templateFormAndTableRef.form.humidity = res.data.humidity // 相对湿度
templateFormAndTableRef.form.orderId = res.data.orderId // 任务单id
templateFormAndTableRef.form.orderNo = res.data.orderNo // 任务单编号
templateFormAndTableRef.form.createUserId = res.data.createUserId // 检定员id
diff --git a/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue b/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue
index c92d797..991704f 100644
--- a/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue
+++ b/src/views/equipement/standard/checkData/components/thirteenth/checkDataCom.vue
@@ -2254,6 +2254,7 @@
class="full-width-input"
@change="(val: any) => changeTestValueOne(val, scope.$index)"
/>
+ {{ scope.row[item.value] }}
{{ scope.row.unit }}
diff --git a/src/views/equipement/standard/checkRecord/components/basic.vue b/src/views/equipement/standard/checkRecord/components/basic.vue
index 66eab39..3453c6d 100644
--- a/src/views/equipement/standard/checkRecord/components/basic.vue
+++ b/src/views/equipement/standard/checkRecord/components/basic.vue
@@ -62,18 +62,18 @@
// if (form.value.checkRecordFile.slice(form.value.checkRecordFile.length - 4) === 'docx') {
// fileType.value = 'word'
// }
- if (`${res.data.checkRecordFile}` === '') {
- createCheckCert({ id: infoId.value }).then((res) => {
- form.value.checkRecordFile = res.data.checkRecordFile
- emits('reportData', form.value.checkRecordFile)
- loading.close()
- })
- }
- else {
- form.value.checkRecordFile = res.data.checkRecordFile
- emits('reportData', form.value.checkRecordFile)
- loading.close()
- }
+ // if (`${res.data.checkRecordFile}` === '') {
+ // createCheckCert({ id: infoId.value }).then((res) => {
+ // form.value.checkRecordFile = res.data.checkRecordFile
+ // emits('reportData', form.value.checkRecordFile)
+ // loading.close()
+ // })
+ // }
+ // else {
+ form.value.checkRecordFile = res.data.checkRecordFile
+ emits('reportData', form.value.checkRecordFile)
+ loading.close()
+ // }
form.value.recordNo = res.data.recordNo// 核查记录编号
form.value.recordName = res.data.recordName// 核查记录名称
diff --git a/src/views/equipement/standard/checkRecord/list.vue b/src/views/equipement/standard/checkRecord/list.vue
index 4a45780..d1e45f6 100644
--- a/src/views/equipement/standard/checkRecord/list.vue
+++ b/src/views/equipement/standard/checkRecord/list.vue
@@ -12,6 +12,7 @@
import type { IMenu } from '@/components/buttonBox/buttonBox'
import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import ButtonBox from '@/components/buttonBox/buttonBox.vue'
+import { createCheckCert } from '@/api/equipment/standard/checkRecords'
// import { getCheckRecordList, getTaskDetail, myExecutiveDone, myExecutiveReceive } from '@/api/business/schedule/task'
import {
approvalDelete,
@@ -62,7 +63,7 @@
const total = ref(0) // 总数
const loadingTable = ref(false) // 表格加载状态
const checkoutList = ref([]) // 选中的内容
-
+const approvalId = ref('') // 操作的行id
// --------------------------------------------字典--------------------------------------
async function getDict() {
// 审批状态
@@ -146,7 +147,12 @@
// -----------------------------------------审批------------------------------------------------
// 审批结束回调
const approvalSuccess = () => {
- fetchData(true)
+ loadingTable.value = true
+ createCheckCert({ id: approvalId.value }).then((res) => {
+ fetchData(true)
+ }).catch(() => {
+ loadingTable.value = false
+ })
}
// 切换tab状态
@@ -157,6 +163,7 @@
}
// ----------------------------------------------操作---------------------------------------------------
const handleEdit = (row: IList, type: string) => {
+ approvalId.value = row.id
if (type === 'detail') { // 详情
$router.push({
path: `/equipmentCheckRecord/${type}/${row.id}`,