LAPTOP-JI2IUVG1\26646 há 1 semana atrás
pai
commit
9138e49461

+ 74 - 30
src/views/subSystem/drainage/fxpg/zhfxtjfx.vue

@@ -33,7 +33,9 @@
     <div class="stat-cards">
       <el-card class="stat-card stat-blue" shadow="hover">
         <div class="stat-card-inner">
-          <div class="stat-icon"><el-icon :size="32"><DataLine /></el-icon></div>
+          <div class="stat-icon"><el-icon :size="32">
+              <DataLine />
+            </el-icon></div>
           <div class="stat-info">
             <div class="stat-value">{{ stats.total }}</div>
             <div class="stat-label">总管线数</div>
@@ -42,7 +44,9 @@
       </el-card>
       <el-card class="stat-card stat-red" shadow="hover">
         <div class="stat-card-inner">
-          <div class="stat-icon"><el-icon :size="32"><Warning /></el-icon></div>
+          <div class="stat-icon"><el-icon :size="32">
+              <Warning />
+            </el-icon></div>
           <div class="stat-info">
             <div class="stat-value">{{ stats.high }}</div>
             <div class="stat-label">高风险管线</div>
@@ -51,7 +55,9 @@
       </el-card>
       <el-card class="stat-card stat-orange" shadow="hover">
         <div class="stat-card-inner">
-          <div class="stat-icon"><el-icon :size="32"><WarningFilled /></el-icon></div>
+          <div class="stat-icon"><el-icon :size="32">
+              <WarningFilled />
+            </el-icon></div>
           <div class="stat-info">
             <div class="stat-value">{{ stats.medium }}</div>
             <div class="stat-label">中风险管线</div>
@@ -60,7 +66,9 @@
       </el-card>
       <el-card class="stat-card stat-green" shadow="hover">
         <div class="stat-card-inner">
-          <div class="stat-icon"><el-icon :size="32"><CircleCheck /></el-icon></div>
+          <div class="stat-icon"><el-icon :size="32">
+              <CircleCheck />
+            </el-icon></div>
           <div class="stat-info">
             <div class="stat-value">{{ stats.low }}</div>
             <div class="stat-label">低风险管线</div>
@@ -91,7 +99,8 @@
       </el-table-column>
       <el-table-column label="风险级别" prop="riskLevel" min-width="100" align="center">
         <template #default="{ row }">
-          <el-tag :color="riskLevelColor(row.riskLevel)" effect="dark" style="border:none">{{ riskLevelText(row.riskLevel) }}</el-tag>
+          <el-tag :color="riskLevelColor(row.riskLevel)" effect="dark" style="border:none">{{ riskLevelText(row.riskLevel)
+          }}</el-tag>
         </template>
       </el-table-column>
       <el-table-column label="评估时间" prop="assessTime" min-width="120" align="center" />
@@ -104,14 +113,8 @@
 
     <!-- 分页 -->
     <div class="pagination-wrap">
-      <el-pagination
-        v-model:current-page="page.current"
-        v-model:page-size="page.size"
-        :page-sizes="[10, 20, 50]"
-        :total="filteredList.length"
-        layout="total, sizes, prev, pager, next, jumper"
-        background
-      />
+      <el-pagination v-model:current-page="page.current" v-model:page-size="page.size" :page-sizes="[10, 20, 50]"
+        :total="filteredList.length" layout="total, sizes, prev, pager, next, jumper" background />
     </div>
 
     <!-- 详情弹窗 -->
@@ -144,7 +147,8 @@
           </el-tab-pane>
           <el-tab-pane label="评估详情" name="assess">
             <div style="margin-bottom:16px">
-              <el-tag :type="riskLevelColor(currentRow.riskLevel)" size="large">{{ riskLevelText(currentRow.riskLevel) }}</el-tag>
+              <el-tag :type="riskLevelColor(currentRow.riskLevel)" size="large">{{ riskLevelText(currentRow.riskLevel)
+              }}</el-tag>
               <span style="margin-left:12px;font-size:18px;font-weight:bold;">综合评分:{{ currentRow.riskScore }}</span>
             </div>
             <el-table :data="assessItems" border size="small">
@@ -154,7 +158,7 @@
               <el-table-column prop="level" label="等级" width="100" align="center" />
             </el-table>
           </el-tab-pane>
-          <el-tab-pane label="评估分析" name="analysis">
+          <!-- <el-tab-pane label="评估分析" name="analysis">
             <el-alert type="info" :closable="false" style="margin-bottom:12px">
               <template #title>
                 <strong>风险评估建议:</strong>
@@ -166,7 +170,7 @@
             <p><strong>评估时间:</strong>{{ currentRow.assessTime }}</p>
             <p><strong>评估人员:</strong>李工、王工</p>
             <p><strong>下次评估建议时间:</strong>2026-05-01</p>
-          </el-tab-pane>
+          </el-tab-pane> -->
         </el-tabs>
       </template>
       <template #footer>
@@ -334,10 +338,25 @@ const handleDetail = (row) => {
   flex-shrink: 0;
 }
 
-.stat-blue .stat-icon { background: rgba(64, 158, 255, 0.1); color: #409EFF; }
-.stat-red .stat-icon { background: rgba(245, 108, 108, 0.1); color: #F56C6C; }
-.stat-orange .stat-icon { background: rgba(230, 162, 60, 0.1); color: #E6A23C; }
-.stat-green .stat-icon { background: rgba(103, 194, 58, 0.1); color: #67C23A; }
+.stat-blue .stat-icon {
+  background: rgba(64, 158, 255, 0.1);
+  color: #409EFF;
+}
+
+.stat-red .stat-icon {
+  background: rgba(245, 108, 108, 0.1);
+  color: #F56C6C;
+}
+
+.stat-orange .stat-icon {
+  background: rgba(230, 162, 60, 0.1);
+  color: #E6A23C;
+}
+
+.stat-green .stat-icon {
+  background: rgba(103, 194, 58, 0.1);
+  color: #67C23A;
+}
 
 .stat-info {
   flex: 1;
@@ -350,10 +369,21 @@ const handleDetail = (row) => {
   line-height: 1.2;
 }
 
-.stat-blue .stat-value { color: #409EFF; }
-.stat-red .stat-value { color: #F56C6C; }
-.stat-orange .stat-value { color: #E6A23C; }
-.stat-green .stat-value { color: #67C23A; }
+.stat-blue .stat-value {
+  color: #409EFF;
+}
+
+.stat-red .stat-value {
+  color: #F56C6C;
+}
+
+.stat-orange .stat-value {
+  color: #E6A23C;
+}
+
+.stat-green .stat-value {
+  color: #67C23A;
+}
 
 .stat-label {
   font-size: 14px;
@@ -362,15 +392,29 @@ const handleDetail = (row) => {
 }
 
 /* 风险评分颜色 */
-.score-high { color: #F56C6C; font-weight: 700; }
-.score-medium { color: #E6A23C; font-weight: 700; }
-.score-low { color: #409EFF; font-weight: 700; }
-.score-veryLow { color: #67C23A; font-weight: 700; }
+.score-high {
+  color: #F56C6C;
+  font-weight: 700;
+}
+
+.score-medium {
+  color: #E6A23C;
+  font-weight: 700;
+}
+
+.score-low {
+  color: #409EFF;
+  font-weight: 700;
+}
+
+.score-veryLow {
+  color: #67C23A;
+  font-weight: 700;
+}
 
 /* 分页 */
 .pagination-wrap {
   display: flex;
   justify-content: flex-end;
   margin-top: 16px;
-}
-</style>
+}</style>

+ 18 - 19
src/views/subSystem/drainage/fxpg/zhfxxqfx.vue

@@ -15,16 +15,12 @@
       <div class="left-panel">
         <div class="panel-title">管线列表</div>
         <div class="pipe-list">
-          <div
-            v-for="item in filteredList"
-            :key="item.pipeNo"
-            class="pipe-item"
-            :class="{ active: currentPipe?.pipeNo === item.pipeNo }"
-            @click="selectPipe(item)"
-          >
+          <div v-for="item in filteredList" :key="item.pipeNo" class="pipe-item"
+            :class="{ active: currentPipe?.pipeNo === item.pipeNo }" @click="selectPipe(item)">
             <div class="pipe-item-no">{{ item.pipeNo }}</div>
             <div class="pipe-item-name">{{ item.pipeName }}</div>
-            <el-tag size="small" :color="riskLevelColor(item.riskLevel)" effect="dark" style="border:none">{{ riskLevelText(item.riskLevel) }}</el-tag>
+            <el-tag size="small" :color="riskLevelColor(item.riskLevel)" effect="dark" style="border:none">{{
+              riskLevelText(item.riskLevel) }}</el-tag>
           </div>
           <el-empty v-if="filteredList.length === 0" description="暂无数据" :image-size="60" />
         </div>
@@ -108,14 +104,15 @@
                 </el-table-column>
                 <el-table-column label="等级" prop="level" min-width="100" align="center">
                   <template #default="{ row }">
-                    <el-tag :color="indicatorLevelColor(row.level)" effect="dark" size="small" style="border:none">{{ row.level }}</el-tag>
+                    <el-tag :color="indicatorLevelColor(row.level)" effect="dark" size="small" style="border:none">{{
+                      row.level }}</el-tag>
                   </template>
                 </el-table-column>
               </el-table>
             </el-tab-pane>
 
             <!-- Tab 4: 评估分析 -->
-            <el-tab-pane label="评估分析" name="assessAnalysis">
+            <!-- <el-tab-pane label="评估分析" name="assessAnalysis">
               <el-row :gutter="20">
                 <el-col :span="12">
                   <el-card shadow="hover">
@@ -129,15 +126,16 @@
                     <div ref="lineChartRef" style="height: 350px;"></div>
                   </el-card>
                 </el-col>
-              </el-row>
+              </el-row> -->
 
-              <!-- 评估建议 -->
-              <el-card shadow="hover" style="margin-top: 20px;">
+            <!-- 评估建议 -->
+            <!-- <el-card shadow="hover" style="margin-top: 20px;">
                 <template #header><span style="font-weight:600">评估建议</span></template>
                 <div class="suggest-section">
                   <div class="suggest-row">
                     <span class="suggest-label">当前风险等级:</span>
-                    <el-tag :color="riskLevelColor(currentPipe.riskLevel)" effect="dark" style="border:none">{{ riskLevelText(currentPipe.riskLevel) }}</el-tag>
+                    <el-tag :color="riskLevelColor(currentPipe.riskLevel)" effect="dark" style="border:none">{{
+                      riskLevelText(currentPipe.riskLevel) }}</el-tag>
                   </div>
                   <div class="suggest-row">
                     <span class="suggest-label">风险说明:</span>
@@ -148,10 +146,10 @@
                     <span>{{ currentPipe.suggestion }}</span>
                   </div>
                 </div>
-              </el-card>
+              </el-card> -->
 
-              <!-- 历史评估记录 -->
-              <el-card shadow="hover" style="margin-top: 20px;">
+            <!-- 历史评估记录 -->
+            <!-- <el-card shadow="hover" style="margin-top: 20px;">
                 <template #header><span style="font-weight:600">历史评估记录</span></template>
                 <el-table :data="currentPipe.historyRecords" border style="width: 100%">
                   <el-table-column label="评估时间" prop="time" min-width="120" align="center" />
@@ -162,14 +160,15 @@
                   </el-table-column>
                   <el-table-column label="风险级别" prop="level" min-width="100" align="center">
                     <template #default="{ row }">
-                      <el-tag :color="riskLevelColor(row.riskLevel)" effect="dark" size="small" style="border:none">{{ riskLevelText(row.riskLevel) }}</el-tag>
+                      <el-tag :color="riskLevelColor(row.riskLevel)" effect="dark" size="small" style="border:none">{{
+                        riskLevelText(row.riskLevel) }}</el-tag>
                     </template>
                   </el-table-column>
                   <el-table-column label="评估机构" prop="org" min-width="160" />
                   <el-table-column label="备注" prop="remark" min-width="200" />
                 </el-table>
               </el-card>
-            </el-tab-pane>
+            </el-tab-pane> -->
           </el-tabs>
         </template>
         <el-empty v-else description="请选择左侧管线查看详情" :image-size="120" />

+ 1 - 1
src/views/subSystem/drainage/jcbj/dqbj.vue

@@ -187,7 +187,7 @@ const alarmList = ref([])
 
 async function loadData() {
   try {
-    const res = await getEquipmentPage(1, 200, { equipmentType: '排水' })
+    const res = await getEquipmentPage(1, 200, { equipmentTypeId: 'drainage' })
     const pageData = res.code !== undefined ? res.data : res
     const records = pageData.records || pageData.rows || []
     alarmList.value = records

+ 1 - 1
src/views/subSystem/drainage/jcsj/bzyxqk.vue

@@ -275,7 +275,7 @@ async function loadData() {
     // 并行请求泵站设施数据和设备数据
     const [facilityRes, equipmentRes] = await Promise.all([
       getFacilityPage(1, 1000, { facilityType: '泵站' }),
-      getEquipmentPage(1, 1000, { equipmentTypeId: 'drainage' })
+      getEquipmentPage(1, 1000, { equipmentType: 'drainage' })
     ])
 
     // 解析泵站设施数据

+ 1 - 1
src/views/subSystem/drainage/jcsj/gwyxqk.vue

@@ -263,7 +263,7 @@ function getCurrentStatusText(val) {
 async function loadMapData() {
   try {
     // 获取设备分页数据(排水类型)
-    const eqRes = await getEquipmentPage(1, 999, { equipmentTypeId: 'drainage' })
+    const eqRes = await getEquipmentPage(1, 999, { equipmentType: 'drainage' })
     const eqPage = eqRes.code !== undefined ? eqRes.data : eqRes
     const equipmentList = eqPage.records || []
 

+ 22 - 8
src/views/subSystem/drainage/jcsj/sbjcgl.vue

@@ -26,9 +26,9 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="设备名称" prop="equipmentName" min-width="140" />
       <el-table-column label="设备编号" prop="equipmentCode" min-width="130" />
-      <el-table-column label="设备类型" min-width="90">
-        <template #default>
-          <span>排水</span>
+      <el-table-column label="设备类型" prop="equipmentTypeName" min-width="90">
+        <template #default="{ row }">
+          <span>{{ row.equipmentTypeName || '-' }}</span>
         </template>
       </el-table-column>
       <el-table-column label="安装位置" prop="equipmentLocation" min-width="150" />
@@ -91,7 +91,7 @@
           <el-col :span="12">
             <div class="info-item">
               <span class="info-label">设备类型:</span>
-              <span class="info-value">排水</span>
+              <span class="info-value">{{ currentRow.equipmentTypeName || '-' }}</span>
             </div>
           </el-col>
           <el-col :span="12">
@@ -164,8 +164,10 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="设备类型">
-              <el-input value="排水" disabled />
+            <el-form-item label="设备类型" prop="equipmentTypeId">
+              <el-select v-model="editForm.equipmentTypeId" placeholder="请选择设备类型" style="width: 100%">
+                <el-option v-for="item in drainageTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
+              </el-select>
             </el-form-item>
           </el-col>
         </el-row>
@@ -317,6 +319,17 @@ const typeOptions = computed(() => {
   return typeList.value.map(item => ({ label: item.typeName, value: item.typeId }))
 })
 
+const drainageTypeOptions = computed(() => {
+  // 找到排水父类记录(typeId为'drainage'且parentTypeId为'0')
+  const drainageParent = typeList.value.find(item => item.typeId === 'drainage' && item.parentTypeId === '0')
+  if (!drainageParent) {
+    // 如果找不到父类,返回所有非顶级的类型
+    return typeList.value.filter(item => item.parentTypeId !== '0' && item.parentTypeId !== null).map(item => ({ label: item.typeName, value: item.id }))
+  }
+  // 返回parentTypeId等于drainage父类id的子类型
+  return typeList.value.filter(item => String(item.parentTypeId) === String(drainageParent.id)).map(item => ({ label: item.typeName, value: item.id }))
+})
+
 const statusOptions = [
   { label: '在用', value: 1 },
   { label: '闲置', value: 2 },
@@ -414,7 +427,7 @@ async function handleView(row) {
       ...row,
       ...detail.equipmentInfo,
       ...detail.statusInfo,
-      typeName: detail.typeInfo ? detail.typeInfo.typeName : ''
+      equipmentTypeName: detail.typeInfo ? detail.typeInfo.typeName : (row.equipmentTypeName || '-')
     }
     dialogVisible.value = true
   } catch (error) {
@@ -545,7 +558,8 @@ function handleEditSubmit() {
       equipmentSpec: editForm.value.equipmentSpec,
       manufacturer: editForm.value.manufacturer,
       productionDate: editForm.value.productionDate || null,
-      equipmentTypeId: 'drainage',
+      equipmentTypeId: editForm.value.equipmentTypeId,
+      equipmentType: 'drainage',
       assetValue: editForm.value.assetValue,
       useLife: editForm.value.useLife,
       longitude: editForm.value.longitude,

+ 5 - 5
src/views/subSystem/drainage/jcsj/sbyx.vue

@@ -77,9 +77,9 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="设备名称" prop="equipmentName" min-width="140" />
       <el-table-column label="设备编号" prop="equipmentCode" min-width="130" />
-      <el-table-column label="设备类型" min-width="100" align="center">
-        <template #default>
-          <span>排水</span>
+      <el-table-column label="设备类型" prop="equipmentTypeName" min-width="100" align="center">
+        <template #default="{ row }">
+          <span>{{ row.equipmentTypeName || '-' }}</span>
         </template>
       </el-table-column>
       <el-table-column label="安装位置" prop="equipmentLocation" min-width="160" />
@@ -142,7 +142,7 @@
           <el-col :span="12">
             <div class="info-item">
               <span class="info-label">设备类型:</span>
-              <span class="info-value">排水</span>
+              <span class="info-value">{{ currentRow.equipmentTypeName || '-' }}</span>
             </div>
           </el-col>
           <el-col :span="12">
@@ -407,7 +407,7 @@ const queryParams = ref({
   pageSize: 10
 })
 
-// ==================== 表格数据 ====================
+// ==================== 表格数据 ======================================
 const tableData = ref([])
 const total = ref(0)
 const loading = ref(false)

+ 3 - 1
src/views/subSystem/drainage/jcyj/dqyjgl.vue

@@ -290,7 +290,9 @@ const filters = ref({
 async function loadData() {
   loading.value = true
   try {
-    const params = {}
+    const params = {
+      equipmentType: 'drainage'
+    }
     if (filters.value.equipmentName) params.equipmentName = filters.value.equipmentName
     if (filters.value.warningLevel) params.warningLevel = filters.value.warningLevel
     if (filters.value.dateRange && filters.value.dateRange.length === 2) {

+ 3 - 1
src/views/subSystem/drainage/jcyj/lsyjgl.vue

@@ -177,7 +177,9 @@ const filters = reactive({
 async function loadData() {
   loading.value = true
   try {
-    const params = {}
+    const params = {
+      equipmentType: 'drainage'
+    }
     if (filters.equipmentName) params.equipmentName = filters.equipmentName
     if (filters.warningLevel) params.warningLevel = filters.warningLevel
     if (filters.status !== '' && filters.status !== null) params.status = filters.status