Browse Source

房屋管理

dev-新版ui
jiangyy 3 years ago
parent
commit
124b1913ae
  1. 7
      src/assets/scss/buttonstyle.scss
  2. 16
      src/assets/scss/modules/management/edit-main.scss
  3. 634
      src/views/components/resiChangeTransfer copy.vue
  4. 2
      src/views/components/resiSearch.vue
  5. 1
      src/views/modules/base/community/buildForm.vue
  6. 4
      src/views/modules/base/community/buildTable.vue
  7. 52
      src/views/modules/base/community/communityForm.vue
  8. 4
      src/views/modules/base/community/communityTable.vue
  9. 1
      src/views/modules/base/community/roomForm.vue
  10. 4
      src/views/modules/base/community/roomTable.vue
  11. 63
      src/views/modules/base/resi.vue

7
src/assets/scss/buttonstyle.scss

@ -135,6 +135,13 @@
font-weight: 600 !important;
color: #BB0000 !important;
}
.div-table-button--green {
font-size: 14px !important;
font-family: Source Han Serif CN !important;
font-weight: 600 !important;
color: #0192A3 !important;
}
//旧版--------弃用

16
src/assets/scss/modules/management/edit-main.scss

@ -24,10 +24,18 @@
/deep/ .el-form-item{
height:350px;
// line-height: 40px;
}
.map_line{
// height:5px;
// background-color: #ffffff;
}
.div_map{
margin-top:10px;
height:280px;
padding-bottom:10px;
}
}
.item-image{
@ -80,7 +88,7 @@
line-height: 40px;
}
/deep/ .el-form-item__content{
width:660px;
width:760px;
margin:5px 6px;
background: #F6F6F6;
padding:0 16px;
@ -113,11 +121,15 @@
}
//带着按钮
.edit_item_btn_width_1{
width:550px;
width:650px;
}
.edit-btn-1{
float:right;
margin-right:10px;
}
.div_btn {
margin-top: 20px;
text-align: center;
}

634
src/views/components/resiChangeTransfer copy.vue

@ -0,0 +1,634 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form"
:inline="false"
:model="dataForm"
:rules="dataRule"
class="form">
<el-form-item label="当前组织"
label-width="150px"
style="display: block">
<span>{{ gridName }}</span>
</el-form-item>
<el-form-item label="姓名"
label-width="150px"
style="display: block">
<span>{{ dataForm.name }}</span>
</el-form-item>
<el-form-item label="迁出时间" prop="outOfTime" label-width="150px">
<el-date-picker v-model="dataForm.outOfTime"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
placeholder="选择日期"
style="width:200px"
:clearable="false">
</el-date-picker>
</el-form-item>
<el-form-item label="迁出类型"
prop="type"
label-width="150px"
style="display: block">
<el-radio-group v-model="dataForm.type">
<el-radio :label="'in'">{{'迁往'+rootAgency.organizationName+'内其他区域'}}</el-radio>
<el-radio :label="'out'">其他</el-radio>
</el-radio-group>
</el-form-item>
<div v-if="dataForm.type==='in'">
<el-form-item label="迁出至"
prop='agencyId'
label-width="150px">
<el-cascader ref="myCascader"
v-model="agencyIdArray"
style="width:480px"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
</el-form-item>
<el-form-item label="所属家庭"
label-width="150px"
prop="villageId">
<div class="resi-cell-col">
<el-select v-model.trim="dataForm.villageId"
placeholder="请选择小区"
clearable
class="item_width_1"
@change="handleChangeCommunity($event)">
<el-option v-for="item in communityList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model.trim="dataForm.buildId"
placeholder="请选择楼号"
clearable
class="item_width_1 margin_left10"
@change="handleChangeBuilding($event)">
<el-option v-for="item in buildingList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model.trim="dataForm.unitId"
placeholder="请选择单元"
clearable
class="item_width_1 margin_left10"
@change="handleChangeUnit($event)">
<el-option v-for="item in unitList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model.trim="dataForm.homeId"
placeholder="请选择房号"
clearable
class="item_width_1 margin_left10"
@change="handleChangeHome($event)">
<el-option v-for="item in roomList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
</div>
<div v-if="dataForm.type==='out'">
<el-form-item label="外迁详细地址"
prop="address"
label-width="150px">
<el-input type="textarea"
:autosize="{ minRows: 2, maxRows: 7}"
:rows="5"
resize="none"
style="width:600px"
placeholder='请输入外迁详细地址'
v-model="dataForm.address">
</el-input>
</el-form-item>
</div>
<el-form-item label="迁出原因"
prop="reason"
label-width="150px">
<el-input type="textarea"
:autosize="{ minRows: 4, maxRows: 7}"
:rows="5"
resize="none"
style="width:600px"
placeholder='请输入迁出原因'
v-model="dataForm.reason">
</el-input>
</el-form-item>
<el-form-item label=""
prop="welfareFlag"
label-width="150px">
<el-checkbox v-model="dataForm.welfareFlag">享受福利</el-checkbox>
</el-form-item>
</el-form>
</div>
<!-- <div class="div_btn">
<el-button @click="handleCancle"> </el-button>
<el-button type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div> -->
<div class="resi-btns">
<el-button size="small"
@click="handleCancle">取消</el-button>
<el-button type="primary"
size="small"
:loading="btnDisable"
@click="handleComfirm">提交</el-button>
</div>
</div>
</template>
<script>
import util from '@js/util.js';
import { Loading } from 'element-ui' // Loading
import { requestPost, requestGet } from '@/js/dai/request'
let loading //
export default {
data () {
return {
btnDisable: false,
communityList: [],
buildingList: [],
unitList: [],
roomList: [],
dataForm: {
icUserId: '', // ID
type: 'in',//out,in
agencyId: '',//Id
gridId: '',//Id
gridName: '',
villageId: '',//ID
villageName: '',
buildId: '',//Id
buildName: '',
unitId: '',//Id
unitName: '',
homeId: '', //Id
homeName: '',
transferTime: '', //
reason: '', //
customerId: '',
oldHome: '',
oldDept: '',
oldAddress: '',
ownerName: '',
name: '',
gender: '',
age: '',
address: '',
outOfTime: '',
welfareFlag: false
},
customerId: '',//id
userId: '',//id
gridName: '',
rootAgency: {},
casOptions: [],
agencyIdArray: [],
customerList: [],
iscascaderShow: 0,
optionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
// checkStrictly: true
},
selGrid: {},
}
},
components: {
},
mounted () {
},
computed: {
dataRule () {
return {
type: [
{ required: true, message: '操作类型不能为空', trigger: 'blur' },
],
agencyId: [
{ required: true, message: '所选组织不能为空', trigger: 'blur' }
],
villageId: [
{ required: true, message: '所属家庭不能为空', trigger: 'blur' }
],
address: [
{ required: true, message: '外迁详细地址不能为空', trigger: 'blur' }
],
outOfTime: [
{ required: true, message: '迁出时间不能为空', trigger: 'blur' }
]
}
},
},
methods: {
async initForm (row) {
this.customerId = localStorage.getItem("customerId");
this.$refs.ref_form.resetFields();
// this.icUserId = row.icResiUserId
this.gridName = row.GRID_ID
this.dataForm.icUserId = row.icResiUserId
//
if(row.DOOR_NAME !== null && row.DOOR_NAME !== '' && row.DOOR_NAME !== undefined){
this.dataForm.oldHome = row.DOOR_NAME
}else{
this.dataForm.oldHome = ''
}
this.dataForm.customerId = this.customerId
this.dataForm.idCard = row.ID_CARD
this.dataForm.mobile = row.MOBILE
await this.loadHouseInfo(row.HOME_ID_VALUE)
this.dataForm.name = row.NAME
this.dataForm.gender = row.GENDER
this.dataForm.age = ''
await this.loadRootAgency()
await this.getAgencylist()
},
async loadHouseInfo (homeIdValue) {
const url = "/gov/org/ichouse/" + homeIdValue
const { data, code, msg } = await requestGet(url)
if (code === 0) {
this.dataForm.oldDept = ''
this.dataForm.oldAddress = data.houseName
this.dataForm.ownerName = data.ownerName
} else {
this.$message.error(msg)
}
},
//id
async loadRootAgency () {
await this.$http.post('/gov/org/agency/customerrootagency/' + this.customerId).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (res.data) {
this.rootAgency = res.data
}
}).catch(() => { })
},
async getAgencylist () {
const url = '/gov/org/customeragency/rootagencygridtree'
const params = {
agencyId: this.rootAgency.id
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
let treeData = [data]
this.resolveAgencyTree(treeData)
this.casOptions.push(data)
}
} else {
this.$message.error(msg)
}
},
resolveAgencyTree (treeData) {
treeData.forEach(element => {
if (!element.subAgencyList || element.subAgencyList.length === 0) {//level=gridtrue
if (element.level === 'grid') {
element.disabled = false
} else {
element.disabled = true
}
} else {
this.resolveAgencyTree(element.subAgencyList)
}
});
},
handleChangeAgency () {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data)
this.selGrid = this.$refs["myCascader"].getCheckedNodes()[0].data
this.dataForm.agencyId = this.selGrid.pid
this.dataForm.gridId = this.selGrid.agencyId
this.dataForm.gridName = this.selGrid.agencyName
this.loadCommunityList()
this.dataForm.villageId = ''//ID
this.dataForm.villageName = ''
this.dataForm.buildId = ''//Id
this.dataForm.buildName = ''
this.dataForm.unitId = ''//Id
this.dataForm.unitName = ''
this.dataForm.homeId = '' //Id
this.dataForm.homeName = ''
},
async loadCommunityList () {
const url = '/gov/org/icneighborhood/neighborhoodoption'
let params = {
gridId: this.dataForm.gridId,
agencyId: this.dataForm.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.communityList = []
this.communityList = [...data]
} else {
this.$message.error(msg)
}
},
async handleChangeCommunity (id) {
//
this.communityList.find((item) => {
if (item.value === id) {
this.dataForm.villageName = item.label
}
})
const url = '/gov/org/icbuilding/buildingoption'
let params = {
neighborHoodId: this.dataForm.villageId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.buildingList = []
this.buildingList = [...data]
this.dataForm.buildId = ''//Id
this.dataForm.unitId = ''//Id
this.dataForm.homeId = '' //Id
} else {
this.$message.error(msg)
}
},
async handleChangeBuilding (id) {
//
this.buildingList.find((item) => {
if (item.value === id) {
this.dataForm.buildName = item.label
}
})
const url = '/gov/org/icbuildingunit/unitoption'
let params = {
buildingId: this.dataForm.buildId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.unitList = []
this.unitList = [...data]
this.dataForm.unitId = ''//Id
this.dataForm.homeId = '' //Id
} else {
this.$message.error(msg)
}
},
async handleChangeUnit (id) {
//
this.unitList.find((item) => {
if (item.value === id) {
this.dataForm.unitName = item.label
}
})
const url = '/gov/org/ichouse/houseoption'
let params = {
unitId: this.dataForm.unitId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.roomList = []
this.roomList = [...data]
this.dataForm.homeId = '' //Id
} else {
this.$message.error(msg)
}
},
async handleChangeHome (id) {
//
this.roomList.find((item) => {
if (item.value === id) {
this.dataForm.homeName = item.label
}
})
},
async handleComfirm () {
this.btnDisable = true
setTimeout(() => {
this.btnDisable = false
}, 2000)
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
// app.util.validateRule(messageObj)
console.log('error submit!')
} else {
if (this.dataForm.type === 'in') {
if (!this.dataForm.buildId) {
this.$message.warning('楼栋')
return false
}
if (!this.dataForm.unitId) {
this.$message.warning('请选择单元')
return false
}
if (!this.dataForm.homeId) {
this.$message.warning('请选择房间')
return false
}
}
this.saveForm()
}
})
},
async saveForm () {
// saveOutOfInfo
const url = '/epmetuser/changeRelocation/moveOutHome'
let noData = new Date()
noData = util.dateFormatter(noData, 'time')
this.dataForm.transferTime = noData
const { data, code, msg } = await requestPost(url, this.dataForm)
if (code === 0) {
this.$message.success('操作成功')
this.handleCancle()
} else {
this.$message.error(msg)
}
},
// async saveForm () {
// const url = '/epmetuser/icusertransferrecord/add'
// let noData = new Date()
// noData = util.dateFormatter(noData, 'time')
// this.dataForm.transferTime = noData
//
// console.log('-----------3--------------')
// console.log(this.dataForm)
// const { data, code, msg } = await requestPost(url, this.dataForm)
//
// if (code === 0) {
// this.$message.success('')
// this.handleCancle()
// } else {
// this.$message.error(msg)
// }
// },
handleCancle () {
this.resetData()
this.$emit('dialogCancle')
},
resetData () {
this.dataForm = {
icUserId: '', // ID
type: 'in',//out,in
agencyId: '',//Id
gridId: '',//Id
villageId: '',//ID
buildId: '',//Id
unitId: '',//Id
homeId: '', //Id
transferTime: '', //
reason: '', //
outOfTime: '',
welfareFlag: false
}
this.customerId = ''//id
this.userId = ''//id
this.gridName = ''
this.rootAgency = {}
this.selGrid = {}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
props: {}
}
</script>
<style lang="scss" scoped>
.item_width_1 {
width: 150px;
}
.item_width_2 {
width: 400px;
}
.item_width_3 {
margin-left: 10px;
width: 200px;
}
.div_btn {
display: flex;
justify-content: flex-end;
}
.resi-cell-col {
width: 750px;
display: flex;
justify-content: flex-start;
}
.margin_left10 {
margin-left: 10px;
}
</style>

2
src/views/components/resiSearch.vue

@ -1,7 +1,7 @@
<template>
<div class="resi-container">
<!-- <el-card class="resi-card"> -->
<el-row :class="!isArrow && 'resi-row-more'">
<el-row>
<el-row v-if="showGrid"
class="resi-row">
<el-col :span="6">

1
src/views/modules/base/community/buildForm.vue

@ -505,6 +505,5 @@ export default {
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss";
@import "@/assets/scss/modules/management/edit-main.scss";
</style>

4
src/views/modules/base/community/buildTable.vue

@ -253,7 +253,7 @@
:close-on-press-escape="false"
:title="formTitle"
top="5vh"
width="850px"
width="950px"
class="dialog-h"
@closed="diaClose">
<build-form ref="ref_form"
@ -266,7 +266,7 @@
:close-on-press-escape="false"
:title="'楼栋详情'"
top="5vh"
width="850px"
width="950px"
class="dialog-h"
@closed="detailFormCancle">
<build-detail ref="ref_form_detail"

52
src/views/modules/base/community/communityForm.vue

@ -103,25 +103,27 @@
<el-form-item label="地图位置"
prop="longitude"
style="display: block">
<div style="width: 500px">
<el-select v-model="searchValue"
filterable
style="width: 500px"
remote
:reserve-keyword="true"
placeholder="请输入关键词"
:remote-method="remoteMethod"
:loading="loading">
<el-option v-for="(item,index) in searchOptions"
@click.native="handleClickKey(index)"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<div id="app_community"
class="div_map"></div>
</div>
<el-select v-model="searchValue"
filterable
style="width: 500px"
remote
:reserve-keyword="true"
placeholder="请输入关键词"
:remote-method="remoteMethod"
:loading="loading">
<el-option v-for="(item,index) in searchOptions"
@click.native="handleClickKey(index)"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<div class="map_line"></div>
<div id="app_community"
style=""
class="div_map"></div>
</el-form-item>
</div>
@ -170,17 +172,6 @@
</el-form-item>
</el-form>
<!-- <el-form v-show="propertyFormShow"
:inline="false"
:model="propertyForm"
:rules="propertyRule"
class="m-form">
</el-form> -->
<!-- <div >
</div> -->
</div>
<div class="div_btn">
<el-button size="small"
@ -582,7 +573,6 @@ export default {
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss";
@import "@/assets/scss/modules/management/edit-main.scss";
</style>

4
src/views/modules/base/community/communityTable.vue

@ -236,7 +236,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'小区详情'"
width="850px"
width="950px"
top="5vh"
class="dialog-h"
@closed="detailFormCancle">
@ -249,7 +249,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
width="950px"
top="5vh"
class="dialog-h"
@closed="diaClose">

1
src/views/modules/base/community/roomForm.vue

@ -467,6 +467,5 @@ export default {
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManageForm.scss";
@import "@/assets/scss/modules/management/edit-main.scss";
</style>

4
src/views/modules/base/community/roomTable.vue

@ -245,7 +245,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
width="950px"
top="5vh"
class="dialog-h"
@closed="diaClose">
@ -260,7 +260,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'查看房屋'"
width="850px"
width="950px"
top="5vh"
class="dialog-h"
@closed="detailFormCancle">

63
src/views/modules/base/resi.vue

@ -142,21 +142,18 @@
<el-table-column fixed="right"
label="操作"
align="center"
width="150">
width="200">
<template slot-scope="scope">
<!-- <el-button @click="handleLook(scope.row)"
type="text"
size="small"
class="btn-color-look">查看</el-button> -->
<!-- <el-button @click="handleTransfer(scope.row)"
type="text"
size="small"
class="div-table-button--detail">变动</el-button> -->
<el-button v-if="btnAuths.ic_resi_change_rec"
<!-- <el-button v-if="btnAuths.ic_resi_change_rec"
@click="handleChangeRecord(scope.row)"
type="text"
class="div-table-button--orange"
size="small">变更记录</el-button>
size="small">变更记录</el-button> -->
<template v-if="filterEdit(scope.row.ORG_ID)">
<el-button v-if="btnAuths.ic_resi_update"
@click="handleEdit(scope.row)"
@ -172,6 +169,15 @@
class="btn-color-del">删除</el-button> -->
</el-popconfirm>
</template>
<el-button @click="handleChangeTransfer(scope.row)"
type="text"
class="div-table-button--green"
size="small">迁出登记</el-button>
<el-button @click="handleChangeRecord(scope.row)"
type="text"
class="div-table-button--red"
size="small">死亡登记</el-button>
</template>
</el-table-column>
</el-table>
@ -299,19 +305,6 @@
</div>
</el-dialog>
<!-- 调动 -->
<el-dialog :visible.sync="tranferShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'人员变动'"
width="950px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<resi-transfer ref="ref_transfer"
@dialogCancle="transferClose"></resi-transfer>
</el-dialog>
<!-- 变更记录 -->
<el-dialog :visible.sync="changeRecordShow"
:close-on-click-modal="false"
@ -345,6 +338,19 @@
:gridName="lookInfo.gridName"
@close="handleCancleLook" />
<baobiao ref="baobiao" />
<!-- 迁出 -->
<el-dialog :visible.sync="tranferShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'迁出管理'"
width="950px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<resi-change-transfer ref="ref_change_transfer"
@dialogCancle="transferClose"></resi-change-transfer>
</el-dialog>
</div>
</template>
@ -357,11 +363,14 @@ import axios from "axios";
import { mapGetters } from "vuex";
import resiTransfer from "../../components/resiTransfer.vue";
import resiChangeRecord from "../../components/resiChangeRecord.vue";
import peopleMore from "@/views/modules/shequ/cpts/people-more";
import baobiao from "@/views/modules/cpts/baobiao";
import diyInfo from "./diyInfo.vue";
import { requestPost } from "@/js/dai/request";
import resiChangeTransfer from "../../components/resiChangeTransfer.vue";
export default {
components: {
baobiao,
@ -372,6 +381,8 @@ export default {
resiChangeRecord,
peopleMore,
diyInfo,
resiChangeTransfer,
},
data () {
return {
@ -530,20 +541,18 @@ export default {
checkSelect (row, index) {
return row.isChecked;
},
//
async handleTransfer (row) {
this.tranferShow = true;
//
async handleChangeTransfer (row) {
this.tranferShow = true;
await nextTick(200);
this.$refs.ref_transfer.initForm(row);
this.$refs.ref_change_transfer.initForm(row)
},
//
async handleChangeRecord (row) {
this.changeRecordShow = true;
await nextTick(200);
this.$refs.ref_changerecord.initForm(row);
},

Loading…
Cancel
Save