|
|
@@ -26,14 +26,14 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="78px">
|
|
|
- <el-form-item label="管网编号" prop="pipeCode">
|
|
|
- <el-input v-model="queryParams.pipeCode" placeholder="请输入管网编号" clearable size="small" @keyup.enter="handleQuery" />
|
|
|
+ <el-form-item label="管网编号" prop="networkCode">
|
|
|
+ <el-input v-model="queryParams.networkCode" placeholder="请输入管网编号" clearable size="small" @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="管网名称" prop="pipeName">
|
|
|
- <el-input v-model="queryParams.pipeName" placeholder="请输入管网名称" clearable size="small" @keyup.enter="handleQuery" />
|
|
|
+ <el-form-item label="管网名称" prop="networkName">
|
|
|
+ <el-input v-model="queryParams.networkName" placeholder="请输入管网名称" clearable size="small" @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="管道材质" prop="pipeMaterial">
|
|
|
- <el-select v-model="queryParams.pipeMaterial" placeholder="请选择材质" clearable size="small" style="width: 120px">
|
|
|
+ <el-form-item label="管道材质" prop="material">
|
|
|
+ <el-select v-model="queryParams.material" placeholder="请选择材质" clearable size="small" style="width: 120px">
|
|
|
<el-option label="铸铁" value="铸铁" />
|
|
|
<el-option label="PE" value="PE" />
|
|
|
<el-option label="钢管" value="钢管" />
|
|
|
@@ -42,16 +42,16 @@
|
|
|
<el-option label="混凝土" value="混凝土" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="管径(mm)" prop="pipeDiameter">
|
|
|
- <el-input-number v-model="queryParams.pipeDiameter" :min="0" :precision="0" controls-position="right" size="small" />
|
|
|
+ <el-form-item label="管径(mm)" prop="diameter">
|
|
|
+ <el-input-number v-model="queryParams.diameter" :min="0" :precision="0" controls-position="right" size="small" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="铺设年份" prop="layingYear">
|
|
|
- <el-date-picker v-model="queryParams.layingYear" type="year" value-format="YYYY" placeholder="选择年份" size="small" />
|
|
|
+ <el-form-item label="建设年份" prop="buildYear">
|
|
|
+ <el-date-picker v-model="queryParams.buildYear" type="year" value-format="YYYY" placeholder="选择年份" size="small" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="状态" prop="status">
|
|
|
<el-select v-model="queryParams.status" placeholder="管网状态" clearable size="small" style="width: 120px">
|
|
|
<el-option
|
|
|
- v-for="dict in sysNormalDisable"
|
|
|
+ v-for="dict in statusDict"
|
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
|
:value="dict.value"
|
|
|
@@ -84,30 +84,34 @@
|
|
|
</template>
|
|
|
<el-table v-loading="loading" :data="tableData" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="管网编号" align="center" prop="pipeCode" :show-overflow-tooltip="true" min-width="120" />
|
|
|
- <el-table-column label="管网名称" align="center" prop="pipeName" :show-overflow-tooltip="true" min-width="140" />
|
|
|
- <el-table-column label="管道材质" align="center" prop="pipeMaterial" width="100">
|
|
|
+ <el-table-column label="管网编号" align="center" prop="networkCode" :show-overflow-tooltip="true" min-width="120" />
|
|
|
+ <el-table-column label="管网名称" align="center" prop="networkName" :show-overflow-tooltip="true" min-width="140" />
|
|
|
+ <el-table-column label="等级" align="center" width="90">
|
|
|
+ <template #default="{ row }">{{ dictLabel(levelDict, row.networkLevel) || '-' }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="管养单位" align="center" prop="managementUnit" :show-overflow-tooltip="true" min-width="120" />
|
|
|
+ <el-table-column label="管道材质" align="center" prop="material" width="100">
|
|
|
<template #default="{ row }">
|
|
|
- <el-tag :type="materialTagType(row.pipeMaterial)" size="small">{{ row.pipeMaterial || '-' }}</el-tag>
|
|
|
+ <el-tag :type="materialTagType(row.material)" size="small">{{ row.material || '-' }}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="管径(mm)" align="center" prop="pipeDiameter" width="100" />
|
|
|
- <el-table-column label="长度(m)" align="center" prop="pipeLength" width="100" />
|
|
|
- <el-table-column label="起点位置" align="center" prop="startPoint" :show-overflow-tooltip="true" min-width="140" />
|
|
|
- <el-table-column label="终点位置" align="center" prop="endPoint" :show-overflow-tooltip="true" min-width="140" />
|
|
|
- <el-table-column label="起点经度" align="center" prop="startLongitude" width="120" />
|
|
|
- <el-table-column label="起点纬度" align="center" prop="startLatitude" width="120" />
|
|
|
- <el-table-column label="终点经度" align="center" prop="endLongitude" width="120" />
|
|
|
- <el-table-column label="终点纬度" align="center" prop="endLatitude" width="120" />
|
|
|
- <el-table-column label="铺设年份" align="center" prop="layingYear" width="100" />
|
|
|
- <el-table-column label="设计压力(MPa)" align="center" prop="pressureRating" width="130" />
|
|
|
+ <el-table-column label="管径(mm)" align="center" prop="diameter" width="100" />
|
|
|
+ <el-table-column label="长度(m)" align="center" prop="length" width="100" />
|
|
|
+ <el-table-column label="位置描述" align="center" prop="location" :show-overflow-tooltip="true" min-width="140" />
|
|
|
+ <el-table-column label="起点经纬度" align="center" width="170">
|
|
|
+ <template #default="{ row }">{{ formatCoord(row.startLongitude, row.startLatitude) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="终点经纬度" align="center" width="170">
|
|
|
+ <template #default="{ row }">{{ formatCoord(row.endLongitude, row.endLatitude) }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="建设日期" align="center" prop="buildDate" width="110" />
|
|
|
<el-table-column label="状态" align="center" width="80">
|
|
|
<template #default="{ row }">
|
|
|
<el-tag
|
|
|
:type="String(row.status) === '0' ? 'success' : 'danger'"
|
|
|
size="small"
|
|
|
>
|
|
|
- {{ String(row.status) === '0' ? '正常' : '停用' }}
|
|
|
+ {{ dictLabel(statusDict, row.status) || '-' }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -132,18 +136,30 @@
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="108px">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="管网编号" prop="pipeCode">
|
|
|
- <el-input v-model="form.pipeCode" placeholder="请输入管网编号" maxlength="50" />
|
|
|
+ <el-form-item label="管网编号" prop="networkCode">
|
|
|
+ <el-input v-model="form.networkCode" placeholder="请输入管网编号" maxlength="50" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="管网名称" prop="networkName">
|
|
|
+ <el-input v-model="form.networkName" placeholder="请输入管网名称" maxlength="100" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="管网名称" prop="pipeName">
|
|
|
- <el-input v-model="form.pipeName" placeholder="请输入管网名称" maxlength="100" />
|
|
|
+ <el-form-item label="等级" prop="networkLevel">
|
|
|
+ <el-select v-model="form.networkLevel" placeholder="请选择管网等级" clearable style="width: 100%">
|
|
|
+ <el-option v-for="dict in levelDict" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="管养单位" prop="managementUnit">
|
|
|
+ <el-input v-model="form.managementUnit" placeholder="请输入管养单位" maxlength="100" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="管道材质" prop="pipeMaterial">
|
|
|
- <el-select v-model="form.pipeMaterial" placeholder="请选择管道材质" style="width: 100%">
|
|
|
+ <el-form-item label="管道材质" prop="material">
|
|
|
+ <el-select v-model="form.material" placeholder="请选择管道材质" style="width: 100%">
|
|
|
<el-option label="铸铁" value="铸铁" />
|
|
|
<el-option label="PE" value="PE" />
|
|
|
<el-option label="钢管" value="钢管" />
|
|
|
@@ -154,40 +170,30 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="管径(mm)" prop="pipeDiameter">
|
|
|
- <el-input-number v-model="form.pipeDiameter" :min="0" :precision="0" style="width: 100%" placeholder="请输入管径" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="管道长度(m)" prop="pipeLength">
|
|
|
- <el-input-number v-model="form.pipeLength" :min="0" :precision="2" style="width: 100%" placeholder="请输入管道长度" />
|
|
|
+ <el-form-item label="管径(mm)" prop="diameter">
|
|
|
+ <el-input-number v-model="form.diameter" :min="0" :precision="0" style="width: 100%" placeholder="请输入管径" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="铺设年份" prop="layingYear">
|
|
|
- <el-date-picker v-model="form.layingYear" type="year" placeholder="请选择铺设年份" value-format="YYYY" style="width: 100%" />
|
|
|
+ <el-form-item label="管道长度(m)" prop="length">
|
|
|
+ <el-input-number v-model="form.length" :min="0" :precision="2" style="width: 100%" placeholder="请输入管道长度" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="设计压力(MPa)" prop="pressureRating">
|
|
|
- <el-input-number v-model="form.pressureRating" :min="0" :precision="2" style="width: 100%" placeholder="请输入设计压力" />
|
|
|
+ <el-form-item label="建设日期" prop="buildDate">
|
|
|
+ <el-date-picker v-model="form.buildDate" type="date" placeholder="请选择建设日期" value-format="YYYY-MM-DD" style="width: 100%" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="运行状态" prop="status">
|
|
|
<el-radio-group v-model="form.status">
|
|
|
- <el-radio v-for="dict in sysNormalDisable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
|
|
|
+ <el-radio v-for="dict in statusDict" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="起点位置" prop="startPoint">
|
|
|
- <el-input v-model="form.startPoint" placeholder="请输入起点位置" maxlength="200" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="终点位置" prop="endPoint">
|
|
|
- <el-input v-model="form.endPoint" placeholder="请输入终点位置" maxlength="200" />
|
|
|
+ <el-form-item label="位置描述" prop="location">
|
|
|
+ <el-input v-model="form.location" placeholder="请输入位置描述" maxlength="200" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12"><el-form-item label="起点经度" prop="startLongitude"><el-input-number v-model="form.startLongitude" :precision="8" :step="0.00000001" controls-position="right" style="width: 100%" /></el-form-item></el-col>
|
|
|
@@ -210,20 +216,20 @@
|
|
|
<!-- 详情抽屉 -->
|
|
|
<el-drawer title="管网详情" v-model="detailVisible" class="detail-drawer" direction="rtl" size="600px" append-to-body>
|
|
|
<el-descriptions :column="2" border>
|
|
|
- <el-descriptions-item label="管网编号">{{ detailData.pipeCode }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="管网名称">{{ detailData.pipeName }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="管道材质">{{ detailData.pipeMaterial }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="管径(mm)">{{ detailData.pipeDiameter }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="管道长度(m)">{{ detailData.pipeLength }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="铺设年份">{{ detailData.layingYear }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="设计压力(MPa)">{{ detailData.pressureRating }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="管网编号">{{ detailData.networkCode }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="管网名称">{{ detailData.networkName }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="等级">{{ dictLabel(levelDict, detailData.networkLevel) || '-' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="管养单位">{{ detailData.managementUnit }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="管道材质">{{ detailData.material }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="管径(mm)">{{ detailData.diameter }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="管道长度(m)">{{ detailData.length }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="建设日期">{{ detailData.buildDate }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="运行状态">
|
|
|
- <el-tag :type="normalizePipeStatus(detailData.status) === '0' ? 'success' : 'danger'" size="small">
|
|
|
- {{ normalizePipeStatus(detailData.status) === '0' ? '正常' : '停用' }}
|
|
|
+ <el-tag :type="String(detailData.status) === '0' ? 'success' : 'danger'" size="small">
|
|
|
+ {{ dictLabel(statusDict, detailData.status) || '-' }}
|
|
|
</el-tag>
|
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="起点位置" :span="2">{{ detailData.startPoint }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="终点位置" :span="2">{{ detailData.endPoint }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="位置描述" :span="2">{{ detailData.location }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="起点经度">{{ detailData.startLongitude }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="起点纬度">{{ detailData.startLatitude }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="终点经度">{{ detailData.endLongitude }}</el-descriptions-item>
|
|
|
@@ -239,55 +245,15 @@
|
|
|
</template>
|
|
|
</el-drawer>
|
|
|
|
|
|
- <WaterFacilityImportDialog v-model="importVisible" title="管网信息" upload-url="/api/water/pipe/importData" template-url="/api/water/pipe/importTemplate" @imported="getList" />
|
|
|
-
|
|
|
- <!-- 回收站对话框 -->
|
|
|
- <el-dialog title="回收站" v-model:visible="recycleVisible" width="900px" append-to-body>
|
|
|
- <el-form :model="recycleQuery" ref="recycleForm" :inline="true" size="small">
|
|
|
- <el-form-item label="管网编号" prop="pipeCode">
|
|
|
- <el-input v-model="recycleQuery.pipeCode" placeholder="请输入编号" clearable />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="管网名称" prop="pipeName">
|
|
|
- <el-input v-model="recycleQuery.pipeName" placeholder="请输入名称" clearable />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" icon="Search" @click="getRecycleList">搜索</el-button>
|
|
|
- <el-button icon="Refresh" @click="resetRecycleQuery">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <el-table v-loading="recycleLoading" :data="recycleData" @selection-change="handleRecycleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="管网编号" align="center" prop="pipeCode" />
|
|
|
- <el-table-column label="管网名称" align="center" prop="pipeName" />
|
|
|
- <el-table-column label="管道材质" align="center" prop="pipeMaterial" width="100" />
|
|
|
- <el-table-column label="管径(mm)" align="center" prop="pipeDiameter" width="100" />
|
|
|
- <el-table-column label="长度(m)" align="center" prop="pipeLength" width="100" />
|
|
|
- <el-table-column label="状态" align="center" width="80">
|
|
|
- <template #default="{ row }">
|
|
|
- <dict-tag :options="sysNormalDisable" :value="row.status" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="删除时间" align="center" prop="updateTime" width="160" />
|
|
|
- <el-table-column label="操作" align="center" width="150">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-button size="small" type="text" icon="RefreshLeft" @click="handleRestore(row)">恢复</el-button>
|
|
|
- <el-button size="small" type="text" icon="Delete" @click="handleDeletePhysically(row)">
|
|
|
- <span style="color: #F56C6C">彻底删除</span>
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <pagination v-show="recycleTotal > 0" :total="recycleTotal" v-model:page="recycleQuery.pageNum" v-model:limit="recycleQuery.pageSize" @pagination="getRecycleList" />
|
|
|
- </el-dialog>
|
|
|
+ <WaterFacilityImportDialog v-model="importVisible" title="管网信息" upload-url="/PipeNetworkBase/importData" template-url="/PipeNetworkBase/importTemplate" @imported="getList" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listPipeInfo, getPipeInfo, addPipeInfo, updatePipeInfo, delPipeInfo, listRecyclePipeInfo, restorePipeInfo, deletePhysicallyPipeInfo } from '@/api/pipeNetwork/pipeInfo'
|
|
|
+import { listPipeInfo, getPipeInfo, addPipeInfo, updatePipeInfo, delPipeInfo, exportPipeInfo } from '@/api/pipeNetwork/pipeInfo'
|
|
|
import { getDicts } from '@/api/system/dict/data'
|
|
|
import { saveAs } from 'file-saver'
|
|
|
-import { exportWaterPipe } from '@/api/pipeNetwork/waterSupply'
|
|
|
-import { buildWaterFacilityQuery, getRequestErrorMessage, normalizePipeStatus } from '@/utils/waterFacilityQuery'
|
|
|
+import { buildWaterFacilityQuery, getRequestErrorMessage } from '@/utils/waterFacilityQuery'
|
|
|
import WaterFacilityImportDialog from '@/views/subSystem/waterSupply/components/WaterFacilityImportDialog.vue'
|
|
|
|
|
|
export default {
|
|
|
@@ -300,8 +266,6 @@ export default {
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
- // 非单个禁用
|
|
|
- single: true,
|
|
|
// 非多个禁用
|
|
|
multiple: true,
|
|
|
// 显示搜索条件
|
|
|
@@ -321,58 +285,46 @@ export default {
|
|
|
importVisible: false,
|
|
|
// 详情数据
|
|
|
detailData: {},
|
|
|
- // 回收站显示
|
|
|
- recycleVisible: false,
|
|
|
- // 回收站加载
|
|
|
- recycleLoading: false,
|
|
|
- // 回收站数据
|
|
|
- recycleData: [],
|
|
|
- // 回收站总条数
|
|
|
- recycleTotal: 0,
|
|
|
- // 回收站选中数组
|
|
|
- recycleIds: [],
|
|
|
errorMessage: '',
|
|
|
retryAction: null,
|
|
|
- // 系统状态字典
|
|
|
- sysNormalDisable: [
|
|
|
- { value: '0', label: '正常' },
|
|
|
- { value: '1', label: '停用' }
|
|
|
- ],
|
|
|
+ // 管网状态字典(pipe_network_status:0正常 1异常)
|
|
|
+ statusDict: [],
|
|
|
+ // 管网等级字典(pipe_network_level)
|
|
|
+ levelDict: [],
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- pipeCode: undefined,
|
|
|
- pipeName: undefined,
|
|
|
- pipeMaterial: undefined,
|
|
|
- pipeDiameter: undefined,
|
|
|
- layingYear: undefined,
|
|
|
+ networkCode: undefined,
|
|
|
+ networkName: undefined,
|
|
|
+ material: undefined,
|
|
|
+ diameter: undefined,
|
|
|
+ buildYear: undefined,
|
|
|
status: undefined
|
|
|
},
|
|
|
- // 回收站查询参数
|
|
|
- recycleQuery: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
- pipeCode: undefined,
|
|
|
- pipeName: undefined
|
|
|
- },
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
- pipeCode: [
|
|
|
+ networkCode: [
|
|
|
{ required: true, message: '管网编号不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
- pipeName: [
|
|
|
+ networkName: [
|
|
|
{ required: true, message: '管网名称不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
- pipeMaterial: [
|
|
|
+ material: [
|
|
|
{ required: true, message: '请选择管道材质', trigger: 'change' }
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ getDicts('pipe_network_status').then(response => {
|
|
|
+ this.statusDict = response.data
|
|
|
+ })
|
|
|
+ getDicts('pipe_network_level').then(response => {
|
|
|
+ this.levelDict = response.data
|
|
|
+ })
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -382,16 +334,14 @@ export default {
|
|
|
this.errorMessage = ''
|
|
|
this.retryAction = this.getList
|
|
|
listPipeInfo(buildWaterFacilityQuery(this.queryParams, this.dateRange)).then(response => {
|
|
|
- this.tableData = response.data.records
|
|
|
- this.total = response.data.total
|
|
|
+ this.tableData = response.records
|
|
|
+ this.total = response.total
|
|
|
this.loading = false
|
|
|
- console.log("入参线信息列表",this.queryParams)
|
|
|
}).catch(error => {
|
|
|
this.loading = false
|
|
|
this.errorMessage = getRequestErrorMessage(error, '管网信息查询失败,请稍后重试')
|
|
|
})
|
|
|
},
|
|
|
- normalizePipeStatus,
|
|
|
retryRequest() {
|
|
|
if (this.retryAction) this.retryAction()
|
|
|
},
|
|
|
@@ -400,6 +350,16 @@ export default {
|
|
|
const map = { '铸铁': '', 'PE': 'success', '钢管': 'warning', '球墨铸铁': 'info', 'PVC': 'danger', '混凝土': '' }
|
|
|
return map[material] || ''
|
|
|
},
|
|
|
+ /** 字典标签 */
|
|
|
+ dictLabel(options, value) {
|
|
|
+ const item = (options || []).find(d => String(d.value) === String(value))
|
|
|
+ return item ? item.label : ''
|
|
|
+ },
|
|
|
+ /** 经纬度展示 */
|
|
|
+ formatCoord(lon, lat) {
|
|
|
+ if (lon === null || lon === undefined || lat === null || lat === undefined) return '-'
|
|
|
+ return lon + ', ' + lat
|
|
|
+ },
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1
|
|
|
@@ -416,21 +376,16 @@ export default {
|
|
|
handleExport() {
|
|
|
this.errorMessage = ''
|
|
|
this.retryAction = this.handleExport
|
|
|
- exportWaterPipe(buildWaterFacilityQuery(this.queryParams, this.dateRange)).then(blob => {
|
|
|
+ exportPipeInfo(buildWaterFacilityQuery(this.queryParams, this.dateRange)).then(blob => {
|
|
|
saveAs(new Blob([blob]), `管网信息_${new Date().toISOString().slice(0, 10)}.xlsx`)
|
|
|
}).catch(error => {
|
|
|
this.errorMessage = getRequestErrorMessage(error, '管网信息导出失败,请稍后重试')
|
|
|
})
|
|
|
},
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length !== 1
|
|
|
+ this.ids = selection.map(item => item.networkId)
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
- /** 回收站多选框选中 */
|
|
|
- handleRecycleSelectionChange(selection) {
|
|
|
- this.recycleIds = selection.map(item => item.id)
|
|
|
- },
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
this.reset()
|
|
|
@@ -440,7 +395,7 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset()
|
|
|
- const id = row.id || this.ids
|
|
|
+ const id = row.networkId || this.ids
|
|
|
getPipeInfo(id).then(response => {
|
|
|
this.form = response.data
|
|
|
this.dialogTitle = '修改管网信息'
|
|
|
@@ -451,7 +406,7 @@ export default {
|
|
|
handleDetail(row) {
|
|
|
this.errorMessage = ''
|
|
|
this.retryAction = () => this.handleDetail(row)
|
|
|
- getPipeInfo(row.id).then(response => {
|
|
|
+ getPipeInfo(row.networkId).then(response => {
|
|
|
this.detailData = response.data
|
|
|
this.detailVisible = true
|
|
|
}).catch(error => {
|
|
|
@@ -462,7 +417,7 @@ export default {
|
|
|
submitForm() {
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if (valid) {
|
|
|
- if (this.form.id != undefined) {
|
|
|
+ if (this.form.networkId != undefined) {
|
|
|
updatePipeInfo(this.form).then(() => {
|
|
|
this.$modal.msgSuccess('修改成功')
|
|
|
this.dialogVisible = false
|
|
|
@@ -480,60 +435,19 @@ export default {
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const ids = row.id ? [row.id] : this.ids
|
|
|
- this.$modal.confirm('是否确认删除管网编号为"' + ids.join(',') + '"的数据项?').then(() => {
|
|
|
+ const ids = row.networkId ? [row.networkId] : this.ids
|
|
|
+ this.$modal.confirm('是否确认删除管网编号为"' + ids.join(',') + '"的数据项?删除后不可恢复。').then(() => {
|
|
|
return delPipeInfo(ids.join(','))
|
|
|
}).then(() => {
|
|
|
this.getList()
|
|
|
this.$modal.msgSuccess('删除成功')
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
- /** 打开回收站 */
|
|
|
- handleRecycle() {
|
|
|
- this.recycleVisible = true
|
|
|
- this.getRecycleList()
|
|
|
- },
|
|
|
- /** 查询回收站列表 */
|
|
|
- getRecycleList() {
|
|
|
- this.recycleLoading = true
|
|
|
- listRecyclePipeInfo(this.recycleQuery).then(response => {
|
|
|
- this.recycleData = response.data.records
|
|
|
- this.recycleTotal = response.data.total
|
|
|
- this.recycleLoading = false
|
|
|
- }).catch(() => {
|
|
|
- this.recycleLoading = false
|
|
|
- })
|
|
|
- },
|
|
|
- /** 回收站搜索重置 */
|
|
|
- resetRecycleQuery() {
|
|
|
- this.resetForm('recycleForm')
|
|
|
- this.getRecycleList()
|
|
|
- },
|
|
|
- /** 恢复数据 */
|
|
|
- handleRestore(row) {
|
|
|
- const ids = row.id || this.recycleIds
|
|
|
- this.$modal.confirm('是否确认恢复该数据?').then(() => {
|
|
|
- return restorePipeInfo(Array.isArray(ids) ? ids.join(',') : ids)
|
|
|
- }).then(() => {
|
|
|
- this.getRecycleList()
|
|
|
- this.getList()
|
|
|
- this.$modal.msgSuccess('恢复成功')
|
|
|
- }).catch(() => {})
|
|
|
- },
|
|
|
- /** 彻底删除 */
|
|
|
- handleDeletePhysically(row) {
|
|
|
- const ids = row.id || this.recycleIds
|
|
|
- this.$modal.confirm('彻底删除后数据不可恢复,是否继续?').then(() => {
|
|
|
- return deletePhysicallyPipeInfo(Array.isArray(ids) ? ids.join(',') : ids)
|
|
|
- }).then(() => {
|
|
|
- this.getRecycleList()
|
|
|
- this.$modal.msgSuccess('彻底删除成功')
|
|
|
- }).catch(() => {})
|
|
|
- },
|
|
|
/** 表单重置 */
|
|
|
reset() {
|
|
|
this.form = {
|
|
|
- status: '0'
|
|
|
+ status: '0',
|
|
|
+ networkType: '2'
|
|
|
}
|
|
|
this.resetForm('form')
|
|
|
}
|