|
@@ -1,723 +0,0 @@
|
|
|
-<template>
|
|
|
- <div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
- <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="district">
|
|
|
- <el-select v-model="queryParams.district" placeholder="请选择行政区" clearable style="width: 100%">
|
|
|
- <el-option
|
|
|
- v-for="dict in dict.type.district"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="核算行政区" prop="calculateDistrictId" label-width="100px">
|
|
|
- <el-select v-model="queryParams.calculateDistrictId" placeholder="请选择核算行政区" clearable style="width: 100%">
|
|
|
- <el-option
|
|
|
- v-for="dict in dict.type.district"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </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:area:add']"
|
|
|
- >新增
|
|
|
- </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:area: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:area:export']"
|
|
|
- >导出
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- plain
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- :loading="exportLoading"
|
|
|
- @click="handleExports"
|
|
|
- >所属包导出
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="info"
|
|
|
- plain
|
|
|
- icon="el-icon-upload2"
|
|
|
- size="mini"
|
|
|
- @click="handleImport"
|
|
|
- v-hasPermi="['system:user:import']"
|
|
|
- >导入
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <!--<el-col :span="1.5">-->
|
|
|
- <!--<el-button-->
|
|
|
- <!--type="info"-->
|
|
|
- <!--plain-->
|
|
|
- <!--icon="el-icon-upload2"-->
|
|
|
- <!--size="mini"-->
|
|
|
- <!--@click="examinehandleImport"-->
|
|
|
- <!--v-hasPermi="['system:user:import']"-->
|
|
|
- <!-->批量合格-->
|
|
|
- <!--</el-button>-->
|
|
|
- <!--</el-col>-->
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="info"
|
|
|
- plain
|
|
|
- icon="el-icon-upload2"
|
|
|
- size="mini"
|
|
|
- @click="handleUpload"
|
|
|
- v-hasPermi="['system:user:import']"
|
|
|
- >下载
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <el-table v-loading="loading" :data="areaList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center"/>
|
|
|
- <el-table-column label="小区名" align="center" prop="name"/>
|
|
|
- <el-table-column label="完成率" align="center" prop="rate"/>
|
|
|
- <el-table-column label="释放状态" align="center" prop="releaseIs">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.release_status" :value="scope.row.releaseIs"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="行政区" align="center" prop="calculateDistrictName">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.district" :value="scope.row.district"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="核算行政区" align="center" prop="calculateDistrictName">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.district" :value="scope.row.calculateDistrictId"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="小区规模" align="center" prop="areaSize"/>
|
|
|
-
|
|
|
- <el-table-column label="所属包" align="center" prop="affiliatedPackage">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.affiliated_package" :value="scope.row.affiliatedPackage"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <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-download"
|
|
|
- @click="handleExportHouse(scope.row)"
|
|
|
- v-hasPermi="['gas:area:edit']"
|
|
|
- >导出完工详情
|
|
|
- </el-button>
|
|
|
- <el-button v-if="scope.row.releaseIs ==='001'"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleRelease(scope.row)"
|
|
|
- v-hasPermi="['gas:area:edit']"
|
|
|
- >释放
|
|
|
- </el-button>
|
|
|
- <el-button v-if="scope.row.releaseIs ==='001'"
|
|
|
- type="text"
|
|
|
- plain
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- @click="handleUpload(scope.row)"
|
|
|
- v-hasPermi="['gas:area:edit']"
|
|
|
- >下载
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['gas:area:edit']"
|
|
|
- >编辑
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['gas:area: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="500px" append-to-body>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
- <el-form-item label="行政区" prop="district" >
|
|
|
- <el-select v-model="form.district" placeholder="请选择行政区">
|
|
|
- <el-option
|
|
|
- v-for="dict in dict.type.district"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="小区名" prop="name">
|
|
|
- <el-input v-model="form.name" placeholder="请输入小区名" :disabled="disabled"/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="负责工长" prop="userId">
|
|
|
- <el-select v-model="form.userId" filterable placeholder="请选择负责工长" style="width: 100%">
|
|
|
- <el-option v-for="item in foremanList" :key="item.id" :value="item.id" :label="item.name">{{
|
|
|
- item.name
|
|
|
- }}
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="核算行政区" prop="calculateDistrictId">
|
|
|
- <el-select v-model="form.calculateDistrictId" placeholder="请选择核算行政区" clearable style="width: 100%">
|
|
|
- <el-option
|
|
|
- v-for="dict in dict.type.district"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="小区规模" prop="areaSize">
|
|
|
- <el-input-number v-model="form.areaSize" style="width: 100%"></el-input-number>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所属包" prop="affiliatedPackage">
|
|
|
- <el-select v-model="form.affiliatedPackage" placeholder="请选择所属包" clearable style="width: 100%">
|
|
|
- <el-option
|
|
|
- v-for="dict in dict.type.affiliated_package"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </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>
|
|
|
- <!-- 用户导入对话框 -->
|
|
|
- <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
|
- <el-upload
|
|
|
- ref="upload"
|
|
|
- :limit="1"
|
|
|
- accept=".xlsx, .xls"
|
|
|
- :headers="upload.headers"
|
|
|
- :action="upload.url + '?updateSupport=' + upload.updateSupport"
|
|
|
- :disabled="upload.isUploading"
|
|
|
- :on-progress="handleFileUploadProgress"
|
|
|
- :on-success="handleFileSuccess"
|
|
|
- :auto-upload="false"
|
|
|
- drag
|
|
|
- >
|
|
|
- <i class="el-icon-upload"></i>
|
|
|
- <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
- <div class="el-upload__tip text-center" slot="tip">
|
|
|
- <!--<div class="el-upload__tip" slot="tip">-->
|
|
|
- <!--<el-checkbox v-model="upload.updateSupport"/>-->
|
|
|
- <!--是否更新已经存在的用户数据-->
|
|
|
- <!--</div>-->
|
|
|
- <span>仅允许导入xls、xlsx格式文件。</span>
|
|
|
- <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
|
|
|
- @click="importTemplate"
|
|
|
- >下载模板
|
|
|
- </el-link>
|
|
|
- </div>
|
|
|
- </el-upload>
|
|
|
- <div style="padding-top: 15px;line-height: 25px;font-size: 14px;">
|
|
|
- 完成度:{{ bfb }}%
|
|
|
- <progress max="100" :value="bfb" style="width: 200px;height: 18px;"></progress>
|
|
|
- <br>
|
|
|
- 导入结果:{{ jdtMsg }}
|
|
|
- </div>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
|
- <el-button @click="upload.open = false;bfb='0';jdtMsg=''">取 消</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!--<el-dialog :title="examineupload.examinetitle" :visible.sync="examineupload.examineopen" width="400px" append-to-body>-->
|
|
|
- <!--<el-upload-->
|
|
|
- <!--ref="examineupload"-->
|
|
|
- <!--:limit="1"-->
|
|
|
- <!--accept=".xlsx, .xls"-->
|
|
|
- <!--:headers="examineupload.examineheaders"-->
|
|
|
- <!--:action="examineupload.examineurl + '?updateSupport=' + examineupload.examineupdateSupport"-->
|
|
|
- <!--:disabled="examineupload.examineisUploading"-->
|
|
|
- <!--:on-progress="examineishandleFileUploadProgress"-->
|
|
|
- <!--:on-success="examineishandleFileSuccess"-->
|
|
|
- <!--:auto-upload="false"-->
|
|
|
- <!--drag-->
|
|
|
- <!-->-->
|
|
|
- <!--<i class="el-icon-upload"></i>-->
|
|
|
- <!--<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>-->
|
|
|
- <!--<div class="el-upload__tip text-center" slot="tip">-->
|
|
|
- <!--<div class="el-upload__tip" slot="tip">-->
|
|
|
- <!--<el-checkbox v-model="examineupload.examineupdateSupport"/>-->
|
|
|
- <!--是否更新已经存在的用户数据-->
|
|
|
- <!--</div>-->
|
|
|
- <!--<span>仅允许导入xls、xlsx格式文件。</span>-->
|
|
|
- <!--<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"-->
|
|
|
- <!--@click="importTemplate">下载模板-->
|
|
|
- <!--</el-link>-->
|
|
|
- <!--</div>-->
|
|
|
- <!--</el-upload>-->
|
|
|
- <!--<div slot="footer" class="dialog-footer">-->
|
|
|
- <!--<el-button type="primary" @click="examinesubmitFileForm">确 定</el-button>-->
|
|
|
- <!--<el-button @click="examineupload.examineopen = false">取 消</el-button>-->
|
|
|
- <!--</div>-->
|
|
|
- <!--</el-dialog>-->
|
|
|
-
|
|
|
-
|
|
|
- <!-- 导出对话框 -->
|
|
|
- <el-dialog title="所属包导出" :visible.sync="opens" width="500px" append-to-body>
|
|
|
- <el-form ref="form" :model="forms" :rules="ruless" label-width="100px">
|
|
|
- <el-form-item label="核算行政区" prop="calculateDistrictId">
|
|
|
- <el-select v-model="forms.calculateDistrictId" placeholder="请选择核算行政区" clearable style="width: 100%">
|
|
|
- <el-option
|
|
|
- v-for="dict in dict.type.district"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所属包" prop="affiliatedPackage">
|
|
|
- <el-select v-model="forms.affiliatedPackage" placeholder="请选择所属包" clearable style="width: 100%">
|
|
|
- <el-option
|
|
|
- v-for="dict in dict.type.affiliated_package"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="dowExports">确 定</el-button>
|
|
|
- <el-button @click="cancels">取 消</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import {
|
|
|
- listArea,
|
|
|
- releaseIs,
|
|
|
- getArea,
|
|
|
- delArea,
|
|
|
- addArea,
|
|
|
- updateArea,
|
|
|
- areaUpload,
|
|
|
- flushProgress,
|
|
|
- clearFlushProgress,
|
|
|
- getAreaList
|
|
|
-} from '@/api/gas/area'
|
|
|
-import { getToken } from '@/utils/auth'
|
|
|
-import { getForName } from '../../../api/gas/area'
|
|
|
-
|
|
|
-export default {
|
|
|
- name: 'Area',
|
|
|
- dicts: ['release_status', 'affiliated_package', 'district'],
|
|
|
- data() {
|
|
|
- // 工号唯一性验证
|
|
|
- let validateAnother = (rule, value, callback) => {
|
|
|
- if (value) {
|
|
|
- getForName(value, this.form.id).then(res => {
|
|
|
- if (res.data === false) {
|
|
|
- callback('该小区已存在')
|
|
|
- } else {
|
|
|
- callback()
|
|
|
- }
|
|
|
- }).catch(err => {
|
|
|
- callback(new Error(err.data.msg))
|
|
|
- })
|
|
|
- } else {
|
|
|
- callback()
|
|
|
- }
|
|
|
- }
|
|
|
- return {
|
|
|
- //进度条
|
|
|
- timeInterval: null,
|
|
|
- bfb: '0',
|
|
|
- jdtMsg: '',
|
|
|
- // 按钮loading
|
|
|
- buttonLoading: false,
|
|
|
- // 遮罩层
|
|
|
- loading: true,
|
|
|
- // 导出遮罩层
|
|
|
- exportLoading: false,
|
|
|
- // 选中数组
|
|
|
- ids: [],
|
|
|
- disabled: false,
|
|
|
- // 非单个禁用
|
|
|
- single: true,
|
|
|
- // 非多个禁用
|
|
|
- multiple: true,
|
|
|
- // 显示搜索条件
|
|
|
- showSearch: true,
|
|
|
- // 总条数
|
|
|
- total: 0,
|
|
|
- // 小区表格数据
|
|
|
- areaList: [],
|
|
|
- areaLists: [],
|
|
|
- // 弹出层标题
|
|
|
- title: '',
|
|
|
- // 是否显示弹出层
|
|
|
- open: false,
|
|
|
- opens: false,
|
|
|
- // 查询参数
|
|
|
- queryParams: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
- name: undefined,
|
|
|
- district: undefined,
|
|
|
- calculateDistrictId: undefined,
|
|
|
- userId: undefined
|
|
|
- },
|
|
|
- foremanList: [],
|
|
|
- // 表单参数
|
|
|
- form: {},
|
|
|
- forms: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10
|
|
|
- },
|
|
|
- // 用户导入参数
|
|
|
- upload: {
|
|
|
- // 是否显示弹出层(用户导入)
|
|
|
- open: false,
|
|
|
- // 弹出层标题(用户导入)
|
|
|
- title: '',
|
|
|
- // 是否禁用上传
|
|
|
- isUploading: false,
|
|
|
- // 是否更新已经存在的用户数据
|
|
|
- updateSupport: 0,
|
|
|
- // 设置上传的请求头部
|
|
|
- headers: { Authorization: 'Bearer ' + getToken() },
|
|
|
- // 上传的地址
|
|
|
- url: process.env.VUE_APP_BASE_API + '/gas/area/importData'
|
|
|
- },
|
|
|
- // examineupload: {
|
|
|
- // // 是否显示弹出层(用户导入)
|
|
|
- // examineopen: false,
|
|
|
- // // 弹出层标题(用户导入)
|
|
|
- // examinetitle: "",
|
|
|
- // // 是否禁用上传
|
|
|
- // examineisUploading: false,
|
|
|
- // // 是否更新已经存在的用户数据
|
|
|
- // examineupdateSupport: 0,
|
|
|
- // // 设置上传的请求头部
|
|
|
- // examineheaders: {Authorization: "Bearer " + getToken()},
|
|
|
- // // 上传的地址
|
|
|
- // examineurl: process.env.VUE_APP_BASE_API + "/gas/area/importApprovalExcel"
|
|
|
- // },
|
|
|
- // 表单校验
|
|
|
- rules: {
|
|
|
- name: [
|
|
|
- { required: true, message: '小区名不能为空', trigger: 'blur' },
|
|
|
- { required: true, trigger: 'blur', validator: validateAnother }
|
|
|
- ],
|
|
|
- calculateDistrictId: [{ required: true, message: '请选择核算行政区', trigger: 'change' }],
|
|
|
- areaSize: [{ required: true, message: '请输入小区规模', trigger: 'blur' }],
|
|
|
- affiliatedPackage: [{ required: true, message: '请选择所属包', trigger: 'change' }]
|
|
|
- },
|
|
|
- // 表单校验
|
|
|
- ruless: {
|
|
|
- calculateDistrictId: [{ required: true, message: '请选择核算行政区', trigger: 'change' }],
|
|
|
- affiliatedPackage: [{ required: true, message: '请选择所属包', trigger: 'change' }]
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.getList()
|
|
|
- this.getAreaList()
|
|
|
- },
|
|
|
- methods: {
|
|
|
- setCalculateDistrictName(data) {
|
|
|
- this.form.calculateDistrictName = this.areaLists.filter(item => item.id == data)[0].name
|
|
|
- console.log(this.form.calculateDistrictName)
|
|
|
- },
|
|
|
- /**小区下拉框*/
|
|
|
- getAreaList() {
|
|
|
- getAreaList().then(response => {
|
|
|
- this.areaLists = response.data
|
|
|
- })
|
|
|
- },
|
|
|
- /** 查询小区列表 */
|
|
|
- getList() {
|
|
|
- this.loading = true
|
|
|
- listArea(this.queryParams).then(response => {
|
|
|
- this.areaList = response.rows
|
|
|
- this.total = response.total
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
- },
|
|
|
- // 取消按钮
|
|
|
- cancel() {
|
|
|
- this.open = false
|
|
|
- this.reset()
|
|
|
- },
|
|
|
- // 取消按钮
|
|
|
- cancels() {
|
|
|
- this.opens = false
|
|
|
- this.forms = {}
|
|
|
- },
|
|
|
- // 表单重置
|
|
|
- reset() {
|
|
|
- this.form = {
|
|
|
- id: undefined,
|
|
|
- name: undefined,
|
|
|
- userId: undefined,
|
|
|
- delFlag: undefined,
|
|
|
- createBy: undefined,
|
|
|
- createTime: undefined,
|
|
|
- updateBy: undefined,
|
|
|
- updateTime: undefined,
|
|
|
- district: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 = '添加小区'
|
|
|
- this.disabled = false
|
|
|
- },
|
|
|
- /** 修改按钮操作 */
|
|
|
- handleUpdate(row) {
|
|
|
- this.loading = true
|
|
|
- this.reset()
|
|
|
- this.disabled = true
|
|
|
- const id = row.id || this.ids
|
|
|
- getArea(id).then(response => {
|
|
|
- this.loading = false
|
|
|
- this.form = response.data
|
|
|
- this.open = true
|
|
|
- this.title = '修改小区'
|
|
|
- })
|
|
|
- },
|
|
|
- /** 提交按钮 */
|
|
|
- submitForm() {
|
|
|
- this.$refs['form'].validate(valid => {
|
|
|
- if (valid) {
|
|
|
- this.buttonLoading = true
|
|
|
- if (this.form.id != null) {
|
|
|
- updateArea(this.form).then(response => {
|
|
|
- this.$modal.msgSuccess('修改成功')
|
|
|
- this.open = false
|
|
|
- this.getList()
|
|
|
- }).finally(() => {
|
|
|
- this.buttonLoading = false
|
|
|
- })
|
|
|
- } else {
|
|
|
- addArea(this.form).then(response => {
|
|
|
- if (response.data) {
|
|
|
- this.$modal.msgSuccess('新增成功')
|
|
|
- this.open = false
|
|
|
- this.getList()
|
|
|
- } else {
|
|
|
- this.$modal.msgError('小区名称不允许重复,请重新填写!')
|
|
|
- }
|
|
|
- }).finally(() => {
|
|
|
- this.buttonLoading = false
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- /** 删除按钮操作 */
|
|
|
- handleDelete(row) {
|
|
|
- const ids = row.id || this.ids
|
|
|
- this.$modal.confirm('是否确认删除小区编号为"' + ids + '"的数据项?').then(() => {
|
|
|
- this.loading = true
|
|
|
- return delArea(ids)
|
|
|
- }).then(() => {
|
|
|
- this.loading = false
|
|
|
- this.getList()
|
|
|
- this.$modal.msgSuccess('删除成功')
|
|
|
- }).finally(() => {
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
- },
|
|
|
- //释放
|
|
|
- handleRelease(row) {
|
|
|
- this.$modal.confirm('请确认照片是否下载!释放过程不可逆!是否释放?').then(() => {
|
|
|
- this.loading = true
|
|
|
- return releaseIs(row.id)
|
|
|
- }).then(() => {
|
|
|
- this.loading = false
|
|
|
- this.getList()
|
|
|
- this.getArea()
|
|
|
- this.$modal.msgSuccess('释放成功')
|
|
|
- }).finally(() => {
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
- },
|
|
|
- /** 导出按钮操作 */
|
|
|
- handleExport() {
|
|
|
- this.$download.excel('/gas/area/export', this.queryParams)
|
|
|
- },
|
|
|
- /** 导出按钮操作 */
|
|
|
- handleExports() {
|
|
|
- this.opens = true
|
|
|
- this.forms = {}
|
|
|
- },
|
|
|
- dowExports() {
|
|
|
- this.$download.excel('/gas/area/exports', this.forms)
|
|
|
- this.opens = false
|
|
|
- },
|
|
|
- /** 导出完工率按钮操作 */
|
|
|
- handleExportHouse(row) {
|
|
|
- this.$download.excel('/gas/area/getExportHouse?areaId=' + row.id)
|
|
|
- },
|
|
|
- /** 导入按钮操作 */
|
|
|
- handleImport() {
|
|
|
- this.upload.title = '用户导入'
|
|
|
- this.upload.open = true
|
|
|
- },
|
|
|
- handleUpload(row) {
|
|
|
- window.location.href = 'https://cczdsz.com/prod-api/gas/area/upload?id=' + row.id
|
|
|
- // window.open("http://sz.cxcloudsci.com/prod-api/gas/area/upload?id=" + row.id, '_blank')
|
|
|
- // window.open("http://localhost:8080/gas/area/upload?id=" + row.id, '_blank')
|
|
|
- // window.location.href="http://localhost:8080/gas/area/upload?id=" + row.id;
|
|
|
- },
|
|
|
- /** 下载模板操作 */
|
|
|
- importTemplate() {
|
|
|
- this.$download.excel('/gas/area/importTemplate')
|
|
|
- },
|
|
|
- // 文件上传中处理
|
|
|
- handleFileUploadProgress(event, file, fileList) {
|
|
|
- this.upload.isUploading = true
|
|
|
- },
|
|
|
- // 文件上传成功处理
|
|
|
- handleFileSuccess(response, file, fileList) {
|
|
|
- // this.upload.open = false;
|
|
|
- this.upload.isUploading = false
|
|
|
- this.$refs.upload.clearFiles()
|
|
|
- // this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
|
|
|
- // this.jdtMsg=response.msg;
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- // 提交上传文件
|
|
|
- submitFileForm() {
|
|
|
- const ther = this
|
|
|
- this.timeInterval = setInterval(function() {
|
|
|
- ther.flushProgress()
|
|
|
- }, 1500)
|
|
|
- this.$refs.upload.submit()
|
|
|
- },
|
|
|
- // 提交上传文件
|
|
|
- flushProgress() {
|
|
|
- flushProgress().then(response => {
|
|
|
- this.bfb = parseInt(response.data.bfb) >= 100 ? 100 : response.data.bfb
|
|
|
- this.jdtMsg = response.data.message
|
|
|
- if (response.data.message != null && response.data.message != '') {
|
|
|
- clearFlushProgress().then(response => {
|
|
|
- })
|
|
|
- clearInterval(this.timeInterval)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- // examinehandleImport() {
|
|
|
- // this.examineupload.examinetitle = "用户导入";
|
|
|
- // this.examineupload.examineopen = true;
|
|
|
- // },
|
|
|
- // // 文件上传中处理
|
|
|
- // examineishandleFileUploadProgress(event, file, fileList) {
|
|
|
- // this.examineupload.examineisUploading = true;
|
|
|
- // },
|
|
|
- // // 文件上传成功处理
|
|
|
- // examineishandleFileSuccess(response, file, fileList) {
|
|
|
- // this.examineupload.examineopen = false;
|
|
|
- // this.examineupload.examineisUploading = false;
|
|
|
- // this.$refs.examineupload.clearFiles();
|
|
|
- // this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
|
|
|
- // this.getList();
|
|
|
- // },
|
|
|
- // // 提交上传文件
|
|
|
- // examinesubmitFileForm() {
|
|
|
- // this.$refs.examineupload.submit();
|
|
|
- // }
|
|
|
- }
|
|
|
-}
|
|
|
-</script>
|