diff --git a/src/views/business/measure/item/components/fifth/templateDetail.vue b/src/views/business/measure/item/components/fifth/templateDetail.vue index 1b1ea4e..65a1513 100644 --- a/src/views/business/measure/item/components/fifth/templateDetail.vue +++ b/src/views/business/measure/item/components/fifth/templateDetail.vue @@ -252,7 +252,6 @@ break case '工业铂铜热电阻': columns.value = columns_resistance.value - // if (props.pageType === 'add') { list.value = [{ id: '', itemId: props.itemId, @@ -288,7 +287,6 @@ aallowErrorUpper: aallowErrorMap[form.value.level][1], // α允差上限/10(-6) ℃(-1) }, ] - // } break } } @@ -296,6 +294,8 @@ const $route = useRoute() watch(() => props.list, (newVal) => { // 检定项表格 + console.log('监听到检定项表格数据') + const updataOld = $route.query.updataOld as string if (newVal.length && updataOld !== 'true') { list.value = newVal.map((item: any) => { @@ -314,19 +314,19 @@ } return item }) - console.log('newVal', newVal[0]) - form.value.measureRangeLower = newVal[0].measureRangeLower // 测量范围下限 // form.value.measureRangeUnit = newVal[0].valuemeasureRangeUnit // 测量范围单位(字典value) form.value.measureRangeUpper = newVal[0].measureRangeUpper // 测量范围上限 form.value.accuracyLevel = newVal[0].accuracyLevel // 准确度等级 form.value.level = newVal[0].level // 级别 + console.log('newVal', newVal[0]) } }) watch(() => props.form, (newValue) => { const updataOld = $route.query.updataOld as string - if (updataOld !== 'true') { + const isFirstConfig = $route.query.isFirstConfig as string + if (newValue && Object.keys(newValue).length && updataOld !== 'true' && isFirstConfig !== 'true') { form.value.angleAdjustError = newValue.angleAdjustError // 角度调整误差 form.value.appearanceFunctionCheck = newValue.appearanceFunctionCheck // 外观检查 form.value.insulateResistance = newValue.insulateResistance // 绝缘电阻 @@ -340,9 +340,37 @@ }, { deep: true, immediate: true }) // 监听级别变化 -watch(() => form.value.level, (newValue) => { +// watch(() => form.value.level, (newValue) => { +// console.log('监听级别变化', newValue) +// if (props.itemCategoryName === '工业铂铜热电阻') { +// switch (newValue) { +// case 'Cu100': +// list.value[0].drDt = 0.42893 // dR/dt +// list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) +// list.value[0].aallowErrorUpper = aallowErrorMap[form.value.level][1] // α允差上限/10(-6) ℃(-1) +// list.value[0].allowErrorUpper = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '+') // 允差上限R0 +// list.value[0].allowErrorLower = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '-') // 允差下限R0 +// list.value[1].allowErrorUpper = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '+') // 允差上限R100 +// list.value[1].allowErrorLower = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '-') // 允差下限R100 +// break +// default: +// list.value[0].drDt = 0.39083 // dR/dt +// list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) +// list.value[0].aallowErrorUpper = aallowErrorMap[form.value.level][1] // α允差上限/10(-6) ℃(-1) +// list.value[0].allowErrorUpper = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '+') // 允差上限R0 +// list.value[0].allowErrorLower = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '-') // 允差下限R0 +// list.value[1].allowErrorUpper = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '+') // 允差上限R100 +// list.value[1].allowErrorLower = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '-') // 允差下限R100 +// break +// } +// } +// }, { immediate: true }) + +// 监听级别变化 +const changeLevel = (level: string) => { + console.log('监听级别变化', level) if (props.itemCategoryName === '工业铂铜热电阻') { - switch (newValue) { + switch (level) { case 'Cu100': list.value[0].drDt = 0.42893 // dR/dt list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) @@ -363,7 +391,7 @@ break } } -}) +} // 监听α标称值改变 const handleNominalValueChange = () => { @@ -641,6 +669,7 @@ :disabled="props.pageType === 'detail'" filterable class="full-width-input" + @change="changeLevel" > diff --git a/src/views/business/measure/item/components/fifth/templateDetail.vue b/src/views/business/measure/item/components/fifth/templateDetail.vue index 1b1ea4e..65a1513 100644 --- a/src/views/business/measure/item/components/fifth/templateDetail.vue +++ b/src/views/business/measure/item/components/fifth/templateDetail.vue @@ -252,7 +252,6 @@ break case '工业铂铜热电阻': columns.value = columns_resistance.value - // if (props.pageType === 'add') { list.value = [{ id: '', itemId: props.itemId, @@ -288,7 +287,6 @@ aallowErrorUpper: aallowErrorMap[form.value.level][1], // α允差上限/10(-6) ℃(-1) }, ] - // } break } } @@ -296,6 +294,8 @@ const $route = useRoute() watch(() => props.list, (newVal) => { // 检定项表格 + console.log('监听到检定项表格数据') + const updataOld = $route.query.updataOld as string if (newVal.length && updataOld !== 'true') { list.value = newVal.map((item: any) => { @@ -314,19 +314,19 @@ } return item }) - console.log('newVal', newVal[0]) - form.value.measureRangeLower = newVal[0].measureRangeLower // 测量范围下限 // form.value.measureRangeUnit = newVal[0].valuemeasureRangeUnit // 测量范围单位(字典value) form.value.measureRangeUpper = newVal[0].measureRangeUpper // 测量范围上限 form.value.accuracyLevel = newVal[0].accuracyLevel // 准确度等级 form.value.level = newVal[0].level // 级别 + console.log('newVal', newVal[0]) } }) watch(() => props.form, (newValue) => { const updataOld = $route.query.updataOld as string - if (updataOld !== 'true') { + const isFirstConfig = $route.query.isFirstConfig as string + if (newValue && Object.keys(newValue).length && updataOld !== 'true' && isFirstConfig !== 'true') { form.value.angleAdjustError = newValue.angleAdjustError // 角度调整误差 form.value.appearanceFunctionCheck = newValue.appearanceFunctionCheck // 外观检查 form.value.insulateResistance = newValue.insulateResistance // 绝缘电阻 @@ -340,9 +340,37 @@ }, { deep: true, immediate: true }) // 监听级别变化 -watch(() => form.value.level, (newValue) => { +// watch(() => form.value.level, (newValue) => { +// console.log('监听级别变化', newValue) +// if (props.itemCategoryName === '工业铂铜热电阻') { +// switch (newValue) { +// case 'Cu100': +// list.value[0].drDt = 0.42893 // dR/dt +// list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) +// list.value[0].aallowErrorUpper = aallowErrorMap[form.value.level][1] // α允差上限/10(-6) ℃(-1) +// list.value[0].allowErrorUpper = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '+') // 允差上限R0 +// list.value[0].allowErrorLower = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '-') // 允差下限R0 +// list.value[1].allowErrorUpper = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '+') // 允差上限R100 +// list.value[1].allowErrorLower = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '-') // 允差下限R100 +// break +// default: +// list.value[0].drDt = 0.39083 // dR/dt +// list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) +// list.value[0].aallowErrorUpper = aallowErrorMap[form.value.level][1] // α允差上限/10(-6) ℃(-1) +// list.value[0].allowErrorUpper = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '+') // 允差上限R0 +// list.value[0].allowErrorLower = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '-') // 允差下限R0 +// list.value[1].allowErrorUpper = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '+') // 允差上限R100 +// list.value[1].allowErrorLower = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '-') // 允差下限R100 +// break +// } +// } +// }, { immediate: true }) + +// 监听级别变化 +const changeLevel = (level: string) => { + console.log('监听级别变化', level) if (props.itemCategoryName === '工业铂铜热电阻') { - switch (newValue) { + switch (level) { case 'Cu100': list.value[0].drDt = 0.42893 // dR/dt list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) @@ -363,7 +391,7 @@ break } } -}) +} // 监听α标称值改变 const handleNominalValueChange = () => { @@ -641,6 +669,7 @@ :disabled="props.pageType === 'detail'" filterable class="full-width-input" + @change="changeLevel" > diff --git a/src/views/quality/correct/handle/components/edit.vue b/src/views/quality/correct/handle/components/edit.vue index 9084b20..ee6dd4c 100644 --- a/src/views/quality/correct/handle/components/edit.vue +++ b/src/views/quality/correct/handle/components/edit.vue @@ -554,7 +554,7 @@ - + diff --git a/src/views/business/measure/item/components/fifth/templateDetail.vue b/src/views/business/measure/item/components/fifth/templateDetail.vue index 1b1ea4e..65a1513 100644 --- a/src/views/business/measure/item/components/fifth/templateDetail.vue +++ b/src/views/business/measure/item/components/fifth/templateDetail.vue @@ -252,7 +252,6 @@ break case '工业铂铜热电阻': columns.value = columns_resistance.value - // if (props.pageType === 'add') { list.value = [{ id: '', itemId: props.itemId, @@ -288,7 +287,6 @@ aallowErrorUpper: aallowErrorMap[form.value.level][1], // α允差上限/10(-6) ℃(-1) }, ] - // } break } } @@ -296,6 +294,8 @@ const $route = useRoute() watch(() => props.list, (newVal) => { // 检定项表格 + console.log('监听到检定项表格数据') + const updataOld = $route.query.updataOld as string if (newVal.length && updataOld !== 'true') { list.value = newVal.map((item: any) => { @@ -314,19 +314,19 @@ } return item }) - console.log('newVal', newVal[0]) - form.value.measureRangeLower = newVal[0].measureRangeLower // 测量范围下限 // form.value.measureRangeUnit = newVal[0].valuemeasureRangeUnit // 测量范围单位(字典value) form.value.measureRangeUpper = newVal[0].measureRangeUpper // 测量范围上限 form.value.accuracyLevel = newVal[0].accuracyLevel // 准确度等级 form.value.level = newVal[0].level // 级别 + console.log('newVal', newVal[0]) } }) watch(() => props.form, (newValue) => { const updataOld = $route.query.updataOld as string - if (updataOld !== 'true') { + const isFirstConfig = $route.query.isFirstConfig as string + if (newValue && Object.keys(newValue).length && updataOld !== 'true' && isFirstConfig !== 'true') { form.value.angleAdjustError = newValue.angleAdjustError // 角度调整误差 form.value.appearanceFunctionCheck = newValue.appearanceFunctionCheck // 外观检查 form.value.insulateResistance = newValue.insulateResistance // 绝缘电阻 @@ -340,9 +340,37 @@ }, { deep: true, immediate: true }) // 监听级别变化 -watch(() => form.value.level, (newValue) => { +// watch(() => form.value.level, (newValue) => { +// console.log('监听级别变化', newValue) +// if (props.itemCategoryName === '工业铂铜热电阻') { +// switch (newValue) { +// case 'Cu100': +// list.value[0].drDt = 0.42893 // dR/dt +// list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) +// list.value[0].aallowErrorUpper = aallowErrorMap[form.value.level][1] // α允差上限/10(-6) ℃(-1) +// list.value[0].allowErrorUpper = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '+') // 允差上限R0 +// list.value[0].allowErrorLower = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '-') // 允差下限R0 +// list.value[1].allowErrorUpper = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '+') // 允差上限R100 +// list.value[1].allowErrorLower = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '-') // 允差下限R100 +// break +// default: +// list.value[0].drDt = 0.39083 // dR/dt +// list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) +// list.value[0].aallowErrorUpper = aallowErrorMap[form.value.level][1] // α允差上限/10(-6) ℃(-1) +// list.value[0].allowErrorUpper = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '+') // 允差上限R0 +// list.value[0].allowErrorLower = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '-') // 允差下限R0 +// list.value[1].allowErrorUpper = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '+') // 允差上限R100 +// list.value[1].allowErrorLower = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '-') // 允差下限R100 +// break +// } +// } +// }, { immediate: true }) + +// 监听级别变化 +const changeLevel = (level: string) => { + console.log('监听级别变化', level) if (props.itemCategoryName === '工业铂铜热电阻') { - switch (newValue) { + switch (level) { case 'Cu100': list.value[0].drDt = 0.42893 // dR/dt list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) @@ -363,7 +391,7 @@ break } } -}) +} // 监听α标称值改变 const handleNominalValueChange = () => { @@ -641,6 +669,7 @@ :disabled="props.pageType === 'detail'" filterable class="full-width-input" + @change="changeLevel" > diff --git a/src/views/quality/correct/handle/components/edit.vue b/src/views/quality/correct/handle/components/edit.vue index 9084b20..ee6dd4c 100644 --- a/src/views/quality/correct/handle/components/edit.vue +++ b/src/views/quality/correct/handle/components/edit.vue @@ -554,7 +554,7 @@ - + diff --git a/src/views/quality/external/external/components/selectFileDialog.vue b/src/views/quality/external/external/components/selectFileDialog.vue index 2e075db..4943f8f 100644 --- a/src/views/quality/external/external/components/selectFileDialog.vue +++ b/src/views/quality/external/external/components/selectFileDialog.vue @@ -45,9 +45,156 @@ const getURl = () => { ConnectFileUrl({}).then((res) => { url.value = res.data.filter((item: any) => item.name !== '其他') + + url.value = [ + ...url.value, + { + code: '8', + formId: 'zlhdbfhyqqkfxbg', + name: '体系文件', + tips: '/resource/file/system/listPage', + }, + { + code: '9', + formId: 'zyglwjfftzd', + name: '文件发放通知单', + tips: '/resource/file/grantNotice/approval/listPage', + }, + { + code: '10', + formId: 'zyglwjggsq', + name: '文件更改申请单', + tips: '/resource/file/change/approval/listPage', + }, + { + code: '11', + formId: 'zyglwjshcddjb', + name: '文件作废登记表', + tips: '/resource/file/recallArchive/approval/listPage', + }, + { + code: '12', + formId: 'zyglrjxdsq', + name: '软件修订申请', + tips: '/resource/software/revisionApply/approval/listPage', + }, + ] }) } getURl() +// 处理入参 +const solveSendParams = (code: string) => { + let params: any + switch (code) { + case '8': // 体系文件 + params = { + fileNo: '', + fileName: '', + fileDistributeNo: '', + fileType: '', + history: '0', + labCode: '', + groupCode: '', + effectiveDateStart: '', + effectiveDateEnd: '', + promulgateTimeEnd: '', + promulgateTimeStart: '', + versionNo: '', + offset: 1, + limit: 20, + } + break + case '9': // 文件发放通知单 + params = { + approvalStatus: '0', + beginTime: '', + createUserName: '', + distributor: '', + endTime: '', + fileApprovalCodes: '', + formId: 'zyglwjfftzd', + formName: '', + formNo: '', + grantFileName: '', + grantFileNo: '', + groupCode: '', + labCode: '', + limit: 20, + offset: 1, + } + break + case '10': // 文件更改申请单 + params = { + approvalStatus: '0', + beginTime: '', + endTime: '', + changeReason: '', + createUserName: '', + fileName: '', + fileNo: '', + fileType: '', + formId: 'zyglwjggsq', + formName: '', + formNo: '', + groupCode: '', + labCode: '', + offset: 1, + limit: 20, + } + break + case '11': // 文件作废登记表 + params = { + approvalStatus: '0', + archiveReason: '', + createTimeEnd: '', + createTimeStart: '', + createUserName: '', + fileName: '', + fileNo: '', + fileType: '', + formId: 'zyglwjshcddjb', + formNo: '', + groupCode: '', + labCode: '', + offset: 1, + limit: 20, + } + break + case '12': // 软件修订申请 + params = { + applyNo: '', + softwareName: '', + softwareVersion: '', + createDept: '', + createUserName: '', + createTimeStart: '', + createTimeEnd: '', + approvalStatus: '0', + formId: 'zyglrjxdsq', + revisionReason: '', + groupCode: '', + labCode: '', + offset: 1, + limit: 20, + } + break + case '14': // 软件修订申请 + break + + default: // 质量里的 + params = { + fileName: listQuery.value.sampleNo, + offset: listQuery.value.offset, + limit: listQuery.value.limit, + approvalStatus: '0', + // formId: SCHEDULE.NONCONFORMITY_ANALYSIS_APPROVAL, + formId: url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].formId, + } + break + } + return params +} + // 数据查询 function fetchData(isNowPage = false) { loadingTable.value = true @@ -55,23 +202,30 @@ // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - const params = { - fileName: listQuery.value.sampleNo, - offset: listQuery.value.offset, - limit: listQuery.value.limit, - approvalStatus: '0', - // formId: SCHEDULE.NONCONFORMITY_ANALYSIS_APPROVAL, - formId: url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].formId, - } - const path = window.localStorage.getItem('baseURL')!.substring(0, window.localStorage.getItem('baseURL')!.length - 1) + url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].tips - if (path.includes('certificate')) { - columns.value = columnsCertificate.value + const params = solveSendParams(listQuery.value.fileTypes) + let path = '' + if (listQuery.value.fileTypes !== '1' && listQuery.value.fileTypes !== '2' && listQuery.value.fileTypes !== '3' && listQuery.value.fileTypes !== '5' && listQuery.value.fileTypes !== '6' && listQuery.value.fileTypes !== '7') { + path = url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].tips } else { - columns.value = columnsAll.value + path = window.localStorage.getItem('baseURL')!.substring(0, window.localStorage.getItem('baseURL')!.length - 1) + url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].tips + if (path.includes('certificate')) { + columns.value = columnsCertificate.value + } + else { + columns.value = columnsAll.value + } } + getListByUrl(params, path).then((response) => { - tableList.value = response.data.rows + tableList.value = response.data.rows.map((item: any) => { + return { + ...item, + fileCode: item.fileCode || item.fileNo, // 文件编号 + bizLabCodeName: item.bizLabCodeName || item.labCodeName, // 实验室 + deptName: item.deptName || item.groupCodeName, // 部门 + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }).catch(() => { diff --git a/src/views/business/measure/item/components/fifth/templateDetail.vue b/src/views/business/measure/item/components/fifth/templateDetail.vue index 1b1ea4e..65a1513 100644 --- a/src/views/business/measure/item/components/fifth/templateDetail.vue +++ b/src/views/business/measure/item/components/fifth/templateDetail.vue @@ -252,7 +252,6 @@ break case '工业铂铜热电阻': columns.value = columns_resistance.value - // if (props.pageType === 'add') { list.value = [{ id: '', itemId: props.itemId, @@ -288,7 +287,6 @@ aallowErrorUpper: aallowErrorMap[form.value.level][1], // α允差上限/10(-6) ℃(-1) }, ] - // } break } } @@ -296,6 +294,8 @@ const $route = useRoute() watch(() => props.list, (newVal) => { // 检定项表格 + console.log('监听到检定项表格数据') + const updataOld = $route.query.updataOld as string if (newVal.length && updataOld !== 'true') { list.value = newVal.map((item: any) => { @@ -314,19 +314,19 @@ } return item }) - console.log('newVal', newVal[0]) - form.value.measureRangeLower = newVal[0].measureRangeLower // 测量范围下限 // form.value.measureRangeUnit = newVal[0].valuemeasureRangeUnit // 测量范围单位(字典value) form.value.measureRangeUpper = newVal[0].measureRangeUpper // 测量范围上限 form.value.accuracyLevel = newVal[0].accuracyLevel // 准确度等级 form.value.level = newVal[0].level // 级别 + console.log('newVal', newVal[0]) } }) watch(() => props.form, (newValue) => { const updataOld = $route.query.updataOld as string - if (updataOld !== 'true') { + const isFirstConfig = $route.query.isFirstConfig as string + if (newValue && Object.keys(newValue).length && updataOld !== 'true' && isFirstConfig !== 'true') { form.value.angleAdjustError = newValue.angleAdjustError // 角度调整误差 form.value.appearanceFunctionCheck = newValue.appearanceFunctionCheck // 外观检查 form.value.insulateResistance = newValue.insulateResistance // 绝缘电阻 @@ -340,9 +340,37 @@ }, { deep: true, immediate: true }) // 监听级别变化 -watch(() => form.value.level, (newValue) => { +// watch(() => form.value.level, (newValue) => { +// console.log('监听级别变化', newValue) +// if (props.itemCategoryName === '工业铂铜热电阻') { +// switch (newValue) { +// case 'Cu100': +// list.value[0].drDt = 0.42893 // dR/dt +// list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) +// list.value[0].aallowErrorUpper = aallowErrorMap[form.value.level][1] // α允差上限/10(-6) ℃(-1) +// list.value[0].allowErrorUpper = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '+') // 允差上限R0 +// list.value[0].allowErrorLower = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '-') // 允差下限R0 +// list.value[1].allowErrorUpper = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '+') // 允差上限R100 +// list.value[1].allowErrorLower = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '-') // 允差下限R100 +// break +// default: +// list.value[0].drDt = 0.39083 // dR/dt +// list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) +// list.value[0].aallowErrorUpper = aallowErrorMap[form.value.level][1] // α允差上限/10(-6) ℃(-1) +// list.value[0].allowErrorUpper = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '+') // 允差上限R0 +// list.value[0].allowErrorLower = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '-') // 允差下限R0 +// list.value[1].allowErrorUpper = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '+') // 允差上限R100 +// list.value[1].allowErrorLower = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '-') // 允差下限R100 +// break +// } +// } +// }, { immediate: true }) + +// 监听级别变化 +const changeLevel = (level: string) => { + console.log('监听级别变化', level) if (props.itemCategoryName === '工业铂铜热电阻') { - switch (newValue) { + switch (level) { case 'Cu100': list.value[0].drDt = 0.42893 // dR/dt list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) @@ -363,7 +391,7 @@ break } } -}) +} // 监听α标称值改变 const handleNominalValueChange = () => { @@ -641,6 +669,7 @@ :disabled="props.pageType === 'detail'" filterable class="full-width-input" + @change="changeLevel" > diff --git a/src/views/quality/correct/handle/components/edit.vue b/src/views/quality/correct/handle/components/edit.vue index 9084b20..ee6dd4c 100644 --- a/src/views/quality/correct/handle/components/edit.vue +++ b/src/views/quality/correct/handle/components/edit.vue @@ -554,7 +554,7 @@ - + diff --git a/src/views/quality/external/external/components/selectFileDialog.vue b/src/views/quality/external/external/components/selectFileDialog.vue index 2e075db..4943f8f 100644 --- a/src/views/quality/external/external/components/selectFileDialog.vue +++ b/src/views/quality/external/external/components/selectFileDialog.vue @@ -45,9 +45,156 @@ const getURl = () => { ConnectFileUrl({}).then((res) => { url.value = res.data.filter((item: any) => item.name !== '其他') + + url.value = [ + ...url.value, + { + code: '8', + formId: 'zlhdbfhyqqkfxbg', + name: '体系文件', + tips: '/resource/file/system/listPage', + }, + { + code: '9', + formId: 'zyglwjfftzd', + name: '文件发放通知单', + tips: '/resource/file/grantNotice/approval/listPage', + }, + { + code: '10', + formId: 'zyglwjggsq', + name: '文件更改申请单', + tips: '/resource/file/change/approval/listPage', + }, + { + code: '11', + formId: 'zyglwjshcddjb', + name: '文件作废登记表', + tips: '/resource/file/recallArchive/approval/listPage', + }, + { + code: '12', + formId: 'zyglrjxdsq', + name: '软件修订申请', + tips: '/resource/software/revisionApply/approval/listPage', + }, + ] }) } getURl() +// 处理入参 +const solveSendParams = (code: string) => { + let params: any + switch (code) { + case '8': // 体系文件 + params = { + fileNo: '', + fileName: '', + fileDistributeNo: '', + fileType: '', + history: '0', + labCode: '', + groupCode: '', + effectiveDateStart: '', + effectiveDateEnd: '', + promulgateTimeEnd: '', + promulgateTimeStart: '', + versionNo: '', + offset: 1, + limit: 20, + } + break + case '9': // 文件发放通知单 + params = { + approvalStatus: '0', + beginTime: '', + createUserName: '', + distributor: '', + endTime: '', + fileApprovalCodes: '', + formId: 'zyglwjfftzd', + formName: '', + formNo: '', + grantFileName: '', + grantFileNo: '', + groupCode: '', + labCode: '', + limit: 20, + offset: 1, + } + break + case '10': // 文件更改申请单 + params = { + approvalStatus: '0', + beginTime: '', + endTime: '', + changeReason: '', + createUserName: '', + fileName: '', + fileNo: '', + fileType: '', + formId: 'zyglwjggsq', + formName: '', + formNo: '', + groupCode: '', + labCode: '', + offset: 1, + limit: 20, + } + break + case '11': // 文件作废登记表 + params = { + approvalStatus: '0', + archiveReason: '', + createTimeEnd: '', + createTimeStart: '', + createUserName: '', + fileName: '', + fileNo: '', + fileType: '', + formId: 'zyglwjshcddjb', + formNo: '', + groupCode: '', + labCode: '', + offset: 1, + limit: 20, + } + break + case '12': // 软件修订申请 + params = { + applyNo: '', + softwareName: '', + softwareVersion: '', + createDept: '', + createUserName: '', + createTimeStart: '', + createTimeEnd: '', + approvalStatus: '0', + formId: 'zyglrjxdsq', + revisionReason: '', + groupCode: '', + labCode: '', + offset: 1, + limit: 20, + } + break + case '14': // 软件修订申请 + break + + default: // 质量里的 + params = { + fileName: listQuery.value.sampleNo, + offset: listQuery.value.offset, + limit: listQuery.value.limit, + approvalStatus: '0', + // formId: SCHEDULE.NONCONFORMITY_ANALYSIS_APPROVAL, + formId: url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].formId, + } + break + } + return params +} + // 数据查询 function fetchData(isNowPage = false) { loadingTable.value = true @@ -55,23 +202,30 @@ // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - const params = { - fileName: listQuery.value.sampleNo, - offset: listQuery.value.offset, - limit: listQuery.value.limit, - approvalStatus: '0', - // formId: SCHEDULE.NONCONFORMITY_ANALYSIS_APPROVAL, - formId: url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].formId, - } - const path = window.localStorage.getItem('baseURL')!.substring(0, window.localStorage.getItem('baseURL')!.length - 1) + url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].tips - if (path.includes('certificate')) { - columns.value = columnsCertificate.value + const params = solveSendParams(listQuery.value.fileTypes) + let path = '' + if (listQuery.value.fileTypes !== '1' && listQuery.value.fileTypes !== '2' && listQuery.value.fileTypes !== '3' && listQuery.value.fileTypes !== '5' && listQuery.value.fileTypes !== '6' && listQuery.value.fileTypes !== '7') { + path = url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].tips } else { - columns.value = columnsAll.value + path = window.localStorage.getItem('baseURL')!.substring(0, window.localStorage.getItem('baseURL')!.length - 1) + url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].tips + if (path.includes('certificate')) { + columns.value = columnsCertificate.value + } + else { + columns.value = columnsAll.value + } } + getListByUrl(params, path).then((response) => { - tableList.value = response.data.rows + tableList.value = response.data.rows.map((item: any) => { + return { + ...item, + fileCode: item.fileCode || item.fileNo, // 文件编号 + bizLabCodeName: item.bizLabCodeName || item.labCodeName, // 实验室 + deptName: item.deptName || item.groupCodeName, // 部门 + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }).catch(() => { diff --git a/src/views/quality/internal/workManage/components/edit.vue b/src/views/quality/internal/workManage/components/edit.vue index 4bcd27b..c1e3f00 100644 --- a/src/views/quality/internal/workManage/components/edit.vue +++ b/src/views/quality/internal/workManage/components/edit.vue @@ -103,6 +103,7 @@ createId: userStore.id, createName: userStore.name, status: type === 'save' ? '0' : '1', + planStatus: type === 'save' ? '0' : '1', } if (ruleForm.value.teamMembers.length) { data.teamMembers = data.teamMembers.join(',') diff --git a/src/views/business/measure/item/components/fifth/templateDetail.vue b/src/views/business/measure/item/components/fifth/templateDetail.vue index 1b1ea4e..65a1513 100644 --- a/src/views/business/measure/item/components/fifth/templateDetail.vue +++ b/src/views/business/measure/item/components/fifth/templateDetail.vue @@ -252,7 +252,6 @@ break case '工业铂铜热电阻': columns.value = columns_resistance.value - // if (props.pageType === 'add') { list.value = [{ id: '', itemId: props.itemId, @@ -288,7 +287,6 @@ aallowErrorUpper: aallowErrorMap[form.value.level][1], // α允差上限/10(-6) ℃(-1) }, ] - // } break } } @@ -296,6 +294,8 @@ const $route = useRoute() watch(() => props.list, (newVal) => { // 检定项表格 + console.log('监听到检定项表格数据') + const updataOld = $route.query.updataOld as string if (newVal.length && updataOld !== 'true') { list.value = newVal.map((item: any) => { @@ -314,19 +314,19 @@ } return item }) - console.log('newVal', newVal[0]) - form.value.measureRangeLower = newVal[0].measureRangeLower // 测量范围下限 // form.value.measureRangeUnit = newVal[0].valuemeasureRangeUnit // 测量范围单位(字典value) form.value.measureRangeUpper = newVal[0].measureRangeUpper // 测量范围上限 form.value.accuracyLevel = newVal[0].accuracyLevel // 准确度等级 form.value.level = newVal[0].level // 级别 + console.log('newVal', newVal[0]) } }) watch(() => props.form, (newValue) => { const updataOld = $route.query.updataOld as string - if (updataOld !== 'true') { + const isFirstConfig = $route.query.isFirstConfig as string + if (newValue && Object.keys(newValue).length && updataOld !== 'true' && isFirstConfig !== 'true') { form.value.angleAdjustError = newValue.angleAdjustError // 角度调整误差 form.value.appearanceFunctionCheck = newValue.appearanceFunctionCheck // 外观检查 form.value.insulateResistance = newValue.insulateResistance // 绝缘电阻 @@ -340,9 +340,37 @@ }, { deep: true, immediate: true }) // 监听级别变化 -watch(() => form.value.level, (newValue) => { +// watch(() => form.value.level, (newValue) => { +// console.log('监听级别变化', newValue) +// if (props.itemCategoryName === '工业铂铜热电阻') { +// switch (newValue) { +// case 'Cu100': +// list.value[0].drDt = 0.42893 // dR/dt +// list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) +// list.value[0].aallowErrorUpper = aallowErrorMap[form.value.level][1] // α允差上限/10(-6) ℃(-1) +// list.value[0].allowErrorUpper = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '+') // 允差上限R0 +// list.value[0].allowErrorLower = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '-') // 允差下限R0 +// list.value[1].allowErrorUpper = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '+') // 允差上限R100 +// list.value[1].allowErrorLower = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '-') // 允差下限R100 +// break +// default: +// list.value[0].drDt = 0.39083 // dR/dt +// list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) +// list.value[0].aallowErrorUpper = aallowErrorMap[form.value.level][1] // α允差上限/10(-6) ℃(-1) +// list.value[0].allowErrorUpper = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '+') // 允差上限R0 +// list.value[0].allowErrorLower = calc(allowErrorMapR0[form.value.level][0], allowErrorMapR0[form.value.level][1], '-') // 允差下限R0 +// list.value[1].allowErrorUpper = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '+') // 允差上限R100 +// list.value[1].allowErrorLower = calc(allowErrorMapR100[form.value.level][0], allowErrorMapR100[form.value.level][1], '-') // 允差下限R100 +// break +// } +// } +// }, { immediate: true }) + +// 监听级别变化 +const changeLevel = (level: string) => { + console.log('监听级别变化', level) if (props.itemCategoryName === '工业铂铜热电阻') { - switch (newValue) { + switch (level) { case 'Cu100': list.value[0].drDt = 0.42893 // dR/dt list.value[0].aallowErrorLower = aallowErrorMap[form.value.level][0] // α允差下限/10(-6) ℃(-1) @@ -363,7 +391,7 @@ break } } -}) +} // 监听α标称值改变 const handleNominalValueChange = () => { @@ -641,6 +669,7 @@ :disabled="props.pageType === 'detail'" filterable class="full-width-input" + @change="changeLevel" > diff --git a/src/views/quality/correct/handle/components/edit.vue b/src/views/quality/correct/handle/components/edit.vue index 9084b20..ee6dd4c 100644 --- a/src/views/quality/correct/handle/components/edit.vue +++ b/src/views/quality/correct/handle/components/edit.vue @@ -554,7 +554,7 @@ - + diff --git a/src/views/quality/external/external/components/selectFileDialog.vue b/src/views/quality/external/external/components/selectFileDialog.vue index 2e075db..4943f8f 100644 --- a/src/views/quality/external/external/components/selectFileDialog.vue +++ b/src/views/quality/external/external/components/selectFileDialog.vue @@ -45,9 +45,156 @@ const getURl = () => { ConnectFileUrl({}).then((res) => { url.value = res.data.filter((item: any) => item.name !== '其他') + + url.value = [ + ...url.value, + { + code: '8', + formId: 'zlhdbfhyqqkfxbg', + name: '体系文件', + tips: '/resource/file/system/listPage', + }, + { + code: '9', + formId: 'zyglwjfftzd', + name: '文件发放通知单', + tips: '/resource/file/grantNotice/approval/listPage', + }, + { + code: '10', + formId: 'zyglwjggsq', + name: '文件更改申请单', + tips: '/resource/file/change/approval/listPage', + }, + { + code: '11', + formId: 'zyglwjshcddjb', + name: '文件作废登记表', + tips: '/resource/file/recallArchive/approval/listPage', + }, + { + code: '12', + formId: 'zyglrjxdsq', + name: '软件修订申请', + tips: '/resource/software/revisionApply/approval/listPage', + }, + ] }) } getURl() +// 处理入参 +const solveSendParams = (code: string) => { + let params: any + switch (code) { + case '8': // 体系文件 + params = { + fileNo: '', + fileName: '', + fileDistributeNo: '', + fileType: '', + history: '0', + labCode: '', + groupCode: '', + effectiveDateStart: '', + effectiveDateEnd: '', + promulgateTimeEnd: '', + promulgateTimeStart: '', + versionNo: '', + offset: 1, + limit: 20, + } + break + case '9': // 文件发放通知单 + params = { + approvalStatus: '0', + beginTime: '', + createUserName: '', + distributor: '', + endTime: '', + fileApprovalCodes: '', + formId: 'zyglwjfftzd', + formName: '', + formNo: '', + grantFileName: '', + grantFileNo: '', + groupCode: '', + labCode: '', + limit: 20, + offset: 1, + } + break + case '10': // 文件更改申请单 + params = { + approvalStatus: '0', + beginTime: '', + endTime: '', + changeReason: '', + createUserName: '', + fileName: '', + fileNo: '', + fileType: '', + formId: 'zyglwjggsq', + formName: '', + formNo: '', + groupCode: '', + labCode: '', + offset: 1, + limit: 20, + } + break + case '11': // 文件作废登记表 + params = { + approvalStatus: '0', + archiveReason: '', + createTimeEnd: '', + createTimeStart: '', + createUserName: '', + fileName: '', + fileNo: '', + fileType: '', + formId: 'zyglwjshcddjb', + formNo: '', + groupCode: '', + labCode: '', + offset: 1, + limit: 20, + } + break + case '12': // 软件修订申请 + params = { + applyNo: '', + softwareName: '', + softwareVersion: '', + createDept: '', + createUserName: '', + createTimeStart: '', + createTimeEnd: '', + approvalStatus: '0', + formId: 'zyglrjxdsq', + revisionReason: '', + groupCode: '', + labCode: '', + offset: 1, + limit: 20, + } + break + case '14': // 软件修订申请 + break + + default: // 质量里的 + params = { + fileName: listQuery.value.sampleNo, + offset: listQuery.value.offset, + limit: listQuery.value.limit, + approvalStatus: '0', + // formId: SCHEDULE.NONCONFORMITY_ANALYSIS_APPROVAL, + formId: url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].formId, + } + break + } + return params +} + // 数据查询 function fetchData(isNowPage = false) { loadingTable.value = true @@ -55,23 +202,30 @@ // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - const params = { - fileName: listQuery.value.sampleNo, - offset: listQuery.value.offset, - limit: listQuery.value.limit, - approvalStatus: '0', - // formId: SCHEDULE.NONCONFORMITY_ANALYSIS_APPROVAL, - formId: url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].formId, - } - const path = window.localStorage.getItem('baseURL')!.substring(0, window.localStorage.getItem('baseURL')!.length - 1) + url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].tips - if (path.includes('certificate')) { - columns.value = columnsCertificate.value + const params = solveSendParams(listQuery.value.fileTypes) + let path = '' + if (listQuery.value.fileTypes !== '1' && listQuery.value.fileTypes !== '2' && listQuery.value.fileTypes !== '3' && listQuery.value.fileTypes !== '5' && listQuery.value.fileTypes !== '6' && listQuery.value.fileTypes !== '7') { + path = url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].tips } else { - columns.value = columnsAll.value + path = window.localStorage.getItem('baseURL')!.substring(0, window.localStorage.getItem('baseURL')!.length - 1) + url.value.filter((item: any) => item.code === listQuery.value.fileTypes)[0].tips + if (path.includes('certificate')) { + columns.value = columnsCertificate.value + } + else { + columns.value = columnsAll.value + } } + getListByUrl(params, path).then((response) => { - tableList.value = response.data.rows + tableList.value = response.data.rows.map((item: any) => { + return { + ...item, + fileCode: item.fileCode || item.fileNo, // 文件编号 + bizLabCodeName: item.bizLabCodeName || item.labCodeName, // 实验室 + deptName: item.deptName || item.groupCodeName, // 部门 + } + }) total.value = parseInt(response.data.total) loadingTable.value = false }).catch(() => { diff --git a/src/views/quality/internal/workManage/components/edit.vue b/src/views/quality/internal/workManage/components/edit.vue index 4bcd27b..c1e3f00 100644 --- a/src/views/quality/internal/workManage/components/edit.vue +++ b/src/views/quality/internal/workManage/components/edit.vue @@ -103,6 +103,7 @@ createId: userStore.id, createName: userStore.name, status: type === 'save' ? '0' : '1', + planStatus: type === 'save' ? '0' : '1', } if (ruleForm.value.teamMembers.length) { data.teamMembers = data.teamMembers.join(',') diff --git a/src/views/quality/review/technology/components/edit.vue b/src/views/quality/review/technology/components/edit.vue index 7c03390..11b3538 100644 --- a/src/views/quality/review/technology/components/edit.vue +++ b/src/views/quality/review/technology/components/edit.vue @@ -143,7 +143,7 @@