Browse Source

居民热议

shibei_prod
jiangyy 4 years ago
parent
commit
9dc942c2ce
  1. 6
      src/assets/scss/modules/visual/distributionAnalyze.scss
  2. 16
      src/assets/scss/modules/visual/incident-info.scss
  3. 629
      src/views/modules/visual/communityGovern/cpt/project-info.vue
  4. 6
      src/views/modules/visual/communityGovern/distributionAnalyze.vue
  5. 18
      src/views/modules/visual/communityGovern/distributionLineOption.js
  6. 1
      src/views/modules/visual/communityGovern/processAnalyze.vue
  7. 5
      src/views/modules/visual/communityGovern/resibuzz.vue
  8. 38
      src/views/modules/visual/communityGovern/typeAnalyze.vue

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

@ -116,12 +116,12 @@
display: flex;
flex-direction: row;
// flex-wrap: wrap;
// justify-content: center;
justify-content: space-between;
height: calc(100vh - 230px);
.g-l {
width: 40%;
height: calc(100vh - 290px);
height: calc(100vh - 240px);
.echart-line {
margin-left: 30px;
@ -139,7 +139,7 @@
}
.g-r {
width: 60%;
width: 55%;
height: calc(100vh - 250px);
.r-map {

16
src/assets/scss/modules/visual/incident-info.scss

@ -1,6 +1,6 @@
@import "../../c/config";
@import "../../c/function";
@import "./c/common";
@import '../../c/config';
@import '../../c/function';
@import './c/common';
.m-pop {
@include shield;
@ -128,7 +128,7 @@
}
&::before {
content: "";
content: '';
display: block;
position: absolute;
top: 9px;
@ -258,7 +258,7 @@
padding-right: 10px;
&::before {
content: "";
content: '';
position: absolute;
z-index: 1;
display: block;
@ -283,7 +283,7 @@
padding-top: 1px;
&::before {
content: "";
content: '';
display: block;
position: absolute;
top: -5px;
@ -373,3 +373,7 @@
}
}
}
.m-top {
display: flex;
}

629
src/views/modules/visual/communityGovern/cpt/project-info.vue

@ -0,0 +1,629 @@
<template>
<div class="m-pop">
<div class="wrap">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>项目详情</span>
</div>
<div class="btn-close"
@click="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="m-top">
<div class="m-info">
<div class="info-prop">
<span>项目标题</span>
<span>{{ projectInfo.projectTitle }}</span>
</div>
<div class="info-prop">
<span>项目背景</span>
<span>{{ projectInfo.backGround }}</span>
</div>
<div class="info-prop">
<span>项目方案</span>
<span>{{ projectInfo.projectTitle }}</span>
</div>
<div class="info-prop">
<span>内部备注</span>
<span>{{ projectInfo.internalRemark || "--" }}</span>
</div>
<div class="info-prop">
<span>当前处理部门</span>
<span>{{ projectInfo.departmentNameList.join("、") }}</span>
</div>
<div class="info-prop"
v-if="projectCate.length > 0">
<span>分类</span>
<fold-text :row="3">
<div :key="item.name"
v-for="item in projectCate">
{{ item.name }}
</div>
</fold-text>
</div>
<div class="info-prop"
v-if="projectTag.length > 0">
<span>标签</span>
<fold-text :row="3">
<div :key="item.name"
v-for="item in projectTag">
{{ item.name }}
</div>
</fold-text>
</div>
</div>
<div class="m-process"
v-if="projectProcess.length > 0">
<div class="process-title">处理进展</div>
<div class="list">
<div class="item"
:class="index === 0 ? 'z-on' : ''"
:key="item.processId"
v-for="(item, index) in projectProcess">
<div class="item-row">
<div class="name">{{ item.processName }}</div>
<div class="date">
{{ item.processTime }}
</div>
</div>
<div class="detail">
<div class="detail-field">处理部门</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail"
v-if="item.processName != '转项目' && item.publicReply">
<div class="detail-field"> </div>
<div class="detail-value">
<fold-text :row="3">{{ item.publicReply }}</fold-text>
</div>
</div>
<div class="detail"
v-if="item.processName != '转项目' && item.internalRemark">
<div class="detail-field">内部备注</div>
<div class="detail-value">
<fold-text :row="3">{{
item.internalRemark
}}</fold-text>
</div>
</div>
<div class="detail">
<div class="attachement-list">
<a :href="att.url"
target="_blank"
:key="att.url"
v-for="att in item.internalFile">
<i class="el-icon-folder-opened"></i>
{{ att.name }}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div v-if="projectInfo.origin!=='agency'"
class="tabs">
<div class="tab-btn"
@click="subStartGroupIndex"
v-if="groupList.length > 9">
<img src="@/assets/img/shuju/people/arrow-double-left.png" />
</div>
<div v-show="index >= startGroupIndex && index < startGroupIndex + 9"
class="tab"
:class="groupIndex % groupList.length == index ? 'z-on' : ''"
:key="'tab' + index"
@click="groupIndex = index"
v-for="(item, index) in groupList">
{{ item.label }}
</div>
<div class="tab-btn"
@click="addStartGroupIndex"
v-if="groupList.length > 9">
<img src="@/assets/img/shuju/people/arrow-double-right.png" />
</div>
</div>
<div class="m-case"
v-if="projectInfo.origin!=='agency'">
<div class="m-yanpan"
v-if="groupIndex == 0">
<div v-if="projectId">
<analyse v-if="!yanPan.loading"
singleTitle="楼院小组"
:userList="yanPan.homeUserList"
:userName="yanPan.icUserName"
:singleList="yanPan.categoryList"
@user="toUserInfo"
@project="toProjectInfo" />
<screen-loading v-else>加载中</screen-loading>
</div>
<div v-else
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
<div v-if="groupIndex == 1">
<div class="m-row"
v-if="projectInfo.originId">
<div v-if="projectInfo.origin==='issue'"
class="m-info">
<div class="info-prop">
<span>议题标题</span>
<span>{{ issueInfo.issueTitle }}</span>
</div>
<div class="info-prop">
<span>议题建议</span>
<span>{{ issueInfo.issueSuggestion }}</span>
</div>
<div class="info-prop">
<span>所属网格</span>
<span>{{ issueInfo.belongsGridName || "--" }}</span>
</div>
<div class="info-prop">
<span>议题发起人</span>
<span>{{ issueInfo.issueInitiator }}</span>
</div>
<div class="info-prop">
<span>议题来源</span>
<span>{{ issueInfo.topicInfo.groupName }}</span>
</div>
<div class="info-prop">
<span>转议题时间</span>
<span>{{ issueInfo.shiftIssueTime }}</span>
</div>
</div>
<div v-if="projectInfo.origin==='resi_event'"
class="m-info">
<div class="info-title">事件内容</div>
<div class="info-content">{{ info.eventContent }}</div>
<div class="info-pics">
<img :src="src"
:key="src"
v-for="src in info.eventImgs"
@click="watchImg(src)" />
</div>
<div class="info-prop">
<span>提交时间</span>
<span>{{ info.eventTime }}</span>
</div>
<div class="info-prop">
<span>报事人</span>
<span>{{ info.eventPeopleName }}</span>
</div>
<div class="info-prop">
<span>所属网格</span>
<span>{{ info.gridName }}</span>
</div>
<div class="info-prop">
<span>提报给</span>
<span>{{ info.eventPerson.join("、") || "--" }}</span>
</div>
</div>
<div v-if="projectInfo.origin==='issue'"
class="m-line">
<div class="stat">
<div class="stat-item">
<div>
{{ issueTrend.realityVoteCount }}/{{
issueTrend.shouldVoteCount
}}
</div>
<div class="z-weak">已表决/应表决</div>
</div>
<div class="stat-item">
<div>{{ issueTrend.supportAmount }}</div>
<div class="z-weak">支持</div>
</div>
<div class="stat-item">
<div>{{ issueTrend.oppositionAmount }}</div>
<div class="z-weak">反对</div>
</div>
</div>
<line-chart v-if="issueChartData.length > 0"
:list="issueChartData" />
</div>
</div>
<div v-else
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</div>
</cpt-card>
</div>
</div>
</template>
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import screenLoading from "@/views/modules/visual/cpts/loading";
import { requestPost } from "@/js/dai/request";
import cptTb from "@/views/modules/visual/cpts/tb";
import lineChart from "@/views/modules/visual/cpts/line-chart";
import analyse from "@/views/modules/visual/cpts/analyse";
import foldText from "@/views/components/foldText";
import dateFormat from "dai-js/tools/dateFormat";
function iniData () {
return {
groupList: [
{ label: "研判分析" },
{ label: "项目来源" },
],
groupIndex: 0,
startGroupIndex: 0,
projectProcess: [],
projectInfo: {
backGround: "",
departmentList: [
// { departmentName: "-", staffList: [""] },
],
departmentNameList: [],
internalRemark: "",
isSend: false,
locateAddress: "",
locateDimension: "",
locateLongitude: "",
origin: "",
originId: "",
platformIds: [],
processable: false,
projectId: "",
projectStatus: "pending",
projectTitle: "",
publicReply: "",
returnable: false,
},
issueInfo: {
attitude: "",
belongsGridName: "",
issueIdea: "",
issueInitiator: "",
issueStatus: "",
issueSuggestion: "",
issueTitle: "",
joinVote: true,
projectId: "",
projectStatus: false,
publishIdeaFlag: false,
},
issueTrend: {},
issueChartData: [],
eventInfo: {
eventTime: "",
eventContent: "",
eventAddress: "",
gridName: "",
isClosed: true,
isResolve: true,
isRollback: true,
eventImgs: [],
eventPerson: [],
eventOrg: [],
eventPeopleName: "",
projectInfo: {
projectId: "",
operationName: "",
operationTime: "",
projectDeclare: "",
},
},
projectCate: [],
projectTag: [],
yanPan: {
loading: false,
icResiUserId: "",
houseId: "",
icUserName: "",
homeUserList: [
// {
// homeId: '',
// icUserId: '',
// icUserName: '',
// }
],
categoryList: [],
projectData: [
// {
// firstCategoryCode: '',
// firstCategoryName: '',
// projectList: [],
// }
],
},
};
}
export default {
name: "demandInfo",
props: {
projectId: {
type: String,
default: "",
},
userId: {
type: String,
default: "",
},
categoryCodes: {
type: Array,
default: [],
},
},
components: {
cptCard,
cptTb,
analyse,
screenLoading,
lineChart,
foldText,
},
data: iniData,
computed: {},
watch: {
projectId () {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
this.getApiData();
},
},
mounted () {
this.getApiData();
},
methods: {
watchImg (src) {
window.open(src);
},
addStartGroupIndex () {
const { startGroupIndex, groupList } = this;
if (startGroupIndex < groupList.length - 9) {
this.startGroupIndex = startGroupIndex + 1;
} else {
this.startGroupIndex = groupList.length - 9;
}
},
subStartGroupIndex () {
const { startGroupIndex, groupList } = this;
if (startGroupIndex > 0) {
this.startGroupIndex = startGroupIndex - 1;
} else {
this.startGroupIndex = 0;
}
},
handleClose () {
this.$emit("close");
},
async getApiData () {
await this.getProjectInfo()
this.getProjectCate();
this.getProjectProcess();
if (this.projectInfo.origin === 'issue') {
this.getIssueInfo();
this.getIssueTrend();
} else if (this.projectInfo.origin === 'resi_event') {
this.getEventInfo()
}
if (this.projectInfo.origin !== 'agency') {
await this.getYanPan();
}
},
//
async getProjectInfo () {
const url = "/gov/project/trace/projectdetail";
const { data, code, msg } = await requestPost(url, {
projectId: this.projectId,
});
if (code === 0) {
this.projectInfo = data;
} else {
this.$message.error(msg);
}
},
//
async getIssueInfo () {
const url = "/resi/hall/issue/detail";
const { data, code, msg } = await requestPost(url, {
issueId: this.projectInfo.originId,
});
if (code === 0) {
this.issueInfo = data;
} else {
this.$message.error(msg);
}
},
//
async getIssueTrend () {
const url = "/resi/hall/issue/votingtrend";
const { data, code, msg } = await requestPost(url, {
issueId: this.projectInfo.originId,
});
if (code === 0) {
this.issueTrend = data;
let chartData = [];
data.polyLine.forEach((item) => {
let date = dateFormat(new Date(item.voteDate * 1000), "yyyy-MM-dd");
console.log("date:" + date);
chartData.push(
{
date,
value: item.supportIncrement,
type: "支持",
},
{
date,
value: item.oppositionIncrement,
type: "反对",
}
);
});
this.issueChartData = chartData;
} else {
this.$message.error(msg);
}
},
//
async getEventInfo () {
const url = "/gov/project/resievent/eventdetail-icdata";
const { data, code, msg } = await requestPost(url, {
resiEventId: this.projectInfo.originId,
});
if (code === 0) {
this.info = data;
} else {
this.$message.error(msg);
}
},
//
async getProjectProcess () {
const url = "/gov/project/trace/processlist-v2";
const { data, code, msg } = await requestPost(url, {
projectId: this.projectId,
});
if (code === 0) {
this.projectProcess = data.map((item) => {
item.processTime = dateFormat(
new Date(item.processTime * 1000),
"yyyy-MM-dd hh:mm"
);
return item;
});
} else {
this.$message.error(msg);
}
},
async getProjectCate () {
const url = "/gov/project/projectcategory/categorytaglist";
const { data, code, msg } = await requestPost(url, {
projectId: this.projectId,
});
if (code === 0) {
this.projectCate = data.categoryList;
this.projectTag = data.tagList;
} else {
this.$message.error(msg);
}
},
//
async getYanPan () {
const url = "/data/aggregator/project/projectanalysis";
const { data, code, msg } = await requestPost(url, {
categoryCodeList: this.categoryCodes,
userId: this.userId,
});
if (code === 0) {
let array = []
if (this.projectInfo.origin === 'issue') {
array = [...data.groupProjectList]
} else if (this.projectInfo.origin === 'resi_event') {
array = [...data.eventProjectList]
}
data.categoryList = array.map((item) => {
return {
categoryCode: item.firstCategoryCode,
categoryName: item.firstCategoryName,
showItem: true,
projectList: item.projectList.map((subItem) => {
return {
title: subItem.projectTitle,
status: subItem.projectStatus,
statusName:
subItem.projectStatus == "pending" ? "待处理" : "结案",
projectId: subItem.projectId,
projectId: subItem.projectId,
};
}),
};
});
this.yanPan = { ...this.yanPan, ...data };
this.yanPan.loading = false;
} else {
this.$message.error(msg);
}
},
toUserInfo (item) {
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`,
});
},
toProjectInfo (item) {
console.log(item);
this.projectId = item.projectId;
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/incident-info.scss"
scoped
></style>

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

@ -503,11 +503,12 @@ export default {
let dataArray = new Array(num)
//
this.lineList[0].categoryList.forEach((categoryItem, index) => {
this.legend.push(categoryItem.name)
this.legend.push(categoryItem.categoryName)
dataArray[index] = []
});
//
this.lineList.forEach(item => {
this.xaxis.push(item.time)
@ -523,8 +524,9 @@ export default {
this.lineList[0].categoryList.forEach((categoryItem, index) => {
let object = {
name: categoryItem.name,
name: categoryItem.categoryName,
type: 'line',
smooth: true,
barWidth: 15,
areaStyle: {},
itemStyle: {

18
src/views/modules/visual/communityGovern/distributionLineOption.js

@ -2,6 +2,21 @@ import * as echarts from 'echarts'
export function lineOption () {
return {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
grid: {
left: 70,
top: 40,
right: 50,
bottom: 150
},
legend: {
textStyle: {
color: '#D2E7FF',
@ -10,7 +25,7 @@ export function lineOption () {
},
itemWidth: 20,
itemHeight: 10,
// top: 350,
// top: 650,
bottom: 0,
data: []
},
@ -62,6 +77,7 @@ export function lineOption () {
}
},
series: [
// {
// name: '项目数',
// type: 'line',

1
src/views/modules/visual/communityGovern/processAnalyze.vue

@ -528,7 +528,6 @@ export default {
}
this.$refs.pieChart.handleClick(fun)
},
clickPie (seriesIndex) {

5
src/views/modules/visual/communityGovern/resibuzz.vue

@ -192,8 +192,8 @@ export default {
pageNo: 1,
total: 0,
},
showIssue: true,
issueId: 'cf48b7dc70ef4c319fd9c71890d9dbbb',
showIssue: false,
issueId: '',
casOptions: [],
agencyIdArray: [],
@ -243,7 +243,6 @@ export default {
this.orgId = this.agencyInfo.agencyId
this.orgType = this.agencyInfo.level === 'grid' ? 'grid' : 'agency'
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}

38
src/views/modules/visual/communityGovern/typeAnalyze.vue

@ -43,7 +43,8 @@
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"></cpt-tb>
:list="demand.list"
@operate="toProjectInfo"></cpt-tb>
</div>
@ -61,6 +62,11 @@
</div>
</div>
<project-info v-if="showProject"
:projectId="projectId"
:userId="userId"
:categoryCodes="categoryCodes"
@close="showProject = false" />
</cpt-card>
</template>
@ -70,6 +76,7 @@ import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
import cptTb from "@/views/modules/visual/cpts/tb";
import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame";
import projectInfo from "./cpt/project-info";
import { pieOption } from './typePieOption.js'
import nextTick from 'dai-js/tools/nextTick'
@ -150,8 +157,13 @@ export default {
pageSize: 10,
pageNo: 1,
total: 0,
},
tableList: [],
showProject: false,
userId: '',//
categoryCodes: [],//Id
projectId: '',
casOptions: [],
agencyIdArray: [],
@ -175,7 +187,7 @@ export default {
},
async mounted () {
this.userId = this.uid;
this.initData()
await this.getAgencylist()//
await nextTick(500)
@ -382,6 +394,7 @@ export default {
if (code === 0) {
this.demand.total = data.total;
this.tableList = data.list
this.demand.list = data.list.map((item) => {
//:issue :agency :resi_event
item.originShow = item.origin === 'issue' ? '楼院小组' : item.origin === 'agency' ? '项目立项' : '事件上报'
@ -408,8 +421,14 @@ export default {
this.demand.pageNo = val;
this.getTable();
},
toUserInfo (uid) {
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` });
async toProjectInfo (index) {
const { tableList } = this;
this.projectId = tableList[index].projectId
this.userId = tableList[index].userId
this.categoryCodes = tableList[index].categoryCodes
this.showProject = true
},
},
props: {
@ -426,6 +445,7 @@ export default {
cptCard,
cptTb,
screenEchartsFrame,
projectInfo,
},
watch: {
@ -433,13 +453,7 @@ export default {
let dataArray = this.dateIdShow.split('-')
this.dateId = dataArray.join('')
},
uid (id) {
this.userId = id;
},
userId () {
this.getPie()
window.scrollTo(0, 0);
},
},
};
</script>

Loading…
Cancel
Save