Browse Source

Merge branch 'dev-220411' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-220411

feature
dai 4 years ago
parent
commit
21be6c5fa5
  1. 2
      src/router/index.js
  2. 9
      src/views/modules/base/community/buildForm.vue
  3. 685
      src/views/modules/base/community/buildTable copy.vue
  4. 75
      src/views/modules/base/community/buildTable.vue
  5. 341
      src/views/modules/base/community/community copy.vue
  6. 132
      src/views/modules/base/community/community.vue
  7. 25
      src/views/modules/base/community/communityForm.vue
  8. 793
      src/views/modules/base/community/communityTable copy.vue
  9. 73
      src/views/modules/base/community/communityTable.vue
  10. 13
      src/views/modules/base/community/roomForm.vue
  11. 712
      src/views/modules/base/community/roomTable copy.vue
  12. 96
      src/views/modules/base/community/roomTable.vue
  13. 4
      src/views/modules/base/epidemic/travel.vue
  14. 14
      src/views/modules/base/resi.vue
  15. 2
      src/views/modules/communityParty/elegant/index.vue
  16. 50
      src/views/modules/communityParty/regionalParty/activitys.vue
  17. 20
      src/views/modules/communityParty/regionalParty/activitysDetail.vue
  18. 55
      src/views/modules/communityParty/regionalParty/activitysForm.vue
  19. 3
      src/views/modules/communityParty/regionalParty/unitsForm.vue
  20. 730
      src/views/modules/visual/basicinfo/people.vue
  21. 41
      src/views/modules/visual/communityParty/community.vue
  22. 18
      src/views/modules/visual/communityParty/party.vue
  23. 28
      src/views/modules/visual/measure/service.vue
  24. 6
      src/views/pages/caiji.vue

2
src/router/index.js

@ -221,7 +221,7 @@ router.beforeEach((to, from, next) => {
children: [
{
url: "/visual/basicinfo/basicInfoMain",
name: "基础信息",
name: "人房信息统计",
id: "5feawfwaefwa5",
},
{

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

@ -47,27 +47,30 @@
style="display: block"
prop="totalUnitNum"
label-width="150px">
<el-input-number class="item_width_1"
<el-input-number class="item_width_4"
v-model="dataForm.totalUnitNum"
:min="1"
:max="9999"
label="单元数"></el-input-number>
</el-form-item>
<el-form-item label="层数"
style="display: block"
prop="totalFloorNum"
label-width="150px">
<el-input-number class="item_width_1"
<el-input-number class="item_width_4"
v-model="dataForm.totalFloorNum"
:min="0"
:max="9999"
label="层数"></el-input-number>
</el-form-item>
<el-form-item label="总户数"
style="display: block"
prop="totalHouseNum"
label-width="150px">
<el-input-number class="item_width_1"
<el-input-number class="item_width_4"
v-model="dataForm.totalHouseNum"
:min="0"
:max="9999"
label="总户数"></el-input-number>
</el-form-item>

685
src/views/modules/base/community/buildTable copy.vue

@ -0,0 +1,685 @@
<template>
<div>
<div class="div_search">
<div class="resi-cell">
<div class="resi-cell-label">房主姓名</div>
<div class="resi-cell-value">
<el-input v-model="ownerName"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<div class="resi-cell">
<div class="resi-cell-label">房主手机</div>
<div class="resi-cell-value">
<el-input v-model="ownerPhone"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<el-button style="margin-left:10px"
class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button>
</div>
<div class="div_btn">
<el-button style="float:left"
class="diy-button--add"
size="small"
@click="handleAdd">新增楼栋</el-button>
<div class="btn_upload"
v-if="showImportBtn">
<el-button style=";margin-left:10px"
class="diy-button--export"
size="small"
@click="handleExportModule('building')">下载楼栋模板</el-button>
<el-upload style=""
ref="upload_building"
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'building')})"
action=""
accept=".xls,.xlsx"
:http-request="(()=>{uploadFile( 'building')})">
<el-button style="margin-left:10px"
size="small"
class="diy-button--delete">导入楼栋数据</el-button>
</el-upload>
<el-button style=";margin-left:10px"
class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载房屋模板</el-button>
<el-upload style=""
ref="upload_room"
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'room')})"
action=""
accept=".xls,.xlsx"
:http-request="(()=>{uploadFile( 'room')})">
<el-button style="margin-left:10px"
size="small"
class="diy-button--delete">导入房屋数据</el-button>
</el-upload>
</div>
<el-button style="float:left;margin-left:10px"
class="diy-button--reset"
size="small"
@click="handleExport">导出</el-button>
<el-button style="float:left;margin-left:10px"
class="diy-button--more"
size="small"
@click="deleteBatch">批量删除</el-button>
</div>
<div class="div_table">
<el-table ref="ref_table"
:data="tableData"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
border
:height="tableHeight"
v-loading="tableLoading"
style="width: 100%"
@select-all="selectAll"
@selection-change="selectionChange">
<el-table-column type="selection"
:selectable="checkSelect"
width="55">
</el-table-column>
<el-table-column prop="buildingName"
label="楼栋名称"
min-width="180">
</el-table-column>
<el-table-column prop="neighborHoodName"
label="所属小区"
min-width="160">
</el-table-column>
<el-table-column prop="buildingType"
label="楼栋类型"
min-width="140">
</el-table-column>
<el-table-column prop="totalUnitNum"
label="单元数">
</el-table-column>
<el-table-column prop="totalFloorNum"
label="层数">
</el-table-column>
<el-table-column prop="totalHouseNum"
label="总户数">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="140"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<!-- <el-button type="text"
style="color:#feb349;text-decoration: underline;"
size="small"
@click="handleToNextLevel(scope.row)">进入</el-button> -->
<el-button type="text"
class="div-table-button--detail"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button v-if="scope.row.showBtn"
type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="scope.row.showBtn"
type="text"
class="div-table-button--delete"
size="small"
@click="handleDelete(scope.row)">删除</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="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
top="5vh"
width="900px"
class="dialog-h"
@closed="diaClose">
<build-form ref="ref_form"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></build-form>
</el-dialog>
</div>
</template>
<script>
import BuildForm from './buildForm'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
importBuildingLoading: false,
importRoomLoading: false,
total: 0,
pageSize: 20,
pageNo: 0,
tableLoading: true,
agencyObj: {},//
ownerName: '',
ownerPhone: '',
validTableDataNum: 0,//
selection: [],
//form
formShow: false,
formTitle: '新增楼栋',
}
},
components: {
BuildForm
},
async mounted () {
console.log('building11111111111111111111111111')
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
//
resetSearch () {
this.ownerName = ''
this.ownerPhone = ''
this.pageSize = 10
this.pageNo = 0
// this.loadTable()
},
handleSearch () {
this.loadTable()
},
checkSelect (row, index) {
let isChecked = false;
if (row.showBtn) { //
isChecked = true
} else {
isChecked = false
}
return isChecked
},
async loadTable (fromTree, treeObj) {
this.tableLoading = true
if (fromTree) {
this.agencyObj = treeObj
// if (this.agencyObj.pid === this.staffAgencyId) {//idid
// this.showImportBtn = true
// } else {
// this.showImportBtn = false
// }
}
console.log(this.agencyObj)
const url = "/gov/org/building/buildinglist"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
neighborHoodId: this.agencyObj.id
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.validTableDataNum = 0
this.total = data.total
data.list.forEach(item => {
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true
this.validTableDataNum++
} else {
item.showBtn = false
}
});
this.tableData = data.list
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
handleDetail (row) {
this.formTitle = '楼栋详情'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row, this.agencyObj)
})
},
handleAdd () {
this.formTitle = '新增楼栋'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('add', null, this.agencyObj)
})
},
handleEdit (row) {
this.formTitle = '修改楼栋'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('edit', row, this.agencyObj)
})
},
handleToNextLevel (row) {
this.$emit('toNextLevel', row, 'building')
},
addFormCancle () {
this.formShow = false
},
addFormOk () {
this.formShow = false
this.loadTable()
this.$emit('refreshTree')
},
deleteBatch () {
if (this.selection.length > 0) {
this.$confirm("确认删除选择的楼栋?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteCommunityBatch()
})
.catch(err => {
if (err == "cancel") {
// this.$message({
// type: "info",
// message: ""
// });
}
});
} else {
this.$message.warning('请先选择要删除的楼栋')
}
},
selectAll (selection) {
this.selection = selection
},
selectionChange (selection) {
this.selection = selection
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteBuild(row)
})
.catch(err => {
if (err == "cancel") {
// this.$message({
// type: "info",
// message: ""
// });
}
});
},
async deleteCommunityBatch () {
let ids = []
this.selection.forEach(element => {
ids.push(element.buildingId)
});
const url = "/gov/org/house/delete"
let params = {
type: 'building',
ids: ids
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.$emit('refreshTree')
this.loadTable()
} else if (code > 8000) {
this.$message({
showClose: true,
message: msg,
duration: 0
})
this.$emit('refreshTree')
this.loadTable()
} else {
this.$message.error(msg)
}
},
async deleteBuild (row) {
const url = "/gov/org/building/buildingdel"
let params = {
buildingId: row.buildingId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.$emit('refreshTree')
this.loadTable()
} else {
this.$message.error(msg)
}
},
//
async handleExport () {
let title = this.agencyObj.label
title = title + '—楼栋列表'
const url = "/gov/org/building/exportbuildinginfo"
let params = {
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
neighborHoodId: this.agencyObj.id
}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
download (data, fileName) {
if (!data) {
return
}
var csvData = new Blob([data])
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(csvData, fileName);
}
// for Non-IE (chrome, firefox etc.)
else {
var a = document.createElement('a');
document.body.appendChild(a);
a.style = 'display: none';
var url = window.URL.createObjectURL(csvData);
a.href = url;
a.download = fileName;
a.click();
a.remove();
window.URL.revokeObjectURL(url);
}
},
handleExportModule (type) {
let title = ''
let url = ""
if (type === 'building') {
title = '楼栋导入模板'
url = '/gov/org/building/exporttemplate'
} else if (type === 'room') {
title = '房屋导入模板'
url = '/gov/org/house/exporttemplate'
}
let params = {}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
beforeUpload (file, type) {
this.files = file;
const isText = file.type === 'application/vnd.ms-excel'
const isTextComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
if (!isText && !isTextComputer) {
this.$message.error('请选择正确格式的文件')
this.files = null
this.fileName = ''
return false
} else {
this.fileName = file.name;
return true
}
},
//
handleExceed (files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`)
},
async uploadFile (type) {
if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!')
return false
}
this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
//
let url = ''
let params = {}
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level);//filenamefiletest.zip
// params.file = fileFormData
// params.orgId = this.agencyObj.id
// params.orgType = this.agencyObj.level
if (type === 'building') {
this.$refs['upload_building'].clearFiles()
// url = 'http://192.168.51.26:8080/api/gov/org/building/buildingimport'
url = '/gov/org/building/buildingimport'
this.importBuildingLoading = true
} else if (type === 'room') {
this.$refs['upload_room'].clearFiles()
// url = 'http://192.168.51.26:8080/api/gov/org/house/houseimport'
url = '/gov/org/house/houseimport'
this.importRoomLoading = true
}
window.app.ajax.post2(url, fileFormData,
(data, rspMsg) => {
if (data.code === 0 && data.msg == 'success') {
// this.$message.success('')
} else {
// this.$message({
// showClose: true,
// message: rspMsg,
// duration: 0,
// type: "error"
// })
// this.$message.error(rspMsg)
}
this.$emit('refreshTree')
this.loadTable()
if (type === 'building') {
this.importBuildingLoading = false
} else if (type === 'room') {
this.importRoomLoading = false
}
},
(rspMsg, data) => {
if (type === 'building') {
this.importBuildingLoading = false
} else if (type === 'room') {
this.importRoomLoading = false
}
}, { headers: { 'Content-Type': 'multipart/form-data' } })
},
showMessage (msg) {
this.$alert(msg, '操作结果', {
confirmButtonText: '关闭',
callback: action => {
this.$emit('refreshTree')
this.loadTable()
}
});
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
watch: {
},
props: {
staffAgencyId: {
type: String,
default: '',
},
showImportBtn: {
type: Boolean,
default: false,
},
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManage.scss";
</style>

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

@ -1,51 +1,18 @@
<template>
<div>
<div class="div_search">
<div class="resi-cell">
<div class="resi-cell-label">房主姓名</div>
<div class="resi-cell-value">
<el-input v-model="ownerName"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<div class="resi-cell">
<div class="resi-cell-label">房主手机</div>
<div class="resi-cell-value">
<el-input v-model="ownerPhone"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<el-button style="margin-left:10px"
class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button>
</div>
<div class="div_btn">
<el-button style="float:left"
class="diy-button--add"
size="small"
@click="handleAdd">新增楼</el-button>
@click="handleAdd">新增楼栋</el-button>
<div class="btn_upload"
v-if="showImportBtn">
<el-button style=";margin-left:10px"
class="diy-button--export"
size="small"
@click="handleExportModule('building')">下载楼模板</el-button>
@click="handleExportModule('building')">下载楼栋模板</el-button>
<el-upload style=""
ref="upload_building"
@ -57,7 +24,7 @@
:http-request="(()=>{uploadFile( 'building')})">
<el-button style="margin-left:10px"
size="small"
class="diy-button--delete">导入楼数据</el-button>
class="diy-button--delete">导入楼数据</el-button>
</el-upload>
<el-button style=";margin-left:10px"
class="diy-button--export"
@ -200,18 +167,17 @@ export default {
pageSize: 20,
pageNo: 0,
tableLoading: true,
tableData: [],
agencyObj: {},//
ownerName: '',
ownerPhone: '',
validTableDataNum: 0,//
selection: [],
//form
formShow: false,
formTitle: '新增楼',
formTitle: '新增楼',
}
},
@ -224,25 +190,14 @@ export default {
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300
return this.$store.state.inIframe ? this.clientHeight - 270 + this.iframeHeight : this.clientHeight - 270
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
//
resetSearch () {
this.ownerName = ''
this.ownerPhone = ''
this.pageSize = 10
this.pageNo = 0
// this.loadTable()
},
handleSearch () {
this.loadTable()
},
checkSelect (row, index) {
let isChecked = false;
@ -273,8 +228,7 @@ export default {
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
neighborHoodId: this.agencyObj.id
}
@ -344,7 +298,7 @@ export default {
deleteBatch () {
if (this.selection.length > 0) {
this.$confirm("确认删除选择的楼?", "提示", {
this.$confirm("确认删除选择的楼?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
@ -362,7 +316,7 @@ export default {
});
} else {
this.$message.warning('请先选择要删除的楼')
this.$message.warning('请先选择要删除的楼')
}
},
selectAll (selection) {
@ -460,8 +414,7 @@ export default {
const url = "/gov/org/building/exportbuildinginfo"
let params = {
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
neighborHoodId: this.agencyObj.id
}
@ -510,7 +463,7 @@ export default {
let title = ''
let url = ""
if (type === 'building') {
title = '楼导入模板'
title = '楼导入模板'
url = '/gov/org/building/exporttemplate'
} else if (type === 'room') {

341
src/views/modules/base/community/community copy.vue

@ -0,0 +1,341 @@
<template>
<div class="div_main">
<div :style="{height:rowHeight}"
class="div_tree">
<el-input placeholder="输入关键字进行过滤"
v-model="filterText">
</el-input>
<el-scrollbar :style="{height:treeHeight}"
class="scrollar">
<el-tree ref="ref_tree"
v-loading="treeLoading"
class="filter_tree"
:data="treeData"
:props="defaultProps"
:highlight-current="true"
node-key="id"
:expand-on-click-node="false"
default-expand-all
:filter-node-method="filterNode"
@node-click="handleNodeClick">
</el-tree>
</el-scrollbar>
</div>
<div :style="{height:rowHeight}"
class="div_table">
<build-table v-if="selTreeObj.level==='neighborHood'"
ref="ref_neighTable"
:staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn"
@toNextLevel="toNextLevel"
@refreshTree="refreshTree"></build-table>
<room-table v-else-if="selTreeObj.level==='building'"
:staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn"
ref="ref_buildingTable"
@refreshTree="refreshTree"></room-table>
<community-table v-else
@toNextLevel="toNextLevel"
:staffAgencyId="staffAgencyId"
ref="ref_communityTable"
@refreshTree="refreshTree"></community-table>
</div>
</div>
</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
let loading //
export default {
data () {
return {
filterText: '',
treeLoading: true,
treeData: [],
defaultProps: {
children: 'children',
label: 'showName'
},
selTreeObj: {},
centerPoint: [],
staffAgencyId: localStorage.getItem("agencyId"),
showImportBtn: false
}
},
components: {
CDialog
},
async mounted () {
this.treeLoading = true
await this.loadOrgData()
await this.loadTree()
await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj)
if (this.treeData.length > 0) {
this.$nextTick(() => {
// ref_tree ref value node-key
this.$refs.ref_tree.setCurrentKey(this.treeData[0].id);
});
}
this.treeLoading = false
},
computed: {
rowHeight () {
return this.$store.state.inIframe ? this.clientHeight - 120 + this.iframeHeight + 'px' : this.clientHeight - 120 + 'px'
},
treeHeight () {
return this.$store.state.inIframe ? this.clientHeight - 200 + this.iframeHeight + 'px' : this.clientHeight - 200 + 'px'
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
async loadTree (isRefresh) {
const url = "/gov/org/building/treelist"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.treeData = data
if (!isRefresh && data.length > 0) {
this.selTreeObj = data[0]
if (!this.selTreeObj.latitude) {
this.selTreeObj.latitude = this.centerPoint[0]
}
if (!this.selTreeObj.longitude) {
this.selTreeObj.longitude = this.centerPoint[1]
}
}
} else {
this.$message.error(msg)
}
},
//
async loadOrgData () {
const url = "/gov/org/agency/maporg"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/maporg"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.centerPoint = []
this.centerPoint.push(data.latitude)
this.centerPoint.push(data.longitude)
} else {
this.$message.error(msg)
}
},
handleNodeClick (obj) {
this.getTreeObj(obj)
this.$nextTick(() => {
if (obj.level === 'building') {//
this.$refs['ref_buildingTable'].loadTable(true, this.selTreeObj)
} else if (obj.level === 'neighborHood') {//
this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj)
} else {
this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj)
}
})
},
//
async refreshTree () {
this.treeLoading = true
await this.loadTree(this.selTreeObj.id)
this.$nextTick(() => {
// ref_tree ref value node-key
this.$refs.ref_tree.setCurrentKey(this.selTreeObj.id);
});
this.treeLoading = false
},
//
toNextLevel (row, level) {
if (level === 'community') {
this.selTreeObj = this.$refs.ref_tree.getNode(row.neighborHoodId).data
} else {
this.selTreeObj = this.$refs.ref_tree.getNode(row.buildingId).data
}
this.handleNodeClick(this.selTreeObj)
this.$nextTick(() => {
// ref_tree ref value node-key
this.$refs.ref_tree.setCurrentKey(this.selTreeObj.id);
});
},
//
getTreeObj (obj) {
//
// idtype
// idtypeidid
// idtypeid
if (obj.level === 'building') {//
let neighborHoodNode = this.$refs.ref_tree.getNode(obj.pid)//
let gridNode = this.$refs.ref_tree.getNode(neighborHoodNode.data.pid)//
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)//
obj.agencyId = agencyNode.data.id
obj.agencyName = agencyNode.data.label
obj.gridId = gridNode.data.id
obj.gridName = gridNode.data.label
obj.neighborHoodId = neighborHoodNode.data.id
obj.neighborHoodName = neighborHoodNode.data.label
if (obj.agencyId === this.staffAgencyId) {
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else if (obj.level === 'neighborHood') {//
let gridNode = this.$refs.ref_tree.getNode(obj.pid)
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)
obj.gridId = gridNode.data.id
obj.gridName = gridNode.data.label
obj.agencyId = agencyNode.data.id
obj.agencyName = agencyNode.data.label
if (obj.agencyId === this.staffAgencyId) {
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else {
}
if (!obj.latitude) {
obj.latitude = this.centerPoint[0]
}
if (!obj.longitude) {
obj.longitude = this.centerPoint[1]
}
this.selTreeObj = obj
console.log(this.selTreeObj)
},
filterNode (value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
watch: {
filterText (val) {
this.$refs.ref_tree.filter(val);
}
},
components: {
communityTable, buildTable, roomTable
}
}
</script>
<style lang="scss" scoped >
.div_main {
display: flex;
}
.scrollar {
margin-top: 10px;
}
.div_tree {
flex: 0 0 280px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
overflow-y: hidden;
}
.filter_tree {
overflow-x: auto;
}
.div_table {
margin-left: 15px;
// flex: 1;
width: calc(100% - 300px);
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
}
.div_btn {
margin-top: 20px;
}
.row {
padding: 10px;
}
</style>
<style>
/* .aui-content > .el-tabs > .el-tabs__content {
padding: 0px;
} */
.el-tree-node:focus > .el-tree-node__content {
/* background-color: #ccc !important; */
color: #2195fe;
}
</style>
<style lang="scss" scoped>
.div_tree {
/deep/ .el-scrollbar__wrap {
overflow-x: hidden !important;
}
}
</style>

132
src/views/modules/base/community/community.vue

@ -26,19 +26,77 @@
<div :style="{height:rowHeight}"
class="div_table">
<build-table v-if="selTreeObj.level==='neighborHood'"
<div class="div_search">
<div class="resi-cell">
<div class="resi-cell-label">房主姓名</div>
<div class="resi-cell-value">
<el-input v-model="ownerName"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<div class="resi-cell">
<div class="resi-cell-label">房主手机</div>
<div class="resi-cell-value">
<el-input v-model="ownerPhone"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<div class="resi-cell">
<div class="resi-cell-label">房屋状态</div>
<div class="resi-cell-value">
<el-select class="item_width_1"
v-model="rentState"
placeholder="请选择"
size="small"
clearable>
<el-option v-for="item in rentList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</div>
<el-button style="margin-left:10px"
class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button>
<!-- <el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button> -->
</div>
<build-table v-if="selTreeObj.level==='neighborHood'&&!showRoomTable"
ref="ref_neighTable"
:staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn"
@toNextLevel="toNextLevel"
@refreshTree="refreshTree"></build-table>
<room-table v-else-if="selTreeObj.level==='building'"
<room-table v-if="showRoomTable||selTreeObj.level==='building'"
:staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn"
ref="ref_buildingTable"
@refreshTree="refreshTree"></room-table>
<community-table v-else
<community-table v-if="(selTreeObj.level!=='building'||selTreeObj.level!=='neighborHood')&&!showRoomTable"
@toNextLevel="toNextLevel"
:staffAgencyId="staffAgencyId"
ref="ref_communityTable"
@ -74,8 +132,27 @@ export default {
centerPoint: [],
staffAgencyId: localStorage.getItem("agencyId"),
showImportBtn: false
showImportBtn: false,
rentList: [
{
value: '1',
label: '出租'
},
{
value: '2',
label: '闲置'
},
{
value: '0',
label: '自住'
},
],
ownerName: '',
ownerPhone: '',
rentState: '',
showRoomTable: false,
selObj: {},
}
},
components: {
@ -99,7 +176,7 @@ export default {
computed: {
rowHeight () {
return this.$store.state.inIframe ? this.clientHeight - 120 + this.iframeHeight + 'px' : this.clientHeight - 120 + 'px'
return this.$store.state.inIframe ? this.clientHeight - 140 + this.iframeHeight + 'px' : this.clientHeight - 140 + 'px'
},
treeHeight () {
@ -110,6 +187,32 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
handleSearch () {
if (this.ownerName || this.ownerPhone || this.rentState) {
this.showRoomTable = true
this.$nextTick(() => {
this.$refs['ref_buildingTable'].loadTable(false, this.selTreeObj, this.ownerName, this.ownerPhone, this.rentState)
})
} else {
this.$message.warning('请输入查询条件')
}
},
//
resetSearch () {
this.ownerName = ''
this.ownerPhone = ''
this.rentState = ''
this.pageSize = 10
this.pageNo = 1
this.handleNodeClick(this.selObj)
// this.loadTable()
},
async loadTree (isRefresh) {
const url = "/gov/org/building/treelist"
let params = {}
@ -157,14 +260,15 @@ export default {
},
handleNodeClick (obj) {
this.getTreeObj(obj)
this.ownerName = ''
this.ownerPhone = ''
this.rentState = ''
this.showRoomTable = false
this.selObj = JSON.parse(JSON.stringify(obj))
this.getTreeObj(obj)
this.$nextTick(() => {
if (obj.level === 'building') {//
this.$refs['ref_buildingTable'].loadTable(true, this.selTreeObj)
@ -343,3 +447,7 @@ export default {
}
}
</style>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManage.scss";
</style>

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

@ -74,18 +74,6 @@
</el-input>
</el-form-item>
<el-form-item label="备注"
prop="remark"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="dataForm.remark"></el-input>
</el-form-item>
<el-form-item label="位置坐标"
prop="longitude"
label-width="150px"
@ -118,6 +106,19 @@
</div>
</div>
</el-form-item>
<el-form-item label="备注"
prop="remark"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:rows="3"
placeholder="请输入备注,不超过500字"
v-model="dataForm.remark"></el-input>
</el-form-item>
</el-form>
</div>

793
src/views/modules/base/community/communityTable copy.vue

@ -0,0 +1,793 @@
<template>
<div>
<div class="div_search">
<div class="resi-cell">
<div class="resi-cell-label">房主姓名</div>
<div class="resi-cell-value">
<el-input v-model="ownerName"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<div class="resi-cell">
<div class="resi-cell-label">房主手机</div>
<div class="resi-cell-value">
<el-input v-model="ownerPhone"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<el-button style="margin-left:10px"
class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button>
<!-- <el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button> -->
</div>
<div class="div_btn">
<el-button style=""
class="diy-button--add"
size="small"
@click="handleAdd">新增小区</el-button>
<div class="btn_upload"
v-if="showImportBtn">
<el-button style=""
class="diy-button--export"
size="small"
@click="handleExportModule('community')">下载小区模板</el-button>
<el-upload ref="upload_community"
style=""
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'community')})"
action=""
accept=".xls,.xlsx"
:http-request="(()=>{uploadFile( 'community')})">
<el-button style="margin-left:10px"
size="small"
class="diy-button--delete">导入小区数据</el-button>
</el-upload>
<el-button style=";margin-left:10px"
class="diy-button--export"
size="small"
@click="handleExportModule('building')">下载楼栋模板</el-button>
<el-upload style=""
ref="upload_building"
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'building')})"
action=""
accept=".xls,.xlsx"
:http-request="(()=>{uploadFile( 'building')})">
<el-button style="margin-left:10px"
size="small"
class="diy-button--delete">导入楼栋数据</el-button>
</el-upload>
<el-button style=";margin-left:10px"
class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载房屋模板</el-button>
<el-upload style=""
ref="upload_room"
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'room')})"
action=""
accept=".xls,.xlsx"
:http-request="(()=>{uploadFile( 'room')})">
<el-button style="margin-left:10px"
size="small"
class="diy-button--delete">导入房屋数据</el-button>
</el-upload>
</div>
<el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="handleExport">导出</el-button>
<el-button v-if="agencyObj.level == 'community'"
style="margin-left:10px"
class="diy-button--qrcode"
size="small"
@click="handleDownQr(agencyObj, 'community')">社区二维码</el-button>
<el-button style="float:left;margin-left:10px"
class="diy-button--more"
size="small"
@click="deleteBatch">批量删除</el-button>
</div>
<div class="div_table">
<el-table ref="ref_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%"
:show-overflow-tooltip="true"
@select-all="selectAll"
@selection-change="selectionChange">
<el-table-column type="selection"
:selectable="checkSelect"
width="55">
</el-table-column>
<el-table-column prop="neighborHoodName"
label="小区名称"
min-width="100">
<!-- <template slot-scope="scope">
<a class="name-a" @click="handleDetail(scope.row)">
{{ scope.row.neighborHoodName }}
</a>
</template> -->
</el-table-column>
<el-table-column prop="agencyName"
label="所属组织"
min-width="100">
</el-table-column>
<el-table-column prop="gridName"
label="所属网格"
min-width="120">
</el-table-column>
<!-- <el-table-column prop="总单元数"
label="所属网格"
min-width="80">
</el-table-column>
<el-table-column prop="总户数"
label="所属网格"
min-width="80">
</el-table-column> -->
<el-table-column prop="address"
label="详细地址"
min-width="180">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="140"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<!-- <el-button type="text"
style="color:#feb349;text-decoration: underline;"
size="small"
@click="handleToNextLevel(scope.row)">进入</el-button> -->
<!-- <el-button type="text"
class="div-table-button--qr"
size="small"
@click="handleDownQr(scope.row, 'neighborHood')">二维码</el-button> -->
<el-button type="text"
class="div-table-button--detail"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button v-if="scope.row.showBtn"
type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="scope.row.showBtn"
type="text"
class="div-table-button--delete"
size="small"
@click="handleDelete(scope.row)">删除</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="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<community-form ref="ref_form"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></community-form>
</el-dialog>
</div>
</template>
<script>
import CommunityForm from './communityForm'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import axios from 'axios'
let loading //
export default {
data () {
return {
importBuildingLoading: false,
importRoomLoading: false,
importCommunityLoading: false,
total: 0,
pageSize: 20,
pageNo: 0,
tableLoading: true,
showImportBtn: false,//
agencyObj: {},//
ownerName: '',
ownerPhone: '',
tableData: [],
validTableDataNum: 0,//
selection: [],
showDeletBtn: false,
//form
formShow: false,
formTitle: '新增小区',
files: "",
fileName: "",
uploadUlr: window.SITE_CONFIG['apiURL'] + '/gov/org/neighborhood/import'
}
},
components: {
CommunityForm
},
async mounted () {
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
//
resetSearch () {
this.ownerName = ''
this.ownerPhone = ''
this.pageSize = 10
this.pageNo = 0
// this.loadTable()
},
handleSearch () {
this.loadTable()
},
async loadTable (fromTree, treeObj) {
console.log(111, this.staffAgencyId)
this.tableLoading = true
if (fromTree) {
this.agencyObj = treeObj
if (this.agencyObj.level === 'community') {//
if (this.agencyObj.id === this.staffAgencyId) {//idid
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else if (this.agencyObj.level === 'grid') {//
if (this.agencyObj.pid === this.staffAgencyId) {//idid
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else {
this.showImportBtn = false
}
}
const url = "/gov/org/neighborhood/neighborhoodlist"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
level: this.agencyObj.level,
id: this.agencyObj.id
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.validTableDataNum = 0
this.total = data.total
data.list.forEach(item => {
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true
this.validTableDataNum++
} else {
item.showBtn = false
}
});
this.tableData = data.list
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
checkSelect (row, index) {
let isChecked = false;
if (row.showBtn) { //
isChecked = true
} else {
isChecked = false
}
return isChecked
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
handleDetail (row) {
this.formTitle = '小区详情'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row, this.agencyObj)
})
},
handleAdd () {
this.formTitle = '新增小区'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('add', null, this.agencyObj)
})
},
handleEdit (row) {
this.formTitle = '修改小区'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('edit', row, this.agencyObj)
})
},
handleToNextLevel (row) {
this.$emit('toNextLevel', row, 'community')
},
addFormCancle () {
this.formShow = false
},
addFormOk () {
this.formShow = false
this.loadTable()
this.$emit('refreshTree')
},
deleteBatch () {
if (this.selection.length > 0) {
this.$confirm("确认删除选择的小区?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteCommunityBatch()
})
.catch(err => {
if (err == "cancel") {
// this.$message({
// type: "info",
// message: ""
// });
}
});
} else {
this.$message.warning('请先选择要删除的小区')
}
},
selectAll (selection) {
this.selection = selection
},
selectionChange (selection) {
this.selection = selection
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteCommunity(row)
})
.catch(err => {
if (err == "cancel") {
// this.$message({
// type: "info",
// message: ""
// });
}
});
},
async deleteCommunityBatch () {
let ids = []
console.log(this.selection)
this.selection.forEach(element => {
ids.push(element.neighborHoodId)
});
const url = "/gov/org/house/delete"
let params = {
type: 'neighborHood',
ids: ids
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.$emit('refreshTree')
this.loadTable()
} else if (code > 8000) {
this.$message({
showClose: true,
message: msg,
duration: 0
})
this.$emit('refreshTree')
this.loadTable()
} else {
this.$message.error(msg)
}
},
async deleteCommunity (row) {
const url = "/gov/org/neighborhood/neighborhooddel"
let params = {
neighborHoodId: row.neighborHoodId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.$emit('refreshTree')
this.loadTable()
} else {
this.$message.error(msg)
}
},
async handleDownQr (row, type) {
// const url = window.SITE_CONFIG['apiURL'] + `/gov/org/icneighborhood/createQrCode/${row.neighborHoodId}`
const url = '/gov/org/agency/create-qrcode'
const _id = type == 'community' ? row.id : row.neighborHoodId
const params = {
id: _id,
type
}
await axios({
method: 'POST',
url: window.SITE_CONFIG['apiURL'] + url,
data: params,
responseType: 'blob'
}).then(res => {
console.log('res----1r', res)
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
this.download(res.data, fileName) //blob
} else this.$message.error('下载失败')
// this.download(res.data, '1.png')
})
},
//
async handleExport () {
let title = this.agencyObj.label
title = title + '—小区列表'
const url = "/gov/org/neighborhood/exportneighborhoodinfo"
let params = {
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
level: this.agencyObj.level,
id: this.agencyObj.id
}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
download (data, downFileName) {
if (!data) {
return
}
var csvData = new Blob([data])
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(csvData, downFileName);
}
// for Non-IE (chrome, firefox etc.)
else {
var a = document.createElement('a');
document.body.appendChild(a);
a.style = 'display: none';
var url = window.URL.createObjectURL(csvData);
a.href = url;
a.download = downFileName;
a.click();
a.remove();
window.URL.revokeObjectURL(url);
}
},
handleExportModule (type) {
let title = ''
let url = ""
if (type === 'community') {
title = '小区导入模板'
url = '/gov/org/neighborhood/exporttemplate'
} else if (type === 'building') {
title = '楼栋导入模板'
url = '/gov/org/building/exporttemplate'
} else if (type === 'room') {
title = '房间导入模板'
url = '/gov/org/house/exporttemplate'
}
let params = {}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
beforeUpload (file, type) {
this.files = file;
const isText = file.type === 'application/vnd.ms-excel'
const isTextComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
if (!isText && !isTextComputer) {
this.$message.error('请选择正确格式的文件')
this.files = null
this.fileName = ''
return false
} else {
this.fileName = file.name;
return true
}
},
//
handleExceed (files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`)
},
async uploadFile (type) {
if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!')
return false
}
this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
//
let url = ''
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level === 'grid' ? 'grid' : 'agency');//filenamefiletest.zip
if (type === 'community') {
this.importCommunityLoading = true
this.$refs['upload_community'].clearFiles()
url = '/gov/org/icneighborhood/neighborhoodimport'
} else if (type === 'building') {
this.$refs['upload_building'].clearFiles()
url = '/gov/org/building/buildingimport'
this.importBuildingLoading = true
} else if (type === 'room') {
this.$refs['upload_room'].clearFiles()
url = '/gov/org/house/houseimport'
this.importRoomLoading = true
}
window.app.ajax.post2(url, fileFormData,
(data, rspMsg) => {
if (data.code === 0 && data.msg == 'success') {
// this.$message.success('')
} else {
// this.$message({
// showClose: true,
// message: rspMsg,
// duration: 0,
// type: "error"
// })
// this.$message.error(rspMsg)
}
this.$emit('refreshTree')
this.loadTable()
// this.showMessage(rspMsg)
if (type === 'community') {
this.importCommunityLoading = false
} else if (type === 'building') {
this.importBuildingLoading = false
} else if (type === 'room') {
this.importRoomLoading = false
}
},
(rspMsg, data) => {
if (type === 'community') {
this.importCommunityLoading = false
} else if (type === 'building') {
this.importBuildingLoading = false
} else if (type === 'room') {
this.importRoomLoading = false
}
// this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } })
},
showMessage (msg) {
this.$alert(msg, '操作结果', {
confirmButtonText: '关闭',
callback: action => {
this.$emit('refreshTree')
this.loadTable()
}
});
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
watch: {
selection (val) {
if (val.length > 0) {
this.showDeletBtn = true
} else {
this.showDeletBtn = false
}
}
},
props: {
staffAgencyId: {
type: String,
default: '',
},
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManage.scss";
</style>
<style >
.el-message.is-closable .el-message__content {
line-height: 20px;
}
</style>

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

@ -1,43 +1,6 @@
<template>
<div>
<div class="div_search">
<div class="resi-cell">
<div class="resi-cell-label">房主姓名</div>
<div class="resi-cell-value">
<el-input v-model="ownerName"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<div class="resi-cell">
<div class="resi-cell-label">房主手机</div>
<div class="resi-cell-value">
<el-input v-model="ownerPhone"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<el-button style="margin-left:10px"
class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button>
<!-- <el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button> -->
</div>
<div class="div_btn">
<el-button style=""
class="diy-button--add"
@ -67,7 +30,7 @@
<el-button style=";margin-left:10px"
class="diy-button--export"
size="small"
@click="handleExportModule('building')">下载楼模板</el-button>
@click="handleExportModule('building')">下载楼模板</el-button>
<el-upload style=""
ref="upload_building"
@ -79,7 +42,7 @@
:http-request="(()=>{uploadFile( 'building')})">
<el-button style="margin-left:10px"
size="small"
class="diy-button--delete">导入楼数据</el-button>
class="diy-button--delete">导入楼数据</el-button>
</el-upload>
<el-button style=";margin-left:10px"
class="diy-button--export"
@ -123,6 +86,7 @@
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%"
:show-overflow-tooltip="true"
@select-all="selectAll"
@selection-change="selectionChange">
<el-table-column type="selection"
@ -158,10 +122,7 @@
label="详细地址"
min-width="180">
</el-table-column>
<el-table-column prop="remark"
label="备注"
min-width="50">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="140"
@ -250,8 +211,7 @@ export default {
showImportBtn: false,//
agencyObj: {},//
ownerName: '',
ownerPhone: '',
tableData: [],
validTableDataNum: 0,//
selection: [],
@ -285,18 +245,7 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
//
resetSearch () {
this.ownerName = ''
this.ownerPhone = ''
this.pageSize = 10
this.pageNo = 0
// this.loadTable()
},
handleSearch () {
this.loadTable()
},
async loadTable (fromTree, treeObj) {
console.log(111, this.staffAgencyId)
@ -325,8 +274,7 @@ export default {
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
level: this.agencyObj.level,
id: this.agencyObj.id
}
@ -547,8 +495,7 @@ export default {
const url = "/gov/org/neighborhood/exportneighborhoodinfo"
let params = {
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
level: this.agencyObj.level,
id: this.agencyObj.id
}
@ -601,7 +548,7 @@ export default {
url = '/gov/org/neighborhood/exporttemplate'
} else if (type === 'building') {
title = '楼导入模板'
title = '楼导入模板'
url = '/gov/org/building/exporttemplate'
} else if (type === 'room') {

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

@ -68,14 +68,15 @@
</el-radio-group>
</el-form-item>
<el-form-item label="出租"
<el-form-item label="房屋状态"
prop="rentFlag"
label-width="150px"
style="display: block">
<el-radio-group v-model="rentFlag">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
<el-radio :label="1">出租</el-radio>
<el-radio :label="2">闲置</el-radio>
<el-radio :label="0">自住</el-radio>
</el-radio-group>
</el-form-item>
@ -147,7 +148,7 @@ export default {
doorName: '',//
houseType: '',//
purpose: '',//
rentFlag: 1,//10
rentFlag: 0,//10 12 0
ownerPhone: '', //
ownerName: '', //
ownerIdCard: '' //
@ -285,7 +286,7 @@ export default {
this.houseId = '' //ID
this.houseType = '1'
this.purpose = '1'
this.rentFlag = 1
this.rentFlag = 0
this.dataForm = {
neighborHoodId: '', // ID
buildingId: '',//ID
@ -293,7 +294,7 @@ export default {
doorName: '',//
houseType: '1',//
purpose: '1',//
rentFlag: 1,//10
rentFlag: 0,//10
ownerPhone: '', //
ownerName: '', //
ownerIdCard: '' //

712
src/views/modules/base/community/roomTable copy.vue

@ -0,0 +1,712 @@
<template>
<div>
<div class="div_search">
<div class="resi-cell">
<div class="resi-cell-label">房主姓名</div>
<div class="resi-cell-value">
<el-input v-model="ownerName"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<div class="resi-cell">
<div class="resi-cell-label">房主手机</div>
<div class="resi-cell-value">
<el-input v-model="ownerPhone"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<div class="resi-cell">
<div class="resi-cell-label">房屋状态</div>
<div class="resi-cell-value">
<el-select class="item_width_1"
v-model="rentState"
placeholder="请选择"
size="small"
clearable>
<el-option v-for="item in rentList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</div>
<el-button style="margin-left:10px"
class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button>
</div>
<div class="div_btn">
<el-button style="float:left"
class="diy-button--add"
size="small"
@click="handleAdd">新增房屋</el-button>
<div class="btn_upload"
v-if="showImportBtn">
<el-button style="float:left"
class="diy-button--export"
size="small"
@click="handleExportModule">下载房屋模板</el-button>
<el-upload ref="upload"
:multiple='false'
:show-file-list='false'
:before-upload="beforeUpload"
action=""
accept=".xls,.xlsx"
:limit="1"
:on-exceed="handleExceed"
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small"
class="diy-button--delete">导入房屋数据</el-button>
</el-upload>
</div>
<el-button style="float:left;margin-left:10px"
class="diy-button--reset"
size="small"
@click="handleExport">导出</el-button>
<el-button style="float:left;margin-left:10px"
class="diy-button--more"
size="small"
@click="deleteBatch">批量删除</el-button>
</div>
<div class="div_table">
<el-table ref="ref_table"
:data="tableData"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
v-loading="tableLoading"
border
:height="tableHeight"
style="width: 100%"
@select-all="selectAll"
@selection-change="selectionChange">
<el-table-column type="selection"
:selectable="checkSelect"
width="55">
</el-table-column>
<el-table-column prop="houseNameShow"
label="房屋名称"
min-width="160">
</el-table-column>
<el-table-column prop="neighborHoodName"
label="所属小区"
min-width="150">
</el-table-column>
<el-table-column prop="buildingName"
label="所属楼栋"
width="80">
</el-table-column>
<el-table-column prop="unitNumShow"
label="单元号"
width="70">
</el-table-column>
<el-table-column prop="doorName"
label="门牌号"
width="70">
</el-table-column>
<el-table-column prop="houseType"
label="类型"
width="50">
</el-table-column>
<el-table-column prop="purpose"
label="用途"
width="50">
</el-table-column>
<el-table-column prop="rentFlag"
label="房屋状态"
width="80">
</el-table-column>
<el-table-column prop="ownerName"
label="房主姓名"
width="90">
</el-table-column>
<el-table-column prop="ownerPhone"
label="房主电话"
width="110">
</el-table-column>
<el-table-column prop="ownerIdCard"
label="身份证"
width="170">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="140"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text"
class="div-table-button--detail"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button v-if="scope.row.showBtn"
type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="scope.row.showBtn"
type="text"
class="div-table-button--delete"
size="small"
@click="handleDelete(scope.row)">删除</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="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="900px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<room-form ref="ref_form"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></room-form>
</el-dialog>
</div>
</template>
<script>
import roomForm from './roomForm'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
importRoomLoading: false,
total: 0,
pageSize: 20,
pageNo: 0,
tableLoading: true,
// showImportBtn: false,//
agencyObj: {},//
ownerName: '',
ownerPhone: '',
rentState: '',
validTableDataNum: 0,//
selection: [],
showDeletBtn: false,
tableData: [],
//form
formShow: false,
formTitle: '新增房屋',
rentList: [
{
value: '1',
label: '出租'
},
{
value: '2',
label: '闲置'
},
{
value: '0',
label: '自住'
},
]
}
},
components: {
roomForm
},
async mounted () {
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
//
resetSearch () {
this.ownerName = ''
this.ownerPhone = ''
this.rentState = ''
this.pageSize = 10
this.pageNo = 0
// this.loadTable()
},
handleSearch () {
this.loadTable()
},
checkSelect (row, index) {
let isChecked = false;
if (row.showBtn) { //
isChecked = true
} else {
isChecked = false
}
return isChecked
},
async loadTable (fromTree, treeObj, ownerName, ownerPhone, rentState) {
this.tableLoading = true
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
buildingId: this.agencyObj.id
}
if (fromTree) {
this.agencyObj = treeObj
// if (this.agencyObj.level === 'community') {//
// if (this.agencyObj.id === this.staffAgencyId) {//idid
// this.showImportBtn = true
// } else {
// this.showImportBtn = false
// }
// } else if (this.agencyObj.level === 'grid') {//
// if (this.agencyObj.pid === this.staffAgencyId) {//idid
// this.showImportBtn = true
// } else {
// this.showImportBtn = false
// }
// } else {
// this.showImportBtn = false
// }
} else {
params.ownerName = ownerName
params.ownerPhone = ownerPhone
params.rentState = rentState
}
const url = "/gov/org/house/houselist"
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.total = data.total
this.validTableDataNum = 0
data.list.forEach(item => {
item.houseNameShow = item.neighborHoodName + item.buildingName + item.unitNum + '单元' + item.doorName
item.unitNumShow = item.unitNum + '单元'
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true
this.validTableDataNum++
} else {
item.showBtn = false
}
});
this.tableData = data.list
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
handleDetail (row) {
this.formTitle = '房屋详情'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row, this.agencyObj)
})
},
handleAdd () {
this.formTitle = '新增房屋'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('add', null, this.agencyObj)
})
},
handleEdit (row) {
this.formTitle = '修改房屋'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('edit', row, this.agencyObj)
})
},
addFormCancle () {
this.formShow = false
},
addFormOk () {
this.formShow = false
this.loadTable()
},
deleteBatch () {
if (this.selection.length > 0) {
this.$confirm("确认删除选择的房屋?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteCommunityBatch()
})
.catch(err => {
if (err == "cancel") {
// this.$message({
// type: "info",
// message: ""
// });
}
});
} else {
this.$message.warning('请先选择要删除的房屋')
}
},
selectAll (selection) {
this.selection = selection
},
selectionChange (selection) {
this.selection = selection
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteRoom(row)
})
.catch(err => {
if (err == "cancel") {
// this.$message({
// type: "info",
// message: ""
// });
}
});
},
async deleteCommunityBatch () {
let ids = []
this.selection.forEach(element => {
ids.push(element.houseId)
});
const url = "/gov/org/house/delete"
let params = {
type: 'house',
ids: ids
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.$emit('refreshTree')
this.loadTable()
} else if (code > 8000) {
this.$message({
showClose: true,
message: msg,
duration: 0
})
this.$emit('refreshTree')
this.loadTable()
} else {
this.$message.error(msg)
}
},
async deleteRoom (row) {
const url = "/gov/org/house/housedel"
let params = {
houseId: row.houseId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.$emit('refreshTree')
this.loadTable()
} else {
this.$message.error(msg)
}
},
//
async handleExport () {
let title = this.agencyObj.label
title = title + '—房屋列表'
const url = "/gov/org/house/exporthouseinfo"
let params = {
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
rentState: this.rentState,
buildingId: this.agencyObj.id
}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
download (data, fileName) {
if (!data) {
return
}
var csvData = new Blob([data])
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(csvData, fileName);
}
// for Non-IE (chrome, firefox etc.)
else {
var a = document.createElement('a');
document.body.appendChild(a);
a.style = 'display: none';
var url = window.URL.createObjectURL(csvData);
a.href = url;
a.download = fileName;
a.click();
a.remove();
window.URL.revokeObjectURL(url);
}
},
handleExportModule () {
let title = ''
title = '房屋模板'
const url = "/gov/org/house/exporttemplate"
let params = {}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
beforeUpload (file) {
this.files = file;
const isText = file.type === 'application/vnd.ms-excel'
const isTextComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
if (!isText && !isTextComputer) {
this.$message.error('请选择正确格式的文件')
return false
} else {
this.fileName = file.name;
return true
}
},
//
handleExceed (files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`)
},
async uploadFile () {
if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!')
return false
}
this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
//
this.$refs['upload'].clearFiles()
var url = '/gov/org/house/houseimport'
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level);//filenamefiletest.zip
this.importRoomLoading = true
window.app.ajax.post2(url, fileFormData,
(data, rspMsg) => {
if (data.code === 0 && data.msg == 'success') {
// this.$message.success('')
} else {
// this.$message({
// showClose: true,
// message: rspMsg,
// duration: 0,
// type: "error"
// })
// this.$message.error(rspMsg)
}
this.$emit('refreshTree')
this.loadTable()
this.importRoomLoading = false
},
(rspMsg, data) => {
this.importRoomLoading = false
}, { headers: { 'Content-Type': 'multipart/form-data' } })
},
showMessage (msg) {
this.$alert(msg, '操作结果', {
confirmButtonText: '关闭',
callback: action => {
this.$emit('refreshTree')
this.loadTable()
}
});
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
watch: {
selection (val) {
if (val.length > 0) {
this.showDeletBtn = true
} else {
this.showDeletBtn = false
}
}
},
props: {
staffAgencyId: {
type: String,
default: '',
},
showImportBtn: {
type: Boolean,
default: false,
},
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManage.scss";
</style>

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

@ -1,39 +1,5 @@
<template>
<div>
<div class="div_search">
<div class="resi-cell">
<div class="resi-cell-label">房主姓名</div>
<div class="resi-cell-value">
<el-input v-model="ownerName"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<div class="resi-cell">
<div class="resi-cell-label">房主手机</div>
<div class="resi-cell-value">
<el-input v-model="ownerPhone"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<el-button style="margin-left:10px"
class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button>
</div>
<div class="div_btn">
<el-button style="float:left"
@ -113,7 +79,7 @@
width="50">
</el-table-column>
<el-table-column prop="rentFlag"
label="是否出租"
label="房屋状态"
width="80">
</el-table-column>
<el-table-column prop="ownerName"
@ -205,8 +171,7 @@ export default {
// showImportBtn: false,//
agencyObj: {},//
ownerName: '',
ownerPhone: '',
validTableDataNum: 0,//
selection: [],
showDeletBtn: false,
@ -217,6 +182,21 @@ export default {
formShow: false,
formTitle: '新增房屋',
rentList: [
{
value: '1',
label: '出租'
},
{
value: '2',
label: '闲置'
},
{
value: '0',
label: '自住'
},
]
}
},
@ -228,26 +208,14 @@ export default {
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300
return this.$store.state.inIframe ? this.clientHeight - 270 + this.iframeHeight : this.clientHeight - 270
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
//
resetSearch () {
this.ownerName = ''
this.ownerPhone = ''
this.pageSize = 10
this.pageNo = 0
// this.loadTable()
},
handleSearch () {
this.loadTable()
},
checkSelect (row, index) {
let isChecked = false;
@ -259,8 +227,9 @@ export default {
return isChecked
},
async loadTable (fromTree, treeObj) {
async loadTable (fromTree, treeObj, ownerName, ownerPhone, rentFlag) {
this.tableLoading = true
let params
if (fromTree) {
this.agencyObj = treeObj
// if (this.agencyObj.level === 'community') {//
@ -278,17 +247,27 @@ export default {
// } else {
// this.showImportBtn = false
// }
params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
level: this.agencyObj.level,
id: this.agencyObj.id,
}
} else {
params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
level: this.agencyObj.level,
id: this.agencyObj.id,
}
params.ownerName = ownerName
params.ownerPhone = ownerPhone
params.rentFlag = rentFlag
}
const url = "/gov/org/house/houselist"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
buildingId: this.agencyObj.id
}
const { data, code, msg } = await requestPost(url, params)
@ -473,6 +452,7 @@ export default {
let params = {
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
rentFlag: this.rentFlag,
buildingId: this.agencyObj.id
}

4
src/views/modules/base/epidemic/travel.vue

@ -116,11 +116,11 @@
<el-button style="margin-left:15px"
class="diy-button--more"
size="small"
@click="handleAttention">加入关注</el-button>
@click="handleAttention">加入核酸检测关注</el-button>
<el-button style="margin-left:15px"
class="diy-button--more"
size="small"
@click="handleDeletes">取消关注</el-button>
@click="handleDeletes">取消核酸检测关注</el-button>
</div>
<el-table class="table"

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

@ -92,7 +92,7 @@
<el-button @click="handleTransfer(scope.row)"
type="text"
size="small"
class="div-table-button--detail"></el-button>
class="div-table-button--detail"></el-button>
<el-button @click="handleChangeRecord(scope.row)"
type="text"
size="small"
@ -240,7 +240,7 @@
<el-dialog :visible.sync="tranferShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'人员动'"
:title="'人员动'"
width="950px"
top="5vh"
class="dialog-h"
@ -497,7 +497,9 @@ export default {
item.options.forEach((n) => {
if (n.value === row[item.columnName]) _val = n.label
})
if (row[item.columnName] == '0') _val = '--'
}
return _val || row[item.columnName]
},
handleSearch (val) {
@ -1146,14 +1148,14 @@ export default {
.tabs-other-info {
::v-deep .el-tabs__item {
// width: 50px;
height: 20px;
height: 24px;
box-sizing: border-box;
margin-right: 7px;
padding: 0 10px !important;
font-size: 8px;
font-weight: 500;
font-size: 16px;
font-weight: 400;
color: #666666;
line-height: 20px;
line-height: 24px;
background: #ebecf1;
border-radius: 2px;
}

2
src/views/modules/communityParty/elegant/index.vue

@ -186,7 +186,7 @@
<el-input v-model="form.name" placeholder="请输入" :disabled="disabled" class="input-width" clearable></el-input>
</el-form-item>
<el-form-item label="主要事迹" prop="mainDeed">
<el-input v-model="form.mainDeed" :autosize="{ minRows: 2, maxRows: 10}" :disabled="disabled" type="textarea" clearable class="input-width-textarea" placeholder="请输入内容"></el-input>
<el-input v-model="form.mainDeed" :autosize="{ minRows: 10, maxRows: 10}" :disabled="disabled" type="textarea" clearable class="input-width-textarea" placeholder="请输入内容"></el-input>
</el-form-item>
<!-- <el-form-item label="状态">
<el-switch v-model="form.usableFlag"></el-switch>

50
src/views/modules/communityParty/regionalParty/activitys.vue

@ -39,6 +39,21 @@
</el-form-item>
<el-form-item label="所属网格"
prop="gridId">
<el-select class="item_width_1"
v-model="formData.gridId"
placeholder="全部"
clearable>
<el-option v-for="item in gridList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="活动标题"
@ -124,6 +139,12 @@
label="单位名称"
width="180">
</el-table-column>
<el-table-column prop="所属网格"
header-align="center"
align="center"
label="单位名称"
width="180">
</el-table-column>
<el-table-column prop="title"
header-align="center"
align="center"
@ -208,6 +229,7 @@
@closed="diaClose">
<activitys-form ref="ref_form"
:unitList="unitList"
:gridList="gridList"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></activitys-form>
</el-dialog>
@ -222,6 +244,7 @@
@closed="detailClosed">
<activitys-detail ref="ref_detail"
:serviceList="serviceList"
:gridList="gridList"
@diaClose="diaClose"></activitys-detail>
</el-dialog>
@ -247,6 +270,7 @@ export default {
pageNo: 0,
tableLoading: false,
agencyId: '',
gridList: [],//
unitList: [],//list
serviceList: [
{
@ -279,9 +303,11 @@ export default {
title: '',
serviceMatter: '',
startTime: '',
endTime: ''
endTime: '',
gridId: ''
},
tableData: [],
//form
@ -309,15 +335,33 @@ export default {
this.agencyId = user.agencyId
//
await this.loadUnit()
this.loadUnit()
this.loadGrid()
//
await this.loadTable()
this.loadTable()
},
methods: {
handleSearch () {
this.loadTable()
},
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
},
async loadUnit () {
const url = "/heart/icpartyunit/option"

20
src/views/modules/communityParty/regionalParty/activitysDetail.vue

@ -6,7 +6,21 @@
:inline="true"
:model="formData"
class="form">
<el-form-item label="所属网格"
label-width="150px"
prop="gridId">
<el-select class="item_width_1"
v-model="formData.gridId"
placeholder="请选择"
clearable>
<el-option v-for="item in gridList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="服务事项"
label-width="150px"
prop="serviceMatterShow">
@ -136,6 +150,8 @@ export default {
async initForm (row) {
this.startLoading()
const { user } = this.$store.state
this.agencyId = user.agencyId
for (let item of this.serviceList) {
if (row.serviceMatter === item.value) {
@ -283,6 +299,10 @@ export default {
type: Array,
default: []
},
gridList: {
type: Array,
default: []
},
}
}
</script>

55
src/views/modules/communityParty/regionalParty/activitysForm.vue

@ -8,6 +8,21 @@
:rules="dataRule"
:disabled="formType === 'detail'"
class="form">
<el-form-item label="所属网格"
label-width="150px"
prop="gridId">
<el-select class="item_width_1"
v-model="formData.gridId"
placeholder="请选择"
clearable>
<el-option v-for="item in gridList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="服务事项"
label-width="150px"
@ -104,9 +119,10 @@
style="display: block"
prop="peopleCount"
label-width="150px">
<el-input-number class="item_width_1"
<el-input-number class="item_width_4"
v-model="formData.peopleCount"
:min="0"
:max="9999"
label="服务人数"></el-input-number>
</el-form-item>
<el-form-item label="活动时间"
@ -226,6 +242,7 @@ export default {
keyWords: '',
activityId: '',
formData: {
gridId: '',
serviceMatter: '',//
serviceMatterList: [],
unitId: '',//ID
@ -240,13 +257,16 @@ export default {
longitude: 36.0722275, //
latitude: 120.38945519 //
},
serviceList: []
serviceList: [],
gridList: [],
agencyId: ''
}
},
components: { Tinymce },
mounted () {
this.initMap()
},
methods: {
@ -254,6 +274,10 @@ export default {
async initForm (type, activityId) {
this.startLoading()
this.$refs.ref_form.resetFields();
// const { user } = this.$store.state
// this.agencyId = user.agencyId
// await this.loadGrid()
//
await this.loadService()
@ -269,6 +293,23 @@ export default {
}
this.endLoading()
},
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
},
//
@ -478,6 +519,7 @@ export default {
this.activityId = ''
this.keyWords = ''
this.formData = {
gridId: '',
serviceMatter: '',//
serviceMatterList: [],
unitId: '',//ID
@ -550,11 +592,12 @@ export default {
type: Array,
default: []
},
gridList: {
type: Array,
default: []
},
// serviceList: {
// type: Array,
// default: []
// },
}
}
</script>

3
src/views/modules/communityParty/regionalParty/unitsForm.vue

@ -73,9 +73,10 @@
style="display: block"
prop="memberCount"
label-width="150px">
<el-input-number class="item_width_1"
<el-input-number class="item_width_4"
v-model="formData.memberCount"
:min="0"
:max="9999"
label="在职党员"></el-input-number>
</el-form-item>
<el-form-item label="备注"

730
src/views/modules/visual/basicinfo/people.vue

@ -1,387 +1,399 @@
<template>
<div class="g-cpt">
<div class="g-l">
<div class="m-people">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>人员情况</span>
</div>
<div class="more"
@click="showedMoreInfo = true">查看更多</div>
<div class="ren">
<img class="pic-ren"
src="@/assets/img/shuju/people/ren.png" />
<div class="ren-name">
<span>{{ info.name }}</span>
<img src="@/assets/img/shuju/people/arrow.png" />
<div class="g-wrr">
<div class="g-bread">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item v-for="item in breadList" :key="item.path" :to="{ path: item.path }">
{{ item.meta.title }}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="g-cpt">
<div class="g-l">
<div class="m-people">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>人员情况</span>
</div>
<div class="ren-prop z-1">
<img src="@/assets/img/shuju/people/ren-prop-1.png" />
<span>所属网格</span>
<div class="ren-cnt">
<h5>所属网格</h5>
<p>
{{ info.gridName }}
</p>
<div class="more"
@click="showedMoreInfo = true">查看更多</div>
<div class="ren">
<img class="pic-ren"
src="@/assets/img/shuju/people/ren.png" />
<div class="ren-name">
<span>{{ info.name }}</span>
<img src="@/assets/img/shuju/people/arrow.png" />
</div>
<div class="ren-prop z-1">
<img src="@/assets/img/shuju/people/ren-prop-1.png" />
<span>所属网格</span>
<div class="ren-cnt">
<h5>所属网格</h5>
<p>
{{ info.gridName }}
</p>
</div>
</div>
</div>
<div class="ren-prop z-2">
<img src="@/assets/img/shuju/people/ren-prop-2.png" />
<span>人员类别</span>
<div class="ren-cnt">
<h5>人员类别</h5>
<p>
{{
info.personCategory.length == 0
? "--"
: info.personCategory.join("、")
}}
</p>
<div class="ren-prop z-2">
<img src="@/assets/img/shuju/people/ren-prop-2.png" />
<span>人员类别</span>
<div class="ren-cnt">
<h5>人员类别</h5>
<p>
{{
info.personCategory.length == 0
? "--"
: info.personCategory.join("、")
}}
</p>
</div>
</div>
</div>
<div class="ren-prop z-3">
<img src="@/assets/img/shuju/people/ren-prop-3.png" />
<span>工作单位</span>
<div class="ren-prop z-3">
<img src="@/assets/img/shuju/people/ren-prop-3.png" />
<span>工作单位</span>
<div class="ren-cnt">
<h5>工作单位</h5>
<p>
{{ info.workUnit || "--" }}
</p>
<div class="ren-cnt">
<h5>工作单位</h5>
<p>
{{ info.workUnit || "--" }}
</p>
</div>
</div>
</div>
<div class="ren-prop z-4">
<img src="@/assets/img/shuju/people/ren-prop-4.png" />
<span>志愿者类别</span>
<div class="ren-cnt">
<h5>志愿者类别</h5>
<p>
{{
info.volunteerCategory.length == 0
? "--"
: info.volunteerCategory.join("、")
}}
</p>
<div class="ren-prop z-4">
<img src="@/assets/img/shuju/people/ren-prop-4.png" />
<span>志愿者类别</span>
<div class="ren-cnt">
<h5>志愿者类别</h5>
<p>
{{
info.volunteerCategory.length == 0
? "--"
: info.volunteerCategory.join("、")
}}
</p>
</div>
</div>
</div>
<div class="ren-prop z-5">
<img src="@/assets/img/shuju/people/ren-prop-5.png" />
<span>房屋信息</span>
<div class="ren-cnt">
<h5>房屋信息</h5>
<p>
{{
info.houseInfo.length == 0
? "--"
: info.houseInfo.join("、")
}}
</p>
<div class="ren-prop z-5">
<img src="@/assets/img/shuju/people/ren-prop-5.png" />
<span>房屋信息</span>
<div class="ren-cnt">
<h5>房屋信息</h5>
<p>
{{
info.houseInfo.length == 0
? "--"
: info.houseInfo.join("、")
}}
</p>
</div>
</div>
</div>
<div class="ren-prop z-6">
<img src="@/assets/img/shuju/people/ren-prop-6.png" />
<span>经济状况</span>
<div class="ren-cnt">
<h5>经济状况</h5>
<p>
月薪:
{{
info.financialSituation.monthlyIncome || "--"
}}退休金{{
info.financialSituation.retirementAmount || "--"
}}
</p>
<div class="ren-prop z-6">
<img src="@/assets/img/shuju/people/ren-prop-6.png" />
<span>经济状况</span>
<div class="ren-cnt">
<h5>经济状况</h5>
<p>
月薪:
{{
info.financialSituation.monthlyIncome || "--"
}}退休金{{
info.financialSituation.retirementAmount || "--"
}}
</p>
</div>
</div>
</div>
</div>
</cpt-card>
</div>
</cpt-card>
</div>
<people-more v-show="showedMoreInfo"
v-if="userId"
:userId="userId"
:gridName="info.gridName"
@close="showedMoreInfo = false" />
<div class="m-relation">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>家庭关系</span>
</div>
<div class="info">
<div class="huzhu">
<img class="huzhu-bg"
src="@/assets/img/shuju/people/huzhu.png" />
<img class="huzhu-ico"
src="@/assets/img/shuju/people/huzhu-home.png" />
<div class="huzhu-name">{{ houseInfo&&houseInfo.ownerName?houseInfo.ownerName:'暂不清楚' }}</div>
<p>户主</p>
</div>
<people-more v-show="showedMoreInfo"
v-if="userId"
:userId="userId"
:gridName="info.gridName"
@close="showedMoreInfo = false" />
<div class="rel z-zuo-2"
@click="toUserInfo(houseInfo.userList[0].userId)"
v-if="houseInfo.userList[0]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo2.png" />
<div class="rel-text"
:class="houseInfo.userList[0].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[0].relation }}</div>
<div class="rel-name">{{ houseInfo.userList[0].userName }}</div>
</div>
<div class="m-relation">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>家庭关系</span>
</div>
<div class="info">
<div class="huzhu">
<img class="huzhu-bg"
src="@/assets/img/shuju/people/huzhu.png" />
<img class="huzhu-ico"
src="@/assets/img/shuju/people/huzhu-home.png" />
<div class="huzhu-name">{{ houseInfo&&houseInfo.ownerName?houseInfo.ownerName:'暂不清楚' }}</div>
<p>户主</p>
</div>
<div class="rel z-you-2"
@click="toUserInfo(houseInfo.userList[1].userId)"
v-if="houseInfo.userList[1]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you2.png" />
<div class="rel-text"
:class="houseInfo.userList[1].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[1].relation }}</div>
<div class="rel-name">{{ houseInfo.userList[1].userName }}</div>
<div class="rel z-zuo-2"
@click="toUserInfo(houseInfo.userList[0].userId)"
v-if="houseInfo.userList[0]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo2.png" />
<div class="rel-text"
:class="houseInfo.userList[0].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[0].relation }}</div>
<div class="rel-name">{{ houseInfo.userList[0].userName }}</div>
</div>
</div>
</div>
<div class="rel z-zuo-1"
@click="toUserInfo(houseInfo.userList[2].userId)"
v-if="houseInfo.userList[2]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo1.png" />
<div class="rel-text"
:class="houseInfo.userList[2].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[2].relation }}</div>
<div class="rel-name">{{ houseInfo.userList[2].userName }}</div>
<div class="rel z-you-2"
@click="toUserInfo(houseInfo.userList[1].userId)"
v-if="houseInfo.userList[1]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you2.png" />
<div class="rel-text"
:class="houseInfo.userList[1].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[1].relation }}</div>
<div class="rel-name">{{ houseInfo.userList[1].userName }}</div>
</div>
</div>
</div>
<div class="rel z-you-1"
@click="toUserInfo(houseInfo.userList[3].userId)"
v-if="houseInfo.userList[3]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you1.png" />
<div class="rel-text"
:class="houseInfo.userList[3].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[3].relation }}</div>
<span class="rel-name">{{ houseInfo.userList[3].userName }}</span>
<div class="rel z-zuo-1"
@click="toUserInfo(houseInfo.userList[2].userId)"
v-if="houseInfo.userList[2]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo1.png" />
<div class="rel-text"
:class="houseInfo.userList[2].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[2].relation }}</div>
<div class="rel-name">{{ houseInfo.userList[2].userName }}</div>
</div>
</div>
</div>
<div class="rel z-zuo-3"
@click="toUserInfo(houseInfo.userList[4].userId)"
v-if="houseInfo.userList[4]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo3.png" />
<div class="rel-text"
:class="houseInfo.userList[4].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[4].relation }}</div>
<div class="rel-name">{{ houseInfo.userList[4].userName }}</div>
<div class="rel z-you-1"
@click="toUserInfo(houseInfo.userList[3].userId)"
v-if="houseInfo.userList[3]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you1.png" />
<div class="rel-text"
:class="houseInfo.userList[3].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[3].relation }}</div>
<span class="rel-name">{{ houseInfo.userList[3].userName }}</span>
</div>
</div>
</div>
<div class="rel z-you-3"
@click="toUserInfo(houseInfo.userList[5].userId)"
v-if="houseInfo.userList[5]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you3.png" />
<div class="rel-text"
:class="houseInfo.userList[5].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[5].relation }}</div>
<div class="rel-name">{{ houseInfo.userList[5].userName }}</div>
<div class="rel z-zuo-3"
@click="toUserInfo(houseInfo.userList[4].userId)"
v-if="houseInfo.userList[4]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo3.png" />
<div class="rel-text"
:class="houseInfo.userList[4].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[4].relation }}</div>
<div class="rel-name">{{ houseInfo.userList[4].userName }}</div>
</div>
</div>
</div>
</div>
</cpt-card>
</div>
</div>
<div class="g-r">
<div class="m-tb">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>居民需求</span>
</div>
<div class="tb">
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@operate="handleOperateDemandList"></cpt-tb>
<div class="m-pagination"
v-if="demand.total > demand.pageSize">
<el-pagination :current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeDemand">
</el-pagination>
<div class="rel z-you-3"
@click="toUserInfo(houseInfo.userList[5].userId)"
v-if="houseInfo.userList[5]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you3.png" />
<div class="rel-text"
:class="houseInfo.userList[5].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">{{ houseInfo.userList[5].relation }}</div>
<div class="rel-name">{{ houseInfo.userList[5].userName }}</div>
</div>
</div>
</div>
</div>
</cpt-card>
</cpt-card>
</div>
</div>
<div class="m-row">
<div class="m-list">
<div class="g-r">
<div class="m-tb">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<a :class="{ 'z-on': showedIncidentOrTopic == 'incident' }"
@click="showedIncidentOrTopic = 'incident'">上报事件</a>
<a :class="{ 'z-on': showedIncidentOrTopic == 'topic' }"
@click="showedIncidentOrTopic = 'topic'">发布话题</a>
<span>居民需求</span>
</div>
<div class="list-wrap"
v-show="showedIncidentOrTopic == 'incident'">
<div class="list">
<div class="item"
:key="'incident' + index"
v-for="(item, index) in incident.list"
@click="handleClickIncident(index)">
<div class="item-title">{{ item.eventContent }}</div>
<div class="item-date">{{ item.reportTime }}</div>
</div>
</div>
<div class="tb">
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@operate="handleOperateDemandList"></cpt-tb>
<div class="m-pagination"
v-if="incident.total > incident.pageSize">
<el-pagination :current-page="incident.pageNo"
:page-size="incident.pageSize"
:total="incident.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeIncident">
v-if="demand.total > demand.pageSize">
<el-pagination :current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeDemand">
</el-pagination>
</div>
</div>
</cpt-card>
</div>
<div v-if="incident.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
<div class="m-row">
<div class="m-list">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<a :class="{ 'z-on': showedIncidentOrTopic == 'incident' }"
@click="showedIncidentOrTopic = 'incident'">上报事件</a>
<a :class="{ 'z-on': showedIncidentOrTopic == 'topic' }"
@click="showedIncidentOrTopic = 'topic'">发布话题</a>
</div>
</div>
<div class="list-wrap"
v-show="showedIncidentOrTopic == 'incident'">
<div class="list">
<div class="item"
:key="'incident' + index"
v-for="(item, index) in incident.list"
@click="handleClickIncident(index)">
<div class="item-title">{{ item.eventContent }}</div>
<div class="item-date">{{ item.reportTime }}</div>
</div>
</div>
<div class="list-wrap"
v-show="showedIncidentOrTopic == 'topic'">
<div class="list">
<div class="item"
:key="'topic' + index"
v-for="(item, index) in topic.list"
@click="handleClickTopic(index)">
<div class="item-title">{{ item.topicContent }}</div>
<div class="item-date">{{ item.releaseTime }}</div>
<div class="m-pagination"
v-if="incident.total > incident.pageSize">
<el-pagination :current-page="incident.pageNo"
:page-size="incident.pageSize"
:total="incident.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeIncident">
</el-pagination>
</div>
</div>
<div class="m-pagination"
v-if="topic.total > topic.pageSize">
<el-pagination :current-page="topic.pageNo"
:page-size="topic.pageSize"
:total="topic.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeTopic">
</el-pagination>
<div v-if="incident.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
<div v-if="topic.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
<div class="list-wrap"
v-show="showedIncidentOrTopic == 'topic'">
<div class="list">
<div class="item"
:key="'topic' + index"
v-for="(item, index) in topic.list"
@click="handleClickTopic(index)">
<div class="item-title">{{ item.topicContent }}</div>
<div class="item-date">{{ item.releaseTime }}</div>
</div>
</div>
<div class="m-pagination"
v-if="topic.total > topic.pageSize">
<el-pagination :current-page="topic.pageNo"
:page-size="topic.pageSize"
:total="topic.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeTopic">
</el-pagination>
</div>
<div v-if="topic.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</div>
</cpt-card>
</div>
</cpt-card>
</div>
<div class="m-list">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>积分记录</span>
</div>
<div class="m-list">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>积分记录</span>
</div>
<div class="list-wrap">
<div class="list">
<div class="item"
:key="'point' + index"
v-for="(item, index) in point.list"
@click="handleClickPoint(index)">
<div class="item-row">
<div class="item-l">
<div class="item-point">{{ item.point }}</div>
</div>
<div class="item-r">
<div class="item-title">{{ item.title }}</div>
<div class="item-date">{{ item.dateTime }}</div>
<div class="list-wrap">
<div class="list">
<div class="item"
:key="'point' + index"
v-for="(item, index) in point.list"
@click="handleClickPoint(index)">
<div class="item-row">
<div class="item-l">
<div class="item-point">{{ item.point }}</div>
</div>
<div class="item-r">
<div class="item-title">{{ item.title }}</div>
<div class="item-date">{{ item.dateTime }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="m-pagination"
v-if="point.total > point.pageSize">
<el-pagination :current-page="point.pageNo"
:page-size="point.pageSize"
:total="point.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangePoint">
</el-pagination>
</div>
<div class="m-pagination"
v-if="point.total > point.pageSize">
<el-pagination :current-page="point.pageNo"
:page-size="point.pageSize"
:total="point.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangePoint">
</el-pagination>
</div>
<div v-if="point.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
<div v-if="point.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</div>
</cpt-card>
</cpt-card>
</div>
</div>
</div>
</div>
<demand-info v-if="demand.list.length > 0 && showedDemandInfo"
:userId="userId"
queryOrigin="personal-data"
:demandId="demand.srcList[demand.currentIndex].demandRecId"
@close="showedDemandInfo = false" />
<incident-info v-if="incident.list.length > 0 && incident.showedInfo"
:resiEventId="incident.list[incident.currentIndex].resiEventId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="incident.showedInfo = false" />
<topic-info v-if="topic.list.length > 0 && topic.showedInfo"
:topicId="topic.list[topic.currentIndex].topicId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="topic.showedInfo = false" />
<demand-info v-if="demand.list.length > 0 && showedDemandInfo"
:userId="userId"
queryOrigin="personal-data"
:demandId="demand.srcList[demand.currentIndex].demandRecId"
@close="showedDemandInfo = false" />
<incident-info v-if="incident.list.length > 0 && incident.showedInfo"
:resiEventId="incident.list[incident.currentIndex].resiEventId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="incident.showedInfo = false" />
<topic-info v-if="topic.list.length > 0 && topic.showedInfo"
:topicId="topic.list[topic.currentIndex].topicId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="topic.showedInfo = false" />
</div>
</div>
</template>
@ -399,6 +411,7 @@ export default {
name: "HomeMap",
data () {
return {
breadList: [],
showedMoreInfo: false,
showedDemandInfo: false,
@ -516,7 +529,12 @@ export default {
incidentInfo,
topicInfo,
},
beforeRouteEnter(to, from, next) {
const arr = [ {...from }, { ...to, meta: { title: '人员图谱'}}]
next((vm) =>{
vm.breadList = [ ...arr ]
})
},
watch: {
uid (id) {
this.userId = id;
@ -525,14 +543,52 @@ export default {
this.getApiData();
window.scrollTo(0, 0);
},
$route(route) {
// if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith('/redirect/')) {
return
}
// this.getBreadcrumb()
},
},
async mounted () {
this.userId = this.uid;
this.getApiData();
},
deactivated() {
this.breadList = []
console.log('breadList-----', this.breadList)
},
destroyed() {
this.breadList = []
console.log('breadList-----', this.breadList)
},
methods: {
getBreadcrumb() {
// only show routes with meta.title
console.log('routest----', this.$route)
let matched = this.$route.matched.filter(
(item) => item.meta && item.meta.title
)
const first = matched[0]
if (!this.isDashboard(first)) {
matched = [{ path: '/home', meta: { title: '首页' } }].concat(matched)
}
this.breadList = matched.filter(
(item) => item.meta && item.meta.title && item.meta.breadcrumb !== false
)
},
isDashboard(route) {
const name = route && route.name
if (!name) {
return false
}
return name.trim().toLocaleLowerCase() === 'Home'.toLocaleLowerCase()
},
handleSearch () { },
async getApiData () {
@ -722,5 +778,19 @@ export default {
<style
lang="scss"
src="@/assets/scss/modules/visual/people.scss"
scoped
></style>
scoped>
</style>
<style
lang="scss"
scoped>
.g-bread {
padding: 10px 20px;
::v-deep .el-breadcrumb__item {
font-size: 16px;
.el-breadcrumb__inner {
color: #fff;
}
}
}
</style>

41
src/views/modules/visual/communityParty/community.vue

@ -175,44 +175,7 @@ export default {
isfirstInit: true,//
agencyInfo: {},//level
unitMapList: [],
unitMapList1: [
{
type: '党建楼宇',
name: '建联单位1',
latitude: 36.062227,
longitude: 120.389455,
},
{
type: '党建楼宇',
name: '建联单位2',
latitude: 36.082227,
longitude: 120.389455,
},
{
type: '机关直属部门',
name: '建联单位3',
latitude: 36.062227,
longitude: 120.379455,
},
{
type: '两新党建',
name: '建联单位4',
latitude: 36.082227,
longitude: 120.379455,
},
{
type: '辖区单位',
name: '建联单位5',
latitude: 36.092227,
longitude: 120.379455,
},
{
type: '其他',
name: '建联单位6',
latitude: 36.102227,
longitude: 120.379455,
}
],
detailInfo: {}
};
},
@ -536,7 +499,7 @@ export default {
urlIndex: index
}
})
// this.unitMapList = this.unitMapList1
console.log('unitMapList----', this.unitMapList)
this.unitMapList.forEach(item => {

18
src/views/modules/visual/communityParty/party.vue

@ -46,6 +46,8 @@
<screen-table
:headerList="headerList"
:tableData="ageList"
:headerStyle="headerStyle"
:tableContentStyle="headerStyle"
:visibleLoading="visibleAgeLoading"
:operate="false"
@row="handleClickRow"
@ -88,6 +90,8 @@
<screen-table
:headerList="headerEduList"
:tableData="eduList"
:headerStyle="headerStyle"
:tableContentStyle="headerStyle"
:visibleLoading="visibleLoading"
:operate="false"
@row="handleClickRow"
@ -137,6 +141,20 @@ export default {
{ title: "年龄", coulmn: 'age' },
{ title: "手机号码", coulmn: 'mobile' }
],
headerStyle: [
{
width: '50px'
},
{
'min-width': '100px'
},
{
'min-width': '100px'
},
{
'min-width': '160px'
}
],
headerEduList: [
{ title: "序号", coulmn: 'index' },
{ title: "姓名", coulmn: 'name' },

28
src/views/modules/visual/measure/service.vue

@ -113,10 +113,11 @@
</div>
</div>
</div> -->
<div class="card-left-title mt30">需求和资源匹配分析</div>
<div class="echarts-container">
<div id="echartsBox" class="echarts-boxs"></div>
</div>
<div class="card-left-title mt30">服务清单</div>
<div class="ecahrts-button">
<el-button type="warning" size="small" @click="handleExport">导出</el-button>
</div>
@ -254,7 +255,7 @@ export default {
if (item.legendCode == 'unfinished') {
desc += `<div><span>尚有 ${item.serviceDemandTotal} 个需求未完成</span></div>`
}else {
desc += `<div><span>共 ${item.totalService} ${unit} ${item.legendName} 完成需求 ${item.serviceDemandTotal} 个</span></div>`
desc += `<div><span>共 ${item.totalService} ${unit} ${item.legendName} 完成需求 ${item.serviceDemandTotal} 个</span></div>`
}
})
@ -645,6 +646,25 @@ export default {
}
}
}
.card-left-title {
position: relative;
padding-left: 40px;
font-size: 16px;
font-weight: 500;
color: #fff;
}
.card-left-title::after {
content: '';
position: absolute;
top: 50%;
left: 20px;
width: 12px;
height: 12px;
box-sizing: border-box;
margin-top: -6px;
background: #2865FA;
border-radius: 50%;
}
.second-select {
margin: 0 10px 0 0;
::v-deep .el-input {
@ -799,5 +819,7 @@ export default {
border: 0;
}
}
.mt30 {
margin-top: 30px;
}
</style>

6
src/views/pages/caiji.vue

@ -25,7 +25,7 @@
<div class="line"></div>
<div @click="handelSel('building')">
<mt-cell title="楼"
<mt-cell title="楼"
is-link>
<span class="picker_content"
v-if="selBuild">{{selBuild.label}}</span>
@ -402,7 +402,7 @@ export default {
});
}
},
//
//
async loadBuild () {
const url = "/gov/org/icbuilding/buildingoption"
let params = {
@ -521,7 +521,7 @@ export default {
if (selType === 'unit') {
if (!this.selBuild) {
Toast({
message: '请先选择楼',
message: '请先选择楼',
duration: 3000
});
return false

Loading…
Cancel
Save