|
|
@@ -1,17 +1,18 @@
|
|
|
<template>
|
|
|
- <!-- 单位基本信息 -->
|
|
|
+ <!-- 受检单位基本信息 - 始终展开 -->
|
|
|
<div class="plan-section mb-4">
|
|
|
<div class="section-title">
|
|
|
<span>受检单位基本信息</span>
|
|
|
</div>
|
|
|
- <el-descriptions :column="3" border>
|
|
|
- <el-descriptions-item label="单位名称">{{ unitInfo.unitName }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="单位地址">{{ unitInfo.unitAddress }}</el-descriptions-item>
|
|
|
- <!-- <el-descriptions-item label="使用单位联系人">{{ unitInfo.contact }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="使用单位联系电话">{{ unitInfo.contactPhone }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="区域">{{ unitInfo.equipDistrictName }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="街道">{{ unitInfo.equipStreetName }}</el-descriptions-item> -->
|
|
|
- </el-descriptions>
|
|
|
+ <div class="mb-[5px]">
|
|
|
+ <el-button type="primary" @click="handleUnitCodeFn(unitInfo.id)">工商信息</el-button>
|
|
|
+ <el-descriptions :column="3" border class="flex-1 mt-[10px]">
|
|
|
+ <el-descriptions-item label="单位名称">{{ unitInfo.name || '-' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="登记状态">{{ unitInfo.regstateCn || '-' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="市场主体类型">{{ unitInfo.enterpriseType || '-' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="单位地址">{{ unitInfo.addr || '-' }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div class="plan-section mb-4">
|
|
|
@@ -450,6 +451,8 @@
|
|
|
<el-button @click="batchEditLocationVisible = false">取 消</el-button>
|
|
|
</template>
|
|
|
</Dialog>
|
|
|
+
|
|
|
+ <unitContainerForm ref="unitContainerFormRef" />
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts" name="PlanNewDetail">
|
|
|
@@ -481,6 +484,8 @@ import {
|
|
|
} from "@/api/pressure2/equipboilerscheduling";
|
|
|
import BoilerPlanScheduleDialog
|
|
|
from "@/views/pressure2/equipboilerscheduling/components/BoilerPlanScheduleDialog.vue";
|
|
|
+import unitContainerForm from '@/components/unitContainerForm/index.vue'
|
|
|
+import { getUnitInfo, UpdateUnitVO } from '@/api/laboratory/unit'
|
|
|
const router = useRouter()
|
|
|
|
|
|
const props = defineProps({
|
|
|
@@ -519,16 +524,9 @@ const batchEditLocationFormRules = reactive({
|
|
|
equipDistrict: [{ required: true, message: '请选择设备所在行政区', trigger: 'change' }],
|
|
|
equipStreet: [{ required: true, message: '请选择设备所在街道', trigger: 'change' }],
|
|
|
})
|
|
|
-// 单位基本信息
|
|
|
-const unitInfo = ref({
|
|
|
- unitId: '',
|
|
|
- unitName: '',
|
|
|
- unitAddress: '',
|
|
|
- contact: '',
|
|
|
- contactPhone: '',
|
|
|
- equipDistrictName: '',
|
|
|
- equipStreetName: ''
|
|
|
-})
|
|
|
+// 单位基本信息(通过API获取完整单位信息)
|
|
|
+const unitInfo = ref<UpdateUnitVO>({} as UpdateUnitVO)
|
|
|
+const unitContainerFormRef = ref<InstanceType<typeof unitContainerForm>>()
|
|
|
|
|
|
const equipTypeMap = {
|
|
|
1: '容器'
|
|
|
@@ -569,6 +567,15 @@ const containerTypeOptions = getStrDictOptions(DICT_TYPE.SYSTEM_EQUIP_BOILER_TYP
|
|
|
const currentEquip = ref<EquipBoilerSchedulingEquipVO>()
|
|
|
const currentCheckType = ref<scheduleType>('')
|
|
|
|
|
|
+const getUnitDetail = async (unitId: string) => {
|
|
|
+ try {
|
|
|
+ const res = await getUnitInfo({id: unitId})
|
|
|
+ unitInfo.value = res
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取单位详情失败:', error)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/** 打开弹窗 */
|
|
|
const open = async (row: PlanNewPageVO) => {
|
|
|
equipIds.value = [...new Set([row.equipIds, row.yearEquipIds, row.expiredEquipIds])]
|
|
|
@@ -576,16 +583,7 @@ const open = async (row: PlanNewPageVO) => {
|
|
|
.join(',')
|
|
|
.split(',')
|
|
|
|
|
|
- // 设置单位信息
|
|
|
- unitInfo.value = {
|
|
|
- unitId: row.unitId || '',
|
|
|
- unitName: row.unitName || '',
|
|
|
- unitAddress: row.unitAddress || '',
|
|
|
- contact: row.contact || '',
|
|
|
- contactPhone: row.contactPhone || '',
|
|
|
- equipDistrictName: row.equipDistrictName || '',
|
|
|
- equipStreetName: row.equipStreetName || ''
|
|
|
- }
|
|
|
+ row.unitId && await getUnitDetail(row.unitId)
|
|
|
|
|
|
// 初始化查询参数
|
|
|
queryParams.value = {
|
|
|
@@ -927,6 +925,14 @@ onMounted(() => {
|
|
|
defineExpose({
|
|
|
open
|
|
|
})
|
|
|
+
|
|
|
+// 工商信息
|
|
|
+const handleUnitCodeFn = (id) => {
|
|
|
+ if (!id) {
|
|
|
+ return ElMessage.warning('该单位信息异常!')
|
|
|
+ }
|
|
|
+ unitContainerFormRef.value?.open(id)
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|