|
@@ -0,0 +1,580 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
+ <el-form-item label="性质" prop="nature">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.nature"
|
|
|
+ placeholder="请输入性质"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="类型" prop="type">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.type"
|
|
|
+ placeholder="请输入类型"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="路数" prop="numberOfRoutes">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.numberOfRoutes"
|
|
|
+ placeholder="请输入路数"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="管理所" prop="managementOffice">
|
|
|
+ <el-select v-model="queryParams.managementOffice" placeholder="请输入管理所" style="width: 100%"
|
|
|
+ @keyup.enter.native="handleQuery">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.administrative_office"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="编号" prop="number">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.number"
|
|
|
+ placeholder="请输入编号"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="名称" prop="name">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.name"
|
|
|
+ placeholder="请输入名称"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="经度" prop="longitude">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.longitude"
|
|
|
+ placeholder="请输入经度"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="纬度" prop="latitude">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.latitude"
|
|
|
+ placeholder="请输入纬度"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="handleAdd"
|
|
|
+ v-hasPermi="['gas:pressureRegulatingBox:add']"
|
|
|
+ >新增
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="single"
|
|
|
+ @click="handleUpdate"
|
|
|
+ v-hasPermi="['gas:pressureRegulatingBox:edit']"
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ plain
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleDelete"
|
|
|
+ v-hasPermi="['gas:pressureRegulatingBox:remove']"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ :loading="exportLoading"
|
|
|
+ @click="handleExport"
|
|
|
+ v-hasPermi="['gas:pressureRegulatingBox:export']"
|
|
|
+ >导出
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-table v-loading="loading" :data="pressureRegulatingBoxList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
+ <el-table-column label="序号" align="center" prop="id" v-if="true"/>
|
|
|
+ <el-table-column label="性质" align="center" prop="nature"/>
|
|
|
+ <el-table-column label="类型" align="center" prop="type"/>
|
|
|
+ <el-table-column label="路数" align="center" prop="numberOfRoutes"/>
|
|
|
+ <el-table-column label="管理所" align="center" prop="managementOffice">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.administrative_office" :value="scope.row.managementOffice"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="编号" align="center" prop="number"/>
|
|
|
+ <el-table-column label="名称" align="center" prop="name"/>
|
|
|
+ <el-table-column label="经度" align="center" prop="longitude"/>
|
|
|
+ <el-table-column label="纬度" align="center" prop="latitude"/>
|
|
|
+ <el-table-column label="备注" align="center" prop="remark"/>
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-hasPermi="['gas:pressureRegulatingBox:edit']"
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['gas:pressureRegulatingBox:remove']"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <pagination
|
|
|
+ v-show="total>0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+
|
|
|
+ <!-- 添加或修改调压箱管理对话框 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="性质" prop="nature">
|
|
|
+ <el-input v-model="form.nature" placeholder="请输入性质"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="类型" prop="type">
|
|
|
+ <el-input v-model="form.type" placeholder="请输入类型"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="路数" prop="numberOfRoutes">
|
|
|
+ <el-input v-model="form.numberOfRoutes" placeholder="请输入路数"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="管理所" prop="managementOffice">
|
|
|
+ <el-select v-model="form.managementOffice" placeholder="请输入管理所" style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.administrative_office"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="编号" prop="number">
|
|
|
+ <el-input v-model="form.number" placeholder="请输入编号"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="名称" prop="name">
|
|
|
+ <el-input v-model="form.name" placeholder="请输入名称"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="经度" prop="longitude">
|
|
|
+ <el-input v-model="form.longitude" placeholder="请输入经度"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="纬度" prop="latitude">
|
|
|
+ <el-input v-model="form.latitude" placeholder="请输入纬度"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
+ <el-input type="textarea" v-model="form.remark" placeholder="请输入备注"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="总户数" prop="remark">
|
|
|
+ <el-input-number v-model="pressureRegulatingBoxDetailsBo.totalNumberOfHousehold" :controls="false" style="width: 100%"></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="调压箱位置" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.positionOfPressureRegulatingBox" placeholder="请输入调压箱位置"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="控制范围" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.controlRange" placeholder="请输入控制范围"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="接收时间" prop="remark">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="pressureRegulatingBoxDetailsBo.receivingTime"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="选择接收时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="阀井位置" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.valveWellPosition" placeholder="请输入阀井位置"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="阀井钥匙形状" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.valveWellKeyShape" placeholder="请输入阀井钥匙形状"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="厂家" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.manufacturer" placeholder="请输入厂家"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="流量" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.flow" placeholder="请输入流量"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="进口管径" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.importPipeDiameter" placeholder="请输入进口管径"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="出口管径" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.outletPipeDiameter" placeholder="请输入出口管径"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="旁通管径" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.bypassPipeDiameter" placeholder="请输入旁通管径"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="调压器" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.voltageRegulator" placeholder="请输入调压器"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="设施规格型号" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.facilitySpecificationsAndModels" placeholder="请输入设施规格型号"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="入口压力" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.inletPressure" placeholder="请输入入口压力"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="出口压力" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.outletPressure" placeholder="请输入出口压力"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="切断压力" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.cutOffPressure" placeholder="请输入切断压力"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="放散压力" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.releasePressure" placeholder="请输入放散压力"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="出厂编号" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.factoryNumber" placeholder="请输入出厂编号"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="出厂日期" prop="remark">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="pressureRegulatingBoxDetailsBo.factoryDate"
|
|
|
+ type="date"
|
|
|
+ placeholder="选择出厂日期"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="主电源位置" prop="remark">
|
|
|
+ <el-input v-model="pressureRegulatingBoxDetailsBo.mainPowerSupplyPosition" placeholder="请输入主电源位置"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="16">-->
|
|
|
+ <!-- <el-form-item label="备注" prop="remark">-->
|
|
|
+ <!-- <el-input type="textarea" v-model="form.releasePressure" placeholder="请输入备注"/>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ listPressureRegulatingBox,
|
|
|
+ getPressureRegulatingBox,
|
|
|
+ delPressureRegulatingBox,
|
|
|
+ addPressureRegulatingBox,
|
|
|
+ updatePressureRegulatingBox
|
|
|
+} from "@/api/gas/pressureRegulatingBox";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "PressureRegulatingBox",
|
|
|
+ dicts: ['administrative_office'],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 按钮loading
|
|
|
+ buttonLoading: false,
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ // 导出遮罩层
|
|
|
+ exportLoading: false,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 调压箱管理表格数据
|
|
|
+ pressureRegulatingBoxList: [],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ nature: undefined,
|
|
|
+ type: undefined,
|
|
|
+ numberOfRoutes: undefined,
|
|
|
+ managementOffice: undefined,
|
|
|
+ number: undefined,
|
|
|
+ name: undefined,
|
|
|
+ longitude: undefined,
|
|
|
+ latitude: undefined,
|
|
|
+ },
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ pressureRegulatingBoxDetailsBo: {},
|
|
|
+ // 表单校验
|
|
|
+ rules: {
|
|
|
+ id: [
|
|
|
+ {required: true, message: "序号不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ managementOffice: [
|
|
|
+ {required: true, message: "管理所不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ number: [
|
|
|
+ {required: true, message: "编号不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ name: [
|
|
|
+ {required: true, message: "名称不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ longitude: [
|
|
|
+ {required: true, message: "经度不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ latitude: [
|
|
|
+ {required: true, message: "纬度不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /** 查询调压箱管理列表 */
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+ listPressureRegulatingBox(this.queryParams).then(response => {
|
|
|
+ this.pressureRegulatingBoxList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.pressureRegulatingBoxDetailsBo = {}
|
|
|
+ this.form = {
|
|
|
+ id: undefined,
|
|
|
+ nature: undefined,
|
|
|
+ type: undefined,
|
|
|
+ numberOfRoutes: undefined,
|
|
|
+ managementOffice: undefined,
|
|
|
+ number: undefined,
|
|
|
+ name: undefined,
|
|
|
+ longitude: undefined,
|
|
|
+ latitude: undefined,
|
|
|
+ remark: undefined,
|
|
|
+ delFlag: undefined,
|
|
|
+ createBy: undefined,
|
|
|
+ createTime: undefined,
|
|
|
+ updateBy: undefined,
|
|
|
+ pressureRegulatingBoxDetailsBo: undefined,
|
|
|
+ updateTime: undefined
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map(item => item.id)
|
|
|
+ this.single = selection.length !== 1
|
|
|
+ this.multiple = !selection.length
|
|
|
+ },
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd() {
|
|
|
+ this.reset();
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加调压箱管理";
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.loading = true;
|
|
|
+ this.reset();
|
|
|
+ const id = row.id || this.ids
|
|
|
+ getPressureRegulatingBox(id).then(response => {
|
|
|
+ this.loading = false;
|
|
|
+ this.form = response.data;
|
|
|
+ this.pressureRegulatingBoxDetailsBo = response.data.pressureRegulatingBoxDetailsVo[0];
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改调压箱管理";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.buttonLoading = true;
|
|
|
+ this.form.pressureRegulatingBoxDetailsBo = this.pressureRegulatingBoxDetailsBo
|
|
|
+ if (this.form.id != null) {
|
|
|
+ updatePressureRegulatingBox(this.form).then(response => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ }).finally(() => {
|
|
|
+ this.buttonLoading = false;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ addPressureRegulatingBox(this.form).then(response => {
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ }).finally(() => {
|
|
|
+ this.buttonLoading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ const ids = row.id || this.ids;
|
|
|
+ this.$modal.confirm('是否确认删除调压箱管理编号为"' + ids + '"的数据项?').then(() => {
|
|
|
+ this.loading = true;
|
|
|
+ return delPressureRegulatingBox(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.loading = false;
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ }).finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+ this.$download.excel('/gas/pressureRegulatingBox/export', this.queryParams);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|