diff --git a/public/config/config.json b/public/config/config.json index 644726a..ae43732 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"计量业务系统", - "versionByEqpt":"1.2.0.2", + "versionByEqpt":"1.2.0.3", "baseUrl": "http://111.198.10.15:21611", "baseUrlBusiness": "http://111.198.10.15:21606", "baseUrlLaboratory": "http://111.198.10.15:21610", diff --git a/public/config/config.json b/public/config/config.json index 644726a..ae43732 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"计量业务系统", - "versionByEqpt":"1.2.0.2", + "versionByEqpt":"1.2.0.3", "baseUrl": "http://111.198.10.15:21611", "baseUrlBusiness": "http://111.198.10.15:21606", "baseUrlLaboratory": "http://111.198.10.15:21610", diff --git a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue index 41ffa48..8678fe4 100644 --- a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue +++ b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue @@ -55,12 +55,12 @@ }, { text: '使用单位', - value: 'deptName', + value: 'companyName', align: 'center', }, { - text: '使用部门', - value: 'companyName', + text: '所在部门', + value: 'deptName', align: 'center', }, { diff --git a/public/config/config.json b/public/config/config.json index 644726a..ae43732 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"计量业务系统", - "versionByEqpt":"1.2.0.2", + "versionByEqpt":"1.2.0.3", "baseUrl": "http://111.198.10.15:21611", "baseUrlBusiness": "http://111.198.10.15:21606", "baseUrlLaboratory": "http://111.198.10.15:21610", diff --git a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue index 41ffa48..8678fe4 100644 --- a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue +++ b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue @@ -55,12 +55,12 @@ }, { text: '使用单位', - value: 'deptName', + value: 'companyName', align: 'center', }, { - text: '使用部门', - value: 'companyName', + text: '所在部门', + value: 'deptName', align: 'center', }, { diff --git a/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue b/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue index 415ef9e..44b36da 100644 --- a/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue +++ b/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue @@ -69,12 +69,12 @@ }, { text: '使用单位', - value: 'deptName', + value: 'companyName', align: 'center', }, { - text: '使用部门', - value: 'companyName', + text: '所在部门', + value: 'deptName', align: 'center', }, { diff --git a/public/config/config.json b/public/config/config.json index 644726a..ae43732 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"计量业务系统", - "versionByEqpt":"1.2.0.2", + "versionByEqpt":"1.2.0.3", "baseUrl": "http://111.198.10.15:21611", "baseUrlBusiness": "http://111.198.10.15:21606", "baseUrlLaboratory": "http://111.198.10.15:21610", diff --git a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue index 41ffa48..8678fe4 100644 --- a/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue +++ b/src/views/tested/MeasurementPlan/task/components/selectDeviceMultiple.vue @@ -55,12 +55,12 @@ }, { text: '使用单位', - value: 'deptName', + value: 'companyName', align: 'center', }, { - text: '使用部门', - value: 'companyName', + text: '所在部门', + value: 'deptName', align: 'center', }, { diff --git a/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue b/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue index 415ef9e..44b36da 100644 --- a/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue +++ b/src/views/tested/MeasurementPlan/task/components/selectDeviceSinge.vue @@ -69,12 +69,12 @@ }, { text: '使用单位', - value: 'deptName', + value: 'companyName', align: 'center', }, { - text: '使用部门', - value: 'companyName', + text: '所在部门', + value: 'deptName', align: 'center', }, { diff --git a/src/views/tested/device/info/components/edit.vue b/src/views/tested/device/info/components/edit.vue index 95e8911..392705f 100644 --- a/src/views/tested/device/info/components/edit.vue +++ b/src/views/tested/device/info/components/edit.vue @@ -336,7 +336,6 @@ } if (newVal) { if (isAdmin.value) { - console.log(456) getUserDeptSon({ companyId: newVal }).then((res) => { // console.log(res.data, '11111') deptList.value = res.data.map((item: any) => ({ id: item.id, value: item.id, name: item.fullName })) @@ -362,23 +361,11 @@ const initDialog = () => { dialogStatus.value = $route.params.type as string || 'detail' ruleFormRef.value?.resetFields() - if ($route.params.type === 'create') { - isFrist.value = false - ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 - ruleForm.value.approvalType = '1' - ruleForm.value.approvalTypeName = '新建设备' - ruleForm.value.createUserId = userStore.id - ruleForm.value.createUserName = userStore.name - testTask.value = [''] - // 获取当前用户所在单位 + const fetchDept = () => { getUserDept().then((res) => { ruleForm.value.companyId = res.data.id companyId.value = res.data.id ruleForm.value.companyName = res.data.fullName - // getDeptTree({ pid: res.data.id }).then((res1) => { - // // console.log(res1.data, '23213213') - // deptList.value = res1.data.filter((item: any) => item.pids.split(',').length === 3).map((item: any) => ({ id: item.id, value: item.id, name: item.fullName })) - // }) if (res.data.fullName === '顶级' || res.data.version === '1') { ruleForm.value.companyId = '' ruleForm.value.companyName = '' @@ -400,6 +387,17 @@ } }) } + if ($route.params.type === 'create') { + isFrist.value = false + ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 + ruleForm.value.approvalType = '1' + ruleForm.value.approvalTypeName = '新建设备' + ruleForm.value.createUserId = userStore.id + ruleForm.value.createUserName = userStore.name + testTask.value = [''] + // 获取当前用户所在单位 + fetchDept() + } else { const openSubmission = () => { if (ruleForm.value.checkOrganization || ruleForm.value.checkDate || ruleForm.value.certificateValid || ruleForm.value.meterIdentify) { @@ -409,11 +407,11 @@ isFrist.value = false }, 2000) } - const fetchDept = (pid: string) => { - getDeptTree({ pid }).then((res1) => { - deptList.value = res1.data.filter((item: any) => item.pids.split(',').length === 3).map((item: any) => ({ id: item.id, value: item.id, name: item.fullName })) - }) - } + // const fetchDept = (pid: string) => { + // getDeptTree({ pid }).then((res1) => { + // deptList.value = res1.data.filter((item: any) => item.pids.split(',').length === 3).map((item: any) => ({ id: item.id, value: item.id, name: item.fullName })) + // }) + // } if (statusName === '全部') { getInfoDetail({ equipmentId: $route.query.id as string }).then((res) => { ruleForm.value = res.data @@ -427,14 +425,16 @@ ruleForm.value.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 创建时间 } openSubmission() - fetchDept('0') + // fetchDept('0') + fetchDept() }) } else { getApprovalDetail({ id: $route.query.id as string }).then((res) => { ruleForm.value = res.data openSubmission() - fetchDept('0') + // fetchDept('0') + fetchDept() }) } }