diff --git a/src/views/business/manager/interchangeReceipt/detail.vue b/src/views/business/manager/interchangeReceipt/detail.vue index b1d17d6..b9b6a5f 100644 --- a/src/views/business/manager/interchangeReceipt/detail.vue +++ b/src/views/business/manager/interchangeReceipt/detail.vue @@ -19,6 +19,7 @@ import useUserStore from '@/store/modules/user' import { listPageApi } from '@/api/system/tool' import { getOrderDetail } from '@/api/business/manager/order' +import { getAllDeptList, getDept, getDeptTreeList } from '@/api/system/dept' import { addInterchangeReceipt, getInterchangeReceiptDetail, @@ -26,7 +27,6 @@ updateInterchangeReceipt, } from '@/api/business/manager/interchangeReceipt' import { getUserList } from '@/api/system/user' -import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import canvasDialog from '@/components/canvas/canvasDialog.vue' import { uploadApi } from '@/api/system/notice' @@ -112,9 +112,12 @@ interchangeTypeList.value = res.data.filter((item: { name: string }) => item.name === '设备收入交接单' || item.name === '设备归还交接单') }) // 获取部门列表 - getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) + // getDeptTreeList().then((res) => { + // // 转成树结构 + // useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) + // }) + getAllDeptList().then((res) => { + useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) as any }) } // -----------------------------------------路由参数---------------------------------------- diff --git a/src/views/business/manager/interchangeReceipt/detail.vue b/src/views/business/manager/interchangeReceipt/detail.vue index b1d17d6..b9b6a5f 100644 --- a/src/views/business/manager/interchangeReceipt/detail.vue +++ b/src/views/business/manager/interchangeReceipt/detail.vue @@ -19,6 +19,7 @@ import useUserStore from '@/store/modules/user' import { listPageApi } from '@/api/system/tool' import { getOrderDetail } from '@/api/business/manager/order' +import { getAllDeptList, getDept, getDeptTreeList } from '@/api/system/dept' import { addInterchangeReceipt, getInterchangeReceiptDetail, @@ -26,7 +27,6 @@ updateInterchangeReceipt, } from '@/api/business/manager/interchangeReceipt' import { getUserList } from '@/api/system/user' -import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import canvasDialog from '@/components/canvas/canvasDialog.vue' import { uploadApi } from '@/api/system/notice' @@ -112,9 +112,12 @@ interchangeTypeList.value = res.data.filter((item: { name: string }) => item.name === '设备收入交接单' || item.name === '设备归还交接单') }) // 获取部门列表 - getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) + // getDeptTreeList().then((res) => { + // // 转成树结构 + // useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) + // }) + getAllDeptList().then((res) => { + useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) as any }) } // -----------------------------------------路由参数---------------------------------------- diff --git a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue index afff6a9..32bbf1d 100644 --- a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue @@ -102,7 +102,7 @@ console.log(props.batchIndex, 'props.batchIndex') pageType.value = 'edit' batchEditRow.value = JSON.parse($route.query.batchEditRow as string) - infoId.value = batchEditRow.value[props.batchIndex].id + infoId.value = batchEditRow.value[props.batchIndex as any].id // $route.query = JSON.parse($route.query.batchEditRow as string)[props.batchIndex] } // --------------------------------------------字典-------------------------------------- @@ -344,9 +344,9 @@ id: infoId.value, belongStandardEquipment: itemFormData.value.belongStandardEquipment, // 我的任务跳转过来如果已经配置过检定项了,到编辑页面,且用一下三个字段替代传id请求详情 - itemId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId, // 检定项id - orderId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].orderId : $route.query.orderId, // 任务单id - sampleId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].sampleId : $route.query.sampleId, // 被检设备id + itemId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId, // 检定项id + orderId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].orderId : $route.query.orderId, // 任务单id + sampleId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].sampleId : $route.query.sampleId, // 被检设备id }) // 有关于检定项的数据 itemFormData.value.itemId = res.data.itemId // 检定项id @@ -955,18 +955,18 @@ onMounted(() => { // $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number] - eqptEquipmentId.value = $route.query.batchEdit ? batchEditRow.value[props.batchIndex].sampleId : $route.query.sampleId as string // 受检设备id - itemFormData.value.itemCategoryName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemCategoryName : $route.query.itemCategoryName as string// 设备检定项分类名称 + eqptEquipmentId.value = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].sampleId : $route.query.sampleId as string // 受检设备id + itemFormData.value.itemCategoryName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemCategoryName : $route.query.itemCategoryName as string// 设备检定项分类名称 itemFormData.value.itemCategoryId = $route.query.itemCategoryId as string// 设备检定项分类名称id - itemFormData.value.belongStandardEquipment = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipment : $route.query.belongStandardEquipment as string// 标准装置code - itemFormData.value.belongStandardEquipmentName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipmentName : $route.query.belongStandardEquipmentName as string// 标准装置名称 + itemFormData.value.belongStandardEquipment = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipment : $route.query.belongStandardEquipment as string// 标准装置code + itemFormData.value.belongStandardEquipmentName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipmentName : $route.query.belongStandardEquipmentName as string// 标准装置名称 if (pageType.value === 'add') { // 从我的任务跳转过来(新增) - itemFormData.value.itemId = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId as string// 检定项id + itemFormData.value.itemId = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId as string// 检定项id // 查输入值(查检定项管理的详情) fetchItemInfo( - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId as string, - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemCategoryName : $route.query.itemCategoryName as string, - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipment : $route.query.belongStandardEquipment as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemCategoryName : $route.query.itemCategoryName as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipment : $route.query.belongStandardEquipment as string, ) } else { diff --git a/src/views/business/manager/interchangeReceipt/detail.vue b/src/views/business/manager/interchangeReceipt/detail.vue index b1d17d6..b9b6a5f 100644 --- a/src/views/business/manager/interchangeReceipt/detail.vue +++ b/src/views/business/manager/interchangeReceipt/detail.vue @@ -19,6 +19,7 @@ import useUserStore from '@/store/modules/user' import { listPageApi } from '@/api/system/tool' import { getOrderDetail } from '@/api/business/manager/order' +import { getAllDeptList, getDept, getDeptTreeList } from '@/api/system/dept' import { addInterchangeReceipt, getInterchangeReceiptDetail, @@ -26,7 +27,6 @@ updateInterchangeReceipt, } from '@/api/business/manager/interchangeReceipt' import { getUserList } from '@/api/system/user' -import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import canvasDialog from '@/components/canvas/canvasDialog.vue' import { uploadApi } from '@/api/system/notice' @@ -112,9 +112,12 @@ interchangeTypeList.value = res.data.filter((item: { name: string }) => item.name === '设备收入交接单' || item.name === '设备归还交接单') }) // 获取部门列表 - getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) + // getDeptTreeList().then((res) => { + // // 转成树结构 + // useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) + // }) + getAllDeptList().then((res) => { + useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) as any }) } // -----------------------------------------路由参数---------------------------------------- diff --git a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue index afff6a9..32bbf1d 100644 --- a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue @@ -102,7 +102,7 @@ console.log(props.batchIndex, 'props.batchIndex') pageType.value = 'edit' batchEditRow.value = JSON.parse($route.query.batchEditRow as string) - infoId.value = batchEditRow.value[props.batchIndex].id + infoId.value = batchEditRow.value[props.batchIndex as any].id // $route.query = JSON.parse($route.query.batchEditRow as string)[props.batchIndex] } // --------------------------------------------字典-------------------------------------- @@ -344,9 +344,9 @@ id: infoId.value, belongStandardEquipment: itemFormData.value.belongStandardEquipment, // 我的任务跳转过来如果已经配置过检定项了,到编辑页面,且用一下三个字段替代传id请求详情 - itemId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId, // 检定项id - orderId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].orderId : $route.query.orderId, // 任务单id - sampleId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].sampleId : $route.query.sampleId, // 被检设备id + itemId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId, // 检定项id + orderId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].orderId : $route.query.orderId, // 任务单id + sampleId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].sampleId : $route.query.sampleId, // 被检设备id }) // 有关于检定项的数据 itemFormData.value.itemId = res.data.itemId // 检定项id @@ -955,18 +955,18 @@ onMounted(() => { // $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number] - eqptEquipmentId.value = $route.query.batchEdit ? batchEditRow.value[props.batchIndex].sampleId : $route.query.sampleId as string // 受检设备id - itemFormData.value.itemCategoryName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemCategoryName : $route.query.itemCategoryName as string// 设备检定项分类名称 + eqptEquipmentId.value = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].sampleId : $route.query.sampleId as string // 受检设备id + itemFormData.value.itemCategoryName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemCategoryName : $route.query.itemCategoryName as string// 设备检定项分类名称 itemFormData.value.itemCategoryId = $route.query.itemCategoryId as string// 设备检定项分类名称id - itemFormData.value.belongStandardEquipment = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipment : $route.query.belongStandardEquipment as string// 标准装置code - itemFormData.value.belongStandardEquipmentName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipmentName : $route.query.belongStandardEquipmentName as string// 标准装置名称 + itemFormData.value.belongStandardEquipment = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipment : $route.query.belongStandardEquipment as string// 标准装置code + itemFormData.value.belongStandardEquipmentName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipmentName : $route.query.belongStandardEquipmentName as string// 标准装置名称 if (pageType.value === 'add') { // 从我的任务跳转过来(新增) - itemFormData.value.itemId = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId as string// 检定项id + itemFormData.value.itemId = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId as string// 检定项id // 查输入值(查检定项管理的详情) fetchItemInfo( - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId as string, - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemCategoryName : $route.query.itemCategoryName as string, - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipment : $route.query.belongStandardEquipment as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemCategoryName : $route.query.itemCategoryName as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipment : $route.query.belongStandardEquipment as string, ) } else { diff --git a/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts b/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts index 9139d55..b38e427 100644 --- a/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts +++ b/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts @@ -15,11 +15,9 @@ templateFormAndTableRef.form.customerAddress = res.data.customerAddress // 委托单位地址 templateFormAndTableRef.form.traceDate = res.data.traceDate // 测试、校准或检定日期 templateFormAndTableRef.form.measureValidDate = res.data.measureValidDate // 检定有效期 - setTimeout(() => { - templateFormAndTableRef.form.measureAddress = res.data.measureAddress // 测试、校准或检定地点 - templateFormAndTableRef.form.temperature = res.data.temperature // 温度 - templateFormAndTableRef.form.humidity = res.data.humidity // 相对湿度 - }, 2500) + templateFormAndTableRef.form.measureAddress = res.data.measureAddress // 测试、校准或检定地点 + 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/business/manager/interchangeReceipt/detail.vue b/src/views/business/manager/interchangeReceipt/detail.vue index b1d17d6..b9b6a5f 100644 --- a/src/views/business/manager/interchangeReceipt/detail.vue +++ b/src/views/business/manager/interchangeReceipt/detail.vue @@ -19,6 +19,7 @@ import useUserStore from '@/store/modules/user' import { listPageApi } from '@/api/system/tool' import { getOrderDetail } from '@/api/business/manager/order' +import { getAllDeptList, getDept, getDeptTreeList } from '@/api/system/dept' import { addInterchangeReceipt, getInterchangeReceiptDetail, @@ -26,7 +27,6 @@ updateInterchangeReceipt, } from '@/api/business/manager/interchangeReceipt' import { getUserList } from '@/api/system/user' -import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import canvasDialog from '@/components/canvas/canvasDialog.vue' import { uploadApi } from '@/api/system/notice' @@ -112,9 +112,12 @@ interchangeTypeList.value = res.data.filter((item: { name: string }) => item.name === '设备收入交接单' || item.name === '设备归还交接单') }) // 获取部门列表 - getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) + // getDeptTreeList().then((res) => { + // // 转成树结构 + // useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) + // }) + getAllDeptList().then((res) => { + useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) as any }) } // -----------------------------------------路由参数---------------------------------------- diff --git a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue index afff6a9..32bbf1d 100644 --- a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue @@ -102,7 +102,7 @@ console.log(props.batchIndex, 'props.batchIndex') pageType.value = 'edit' batchEditRow.value = JSON.parse($route.query.batchEditRow as string) - infoId.value = batchEditRow.value[props.batchIndex].id + infoId.value = batchEditRow.value[props.batchIndex as any].id // $route.query = JSON.parse($route.query.batchEditRow as string)[props.batchIndex] } // --------------------------------------------字典-------------------------------------- @@ -344,9 +344,9 @@ id: infoId.value, belongStandardEquipment: itemFormData.value.belongStandardEquipment, // 我的任务跳转过来如果已经配置过检定项了,到编辑页面,且用一下三个字段替代传id请求详情 - itemId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId, // 检定项id - orderId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].orderId : $route.query.orderId, // 任务单id - sampleId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].sampleId : $route.query.sampleId, // 被检设备id + itemId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId, // 检定项id + orderId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].orderId : $route.query.orderId, // 任务单id + sampleId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].sampleId : $route.query.sampleId, // 被检设备id }) // 有关于检定项的数据 itemFormData.value.itemId = res.data.itemId // 检定项id @@ -955,18 +955,18 @@ onMounted(() => { // $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number] - eqptEquipmentId.value = $route.query.batchEdit ? batchEditRow.value[props.batchIndex].sampleId : $route.query.sampleId as string // 受检设备id - itemFormData.value.itemCategoryName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemCategoryName : $route.query.itemCategoryName as string// 设备检定项分类名称 + eqptEquipmentId.value = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].sampleId : $route.query.sampleId as string // 受检设备id + itemFormData.value.itemCategoryName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemCategoryName : $route.query.itemCategoryName as string// 设备检定项分类名称 itemFormData.value.itemCategoryId = $route.query.itemCategoryId as string// 设备检定项分类名称id - itemFormData.value.belongStandardEquipment = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipment : $route.query.belongStandardEquipment as string// 标准装置code - itemFormData.value.belongStandardEquipmentName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipmentName : $route.query.belongStandardEquipmentName as string// 标准装置名称 + itemFormData.value.belongStandardEquipment = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipment : $route.query.belongStandardEquipment as string// 标准装置code + itemFormData.value.belongStandardEquipmentName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipmentName : $route.query.belongStandardEquipmentName as string// 标准装置名称 if (pageType.value === 'add') { // 从我的任务跳转过来(新增) - itemFormData.value.itemId = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId as string// 检定项id + itemFormData.value.itemId = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId as string// 检定项id // 查输入值(查检定项管理的详情) fetchItemInfo( - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId as string, - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemCategoryName : $route.query.itemCategoryName as string, - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipment : $route.query.belongStandardEquipment as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemCategoryName : $route.query.itemCategoryName as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipment : $route.query.belongStandardEquipment as string, ) } else { diff --git a/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts b/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts index 9139d55..b38e427 100644 --- a/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts +++ b/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts @@ -15,11 +15,9 @@ templateFormAndTableRef.form.customerAddress = res.data.customerAddress // 委托单位地址 templateFormAndTableRef.form.traceDate = res.data.traceDate // 测试、校准或检定日期 templateFormAndTableRef.form.measureValidDate = res.data.measureValidDate // 检定有效期 - setTimeout(() => { - templateFormAndTableRef.form.measureAddress = res.data.measureAddress // 测试、校准或检定地点 - templateFormAndTableRef.form.temperature = res.data.temperature // 温度 - templateFormAndTableRef.form.humidity = res.data.humidity // 相对湿度 - }, 2500) + templateFormAndTableRef.form.measureAddress = res.data.measureAddress // 测试、校准或检定地点 + 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/first/checkDataCom.vue b/src/views/equipement/standard/checkData/components/first/checkDataCom.vue index 7176dd6..34fc99b 100644 --- a/src/views/equipement/standard/checkData/components/first/checkDataCom.vue +++ b/src/views/equipement/standard/checkData/components/first/checkDataCom.vue @@ -682,18 +682,24 @@ return { ...item, editable: props.pageType !== 'detail', + resolution: item.resolution, // 分辨力 + useRowPrecisionData: caculateDecimalDigits(item.resolution), } }) const worstList = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '最差点' && item.checkType === '重复性').map((item: any) => { return { ...item, editable: props.pageType !== 'detail', + resolution: item.resolution, // 分辨力 + useRowPrecisionData: caculateDecimalDigits(item.resolution), } }) const modelList = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '典型点' && item.checkType === '重复性').map((item: any) => { return { ...item, editable: props.pageType !== 'detail', + resolution: item.resolution, // 分辨力 + useRowPrecisionData: caculateDecimalDigits(item.resolution), } }) const bestListStability = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '最佳点' && item.checkType === '稳定性').map((item: any) => { diff --git a/src/views/business/manager/interchangeReceipt/detail.vue b/src/views/business/manager/interchangeReceipt/detail.vue index b1d17d6..b9b6a5f 100644 --- a/src/views/business/manager/interchangeReceipt/detail.vue +++ b/src/views/business/manager/interchangeReceipt/detail.vue @@ -19,6 +19,7 @@ import useUserStore from '@/store/modules/user' import { listPageApi } from '@/api/system/tool' import { getOrderDetail } from '@/api/business/manager/order' +import { getAllDeptList, getDept, getDeptTreeList } from '@/api/system/dept' import { addInterchangeReceipt, getInterchangeReceiptDetail, @@ -26,7 +27,6 @@ updateInterchangeReceipt, } from '@/api/business/manager/interchangeReceipt' import { getUserList } from '@/api/system/user' -import { getDeptTreeList } from '@/api/system/dept' import { toTreeList } from '@/utils/structure' import canvasDialog from '@/components/canvas/canvasDialog.vue' import { uploadApi } from '@/api/system/notice' @@ -112,9 +112,12 @@ interchangeTypeList.value = res.data.filter((item: { name: string }) => item.name === '设备收入交接单' || item.name === '设备归还交接单') }) // 获取部门列表 - getDeptTreeList().then((res) => { - // 转成树结构 - useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) + // getDeptTreeList().then((res) => { + // // 转成树结构 + // useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) + // }) + getAllDeptList().then((res) => { + useDeptList.value = toTreeList(res.data.map((item: any) => ({ ...item, label: item.name, value: item.id }))) as any }) } // -----------------------------------------路由参数---------------------------------------- diff --git a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue index afff6a9..32bbf1d 100644 --- a/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue +++ b/src/views/business/taskMeasure/measureData/components/fourth/templateDetail.vue @@ -102,7 +102,7 @@ console.log(props.batchIndex, 'props.batchIndex') pageType.value = 'edit' batchEditRow.value = JSON.parse($route.query.batchEditRow as string) - infoId.value = batchEditRow.value[props.batchIndex].id + infoId.value = batchEditRow.value[props.batchIndex as any].id // $route.query = JSON.parse($route.query.batchEditRow as string)[props.batchIndex] } // --------------------------------------------字典-------------------------------------- @@ -344,9 +344,9 @@ id: infoId.value, belongStandardEquipment: itemFormData.value.belongStandardEquipment, // 我的任务跳转过来如果已经配置过检定项了,到编辑页面,且用一下三个字段替代传id请求详情 - itemId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId, // 检定项id - orderId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].orderId : $route.query.orderId, // 任务单id - sampleId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].sampleId : $route.query.sampleId, // 被检设备id + itemId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId, // 检定项id + orderId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].orderId : $route.query.orderId, // 任务单id + sampleId: $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].sampleId : $route.query.sampleId, // 被检设备id }) // 有关于检定项的数据 itemFormData.value.itemId = res.data.itemId // 检定项id @@ -955,18 +955,18 @@ onMounted(() => { // $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number] - eqptEquipmentId.value = $route.query.batchEdit ? batchEditRow.value[props.batchIndex].sampleId : $route.query.sampleId as string // 受检设备id - itemFormData.value.itemCategoryName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemCategoryName : $route.query.itemCategoryName as string// 设备检定项分类名称 + eqptEquipmentId.value = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].sampleId : $route.query.sampleId as string // 受检设备id + itemFormData.value.itemCategoryName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemCategoryName : $route.query.itemCategoryName as string// 设备检定项分类名称 itemFormData.value.itemCategoryId = $route.query.itemCategoryId as string// 设备检定项分类名称id - itemFormData.value.belongStandardEquipment = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipment : $route.query.belongStandardEquipment as string// 标准装置code - itemFormData.value.belongStandardEquipmentName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipmentName : $route.query.belongStandardEquipmentName as string// 标准装置名称 + itemFormData.value.belongStandardEquipment = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipment : $route.query.belongStandardEquipment as string// 标准装置code + itemFormData.value.belongStandardEquipmentName = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipmentName : $route.query.belongStandardEquipmentName as string// 标准装置名称 if (pageType.value === 'add') { // 从我的任务跳转过来(新增) - itemFormData.value.itemId = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId as string// 检定项id + itemFormData.value.itemId = $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId as string// 检定项id // 查输入值(查检定项管理的详情) fetchItemInfo( - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemId : $route.query.itemId as string, - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].itemCategoryName : $route.query.itemCategoryName as string, - $route.query.batchEdit ? batchEditRow.value[props.batchIndex as Number].belongStandardEquipment : $route.query.belongStandardEquipment as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemId : $route.query.itemId as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].itemCategoryName : $route.query.itemCategoryName as string, + $route.query.batchEdit ? batchEditRow.value[props.batchIndex as any].belongStandardEquipment : $route.query.belongStandardEquipment as string, ) } else { diff --git a/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts b/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts index 9139d55..b38e427 100644 --- a/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts +++ b/src/views/business/taskMeasure/measureData/components/useSolveFormData.ts @@ -15,11 +15,9 @@ templateFormAndTableRef.form.customerAddress = res.data.customerAddress // 委托单位地址 templateFormAndTableRef.form.traceDate = res.data.traceDate // 测试、校准或检定日期 templateFormAndTableRef.form.measureValidDate = res.data.measureValidDate // 检定有效期 - setTimeout(() => { - templateFormAndTableRef.form.measureAddress = res.data.measureAddress // 测试、校准或检定地点 - templateFormAndTableRef.form.temperature = res.data.temperature // 温度 - templateFormAndTableRef.form.humidity = res.data.humidity // 相对湿度 - }, 2500) + templateFormAndTableRef.form.measureAddress = res.data.measureAddress // 测试、校准或检定地点 + 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/first/checkDataCom.vue b/src/views/equipement/standard/checkData/components/first/checkDataCom.vue index 7176dd6..34fc99b 100644 --- a/src/views/equipement/standard/checkData/components/first/checkDataCom.vue +++ b/src/views/equipement/standard/checkData/components/first/checkDataCom.vue @@ -682,18 +682,24 @@ return { ...item, editable: props.pageType !== 'detail', + resolution: item.resolution, // 分辨力 + useRowPrecisionData: caculateDecimalDigits(item.resolution), } }) const worstList = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '最差点' && item.checkType === '重复性').map((item: any) => { return { ...item, editable: props.pageType !== 'detail', + resolution: item.resolution, // 分辨力 + useRowPrecisionData: caculateDecimalDigits(item.resolution), } }) const modelList = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '典型点' && item.checkType === '重复性').map((item: any) => { return { ...item, editable: props.pageType !== 'detail', + resolution: item.resolution, // 分辨力 + useRowPrecisionData: caculateDecimalDigits(item.resolution), } }) const bestListStability = responseList.filter((item: { testType: string ; checkType: string }) => item.testType === '最佳点' && item.checkType === '稳定性').map((item: any) => { diff --git a/src/views/equipement/standard/checkData/components/third/checkDataCom.vue b/src/views/equipement/standard/checkData/components/third/checkDataCom.vue index 661fa75..3556dc5 100644 --- a/src/views/equipement/standard/checkData/components/third/checkDataCom.vue +++ b/src/views/equipement/standard/checkData/components/third/checkDataCom.vue @@ -13,6 +13,7 @@ import { addCheckData, calculateHandle, getHistoryIndication, getInfo, updateCheckData } from '@/api/equipment/standard/checkData' import { getCheckItemDetail, getJobInstructionList } from '@/api/equipment/standard/book' import { useCheckList } from '@/commonMethods/useCheckList' +import { caculateDecimalDigits } from '@/views/business/measure/item/useCalculateResolution' const props = defineProps({ selectStandardId: { type: String, @@ -248,6 +249,8 @@ testValueTwoDate: '', // 核查读数2日期(稳定性) unit: e.unit, // 单位(直接存字典value) urel: e.urel, // UREL + resolution: e.resolution, // 分辨力 + useRowPrecisionData: caculateDecimalDigits(e.resolution), } }) // 直流电压稳定性 @@ -300,6 +303,8 @@ testValueTwoDate: '', // 核查读数2日期(稳定性) unit: e.unit, // 单位(直接存字典value) urel: e.urel, // UREL + resolution: e.resolution, // 分辨力 + useRowPrecisionData: caculateDecimalDigits(e.resolution), } }) @@ -470,12 +475,16 @@ return { ...item, editable: props.pageType !== 'detail', + resolution: item.resolution, // 分辨力 + useRowPrecisionData: caculateDecimalDigits(item.resolution), } }) const resistanceList = responseList.filter((item: { params: string ; checkType: string }) => item.params === '电阻测量' && item.checkType === '重复性').map((item: any) => { return { ...item, editable: props.pageType !== 'detail', + resolution: item.resolution, // 分辨力 + useRowPrecisionData: caculateDecimalDigits(item.resolution), } })