| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <script setup>
- import InfrastructureCrudPage from '../components/InfrastructureCrudPage.vue'
- import {
- addFireHydrant,
- delFireHydrant,
- getFireHydrant,
- listFireHydrant,
- updateFireHydrant
- } from '@/api/pipeNetwork/facilities'
- const queryFields = [
- { prop: 'hydrantCode', label: '消火栓编号' },
- { prop: 'hydrantName', label: '消火栓名称' },
- { prop: 'hydrantType', label: '消火栓类型', type: 'dict', dictType: 'water_fire_hydrant_type' },
- { prop: 'status', label: '状态', type: 'dict', dictType: 'infrastructure_status' }
- ]
- const columns = [
- { prop: 'hydrantCode', label: '消火栓编号', width: 140 },
- { prop: 'hydrantName', label: '消火栓名称', width: 160 },
- { prop: 'hydrantType', label: '消火栓类型', width: 140, dictType: 'water_fire_hydrant_type' },
- { prop: 'model', label: '型号', width: 110 },
- { prop: 'inletPipeDiameter', label: '进水主管管径', width: 130 },
- { prop: 'outletSpec', label: '出水口规格', width: 110 },
- { prop: 'location', label: '地址', width: 180 },
- { prop: 'ownershipUnit', label: '产权单位', width: 150 },
- { prop: 'maintenanceUnit', label: '管护单位', width: 150 },
- { prop: 'principal', label: '责任人', width: 100 },
- { prop: 'contactPhone', label: '联系电话', width: 120 },
- { prop: 'status', label: '状态', width: 90, dictType: 'infrastructure_status' }
- ]
- const formFields = [
- { prop: 'hydrantCode', label: '消火栓编号', required: true },
- { prop: 'hydrantName', label: '消火栓名称', required: true },
- { prop: 'hydrantType', label: '消火栓类型', type: 'dict', dictType: 'water_fire_hydrant_type', required: true },
- { prop: 'status', label: '状态', type: 'dict', dictType: 'infrastructure_status' },
- { prop: 'model', label: '型号' },
- { prop: 'inletPipeDiameter', label: '进水主管管径' },
- { prop: 'outletSpec', label: '出水口规格' },
- { prop: 'ownershipUnit', label: '产权单位' },
- { prop: 'maintenanceUnit', label: '管护单位' },
- { prop: 'principal', label: '责任人' },
- { prop: 'contactPhone', label: '联系电话' },
- { prop: 'location', label: '地址', span: 24 },
- { prop: 'remark', label: '备注', type: 'textarea', span: 24 }
- ]
- const api = {
- page: listFireHydrant,
- detail: getFireHydrant,
- save: addFireHydrant,
- update: updateFireHydrant,
- remove: (ids) => delFireHydrant(ids)
- }
- </script>
- <template>
- <InfrastructureCrudPage
- title="消火栓信息"
- add-text="新增消火栓"
- id-field="hydrantId"
- :query-fields="queryFields"
- :columns="columns"
- :form-fields="formFields"
- :api="api"
- show-import
- show-export
- import-url="/api/infrastructure/fireHydrant/importData"
- template-url="/api/infrastructure/fireHydrant/importTemplate"
- export-url="/api/infrastructure/fireHydrant/export"
- export-file-name="消火栓信息"
- dict-hint="消火栓类型、状态请从模板下拉框中选择中文"
- />
- </template>
|