|
@@ -1,24 +1,42 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
- <el-form-item label="所属小区" prop="areaId">
|
|
|
- <el-select v-model="queryParams.areaId" filterable clearable placeholder="请选择所属小区" @change="getBuilding(queryParams.areaId),resetqueryform()">
|
|
|
- <el-option v-for="item in areaList" :key="item.id" :value="item.id" :label="item.name">{{ item.name }}</el-option>
|
|
|
+ <el-form-item label="所属小区" prop="areaId">
|
|
|
+ <el-select v-model="queryParams.areaId" filterable clearable placeholder="请选择所属小区"
|
|
|
+ @change="getBuilding(queryParams.areaId),resetqueryform()"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in areaList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
+ item.name
|
|
|
+ }}
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="所属楼宇" prop="buildingId">
|
|
|
- <el-select v-model="queryParams.buildingId" filterable clearable placeholder="请选择楼宇" @change="getUnit(queryParams.buildingId),resetqueryunitform()">
|
|
|
- <el-option v-for="item in buildingList" :key="item.id" :value="item.id" :label="item.name">{{ item.name }}</el-option>
|
|
|
+ <el-form-item label="所属楼宇" prop="buildingId">
|
|
|
+ <el-select v-model="queryParams.buildingId" filterable clearable placeholder="请选择楼宇"
|
|
|
+ @change="getUnit(queryParams.buildingId),resetqueryunitform()"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in buildingList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
+ item.name
|
|
|
+ }}
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="所属单元" prop="unitId">
|
|
|
- <el-select v-model="queryParams.unitId" filterable clearable placeholder="请选择单元" @change="getHouse(queryParams.unitId),resetqueryhouseform()">
|
|
|
- <el-option v-for="item in unitList" :key="item.id" :value="item.id" :label="item.name">{{ item.name }}</el-option>
|
|
|
+ <el-form-item label="所属单元" prop="unitId">
|
|
|
+ <el-select v-model="queryParams.unitId" filterable clearable placeholder="请选择单元"
|
|
|
+ @change="getHouse(queryParams.unitId),resetqueryhouseform()"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in unitList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
+ item.name
|
|
|
+ }}
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="房屋" prop="houseId">
|
|
|
- <el-select v-model="queryParams.houseId" filterable clearable placeholder="请选择房屋">
|
|
|
- <el-option v-for="item in houseList" :key="item.id" :value="item.id" :label="item.name">{{ item.name }}</el-option>
|
|
|
+ <el-form-item label="房屋" prop="houseId">
|
|
|
+ <el-select v-model="queryParams.houseId" filterable clearable placeholder="请选择房屋" @change="setHouseName(queryParams.houseId)" >
|
|
|
+ <el-option v-for="item in houseList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
+ item.name
|
|
|
+ }}
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="服务类别" prop="serviceType">
|
|
@@ -27,7 +45,8 @@
|
|
|
v-for="dict in dict.type.service_type"
|
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
|
- :value="dict.value"/>
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="职工" prop="userId">
|
|
@@ -63,7 +82,8 @@
|
|
|
v-model="queryParams.starTime"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期">
|
|
|
+ placeholder="选择日期"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="结束时间" prop="endTime">
|
|
@@ -71,7 +91,8 @@
|
|
|
v-model="queryParams.endTime"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期">
|
|
|
+ placeholder="选择日期"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="工号" prop="jobNum">
|
|
@@ -115,28 +136,29 @@
|
|
|
>删除
|
|
|
</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:order:export']"
|
|
|
- >导出</el-button>
|
|
|
- </el-col>
|
|
|
-<!-- <el-col :span="1.5">-->
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="warning"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- icon="el-icon-download"-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- :loading="exportLoading"-->
|
|
|
-<!-- @click="backup"-->
|
|
|
-<!-- v-hasPermi="['gas:order:export']"-->
|
|
|
-<!-- >备份</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:order:export']"
|
|
|
+ >导出
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="1.5">-->
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="warning"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- icon="el-icon-download"-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- :loading="exportLoading"-->
|
|
|
+ <!-- @click="backup"-->
|
|
|
+ <!-- v-hasPermi="['gas:order:export']"-->
|
|
|
+ <!-- >备份</el-button>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
@@ -169,7 +191,8 @@
|
|
|
v-if="scope.row.photoList.length> 0"
|
|
|
style="width: 100px; height: 100px"
|
|
|
:src="scope.row.photoList[0]"
|
|
|
- :preview-src-list="scope.row.photoList">
|
|
|
+ :preview-src-list="scope.row.photoList"
|
|
|
+ >
|
|
|
</el-image>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -177,11 +200,11 @@
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button v-show="scope.row.orderStatus ==='001'"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['gas:order:edit']"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-hasPermi="['gas:order:edit']"
|
|
|
>修改
|
|
|
</el-button>
|
|
|
<el-button v-show="scope.row.orderStatus ==='002'"
|
|
@@ -205,97 +228,124 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改工程管理对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
|
|
+ <el-row :gutter="15">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
+ <el-col :span="22">
|
|
|
+ <el-form-item label="服务类别" prop="serviceType">
|
|
|
+ <el-select v-model="form.serviceType" placeholder="请选择服务类别" clearable :style="{width: '100%'}">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.service_type"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="23">
|
|
|
+ <el-form-item label="照片" prop="photoList">
|
|
|
+ <imageUpload v-model="form.photoList"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item label="职工" prop="userId">
|
|
|
+ <el-select v-model="form.userId" filterable placeholder="请选择职工" clearable :style="{width: '100%'}">
|
|
|
+ <el-option v-for="item in workerList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
+ item.name
|
|
|
+ }}
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item label="所属小区" prop="areaId">
|
|
|
+ <el-select v-model="form.areaId" filterable placeholder="请选择小区" clearable :style="{width: '100%'}"
|
|
|
+ @change="getBuilding(form.areaId),resetform()"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in areaList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
+ item.name
|
|
|
+ }}
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item label="所属楼宇" prop="buildingId">
|
|
|
+ <el-select v-model="form.buildingId" filterable placeholder="请选择楼宇" clearable :style="{width: '100%'}"
|
|
|
+ @change="getUnit(form.buildingId),resetunitform()"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in buildingList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
+ item.name
|
|
|
+ }}
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item label="所属单元" prop="unitId">
|
|
|
+ <el-select v-model="form.unitId" filterable placeholder="请选择单元" clearable :style="{width: '100%'}"
|
|
|
+ @change="getHouse(form.unitId),resethouseform()"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in unitList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
+ item.name
|
|
|
+ }}
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item label="房屋" prop="houseId">
|
|
|
+ <el-select v-model="form.houseId" filterable placeholder="请选择房屋" clearable :style="{width: '100%'}">
|
|
|
+ <el-option v-for="item in houseList" :key="item.id" :value="item.id" :label="item.name">{{ item.name }}
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item label="管子类型" prop="pipeType">
|
|
|
+ <el-radio-group v-model="form.pipeType">
|
|
|
+ <el-radio
|
|
|
+ v-for="item in pipeTypeList"
|
|
|
+ :key="item.pipeType"
|
|
|
+ :label="item.pipeType"
|
|
|
+ >{{ item.pipeType }}
|
|
|
+ </el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item label="管子长度" prop="pipeLength" >
|
|
|
+ <el-radio-group v-model="form.pipeLength">
|
|
|
+ <el-radio
|
|
|
+ v-for="item in pipeLengthList"
|
|
|
+ :key="item.pipeLength"
|
|
|
+ :label="item.pipeLength"
|
|
|
+ >{{ item.pipeLength }}
|
|
|
+ </el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item label="自闭阀类型" prop="valveType">
|
|
|
+ <el-radio-group v-model="form.valveType">
|
|
|
+ <el-radio
|
|
|
+ v-for="item in valveTypeList"
|
|
|
+ :key="item.valveType"
|
|
|
+ :label="item.valveType"
|
|
|
+ >{{ item.valveType }}
|
|
|
+ </el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="22">
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
+ <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
|
|
|
- <el-form-item label="服务类别" prop="serviceType">
|
|
|
- <el-select v-model="form.serviceType" placeholder="请选择服务类别">
|
|
|
- <el-option
|
|
|
- v-for="dict in dict.type.service_type"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="照片" prop="photoList">
|
|
|
- <imageUpload v-model="form.photoList"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="职工" prop="userId">
|
|
|
- <el-select v-model="form.userId" filterable placeholder="请选择职工">
|
|
|
- <el-option v-for="item in workerList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
- item.name
|
|
|
- }}
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所属小区" prop="areaId">
|
|
|
- <el-select v-model="form.areaId" filterable placeholder="请选择小区"
|
|
|
- @change="getBuilding(form.areaId),resetform()">
|
|
|
- <el-option v-for="item in areaList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
- item.name
|
|
|
- }}
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所属楼宇" prop="buildingId">
|
|
|
- <el-select v-model="form.buildingId" filterable placeholder="请选择楼宇"
|
|
|
- @change="getUnit(form.buildingId),resetunitform()">
|
|
|
- <el-option v-for="item in buildingList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
- item.name
|
|
|
- }}
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所属单元" prop="unitId">
|
|
|
- <el-select v-model="form.unitId" filterable placeholder="请选择单元"
|
|
|
- @change="getHouse(form.unitId),resethouseform()">
|
|
|
- <el-option v-for="item in unitList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
- item.name
|
|
|
- }}
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="房屋" prop="houseId">
|
|
|
- <el-select v-model="form.houseId" filterable placeholder="请选择房屋">
|
|
|
- <el-option v-for="item in houseList" :key="item.id" :value="item.id" :label="item.name">{{item.name}}
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="管子类型" prop="pipeType">
|
|
|
- <el-radio-group v-model="form.pipeType">
|
|
|
- <el-radio
|
|
|
- v-for="item in pipeTypeList"
|
|
|
- :key="item.pipeType"
|
|
|
- :label="item.pipeType"
|
|
|
- >{{ item.pipeType }}
|
|
|
- </el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="管子长度" prop="pipeLength">
|
|
|
- <el-radio-group v-model="form.pipeLength">
|
|
|
- <el-radio
|
|
|
- v-for="item in pipeLengthList"
|
|
|
- :key="item.pipeLength"
|
|
|
- :label="item.pipeLength"
|
|
|
- >{{ item.pipeLength }}
|
|
|
- </el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="自闭阀类型" prop="valveType">
|
|
|
- <el-radio-group v-model="form.valveType">
|
|
|
- <el-radio
|
|
|
- v-for="item in valveTypeList"
|
|
|
- :key="item.valveType"
|
|
|
- :label="item.valveType"
|
|
|
- >{{ item.valveType }}
|
|
|
- </el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="备注" prop="remark">
|
|
|
- <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ </el-row>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
@@ -329,7 +379,8 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所属小区" prop="areaId">
|
|
|
<el-select disabled v-model="form.areaId" filterable placeholder="请选择小区"
|
|
|
- @change="getBuilding(form.areaId),resetform()">
|
|
|
+ @change="getBuilding(form.areaId),resetform()"
|
|
|
+ >
|
|
|
<el-option v-for="item in areaList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
item.name
|
|
|
}}
|
|
@@ -338,7 +389,8 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所属楼宇" prop="buildingId">
|
|
|
<el-select disabled v-model="form.buildingId" filterable placeholder="请选择楼宇"
|
|
|
- @change="getUnit(form.buildingId),resetunitform()">
|
|
|
+ @change="getUnit(form.buildingId),resetunitform()"
|
|
|
+ >
|
|
|
<el-option v-for="item in buildingList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
item.name
|
|
|
}}
|
|
@@ -347,7 +399,8 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所属单元" prop="unitId">
|
|
|
<el-select disabled v-model="form.unitId" filterable placeholder="请选择单元"
|
|
|
- @change="getHouse(form.unitId),resethouseform()">
|
|
|
+ @change="getHouse(form.unitId),resethouseform()"
|
|
|
+ >
|
|
|
<el-option v-for="item in unitList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
item.name
|
|
|
}}
|
|
@@ -396,11 +449,11 @@
|
|
|
<el-input disabled v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="审核意见" prop="reason">
|
|
|
- <el-input v-model="form.reason" type="textarea" placeholder="请输入内容"/>
|
|
|
+ <el-input v-model="form.reason" type="textarea" placeholder="请输入内容"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="submitY" >合格</el-button>
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="submitY">合格</el-button>
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="submitN">不合格</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
@@ -427,10 +480,11 @@ import {
|
|
|
submitY,
|
|
|
submitN,
|
|
|
updateOrder
|
|
|
-} from "@/api/gas/order";
|
|
|
+} from '@/api/gas/order'
|
|
|
|
|
|
export default {
|
|
|
- name: "Order",
|
|
|
+ name: 'Order',
|
|
|
+ inheritAttrs: false,
|
|
|
dicts: ['service_type', 'order_status', 'examine_status'],
|
|
|
data() {
|
|
|
return {
|
|
@@ -464,7 +518,7 @@ export default {
|
|
|
// 工程管理表格数据
|
|
|
orderList: [],
|
|
|
// 弹出层标题
|
|
|
- title: "",
|
|
|
+ title: '',
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
open1: false,
|
|
@@ -482,129 +536,135 @@ export default {
|
|
|
userId: undefined,
|
|
|
orderStatus: undefined,
|
|
|
examineStatus: undefined,
|
|
|
- jobNum: undefined,
|
|
|
+ jobNum: undefined
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
serviceType: [
|
|
|
- {required: true, message: "服务类别不能为空", trigger: "change"}
|
|
|
+ { required: true, message: '服务类别不能为空', trigger: 'change' }
|
|
|
],
|
|
|
photoList: [
|
|
|
- {required: true, message: "请上传照片", trigger: "change"}
|
|
|
+ { required: false, message: '请上传照片', trigger: 'change' }
|
|
|
],
|
|
|
userId: [
|
|
|
- {required: true, message: "职工不能为空", trigger: "blur"}
|
|
|
+ { required: true, message: '职工不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
houseId: [
|
|
|
- {required: true, message: "房屋不能为空", trigger: "change"}
|
|
|
+ { required: true, message: '房屋不能为空', trigger: 'change' }
|
|
|
|
|
|
- ],
|
|
|
+ ]
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList();
|
|
|
- this.getWorker();
|
|
|
- this.getArea();
|
|
|
- this.getPipeLength();
|
|
|
- this.getPipeType();
|
|
|
- this.getValveType();
|
|
|
+ this.getList()
|
|
|
+ this.getWorker()
|
|
|
+ this.getArea()
|
|
|
+ this.getPipeLength()
|
|
|
+ this.getPipeType()
|
|
|
+ this.getValveType()
|
|
|
},
|
|
|
methods: {
|
|
|
backup() {
|
|
|
backup().then(response => {
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
/** 查询工程管理列表 */
|
|
|
getList() {
|
|
|
- this.loading = true;
|
|
|
+ this.loading = true
|
|
|
listOrder(this.queryParams).then(response => {
|
|
|
- this.orderList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.orderList = response.rows
|
|
|
+ this.total = response.total
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
/**职工下拉框*/
|
|
|
getWorker() {
|
|
|
getWorker().then(response => {
|
|
|
- this.workerList = response.data;
|
|
|
- });
|
|
|
+ this.workerList = response.data
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
//管子长度
|
|
|
getPipeLength() {
|
|
|
getPipeLength().then(response => {
|
|
|
- this.pipeLengthList = response.data;
|
|
|
- });
|
|
|
+ this.pipeLengthList = response.data
|
|
|
+ })
|
|
|
},
|
|
|
//管子类别
|
|
|
getPipeType() {
|
|
|
getPipeType().then(response => {
|
|
|
- this.pipeTypeList = response.data;
|
|
|
- });
|
|
|
+ this.pipeTypeList = response.data
|
|
|
+ })
|
|
|
},
|
|
|
//自闭阀类别
|
|
|
getValveType() {
|
|
|
getValveType().then(response => {
|
|
|
- this.valveTypeList = response.data;
|
|
|
- });
|
|
|
+ this.valveTypeList = response.data
|
|
|
+ })
|
|
|
},
|
|
|
/**小区下拉框*/
|
|
|
getArea() {
|
|
|
getArea().then(response => {
|
|
|
- this.areaList = response.data;
|
|
|
- });
|
|
|
+ this.areaList = response.data
|
|
|
+ })
|
|
|
},
|
|
|
/**楼宇下拉框*/
|
|
|
getBuilding(areaId) {
|
|
|
+ this.form.areaName = this.areaList.filter(item => item.id == areaId )[0].name
|
|
|
getBuilding(areaId).then(response => {
|
|
|
- this.buildingList = response.data;
|
|
|
- });
|
|
|
+ this.buildingList = response.data
|
|
|
+ })
|
|
|
},
|
|
|
getUnit(buildingId) {
|
|
|
+ this.form.buildingName = this.buildingList.filter(item => item.id == buildingId )[0].name
|
|
|
getUnit(buildingId).then(response => {
|
|
|
- this.unitList = response.data;
|
|
|
- });
|
|
|
+ this.unitList = response.data
|
|
|
+ })
|
|
|
},
|
|
|
getHouse(unitId) {
|
|
|
+ this.form.unitName = this.unitList.filter(item => item.id == unitId )[0].name
|
|
|
getHouse(unitId).then(response => {
|
|
|
- this.houseList = response.data;
|
|
|
- });
|
|
|
+ this.houseList = response.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setHouseName(houseId) {
|
|
|
+ this.form.houseName = this.houseList.filter(item => item.id == houseId )[0].name
|
|
|
},
|
|
|
/**
|
|
|
* 联级清空
|
|
|
*/
|
|
|
resetform() {
|
|
|
- this.form.buildingId = undefined;
|
|
|
- this.form.unitId = undefined;
|
|
|
- this.form.houseId = undefined;
|
|
|
+ this.form.buildingId = undefined
|
|
|
+ this.form.unitId = undefined
|
|
|
+ this.form.houseId = undefined
|
|
|
},
|
|
|
resetunitform() {
|
|
|
- this.form.unitId = undefined;
|
|
|
- this.form.houseId = undefined;
|
|
|
+ this.form.unitId = undefined
|
|
|
+ this.form.houseId = undefined
|
|
|
},
|
|
|
resethouseform() {
|
|
|
- this.form.houseId = undefined;
|
|
|
+ this.form.houseId = undefined
|
|
|
},
|
|
|
- resetqueryform(){
|
|
|
- this.queryParams.buildingId = undefined;
|
|
|
- this.queryParams.unitId = undefined;
|
|
|
- this.queryParams.houseId = undefined;
|
|
|
+ resetqueryform() {
|
|
|
+ this.queryParams.buildingId = undefined
|
|
|
+ this.queryParams.unitId = undefined
|
|
|
+ this.queryParams.houseId = undefined
|
|
|
},
|
|
|
- resetqueryunitform(){
|
|
|
- this.queryParams.unitId = undefined;
|
|
|
- this.queryParams.houseId = undefined;
|
|
|
+ resetqueryunitform() {
|
|
|
+ this.queryParams.unitId = undefined
|
|
|
+ this.queryParams.houseId = undefined
|
|
|
},
|
|
|
- resetqueryhouseform(){
|
|
|
- this.queryParams.houseId = undefined;
|
|
|
+ resetqueryhouseform() {
|
|
|
+ this.queryParams.houseId = undefined
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
- this.open = false;
|
|
|
- this.open1 = false;
|
|
|
- this.reset();
|
|
|
+ this.open = false
|
|
|
+ this.open1 = false
|
|
|
+ this.reset()
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
@@ -626,19 +686,19 @@ export default {
|
|
|
updateBy: undefined,
|
|
|
updateTime: undefined,
|
|
|
reason: undefined
|
|
|
- };
|
|
|
- this.resetForm("form");
|
|
|
+ }
|
|
|
+ this.resetForm('form')
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
+ this.getList()
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
// this.resetForm("queryForm");
|
|
|
- this.$refs["queryForm"].resetFields();
|
|
|
- this.handleQuery();
|
|
|
+ this.$refs['queryForm'].resetFields()
|
|
|
+ this.handleQuery()
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
@@ -648,170 +708,170 @@ export default {
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
- this.reset();
|
|
|
- this.open = true;
|
|
|
- this.title = "添加工程管理";
|
|
|
- this.getWorker();
|
|
|
- this.getPipeLength();
|
|
|
- this.getPipeType();
|
|
|
- this.getValveType();
|
|
|
- this.getArea();
|
|
|
+ this.reset()
|
|
|
+ this.open = true
|
|
|
+ this.title = '添加工程管理'
|
|
|
+ this.getWorker()
|
|
|
+ this.getPipeLength()
|
|
|
+ this.getPipeType()
|
|
|
+ this.getValveType()
|
|
|
+ this.getArea()
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
- this.reset();
|
|
|
- this.getWorker();
|
|
|
- this.getPipeLength();
|
|
|
- this.getPipeType();
|
|
|
- this.getValveType();
|
|
|
- this.getArea();
|
|
|
+ this.reset()
|
|
|
+ this.getWorker()
|
|
|
+ this.getPipeLength()
|
|
|
+ this.getPipeType()
|
|
|
+ this.getValveType()
|
|
|
+ this.getArea()
|
|
|
const id = row.id || this.ids
|
|
|
getOrder(id).then(response => {
|
|
|
- this.loading = false;
|
|
|
- this.form = response.data;
|
|
|
- this.open = true;
|
|
|
- this.title = "修改工程管理";
|
|
|
- this.getBuilding(this.form.areaId);
|
|
|
- this.getUnit(this.form.buildingId);
|
|
|
- this.getHouse(this.form.unitId);
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ this.form = response.data
|
|
|
+ this.open = true
|
|
|
+ this.title = '修改工程管理'
|
|
|
+ this.getBuilding(this.form.areaId)
|
|
|
+ this.getUnit(this.form.buildingId)
|
|
|
+ this.getHouse(this.form.unitId)
|
|
|
+ })
|
|
|
},
|
|
|
/** 复审按钮操作 */
|
|
|
handleUpdate1(row) {
|
|
|
- this.loading = true;
|
|
|
- this.reset();
|
|
|
- this.getWorker();
|
|
|
- this.getPipeLength();
|
|
|
- this.getPipeType();
|
|
|
- this.getValveType();
|
|
|
- this.getArea();
|
|
|
+ this.loading = true
|
|
|
+ this.reset()
|
|
|
+ this.getWorker()
|
|
|
+ this.getPipeLength()
|
|
|
+ this.getPipeType()
|
|
|
+ this.getValveType()
|
|
|
+ this.getArea()
|
|
|
const id = row.id || this.ids
|
|
|
getOrder(id).then(response => {
|
|
|
- this.loading = false;
|
|
|
- this.form = response.data;
|
|
|
- this.open1 = true;
|
|
|
- this.title = "审核信息";
|
|
|
- this.getBuilding(this.form.areaId);
|
|
|
- this.getUnit(this.form.buildingId);
|
|
|
- this.getHouse(this.form.unitId);
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ this.form = response.data
|
|
|
+ this.open1 = true
|
|
|
+ this.title = '审核信息'
|
|
|
+ this.getBuilding(this.form.areaId)
|
|
|
+ this.getUnit(this.form.buildingId)
|
|
|
+ this.getHouse(this.form.unitId)
|
|
|
+ })
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
+ this.$refs['form'].validate(valid => {
|
|
|
if (valid) {
|
|
|
- this.buttonLoading = true;
|
|
|
+ this.buttonLoading = true
|
|
|
if (this.form.id != null) {
|
|
|
- if (typeof this.form.photoList==='string'){
|
|
|
+ if (typeof this.form.photoList === 'string') {
|
|
|
this.form.photoList = this.form.photoList.split(',')
|
|
|
}
|
|
|
updateOrder(this.form).then(response => {
|
|
|
- this.$modal.msgSuccess("修改成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- this.getWorker();
|
|
|
+ this.$modal.msgSuccess('修改成功')
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
+ this.getWorker()
|
|
|
}).finally(() => {
|
|
|
- this.buttonLoading = false;
|
|
|
- });
|
|
|
+ this.buttonLoading = false
|
|
|
+ })
|
|
|
} else {
|
|
|
- this.form.photoList = this.form.photoList.split(',')
|
|
|
+ // this.form.photoList = this.form.photoList.split(',')
|
|
|
addOrder(this.form).then(response => {
|
|
|
- this.$modal.msgSuccess("新增成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- this.getWorker();
|
|
|
+ this.$modal.msgSuccess('新增成功')
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
+ this.getWorker()
|
|
|
}).finally(() => {
|
|
|
- this.buttonLoading = false;
|
|
|
- });
|
|
|
+ this.buttonLoading = false
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const ids = row.id || this.ids;
|
|
|
+ const ids = row.id || this.ids
|
|
|
this.$modal.confirm('是否确认删除工程管理编号为"' + ids + '"的数据项?').then(() => {
|
|
|
- this.loading = true;
|
|
|
- return delOrder(ids);
|
|
|
+ this.loading = true
|
|
|
+ return delOrder(ids)
|
|
|
}).then(() => {
|
|
|
- this.loading = false;
|
|
|
- this.getList();
|
|
|
- this.getWorker();
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
+ this.loading = false
|
|
|
+ this.getList()
|
|
|
+ this.getWorker()
|
|
|
+ this.$modal.msgSuccess('删除成功')
|
|
|
}).finally(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- this.$download.excel('/gas/order/export', this.queryParams);
|
|
|
+ this.$download.excel('/gas/order/export', this.queryParams)
|
|
|
},
|
|
|
- submitY(row){
|
|
|
- if (this.form.id!=null){
|
|
|
- const ids = this.form.id;
|
|
|
- const versions = this.form.version;
|
|
|
- this.$modal.confirm("确定审核?").then(() => {
|
|
|
- this.loading = true;
|
|
|
- return submitY(ids,this.form.reason,versions);
|
|
|
+ submitY(row) {
|
|
|
+ if (this.form.id != null) {
|
|
|
+ const ids = this.form.id
|
|
|
+ const versions = this.form.version
|
|
|
+ this.$modal.confirm('确定审核?').then(() => {
|
|
|
+ this.loading = true
|
|
|
+ return submitY(ids, this.form.reason, versions)
|
|
|
}).then((res) => {
|
|
|
- this.open1 = false;
|
|
|
- this.loading = false;
|
|
|
- this.getList();
|
|
|
- this.getWorker();
|
|
|
- this.$modal.msgSuccess(res.msg);
|
|
|
+ this.open1 = false
|
|
|
+ this.loading = false
|
|
|
+ this.getList()
|
|
|
+ this.getWorker()
|
|
|
+ this.$modal.msgSuccess(res.msg)
|
|
|
}).finally(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- }else{
|
|
|
- const ids = row.id || this.ids;
|
|
|
- const versions = row.version || this.versions;
|
|
|
- this.$modal.confirm("确定审核?").then(() => {
|
|
|
- this.loading = true;
|
|
|
- return submitY(ids,this.form.reason,versions);
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const ids = row.id || this.ids
|
|
|
+ const versions = row.version || this.versions
|
|
|
+ this.$modal.confirm('确定审核?').then(() => {
|
|
|
+ this.loading = true
|
|
|
+ return submitY(ids, this.form.reason, versions)
|
|
|
}).then((res) => {
|
|
|
- this.loading = false;
|
|
|
- this.getList();
|
|
|
- this.getWorker();
|
|
|
- this.$modal.msgSuccess(res.msg);
|
|
|
+ this.loading = false
|
|
|
+ this.getList()
|
|
|
+ this.getWorker()
|
|
|
+ this.$modal.msgSuccess(res.msg)
|
|
|
}).finally(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- submitN(row){
|
|
|
- if (this.form.id!=null){
|
|
|
- const ids = this.form.id;
|
|
|
- const versions = this.form.version;
|
|
|
- this.$modal.confirm("确定审核?").then(() => {
|
|
|
- this.loading = true;
|
|
|
- return submitN(ids,this.form.reason,versions);
|
|
|
+ submitN(row) {
|
|
|
+ if (this.form.id != null) {
|
|
|
+ const ids = this.form.id
|
|
|
+ const versions = this.form.version
|
|
|
+ this.$modal.confirm('确定审核?').then(() => {
|
|
|
+ this.loading = true
|
|
|
+ return submitN(ids, this.form.reason, versions)
|
|
|
}).then((res) => {
|
|
|
- this.open1 = false;
|
|
|
- this.loading = false;
|
|
|
- this.getList();
|
|
|
- this.getWorker();
|
|
|
- this.$modal.msgSuccess(res.msg);
|
|
|
+ this.open1 = false
|
|
|
+ this.loading = false
|
|
|
+ this.getList()
|
|
|
+ this.getWorker()
|
|
|
+ this.$modal.msgSuccess(res.msg)
|
|
|
}).finally(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- }else{
|
|
|
- const ids = row.id || this.ids;
|
|
|
- const versions = row.version || this.versions;
|
|
|
- this.$modal.confirm("确定审核?").then(() => {
|
|
|
- this.loading = true;
|
|
|
- return submitN(ids,this.form.reason,versions);
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const ids = row.id || this.ids
|
|
|
+ const versions = row.version || this.versions
|
|
|
+ this.$modal.confirm('确定审核?').then(() => {
|
|
|
+ this.loading = true
|
|
|
+ return submitN(ids, this.form.reason, versions)
|
|
|
}).then((res) => {
|
|
|
- this.loading = false;
|
|
|
- this.getList();
|
|
|
- this.getWorker();
|
|
|
- this.$modal.msgSuccess(res.msg);
|
|
|
+ this.loading = false
|
|
|
+ this.getList()
|
|
|
+ this.getWorker()
|
|
|
+ this.$modal.msgSuccess(res.msg)
|
|
|
}).finally(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
- },
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
-};
|
|
|
+}
|
|
|
</script>
|