|
|
@ -2,40 +2,27 @@ |
|
|
|
<div class="div_main"> |
|
|
|
<div v-show="true"> |
|
|
|
<div class="div_search"> |
|
|
|
<el-form :inline="true" |
|
|
|
:model="searchData" |
|
|
|
ref="ref_searchform" |
|
|
|
:label-width="'80px'"> |
|
|
|
<el-form :inline="true" :model="searchData" ref="ref_searchform" :label-width="'80px'"> |
|
|
|
<div> |
|
|
|
<el-form-item label="物业名称" |
|
|
|
prop="serviceContent"> |
|
|
|
<el-input v-model="searchData.name" |
|
|
|
class="item_width_2" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
placeholder="请输入"> |
|
|
|
</el-input> |
|
|
|
<el-form-item label="物业名称" prop="name"> |
|
|
|
<el-input v-model="searchData.name" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物业联系人" prop="contactName"> |
|
|
|
<el-input v-model="searchData.contactName" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="联系电话" prop="contactMobile"> |
|
|
|
<el-input v-model="searchData.contactMobile" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-button style="margin-left: 30px" |
|
|
|
size="small" |
|
|
|
class="diy-button--search" |
|
|
|
@click="handleSearch">查询</el-button> |
|
|
|
<el-button style="margin-left: 10px" |
|
|
|
size="small" |
|
|
|
class="diy-button--reset" |
|
|
|
@click="resetSearch">重置</el-button> |
|
|
|
<el-button style="margin-left: 30px" size="small" class="diy-button--search" @click="handleSearch">查询</el-button> |
|
|
|
<el-button style="margin-left: 10px" size="small" class="diy-button--reset" @click="resetSearch">重置</el-button> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="div_table"> |
|
|
|
<div class="div_btn"> |
|
|
|
<el-button class="diy-button--add" |
|
|
|
size="small" |
|
|
|
@click="handleAdd">新增</el-button> |
|
|
|
<el-button class="diy-button--add" size="small" @click="handleAdd">新增</el-button> |
|
|
|
|
|
|
|
<!-- <el-button |
|
|
|
@click="handleExport" |
|
|
@ -45,72 +32,43 @@ |
|
|
|
> --> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-table :data="tableData" |
|
|
|
border |
|
|
|
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" |
|
|
|
class="table" |
|
|
|
style="width: 100%" |
|
|
|
:height="maxTableHeight"> |
|
|
|
<el-table-column label="序号" |
|
|
|
fixed="left" |
|
|
|
type="index" |
|
|
|
align="center" |
|
|
|
width="50" /> |
|
|
|
<el-table :data="tableData" border :header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" class="table" style="width: 100%" :height="maxTableHeight"> |
|
|
|
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" /> |
|
|
|
|
|
|
|
<el-table-column prop="name" |
|
|
|
align="center" |
|
|
|
label="物业名称" |
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="name" align="center" label="物业名称" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column prop="contactName" align="center" label="物业联系人" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column prop="contactMobile" align="center" label="联系电话" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column prop="totalNeighborHood" align="center" label="管理小区数量 " :show-overflow-tooltip="true"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="totalNeighborHood" |
|
|
|
align="center" |
|
|
|
label="管理小区数量 " |
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column fixed="right" |
|
|
|
label="操作" |
|
|
|
align="center" |
|
|
|
width="200"> |
|
|
|
<el-table-column fixed="right" label="操作" align="center" width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button @click="handleWatch(scope.row)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
class=".div-table-button--detail">查看</el-button> |
|
|
|
<el-button @click="handleEdit(scope.row)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
class="div-table-button--edit">编辑</el-button> |
|
|
|
<el-button @click="handleWatch(scope.row)" type="text" size="small" class=".div-table-button--detail">查看</el-button> |
|
|
|
<el-button @click="handleEdit(scope.row)" type="text" size="small" class="div-table-button--edit">编辑</el-button> |
|
|
|
|
|
|
|
<el-popconfirm title="删除之后无法回复,确认删除?" |
|
|
|
@onConfirm="handleDelete(scope.row, scope.$index)" |
|
|
|
@confirm="handleDelete(scope.row, scope.$index)"> |
|
|
|
<el-button slot="reference" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
style="margin-left: 10px" |
|
|
|
class="div-table-button--delete">删除</el-button> |
|
|
|
<el-popconfirm title="删除之后无法回复,确认删除?" @onConfirm="handleDelete(scope.row, scope.$index)" @confirm="handleDelete(scope.row, scope.$index)"> |
|
|
|
<el-button slot="reference" type="text" size="small" style="margin-left: 10px" class="div-table-button--delete">删除</el-button> |
|
|
|
</el-popconfirm> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<div> |
|
|
|
<el-pagination @size-change="handleSizeChange" |
|
|
|
<el-pagination |
|
|
|
@size-change="handleSizeChange" |
|
|
|
@current-change="handleCurrentChange" |
|
|
|
:current-page.sync="pageNo" |
|
|
|
:page-sizes="[20, 50, 100, 200]" |
|
|
|
:page-size="parseInt(pageSize)" |
|
|
|
layout="sizes, prev, pager, next, total" |
|
|
|
:total="total"> |
|
|
|
</el-pagination> |
|
|
|
:total="total" |
|
|
|
></el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 修改弹出框 --> |
|
|
|
<el-dialog v-if="formShow" |
|
|
|
<el-dialog |
|
|
|
v-if="formShow" |
|
|
|
:visible.sync="formShow" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false" |
|
|
@ -118,45 +76,41 @@ |
|
|
|
width="850px" |
|
|
|
top="5vh" |
|
|
|
class="dialog-h" |
|
|
|
@closed="handleClose"> |
|
|
|
<edit-form ref="eleEditForm" |
|
|
|
:formId="formId" |
|
|
|
:formType="formType" |
|
|
|
@close="handleClose" |
|
|
|
:villageList="villageList" |
|
|
|
@afterEdit="handleEditSuccess"></edit-form> |
|
|
|
@closed="handleClose" |
|
|
|
> |
|
|
|
<edit-form ref="eleEditForm" :formId="formId" :formType="formType" @close="handleClose" :villageList="villageList" @afterEdit="handleEditSuccess"></edit-form> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 详情弹出框 --> |
|
|
|
<el-dialog v-if="detailShow" |
|
|
|
<el-dialog |
|
|
|
v-if="detailShow" |
|
|
|
:visible.sync="detailShow" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false" |
|
|
|
|
|
|
|
:title="'详情'" |
|
|
|
width="850px" |
|
|
|
top="5vh" |
|
|
|
class="dialog-h" |
|
|
|
@closed="handleClose"> |
|
|
|
<detail-form ref="ref_form_detail" |
|
|
|
:formId="formId" |
|
|
|
:villageList="villageList" |
|
|
|
@diaDetailClose="handleClose"></detail-form> |
|
|
|
@closed="handleClose" |
|
|
|
> |
|
|
|
<detail-form ref="ref_form_detail" :formId="formId" :villageList="villageList" @diaDetailClose="handleClose"></detail-form> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
|
import nextTick from "dai-js/tools/nextTick"; |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
import axios from "axios"; |
|
|
|
import editForm from "./cpts/edit"; |
|
|
|
import detailForm from "./cpts/detail"; |
|
|
|
import { requestPost } from '@/js/dai/request'; |
|
|
|
import nextTick from 'dai-js/tools/nextTick'; |
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
import axios from 'axios'; |
|
|
|
import editForm from './cpts/edit'; |
|
|
|
import detailForm from './cpts/detail'; |
|
|
|
|
|
|
|
function iniSearchData() { |
|
|
|
return { |
|
|
|
name: "", |
|
|
|
name: '', |
|
|
|
contactName: '', |
|
|
|
contactMobile: '' |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
@ -171,24 +125,22 @@ |
|
|
|
categoryOptions: [], |
|
|
|
|
|
|
|
pageNo: 1, |
|
|
|
pageSize: window.localStorage.getItem("pageSize") || 20, |
|
|
|
pageSize: window.localStorage.getItem('pageSize') || 20, |
|
|
|
total: 1, |
|
|
|
|
|
|
|
formId: "", |
|
|
|
formId: '', |
|
|
|
formShow: false, |
|
|
|
formTitle: "服务项目", |
|
|
|
formType: "", // 列表list 新增add 修改edit 详情info |
|
|
|
formTitle: '服务项目', |
|
|
|
formType: '', // 列表list 新增add 修改edit 详情info |
|
|
|
|
|
|
|
detailShow: false, |
|
|
|
detailShow: false |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
maxTableHeight() { |
|
|
|
return this.$store.state.inIframe |
|
|
|
? this.clientHeight - 410 + this.iframeHeigh |
|
|
|
: this.clientHeight - 410; |
|
|
|
return this.$store.state.inIframe ? this.clientHeight - 410 + this.iframeHeigh : this.clientHeight - 410; |
|
|
|
}, |
|
|
|
...mapGetters(["clientHeight", "iframeHeight"]), |
|
|
|
...mapGetters(['clientHeight', 'iframeHeight']) |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
@ -204,66 +156,64 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
async handleExport() { |
|
|
|
const url = "/gov/project/icEvent/export"; |
|
|
|
const url = '/gov/project/icEvent/export'; |
|
|
|
const { pageSize, pageNo, searchData } = this; |
|
|
|
axios({ |
|
|
|
url: window.SITE_CONFIG["apiURL"] + url, |
|
|
|
method: "post", |
|
|
|
url: window.SITE_CONFIG['apiURL'] + url, |
|
|
|
method: 'post', |
|
|
|
data: { |
|
|
|
pageSize, |
|
|
|
pageNo, |
|
|
|
...searchData, |
|
|
|
...searchData |
|
|
|
}, |
|
|
|
responseType: "blob", |
|
|
|
responseType: 'blob' |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
let fileName = window.decodeURI( |
|
|
|
res.headers["content-disposition"].split(";")[1].split("=")[1] |
|
|
|
); |
|
|
|
console.log("filename", fileName); |
|
|
|
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" }); |
|
|
|
.then(res => { |
|
|
|
let fileName = window.decodeURI(res.headers['content-disposition'].split(';')[1].split('=')[1]); |
|
|
|
console.log('filename', fileName); |
|
|
|
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }); |
|
|
|
var url = window.URL.createObjectURL(blob); |
|
|
|
var aLink = document.createElement("a"); |
|
|
|
aLink.style.display = "none"; |
|
|
|
var aLink = document.createElement('a'); |
|
|
|
aLink.style.display = 'none'; |
|
|
|
aLink.href = url; |
|
|
|
aLink.setAttribute("download", fileName); |
|
|
|
aLink.setAttribute('download', fileName); |
|
|
|
document.body.appendChild(aLink); |
|
|
|
aLink.click(); |
|
|
|
document.body.removeChild(aLink); //下载完成移除元素 |
|
|
|
window.URL.revokeObjectURL(url); //释放掉blob对象 |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log("获取导出情失败", err); |
|
|
|
return this.$message.error("网络错误"); |
|
|
|
.catch(err => { |
|
|
|
console.log('获取导出情失败', err); |
|
|
|
return this.$message.error('网络错误'); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
handleAdd() { |
|
|
|
this.formType = "add"; |
|
|
|
this.formTitle = "新增"; |
|
|
|
this.formType = 'add'; |
|
|
|
this.formTitle = '新增'; |
|
|
|
this.formShow = true; |
|
|
|
}, |
|
|
|
|
|
|
|
handleWatch(row) { |
|
|
|
// this.formType = "watch"; |
|
|
|
this.villageList = row |
|
|
|
this.villageList = row; |
|
|
|
// this.formTitle = "查看"; |
|
|
|
// this.formShow = true; |
|
|
|
console.log(this.villageList); |
|
|
|
this.detailShow = true |
|
|
|
this.detailShow = true; |
|
|
|
}, |
|
|
|
|
|
|
|
handleEdit(row) { |
|
|
|
this.formType = "edit"; |
|
|
|
this.formType = 'edit'; |
|
|
|
this.formId = row.villageId; |
|
|
|
this.villageList = row |
|
|
|
this.formTitle = "编辑"; |
|
|
|
this.villageList = row; |
|
|
|
this.formTitle = '编辑'; |
|
|
|
this.formShow = true; |
|
|
|
}, |
|
|
|
|
|
|
|
handleClose() { |
|
|
|
this.formShow = false; |
|
|
|
this.detailShow = false |
|
|
|
this.detailShow = false; |
|
|
|
}, |
|
|
|
|
|
|
|
handleEditSuccess() { |
|
|
@ -273,35 +223,35 @@ |
|
|
|
|
|
|
|
async handleDelete(rowData, rowIndex) { |
|
|
|
console.log(rowData, rowIndex); |
|
|
|
const url = "/gov/org/propertymanagement/delete"; |
|
|
|
let params = {id : rowData.id} |
|
|
|
const url = '/gov/org/propertymanagement/delete'; |
|
|
|
let params = { id: rowData.id }; |
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
if (code === 0) { |
|
|
|
this.$message.success("删除成功!"); |
|
|
|
this.$message.success('删除成功!'); |
|
|
|
this.getTableData(); |
|
|
|
} else { |
|
|
|
if (code >= 8000) { |
|
|
|
this.$message.error(msg); |
|
|
|
} else { |
|
|
|
this.$message.error("操作失败!"); |
|
|
|
this.$message.error('操作失败!'); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async getTableData() { |
|
|
|
const url = "/gov/org/propertymanagement/page"; |
|
|
|
const url = '/gov/org/propertymanagement/page'; |
|
|
|
|
|
|
|
const { pageSize, pageNo, searchData } = this; |
|
|
|
const { data, code, msg } = await requestPost(url, { |
|
|
|
pageSize, |
|
|
|
pageNo, |
|
|
|
...searchData, |
|
|
|
...searchData |
|
|
|
}); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.total = data.total || 0; |
|
|
|
this.tableData = data.list |
|
|
|
? data.list.map((item) => { |
|
|
|
? data.list.map(item => { |
|
|
|
return item; |
|
|
|
}) |
|
|
|
: []; |
|
|
@ -312,7 +262,7 @@ |
|
|
|
|
|
|
|
handleSizeChange(val) { |
|
|
|
this.pageSize = val; |
|
|
|
window.localStorage.setItem("pageSize", val); |
|
|
|
window.localStorage.setItem('pageSize', val); |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
handleCurrentChange(val) { |
|
|
@ -323,14 +273,13 @@ |
|
|
|
resetSearch() { |
|
|
|
this.searchData = iniSearchData(); |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
@import "@/assets/scss/buttonstyle.scss"; |
|
|
|
@import "@/assets/scss/modules/management/list-main.scss"; |
|
|
|
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|
|
|
@import '@/assets/scss/buttonstyle.scss'; |
|
|
|
@import '@/assets/scss/modules/management/list-main.scss'; |
|
|
|
@import '@/assets/scss/modules/shequzhili/event-info.scss'; |
|
|
|
</style> |
|
|
|
|