|
|
@ -250,18 +250,18 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import CDialog from '@c/CDialog' |
|
|
|
import communityTable from './communityTable' |
|
|
|
import buildTable from './buildTable' |
|
|
|
import roomTable from './roomTable' |
|
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { Loading } from 'element-ui' // 引入Loading服务 |
|
|
|
import nextTick from 'dai-js/tools/nextTick' |
|
|
|
import CDialog from '@c/CDialog'; |
|
|
|
import nextTick from 'dai-js/tools/nextTick'; |
|
|
|
import { Loading } from 'element-ui'; // 引入Loading服务 |
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
import buildTable from './buildTable'; |
|
|
|
import communityTable from './communityTable'; |
|
|
|
import roomTable from './roomTable'; |
|
|
|
|
|
|
|
let loading // 加载动画 |
|
|
|
export default { |
|
|
|
data () { |
|
|
|
data() { |
|
|
|
let endDisabledDate = (time) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 |
|
|
|
let nowData = Date.now() |
|
|
|
if (this.updateStartDate) { |
|
|
@ -353,7 +353,7 @@ export default { |
|
|
|
components: { |
|
|
|
CDialog |
|
|
|
}, |
|
|
|
async mounted () { |
|
|
|
async mounted() { |
|
|
|
this.treeLoading = true |
|
|
|
|
|
|
|
await this.loadOrgData() |
|
|
@ -372,12 +372,12 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
computed: { |
|
|
|
rowHeight () { |
|
|
|
rowHeight() { |
|
|
|
|
|
|
|
return this.$store.state.inIframe ? this.clientHeight - 140 + this.iframeHeight + 'px' : this.clientHeight - 140 + 'px' |
|
|
|
|
|
|
|
}, |
|
|
|
treeHeight () { |
|
|
|
treeHeight() { |
|
|
|
return this.$store.state.inIframe ? this.clientHeight - 200 + this.iframeHeight + 'px' : this.clientHeight - 200 + 'px' |
|
|
|
|
|
|
|
}, |
|
|
@ -385,7 +385,7 @@ export default { |
|
|
|
...mapGetters(['clientHeight', 'iframeHeight']) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleChangeV (val) { |
|
|
|
handleChangeV(val) { |
|
|
|
|
|
|
|
this.buildingId = ""; |
|
|
|
this.buildingUnitId = ""; |
|
|
@ -394,19 +394,19 @@ export default { |
|
|
|
// this.getUniList(); |
|
|
|
// this.getHouseList(); |
|
|
|
}, |
|
|
|
handleChangeB (val) { |
|
|
|
handleChangeB(val) { |
|
|
|
|
|
|
|
this.buildingUnitId = ""; |
|
|
|
this.houseId = ""; |
|
|
|
this.getUniList(); |
|
|
|
// this.getHouseList(); |
|
|
|
}, |
|
|
|
handleChangeD () { |
|
|
|
handleChangeD() { |
|
|
|
this.houseId = ""; |
|
|
|
this.getHouseList(); |
|
|
|
}, |
|
|
|
|
|
|
|
async getValiheList () { |
|
|
|
async getValiheList() { |
|
|
|
const { user } = this.$store.state; |
|
|
|
if (!this.selGridId) { |
|
|
|
this.selAgencyId = this.selAgencyId ? this.selAgencyId : user.agencyId |
|
|
@ -436,7 +436,7 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
async getBuildList () { |
|
|
|
async getBuildList() { |
|
|
|
const url = "/gov/org/icbuilding/buildingoption"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page" |
|
|
|
let params = { |
|
|
@ -456,7 +456,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
async getUniList () { |
|
|
|
async getUniList() { |
|
|
|
|
|
|
|
const url = "/gov/org/icbuildingunit/unitoption"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page" |
|
|
@ -476,7 +476,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
getHouseList () { |
|
|
|
getHouseList() { |
|
|
|
this.$http |
|
|
|
.post("/gov/org/ichouse/houseoption", { unitId: this.buildingUnitId }) |
|
|
|
.then(({ data: res }) => { |
|
|
@ -493,7 +493,7 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
handleSearch () { |
|
|
|
handleSearch() { |
|
|
|
// if (this.ownerName || this.ownerPhone || this.rentFlag || this.purpose || this.remark) { |
|
|
|
this.showRoomTable = true |
|
|
|
|
|
|
@ -508,7 +508,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//重置搜索条件 |
|
|
|
resetSearch () { |
|
|
|
resetSearch() { |
|
|
|
this.ownerName = '' |
|
|
|
this.ownerPhone = '' |
|
|
|
this.rentFlag = '' |
|
|
@ -527,7 +527,7 @@ export default { |
|
|
|
// this.loadTable() |
|
|
|
}, |
|
|
|
|
|
|
|
async loadOpenNode () { |
|
|
|
async loadOpenNode() { |
|
|
|
const url = "/gov/org/building/tree-ids" |
|
|
|
let params = {} |
|
|
|
|
|
|
@ -541,7 +541,7 @@ export default { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
async loadTree (isRefresh) { |
|
|
|
async loadTree(isRefresh) { |
|
|
|
const url = "/gov/org/building/treelist" |
|
|
|
let params = {} |
|
|
|
|
|
|
@ -570,7 +570,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//加载组织数据 |
|
|
|
async loadOrgData () { |
|
|
|
async loadOrgData() { |
|
|
|
const url = "/gov/org/agency/maporg" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/maporg" |
|
|
|
let params = {} |
|
|
@ -589,7 +589,17 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
async handleNodeClick (obj) { |
|
|
|
async handleNodeClick(obj) { |
|
|
|
if (obj.level == "grid") { |
|
|
|
obj.id = obj.pid |
|
|
|
this.treeData[0]['children'].forEach(f => { |
|
|
|
f['children'].forEach(item => { |
|
|
|
if (item.id == obj.id) { |
|
|
|
obj.label = item.label |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
this.ownerName = '' |
|
|
|
this.ownerPhone = '' |
|
|
|
this.rentFlag = '' |
|
|
@ -643,7 +653,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//添加小区结束 |
|
|
|
async refreshTree () { |
|
|
|
async refreshTree() { |
|
|
|
this.treeLoading = true |
|
|
|
await this.loadTree(this.selTreeObj.id) |
|
|
|
this.$nextTick(() => { |
|
|
@ -654,7 +664,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//进入下一级 |
|
|
|
toNextLevel (row, level) { |
|
|
|
toNextLevel(row, level) { |
|
|
|
|
|
|
|
if (level === 'community') { |
|
|
|
this.selTreeObj = this.$refs.ref_tree.getNode(row.neighborHoodId).data |
|
|
@ -683,7 +693,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//解析树数据 |
|
|
|
getTreeObj (obj) { |
|
|
|
getTreeObj(obj) { |
|
|
|
// 树接口: |
|
|
|
// 组织:组织id、组织名称、type、经度、纬度 |
|
|
|
// 小区:小区id、小区名称、type、所属网格id、所属网格名称、所属组织id、所属组织名称、经度、纬度 |
|
|
@ -734,13 +744,13 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
filterNode (value, data) { |
|
|
|
filterNode(value, data) { |
|
|
|
if (!value) return true; |
|
|
|
return data.label.indexOf(value) !== -1; |
|
|
|
}, |
|
|
|
|
|
|
|
// 开启加载动画 |
|
|
|
startLoading () { |
|
|
|
startLoading() { |
|
|
|
loading = Loading.service({ |
|
|
|
lock: true, // 是否锁定 |
|
|
|
text: '正在加载……', // 加载中需要显示的文字 |
|
|
@ -748,7 +758,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 结束加载动画 |
|
|
|
endLoading () { |
|
|
|
endLoading() { |
|
|
|
// clearTimeout(timer); |
|
|
|
if (loading) { |
|
|
|
loading.close() |
|
|
@ -756,7 +766,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
filterText (val) { |
|
|
|
filterText(val) { |
|
|
|
this.$refs.ref_tree.filter(val); |
|
|
|
} |
|
|
|
}, |
|
|
|