Browse Source

积分记录

shibei_master
jiangyy 4 years ago
parent
commit
22b909c187
  1. 2
      src/assets/scss/modules/visual/personCategory.scss
  2. 40
      src/views/components/scoreRecord.vue
  3. 189
      src/views/modules/communityParty/regionalParty/finishList.vue
  4. 7
      src/views/modules/communityParty/regionalParty/units.vue
  5. 10
      src/views/modules/systemManagement/serviceMatter/service.vue
  6. 4
      src/views/modules/systemManagement/serviceMatter/serviceForm.vue
  7. 64
      src/views/modules/visual/basicinfo/basicInfoMain.vue
  8. 10
      src/views/modules/visual/basicinfo/personCategory/Base.js
  9. 317
      src/views/modules/visual/basicinfo/personCategory/components/screen-table/index.vue
  10. 147
      src/views/modules/visual/basicinfo/personCategory/index.vue
  11. 28
      src/views/modules/workSys/mapConfig.vue

2
src/assets/scss/modules/visual/personCategory.scss

@ -30,6 +30,8 @@
border: 1px solid #1043c0;
box-shadow: 0px 83px 150px 0px #002790;
border-radius: 8px;
margin-top: 10px;
margin-left: 10px;
margin-right: 15px;
margin-bottom: 15px;
cursor: pointer;

40
src/views/components/scoreRecord.vue

@ -24,7 +24,7 @@
<div>
<el-form-item label="总计:"
prop="startTime">
<span>{{totalScore}}</span>
<span>{{totalPoint}}</span>
</el-form-item>
</div>
@ -43,40 +43,40 @@
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="unitName"
<el-table-column prop="categoryName"
header-align="center"
align="center"
label="需求类型"
width="180">
</el-table-column>
<el-table-column prop="title"
<el-table-column prop="demandUserName"
header-align="center"
align="center"
label="需求人"
width="100">
</el-table-column>
<el-table-column prop="address"
<el-table-column prop="content"
header-align="center"
align="center"
label="需求内容"
min-width="230">
</el-table-column>
<el-table-column prop="activityTime"
<el-table-column prop="pointTime"
header-align="center"
align="center"
label="时间"
width="150">
</el-table-column>
<el-table-column prop="activityTime"
<el-table-column prop="score"
header-align="center"
align="center"
label="评价"
width="80">
</el-table-column>
<el-table-column prop="activityTime"
<el-table-column prop="point"
header-align="center"
align="center"
label="积分"
@ -111,12 +111,12 @@ export default {
data () {
return {
loading: false,
totalScore: 100,
totalPoint: 100,
total: 0,
pageSize: 10,
pageNo: 0,
tableLoading: false,
agencyId: '',
serviceId: '',
pickerOptions: { //
disabledDate (time) {
@ -152,11 +152,10 @@ export default {
methods: {
async initForm (row) {
this.initDate()
const { user } = this.$store.state
this.agencyId = user.agencyId
this.serviceId = row.id
//
//
await this.loadTable()
},
@ -168,10 +167,11 @@ export default {
async loadTable () {
this.tableLoading = true
const url = "/heart/icpartyactivity/search"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list"
// const url = "/heart /userdemand/recordList"
const url = "http://yapi.elinkservice.cn/mock/245/heart/userdemand/recordList"
let params = {
agencyId: this.agencyId,
serviceType: this.serviceType,
serviceId: this.serviceId,
pageSize: this.pageSize,
pageNo: this.pageNo,
...this.formData
@ -180,8 +180,9 @@ export default {
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.total = data.total
this.tableData = data.list
this.totalPoint = data.totalPoint
this.total = data.page.total
this.tableData = data.page.list
} else {
this.$message.error(msg)
}
@ -292,7 +293,10 @@ export default {
},
props: {
serviceType: {
type: String,
default: ''
}
}
}
</script>

189
src/views/modules/communityParty/regionalParty/finishList.vue

@ -23,11 +23,12 @@
header-align="center"
align="center"
label="年份"
min-width="90">
min-width="120">
<template slot-scope="scope">
<div v-if="scope.row.isEdit">
<el-select class="item_width_2"
<div v-if="scope.row.isEdit"
class="picker_year">
<!-- <el-select class="item_width_2"
v-model="scope.row.year"
placeholder="请选择">
<el-option v-for="(item,index) in yearList"
@ -36,13 +37,19 @@
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-select> -->
<el-date-picker v-model="scope.row.year"
type="year"
format="yyyy"
value-format="yyyy"
placeholder="选择年">
</el-date-picker>
</div>
<span v-else>{{scope.row.year}}</span>
</template>
</el-table-column>
<el-table-column prop="timeType"
<el-table-column prop="type"
header-align="center"
align="center"
label="类型"
@ -51,7 +58,7 @@
<template slot-scope="scope">
<div v-if="scope.row.isEdit">
<el-select class="item_width_2"
v-model="scope.row.timeType"
v-model="scope.row.type"
placeholder="请选择">
<el-option v-for="(item,index) in typeList"
@click.native="hancleChangeType(scope.row,index,scope.$index)"
@ -65,7 +72,7 @@
</template>
</el-table-column>
<el-table-column prop="time"
<el-table-column prop="monthQuarter"
header-align="center"
align="center"
label="时间"
@ -74,7 +81,7 @@
<template slot-scope="scope">
<div v-if="scope.row.isEdit">
<el-select class="item_width_3"
v-model="scope.row.time"
v-model="scope.row.monthQuarter"
placeholder="请选择">
<el-option v-for="item in scope.row.timeList"
:key="item.value"
@ -83,11 +90,11 @@
</el-option>
</el-select>
</div>
<span v-else>{{scope.row.timeShow}}</span>
<span v-else>{{scope.row.monthQuarterName}}</span>
</template>
</el-table-column>
<el-table-column prop="state"
<el-table-column prop="status"
header-align="center"
align="center"
label="完成情况"
@ -95,16 +102,16 @@
<template slot-scope="scope">
<div v-if="scope.row.isEdit">
<el-select class="item_width_2"
v-model="scope.row.state"
v-model="scope.row.status"
placeholder="全部">
<el-option v-for="item in stateList"
<el-option v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<span v-else>{{scope.row.state==='1'?'完成':'未完成'}}</span>
<span v-else>{{scope.row.status==='1'?'完成':'未完成'}}</span>
</template>
</el-table-column>
@ -170,86 +177,52 @@ export default {
data () {
return {
tableLoading: false,
unitId: '',
typeList: [
{
value: 'quarter',
label: '季度'
},
{
value: 'month',
value: 'monthly',
label: '月度'
}
],
yearList: [
{
value: '2019',
label: '2019'
},
{
value: '2020',
label: '2020'
},
{
value: '2021',
label: '2021'
},
],
yearList: [],
quarterList: [
{
value: '1',
label: '第一季度'
},
{
value: '2',
value: 'Q1',
label: '第一季度'
},
{
value: '3',
value: 'Q2',
label: '第二季度'
},
{
value: '4',
value: 'Q3',
label: '第三季度'
},
{
value: 'Q4',
label: '第四季度'
},
],
monthlist: [],
timeList: [],
stateList: [
statusList: [
{
value: '1',
label: '完成'
label: '完成'
},
{
value: '2',
value: '0',
label: '未完成'
},
],
tableData: [
{
timeType: 'month',
typeShow: '月度',
year: '2019',
time: '12',
timeShow: '12月',
state: '1',
stateShow: '完成',
score: 90
},
{
timeType: 'quarter',
typeShow: '季度',
year: '2019',
time: '3',
timeShow: '第三季度',
state: '2',
stateShow: '未完成',
score: 90
}
],
tableData: [],
}
@ -261,7 +234,8 @@ export default {
methods: {
async initTable () {
async initTable (row) {
this.unitId = row.id
//
this.initData()
@ -299,13 +273,13 @@ export default {
let empetArray = []
this.tableData[tableIndex].timeList = [...empetArray]
let rowData = JSON.parse(JSON.stringify(row))
rowData.time = ''
rowData.monthQuarter = ''
this.$set(this.tableData, tableIndex, rowData)
if (row.timeType === 'month') {
if (row.type === 'monthly') {
this.tableData[tableIndex].timeList = [...this.monthlist]
} else if (row.timeType === 'quarter') {
} else if (row.type === 'quarter') {
this.tableData[tableIndex].timeList = [...this.quarterList]
}
},
@ -319,16 +293,9 @@ export default {
//form
async loadTable () {
this.tableData.forEach(item => {
item.isEdit = false
item.timeList = []
});
return false
this.tableLoading = true
const url = '/gov/org/placepatrolreviewrecord/getlist'
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolreviewrecord/getlist'
// const url = '/heart/icpartyunitcompletion/list'
const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/list'
let params = {
placePatrolRecordId: this.placePatrolRecordId
}
@ -338,14 +305,12 @@ export default {
if (code === 0) {
if (data.list && data.list.length > 0) {
data.list.forEach(item => {
item.isEdit = false
item.isNew = false
let arrayInspectors = item.inspectors.split(',')
item.inspectorArray = [...arrayInspectors]
item.timeList = []
item.typeShow = item.type === 'monthly' ? '月度' : '季度'
let arrayReviewTime = item.reviewTime.split(' ')
item.reviewTime = arrayReviewTime[0]
});
this.tableData = [...data.list]
@ -362,13 +327,13 @@ export default {
let obj = {
isEdit: true,//
timeType: '',
type: '',
typeShow: '',
year: '',
time: '',
monthQuarter: '',
timeShow: '',
state: '',
stateShow: '',
status: '',
unitId: '',
score: 0.0
}
this.tableData.push(obj)
@ -380,9 +345,9 @@ export default {
rowData.isEdit = true
this.$set(this.tableData, tableIndex, rowData)
if (row.timeType === 'month') {
if (row.type === 'monthly') {
this.tableData[tableIndex].timeList = [...this.monthlist]
} else if (row.timeType === 'quarter') {
} else if (row.type === 'quarter') {
this.tableData[tableIndex].timeList = [...this.quarterList]
}
},
@ -402,27 +367,36 @@ export default {
},
async addReview (row, tableIndex) {
console.log(row)
return false
let url = "/gov/org/placepatrolreviewrecord/add"
if (row.placePatrolReviewRecordId) {
url = "/gov/org/placepatrolreviewrecord/edit"
}
// let url = "/heart/icpartyunitcompletion/save"
let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/save"
let params = JSON.parse(JSON.stringify(row))
params.inspectors = params.inspectorArray.join(',')
params.reviewTime = params.reviewTime + ' 00:00:00'
params.unitId = this.unitId
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let array = data.reviewTime.split(' ')
data.reviewTime = array[0]
data.isEdit = false
data.isNew = false
this.$set(this.tableData, tableIndex, data)
row.isEdit = false
row.typeShow = row.type === 'monthly' ? '月度' : '季度'
if (row.type === 'monthly') {
row.monthQuarterName = row.monthQuarter + '月'
} else {
for (let index in row.timeList) {
if (row.timeList[index].value === row.monthQuarter) {
row.monthQuarterName = row.timeList[index].label
}
}
}
this.$set(this.tableData, tableIndex, row)
} else {
@ -437,13 +411,13 @@ export default {
if (!row.year) {
message = message + '年份不能为空;'
}
if (!row.timeType) {
if (!row.type) {
message = message + '类型不能为空;'
}
if (!row.time) {
if (!row.monthQuarter) {
message = message + '时间不能为空;'
}
if (!row.state) {
if (!row.status) {
message = message + '完成情况不能为空;'
}
@ -461,7 +435,7 @@ export default {
type: "warning"
})
.then(() => {
if (row.placePatrolReviewRecordId) {//id
if (row.id) {//id
this.deleteRecord(row, tableIndex)
} else {//id
this.tableData.splice(tableIndex, 1);
@ -478,10 +452,11 @@ export default {
async deleteRecord (row, tableIndex) {
const url = "/gov/org/placepatrolreviewrecord/del"
// const url = "/heart/icpartyunitcompletion/delete"
const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/delete"
let params = {
placePatrolReviewRecordId: row.placePatrolReviewRecordId
id: row.id
}
const { data, code, msg } = await requestPost(url, params)
@ -564,4 +539,10 @@ export default {
display: flex;
justify-content: flex-end;
}
.picker_year {
/deep/ .el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 140px;
}
}
</style>

7
src/views/modules/communityParty/regionalParty/units.vue

@ -103,9 +103,9 @@
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small"
type="red">导入</el-button> -->
type="red">导入</el-button>
</el-upload>
</el-upload>-->
</div>
@ -269,7 +269,8 @@
width="1050px"
top="5vh"
@closed="diaClose">
<score-record ref="ref_score"></score-record>
<score-record ref="ref_score"
:serviceType="'party_unit'"></score-record>
</el-dialog>
</div>

10
src/views/modules/systemManagement/serviceMatter/service.vue

@ -143,8 +143,8 @@ export default {
async loadTable () {
this.tableLoading = true
// const url = "/heart/serviceitem/list"
const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/list"
const url = "/heart/serviceitem/list"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/list"
let params = {
customerId: this.customerId
}
@ -217,11 +217,11 @@ export default {
},
async disableService (row, type) {
// const url = "/heart/serviceitem/updatestatus"
const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/updatestatus"
const url = "/heart/serviceitem/updatestatus"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/updatestatus"
let params = {
id: row.categoryId,
categoryId: row.categoryId,
usableFlag: type === 'able'
}

4
src/views/modules/systemManagement/serviceMatter/serviceForm.vue

@ -116,8 +116,8 @@ export default {
},
async addService () {
// let url = '/heart/serviceitem/saveorupdate'
let url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/saveorupdate"
let url = '/heart/serviceitem/saveorupdate'
// let url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/saveorupdate"
const { data, code, msg } = await requestPost(url, this.formData)

64
src/views/modules/visual/basicinfo/basicInfoMain.vue

@ -155,7 +155,7 @@ var createTextStyle = function (feature) {
text: feature.values_.name,
backgroundFill: new Fill({
// color: 'rgba(0, 146, 238, 0.75)'
color: textColorArray[feature.values_.index - 1]
color: textColorArray[feature.values_.colorIndex]
}),
padding: [4, 10, 4, 10],
//text: "",
@ -174,10 +174,10 @@ var polygonStyleFunction = (function () {
return new Style({
fill: new Fill({
// color: [255, 255, 255, 0.3]
color: polygonColorArray[feature.values_.index - 1]
color: polygonColorArray[feature.values_.colorIndex]
}),
stroke: new Stroke({
color: polygonColorArray[feature.values_.index - 1],
color: polygonColorArray[feature.values_.colorIndex],
width: 3
}),
@ -214,11 +214,14 @@ const vueGis = {
runNum: 0,
runAgencyArray: [],
selUserId: '',
center: [],
zoom: null,
}
},
async mounted () {
//
await this.loadOrgData()
@ -289,12 +292,14 @@ const vueGis = {
// type:polygon / search people
async toSubAgency (type, e, searchName) {
console.log(e)
this.runNum++
this.runAgencyArray.push(this.orgData)
if (!e) {
return false
}
//neighborHood
if (type === 'people') {
this.runNum++
this.runAgencyArray.push(this.orgData)
this.orgLevel = 'people'
this.selUserId = e
this.orgId = ''
@ -305,9 +310,11 @@ const vueGis = {
}
this.searchName = searchName
} else if (type === 'search') {
} else if (type === 'search') {
this.runNum++
this.runAgencyArray.push(this.orgData)
this.orgLevel = 'search'
this.orgId = ''
this.orgData = {
@ -320,8 +327,17 @@ const vueGis = {
});
} else {
this.subAgencyArray.forEach(item => {
if (!e.selected[0]) {
return false
}
this.runNum++
this.orgData.center = map.getView().getCenter()
this.orgData.zoom = map.getView().getZoom()
console.log('center', map.getView().getCenter())
console.log('zoom', map.getView().getZoom())
this.runAgencyArray.push(this.orgData)
this.subAgencyArray.forEach(item => {
if (item.id === e.selected[0].values_.id) {
this.orgId = item.id
this.orgLevel = item.level
@ -332,7 +348,6 @@ const vueGis = {
if (this.orgLevel === 'neighborHood') {
this.loadList()
this.$nextTick(() => {
// id
this.$refs.ref_community.initData(this.orgData.id, this.orgData.name);
});
@ -343,7 +358,6 @@ const vueGis = {
}
},
//
@ -378,6 +392,8 @@ const vueGis = {
this.orgId = this.orgData.id
this.orgLevel = this.orgData.level
this.center = this.orgData.center
this.zoom = this.orgData.zoom
if (this.orgLevel === 'people') {
@ -437,10 +453,14 @@ const vueGis = {
if (subAgencyArray && subAgencyArray.length > 0) {//
let oneData = {}
subAgencyArray.forEach(agencyItem => {
let count = 0
for (let i = 0; i < subAgencyArray.length; i++) {
const agencyItem = subAgencyArray[i]
if (agencyItem.coordinates && agencyItem.coordinates !== '') {//
let urlNum = this.getRndBetween(1, 3)
let urlNum = count % 3
count++
oneData = {
type: 'Feature',
@ -449,7 +469,7 @@ const vueGis = {
id: agencyItem.id,
level: agencyItem.level,
name: agencyItem.name,
index: urlNum//
colorIndex: urlNum//
},
geometry: {
type: 'Polygon',
@ -474,7 +494,7 @@ const vueGis = {
oneData.geometry.coordinates.push(polygonArray)
featureData.push(oneData)
}
});
}
}
if (featureData && featureData.length > 0) {
@ -515,7 +535,7 @@ const vueGis = {
scale: 0.5,
// src: "/img/largeScreen/icon_camra.png"
// src: "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20211116/a219130b6bc74b0b80b5ddb0fce0892a.png"
src: iconUrlArray[oneIcon.values_.index - 1]
src: iconUrlArray[oneIcon.values_.colorIndex]
})
});
@ -532,18 +552,20 @@ const vueGis = {
},
//
setMapLocation () {
this.centerPoint = []
if (this.center && this.center.length > 0) {
this.centerPoint = this.center
} else if (this.orgData.longitude && this.orgData.latitude) {
if (this.orgData.longitude && this.orgData.latitude) {
this.centerPoint = []
this.centerPoint.push(this.orgData.longitude)
this.centerPoint.push(this.orgData.latitude)
} else {
this.centerPoint = centerPointGlobal
}
this.setZoom(this.orgData.agencyLevel)
if (!this.zoom) {
this.setZoom(this.orgData.agencyLevel)
}
},
//

10
src/views/modules/visual/basicinfo/personCategory/Base.js

@ -1,10 +0,0 @@
class Base {
constructor() {
this.a = '3'
this.init()
}
init() {
console.log('1')
}
}
export default Base

317
src/views/modules/visual/basicinfo/personCategory/components/screen-table/index.vue

@ -3,11 +3,48 @@
<div class="table">
<div class="table-header">
<div class="table-header-th"
v-for="(item, index) in headerList"
:key="item.title"
:style="headerStyle[index]">
{{ item.title }}
style="width:5%">
{{ '序号' }}
</div>
<div class="table-header-th"
style="width:10%">
{{ '姓名' }}
</div>
<div class="table-header-th"
style="width:15%">
{{ '调整时间' }}
</div>
<div class="table-header-th table-header-select"
style="width:10%"
@click.stop="handleShowType()">
<span>{{ typeShow }}</span>
<img src="@/assets/img/xiala.png" />
<div class="user_list"
v-show="showTypeSelect">
<div v-for="(item,index) in typeList"
:key="index"
class="user_item"
@click.stop="handleClickType(item.value,item.label)">
<div class="user_item_content">
<div class="name">{{item.label}}</div>
</div>
<div :class="['item_line',{'last_line':index==(typeList.length-1)}]"></div>
</div>
</div>
</div>
<div class="table-header-th"
style="width:20%">
{{ '网格' }}
</div>
<div class="table-header-th"
style="width:30%">
{{ '小区楼栋' }}
</div>
</div>
<div class="table-body">
<div class="table-body-tr"
@ -15,22 +52,10 @@
:key="index">
<div class="td"
v-for="(item, indexs) in value"
:key="indexs"
:style="tableContentStyle[indexs]">
<span @click="toUserInfo(item)">{{ item }}</span>
<span v-if="indexs + 1 == value.length && item.length > 8"
class="more"
@click.stop="onClickMorePop(index)"
ref="morePop">
更多>
<span class="more-pop"
@click="toUserInfo(item)"
v-if="visiblePopList[index]">
<!-- 李佳琪刘阳赵欣丁一嘉敏李岩何嘉慧
李易峰赵敏何军曲树惠 -->
{{ item }}
</span>
</span>
:style="{width:widthList[indexs]}"
:key="indexs">
<span>{{ item }}</span>
</div>
</div>
<screen-loading v-if="visibleLoading">加载中</screen-loading>
@ -48,144 +73,108 @@
<script>
import ScreenLoading from "../screen-loading/index";
import { requestPost } from "@/js/dai/request";
import Vue from "vue";
export default {
name: "warning-table",
components: {
ScreenLoading,
},
props: {
headerList: {
type: Array,
required: false,
default: () => {
return [
{ title: "序号" },
{ title: "所属网格" },
{ title: "所属小区" },
{ title: "楼号" },
{ title: "姓名" },
];
},
},
tableData: {
type: Array,
required: false,
default: () => {
return [
// [
// 1,
// "",
// "",
// "2",
// "",
// ],
// [
// 2,
// "",
// "",
// "2",
// "",
// ],
];
},
},
//
headerStyle: {
type: Array,
default: () => {
return [
// {
// width:'200px',
// border:'1px solid red'
// },
// {
// width:'200px'
// }
];
},
},
//
tableContentStyle: {
type: Array,
default: () => {
return [
// {
// width:'200px',
// border:'1px solid red'
// },
// {
// width:'200px'
// }
];
},
},
visibleLoading: {
type: Boolean,
default: true,
},
// //
// ava: {
// type: Number,
// default: 8
// },
// // --10%
// headerHeightAva: {
// type: String,
// default: '10%'
// },
// //
// tableContentAva: {
// type: Number,
// default: 5
// },
},
data () {
return {
visiblePopList: [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
visibleLoading: false,
tableData: [],
showTypeSelect: false,
widthList: ['5%', '10%', '15%', '10%', '20%', '30%'],
typeList: [
{
value: '1',
label: '迁入'
},
{
value: '2',
label: '迁出'
},
{
value: '3',
label: '新增'
},
],
typeShow: '类别',
selType: '',
monthId: '',
categoryKey: '',
pageNo: '',
pageSize: '',
};
},
watch: {
tableData (arr) {
if (Array.isArray(arr)) {
this.visiblePopList = new Array(arr.length).fill(false);
}
},
},
mounted () {
window.addEventListener("click", (e) => {
this.visiblePopList = new Array(this.visiblePopList.length).fill(false);
});
},
created () { },
methods: {
toUserInfo (uid) {
// this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` });
//
async getUserwarnlist (monthId, categoryKey, pageNo, pageSize) {
this.visibleLoading = true
if (monthId) {
this.monthId = monthId
this.categoryKey = categoryKey
this.pageNo = pageNo
this.pageSize = pageSize
}
let tableData = [];
// const url = "/temp/record-list";
const url = "http://yapi.elinkservice.cn/mock/245/temp/record-list";
let params = {
categoryKey: this.categoryKey,
monthId: this.monthId,
type: this.selType,
pageNo: this.pageNo,
pageSize: this.pageSize,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
data.list.forEach((item, index) => {
tableData.push([
index + 1,
item.name ? item.name : '--',
item.changeTime ? item.changeTime : '--',
item.typeName ? item.typeName : '--',
item.gridName ? item.gridName : '--',
item.address ? item.address : '--',
]);
});
this.tableData = tableData;
this.total = data.total;
this.visibleLoading = false
} else {
}
},
onClickMorePop (index) {
this.visiblePopList.forEach((item, indexs) => {
if (index == indexs) {
Vue.set(this.visiblePopList, index, true);
} else {
Vue.set(this.visiblePopList, indexs, false);
}
});
handleShowType () {
this.showTypeSelect = !this.showTypeSelect
},
handleClickType (value, label) {
this.typeShow = label
this.selType = value
this.getUserwarnlist()
this.showTypeSelect = !this.showTypeSelect
},
},
};
</script>
@ -213,6 +202,18 @@ export default {
text-align: center;
width: calc(100% / 5);
}
&-select {
position: relative;
cursor: pointer;
// display: flex;
// justify-content: space-around;
> img {
margin-left: 10px;
// width: 10px;
// height: 10px;
}
}
}
&-body {
@ -304,4 +305,54 @@ export default {
}
}
}
.user_list {
margin-top: 2px;
position: absolute;
z-index: 10;
left: 25%;
background: #020340;
border: 1px solid #0a359b;
border-radius: 4px;
box-shadow: 0 0 10px inset #1a5afd;
.user_item {
padding: 13px 8px 0 14px;
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
.user_item_content {
display: flex;
// justify-content: center;
align-items: center;
.name {
max-width: 80%;
text-align: left;
}
> img {
margin-left: auto;
margin-top: 4px;
width: 8px;
height: 12px;
}
}
.item_line {
margin-top: 9px;
width: 70px;
height: 0px;
border: 1px dotted #1797ff31;
border-width: 0.5px;
}
.last_line {
border: 1px dotted #1797ff00;
}
}
}
</style>

147
src/views/modules/visual/basicinfo/personCategory/index.vue

@ -34,37 +34,35 @@
:class="{
'top-item-active': activeIndex == index ,
}"
@click="onClickList(index)"
v-for="(item, index) in warningList"
@click="onClickList(item,index)"
v-for="(item, index) in categoryList"
:key="index">
<div class="top-item-img">
<img :src="item.dataIcon" />
<div class="top-item-left">
<span>{{ item.label }}</span>
<span>{{ item.count }}</span>
<span>{{ item.categoryName }}</span>
<span>{{ item.total }}</span>
</div>
</div>
<div class="top-item-num">
<div class="num-item">
<div>较上月</div>
<div>
<div>{{ "+2000" }}</div>
<div>{{ "+"+ item.immigration }}</div>
</div>
</div>
<div class="num-item">
<div>{{" "}}</div>
<div>
<div>{{ "-2000"}}</div>
<div>{{ "-"+ item.emigration}}</div>
</div>
</div>
</div>
</div>
</div>
<div class="warning-box-bottom">
<screen-table :headerList="headerList"
:tableData="tableData"
:visibleLoading="visibleLoading"></screen-table>
<screen-table ref="ref_recordlist"></screen-table>
<div class="pagination">
<el-pagination :current-page="pageNo"
:page-size="pageSize"
@ -87,7 +85,7 @@ import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
export default {
name: "warning-box",
components: {
cptCard,
screenTable,
@ -111,35 +109,38 @@ export default {
dateIdShow: '',
agencyId: '',
dateId: '',
warningList: [],
headerList: [
{ title: "序号" },
{ title: "所属网格" },
{ title: "所属小区" },
{ title: "楼号" },
{ title: "姓名" },
],
tableData: [
// [1,'','','2',''],
],
visibleLoading: true,
level: '',
dateId: '',//yyyyMMdd
monthId: '',//yyyyMM
categoryKey: '',
agencyInfo: {},
categoryList: [],
pageNo: 1,
pageSize: 10,
total: 0,
activeIndex: 0,
activeLevel: "1",
};
},
async mounted () {
await nextTick(100);
this.initData()
//
this.getCategoryData()
await this.getAgencylist()//
this.getApiData()
},
methods: {
async getApiData () {
//
await this.getCategoryData()
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
},
initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
var nowdate = new Date(time); //
@ -149,76 +150,92 @@ export default {
this.dateIdShow = y + '-' + m + '-' + d;
},
onClickList (index) {
this.activeIndex = index;
// this.activeLevel = level;
this.pageNo = 1;
this.getUserwarnlist();
},
//
async getUserwarnlist () {
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
const url = "/epmetuser/statsresiwarn/userwarnlist";
let params = {
configId: reqItem.configId,
buildingIdList: reqItem["buildingIdList" + activeLevel],
pageNo: this.pageNo,
pageSize: this.pageSize,
};
//
async getAgencylist () {
const url = "/gov/org/customeragency/agencygridtree";
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
data.list.forEach((item, index) => {
tableData.push([
index + 1,
item.gridName,
item.neighborhoodName,
item.buildingName,
item.residentNames ? item.residentNames : "暂无",
]);
});
this.tableData = tableData;
this.total = data.total;
this.agencyInfo = data
this.agencyId = this.agencyInfo.agencyId
this.level = this.agencyInfo.level === 'grid' ? 'grid' : 'agency'
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
this.agencyIdArray.push(this.agencyId)
}
} else {
this.$message.error(msg);
}
},
onClickList (item, index) {
this.activeIndex = index;
this.pageNo = 1;
this.categoryKey = item.categoryKey
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
},
//
async getCategoryData () {
// const url = "/data/aggregator/icuser/category-data";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/icuser/category-data";
let params = {
agencyId: this.$store.state.user.agencyId,
orgType: this.level,
orgId: this.agencyId,
dateId: this.dateId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.warningList = data;
this.visibleLoading = false;
this.getUserwarnlist();
this.categoryList = data;
if (this.categoryList.length > 0) {
this.categoryKey = this.categoryList[0].categoryKey
}
} else {
}
},
async handleChangeDate (value) {
this.dateIdShow = value
// await this.getPieChart()
// this.getPie()
this.getApiData()
},
async handleChangeAgency (value) {
this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
this.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
await this.getPieChart()
this.getPie()
console.log(this.agencyIdArray)
this.getApiData()
},
pageSizeChangeHandleNew (val) {
this.pageNo = 1;
this.pageSize = val;
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
},
pageCurrentChangeHandleNew (val) {
this.pageNo = val;
this.getUserwarnlist();
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
},
},
watch: {
dateIdShow () {
let dataArray = this.dateIdShow.split('-')
this.dateId = dataArray.join('')
this.monthId = this.dateId.substring(0, 6)
},
},
};
</script>

28
src/views/modules/workSys/mapConfig.vue

@ -151,6 +151,8 @@ const vueGis = {
//
runNum: 0,
runAgency: [],
center: [],
zoom: null,
}
},
@ -172,11 +174,12 @@ const vueGis = {
methods: {
//
orgChange (index) {
this.selAgencyIndex = index
selectedFeatures.clear()
if (index || index === 0) {
if (this.subAgencyArray.length > 0 && (index || index === 0)) {
this.showBtn = true
this.selAgency = this.subAgencyArray[index]
if (this.selAgency.coordinates) {
@ -210,9 +213,13 @@ const vueGis = {
//
handleBack () {
this.center = this.runAgency[this.runNum - 1].center
this.zoom = this.runAgency[this.runNum - 1].zoom
this.selAgencyId = ''
this.runNum--
this.runAgency.pop()
if (this.runNum === 0) {
this.orgId = ''
this.orgLevel = ''
@ -336,6 +343,9 @@ const vueGis = {
},
//
toSubAgency (e) {
if (!e.selected[0]) {
return false
}
if (this.method != 'mAddPolygon' && this.level != 'neighborHood') {
this.selAgencyId = ''
@ -351,6 +361,11 @@ const vueGis = {
});
this.runNum++
this.selPolygon.center = map.getView().getCenter()
this.selPolygon.zoom = map.getView().getZoom()
console.log('center', map.getView().getCenter())
console.log('zoom', map.getView().getZoom())
this.runAgency.push(this.selPolygon)
this.selAgencyIndex = 0
this.refreshMap(true)
@ -374,9 +389,12 @@ const vueGis = {
},
//
setMapLocation () {
this.centerPoint = []
if (this.center && this.center.length > 0) {
this.centerPoint = this.center
} else if (this.orgData.longitude && this.orgData.latitude) {
if (this.orgData.longitude && this.orgData.latitude) {
this.centerPoint = []
this.centerPoint.push(this.orgData.longitude)
this.centerPoint.push(this.orgData.latitude)
} else {
@ -384,7 +402,9 @@ const vueGis = {
this.centerPoint = centerPointGlobal
}
this.setZoom(this.orgData.agencyLevel)
if (!this.zoom) {
this.setZoom(this.orgData.agencyLevel)
}
},
//

Loading…
Cancel
Save