7 changed files with 1655 additions and 336 deletions
@ -0,0 +1,412 @@ |
|||
<template> |
|||
<div class="div_main"> |
|||
<div class="div_search"> |
|||
<el-form |
|||
:inline="true" |
|||
:model="formData" |
|||
ref="ref_searchform" |
|||
:label-width="'100px'" |
|||
> |
|||
<div> |
|||
<el-form-item label="所属组织" prop="orgId" > |
|||
<el-cascader |
|||
class="item_width_2" |
|||
ref="myCascaderm" |
|||
filterable |
|||
size="small" |
|||
v-model="agencyIdArray" |
|||
:options="orgOptions" |
|||
:props="orgOptionProps" |
|||
:show-all-levels="false" |
|||
@change="handleChangeAgency" |
|||
></el-cascader> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="房主姓名" prop="ownerName"> |
|||
<el-input |
|||
class="item_width_2" |
|||
size="small" |
|||
v-model="formData.ownerName" |
|||
clearable |
|||
placeholder="请输入" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
|
|||
|
|||
<el-form-item label="联系方式" prop="ownerPhone"> |
|||
<el-input |
|||
class="item_width_2" |
|||
size="small" |
|||
v-model="formData.ownerPhone" |
|||
clearable |
|||
placeholder="请输入" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="房屋用途" prop="purpose"> |
|||
<el-select v-model="formData.purpose" |
|||
placeholder="请选择" |
|||
size="small" |
|||
class="item_width_2" |
|||
clearable |
|||
style="width: 240px" |
|||
:multiple="false"> |
|||
<el-option v-for="item in housePurposeOption" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="备注" prop="remark"> |
|||
<el-input |
|||
class="item_width_2" |
|||
size="small" |
|||
v-model="formData.remark" |
|||
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 |
|||
> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
|
|||
<div class="div_table"> |
|||
<el-table |
|||
border |
|||
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" |
|||
class="table" |
|||
:data="tableData" |
|||
style="width: 100%" |
|||
:height="maxTableHeight" |
|||
> |
|||
|
|||
<el-table-column |
|||
label="序号" |
|||
fixed="left" |
|||
type="index" |
|||
align="center" |
|||
width="50" |
|||
/> |
|||
<el-table-column |
|||
prop="gridName" |
|||
align="center" |
|||
min-width="190" |
|||
label="所属组织" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{scope.row.agencyName }}-{{ scope.row.gridName}}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="houseName" |
|||
align="center" |
|||
min-width="180" |
|||
label="房屋名称" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="houseType" |
|||
label="类型" |
|||
min-width="150" |
|||
align="center" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="purpose" |
|||
align="center" |
|||
min-width="150" |
|||
label="用途" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="rentFlag" |
|||
align="center" |
|||
width="150" |
|||
:show-overflow-tooltip="true" |
|||
label="房屋状态" |
|||
> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="ownerName" |
|||
align="center" |
|||
width="150" |
|||
:show-overflow-tooltip="true" |
|||
label="房主姓名" |
|||
> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="ownerPhone" |
|||
align="center" |
|||
width="150" |
|||
:show-overflow-tooltip="true" |
|||
label="联系方式" |
|||
> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="ownerIdCard" |
|||
align="center" |
|||
width="150" |
|||
:show-overflow-tooltip="true" |
|||
label="身份证" |
|||
> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="remark" |
|||
align="center" |
|||
width="150" |
|||
:show-overflow-tooltip="true" |
|||
label="备注" |
|||
> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<!-- <el-button v-if="scope.row.issueStatus==='voting'&& agencyId===scope.row.orgId" |
|||
@click="handleDispose(scope.row)" |
|||
type="text" size="small" |
|||
class="div-table-button--edit">处理</el-button> --> |
|||
|
|||
<el-button @click="handleWatch(scope.row)" type="text" size="small" |
|||
>查看</el-button |
|||
> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<div> |
|||
<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> |
|||
</div> |
|||
</div> |
|||
<el-dialog |
|||
title="房屋详情" |
|||
:visible.sync="showhtglDialog" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
width="950px" |
|||
v-if="showhtglDialog" |
|||
@close="detailFormCancle" |
|||
> |
|||
<qzf-info |
|||
ref="qzf_info" |
|||
@diaDetailClose="detailFormCancle" |
|||
> |
|||
</qzf-info> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from "vuex"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import qzfInfo from "./qzfInfo.vue" |
|||
import axios from "axios"; |
|||
|
|||
export default { |
|||
|
|||
data() { |
|||
let orgOptionProps = { |
|||
multiple: false, |
|||
value: 'agencyId', |
|||
label: 'agencyName', |
|||
children: 'subAgencyList', |
|||
checkStrictly: true |
|||
} |
|||
return { |
|||
orgOptions: [], |
|||
orgOptionProps, |
|||
housePurposeOption:[ |
|||
{ value: '1', label: '住宅' }, |
|||
{ value: '2', label: '商业' }, |
|||
{ value: '3', label: '办公' }, |
|||
{ value: '4', label: '工业' }, |
|||
{ value: '5', label: '仓储' }, |
|||
{ value: '6', label: '商住混用' }, |
|||
{ value: '7', label: '其他' } |
|||
], |
|||
formData: { |
|||
ownerName: '', |
|||
ownerPhone: '', |
|||
startDate: '', |
|||
endDate: '', |
|||
purpose:'', |
|||
remark:'', |
|||
orgId:'' |
|||
}, |
|||
showhtglDialog:false, |
|||
topicId:'', |
|||
tableData:[], |
|||
dialogVisible:false, |
|||
agencyIdArray: [], |
|||
pageNo: 1, |
|||
pageSize: window.localStorage.getItem("pageSize") || 20, |
|||
total: 1, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getTableData() |
|||
}, |
|||
mounted() { |
|||
this.getOrgTreeList(); |
|||
}, |
|||
methods: { |
|||
async getOrgTreeList() { |
|||
const url = "/gov/org/customeragency/agencygridtree"; |
|||
let params = { |
|||
agencyId: this.agencyId, |
|||
purpose: "query", |
|||
}; |
|||
|
|||
const { data, code, msg } = await requestPost(url, params); |
|||
|
|||
if (code === 0) { |
|||
this.orgOptions = []; |
|||
this.orgOptions.push(data); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
handleChangeAgency (val) { |
|||
let obj = this.$refs["myCascaderm"].getCheckedNodes()[0].data |
|||
console.log(obj); |
|||
if (obj) { |
|||
if (obj.level === 'grid') { |
|||
this.formData.orgId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|||
} else { |
|||
this.formData.orgId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|||
} |
|||
|
|||
} else { |
|||
this.formData.orgId = '' |
|||
} |
|||
}, |
|||
handleSizeChange (val) { |
|||
|
|||
this.pageSize = val; |
|||
window.localStorage.setItem("pageSize", val); |
|||
this.getTableData(); |
|||
}, |
|||
handleCurrentChange (val) { |
|||
this.pageNo = val; |
|||
this.getTableData(); |
|||
}, |
|||
handleSearch (val) { |
|||
this.pageNo = 1; |
|||
this.getTableData(); |
|||
console.log(this.agencyIdArray); |
|||
}, |
|||
|
|||
resetSearch () { |
|||
this.agencyIdArray = [] |
|||
this.formData = { |
|||
ownerName: '', |
|||
ownerPhone: '', |
|||
startDate: '', |
|||
endDate: '', |
|||
} |
|||
this.pageNo = 1 |
|||
}, |
|||
|
|||
async getTableData () { |
|||
const url = "/gov/org/house/group-rent-house-list"; |
|||
let { pageSize, pageNo, formData } = this; |
|||
// if(this.agencyIdArray.length ==1){ |
|||
// orgId = JSONparse(JSON.stringify(this.agencyIdArray[0])).join() |
|||
// }else if(this.agencyIdArray.length ==2){ |
|||
// orgId = JSONparse(JSON.stringify(this.agencyIdArray[1])).splice(1).join() |
|||
// }else if(this.agencyIdArray.length ==3){ |
|||
// orgId = JSONparse(JSON.stringify(this.agencyIdArray[0])).splice(2).join() |
|||
// }else if(this.agencyIdArray.length ==4){ |
|||
// orgId = JSONparse(JSON.stringify(this.agencyIdArray[0])).splice(3).join() |
|||
// }else{ |
|||
// this.agencyIdArray = [] |
|||
// } |
|||
console.log( this.agencyIdArray); |
|||
const { data, code, msg } = await requestPost(url, { |
|||
pageSize, |
|||
pageNo, |
|||
// orgId, |
|||
orgType: "agency", |
|||
...formData, |
|||
}); |
|||
if (code === 0) { |
|||
this.total = data.total || 0; |
|||
this.tableData = data.list |
|||
? data.list.map((item) => { |
|||
return item; |
|||
}) |
|||
: []; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
detailFormCancle () { |
|||
this.showhtglDialog = false |
|||
}, |
|||
async handleWatch (row) { |
|||
console.log(row,'see'); |
|||
this.showhtglDialog = true |
|||
this.$nextTick(() => { |
|||
this.$refs.qzf_info.initForm(row) |
|||
}) |
|||
|
|||
}, |
|||
}, |
|||
components: { |
|||
qzfInfo |
|||
}, |
|||
computed: { |
|||
maxTableHeight () { |
|||
return this.$store.state.inIframe |
|||
? this.clientHeight - 240 + this.iframeHeigh |
|||
: this.clientHeight - 240; |
|||
}, |
|||
...mapGetters(["clientHeight", "iframeHeight"]), |
|||
}, |
|||
watch: {}, |
|||
}; |
|||
</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"; |
|||
::v-deep .el-row{ |
|||
margin:20px 0px 10px; |
|||
font-size: 15px; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,360 @@ |
|||
<template> |
|||
<div> |
|||
<div class="dialog-h-content scroll-h"> |
|||
<div class="div_tuomin"> |
|||
<el-button |
|||
size="mini" |
|||
class="diy-button--search" |
|||
@click="handleTuomin">显示脱敏信息</el-button> |
|||
</div> |
|||
<div v-if="initLoading" |
|||
class="m-row"> |
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">所属楼栋:</span> |
|||
<span>{{ dataForm.neighborHoodName }}-{{dataForm.buildingName}}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">单元号:</span> |
|||
<span>{{ dataForm.unitName?dataForm.unitName:'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">门牌号:</span> |
|||
<span>{{ dataForm.doorName}}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房屋编码:</span> |
|||
<span>{{ dataForm.coding?dataForm.coding:'--'}}</span> |
|||
</div> |
|||
<div v-if="dataForm.houseQrcodeUrl" |
|||
style="display: flex;flex-direction: column;"> |
|||
<img style="margin-left: 70px;width: 200px;" |
|||
:src="dataForm.houseQrcodeUrl"> |
|||
<a style="margin-left: 80px" |
|||
:href="dataForm.houseQrcodeUrl" |
|||
target="_blank">下载</a> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房屋类型:</span> |
|||
<span>{{dataForm.houseTypeName?dataForm.houseTypeName:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房屋用途:</span> |
|||
<span>{{dataForm.purposeName?dataForm.purposeName:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房屋状态:</span> |
|||
<span>{{dataForm.rentName?dataForm.rentName:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房主姓名:</span> |
|||
<span>{{dataForm.ownerName?dataForm.ownerName:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">联系方式:</span> |
|||
<span>{{dataForm.showOwnerPhone?dataForm.showOwnerPhone:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">房主身份证:</span> |
|||
<span>{{dataForm.showOwnerIdCard?dataForm.showOwnerIdCard:'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">备注:</span> |
|||
<span>{{dataForm.remark?dataForm.remark:'--' }}</span> |
|||
</div> |
|||
<div class="leftPostion_box"> |
|||
<span class="">居住成员信息</span> |
|||
<span v-if="quanzufangResiList.length==0">--</span> |
|||
</div> |
|||
<section> |
|||
<el-row > |
|||
<el-col :span="3"> 姓名</el-col> |
|||
<el-col :span="7">联系方式</el-col> |
|||
<el-col :span="9">房主身份证</el-col> |
|||
</el-row> |
|||
<el-row type="flex" v-for="(item,index) in quanzufangResiList" :key="index"> |
|||
<el-col :span="3"> {{item.name}}</el-col> |
|||
<el-col :span="7"> {{item.mobile?item.mobile:"--"}}</el-col> |
|||
<el-col :span="9"> {{item.idCard?item.idCard:"--"}}</el-col> |
|||
</el-row> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
<div class="div-btn"> |
|||
<el-button size="small" |
|||
@click="handleCancle">关 闭</el-button> |
|||
|
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from 'vuex' |
|||
import { Loading } from 'element-ui' // 引入Loading服务 |
|||
import { requestPost, requestGet } from '@/js/dai/request' |
|||
|
|||
|
|||
let loading // 加载动画 |
|||
export default { |
|||
data () { |
|||
return { |
|||
formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 |
|||
btnDisable: false, |
|||
initLoading: false, |
|||
unitList: [], |
|||
|
|||
houseId: '', //房屋ID |
|||
houseType: '1', |
|||
purpose: '1', |
|||
rentFlag: 0, |
|||
dataForm: { |
|||
neighborHoodId: '', // 所属小区ID |
|||
buildingId: '',//所属楼栋ID |
|||
buildingUnitId: '',//所属单元ID |
|||
doorName: '',//门牌号 |
|||
houseType: '',//房屋类型【楼房,平房,别墅】 |
|||
purpose: '',//房屋用途【住宅,商业,办公,工业,仓储,商住混用,其他】 |
|||
rentFlag: 0,//房屋状态【是:1,否:0】 出租1、闲置2、自住 0 |
|||
ownerPhone: '', //联系方式 |
|||
ownerName: '', //房主名字 |
|||
ownerIdCard: '', //房主身份证 |
|||
remark: '', |
|||
quanzufangResiList:[],//群租房人员 |
|||
// realPerson: 0, |
|||
coding: '', |
|||
sysCoding: '' |
|||
}, |
|||
|
|||
keyWords: '', |
|||
agencyObj: {}, |
|||
|
|||
} |
|||
}, |
|||
components: {}, |
|||
mounted () { |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
handleCancle () { |
|||
// this.diaDestroy() |
|||
this.$emit('diaDetailClose') |
|||
|
|||
}, |
|||
diaDestroy () { |
|||
|
|||
}, |
|||
async initForm (row, agencyObj) { |
|||
// this.dataForm = JSON.parse(JSON.stringify(row)) |
|||
this.agencyObj = agencyObj |
|||
this.houseId = row.houseId |
|||
await this.loadHouseInfo() |
|||
await this.loadQunzufangInfo() |
|||
this.initLoading = true |
|||
|
|||
|
|||
// this.$refs.ref_form.resetFields(); |
|||
// this.agencyObj = agencyObj |
|||
// this.formType = type |
|||
// console.log('agencyObj-----', agencyObj) |
|||
// if (row) { |
|||
|
|||
// this.houseId = row.houseId |
|||
// await this.loadHouseInfo() |
|||
|
|||
|
|||
// } else { |
|||
|
|||
// this.dataForm.neighborHoodId = this.agencyObj.neighborHoodId |
|||
// this.dataForm.buildingId = this.agencyObj.id |
|||
// } |
|||
|
|||
|
|||
// await this.loadUnitList() |
|||
|
|||
}, |
|||
|
|||
async handleTuomin () { |
|||
const url = "/data/aggregator/epmetuser/detailByType"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
id:this.houseId, |
|||
type: "checkHouse", |
|||
}); |
|||
for(let i in this.quanzufangResiList){ |
|||
await this.getResiTuomin( this.quanzufangResiList[i].id) |
|||
} |
|||
if (code === 0) { |
|||
this.$set(this.dataForm, 'showOwnerPhone', data.mobile) |
|||
this.$set(this.dataForm, 'showOwnerIdCard', data.idCard) |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
async getResiTuomin(id){ |
|||
const url = "/data/aggregator/epmetuser/detailByType"; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
id:id, |
|||
type: "checkIcResiUser", |
|||
}); |
|||
if(code == 0){ |
|||
for(let i in this.quanzufangResiList){ |
|||
// console.log(this.quanzufangResiList[i].mobile.split(7,11)); |
|||
// console.log(data.mobile.split(7,11)); |
|||
if(this.quanzufangResiList[i].mobile.substr(7,4) == data.mobile.substr(7,4)){ |
|||
this.$set(this.quanzufangResiList[i],'mobile',data.mobile) |
|||
this.$set(this.quanzufangResiList[i],'idCard',data.idCard) |
|||
} |
|||
} |
|||
|
|||
}else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
}, |
|||
async loadHouseInfo () { |
|||
|
|||
const url = "/gov/org/ichouse/" + this.houseId |
|||
|
|||
const { data, code, msg } = await requestGet(url) |
|||
|
|||
if (code === 0) { |
|||
// debugger |
|||
this.dataForm = { ...data } |
|||
|
|||
this.houseType = this.dataForm.houseType |
|||
this.purpose = this.dataForm.purpose |
|||
this.rentFlag = parseInt(this.dataForm.rentFlag) |
|||
|
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
}, |
|||
|
|||
async loadQunzufangInfo () { |
|||
|
|||
const url = "/epmetuser/icresiuser/listhomeuserbrief-encrypt/" + this.houseId |
|||
|
|||
const { data, code, msg } = await requestPost(url) |
|||
|
|||
if (code === 0) { |
|||
// debugger |
|||
// this.dataForm = { ...data } |
|||
|
|||
// this.houseType = this.dataForm.houseType |
|||
// this.purpose = this.dataForm.purpose |
|||
// this.rentFlag = parseInt(this.dataForm.rentFlag) |
|||
this.quanzufangResiList = data |
|||
console.log(data); |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
}, |
|||
resetData () { |
|||
this.houseId = '' //房屋ID |
|||
this.houseType = '1' |
|||
this.purpose = '1' |
|||
this.rentFlag = 0 |
|||
this.dataForm = { |
|||
neighborHoodId: '', // 所属小区ID |
|||
buildingId: '',//所属楼栋ID |
|||
buildingUnitId: '',//所属单元ID |
|||
doorName: '',//门牌号 |
|||
houseType: '1',//房屋类型【楼房,平房,别墅】 |
|||
purpose: '1',//房屋用途【住宅,商业,办公,工业,仓储,商住混用,其他】 |
|||
rentFlag: 0,//是否出租【是:1,否:0】 |
|||
ownerPhone: '', //联系方式 |
|||
ownerName: '', //房主名字 |
|||
ownerIdCard: '', //房主身份证 |
|||
remark: '', // 备注 |
|||
coding: '', |
|||
sysCoding: '' |
|||
} |
|||
|
|||
}, |
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' // 背景颜色 |
|||
}) |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close() |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
dataRule () { |
|||
return { |
|||
buildingUnitId: [ |
|||
{ required: true, message: '所属单元不能为空', trigger: 'blur' }, |
|||
], |
|||
doorName: [ |
|||
{ required: true, message: '门牌号不能为空', trigger: 'blur' } |
|||
], |
|||
coding: [ |
|||
{ required: true, message: '房屋编码不能为空', trigger: 'blur' } |
|||
], |
|||
houseType: [ |
|||
{ required: true, message: '房屋类型不能为空', trigger: 'blur' } |
|||
], |
|||
purpose: [ |
|||
{ required: true, message: '房屋用途不能为空', trigger: 'blur' } |
|||
], |
|||
rentFlag: [ |
|||
{ required: true, message: '是否出租不能为空', trigger: 'blur' } |
|||
], |
|||
ownerPhone: [ |
|||
{ required: false } |
|||
], |
|||
ownerName: [ |
|||
{ required: false } |
|||
], |
|||
ownerIdCard: [ |
|||
{ required: false } |
|||
], |
|||
remark: [ |
|||
{ required: false } |
|||
], |
|||
} |
|||
}, |
|||
|
|||
}, |
|||
props: { |
|||
view_real_data: {//显示【显示脱敏信息】按钮 |
|||
type: Boolean, |
|||
default: false, |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped > |
|||
// @import "@/assets/scss/modules/management/detail-main.scss"; |
|||
|
|||
.div_tuomin { |
|||
position: absolute; |
|||
top: 52px; |
|||
right: 40px; |
|||
z-index: 1000; |
|||
} |
|||
.leftPostion_box{ |
|||
position: relative; |
|||
left: -80px; |
|||
font-size: 18px; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,142 @@ |
|||
<template> |
|||
<el-dialog :visible.sync="visible" title="操作记录" :close-on-click-modal="false" :close-on-press-escape="false"> |
|||
<el-table :cell-style="cellStyle" v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%"> |
|||
<el-table-column show-overflow-tooltip width="200" prop="placeOrgName" label="场所名称" header-align="center" align="center"></el-table-column> |
|||
<el-table-column show-overflow-tooltip width="200" prop="address" label="场所地址" header-align="center" align="center"></el-table-column> |
|||
<el-table-column show-overflow-tooltip width="200" prop="placeType" label="场所类型" header-align="center" align="center"></el-table-column> |
|||
<el-table-column show-overflow-tooltip width="150" prop="scale" label="规模" header-align="center" align="center"></el-table-column> |
|||
<el-table-column show-overflow-tooltip width="150" prop="personInCharge" label="负责人" header-align="center" align="center"></el-table-column> |
|||
<el-table-column show-overflow-tooltip width="250" prop="mobile" label="联系电话" header-align="center" align="center"></el-table-column> |
|||
<el-table-column show-overflow-tooltip width="200" prop="createdTime" label="操作日期" header-align="center" align="center"></el-table-column> |
|||
</el-table> |
|||
<el-pagination |
|||
:current-page="page" |
|||
:page-sizes="[10, 20, 50, 100]" |
|||
:page-size="limit" |
|||
:total="total" |
|||
layout="total, sizes, prev, pager, next, jumper" |
|||
@size-change="pageSizeChangeHandle" |
|||
@current-change="pageCurrentChangeHandle"> |
|||
</el-pagination> |
|||
<template slot="footer"> |
|||
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
|||
</template> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import mixinViewModule from '@/mixins/view-module' |
|||
import debounce from 'lodash/debounce' |
|||
export default { |
|||
mixins: [mixinViewModule], |
|||
data () { |
|||
return { |
|||
mixinViewModuleOptions: { |
|||
getDataListURL: '/gov/org/enterprise/history/0', |
|||
getDataListIsPage: true, |
|||
createdIsNeed: false, |
|||
}, |
|||
visible: false, |
|||
historyList:[], |
|||
dataForm: { |
|||
id: '', |
|||
customerId: '', |
|||
gridId: '', |
|||
agencyId: '', |
|||
agencyPids: '', |
|||
placeType: '', |
|||
placeOrgName: '', |
|||
address: '', |
|||
longitude: '', |
|||
latitude: '', |
|||
scale: '', |
|||
personInCharge: '', |
|||
mobile: '', |
|||
sourceType: '', |
|||
latestResult: '', |
|||
latestPatrolTime: '', |
|||
delFlag: '', |
|||
revision: '', |
|||
createdBy: '', |
|||
createdTime: '', |
|||
updatedBy: '', |
|||
updatedTime: '' |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
dataRule () { |
|||
return { |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
init () { |
|||
this.visible = true |
|||
this.$nextTick(() => { |
|||
if (this.dataForm.id) { |
|||
this.getInfo() |
|||
} |
|||
}) |
|||
}, |
|||
cellStyle({row, column, rowIndex, columnIndex}) { |
|||
let mark = 'background:red;font-weight:bold;color:#303133;' |
|||
if(row.placeOrgName.includes('->') && columnIndex === 0){ |
|||
return mark |
|||
} |
|||
if(row.address.includes('->') && columnIndex === 1){ |
|||
return mark |
|||
} |
|||
if(row.placeType.includes('->') && columnIndex === 2){ |
|||
return mark |
|||
} |
|||
if(row.scale.includes('->') && columnIndex === 3){ |
|||
return mark |
|||
} |
|||
if(row.personInCharge.includes('->') && columnIndex === 4){ |
|||
return mark |
|||
} |
|||
if(row.mobile.includes('->') && columnIndex === 5){ |
|||
return mark |
|||
} |
|||
}, |
|||
// 获取信息 |
|||
getInfo () { |
|||
this.mixinViewModuleOptions.getDataListURL = `/gov/org/icEnterpriseChangeRecord/history/${this.dataForm.id}` |
|||
this.getDataList() |
|||
// this.$http.get(`/gov/org/icEnterpriseChangeRecord/history/${this.dataForm.id}`).then(({ data: res }) => { |
|||
// if (res.code !== 0) { |
|||
// this.historyList = [] |
|||
// this.total = 0 |
|||
// return this.$message.error(res.msg) |
|||
// } |
|||
// this.historyList = res.data.list |
|||
// this.total = res.data.total |
|||
// |
|||
// }).catch(() => {}) |
|||
}, |
|||
// 表单提交 |
|||
dataFormSubmitHandle: debounce(function () { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (!valid) { |
|||
return false |
|||
} |
|||
this.$http[!this.dataForm.id ? 'post' : 'put']('/gov/org/icEnterpriseChangeRecord/', this.dataForm).then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} |
|||
this.$message({ |
|||
message: this.$t('prompt.success'), |
|||
type: 'success', |
|||
duration: 500, |
|||
onClose: () => { |
|||
this.visible = false |
|||
this.$emit('refreshDataList') |
|||
} |
|||
}) |
|||
}).catch(() => {}) |
|||
}) |
|||
}, 1000, { 'leading': true, 'trailing': false }) |
|||
} |
|||
} |
|||
</script> |
@ -0,0 +1,358 @@ |
|||
<template> |
|||
<div class="mod-__icEnterpriseChangeRecord} resi-container"> |
|||
<el-card ref="searchCard" class="search-card"> |
|||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" label-width="100px"> |
|||
<el-form-item label="场所名称" |
|||
prop="placeOrgName"> |
|||
<el-input v-model="dataForm.placeOrgName" |
|||
size="small" |
|||
style="width: 240px" |
|||
clearable |
|||
placeholder="请输入场所名称"> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="联系电话" |
|||
prop="createdUser"> |
|||
<el-input v-model="dataForm.mobile" |
|||
size="small" |
|||
style="width: 240px" |
|||
clearable |
|||
placeholder="请输入联系电话"> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="场所区域" |
|||
prop="gridId"> |
|||
<el-select |
|||
v-model.trim="dataForm.gridId" |
|||
placeholder="请选择" |
|||
style="width: 240px" |
|||
clearable |
|||
> |
|||
<el-option |
|||
v-for="item in optionsG" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="场所类型" |
|||
prop="placeType"> |
|||
<el-select v-model="dataForm.placeType" |
|||
placeholder="请选择" |
|||
size="small" |
|||
style="width: 240px" |
|||
clearable> |
|||
<el-option v-for="item in placeTypeArr" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="规模" |
|||
prop="placeType"> |
|||
<el-select v-model="dataForm.scale" |
|||
placeholder="请选择" |
|||
size="small" |
|||
style="width: 240px" |
|||
clearable> |
|||
<el-option v-for="item in scaleArr" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" size="small" class="diy-button--search" @click="getDataList()">{{ $t('query') }}</el-button> |
|||
|
|||
<el-button style="margin-left:10px" |
|||
size="small" |
|||
type="primary" |
|||
class="diy-button--reset" |
|||
@click="resetSearch">重置</el-button> |
|||
</el-form-item> |
|||
<!-- <el-button style="margin-left:10px" |
|||
size="small" |
|||
type="primary" |
|||
class="diy-button--reset" |
|||
@click="resetSearch">重置</el-button> --> |
|||
<!-- <el-form-item>--> |
|||
<!-- <el-button type="primary" size="small" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>--> |
|||
<!-- </el-form-item>--> |
|||
<!-- <el-form-item> |
|||
<el-button size="small" style="margin-left:10px" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button> |
|||
</el-form-item> --> |
|||
</el-form> |
|||
</el-card> |
|||
<el-card class="resi-card-table"> |
|||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%"> |
|||
<el-table-column label="序号" type="index" align="center" width="50" /> |
|||
<el-table-column prop="placeOrgName" label="场所名称" header-align="center" align="center"></el-table-column> |
|||
<el-table-column prop="address" label="场所地址" header-align="center" align="center"></el-table-column> |
|||
<el-table-column prop="placeType" label="场所类型" :formatter="placeTypeFormatter" header-align="center" align="center"></el-table-column> |
|||
<el-table-column prop="scale" label="规模" :formatter="scaleFormatter" header-align="center" align="center"></el-table-column> |
|||
<el-table-column prop="personInCharge" label="负责人" header-align="center" align="center"></el-table-column> |
|||
<el-table-column prop="mobile" label="联系电话" header-align="center" align="center"></el-table-column> |
|||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.enterpriseId)">{{ '操作记录' }}</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-pagination |
|||
:current-page="page" |
|||
:page-sizes="[10, 20, 50, 100]" |
|||
:page-size="limit" |
|||
:total="total" |
|||
layout="total, sizes, prev, pager, next, jumper" |
|||
@size-change="pageSizeChangeHandle" |
|||
@current-change="pageCurrentChangeHandle"> |
|||
</el-pagination> |
|||
</el-card> |
|||
<!-- 弹窗, 新增 / 修改 --> |
|||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import mixinViewModule from '@/mixins/view-module' |
|||
import AddOrUpdate from './icenterprisechangerecord-add-or-update' |
|||
import { requestPost } from "@/js/dai/request"; |
|||
export default { |
|||
mixins: [mixinViewModule], |
|||
data () { |
|||
return { |
|||
mixinViewModuleOptions: { |
|||
getDataListURL: '/gov/org/enterprise/page', |
|||
getDataListIsPage: true, |
|||
deleteURL: '/gov/org/icEnterpriseChangeRecord', |
|||
deleteIsBatch: true |
|||
}, |
|||
scaleArr: [], |
|||
resultArr: [{ |
|||
value: '0', |
|||
label: '合格' |
|||
},{ |
|||
value: '1', |
|||
label: '不合格' |
|||
}], |
|||
placeTypeArr: [], |
|||
agencyIdArray: [], |
|||
optionsG: [], |
|||
orgOptions: [], |
|||
orgOptionProps:{ |
|||
multiple: false, |
|||
value: 'value', |
|||
label: 'label', |
|||
children: 'children', |
|||
checkStrictly: true |
|||
}, |
|||
dataForm: { |
|||
id: '' |
|||
} |
|||
} |
|||
}, |
|||
components: { |
|||
AddOrUpdate |
|||
}, |
|||
created () { |
|||
this.getGridList() |
|||
this.getPlaceTypeList() |
|||
this.getScaleList() |
|||
}, |
|||
methods: { |
|||
placeTypeFormatter (row) { |
|||
let re = '' |
|||
this.placeTypeArr.forEach((item) => { |
|||
if (item.value === row.placeType) { |
|||
re = item.label |
|||
} |
|||
}) |
|||
return re |
|||
}, |
|||
scaleFormatter (row) { |
|||
let re = '' |
|||
this.scaleArr.forEach((item) => { |
|||
if (item.value === row.scale) { |
|||
re = item.label |
|||
} |
|||
}) |
|||
return re |
|||
}, |
|||
resultFormatter (row) { |
|||
let re = '' |
|||
this.resultArr.forEach((item) => { |
|||
if (item.value === row.latestResult) { |
|||
re = item.label |
|||
} |
|||
}) |
|||
return re |
|||
}, |
|||
getPlaceTypeList() { |
|||
const { user } = this.$store.state |
|||
this.$http |
|||
.post('/gov/org/coverage/dict-select-list/enterprise_patrol', {}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
console.log('获取查询详情成功', res.data) |
|||
this.placeTypeArr = res.data |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
getGridList() { |
|||
const { user } = this.$store.state |
|||
this.$http |
|||
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' }) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
console.log('获取查询详情成功', res.data) |
|||
this.optionsG = res.data |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
exportHandle () { |
|||
const url = this.mixinViewModuleOptions.exportURL |
|||
this.$http({ |
|||
method: 'GET', |
|||
url, |
|||
responseType: 'blob', |
|||
params: this.dataForm |
|||
}).then(res => { |
|||
// this.download(res.data, title + '.xls') |
|||
if (res.headers["content-disposition"]) { |
|||
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' |
|||
aLink.href = url |
|||
aLink.setAttribute('download', fileName) |
|||
document.body.appendChild(aLink) |
|||
aLink.click() |
|||
document.body.removeChild(aLink) //下载完成移除元素 |
|||
window.URL.revokeObjectURL(url) //释放掉blob对象 |
|||
} else this.$message.error('下载失败') |
|||
}).catch(err => { |
|||
console.log('err', err) |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
//重置搜索条件 |
|||
resetSearch () { |
|||
this.agencyIdArray = [] |
|||
this.dataForm = { |
|||
agencyId: '', |
|||
gridId: '', |
|||
logType: '', |
|||
createdUser: '', |
|||
startTime: '', |
|||
endTime: '', |
|||
mobile: '' |
|||
} |
|||
|
|||
this.getDataList() |
|||
}, |
|||
// 字典 |
|||
async getScaleList () { |
|||
console.log(localStorage.getItem('token')) |
|||
const url = "/sys/dict/data/dictlist" |
|||
|
|||
let params = { |
|||
dictType: 'scale' |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.scaleArr = data |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/buttonstyle.scss"; |
|||
|
|||
.resi-container .resi-card-table { |
|||
::v-deep .el-table th { |
|||
color: #fff; |
|||
background-color: rgba(33, 149, 254, 1); |
|||
// border-right: 1px solid rgba(33, 149, 254, 1); |
|||
} |
|||
} |
|||
.resi-table { |
|||
::v-deep .el-button--text { |
|||
text-decoration: underline; |
|||
} |
|||
::v-deep .btn-color-del { |
|||
margin-left: 10px; |
|||
color: rgba(213, 16, 16, 1); |
|||
} |
|||
::v-deep .btn-color-edit { |
|||
color: rgba(0, 167, 169, 1); |
|||
} |
|||
} |
|||
|
|||
.resi-row-btn { |
|||
margin-bottom: 13px; |
|||
.upload-btn { |
|||
display: inline-block; |
|||
margin: 0 10px; |
|||
} |
|||
} |
|||
|
|||
.form-wr { |
|||
.input-width { |
|||
width: 260px; |
|||
|
|||
} |
|||
.input-width-textarea { |
|||
width: 500px; |
|||
} |
|||
.imsg-list { |
|||
display: flex; |
|||
align-items: center; |
|||
.imgs-item { |
|||
position: relative; |
|||
margin-right: 10px; |
|||
.el-icon-delete { |
|||
position: absolute; |
|||
top: 0; |
|||
right: 0; |
|||
font-size: 18px; |
|||
color: red; |
|||
z-index: 3; |
|||
cursor: pointer; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.div-content { |
|||
width: 100%; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
} |
|||
</style> |
|||
|
|||
<style> |
|||
.el-table .warning-row { |
|||
background: #ffe168; |
|||
} |
|||
</style> |
File diff suppressed because it is too large
Loading…
Reference in new issue