Browse Source

Merge branch 'dev-event0808' into yantai_master

V1.0
jiangyy 3 years ago
parent
commit
d0a93ce2f6
  1. 13
      src/views/modules/base/organization/organization.vue
  2. 1528
      src/views/modules/communityService/fuwujilu/addForm.vue
  3. 2
      src/views/modules/cpts/base/cpts/edit.vue
  4. 451
      src/views/modules/shequzhili/statics/cEvent.vue
  5. 321
      src/views/modules/shequzhili/statics/gridMember.vue
  6. 442
      src/views/modules/shequzhili/statics/gridMemberEvent.vue
  7. 934
      src/views/modules/shequzhili/xiangmu/xiangmu-ling.vue
  8. 117
      src/views/modules/visual/command/cpts/map.vue
  9. 86
      src/views/modules/visual/command/cpts/popup.vue
  10. 83
      src/views/modules/visual/command/cpts/qsydw.vue
  11. 45
      src/views/modules/visual/command/cpts/serviceInfo.vue
  12. 14
      src/views/modules/visual/command/cpts/sidemenu-left.vue
  13. 30
      src/views/modules/visual/command/index.vue
  14. 62
      src/views/modules/visual/communityGovern/distributionAnalyze.vue
  15. 108
      src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue
  16. 32
      src/views/modules/visual/communityParty/gridParty.vue
  17. 155
      src/views/modules/visual/cpts/map/index2.vue
  18. 11
      src/views/modules/visual/shundeju/controlCount.vue

13
src/views/modules/base/organization/organization.vue

@ -1376,7 +1376,7 @@ export default {
//
async submitPeo () {
const url = "/gov/org/staff/addstaffv2"
const {peoForm:{orgType}} = this;
let params = {
orgType: this.peoForm.orgType,
name: this.peoForm.name,
@ -1385,7 +1385,7 @@ export default {
workType: this.peoForm.post,
roles: this.peoForm.duty,
newRoles: this.peoForm.newRoles,
orgId: this.currentAgencyId,
orgId: orgType=='agency' ? this.currentAgencyId : (orgType=='dept' ? this.currentDepartmentId : this.currentGridOrgId),
}
@ -1401,6 +1401,13 @@ export default {
this.getGridList()
this.getAgencyStaffListData()
this.insertFormRest()
if(orgType=='dept'){
this.getDepartmentStaffListData()
} else if(orgType=='grid'){
this.getGridStaffListData()
} else {
this.getAgencyStaffListData()
}
} else {
this.$message.error(msg)
}
@ -1648,6 +1655,7 @@ export default {
},
//
entryGrid (gridId) {
console.log(gridId)
this.gridStaffTableListData = []
this.departmentStaffTableListData = []
this.agencyStaffTableListData = []
@ -1663,6 +1671,7 @@ export default {
},
//
entryDepartment (row) {
console.log(row)
this.gridStaffTableListData = []
this.departmentStaffTableListData = []
this.agencyStaffTableListData = []

1528
src/views/modules/communityService/fuwujilu/addForm.vue

File diff suppressed because it is too large

2
src/views/modules/cpts/base/cpts/edit.vue

@ -628,7 +628,7 @@ export default {
// map TMap.Map()
map = new window.TMap.Map(document.getElementById("app"), {
center: center, //
zoom: 15, //
zoom: 13, //
pitch: 43.5, //
rotation: 45, //
});

451
src/views/modules/shequzhili/statics/cEvent.vue

@ -1,104 +1,188 @@
<template>
<div class="mode-block resi-container">
<el-card ref="searchCard" class="search-card">
<el-form ref="searchForm" :inline="true" :model="dataForm" size="small">
<el-form-item label="所属组织" label-width="100px"
prop="agencyId">
<el-cascader ref="cascaderUnit" v-model="dataForm.agencyId" :options="optionsA" :props="{ checkStrictly: true, emitPath: false,children:'subAgencyList',label:'agencyName',value:'agencyId'}" clearable />
<div v-if="showType==='one'">
<el-card ref="searchCard"
class="search-card">
<el-form ref="searchForm"
:inline="true"
:model="dataForm"
size="small">
<el-form-item label="所属组织"
label-width="100px"
prop="agencyId">
<el-cascader ref="cascaderUnit"
v-model="dataForm.agencyId"
:options="optionsA"
:props="{ checkStrictly: true, emitPath: false,children:'subAgencyList',label:'agencyName',value:'agencyId'}"
clearable />
<!-- <template slot-scope="{ node, data }">
<div @click="cascaderClick(data)">
<span>{{ data.objectName }}</span>
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
</div>
</template> -->
</el-form-item>
<el-form-item label="时间范围"
prop="startDate">
<el-date-picker v-model="timeRange"
type="datetimerange"
clearable
size="small"
:picker-options="pickerOptions"
range-separator="至"
start-placeholder="选择日期"
end-placeholder="选择日期"
value-format="yyyyMMddHHmmss">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" class="diy-button--search" @click="handleSearch">查询</el-button>
<el-button
class="diy-button--reset"
size="small"
@click="resetForm('searchForm')"
>重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button @click="totalHandle"
class="diy-button--add"
size="small">总计</el-button>
<el-button @click="exportHandle"
class="diy-button--reset"
size="small" :loading="exportLoading">导出</el-button>
</div>
<el-table class="resi-table" v-loading="dataListLoading" :data="dataList" border style="width: 100%"
:height="tableHeight">
<!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> -->
<el-table-column type="index" label="序号" header-align="center" align="center" width="50"></el-table-column>
<el-table-column min-width="100" prop="orgName" label="所属社区" header-align="center" align="center" >
<template slot-scope="scope">
<span v-if="scope.row.orgType==='agency'"><a class="name-a" style="color: #2195fe;" @click="handleClick(scope.row)">{{scope.row.orgName}}</a></span>
<span v-else>{{scope.row.orgName}}</span>
</template>
</el-table-column>
<el-table-column min-width="100" prop="memberCount" label="网格员数" header-align="center" align="center" />
<el-table-column min-width="100" prop="projectCount" label="上报数量" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedCount" label="办结数" header-align="center" align="center" />
<el-table-column min-width="110" prop="projectAve" label="人均上报" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedAve" label="人均办结" header-align="center" align="center" />
</el-table>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</el-card>
<el-dialog
title="总计"
:visible.sync="totalVisible"
width="60%">
<template>
<el-table
:data="tableData"
style="width: 100%"
height="200">
</el-form-item>
<el-form-item label="时间范围"
prop="startDate">
<el-date-picker v-model="timeRange"
type="datetimerange"
clearable
size="small"
:picker-options="pickerOptions"
range-separator="至"
start-placeholder="选择日期"
end-placeholder="选择日期"
value-format="yyyyMMddHHmmss">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button class="diy-button--reset"
size="small"
@click="resetForm('searchForm')">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button @click="totalHandle"
class="diy-button--add"
size="small">总计</el-button>
<el-button @click="exportHandle"
class="diy-button--reset"
size="small"
:loading="exportLoading">导出</el-button>
</div>
<el-table class="resi-table"
v-loading="dataListLoading"
:data="dataList"
border
style="width: 100%"
:height="tableHeight">
<!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> -->
<el-table-column min-width="100" prop="orgName" label="所属社区" header-align="center" align="center" />
<el-table-column min-width="100" prop="memberCount" label="网格员数" header-align="center" align="center" />
<el-table-column min-width="100" prop="projectCount" label="上报数量" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedCount" label="办结数" header-align="center" align="center" />
<el-table-column min-width="110" prop="projectAve" label="人均上报" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedAve" label="人均办结" header-align="center" align="center" />
<el-table-column type="index"
label="序号"
header-align="center"
align="center"
width="50"></el-table-column>
<el-table-column min-width="100"
prop="orgName"
label="所属社区"
header-align="center"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.orgType==='agency'"><a class="name-a"
style="color: #2195fe;"
@click="handleClick(scope.row)">{{scope.row.orgName}}</a></span>
<span v-else>{{scope.row.orgName}}</span>
</template>
</el-table-column>
<el-table-column min-width="100"
prop="memberCount"
label="网格员数"
header-align="center"
align="center">
<template slot-scope="scope">
<span><a class="name-a"
style="color: #2195fe;"
@click="handleClickMember(scope.row)">{{scope.row.memberCount}}</a></span>
</template>
</el-table-column>
<el-table-column min-width="100"
prop="projectCount"
label="上报数量"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="closedCount"
label="办结数"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="projectAve"
label="人均上报"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="closedAve"
label="人均办结"
header-align="center"
align="center" />
</el-table>
</template>
</el-dialog>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</el-card>
<el-dialog title="总计"
:visible.sync="totalVisible"
width="60%">
<template>
<el-table :data="tableData"
style="width: 100%"
height="200">
<!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> -->
<el-table-column min-width="100"
prop="orgName"
label="所属社区"
header-align="center"
align="center" />
<el-table-column min-width="100"
prop="memberCount"
label="网格员数"
header-align="center"
align="center" />
<el-table-column min-width="100"
prop="projectCount"
label="上报数量"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="closedCount"
label="办结数"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="projectAve"
label="人均上报"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="closedAve"
label="人均办结"
header-align="center"
align="center" />
</el-table>
</template>
</el-dialog>
</div>
<div v-if="showType==='two'">
<grid-member :orgId="selOrgId"
:orgType="selOrgType"
:startDate="dataForm.startDate"
:endDate="dataForm.endDate"
@handleBackToOne="handleBackToOne"></grid-member>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import gridMember from "./gridMember";
// import AddOrUpdate from './factagencyuserhousedaily-add-or-update'
export default {
data () {
@ -115,9 +199,9 @@ export default {
optionsA: [],
totalVisible: false,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
disabledDate (time) {
return time.getTime() > Date.now();
},
},
dataList: [],
timeRange: '',
@ -130,11 +214,15 @@ export default {
total: 0,
tableData: [],
pageNo: 1,
pageSize: 20
pageSize: 20,
showType: 'one',
selOrgId: '',
selOrgType: '',
}
},
components: {
// AddOrUpdate
gridMember
},
created () {
this.getGridList()
@ -154,18 +242,26 @@ export default {
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight() {
tableHeight () {
const h = this.clientHeight - 360 + this.iframeHeigh;
const _h = this.clientHeight - 360;
return this.$store.state.inIframe ? h : _h;
},
},
methods: {
handleClick(row) {
handleClick (row) {
this.dataForm.agencyId = row.orgId
this.handleSearch()
},
resetForm(formName) {
handleClickMember (row) {
this.selOrgId = row.orgId
this.selOrgType = row.orgType
this.showType = 'two'
},
handleBackToOne () {
this.showType = "one"
},
resetForm (formName) {
this.$refs[formName].resetFields();
this.timeRange = "";
this.dataForm.startDate = "";
@ -174,17 +270,17 @@ export default {
this.pageNo = 1
this.getTableList()
},
handleSearch() {
handleSearch () {
this.dataForm.type = 1
this.pageNo = 1
this.getTableList()
},
handleSizeChange(val) {
handleSizeChange (val) {
console.log(`每页 ${val}`);
this.pageSize = val;
this.getTableList();
},
handleCurrentChange(val) {
handleCurrentChange (val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableList();
@ -234,21 +330,21 @@ export default {
this.tableData = []
this.dataForm.type = 0
this.$http
.post('/data/aggregator/org/orgProjectDetailList', this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data.list)
this.tableData = res.data.list
}
})
.catch(() => {
return this.$message.error('网络错误')
})
.post('/data/aggregator/org/orgProjectDetailList', this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data.list)
this.tableData = res.data.list
}
})
.catch(() => {
return this.$message.error('网络错误')
})
this.totalVisible = true
},
getTableList() {
getTableList () {
const { user } = this.$store.state
const _data = {
...this.dataForm,
@ -269,7 +365,7 @@ export default {
return this.$message.error('网络错误')
})
},
getGridList() {
getGridList () {
const { user } = this.$store.state
this.dataListLoading = true
const params = {
@ -288,7 +384,7 @@ export default {
let { agencyList, subAgencyList } = res.data
// this.optionsA = res.data
// console.log(this.optionsA);
const _arr = [{...agencyList, subAgencyList: [...subAgencyList] }]
const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }]
this.optionsA = this.deepTree(_arr)
console.log('optionsA----', this.optionsA)
}
@ -297,9 +393,9 @@ export default {
this.dataListLoading = false
return this.$message.error('网络错误')
})
this.dataListLoading = false
this.dataListLoading = false
},
deepTree(arr) {
deepTree (arr) {
if (Array.isArray(arr)) {
return arr.map(item => {
return {
@ -313,7 +409,7 @@ export default {
}
</script>
<style>
.block{
.block {
position: absolute;
left: 0px;
display: inline-block;
@ -321,80 +417,79 @@ export default {
height: 50px;
background: #fff;
}
.cascader-block .el-cascader-node>.el-radio{
.cascader-block .el-cascader-node > .el-radio {
display: none;
}
</style>
<style lang="scss" scoped>
.blacklist-reason {
width: 100%;
height: 80px;
border: 1px solid #e4e4e4;
border-radius: 4px;
resize: none;
padding: 8px;
box-sizing: border-box;
}
.blacklist-reason {
width: 100%;
height: 80px;
border: 1px solid #e4e4e4;
border-radius: 4px;
resize: none;
padding: 8px;
box-sizing: border-box;
}
</style>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.form-wr {
.input-width {
width: 260px;
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
}
}
</style>

321
src/views/modules/shequzhili/statics/gridMember.vue

@ -0,0 +1,321 @@
<template>
<div class="mode-block resi-container">
<div v-if="showType==='two'">
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button @click="handleBackToOne"
class="diy-button--search"
size="small">返回</el-button>
<el-button @click="exportHandle"
class="diy-button--reset"
size="small"
:loading="exportLoading">导出</el-button>
</div>
<el-table class="resi-table"
v-loading="dataListLoading"
:data="tableData"
border
style="width: 100%"
:height="tableHeight">
<el-table-column type="index"
label="序号"
header-align="center"
align="center"
width="50"></el-table-column>
<el-table-column min-width="100"
prop="staffName"
label="网格员"
header-align="center"
align="center" />
<el-table-column min-width="100"
prop="projectCount"
label="上报数量"
header-align="center"
align="center">
<template slot-scope="scope">
<span><a class="name-a"
style="color: #2195fe;"
@click="handleClickCount(scope.row)">{{scope.row.projectCount}}</a></span>
</template>
</el-table-column>
<el-table-column min-width="110"
prop="closedCount"
label="办结数"
header-align="center"
align="center">
<template slot-scope="scope">
<span><a class="name-a"
style="color: #2195fe;"
@click="handleClickCount(scope.row)">{{scope.row.closedCount}}</a></span>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</el-card>
</div>
<div v-if="showType==='three'">
<grid-member-event :orgId="orgId"
:orgType="orgType"
:startTime="startDate"
:endTime="endDate"
:staffName="selStaffName"
@handleBackToTwo="handleBackToTwo"></grid-member-event>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { requestPost } from "@/js/dai/request";
import gridMemberEvent from "./gridMemberEvent";
export default {
data () {
return {
showType: 'two',
exportLoading: false,
dataListLoading: false,
total: 0,
tableData: [],
pageNo: 1,
pageSize: 20,
selStaffName: ''
}
},
components: {
gridMemberEvent
},
created () {
this.getTableList()
},
watch: {
},
props: {
orgId: {
type: String,
default: "",
},
orgType: {
type: String,
default: "",
},
startDate: {
type: String,
default: "",
},
endDate: {
type: String,
default: "",
},
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight () {
const h = this.clientHeight - 255 + this.iframeHeigh;
const _h = this.clientHeight - 255;
return this.$store.state.inIframe ? h : _h;
},
},
methods: {
handleBackToOne () {
this.$emit("handleBackToOne")
},
handleClick (row) {
this.dataForm.agencyId = row.orgId
this.handleSearch()
},
handleClickCount (row) {
this.selStaffName = row.staffName
this.showType = 'three'
},
handleBackToTwo () {
this.showType = "two"
},
async getTableList () {
this.dataListLoading = true
const url = "/data/aggregator/org/memberProjectInfoList"
let params = {
orgId: this.orgId,
orgType: this.orgType,
startDate: this.startDate ? this.startDate.substring(0, 8) : '',
endDate: this.endDate ? this.endDate.substring(0, 8) : '',
pageNo: this.pageNo,
pageSize: this.pageSize
}
const { data, code, msg } = await requestPost(url, params)
this.dataListLoading = false
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
} else {
this.$message.error(msg)
}
},
handleSizeChange (val) {
console.log(`每页 ${val}`);
this.pageSize = val;
this.getTableList();
},
handleCurrentChange (val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableList();
},
exportHandle () {
const url = '/data/aggregator/org/memberProjectInfoList/export'
this.exportLoading = true
this.$http({
method: 'Post',
url,
responseType: 'blob',
data: {
orgId: this.orgId,
orgType: this.orgType,
startDate: this.startDate ? this.startDate.substring(0, 8) : '',
endDate: this.endDate ? this.endDate.substring(0, 8) : '',
}
}).then(res => {
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
// this.exportLoading = false
} else this.$message.error('下载失败')
this.exportLoading = false
}).catch(err => {
console.log('err', err)
this.exportLoading = false
return this.$message.error('网络错误')
})
},
}
}
</script>
<style>
.block {
position: absolute;
left: 0px;
display: inline-block;
width: 35px;
height: 50px;
background: #fff;
}
.cascader-block .el-cascader-node > .el-radio {
display: none;
}
</style>
<style lang="scss" scoped>
.blacklist-reason {
width: 100%;
height: 80px;
border: 1px solid #e4e4e4;
border-radius: 4px;
resize: none;
padding: 8px;
box-sizing: border-box;
}
</style>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
}
}
</style>

442
src/views/modules/shequzhili/statics/gridMemberEvent.vue

@ -0,0 +1,442 @@
<template>
<div class="mode-block resi-container">
<el-card v-if="pageType == 'list'"
class="resi-card-table">
<div class="resi-row-btn">
<el-button @click="handleBackToTwo"
class="diy-button--search"
size="small">返回</el-button>
<el-button @click="exportHandle"
class="diy-button--reset"
size="small"
:loading="exportLoading">导出</el-button>
</div>
<el-table :data="tableData"
border
v-loading="dataListLoading"
style="width: 100%"
class="resi-table"
:height="tableHeight">
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="gridName"
align="center"
label="所属组织/网格"
min-width="140"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="firstName"
label="事件类型"
min-width="140"
align="center"
:show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.firstName + '-' + scope.row.secondName }}
</template>
</el-table-column>
<el-table-column prop="staffName"
width="100"
align="center"
label="报事人"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="mobile"
align="center"
label="手机号"
width="140"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime"
align="center"
label="上报时间"
width="160"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="backGround"
align="center"
label="事件内容"
min-width="160"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="publicReply"
align="center"
min-width="160"
label="办理结果(结案说明)"
:show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.publicReply }}
</template>
</el-table-column>
<el-table-column prop="urlList"
align="center"
label="图片 ">
<template slot-scope="scope">
<el-image v-if="scope.row.urlList&&scope.row.urlList.length>0"
style="width: 40px; height: 40px"
:src="scope.row.urlList[0]"
:preview-src-list="scope.row.urlList">
</el-image>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="origin"
align="center"
label="上报渠道"
width="120" />
<!-- <template slot-scope="scope">
<span v-if="scope.row.origin == 'agency'">网格上报</span>
<span v-else-if="scope.row.origin == 'ic_event'">居民上报</span>
<span v-else-if="scope.row.origin == 'work_event'">巡查上报</span>
<span v-else-if="scope.row.origin == 'issue'">议题上报</span>
</template>
</el-table-column> -->
<el-table-column prop="address"
align="center"
label="地址 "
:show-overflow-tooltip="true" />
<el-table-column prop="status"
align="center"
label="状态 "
width="70" />
<!-- <template slot-scope="scope">
{{ scope.row.status == 'pending' ? '处理中' : '已结案' }}
</template>
</el-table-column> -->
<el-table-column fixed="right"
label="操作"
align="center"
width="100">
<template slot-scope="scope">
<el-button @click="handleWatch(scope.$index)"
type="text"
size="small">查看</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</el-card>
<div class="g-page"
v-if="pageType == 'info'">
<project-info ref="eleEditForm"
:type="pageType"
:projectId="currentProject.projectId"
@close="handleClose"
@afterEdit="handleEditSuccess" />
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { requestPost } from "@/js/dai/request";
import projectInfo from "../xiangmu/cpts/project-info";
export default {
data () {
return {
exportLoading: false,
dataListLoading: false,
total: 0,
tableData: [],
pageNo: 1,
pageSize: 20,
currentProject: {
projectId: "",
userId: "",
categoryCodes: [],
},
pageType: 'list'
}
},
components: {
projectInfo
},
created () {
this.getTableList()
},
watch: {
},
props: {
orgId: {
type: String,
default: "",
},
orgType: {
type: String,
default: "",
},
startTime: {
type: String,
default: "",
},
endTime: {
type: String,
default: "",
},
staffName: {
type: String,
default: "",
},
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight () {
const h = this.clientHeight - 255 + this.iframeHeigh;
const _h = this.clientHeight - 255;
return this.$store.state.inIframe ? h : _h;
},
},
methods: {
handleBackToTwo () {
this.$emit("handleBackToTwo")
},
handleClick (row) {
this.dataForm.agencyId = row.orgId
this.handleSearch()
},
async getTableList () {
this.dataListLoading = true
const { user } = this.$store.state
const url = "/gov/project/project/orgprojectlist"
let start = ''
let end = ''
//yyyy-MM-dd HH:mm:ss
if (this.startTime) {
start = this.startTime.substring(0, 4) + '-' + this.startTime.substring(4, 6) + '-' + this.startTime.substring(6, 8) + ' ' + this.startTime.substring(8, 10) + ':' + this.startTime.substring(10, 12) + ':' + this.startTime.substring(12, 14)
}
if (this.endTime) {
end = this.endTime.substring(0, 4) + '-' + this.endTime.substring(4, 6) + '-' + this.endTime.substring(6, 8) + ' ' + this.endTime.substring(8, 10) + ':' + this.endTime.substring(10, 12) + ':' + this.endTime.substring(12, 14)
}
let params = {
orgId: this.orgId,
orgType: this.orgType,
startTime: start,
endTime: end,
staffName: this.staffName,
pageNo: this.pageNo,
pageSize: this.pageSize
}
const { data, code, msg } = await requestPost(url, params)
this.dataListLoading = false
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return {
...item,
urlList: item.urlList && item.urlList.map(n => n.url)
};
})
: [];
} else {
this.$message.error(msg)
}
},
async handleWatch (rowIndex) {
let item = this.tableData[rowIndex];
this.currentProject = {
projectId: item.projectId,
};
this.pageType = "info";
},
handleClose () {
this.pageType = "list";
this.currentProject = {
projectId: "",
};
},
handleEditSuccess () {
this.handleClose();
// this.getTableData();
},
exportHandle () {
const url = '/gov/project/project/orgprojectexport'
let start = ''
let end = ''
if (this.startTime) {
start = this.startTime.substring(0, 4) + '-' + this.startTime.substring(4, 6) + '-' + this.startTime.substring(6, 8) + ' ' + this.startTime.substring(8, 10) + ':' + this.startTime.substring(10, 12) + ':' + this.startTime.substring(12, 14)
}
if (this.endTime) {
end = this.endTime.substring(0, 4) + '-' + this.endTime.substring(4, 6) + '-' + this.endTime.substring(6, 8) + ' ' + this.endTime.substring(8, 10) + ':' + this.endTime.substring(10, 12) + ':' + this.endTime.substring(12, 14)
}
this.exportLoading = true
this.$http({
method: 'Post',
url,
responseType: 'blob',
data: {
orgId: this.orgId,
orgType: this.orgType,
startTime: start,
endTime: end,
staffName: this.staffName,
}
}).then(res => {
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
// this.exportLoading = false
} else this.$message.error('下载失败')
this.exportLoading = false
}).catch(err => {
console.log('err', err)
this.exportLoading = false
return this.$message.error('网络错误')
})
},
handleSizeChange (val) {
console.log(`每页 ${val}`);
this.pageSize = val;
this.getTableList();
},
handleCurrentChange (val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableList();
},
}
}
</script>
<style>
.block {
position: absolute;
left: 0px;
display: inline-block;
width: 35px;
height: 50px;
background: #fff;
}
.cascader-block .el-cascader-node > .el-radio {
display: none;
}
</style>
<style lang="scss" scoped>
.blacklist-reason {
width: 100%;
height: 80px;
border: 1px solid #e4e4e4;
border-radius: 4px;
resize: none;
padding: 8px;
box-sizing: border-box;
}
</style>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
}
}
</style>

934
src/views/modules/shequzhili/xiangmu/xiangmu-ling.vue

@ -0,0 +1,934 @@
<template>
<div class="resi-container">
<div class="g-page"
v-show="pageType == 'list'">
<el-card ref="searchCard"
class="search-card">
<el-form ref="searchForm"
:inline="true"
:model="fmData"
:label-width="'100px'"
class="demo-form-inline">
<div>
<el-form-item label="所属组织"
label-width="100px"
prop="orgId">
<el-cascader ref="cascaderUnit"
v-model="orgId"
:options="optionsA"
:props="{ checkStrictly: true,
emitPath: false,children:'subAgencyList',label:'agencyName', value: 'orgLevel'}"
clearable
@change="handleCalscChange" />
</el-form-item>
<el-form-item label="上报渠道"
prop="origin">
<el-select v-model="fmData.origin"
placeholder="请选择"
size="small"
clearable
class="item_width_2">
<el-option v-for="item in qudaoArray"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="上报人"
prop="staffName">
<el-input v-model="fmData.staffName"
class="item_width_2"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="手机号"
prop="mobile">
<el-input v-model="fmData.mobile"
class="item_width_2"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="事件内容"
prop="backGround">
<el-input v-model="fmData.backGround"
class="item_width_2"
size="small"
clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="事件类型"
prop="firstIdList">
<el-cascader ref="cascaderEvent"
v-model="eventTypeCheck"
:options="cateOptions"
collapse-tags
:show-all-levels="false"
:props="{
multiple: true,
checkStrictly: false,
emitPath: false,
children:'subCategory',
label:'name',
value:'id'
}"
clearable
class="item_width_2"
@change="handleEventType" />
<!-- <template slot-scope="{ node, data }">
<div @click="cascaderClick(node, data)">
<span>{{ data.name }}</span>
</div>
</template>
</el-cascader> -->
</el-form-item>
<el-form-item label="事件状态"
prop="status">
<el-select class="item_width_2"
v-model="fmData.status"
placeholder="全部"
size="small"
clearable>
<el-option v-for="item in optionsStatus"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="解决状态"
prop="status">
<el-select class="item_width_2"
v-model="fmData.status"
placeholder="全部"
size="small"
clearable>
<el-option v-for="item in resolvedStatus"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="上报时间"
prop="startTime">
<el-date-picker v-model="fmData.startTime"
:picker-options="startPickerOptions"
class="item_width_2"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="fmData.endTime"
:picker-options="endPickerOptions"
class="item_width_2 data-tag"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="处置选项"
prop="staffId">
<el-checkbox v-model="checkStaffId"
@change="handleCheckbox"></el-checkbox>
</el-form-item>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetForm('searchForm')">重置</el-button>
</div>
</el-form>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button v-if="false"
class="diy-button--add"
size="small"
@click="handleAdd">新增</el-button>
<el-button v-if="false"
class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
<el-upload v-if="false"
ref="upload"
class="upload-btn"
action="uploadUlr"
:limit="1"
:accept="'.xls,.xlsx'"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:on-progress="handleProgress"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest">
<el-button size="small"
class="diy-button--delete"
:loading="importLoading">{{ importBtnTitle }}</el-button>
</el-upload>
<el-button @click="handleChu"
class="diy-button--reset"
size="small"
:loading="exportLoading">导出</el-button>
</div>
<el-table :data="tableData"
border
style="width: 100%"
class="resi-table"
:height="maxTableHeight">
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="gridName"
align="center"
label="所属组织/网格"
min-width="140"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="firstName"
label="事件类型"
min-width="140"
align="center"
:show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.firstName + '-' + scope.row.secondName }}
</template>
</el-table-column>
<el-table-column prop="staffName"
width="100"
align="center"
label="报事人"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="mobile"
align="center"
label="手机号"
width="140"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime"
align="center"
label="上报时间"
width="160"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="backGround"
align="center"
label="事件内容"
min-width="160"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="publicReply"
align="center"
min-width="160"
label="办理结果(结案说明)"
:show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.publicReply }}
</template>
</el-table-column>
<el-table-column prop="urlList"
align="center"
label="图片 ">
<template slot-scope="scope">
<el-image v-if="scope.row.urlList&&scope.row.urlList.length>0"
style="width: 40px; height: 40px"
:src="scope.row.urlList[0]"
:preview-src-list="scope.row.urlList">
</el-image>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="origin"
align="center"
label="上报渠道"
width="120" />
<!-- <template slot-scope="scope">
<span v-if="scope.row.origin == 'agency'">网格上报</span>
<span v-else-if="scope.row.origin == 'ic_event'">居民上报</span>
<span v-else-if="scope.row.origin == 'work_event'">巡查上报</span>
<span v-else-if="scope.row.origin == 'issue'">议题上报</span>
</template>
</el-table-column> -->
<el-table-column prop="address"
align="center"
label="地址 "
:show-overflow-tooltip="true" />
<el-table-column prop="status"
align="center"
label="状态 "
width="70" />
<!-- <el-table-column prop="status"
align="center"
label="解决状态 "
width="90" /> -->
<!-- <template slot-scope="scope">
{{ scope.row.status == 'pending' ? '处理中' : '已结案' }}
</template>
</el-table-column> -->
<el-table-column fixed="right"
label="操作"
align="center"
width="100">
<template slot-scope="scope">
<el-button v-if="scope.row.processable"
@click="handleEdit(scope.$index)"
type="text"
size="small"
class="div-table-button--edit">处理</el-button>
<el-button v-else
@click="handleWatch(scope.$index)"
type="text"
size="small">查看</el-button>
<el-popconfirm v-if="false"
title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row, scope.$index)"
@confirm="handleDel(scope.row, scope.$index)">
<el-button slot="reference"
type="text"
size="small"
class="div-table-button--delete"
style="margin-left: 10px">删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</el-card>
</div>
<div class="g-page"
v-if="pageType == 'edit' || pageType == 'info'">
<project-info ref="eleEditForm"
:type="pageType"
:projectId="currentProject.projectId"
@close="handleClose"
@afterEdit="handleEditSuccess" />
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import projectInfo from "./cpts/project-info";
import axios from "axios";
const _form = {
orgId: '',
orgType: '',
origin: '',
backGround: '',
staffName: '',
mobile: '',
startTime: '',
endTime: '',
status: '',
firstIdList: [],
secondIdList: [],
staffId: ''
}
export default {
components: { projectInfo },
data () {
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.fmData.startTime) {
let startTime = new Date(this.fmData.startTime)
return time.getTime() > nowData || time.getTime() < startTime || time.getTime() === startTime
} else {
return time.getTime() > nowData
}
}
let startDisabledDate = (time) => {//datareturn
let nowData = Date.now()
return time.getTime() > nowData
}
return {
pageType: "list", // list dispose info issue-info
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
tableData: [],
resolvedStatus: [
{
value: "resolved",
label: "已解决",
},
{
value: "unresolved",
label: "无需解决",
},
],
optionsStatus: [
{
value: "pending",
label: "处理中",
},
{
value: "closed",
label: "已结案",
},
],
qudaoArray: [
{
value: "agency",
label: "网格上报",
},
{
value: "ic_event",
label: "居民上报",
},
{
value: "work_event",
label: "巡查上报",
},
{
value: "issue",
label: "议题上报",
}
],
orgId: '',
checkStaffId: false,
exportLoading: false,
cateOptions: [],
optionsA: [],
fmData: { ..._form },
endPickerOptions: {
disabledDate: endDisabledDate
},
startPickerOptions: {
disabledDate: startDisabledDate
},
importBtnTitle: "导入",
importLoading: false,
eventTypeCheck: [],
currentProject: {
projectId: "",
userId: "",
categoryCodes: [],
},
};
},
computed: {
maxTableHeight () {
return this.$store.state.inIframe
? this.clientHeight - 410 + this.iframeHeigh
: this.clientHeight - 410;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
"fmData.date": function (val) {
if (Array.isArray(val) && val.length == 2) {
this.fmData.startDate = val[0].split("-").join("");
this.fmData.endDate = val[1].split("-").join("");
} else {
this.fmData.startDate = "";
this.fmData.endDate = "";
}
},
},
mounted () {
this.getTableData();
this.getGridList()
this.getCateOptions()
},
methods: {
async handleExportModule () {
let url = "/heart/iccommunityselforganization/import-template-download";
let params = {};
await this.$http({
method: "POST",
url,
responseType: "blob",
data: params,
})
.then((res) => {
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel",
});
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
} else this.$message.error("下载失败");
})
.catch((err) => {
console.log("err", err);
return this.$message.error("网络错误");
});
},
//
handleExcelSuccess (res, file) {
if (res.code === 0 && res.msg === "success") {
console.log("resss---ppp", res);
} else {
this.$message.error(res.msg);
}
},
handleProgress (event, file, fileList) {
console.log("percentage", file.percentage);
},
beforeExcelUpload (file) {
console.log("file", file);
const isType = file.type === "application/vnd.ms-excel";
const isTypeComputer =
file.type ===
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
const fileType = isType || isTypeComputer;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!fileType) {
this.$message.error("上传文件只能是xls/xlsx格式!");
}
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return fileType && isLt1M;
},
async uploadHttpRequest (file) {
this.importLoading = true;
this.importBtnTitle = "正在上传中...";
this.$message({
showClose: true,
message: "导入中,请到系统管理-导入记录中查看进度",
duration: 0,
});
const fmData = new FormData(); //FormDataappend('key', value)
fmData.append("file", file.file); //
await this.$http
.post(
"/heart/iccommunityselforganization/importcommunityselforganization",
fmData
)
.then((res) => {
console.log("res-up", res);
if (res.data.code == 0 && res.data.msg == "success") {
// this.$message.success('')
this.getTableData();
} else this.$message.error(res.data.msg);
})
.catch((err) => {
console.log("失败", err);
file.onError(); //
// this.$message.error('')
});
// axios({
// url:
// window.SITE_CONFIG["apiURL"] +
// "/heart/iccommunityselforganization/importcommunityselforganization",
// method: "post",
// data: fmData,
// // responseType: "blob",
// })
// .then((res) => {
// this.importLoading = false;
// this.importBtnTitle = "";
// console.log("resresresresresresres", res);
// this.getTableData();
// if (res.data.code == 0) {
// return this.$message.success(res.data.data || "");
// } else {
// return this.$message.error(res.data.msg);
// }
// })
// .catch((err) => {
// console.log("", err);
// });
this.importLoading = false;
this.importBtnTitle = "导入";
this.$refs.upload.clearFiles();
},
handleCalscChange (val) {
console.log('val-----', val)
const arr = val.split('-')
this.fmData.orgId = arr[0]
this.fmData.orgType = arr[1] === 'grid' ? 'grid' : 'agency'
},
handleCheckbox (val) {
const { user } = this.$store.state
console.log('val---', val)
if (val) this.fmData.staffId = user.id
else this.fmData.staffId = ''
},
handleEventType (val) {
// console.log('val-----eee', val)
console.log('nodes---', this.$refs.cascaderEvent.getCheckedNodes())
const nodes = this.$refs.cascaderEvent.getCheckedNodes()
this.fmData.firstIdList = []
this.fmData.secondIdList = []
let level1 = nodes.filter(item => item.level === 1)
let level2 = nodes.filter(item => item.level === 2)
console.log('level2----1', level2)
level1.forEach(item => {
console.log('level2----2', level2)
if (item.hasChildren) {
for (let i = level2.length - 1; i >= 0; i--) {
if (level2[i].parent.value === item.value) level2.splice(i, 1)
}
}
})
this.fmData.firstIdList = level1.map(item => item.value)
this.fmData.secondIdList = level2.map(item => item.value)
},
cascaderClick (node, nodeData) {
console.log('node---', node)
console.log('nodeData---', nodeData)
// this.fmData.agencyId = nodeData.objectId;
// this.fmData.level = nodeData.objectType
// this.$refs.cascaderUnit.checkedValue = nodeData.id;
// this.$refs.cascaderUnit.computePresentText();
// this.$refs.cascaderUnit.toggleDropDownVisible(false);
},
handleSizeChange (val) {
console.log(`每页 ${val}`);
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange (val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableData();
},
handleSearch (val) {
console.log(JSON.stringify(this.fmData));
this.pageNo = 1;
this.getTableData();
},
resetForm (formName) {
this.$refs[formName].resetFields();
this.fmData = {
..._form
}
this.eventTypeCheck = []
this.orgId = ''
this.checkStaffId = false
this.handleSearch();
},
async handleChu () {
// const url = "/gov/project/project/project-list-export";
const url = '/gov/project/project/orgprojectexport'
const { pageSize, pageNo, fmData } = this;
this.exportLoading = true
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
// pageSize,
// pageNo,
...fmData,
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
this.exportLoading = false
})
.catch((err) => {
this.exportLoading = false
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
},
async handleAdd () { },
async handleWatch (rowIndex) {
let item = this.tableData[rowIndex];
this.currentProject = {
projectId: item.projectId,
};
this.pageType = "info";
},
async handleEdit (rowIndex) {
let item = this.tableData[rowIndex];
this.currentProject = {
projectId: item.projectId,
};
this.pageType = "edit";
},
handleClose () {
this.pageType = "list";
this.currentProject = {
projectId: "",
};
},
handleEditSuccess () {
this.handleClose();
this.getTableData();
},
async handleDel (rowData, rowIndex) {
console.log(rowData, rowIndex);
const url =
"/heart/iccommunityselforganization/delcommunityselforganization";
const { tableData } = this;
const { data, code, msg } = await requestPost(url, {
orgId: tableData[rowIndex].orgId,
});
if (code === 0) {
this.$message.success("删除成功!");
this.getTableData();
} else {
this.$message.success("操作失败!");
}
},
async getTableData () {
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list";
// const url = "/gov/project/project/project-list";
const url = '/gov/project/project/orgprojectlist'
const { pageSize, pageNo, fmData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
...fmData,
});
if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return {
...item,
urlList: item.urlList && item.urlList.map(n => n.url)
};
})
: [];
} else {
}
},
async getCateOptions () {
const url = "/gov/issue/issueprojectcategorydict/list";
const { data, code, msg } = await requestPost(url, {});
if (code === 0) {
// this.cateOptions = data.map((item) => {
// item.subCategory.forEach((subitem) => {
// delete subitem.subCategory;
// });
// return item;
// });
this.cateOptions = this.deepTree(data, 'subCategory')
} else {
this.$message.error(msg);
}
},
getGridList () {
const { user } = this.$store.state
this.dataListLoading = true
const params = {
agencyId: user.agencyId,
client: 'gov'
}
this.$http
// .post('/gov/org/userhouse/service/serviceScopeTree')
// .post('/data/aggregator/org/agencytree', params)
// .post('/gov/org/customeragency/staffinagencylist')
.post('/gov/org/customeragency/agencygridtree')
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
// let { agencyList, subAgencyList } = res.data
let _arr = []
_arr.push(res.data)
this.optionsA = this.deepTree(_arr, 'subAgencyList')
console.log('optionsA----', this.optionsA)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
deepTree (arr, child) {
if (Array.isArray(arr) && arr.length > 0) {
return arr.map(item => {
// if (child === 'subAgencyList') item.value = item.orgType + '-' + item.orgId
return {
...item,
[child]: item[child] && item[child].length > 0 && this.deepTree(item[child], child) || null
}
})
}
}
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
}
.resi-card-table {
margin-top: 20px;
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
}
}
.resi-btns {
margin-top: 20px;
text-align: center;
}
.resi-container .resi-card {
position: relative;
overflow: visible;
}
.demo-form-inline {
// display: flex;
// align-items: center;
// margin-bottom: 20px;
.resi-cell-label {
flex-shrink: 0;
min-width: 0;
box-sizing: border-box;
margin-right: 15px;
// text-align: right;
// line-height: 32;
}
.resi-cell-label1 {
width: max-content;
}
.resi-cell-value-radio {
display: flex;
align-items: center;
min-height: 32px;
}
.resi-cell-input {
width: 200px;
}
.resi-cell--daterange {
max-width: 260px;
}
.resi-cell-select {
width: 200px;
box-sizing: border-box;
margin-right: 10px;
&-middle {
width: 130px;
}
&-small {
width: 88px;
}
}
.resi-cell-select:last-child {
margin-right: 0;
}
.item_width_2 {
width: 200px;
}
}
.data-tag {
margin: 0 5px;
}
.mt10 {
margin-top: 10px;
}
</style>

117
src/views/modules/visual/command/cpts/map.vue

@ -48,6 +48,7 @@ let dotLayer2;
let countTextLayer;
let countTextBgLayer;
let searchMarker;
let searchBgLayer;
export default {
name: "l7",
@ -146,25 +147,12 @@ export default {
},
},
computed: {},
components: {
cptCard,
cptTb,
cptPopup,
},
watch: {},
async mounted() {
//
window._AMapSecurityConfig = {
securityJsCode: "92ea2c965c6cf1ba7ee3a8fe01449ef2",
};
this.iniMap();
},
computed: {
polygonData() {
const { srcGridData } = this;
@ -313,6 +301,20 @@ export default {
},
},
async mounted() {
console.log("指挥调度map初始化啦");
//
window._AMapSecurityConfig = {
securityJsCode: "92ea2c965c6cf1ba7ee3a8fe01449ef2",
};
this.iniMap();
//
searchMarker = null;
searchBgLayer = null;
},
methods: {
iniMap() {
const { darkStyle, lightStyle, srcGridData } = this;
@ -627,8 +629,83 @@ export default {
}
},
drawSearchBg(lng, lat) {
function getPoints(lng, lat) {
// lng lat dis
let r = 6371; //
let dis = 1.5; //3
let dlng =
2 *
Math.asin(Math.sin(dis / (2 * r)) / Math.cos((lat * Math.PI) / 180));
dlng = (dlng * 180) / Math.PI; //
let dlat = dis / r;
dlat = (dlat * 180) / Math.PI; //
//
for (let sides = 1; sides <= 360; sides++) {
var angle = Math.PI * (1 / sides - 1 / 2);
var rotatedAngle, x, y;
var points = [];
for (var i = 0; i < sides; ++i) {
rotatedAngle = angle + (i * 2 * Math.PI) / sides;
x = lng + dlng * Math.cos(rotatedAngle);
y = lat + dlat * Math.sin(rotatedAngle);
points.push([x, y]);
}
}
console.log("points=======", points);
return points;
}
let sourceData;
if (lng) {
sourceData = {
type: "FeatureCollection",
features: [
{
type: "Feature",
properties: {
center: [lng, lat],
},
geometry: {
type: "Polygon",
coordinates: [getPoints(lng, lat)],
},
},
],
};
} else {
sourceData = {
type: "FeatureCollection",
features: [],
};
}
if (searchBgLayer) {
console.log("searchBgLayer已经存在了", searchBgLayer);
searchBgLayer.setData(sourceData);
} else {
searchBgLayer = new PolygonLayer({
// autoFit: true,
})
.source(sourceData)
.color("#f0f")
.shape("fill")
.style({
opacityLinear: {
enable: true, // true - false
dir: "out", // in - out
},
opacity: 0.3,
raisingHeight: 0,
});
scene.addLayer(searchBgLayer);
}
},
async setDotMarker(item, posArr) {
this.removeDotMarker();
this.drawSearchBg(...posArr);
const marker = new Marker({
offsets: [0, -20],
}).setLnglat(posArr);
@ -652,15 +729,20 @@ export default {
});
scene.addMarker(marker);
scene.setZoomAndCenter(18, posArr);
scene.setZoomAndCenter(14, posArr);
marker.openPopup();
searchMarker = marker;
},
removeDotMarker() {
console.log("removeDotMarker");
if (searchMarker) {
searchMarker.remove();
}
if (searchBgLayer) {
console.log("removeDotMarker-----searchBgLayer");
this.drawSearchBg();
}
},
//
@ -743,6 +825,13 @@ export default {
border-radius: 10px;
overflow: hidden;
/deep/ .l7-popup-content {
background: rgba(#020340, 0.58);
}
/deep/ .l7-popup-close-button {
color: #fff;
}
#app {
width: 100%;
height: 100%;

86
src/views/modules/visual/command/cpts/popup.vue

@ -1,7 +1,13 @@
<template>
<div class="m-pop" v-show="!hidden">
<div class="m-pop" ref="pop" @mousewheel="handleWheel" v-show="!hidden">
<div class="info">
<div v-if="placeType === 'resi' || placeType === 'special_resi'">
<div
v-if="
placeType === 'resi' ||
placeType === 'special_resi' ||
placeType === 'volunteer'
"
>
<div class="info-title">居民信息</div>
<div class="item">
姓名
@ -47,13 +53,25 @@
</div>
<div class="operate">
<div @click="handleClickBtn('watch-resi')" class="btn">查看更多</div>
<div
@click="handleClickBtn('create-demand')"
v-if="info.agencyId == $store.state.user.agencyId"
class="btn"
class="btn z-blue"
>
发布需求
</div>
<div
v-if="
info.agencyId == $store.state.user.agencyId &&
placeType === 'volunteer'
"
@click="handleClickBtn('create-service')"
class="btn z-yellow"
>
发起服务
</div>
</div>
</div>
@ -239,6 +257,14 @@
创建时间
<span>{{ info.organizationCreatedTime || "--" }}</span>
</div>
<div
v-if="info.agencyId == $store.state.user.agencyId"
@click="handleClickBtn('create-service')"
class="btn z-yellow"
>
发起服务
</div>
</div>
<div v-if="placeType === 'group_rent'">
@ -350,11 +376,19 @@
地理位置
<span>{{ info.address || "--" }}</span>
</div>
<div
v-if="info.agencyId == $store.state.user.agencyId"
@click="handleClickBtn('create-service')"
class="btn z-yellow"
>
发起服务
</div>
</div>
<div v-if="placeType === 'grid'">
<div class="operate">
<div @click="handleClickBtn('create-service')" class="btn">
<div @click="handleClickBtn('create-service')" class="btn z-yellow">
发起服务
</div>
</div>
@ -394,6 +428,7 @@ export default {
return {
hidden: true,
placeType: "",
srcItem: {},
info: {},
list: [],
};
@ -405,8 +440,18 @@ export default {
mounted() {},
methods: {
handleWheel(e) {
if (this.$refs.pop.clientHeight >= 321) {
e.stopPropagation();
}
},
handleClickBtn(type) {
this.$emit("operate", type, this.info);
this.$emit("operate", type, {
placeType: this.placeType,
id: this.srcItem.id,
...this.info,
});
},
handleClickListItem(item) {
@ -415,7 +460,7 @@ export default {
},
async show(item) {
console.log("-----------------show");
console.log("-----------------show:", item);
const { placeType, latitude, longitude } = item;
if (!placeType) {
return false;
@ -429,7 +474,15 @@ export default {
this.list = item.dataList;
}
if (placeType === "resi" || placeType === "special_resi") {
if (placeType === "grid") {
this.info = { ...item };
}
if (
placeType === "resi" ||
placeType === "special_resi" ||
placeType === "volunteer"
) {
await this.loadResi(item);
}
if (placeType === "public_service") {
@ -477,6 +530,7 @@ export default {
await this.loadEnterprisePartrol(item);
}
this.placeType = item.placeType;
this.srcItem = item;
this.hidden = false;
return true;
},
@ -795,10 +849,10 @@ export default {
.m-pop {
@include scrollBar2;
max-width: 380px;
color: #333;
color: #fff;
font-size: 14px;
line-height: 20px;
max-height: 600px;
max-height: 321px;
overflow-y: auto;
.info {
@ -831,10 +885,20 @@ export default {
.btn {
margin-top: 20px;
margin-right: 20px;
width: 100px;
line-height: 30px;
width: 80px;
line-height: 24px;
border: 1px solid #eee;
text-align: center;
font-size: 14px;
border-radius: 2px;
&.z-blue {
background: #09a5ff;
border-color: #09a5ff;
}
&.z-yellow {
background: #fe6b53;
border-color: #fe6b53;
}
}
}
</style>

83
src/views/modules/visual/command/cpts/qsydw.vue

@ -7,14 +7,12 @@
<span>企事业单位巡查详情</span>
</div>
<div class="btn-close"
@click="handleClose">
<div class="btn-close" @click="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="list-wr">
<div class="list">
<div class="item">
<span class="item-field">场所类型</span>
<span>{{ eventDetailData.placeTypeName }}</span>
@ -31,12 +29,13 @@
<span class="item-field">联系电话</span>
<span>{{ eventDetailData.mobile }}</span>
</div>
</div>
<div class="list">
<div class="item">
<span class="item-field">场所区域</span>
<span>{{ eventDetailData.agencyName+eventDetailData.gridName }}</span>
<span>{{
eventDetailData.agencyName + eventDetailData.gridName
}}</span>
</div>
<div class="item">
<span class="item-field">场所地址</span>
@ -46,20 +45,18 @@
<span class="item-field">负责人</span>
<span>{{ eventDetailData.personInCharge }}</span>
</div>
</div>
</div>
<div class="div_record">
<record :formType="'edit'"
:source="'visiual'"
:enterpriseId="enterpriseId"
:enterpriseInfo="enterpriseInfo"></record>
<record
:formType="'edit'"
:source="'visiual'"
:enterpriseId="enterpriseId"
:enterpriseInfo="enterpriseInfo"
></record>
</div>
<div class="div-btn "
style="padding-bottom:10px">
<el-button size="small"
@click="handleClose">关闭</el-button>
<div class="div-btn" style="padding-bottom: 10px">
<el-button size="small" @click="handleClose">关闭</el-button>
</div>
</cpt-card>
</div>
@ -72,47 +69,43 @@ import cptCard from "@/views/modules/visual/cpts/card";
import { requestPost } from "@/js/dai/request";
import record from "@/views/modules/shequzhili/tuceng/anquan/xuncha/cpts/record";
export default {
name: "dialogInfo",
props: {
enterpriseId: {
type: String,
required: 'true'
required: "true",
},
},
components: {
cptCard,
record
record,
},
data () {
data() {
return {
loading: false,
pageType: 'dispose',
pageType: "dispose",
eventDetailData: {},
enterpriseInfo: {},
// enterpriseId: '',
};
},
async mounted () {
this.loading = false
async mounted() {
this.loading = false;
await this.loadInfo()
await this.loadInfo();
this.loading = true
this.loading = true;
},
methods: {
async loadInfo () {
async loadInfo() {
const url = "/gov/org/enterprise/detail/" + this.enterpriseId;
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
@ -120,28 +113,24 @@ export default {
const { data, code, msg } = await requestPost(url);
if (code === 0) {
this.eventDetailData = { ...data };
} else {
this.$message.error(msg);
}
},
handleClose () {
handleClose() {
this.pageType = "";
this.$emit("handleClose")
this.$emit("handleClose");
},
handleOk () {
handleOk() {
this.pageType = "";
this.pageNo = 1
this.pageNo = 1;
},
handleEditSuccess () {
handleEditSuccess() {
this.handleClose();
},
},
};
@ -223,4 +212,24 @@ export default {
.div_record {
// padding-bottom: 30px;
}
/deep/ .el-table {
color: #ffffff;
border-color: rgba(#000, 0.1) !important;
th {
background: rgba(8, 37, 134, 0.85) !important;
}
tr {
background: rgba(16, 75, 164, 0.85) !important;
&:hover,
td {
background: rgba(16, 75, 164, 0.85) !important;
}
.el-button {
color: #e4dc00;
}
}
}
</style>

45
src/views/modules/visual/command/cpts/serviceInfo.vue

@ -15,6 +15,7 @@
ref="demandEditForm"
:source="'visiual'"
:formType="'add'"
:defaultData="defaultData"
@close="handleClose"
@handleClose="handleClose"
@handleOk="handleOk"
@ -27,14 +28,17 @@
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import { requestPost } from "@/js/dai/request";
import addForm from "@/views/modules/communityService/fuwujilu/addForm";
export default {
name: "dialogInfo",
props: {},
props: {
defaultData: {
type: Object,
default: null,
},
},
components: {
cptCard,
@ -42,47 +46,18 @@ export default {
},
data() {
return {
loading: false,
pageType: "dispose",
eventId: "1529724450524061698",
eventDetailData: {},
};
return {};
},
async mounted() {
this.loading = false;
await this.handleSearch();
this.loading = true;
console.log('初始化serviceInfo', this.defaultData)
},
methods: {
async handleSearch() {
const url = "/gov/project/icEvent/detail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/detail";
const { data, code, msg } = await requestPost(url, {
icEventId: this.eventId,
});
if (code === 0) {
this.eventDetailData = { ...data };
this.pageType = "dispose";
} else {
this.$message.error(msg);
}
},
handleClose() {
this.pageType = "";
this.$emit("handleClose");
// this.eventId = ""
},
handleOk() {
this.pageType = "";
// this.eventId = ""
this.pageNo = 1;
this.handleClose();
},

14
src/views/modules/visual/command/cpts/sidemenu-left.vue

@ -145,9 +145,19 @@ export default {
},
handleClickItem(item) {
console.log("handleClickItem", item);
if (item.categoryKey) {
this.currentKey = item.categoryKey;
this.currentItem = { ...item };
if (item.categoryKey != this.currentKey) {
this.currentKey = item.categoryKey;
this.currentItem = { ...item };
} else {
this.currentKey = "";
this.currentItem = {
categoryKey: "",
coverageType: "",
placeType: "",
};
}
} else {
this.currentUnfolded =
this.currentUnfolded == item.placeType ? "" : item.placeType;

30
src/views/modules/visual/command/index.vue

@ -51,6 +51,7 @@
v-model="searchName"
/>
<img
v-show="searchName"
class="i-close"
@click="clearSearch"
src="@/assets/img/shuju/command/close.png"
@ -187,6 +188,7 @@
<service-info
v-if="pageType === 'create-service'"
ref="ref_service"
:default-data="serviceDefaultData"
@handleClose="handleClose"
/>
@ -429,6 +431,7 @@ export default {
selGridId: "",
eventId: "",
enterpriseId: "",
serviceDefaultData: null,
};
},
@ -439,9 +442,12 @@ export default {
categoryKeys2() {
this.requestMapDot2();
},
searchName() {
searchName(val) {
this.showedSearchResult = false;
this.searchResult = iniSearchResult();
if (val == "") {
this.$refs.map.removeDotMarker();
}
},
},
@ -454,9 +460,25 @@ export default {
methods: {
handleClickDotBtn(type, info) {
this.pageType = type;
if (type == "create-service") {
//
if (
info.placeType == "volunteer" ||
info.placeType == "community_org" ||
info.placeType == "party_unit"
) {
this.serviceDefaultData = {
serviceOrgType:
info.placeType == "volunteer"
? "ic_user_volunteer"
: info.placeType,
serviceOrgId: info.id,
};
} else if (info.placeType == "grid") {
this.serviceDefaultData = {
scopeIdArray: [info.id],
};
}
} else if (type == "watch-resi") {
this.toSubAgency("people", info.icResiUserId);
this.icResiUserId = info.icResiUserId;
@ -471,6 +493,7 @@ export default {
} else if (type == "watch-xuncha") {
this.enterpriseId = info.enterpriseId;
}
this.pageType = type;
},
handleClose() {
@ -600,6 +623,9 @@ export default {
},
async requestMapDot2Count() {
if (!this.placeType2) {
return (this.gridCountData = []);
}
const url = "/data/aggregator/coverage/dataList-left-subtotal";
let params = {
orgId: this.orgId,

62
src/views/modules/visual/communityGovern/distributionAnalyze.vue

@ -57,9 +57,15 @@
</div>
<div class="g-r">
<div class="r-map">
<screen-map class="map"
<!-- <screen-map class="map"
ref="map"
:showPolygonLayer="true"></screen-map>
:showPolygonLayer="true"></screen-map> -->
<new-map
ref="fenbumap"
:pitch="0"
:is-area="true"
:srcGridData="mapList"
/>
<div class="r-legend">
<div class="legend_item"
@ -89,6 +95,7 @@ import { lineOption } from './distributionLineOption.js'
import * as echarts from 'echarts'
import nextTick from 'dai-js/tools/nextTick'
import ScreenLoading from "@/views/modules/visual/components/screen-loading";
import newMap from '../cpts/map/index2.vue'
export default {
name: "HomeMap",
@ -274,7 +281,7 @@ export default {
this.getLine()
}
this.loadMap()
// this.loadMap()
this.isfirstInit = false
},
@ -286,17 +293,17 @@ export default {
url,
params,
(data, rspMsg) => {
this.agencyInfo = data.agencyList
this.orgId = this.agencyInfo.agencyId
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!this.agencyInfo.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street'
}
// this.agencyInfo = data.agencyList
// this.orgId = this.agencyInfo.agencyId
// if (!this.agencyInfo.latitude) {
// this.agencyInfo.latitude = 36.072227
// }
// if (!this.agencyInfo.longitude) {
// this.agencyInfo.longitude = 120.389455
// }
// if (!this.agencyInfo.level) {
// this.agencyInfo.level = 'street'
// }
//
++this.iscascaderShow
@ -335,16 +342,16 @@ export default {
if (code === 0) {
// this.agencyInfo = data
// if (!data.latitude) {
// this.agencyInfo.latitude = 36.072227
// }
// if (!data.longitude) {
// this.agencyInfo.longitude = 120.389455
// }
// if (!data.level) {
// this.agencyInfo.level = 'street'
// }
this.agencyInfo = data
if (!data.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!data.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!data.level) {
this.agencyInfo.level = 'street'
}
this.subAgencyArray = []
if (data.children && data.children.length > 0) {
this.subAgencyArray = data.children
@ -415,6 +422,7 @@ export default {
item.longitude = agencyItem.longitude
item.latitude = agencyItem.latitude
item.coordinates = agencyItem.coordinates
item.name = agencyItem.name
if (this.under === 0 || this.under) {
if (item.count < this.under || item.count === this.under) {
@ -434,6 +442,11 @@ export default {
}
break
} else {
item.longitude = ''
item.latitude = ''
item.coordinates = ''
item.name = ''
}
}
@ -614,6 +627,7 @@ export default {
cptTb,
screenEchartsFrame,
screenMap,
newMap,
ScreenLoading
},

108
src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue

@ -57,7 +57,7 @@
</div> -->
<div class="card-map">
<screen-map class="map"
<!-- <screen-map class="map"
ref="map"
@clickFeature="clickMap"
:showIconLayer="true"
@ -65,7 +65,16 @@
:showPolIconLayer="true"
:clickType="'popup'"
:areaScale="0.1"
:isAddOpenlay="true"></screen-map>
:isAddOpenlay="true"></screen-map> -->
<new-map
ref="duoMap"
:pitch="0"
:srcGridData="agencyInfo"
:dotList2="distributionsList"
:dotIcoList2="dotIconList"
:icon-size="20"
@clickDot="clickMap"
/>
</div>
<div class="map-tips">
@ -100,6 +109,7 @@ import ScreenNodata from "@/views/modules/visual/components/screen-nodata"
import screenMap from "@/views/modules/visual/components/screen-map"
import duoyuanDialog from './duoyuanDialog.vue'
import newMap from '../../cpts/map/index2.vue'
import { pieOption } from './pieOption.js'
import nextTick from 'dai-js/tools/nextTick'
@ -173,6 +183,17 @@ export default {
require('../../../../../assets/img/shuju/volunteer2.png'), //
require('../../../../../assets/img/shuju/volunteer6.png'), //
],
dotIconList: {
whdw: require('../../../../../assets/img/shuju/volunteer4.png'), //
lwh: require('../../../../../assets/img/shuju/volunteer5.png'), //
lyjlb: require('../../../../../assets/img/shuju/volunteer7.png'), //
zaxld: require('../../../../../assets/img/shuju/volunteer8.png'), //
yjdw: require('../../../../../assets/img/shuju/volunteer3.png'), //
other: require('../../../../../assets/img/shuju/volunteer9.png'), //
// require('../../../../../assets/img/shuju/volunteer1.png'), //
// require('../../../../../assets/img/shuju/volunteer2.png'), //
// require('../../../../../assets/img/shuju/volunteer6.png'), //
},
polygonList: []
}
},
@ -186,7 +207,7 @@ export default {
async mounted () {
this.dataLoading = true
await this.getAgencylist() //
// await this.getAgencylist() //
await this.getData() //
await this.getTable() //
this.dataLoading = false
@ -367,9 +388,9 @@ export default {
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.agencyInfo.agencyLevel = data.agencyLevel,
this.agencyInfo.longitude = data.longitude,
this.agencyInfo.latitude = data.latitude
this.agencyInfo = data
// this.agencyInfo.longitude = data.longitude,
// this.agencyInfo.latitude = data.latitude
let subPolygonList = []
data.children.forEach((item, index) => {
if (item.coordinates && item.coordinates.length > 0) {
@ -443,6 +464,7 @@ export default {
this.distributionsList = []
data.list.forEach((item, index) => {
item.urlIndex = this.getLegendIconIndex(item.color)
item.categoryKey = item.categoryCode
// if (index === 0) {
// item.latitude = "36.07394505338441"
// item.longitude = "120.3868167667315"
@ -452,7 +474,7 @@ export default {
// this.distributionsList = data.list
await this.loadOrgData()
// false
this.loadMap()
// this.loadMap()
this.isfirstInit = false
} else {
this.$message.error(msg)
@ -480,11 +502,12 @@ export default {
// await this.loadOrgData(feature.values_.level, feature.values_.id)
// this.loadMap()
// }
console.log('标注信息', feature.values_.properties)
if (!feature.values_.properties) {
console.log('标注信息', feature)
if (!feature) {
return
}
const data = feature.values_.properties.info
// const data = feature.values_.properties.info
const data = feature
data.organizationName = data.organizationName ? data.organizationName : '--'
data.categoryName = data.categoryName ? data.categoryName : '--'
data.organizationPersonCount = data.organizationPersonCount ? data.organizationPersonCount : '--'
@ -503,34 +526,37 @@ export default {
}
const coordinate = [data.longitude, data.latitude]
const showData = `
<div style='font-size:16px; color:#FFFFFF;'>详细信息</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:10px'>组织名称
<span>`+ data.organizationName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>组织类型
<span>`+ data.categoryName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>组织人数
<span>`+ data.organizationPersonCount + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>组织成员
<span>`+ organizationPersonnel + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>服务事项
<span>`+ data.serviceItem + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>负责人
<span>`+ data.principalName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>联系电话
<span>`+ data.principalPhone + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>创建时间
<span>`+ data.organizationCreatedTime + `</span>
<div style='width: 100%;text-align:left;word-break: break-all; white-space: normal;'>
<div style='font-size:16px; color:#FFFFFF;'>详细信息</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:10px'>组织名称
<span>`+ data.organizationName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>组织类型
<span>`+ data.categoryName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>组织人数
<span>`+ data.organizationPersonCount + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px;word-break: break-all;'>组织成员
<span>`+ organizationPersonnel + `</span>
</div>
<div style='width: 100%;font-size:12px; color:#FFFFFF;margin-top:5px;word-break: break-all;'>服务事项
<span style='word-break: break-all;'>`+ data.serviceItem + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>负责人
<span>`+ data.principalName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>联系电话
<span>`+ data.principalPhone + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>创建时间
<span>`+ data.organizationCreatedTime + `</span>
</div>
</div>
`
// console.log(showData)
this.$refs.map.handleShowPopup(showData, coordinate)
// this.$refs.map.handleShowPopup(showData, coordinate)
this.$refs.duoMap.showPopup(showData, coordinate)
},
// -
// async clickMap (feature) {
@ -657,6 +683,7 @@ export default {
ScreenNodata,
screenMap,
newMap,
duoyuanDialog
},
@ -720,6 +747,16 @@ export default {
font-weight: 800;
}
}
.card-map {
::v-deep .l7-popup-content {
background: #1257c9;
}
::v-deep .l7-popup-close-button {
right: 10px;
color: #fff;
}
}
.card-left-title {
position: relative;
padding-left: 40px;
@ -790,6 +827,7 @@ export default {
}
}
}
</style>

32
src/views/modules/visual/communityParty/gridParty.vue

@ -50,7 +50,7 @@
</div>
</div>
<div class="card-right">
<screen-map class="map"
<!-- <screen-map class="map"
ref="map"
@clickFeature="clickProject"
@lookMore="lookMore"
@ -59,7 +59,15 @@
:clickType="'popup'"
:showIconLayer="true"
:showPolIconLayer="true"
:areaScale="0.1"></screen-map>
:areaScale="0.1"></screen-map> -->
<new-map
ref="gridmap"
:pitch="0"
:srcGridData="agencyInfo"
:dotList2="unitMapList"
:icon-size="16"
@clickDot="clickProject"
/>
</div>
</div>
</cpt-card>
@ -86,7 +94,7 @@ import * as echarts from 'echarts';
import screenMap from "@/views/modules/visual/components/screen-map";
import memberInfo from './memberInfo.vue'
import peopleMore from "@/views/modules/visual/basicinfo/cpts/people-more";
import newMap from '../cpts/map/index2.vue'
export default {
name: "gridParty",
components: {
@ -95,6 +103,7 @@ export default {
screenEchartsFrame,
screenMap,
memberInfo,
newMap,
peopleMore
},
data() {
@ -530,24 +539,24 @@ export default {
const { data, code, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.unitMapList = data
this.loadMap()
// this.loadMap()
this.isfirstInit = false
this.$refs.map.handleClosePopup()
// this.$refs.map.handleClosePopup()
} else {
this.$message.error(internalMsg)
this.unitMapList = []
this.loadMap()
// this.loadMap()
this.isfirstInit = false
this.$refs.map.handleClosePopup()
// this.$refs.map.handleClosePopup()
}
},
//
async clickProject (feature) {
this.userId = ''
const featureInfo = feature.values_.properties.info
this.userId = feature.values_.properties.info.id
const featureInfo = feature
this.userId = feature.id
let coordinate = [featureInfo.longitude, featureInfo.latitude]
let {name, gridName, houseName, mobile, idCard, gzdw, rhzk, icResiUser} = feature.values_.properties.info
let {name, gridName, houseName, mobile, idCard, gzdw, rhzk, icResiUser} = feature
name = name ? name : '--'
gridName = gridName ? gridName : '--'
houseName = houseName ? houseName : '--'
@ -580,7 +589,8 @@ export default {
</div>
`
const isShowMore = icResiUser ? true : false
this.$refs.map.handleShowPopup(showData, coordinate, isShowMore)
// this.$refs.map.handleShowPopup(showData, coordinate, isShowMore)
this.$refs.gridmap.showPopup(showData, coordinate)
},
lookMore(e) {
this.userId = this.userId

155
src/views/modules/visual/cpts/map/index2.vue

@ -96,9 +96,12 @@ export default {
type: Number,
default: 60,
},
isArea: {
type: Boolean,
default: false
},
srcGridData: {
type: Object,
type: Object | Array,
default: null,
},
@ -147,17 +150,27 @@ export default {
computed: {
polygonData() {
const { srcGridData } = this;
if (
!srcGridData ||
!srcGridData.children ||
!Array.isArray(srcGridData.children)
) {
return { type: "FeatureCollection", features: [] };
const { srcGridData, isArea } = this;
if (isArea) {
if (
!srcGridData || !Array.isArray(srcGridData)
) {
return { type: "FeatureCollection", features: [] };
}
} else {
if (
!srcGridData ||
!srcGridData.children ||
!Array.isArray(srcGridData.children)
) {
return { type: "FeatureCollection", features: [] };
}
}
const _Plo = isArea ? srcGridData : srcGridData.children
console.log('_Plo-----', _Plo)
const polygon = [
...srcGridData.children
.filter((item) => item.coordinates.length > 0)
..._Plo
.filter((item) => item.coordinates && item.coordinates.length > 0)
.map((item) => ({
type: "Feature",
properties: {
@ -382,62 +395,64 @@ export default {
});
scene.addLayer(lineLayer);
circleLayer = new PolygonLayer({
zIndex: 3,
})
.source(polygonDotData)
.color("name", styleConfig.circleColor)
.shape("circle")
.active(true)
.animate(true)
.size(50)
.style({
offsets: [0, -10], // [, ]
opacity: 1,
});
scene.addLayer(circleLayer);
scene.addImage("pos-red", require("@/assets/img/shuju/grid/pos-red.png"));
scene.addImage(
"pos-green",
require("@/assets/img/shuju/grid/pos-green.png")
);
scene.addImage(
"pos-yellow",
require("@/assets/img/shuju/grid/pos-yellow.png")
);
posLayer = new PolygonLayer({
zIndex: 4,
})
.source(polygonDotData)
.shape("name", ["pos-red", "pos-green", "pos-yellow"])
.size(12)
.style({
offsets: [0, 8], // [, ]
// rotation: 60,
layerType: "fillImage",
});
scene.addLayer(posLayer);
textLayer = new PolygonLayer({
zIndex: 20,
})
.source(polygonDotData)
.color("name", styleConfig.textColor)
.shape("name", "text")
.size(16)
.style({
textAnchor: "center", // center|left|right|top|bottom|top-left
textOffset: [0, 40], // [, ]
spacing: 2, //
padding: [2, 2], // padding []
stroke: styleConfig.textStrokeColor, //
strokeWidth: 0.1, //
strokeOpacity: 0.8,
textAllowOverlap: true,
if (!this.isArea) {
circleLayer = new PolygonLayer({
zIndex: 3,
})
.source(polygonDotData)
.color("name", styleConfig.circleColor)
.shape("circle")
.active(true)
.animate(true)
.size(50)
.style({
offsets: [0, -10], // [, ]
opacity: 1,
});
scene.addLayer(circleLayer);
scene.addImage("pos-red", require("@/assets/img/shuju/grid/pos-red.png"));
scene.addImage(
"pos-green",
require("@/assets/img/shuju/grid/pos-green.png")
);
scene.addImage(
"pos-yellow",
require("@/assets/img/shuju/grid/pos-yellow.png")
);
posLayer = new PolygonLayer({
zIndex: 4,
})
.active(true);
scene.addLayer(textLayer);
.source(polygonDotData)
.shape("name", ["pos-red", "pos-green", "pos-yellow"])
.size(12)
.style({
offsets: [0, 8], // [, ]
// rotation: 60,
layerType: "fillImage",
});
scene.addLayer(posLayer);
textLayer = new PolygonLayer({
zIndex: 20,
})
.source(polygonDotData)
.color("name", styleConfig.textColor)
.shape("name", "text")
.size(16)
.style({
textAnchor: "center", // center|left|right|top|bottom|top-left
textOffset: [0, 40], // [, ]
spacing: 2, //
padding: [2, 2], // padding []
stroke: styleConfig.textStrokeColor, //
strokeWidth: 0.1, //
strokeOpacity: 0.8,
textAllowOverlap: true,
})
.active(true);
scene.addLayer(textLayer);
}
polygonLayer.on("mousemove", (e) => {
polygonLayer.style({
@ -580,9 +595,11 @@ export default {
if (polygonLayer) {
polygonLayer.setData(polygonData);
lineLayer.setData(polygonData);
textLayer.setData(polygonData);
posLayer.setData(polygonData);
circleLayer.setData(polygonData);
if (!this.isArea) {
textLayer.setData(polygonData);
posLayer.setData(polygonData);
circleLayer.setData(polygonData);
}
}
},

11
src/views/modules/visual/shundeju/controlCount.vue

@ -204,12 +204,19 @@ export default {
let params = {
page: this.pageNo,
limit: this.pageSize,
startTime: this.startTime,
endTime: this.endTime
startTime: this.startTime + ' 00:00:00',
endTime: this.endTime + ' 23:59:59'
};
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
this.tableData = data.list.map((item, index) => {
if (item.gender == "0") {
item.gender = '女'
} else if (item.gender == "1") {
item = '男'
} else {
item = '未知'
}
return {
...item,
index: index + 1

Loading…
Cancel
Save