|
@@ -54,6 +54,9 @@
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
|
<el-button type="danger" plain icon="Delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['waterSupply:pipeInfo:remove']">删除</el-button>
|
|
<el-button type="danger" plain icon="Delete" size="small" :disabled="multiple" @click="handleDelete" v-hasPermi="['waterSupply:pipeInfo:remove']">删除</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
|
+ <el-button type="success" plain icon="Download" size="small" @click="handleExport" v-hasPermi="['waterSupply:waterPipe:export']">导出</el-button>
|
|
|
|
|
+ </el-col>
|
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
@@ -76,10 +79,10 @@
|
|
|
<el-table-column label="状态" align="center" width="80">
|
|
<el-table-column label="状态" align="center" width="80">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<el-tag
|
|
<el-tag
|
|
|
- :type="row.status == 1 ? 'success' : 'danger'"
|
|
|
|
|
|
|
+ :type="String(row.status) === '0' ? 'success' : 'danger'"
|
|
|
size="small"
|
|
size="small"
|
|
|
>
|
|
>
|
|
|
- {{ row.status == 1 ? '正常' : '停用' }}
|
|
|
|
|
|
|
+ {{ String(row.status) === '0' ? '正常' : '停用' }}
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -244,6 +247,8 @@
|
|
|
<script>
|
|
<script>
|
|
|
import { listPipeInfo, getPipeInfo, addPipeInfo, updatePipeInfo, delPipeInfo, listRecyclePipeInfo, restorePipeInfo, deletePhysicallyPipeInfo } from '@/api/pipeNetwork/pipeInfo'
|
|
import { listPipeInfo, getPipeInfo, addPipeInfo, updatePipeInfo, delPipeInfo, listRecyclePipeInfo, restorePipeInfo, deletePhysicallyPipeInfo } from '@/api/pipeNetwork/pipeInfo'
|
|
|
import { getDicts } from '@/api/system/dict/data'
|
|
import { getDicts } from '@/api/system/dict/data'
|
|
|
|
|
+import { saveAs } from 'file-saver'
|
|
|
|
|
+import { exportWaterPipe } from '@/api/pipeNetwork/waterSupply'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'WaterPipeInfo',
|
|
name: 'WaterPipeInfo',
|
|
@@ -286,8 +291,8 @@ export default {
|
|
|
recycleIds: [],
|
|
recycleIds: [],
|
|
|
// 系统状态字典
|
|
// 系统状态字典
|
|
|
sysNormalDisable: [
|
|
sysNormalDisable: [
|
|
|
- { value: 1, label: '正常' },
|
|
|
|
|
- { value: 0, label: '停用' }
|
|
|
|
|
|
|
+ { value: '0', label: '正常' },
|
|
|
|
|
+ { value: '1', label: '停用' }
|
|
|
],
|
|
],
|
|
|
// 查询参数
|
|
// 查询参数
|
|
|
queryParams: {
|
|
queryParams: {
|
|
@@ -354,6 +359,12 @@ export default {
|
|
|
this.handleQuery()
|
|
this.handleQuery()
|
|
|
},
|
|
},
|
|
|
/** 多选框选中数据 */
|
|
/** 多选框选中数据 */
|
|
|
|
|
+ /** 导出当前筛选结果 */
|
|
|
|
|
+ handleExport() {
|
|
|
|
|
+ exportWaterPipe(this.addDateRange(this.queryParams, this.dateRange)).then(blob => {
|
|
|
|
|
+ saveAs(new Blob([blob]), `管网信息_${new Date().toISOString().slice(0, 10)}.xlsx`)
|
|
|
|
|
+ }).catch(() => {})
|
|
|
|
|
+ },
|
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
this.ids = selection.map(item => item.id)
|
|
|
this.single = selection.length !== 1
|
|
this.single = selection.length !== 1
|