Browse Source

昨天提出的需求

feature
dai 3 years ago
parent
commit
27adeebae1
  1. 6
      src/assets/scss/modules/visual/people.scss
  2. 1
      src/main.js
  3. 49
      src/store/index.js
  4. 8
      src/store/modules/user.js
  5. 22
      src/utils/index.js
  6. 497
      src/views/modules/visual/basicinfo/people.vue
  7. 322
      src/views/modules/visual/communityGovern/shijianchuli/pieOption.js
  8. 608
      src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi.vue
  9. 18
      src/views/modules/visual/communityGovern/shijianfenlei/shijianfenleifenxi.vue

6
src/assets/scss/modules/visual/people.scss

@ -244,7 +244,7 @@
}
}
.item2{
.item2 {
width: 49%;
}
}
@ -486,6 +486,10 @@
.m-list {
width: calc(50% - 3px);
&.z-only {
width: 100%;
}
.title {
margin-bottom: 10px;
padding: 4px 2px;

1
src/main.js

@ -7,7 +7,6 @@ import 'mint-ui/lib/style.css';
import App from "@/App";
import i18n from "@/i18n";
import router from "@/router";
// import store1 from '@/store'
import "@/icons";
import "@/element-ui/theme/index.css";
import "@/assets/scss/aui.scss";

49
src/store/index.js

@ -1,49 +0,0 @@
import Vue from 'vue'
import Vuex from 'vuex'
import cloneDeep from 'lodash/cloneDeep'
import user from './modules/user'
Vue.use(Vuex)
export default new Vuex.Store({
namespaced: true,
state: {
// 导航条, 布局风格, defalut(白色) / colorful(鲜艳)
navbarLayoutType: 'colorful',
// 侧边栏, 布局皮肤, default(白色) / dark(黑色)
sidebarLayoutSkin: 'dark',
// 侧边栏, 折叠状态
sidebarFold: false,
// 侧边栏, 菜单
sidebarMenuList: [],
sidebarMenuActiveName: '',
// 内容, 是否需要刷新
contentIsNeedRefresh: false,
// 内容, 标签页(默认添加首页)
contentTabs: [
{
...window.SITE_CONFIG['contentTabDefault'],
'name': 'indexWork',
'title': '首页'
}
],
contentTabsActiveName: 'indexWork',
mainShuju: {
menuList: [],
activeName: "",
},
},
modules: {
user
},
mutations: {
// 重置vuex本地储存状态
resetStore (state) {
Object.keys(state).forEach((key) => {
state[key] = cloneDeep(window.SITE_CONFIG['storeState'][key])
})
}
}
})

8
src/store/modules/user.js

@ -1,8 +0,0 @@
export default {
state: {
id: 0,
name: '',
realName: '',
superAdmin: 0
}
}

22
src/utils/index.js

@ -1,5 +1,4 @@
import Cookies from 'js-cookie'
import store from '@/store'
import store from '@/js/store'
/**
* 获取字典数据列表
@ -44,8 +43,7 @@ export function getDictLabel(dictType, dictValue) {
*/
export function clearLoginInfo() {
store.commit('resetStore')
Cookies.remove('token')
localStorage.setItem("token", '');
localStorage.removeItem('token')
window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = false
}
@ -154,4 +152,20 @@ export function spliceIntoChunks(arr, chunkSize) {
}
return res;
}
// 获取当前时间 如果有指定time则按指定的来
export function getCurrentDate(hour,min,sec) {
console.log(hour,min,sec)
let date = new Date();
if (hour){
date.setHours(hour);
console.log(hour)
}if (min!==undefined){
date.setMinutes(min);
console.log(min)
}if (sec!==undefined){
date.setSeconds(sec);
console.log(sec)
}
return date;
}

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

@ -1,11 +1,12 @@
<template>
<div class="g-wrr">
<div class="g-bread"
v-if="breadList.length > 1">
<div class="g-bread" v-if="breadList.length > 1">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item v-for="item in breadList"
:key="item.path"
:to="{ path: item.path }">
<el-breadcrumb-item
v-for="item in breadList"
:key="item.path"
:to="{ path: item.path }"
>
{{ item.meta.title }}
</el-breadcrumb-item>
</el-breadcrumb>
@ -19,11 +20,9 @@
<img src="@/assets/img/shuju/title-tip.png" />
<span>人员情况</span>
</div>
<div class="more"
@click="showedMoreInfo = true">查看更多</div>
<div class="more" @click="showedMoreInfo = true">查看更多</div>
<div class="ren">
<img class="pic-ren"
src="@/assets/img/shuju/people/ren.png" />
<img class="pic-ren" src="@/assets/img/shuju/people/ren.png" />
<div class="ren-name">
<span>{{ info.name }}</span>
<img src="@/assets/img/shuju/people/arrow.png" />
@ -76,9 +75,11 @@
<h5>住户类别</h5>
<p>
{{
info.isTenant == null || info.isTenant == ''
info.isTenant == null || info.isTenant == ""
? "--"
: info.isTenant == '1' ? '租户' : '业主'
: info.isTenant == "1"
? "租户"
: "业主"
}}
</p>
</div>
@ -105,12 +106,9 @@
<span>联系电话</span>
<div class="ren-cnt">
<p>
联系电话:
{{
info.mobile || "--"
}}
{{ info.mobile || "--" }}
</p>
</div>
</div>
@ -118,11 +116,13 @@
</cpt-card>
</div>
<people-more v-show="showedMoreInfo"
v-if="userId"
:userId="userId"
:gridName="info.gridName"
@close="showedMoreInfo = false" />
<people-more
v-show="showedMoreInfo"
v-if="userId"
:userId="userId"
:gridName="info.gridName"
@close="showedMoreInfo = false"
/>
<div class="m-relation">
<cpt-card>
@ -132,10 +132,14 @@
</div>
<div class="info">
<div class="huzhu">
<img class="huzhu-bg"
src="@/assets/img/shuju/people/huzhu.png" />
<img class="huzhu-ico"
src="@/assets/img/shuju/people/huzhu-home.png" />
<img
class="huzhu-bg"
src="@/assets/img/shuju/people/huzhu.png"
/>
<img
class="huzhu-ico"
src="@/assets/img/shuju/people/huzhu-home.png"
/>
<div class="huzhu-name">
{{
houseInfo && houseInfo.ownerName
@ -146,15 +150,23 @@
<p>户主</p>
</div>
<div class="rel z-zuo-2"
@click="toUserInfo(houseInfo.userList[0].userId)"
v-if="houseInfo.userList[0]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo2.png" />
<div class="rel-text"
:class="houseInfo.userList[0].isSelf == '1' ? 'z-on' : ''">
<div
class="rel z-zuo-2"
@click="toUserInfo(houseInfo.userList[0].userId)"
v-if="houseInfo.userList[0]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo2.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[0].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel-call">
{{ houseInfo.userList[0].relation }}
</div>
@ -164,15 +176,23 @@
</div>
</div>
<div class="rel z-you-2"
@click="toUserInfo(houseInfo.userList[1].userId)"
v-if="houseInfo.userList[1]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you2.png" />
<div class="rel-text"
:class="houseInfo.userList[1].isSelf == '1' ? 'z-on' : ''">
<div
class="rel z-you-2"
@click="toUserInfo(houseInfo.userList[1].userId)"
v-if="houseInfo.userList[1]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you2.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[1].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel-call">
{{ houseInfo.userList[1].relation }}
</div>
@ -182,15 +202,23 @@
</div>
</div>
<div class="rel z-zuo-1"
@click="toUserInfo(houseInfo.userList[2].userId)"
v-if="houseInfo.userList[2]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo1.png" />
<div class="rel-text"
:class="houseInfo.userList[2].isSelf == '1' ? 'z-on' : ''">
<div
class="rel z-zuo-1"
@click="toUserInfo(houseInfo.userList[2].userId)"
v-if="houseInfo.userList[2]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo1.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[2].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel-call">
{{ houseInfo.userList[2].relation }}
</div>
@ -200,15 +228,23 @@
</div>
</div>
<div class="rel z-you-1"
@click="toUserInfo(houseInfo.userList[3].userId)"
v-if="houseInfo.userList[3]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you1.png" />
<div class="rel-text"
:class="houseInfo.userList[3].isSelf == '1' ? 'z-on' : ''">
<div
class="rel z-you-1"
@click="toUserInfo(houseInfo.userList[3].userId)"
v-if="houseInfo.userList[3]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you1.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[3].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel-call">
{{ houseInfo.userList[3].relation }}
</div>
@ -218,15 +254,23 @@
</div>
</div>
<div class="rel z-zuo-3"
@click="toUserInfo(houseInfo.userList[4].userId)"
v-if="houseInfo.userList[4]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo3.png" />
<div class="rel-text"
:class="houseInfo.userList[4].isSelf == '1' ? 'z-on' : ''">
<div
class="rel z-zuo-3"
@click="toUserInfo(houseInfo.userList[4].userId)"
v-if="houseInfo.userList[4]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo3.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[4].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel-call">
{{ houseInfo.userList[4].relation }}
</div>
@ -236,15 +280,23 @@
</div>
</div>
<div class="rel z-you-3"
@click="toUserInfo(houseInfo.userList[5].userId)"
v-if="houseInfo.userList[5]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you3.png" />
<div class="rel-text"
:class="houseInfo.userList[5].isSelf == '1' ? 'z-on' : ''">
<div
class="rel z-you-3"
@click="toUserInfo(houseInfo.userList[5].userId)"
v-if="houseInfo.userList[5]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you3.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[5].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel-call">
{{ houseInfo.userList[5].relation }}
</div>
@ -266,21 +318,24 @@
</div>
<div class="tb">
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@operate="handleOperateDemandList"></cpt-tb>
<div class="m-pagination"
v-if="demand.total > demand.pageSize">
<el-pagination hide-on-single-page
:current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeDemand">
<cpt-tb
:col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@operate="handleOperateDemandList"
></cpt-tb>
<div class="m-pagination" v-if="demand.total > demand.pageSize">
<el-pagination
hide-on-single-page
:current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeDemand"
>
</el-pagination>
</div>
</div>
@ -288,80 +343,98 @@
</div>
<div class="m-row">
<div class="m-list">
<div class="m-list" :class="{'z-only': isShundeju}">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<a :class="{ 'z-on': showedIncidentOrTopic == 'incident' }"
@click="showedIncidentOrTopic = 'incident'">上报事件</a>
<a :class="{ 'z-on': showedIncidentOrTopic == 'topic' }"
@click="showedIncidentOrTopic = 'topic'">发布话题</a>
<a
:class="{ 'z-on': showedIncidentOrTopic == 'incident' }"
@click="showedIncidentOrTopic = 'incident'"
>上报事件</a
>
<a
:class="{ 'z-on': showedIncidentOrTopic == 'topic' }"
@click="showedIncidentOrTopic = 'topic'"
>发布话题</a
>
</div>
<div class="list-wrap"
v-show="showedIncidentOrTopic == 'incident'">
<div
class="list-wrap"
v-show="showedIncidentOrTopic == 'incident'"
>
<div class="list">
<div class="item"
:key="'incident' + index"
v-for="(item, index) in incident.list"
@click="handleClickIncident(index)">
<div
class="item"
:key="'incident' + index"
v-for="(item, index) in incident.list"
@click="handleClickIncident(index)"
>
<div class="item-title">{{ item.eventContent }}</div>
<div class="item-date">{{ item.reportTime }}</div>
</div>
</div>
<div class="m-pagination"
v-if="incident.total > incident.pageSize">
<el-pagination hide-on-single-page
:current-page="incident.pageNo"
:page-size="incident.pageSize"
:total="incident.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeIncident">
<div
class="m-pagination"
v-if="incident.total > incident.pageSize"
>
<el-pagination
hide-on-single-page
:current-page="incident.pageNo"
:page-size="incident.pageSize"
:total="incident.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeIncident"
>
</el-pagination>
</div>
<div v-if="incident.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
<div v-if="incident.list.length == 0" class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
</div>
<div class="list-wrap"
v-show="showedIncidentOrTopic == 'topic'">
<div class="list-wrap" v-show="showedIncidentOrTopic == 'topic'">
<div class="list">
<div class="item"
:key="'topic' + index"
v-for="(item, index) in topic.list"
@click="handleClickTopic(index)">
<div
class="item"
:key="'topic' + index"
v-for="(item, index) in topic.list"
@click="handleClickTopic(index)"
>
<div class="item-title">{{ item.topicContent }}</div>
<div class="item-date">{{ item.releaseTime }}</div>
</div>
</div>
<div class="m-pagination"
v-if="topic.total > topic.pageSize">
<el-pagination hide-on-single-page
:current-page="topic.pageNo"
:page-size="topic.pageSize"
:total="topic.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeTopic">
<div class="m-pagination" v-if="topic.total > topic.pageSize">
<el-pagination
hide-on-single-page
:current-page="topic.pageNo"
:page-size="topic.pageSize"
:total="topic.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeTopic"
>
</el-pagination>
</div>
<div v-if="topic.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
<div v-if="topic.list.length == 0" class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
</div>
</cpt-card>
</div>
<div class="m-list">
<div class="m-list" v-if="!isShundeju">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
@ -370,10 +443,12 @@
<div class="list-wrap">
<div class="list">
<div class="item"
:key="'point' + index"
v-for="(item, index) in point.list"
@click="handleClickPoint(index)">
<div
class="item"
:key="'point' + index"
v-for="(item, index) in point.list"
@click="handleClickPoint(index)"
>
<div class="item-row">
<div class="item-l">
<div class="item-point">{{ item.point }}</div>
@ -386,22 +461,24 @@
</div>
</div>
<div class="m-pagination"
v-if="point.total > point.pageSize">
<el-pagination hide-on-single-page
:current-page="point.pageNo"
:page-size="point.pageSize"
:total="point.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangePoint">
<div class="m-pagination" v-if="point.total > point.pageSize">
<el-pagination
hide-on-single-page
:current-page="point.pageNo"
:page-size="point.pageSize"
:total="point.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangePoint"
>
</el-pagination>
</div>
<div v-if="point.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
<div v-if="point.list.length == 0" class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
</div>
</cpt-card>
@ -409,33 +486,41 @@
</div>
</div>
<demand-info v-if="demand.list.length > 0 && showedDemandInfo"
:userId="userId"
queryOrigin="personal-data"
:demandId="demand.srcList[demand.currentIndex].demandRecId"
@close="showedDemandInfo = false"
@handleAssignOk="handleAssignOk" />
<demand-info
v-if="demand.list.length > 0 && showedDemandInfo"
:userId="userId"
queryOrigin="personal-data"
:demandId="demand.srcList[demand.currentIndex].demandRecId"
@close="showedDemandInfo = false"
@handleAssignOk="handleAssignOk"
/>
<template v-if="incident.list.length > 0 && incident.showedInfo">
<incident-info v-if="
<incident-info
v-if="
$store.state.user.customerId == 'b09527201c4409e19d1dbc5e3c3429a1'
"
:resiEventId="incident.list[incident.currentIndex].resiEventId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="incident.showedInfo = false" />
<event-info v-else
:eventId="incident.list[incident.currentIndex].resiEventId"
:orgId="$store.state.user.agencyId"
orgType="agency"
@close="incident.showedInfo = false" />
:resiEventId="incident.list[incident.currentIndex].resiEventId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="incident.showedInfo = false"
/>
<event-info
v-else
:eventId="incident.list[incident.currentIndex].resiEventId"
:orgId="$store.state.user.agencyId"
orgType="agency"
@close="incident.showedInfo = false"
/>
</template>
<topic-info v-if="topic.list.length > 0 && topic.showedInfo"
:topicId="topic.list[topic.currentIndex].topicId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="topic.showedInfo = false" />
<topic-info
v-if="topic.list.length > 0 && topic.showedInfo"
:topicId="topic.list[topic.currentIndex].topicId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="topic.showedInfo = false"
/>
</div>
</div>
</template>
@ -472,7 +557,7 @@ export default {
},
},
data () {
data() {
return {
breadList: [],
showedMoreInfo: false,
@ -574,9 +659,13 @@ export default {
};
},
computed: {},
computed: {
isShundeju() {
return this.$store.state.user.customerId == "1550309684576591874";
},
},
beforeRouteEnter (to, from, next) {
beforeRouteEnter(to, from, next) {
console.log("让我看看", to);
if (from) {
const arr = [{ ...from }, { ...to, meta: { title: "个人详情" } }];
@ -588,14 +677,14 @@ export default {
}
},
watch: {
uid (id) {
uid(id) {
this.userId = id;
},
userId () {
userId() {
this.getApiData();
window.scrollTo(0, 0);
},
$route (route) {
$route(route) {
// if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith("/redirect/")) {
return;
@ -604,21 +693,21 @@ export default {
},
},
async mounted () {
async mounted() {
this.userId = this.uid;
console.log(this.$router);
this.getApiData();
},
deactivated () {
deactivated() {
this.breadList = [];
console.log("breadList-----", this.breadList);
},
destroyed () {
destroyed() {
this.breadList = [];
console.log("breadList-----", this.breadList);
},
methods: {
getBreadcrumb () {
getBreadcrumb() {
// only show routes with meta.title
console.log("routest----", this.$route);
let matched = this.$route.matched.filter(
@ -634,16 +723,16 @@ export default {
(item) => item.meta && item.meta.title && item.meta.breadcrumb !== false
);
},
isDashboard (route) {
isDashboard(route) {
const name = route && route.name;
if (!name) {
return false;
}
return name.trim().toLocaleLowerCase() === "Home".toLocaleLowerCase();
},
handleSearch () { },
handleSearch() {},
async getApiData () {
async getApiData() {
await this.getInfo();
this.getHouseInfo();
this.getDemandData();
@ -652,12 +741,12 @@ export default {
this.getPointData();
},
toUserInfo (uid) {
toUserInfo(uid) {
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` });
},
//
async getInfo () {
async getInfo() {
const url = "/epmetuser/icresiuser/persondata";
let params = {
userId: this.userId,
@ -673,7 +762,7 @@ export default {
},
//
async getHouseInfo () {
async getHouseInfo() {
const url = "/epmetuser/icresiuser/ownerrelation";
let params = {
userId: this.userId,
@ -688,12 +777,12 @@ export default {
}
},
handlePageNoChangeDemand (val) {
handlePageNoChangeDemand(val) {
this.demand.pageNo = val;
this.getDemandData();
},
handleOperateDemandList (index, type) {
handleOperateDemandList(index, type) {
if (type == "查看") {
this.showedDemandInfo = true;
this.demand.currentIndex = index;
@ -701,12 +790,12 @@ export default {
},
//
handleAssignOk () {
handleAssignOk() {
this.getDemandData();
},
//
async getDemandData () {
async getDemandData() {
const url = "/heart/userdemand/mydemand";
let params = {
epmetUserIdList: this.info.epmetUserIdList,
@ -736,18 +825,18 @@ export default {
}
},
handlePageNoChangeIncident (val) {
handlePageNoChangeIncident(val) {
this.incident.pageNo = val;
this.getIncidentData();
},
handleClickIncident (index) {
handleClickIncident(index) {
this.incident.showedInfo = true;
this.incident.currentIndex = index;
},
//
async getIncidentData () {
async getIncidentData() {
let url = "/gov/project/icEvent/icevent-pageuserreported";
// 沿
@ -775,18 +864,18 @@ export default {
}
},
handlePageNoChangeTopic (val) {
handlePageNoChangeTopic(val) {
this.topic.pageNo = val;
this.getTopicData();
},
handleClickTopic (index) {
handleClickTopic(index) {
this.topic.showedInfo = true;
this.topic.currentIndex = index;
},
//
async getTopicData () {
async getTopicData() {
const url = "/data/aggregator/resigroup/pageusertopic";
let params = {
epmetUserIdList: this.info.epmetUserIdList,
@ -806,18 +895,18 @@ export default {
}
},
handlePageNoChangePoint (val) {
handlePageNoChangePoint(val) {
this.point.pageNo = val;
this.getPointData();
},
handleClickPoint (index) {
handleClickPoint(index) {
this.point.showedInfo = true;
this.point.currentIndex = index;
},
//
async getPointData () {
async getPointData() {
const url = "/point/resi/point/pageuserpoint";
let params = {
epmetUserIdList: this.info.epmetUserIdList,

322
src/views/modules/visual/communityGovern/shijianchuli/pieOption.js

@ -1,184 +1,176 @@
export function pieOption (_charts) {
const center= ['50%', '170px']
return {
title: {
text: '0',
top: 140,
left: 'center',
textStyle: {
width: '100%',
fontSize: 32,
color: '#FFFFFF',
fontWeight: 400
},
itemGap: 5,
subtext: '总数',
subtextStyle: {
fontSize: 20,
color: '#fff',
fontWeight: 400
}
export function pieOption(_charts) {
const center = ["50%", "170px"];
return {
title: {
text: "0",
top: 140,
left: "center",
textStyle: {
width: "100%",
fontSize: 32,
color: "#FFFFFF",
fontWeight: 400,
},
tooltip: {
show: false
itemGap: 5,
subtext: "总数",
subtextStyle: {
fontSize: 20,
color: "#fff",
fontWeight: 400,
},
// legend: {
// top: 350,
// bottom: 0,
// itemWidth: 20,
// itemHeight: 10,
// textStyle: {
// color: '#D2E7FF',
// fontSize: 16,
// lineHeight: 20,
},
tooltip: {
show: false,
},
// legend: {
// top: 350,
// bottom: 0,
// itemWidth: 20,
// itemHeight: 10,
// textStyle: {
// color: '#D2E7FF',
// fontSize: 16,
// lineHeight: 20,
// },
// },
series: [
// 外侧圆环
{
type: "pie",
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
startAngle: 0,
hoverAnimation: false,
// tooltip: {
// },
// },
series: [
// 外侧圆环
{
type: 'pie',
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
startAngle: 0,
hoverAnimation: false,
// tooltip: {
// },
center: center,
radius: ['58%', '58.3%'],
label: {
normal: {
show: false
}
center: center,
radius: ["58%", "58.3%"],
label: {
normal: {
show: false,
},
labelLine: {
normal: {
show: false
}
},
labelLine: {
normal: {
show: false,
},
data: [{
},
data: [
{
value: 360,
itemStyle: {
normal: {
color: 'rgba(40, 101, 250, 0)',
width:0,
borderColor: 'rgba(40, 101, 250, 0.5)',
color: "rgba(40, 101, 250, 0)",
width: 0,
borderColor: "rgba(40, 101, 250, 0.5)",
borderWidth: 1,
borderType: 'dotted'
}
}
}
]
},
// 突出的
{
hoverAnimation: false,
// name: 'Access From',
type: 'pie',
center: center,
radius: ['35%', '48%'],
avoidLabelOverlap: false,
// top: top + '%',
// height: '80%',
selectedMode: 'single',
left: 'center',
width: 400,
label: {
// show: false,
position: 'outside',
alignTo: 'edge',
// formatter: '{a|{c}}\n\n{name|{b}}',
formatter: '{a|{c}%}\n{r|}\n{name|{b}}',
minMargin: 5,
edgeDistance: 1,
lineHeight: 15,
color: '#fff',
fontSize: 12,
// distanceToLabelLine: -60,
rich: {
name: {
padding: [0, 6, 0, 6]
borderType: "dotted",
},
a: {
fontSize: 30,
color: '#fff',
padding: [0, 6, 6, 6]
},
r: {
backgroundColor: 'auto',
borderRadius: 6,
width: 6,
height: 6,
// padding: [3, 3, 0, -12]
}
}
},
},
labelLine: {
show: false,
smooth: 0.2,
length: 30,
length2: 0,
maxSurfaceAngle: 80
],
},
// 突出的
{
hoverAnimation: false,
// name: 'Access From',
type: "pie",
center: center,
radius: ["35%", "48%"],
avoidLabelOverlap: false,
// top: top + '%',
// height: '80%',
selectedMode: "single",
left: "center",
width: 400,
label: {
// show: false,
position: "outside",
alignTo: "edge",
// formatter: '{a|{c}}\n\n{name|{b}}',
formatter: "{a|{c}%}\n{r|}\n{name|{b}}",
minMargin: 5,
edgeDistance: 1,
lineHeight: 15,
color: "#fff",
fontSize: 12,
// distanceToLabelLine: -60,
rich: {
name: {
padding: [0, 6, 0, 6],
},
a: {
fontSize: 30,
color: "#fff",
padding: [0, 6, 6, 6],
},
r: {
backgroundColor: "auto",
borderRadius: 6,
width: 6,
height: 6,
// padding: [3, 3, 0, -12]
},
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < _charts.getWidth() / 2;
const points = params.labelLinePoints;
// Update the end point.
if (points) {
points[2][0] = isLeft
},
labelLine: {
show: false,
smooth: 0.2,
length: 30,
length2: 0,
maxSurfaceAngle: 80,
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < _charts.getWidth() / 2;
const points = params.labelLinePoints;
// Update the end point.
if (points) {
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
}
return {
labelLinePoints: points
};
},
itemStyle: {
color:function(params) {
}
return {
labelLinePoints: points,
};
},
itemStyle: {
color: function (params) {
//自定义颜色
var colorList = [ '#FAC126', '#3DDA83'];
return colorList[params.dataIndex]
}
var colorList = ["#FAC126", "#3DDA83"].reverse();
return colorList[params.dataIndex];
},
data: [],
},
// 中间圆环
{
type: 'pie',
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
startAngle: 0,
hoverAnimation: false,
center: center,
// tooltip: {
// },
radius: ['0%', '25%'],
label: {
show: false
},
labelLine: {
show: false
data: [],
},
// 中间圆环
{
type: "pie",
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
startAngle: 0,
hoverAnimation: false,
center: center,
// tooltip: {
// },
radius: ["0%", "25%"],
label: {
show: false,
},
labelLine: {
show: false,
},
data: [
{
value: 360,
itemStyle: {
normal: {
color: "rgba(8, 37, 134, 1)",
},
},
data: [{
value: 360,
itemStyle: {
normal: {
color: 'rgba(8, 37, 134, 1)',
}
}
}
]
},
]
}
}
],
},
],
};
}

608
src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi.vue

@ -1,65 +1,75 @@
<template>
<cpt-card style="margin-top:40px">
<cpt-card style="margin-top: 40px">
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>事件处理分析</span>
<div class="search">
<div class="second-select cascader">
<el-cascader class="customer_cascader"
ref="myCascader"
v-model="agencyIdArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
<el-cascader
class="customer_cascader"
ref="myCascader"
v-model="agencyIdArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
@change="handleChangeAgency"
></el-cascader>
</div>
<div class="second-select">
<el-select v-model="dataType"
:popper-append-to-body="false"
placeholder="请选择">
<el-option v-for="(item) in dateArray"
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="handleChangeDate(item.value)">
<el-select
v-model="dataType"
:popper-append-to-body="false"
placeholder="请选择"
>
<el-option
v-for="item in dateArray"
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="handleChangeDate(item.value)"
>
</el-option>
</el-select>
</div>
<div v-if="dataType==='0'"
class="second-select range-data">
<el-date-picker v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
@change="handleSelectChange">
<div v-if="dataType === '0'" class="second-select range-data">
<el-date-picker
v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
@change="handleSelectChange"
>
</el-date-picker>
</div>
</div>
</div>
<div class="g-cpt-resi">
<div class="g-l">
<div class="l_top">
<div v-if="!pieNoData && !dataLoading"
class="g-pie">
<screen-echarts-frame class="echart-wr"
@myChartMethod="pieInitOk"
ref="pieChart"></screen-echarts-frame>
<div v-if="!pieNoData && !dataLoading" class="g-pie">
<screen-echarts-frame
class="echart-wr"
@myChartMethod="pieInitOk"
ref="pieChart"
></screen-echarts-frame>
<div class="pie-legend">
<div :class="['legend_item',{'item_last':index===legendArray.length-1}]"
v-for="(item,index) in legendArray"
:key="index">
<div class="item_name">{{item.name}}</div>
<div
:class="[
'legend_item',
{ item_last: index === legendArray.length - 1 },
]"
v-for="(item, index) in legendArray"
:key="index"
>
<div class="item_name">{{ item.name }}</div>
<img :src="item.url" />
<!-- <div class="item_num">
<span class="item_count">{{item.count}}</span>
@ -67,65 +77,70 @@
</div> -->
</div>
</div>
</div>
<screen-nodata class="nodata"
v-if="pieNoData&& !dataLoading"></screen-nodata>
<div class="table-status"
v-if="dataLoading">
<screen-nodata
class="nodata"
v-if="pieNoData && !dataLoading"
></screen-nodata>
<div class="table-status" v-if="dataLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
<div class="l_bottom">
<div class="bottom_label">月度新增事件统计</div>
<screen-echarts-frame v-if="!lineNoData&& !dataLoading"
class="echart-line"
@myChartMethod="lineInitOk"
ref="lineChart"></screen-echarts-frame>
<screen-nodata class="nodata"
v-if="lineNoData&& !dataLoading"></screen-nodata>
<div class="table-status"
v-if="dataLoading">
<screen-echarts-frame
v-if="!lineNoData && !dataLoading"
class="echart-line"
@myChartMethod="lineInitOk"
ref="lineChart"
></screen-echarts-frame>
<screen-nodata
class="nodata"
v-if="lineNoData && !dataLoading"
></screen-nodata>
<div class="table-status" v-if="dataLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
</div>
<div class="g-r">
<div class="m-tb">
<div class="tb">
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@operate="toEventInfo"></cpt-tb>
<cpt-tb
:col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@operate="toEventInfo"
></cpt-tb>
</div>
<div class="m-pagination">
<el-pagination hide-on-single-page :current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next,total"
@current-change="handlePageNoChange_demand">
<el-pagination
hide-on-single-page
:current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next,total"
@current-change="handlePageNoChange_demand"
>
</el-pagination>
</div>
</div>
</div>
</div>
<event-info v-if="showProject"
:eventId="eventId"
:orgId="orgId"
:orgType="orgType"
@close="showProject = false" />
<event-info
v-if="showProject"
:eventId="eventId"
:orgId="orgId"
:orgType="orgType"
@close="showProject = false"
/>
</cpt-card>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
import cptTb from "@/views/modules/visual/cpts/tb";
@ -135,26 +150,25 @@ import ScreenLoading from "@/views/modules/visual/components/screen-loading";
import ScreenNodata from "@/views/modules/visual/components/screen-nodata";
import eventInfo from "./event-info";
import { pieOption } from './pieOption.js'
import { lineOption } from './lineOption.js'
import nextTick from 'dai-js/tools/nextTick'
import { pieOption } from "./pieOption.js";
import { lineOption } from "./lineOption.js";
import nextTick from "dai-js/tools/nextTick";
import dateFormat from "dai-js/tools/dateFormat";
export default {
name: "shijianchulifenxi",
data () {
data() {
return {
dataLoading: true,
pieNoData: false,
lineNoData: false,
isfirstInit: true,//
isfirstInit: true, //
projectTotal: 0,
processingCount: 0,
processingRatio: 0,
lineChart: '',
lineChart: "",
lineOption: {},
lineInitState: false,
lineColorArray: [],
@ -163,36 +177,35 @@ export default {
lineSeriesData: [],
pieChartS: null,
pieChart: '',
pieChart: "",
pieOption: {},
pieInitState: false,
pieData: [],
legendArray: [
{
name: '未结案',
name: "未结案",
count: 0,
percent: '0%',
url: require('@/assets/img/shuju/measure/huang@2x.png')
percent: "0%",
url: require("@/assets/img/shuju/measure/huang@2x.png"),
},
{
name: '已结案',
name: "已结案",
count: 0,
percent: '0%',
url: require('@/assets/img/shuju/measure/lv@2x.png')
}
percent: "0%",
url: require("@/assets/img/shuju/measure/lv@2x.png"),
},
],
timeRange: [],
orgId: '',
orgType: 'agency',
queryStartTime: '',
queryEndTime: '',
processStatus: 'closed_case',
dataType: '1',
orgId: "",
orgType: "agency",
queryStartTime: "",
queryEndTime: "",
processStatus: "closed_case",
dataType: "1",
casOptions: [],
agencyIdArray: [],
@ -201,31 +214,31 @@ export default {
optionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
value: "agencyId",
label: "agencyName",
children: "subAgencyList",
checkStrictly: true,
},
dateArray: [
{
label: '近一年',
value: '1'
label: "近一年",
value: "1",
},
{
label: '近一个月',
value: '2'
label: "近一个月",
value: "2",
},
{
label: '近三个月',
value: '3'
label: "近三个月",
value: "3",
},
{
label: '近半年',
value: '4'
label: "近半年",
value: "4",
},
{
label: '自定义',
value: '0'
label: "自定义",
value: "0",
},
],
@ -251,7 +264,7 @@ export default {
},
{
align: "center",
width: "10%",
width: "8%",
},
{
align: "center",
@ -259,15 +272,23 @@ export default {
},
{
align: "center",
width: "5%",
width: "7%",
},
{
align: "center",
width: "10%",
},
],
header: ["序号", "所属组织", "事件内容", "上报渠道", "报事人", "手机号", "状态", "操作"],
header: [
"序号",
"所属组织",
"事件内容",
"上报渠道",
"报事人",
"上报时间",
"状态",
"操作",
],
list: [],
pageSize: 10,
pageNo: 1,
@ -275,87 +296,76 @@ export default {
},
showProject: false,
eventId: '',
eventId: "",
};
},
// mixins: [animate]
beforeDestroy () {
},
async created () {
},
beforeDestroy() {},
async created() {},
async mounted () {
this.dataLoading = true
async mounted() {
this.dataLoading = true;
//
this.initData()
await this.getAgencylist()//
this.handleChangeDate(this.dataType)
this.initData();
await this.getAgencylist(); //
this.handleChangeDate(this.dataType);
//
await this.getProjectTotal()
await this.getLineChart()
this.dataLoading = false
await this.getProjectTotal();
await this.getLineChart();
this.dataLoading = false;
// this.assignData()
},
methods: {
async getApiData () {
await this.getProjectTotal()
await this.getLineChart()
this.assignData()
async getApiData() {
await this.getProjectTotal();
await this.getLineChart();
this.assignData();
},
async handleChangeDate (index) {
async handleChangeDate(index) {
let end = new Date();
let start = new Date();
if (index === '1') {//
if (index === "1") {
//
start.setFullYear(start.getFullYear() - 1);
console.log(start.getDate())
} else if (index === '2') {//
console.log(start.getDate());
} else if (index === "2") {
//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
} else if (index === '3') {//
} else if (index === "3") {
//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
} else if (index === '4') {//
} else if (index === "4") {
//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 183);
}
if (index != '0') {
this.queryStartTime = dateFormat(start, 'yyyy-MM-dd') + " 00:00:00"
this.queryEndTime = dateFormat(end, 'yyyy-MM-dd') + " 23:59:59"
if (index != "0") {
this.queryStartTime = dateFormat(start, "yyyy-MM-dd") + " 00:00:00";
this.queryEndTime = dateFormat(end, "yyyy-MM-dd") + " 23:59:59";
}
if (index !== '0') {
await this.getApiData()
if (index !== "0") {
await this.getApiData();
// this.assignPieChart()
}
},
assignData () {
this.getPie()
this.getLine()
assignData() {
this.getPie();
this.getLine();
},
handleSelectChange (value) {
this.queryStartTime = value[0] + " 00:00:00"
this.queryEndTime = value[1] + " 23:59:59"
handleSelectChange(value) {
this.queryStartTime = value[0] + " 00:00:00";
this.queryEndTime = value[1] + " 23:59:59";
this.getApiData();
},
//
async getAgencylist () {
async getAgencylist() {
const url = "/gov/org/customeragency/agencygridtree";
//const url = '/gov/org/customeragency/agencylist'
@ -363,30 +373,27 @@ export default {
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.orgId = data.agencyId
this.orgId = data.agencyId;
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
++this.iscascaderShow;
this.casOptions = [];
this.agencyIdArray.length = [];
if (data) {
this.casOptions.push(data)
this.agencyIdArray.push(this.orgId)
this.casOptions.push(data);
this.agencyIdArray.push(this.orgId);
}
} else {
this.$message.error(msg);
}
},
//
async getProjectTotal () {
async getProjectTotal() {
if (this.$refs.pieChart) {
this.$refs.pieChart.showLoading()
this.$refs.pieChart.clear()
this.$refs.pieChart.showLoading();
this.$refs.pieChart.clear();
}
const url = "/gov/project/icEvent/processAnalysis/processStatusRatio";
@ -400,45 +407,44 @@ export default {
const { data, code, msg } = await requestPost(url, params);
if (this.$refs.pieChart) {
this.$refs.pieChart.hideLoading()
this.$refs.pieChart.hideLoading();
}
if (code === 0) {
this.projectTotal = parseInt(data.processingCount) + parseInt(data.closedCount);
this.projectTotal =
parseInt(data.processingCount) + parseInt(data.closedCount);
this.legendArray = [
{
name: '已完成',
name: "处理中",
count: data.closedCount,
percent: data.closedRatio,
url: require('@/assets/img/shuju/measure/huang@2x.png')
url: require("@/assets/img/shuju/measure/huang@2x.png"),
},
{
name: '处理中',
name: "已完成",
count: data.processingCount,
percent: data.processingRatio,
url: require('@/assets/img/shuju/measure/lv@2x.png')
}
]
url: require("@/assets/img/shuju/measure/lv@2x.png"),
},
];
this.pieData = [
{
name: "已完成",
value: Math.floor(data.closedRatio * 10000) / 100
value: Math.floor(data.closedRatio * 10000) / 100,
},
{
name: "处理中",
value: Math.floor(data.processingRatio * 10000) / 100
value: Math.floor(data.processingRatio * 10000) / 100,
},
]
];
} else {
this.$message.error(msg);
}
},
//
async getTable () {
async getTable() {
const url = "/gov/project/icEvent/processAnalysis/eventList";
//const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/processAnalysis/eventList";
let params = {
@ -449,25 +455,28 @@ export default {
queryEndTime: this.queryEndTime,
pageNo: this.demand.pageNo,
pageSize: this.demand.pageSize,
biz: 'eventProcessAnalysis'
biz: "eventProcessAnalysis",
};
const { data, code, msg } = await requestPost(url, params);
this.demand.loading = false;
if (code === 0) {
this.demand.total = data.total;
this.tableList = data.list
this.tableList = data.list;
this.demand.list = data.list.map((item, index) => {
return [
index + 1,
item.gridName ? item.gridName : '',
item.eventContent ? item.eventContent : '',
item.sourceTypeName ? item.sourceTypeName : '',
item.reportUserName ? item.reportUserName : '',
item.mobile ? item.mobile : 'processing',
item.processStatus ? item.processStatus === 'closed_case' ? '已完成' : '处理中' : '',
item.gridName ? item.gridName : "--",
item.eventContent ? item.eventContent : "--",
item.sourceTypeName ? item.sourceTypeName : "--",
item.reportUserName ? item.reportUserName : "--",
item.happenTime ? item.happenTime : "--",
item.processStatus
? item.processStatus === "closed_case"
? "已完成"
: "处理中"
: "--",
{ type: "operate", list: ["查看"] },
];
@ -477,45 +486,41 @@ export default {
}
},
handlePageNoChange_demand (val) {
handlePageNoChange_demand(val) {
this.demand.pageNo = val;
this.getTable();
},
toEventInfo (index) {
toEventInfo(index) {
const { tableList } = this;
this.eventId = tableList[index].eventId
this.showProject = true
this.eventId = tableList[index].eventId;
this.showProject = true;
},
pieInitOk (dom) {
this.pieChartS = dom
this.pieInitState = true
pieInitOk(dom) {
this.pieChartS = dom;
this.pieInitState = true;
},
lineInitOk () {
this.lineInitState = true
lineInitOk() {
this.lineInitState = true;
},
getLine () {
getLine() {
if (this.lineInitState) {
this.assignLineChart()
this.assignLineChart();
} else {
setTimeout(() => {
this.getLine()
}, 500)
this.getLine();
}, 500);
}
},
// 线
async getLineChart () {
async getLineChart() {
if (this.$refs.lineChart) {
this.$refs.lineChart.clear()
this.$refs.lineChart.showLoading()
this.$refs.lineChart.clear();
this.$refs.lineChart.showLoading();
}
const _that = this
const _that = this;
// this.$refs.pieChart.showLoading()
const url = "/gov/project/icEvent/processAnalysis/monthlyIncrement";
//const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/monthlyIncrement";
@ -531,100 +536,92 @@ export default {
if (code === 0) {
// pieChart
this.lineXaxis = []
this.lineSeriesData = []
this.lineXaxis = [];
this.lineSeriesData = [];
if (data && data.length > 0) {
this.lineNoData = false
data.forEach(item => {
this.lineXaxis.push(item.monthName)
this.lineSeriesData.push(item.increment)
this.lineNoData = false;
data.forEach((item) => {
this.lineXaxis.push(item.monthName);
this.lineSeriesData.push(item.increment);
});
this.lineData = data
this.lineData = data;
} else {
this.lineNoData = true
this.lineNoData = true;
}
if (this.$refs.lineChart) {
this.$refs.lineChart.hideLoading()
this.$refs.lineChart.hideLoading();
}
} else {
this.$message.error(msg);
}
},
assignLineChart () {
this.lineOption = lineOption()
this.$refs.lineChart.setOption(this.lineOption, true)
this.$refs.lineChart.setOption({
xAxis: { data: this.lineXaxis },
series: [
{ data: this.lineSeriesData },
]
}, true)
assignLineChart() {
this.lineOption = lineOption();
this.$refs.lineChart.setOption(this.lineOption, true);
this.$refs.lineChart.setOption(
{
xAxis: { data: this.lineXaxis },
series: [{ data: this.lineSeriesData }],
},
true
);
},
getPie () {
getPie() {
if (this.pieInitState) {
this.assignPieChart()
this.assignPieChart();
} else {
setTimeout(() => {
this.getPie()
}, 500)
this.getPie();
}, 500);
}
},
//
async assignPieChart () {
let maxIndex = 0
async assignPieChart() {
let maxIndex = 0;
const _that = this
const _that = this;
// pieChart
this.pieOption = pieOption(this.pieChartS)
this.pieOption = pieOption(this.pieChartS);
this.pieData[0].selected = false
this.pieData[1].selected = false
this.pieData[0].selected = false;
this.pieData[1].selected = false;
this.pieOption.title.text = this.projectTotal
this.pieOption.title.text = this.projectTotal;
this.clickPie()
this.clickPie();
let fun = function (params) {
_that.clickPie(params)
}
this.$refs.pieChart.handleClick(fun)
_that.clickPie(params);
};
this.$refs.pieChart.handleClick(fun);
},
clickPie (params) {
let dataIndex = params ? params.dataIndex : null
let componentIndex = params ? params.componentIndex : null
if (componentIndex === 1) {//
clickPie(params) {
let dataIndex = params ? params.dataIndex : null;
let componentIndex = params ? params.componentIndex : null;
if (componentIndex === 1) {
//
if (dataIndex === 0) {
this.processStatus = 'closed_case'
this.processStatus = "closed_case";
} else if (dataIndex === 1) {
this.processStatus = 'processing'
this.processStatus = "processing";
}
} else if (componentIndex === 2) {//
this.processStatus = ''
dataIndex = 3
} else if (componentIndex === 2) {
//
this.processStatus = "";
dataIndex = 3;
}
if (dataIndex === 3) {
this.$refs.pieChart.clear()
this.$refs.pieChart.clear();
}
this.pieData.forEach((element, index) => {
if (index === dataIndex) {
element.selected = true
element.selected = true;
element.label = {
show: true,
};
@ -632,63 +629,59 @@ export default {
show: true,
lineStyle: {
opacity: 1,
}
},
};
// element.selected = !element.selected
} else {
element.selected = false
element.selected = false;
element.label = {
show: false,
};
element.labelLine = {
show: false,
lineStyle: {
opacity: 0,
color: 'rgba(255,255,255,0)'
}
color: "rgba(255,255,255,0)",
},
};
element.selected = false
element.selected = false;
}
});
this.pieOption.series[1].data = this.pieData
this.demand.pageNo = 1
this.getTable()
this.pieOption.series[1].data = this.pieData;
this.demand.pageNo = 1;
this.getTable();
// this.$refs.pieChart.hideLoading()
this.$refs.pieChart.setOption(this.pieOption)
this.$refs.pieChart.setOption(this.pieOption);
},
handleChangeAgency () {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
handleChangeAgency() {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data;
if (obj) {
this.orgType = obj.level === 'grid' ? 'grid' : 'agency'
this.orgId = obj.agencyId
this.orgType = obj.level === "grid" ? "grid" : "agency";
this.orgId = obj.agencyId;
} else {
this.orgId = ''
this.orgType = ''
this.orgId = "";
this.orgType = "";
}
this.getApiData()
this.getApiData();
},
//
initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
initData() {
var time = new Date().getTime() - 24 * 60 * 60 * 1000;
var nowdate = new Date(time); //
var y = nowdate.getFullYear();
var m = nowdate.getMonth() + 1 < 10 ? "0" + (nowdate.getMonth() + 1) : nowdate.getMonth() + 1;
var d = nowdate.getDate() < 10 ? "0" + nowdate.getDate() : nowdate.getDate();
this.dateIdShow = y + '-' + m + '-' + d;
var m =
nowdate.getMonth() + 1 < 10
? "0" + (nowdate.getMonth() + 1)
: nowdate.getMonth() + 1;
var d =
nowdate.getDate() < 10 ? "0" + nowdate.getDate() : nowdate.getDate();
this.dateIdShow = y + "-" + m + "-" + d;
},
},
props: {
uid: {
@ -706,19 +699,18 @@ export default {
screenEchartsFrame,
eventInfo,
ScreenLoading,
ScreenNodata
ScreenNodata,
},
watch: {
dateIdShow () {
dateIdShow() {
// let dataArray = this.dateIdShow.split('-')
// this.dateId = dataArray.join('')
},
uid (id) {
uid(id) {
this.userId = id;
},
userId () {
userId() {
// this.getApiData();
window.scrollTo(0, 0);
},
@ -736,5 +728,3 @@ export default {
src="@/assets/scss/modules/visual/search_1.scss"
scoped
></style>

18
src/views/modules/visual/communityGovern/shijianfenlei/shijianfenleifenxi.vue

@ -213,7 +213,7 @@ export default {
},
{
align: "center",
width: "10%",
width: "8%",
},
{
align: "center",
@ -221,7 +221,7 @@ export default {
},
{
align: "center",
width: "5%",
width: "7%",
},
{
@ -229,7 +229,7 @@ export default {
width: "10%",
},
],
header: ["序号", "所属网格", "事件内容", "上报渠道", "报事人", "手机号", "状态", "操作"],
header: ["序号", "所属网格", "事件内容", "上报渠道", "报事人", "上报时间", "状态", "操作"],
list: [],
pageSize: 10,
pageNo: 1,
@ -441,12 +441,12 @@ export default {
this.demand.list = data.list.map((item, index) => {
return [
index + 1,
item.gridName ? item.gridName : '',
item.eventContent ? item.eventContent : '',
item.sourceTypeName ? item.sourceTypeName : '',
item.reportUserName ? item.reportUserName : '',
item.mobile ? item.mobile : 'processing',
item.processStatus ? item.processStatus === 'closed_case' ? '已完成' : '处理中' : '',
item.gridName ? item.gridName : '--',
item.eventContent ? item.eventContent : '--',
item.sourceTypeName ? item.sourceTypeName : '--',
item.reportUserName ? item.reportUserName : '--',
item.happenTime ? item.happenTime : '--',
item.processStatus ? item.processStatus === 'closed_case' ? '已完成' : '处理中' : '--',
{ type: "operate", list: ["查看"] },
]
})

Loading…
Cancel
Save