Browse Source

可视化话题详情组件5

shibei_master
dai 4 years ago
parent
commit
2fe38c4825
  1. 6
      src/assets/scss/modules/visual/distributionAnalyze.scss
  2. 630
      src/views/modules/visual/communityGovern/cpt/project-info.vue
  3. 6
      src/views/modules/visual/communityGovern/distributionAnalyze.vue
  4. 18
      src/views/modules/visual/communityGovern/distributionLineOption.js
  5. 1
      src/views/modules/visual/communityGovern/processAnalyze.vue
  6. 5
      src/views/modules/visual/communityGovern/resibuzz.vue
  7. 38
      src/views/modules/visual/communityGovern/typeAnalyze.vue
  8. 3
      src/views/modules/visual/components/screen-table/index.vue
  9. 167
      src/views/modules/visual/cpts/analyse.vue
  10. 144
      src/views/modules/visual/measure/service.vue
  11. 6
      src/views/modules/visual/measure/volunteer.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 {

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

@ -0,0 +1,630 @@
<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.categoryCode,
categoryName: item.categoryName,
showItem: true,
projectList: item.projectList.map((subItem) => {
return {
title: subItem.projectTitle,
status: subItem.projectStatus,
statusName:
subItem.projectStatus == "pending" ? "待处理" : "结案",
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>

3
src/views/modules/visual/components/screen-table/index.vue

@ -251,6 +251,9 @@ export default {
text-align: center;
width: calc(100% / 5);
cursor: pointer;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
.more {
font-size: 18px;
font-weight: 400;

167
src/views/modules/visual/cpts/analyse.vue

@ -5,7 +5,10 @@
<div class="analys-col">
<div class="analys-family">
<div class="family-title">(家属)</div>
<div v-for="(item, index) in userList" :key="index" class="family-item" @click="handleUser(item)">{{item.icUserName}}</div>
<div v-for="(item, index) in userList"
:key="index"
class="family-item"
@click="handleUser(item)">{{item.icUserName}}</div>
<!-- <div class="family-item">王亚男哈</div>
<div class="family-item">王亚男</div>
<div class="family-item">王亚男哈</div>
@ -14,7 +17,8 @@
</div>
<div class="analys-col">
<img class="analys-arrow" src="../../../../assets/img/shuju/measure/zuo@2x.png" />
<img class="analys-arrow"
src="../../../../assets/img/shuju/measure/zuo@2x.png" />
</div>
<div class="analys-col">
@ -24,18 +28,20 @@
</div>
</div>
<template v-if="hasEvent">
<div class="analys-col analys-col-posi">
<img class="analys-up" src="../../../../assets/img/shuju/measure/up-right.png" />
<img class="analys-up analys-down" src="../../../../assets/img/shuju/measure/down-right.png" />
<img class="analys-up"
src="../../../../assets/img/shuju/measure/up-right.png" />
<img class="analys-up analys-down"
src="../../../../assets/img/shuju/measure/down-right.png" />
</div>
<div class="analys-col">
<div class="cate-list cate-list-more">
<div class="cate-row">
<div class="analys-col">
<div class="analys-cate" @click="handleTabs('group')">
<div class="analys-cate"
@click="handleTabs('group')">
<div class="label">{{ singleTitle }}</div>
<div class="tips">(反应渠道)</div>
<div class="icon">
@ -44,8 +50,10 @@
</div>
</div>
<div v-if="sourceTab === 'group'" class="analys-col">
<img class="analys-arrow" src="../../../../assets/img/shuju/measure/you@2x.png" />
<div v-if="sourceTab === 'group'"
class="analys-col">
<img class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
</div>
</div>
@ -53,7 +61,8 @@
<div class="cate-row">
<div class="analys-col">
<div class="analys-cate" @click="handleTabs('event')">
<div class="analys-cate"
@click="handleTabs('event')">
<div class="label">{{ moreTitle }}</div>
<div class="tips">(反应渠道)</div>
<div class="icon">
@ -62,45 +71,57 @@
</div>
</div>
<div v-if="sourceTab === 'event'" class="analys-col">
<img class="analys-arrow" src="../../../../assets/img/shuju/measure/you@2x.png" />
<div v-if="sourceTab === 'event'"
class="analys-col">
<img class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
</div>
</div>
</div>
</div>
<div class="analys-col analys-col-wr analys-col-more list-wr" id="scroll-wr">
<div class="analys-col analys-col-wr analys-col-more list-wr"
id="scroll-wr">
<div class="cate-list cate-list-child">
<div v-for="(item, index) in tempList" :key="index" class="cate-row">
<div v-for="(item, index) in tempList"
:key="index"
class="cate-row">
<div class="cate-col">
<div class="analys-cate">
<div class="label">{{item.categoryName}}</div>
<div class="tips">(同类案件)</div>
<div class="icon" @click="handleShow(item)">
<div class="icon"
@click="handleShow(item)">
<img src="../../../../assets/img/shuju/measure/gantanhao.png" />
</div>
</div>
</div>
<div class="cate-col cate-col-arrow">
<img v-show="item.showItem" class="analys-arrow" src="../../../../assets/img/shuju/measure/you@2x.png" />
<div class="cate-col cate-col-arrow">
<img v-show="item.showItem"
class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
</div>
<div class="cate-col cate-col-w100">
<div class="cate-list-w0" :class="item.showItem && 'cate-list-w100'">
<div class="cate-list-w0"
:class="item.showItem && 'cate-list-w100'">
<div class="list list-wr">
<div v-for="(n, i) in item.projectList" :key="i" class="item" @click="handleProject(n)">
<div class="item-status" :class="'item-status-'+n.status">{{filterStatus(n.status)}}</div>
<div v-for="(n, i) in item.projectList"
:key="i"
class="item"
@click="handleProject(n)">
<div class="item-status"
:class="'item-status-'+n.status">{{filterStatus(n.status)}}</div>
<div class="item-content">{{n.title}}</div>
</div>
<!-- <div class="item">
<div class="item-status">已结案</div>
<div class="item-content">合肥路与安宁路交合肥路与安宁路交</div>
</div> -->
</div>
</div>
</div>
@ -112,11 +133,10 @@
</template>
<template v-else>
<div class="analys-col">
<img class="analys-arrow" src="../../../../assets/img/shuju/measure/you@2x.png" />
<img class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
</div>
<div class="analys-col">
<div class="analys-cate">
<div class="label">{{ singleTitle }}</div>
@ -128,35 +148,51 @@
</div>
<div class="analys-col">
<img v-if="tempList.length > 1" class="analys-up" src="../../../../assets/img/shuju/measure/up-right.png" />
<img v-if="tempList.length != 2" class="analys-arrow" src="../../../../assets/img/shuju/measure/you@2x.png" />
<img v-if="tempList.length > 1"
class="analys-up analys-down" src="../../../../assets/img/shuju/measure/down-right.png" />
<img v-if="tempList.length > 1"
class="analys-up"
src="../../../../assets/img/shuju/measure/up-right.png" />
<img v-if="tempList.length != 2"
class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
<img v-if="tempList.length > 1"
class="analys-up analys-down"
src="../../../../assets/img/shuju/measure/down-right.png" />
</div>
<div class="analys-col list-wr" :class="tempList.length > 2 && 'analys-col-wr' || 'analys-single'"
:style="'padding-top:' + (tempList.length - 3) * 190 + 'px;'">
<div class="analys-col list-wr"
:class="tempList.length > 2 && 'analys-col-wr' || 'analys-single'"
:style="'padding-top:' + (tempList.length - 3) * 190 + 'px;'">
<div class="cate-list">
<div v-for="(item, index) in tempList" :key="index" class="cate-row">
<div v-for="(item, index) in tempList"
:key="index"
class="cate-row">
<div class="cate-col">
<div class="analys-cate">
<div class="label">{{item.categoryName}}</div>
<div class="tips">(同类案件)</div>
<div class="icon" @click="handleShow(item)">
<div class="icon"
@click="handleShow(item)">
<img src="../../../../assets/img/shuju/measure/gantanhao.png" />
</div>
</div>
</div>
<div class="cate-col cate-col-arrow">
<img v-show="item.showItem" class="analys-arrow" src="../../../../assets/img/shuju/measure/you@2x.png" />
<img v-show="item.showItem"
class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
</div>
<div class="cate-col cate-col-w100">
<div class="cate-list-w0" :class="item.showItem && 'cate-list-w100'">
<div class="cate-list-w0"
:class="item.showItem && 'cate-list-w100'">
<div class="list list-wr">
<div v-for="(n, i) in item.projectList" :key="i" class="item" @click="handleProject(n)">
<div class="item-status" :class="'item-status-'+n.status">
<div v-for="(n, i) in item.projectList"
:key="i"
class="item"
@click="handleProject(n)">
<div class="item-status"
:class="'item-status-'+n.status">
{{ n.statusName || filterStatus(n.status)}}
</div>
<div class="item-content">{{n.title}}</div>
@ -165,10 +201,10 @@
<div class="item-status">已结案</div>
<div class="item-content">合肥路与安宁路交合肥路与安宁路交</div>
</div> -->
</div>
</div>
</div>
</div>
@ -213,7 +249,7 @@ export default {
userList: Array, //
userName: String, //
singleList: Array, //
},
data () {
return {
@ -221,31 +257,32 @@ export default {
tempList: []
}
},
created() {
created () {
this.tempList = [...this.singleList]
},
methods: {
filterStatus(status) {
const statusObj = {
filterStatus (status) {
const statusObj = {
pending: '待处理',
closed: '已结案'
}
return statusObj[status]
},
handleTabs(type) {
if (type === 'group') this.tempList = [ ...this.singleList ]
else if (type === 'event') this.tempList = [ ...this.moreList ]
handleTabs (type) {
if (type === 'group') this.tempList = [...this.singleList]
else if (type === 'event') this.tempList = [...this.moreList]
this.sourceTab = type
const _dom = document.getElementById('scroll-wr')
_dom.scrollTop = 0
},
handleProject(item) {
handleProject (item) {
this.$emit('project', item)
},
handleUser(item) {
handleUser (item) {
this.$emit('user', item)
},
handleShow(item) {
handleShow (item) {
item.showItem = !item.showItem
}
}
@ -279,7 +316,7 @@ export default {
color: #fff;
text-align: center;
background: rgba(255, 255, 255, 0);
border: 1px solid #1257C9;
border: 1px solid #1257c9;
border-radius: 2px;
box-shadow: 0 0 5px 2px rgba(18, 87, 201, 1) inset;
}
@ -310,7 +347,8 @@ export default {
padding-top: 60px;
color: #fff;
text-align: center;
background: url('../../../../assets/img/shuju/measure/zhuhu@2x.png') no-repeat center;
background: url("../../../../assets/img/shuju/measure/zhuhu@2x.png")
no-repeat center;
background-size: cover;
.personal-name {
font-size: 18px;
@ -336,7 +374,7 @@ export default {
color: #fff;
cursor: pointer;
background: rgba(255, 255, 255, 0);
border: 1px solid #1257C9;
border: 1px solid #1257c9;
border-radius: 4px;
box-shadow: 1px 1px 10px 5px rgba(18, 87, 201, 1) inset;
.label {
@ -388,7 +426,7 @@ export default {
width: 230px;
.cate-list-w0 {
width: 0;
transition: width .2s;
transition: width 0.2s;
overflow: hidden;
// border: 0;
// padding: 0;
@ -399,7 +437,7 @@ export default {
// // background: rgba(255, 255, 255, 0);
// border: 1px solid #1257C9;
// overflow: auto;
transition: width .2s;
transition: width 0.2s;
}
}
}
@ -424,7 +462,7 @@ export default {
box-sizing: border-box;
padding: 4px 14px 10px;
background: rgba(255, 255, 255, 0);
border: 1px solid #1257C9;
border: 1px solid #1257c9;
overflow: auto;
border-radius: 4px;
box-shadow: 1px 1px 10px 5px rgba(18, 87, 201, 1) inset;
@ -445,15 +483,16 @@ export default {
font-size: 10px;
text-align: center;
// line-height: 15px;
background: #0C5CFE;
background: #0c5cfe;
border-radius: 2px;
&-pending, &-canceled {
&-pending,
&-canceled {
background: rgba(224, 84, 0, 1);
}
&-assigned, &-have_order {
&-assigned,
&-have_order {
background: rgba(9, 163, 125, 1);
}
}
.item-content {
font-size: 14px;
@ -463,8 +502,6 @@ export default {
}
}
}
}
.analys-col-wr {
height: 100%;
@ -502,7 +539,6 @@ export default {
// left: -30px;
}
}
}
}
.pad10 {
@ -516,20 +552,21 @@ export default {
.list-wr::-webkit-scrollbar-corner,
/* 滚动条角落 */
.list-wr::-webkit-scrollbar-thumb,
.list-wr::-webkit-scrollbar-track { /*滚动条的轨道*/
.list-wr::-webkit-scrollbar-track {
/*滚动条的轨道*/
border-radius: 4px;
}
.list-wr::-webkit-scrollbar-corner,
.list-wr::-webkit-scrollbar-track {
/* 滚动条轨道 */
background: rgba(12, 129, 254, .24);
background: rgba(12, 129, 254, 0.24);
// box-shadow: inset 0 0 1px rgba(180, 160, 120, 0.5);
}
.list-wr::-webkit-scrollbar-thumb {
/* 滚动条手柄 */
background: linear-gradient(270deg, #0063FE, #0095FF);
background: linear-gradient(270deg, #0063fe, #0095ff);
}
</style>

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

@ -9,7 +9,8 @@
:options="propTree"
:props="{ checkStrictly: true }"
:show-all-levels="false"
clearable @change="handleCascader">
clearable
@change="handleCascader">
</el-cascader>
</div>
<div class="title-time">
@ -178,6 +179,7 @@ export default {
{ title: "服务方", coulmn: 'serviceName' },
{ title: "服务时间", coulmn: 'wantServiceTime' },
],
categoryList: {},
timeRange: '',
tableData: [
// [1,'','','2',''],
@ -193,6 +195,13 @@ export default {
detailInfo: {}
};
},
watch: {
timeRange(val) {
console.log('val-www', val)
if (!val) return false
this.handleCascader(this.selectAgency)
}
},
async mounted() {
this.initTime()
await nextTick(100);
@ -214,6 +223,38 @@ export default {
axisPointer: {
// Use axis to trigger tooltip
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
},
backgroundColor: 'transprant',
borderColor: 'transprant',
textStyle: {
color: '#fff'
},
formatter: params => {
let res;
let arr = []
let total = 0
const xName = params[0].axisValue
this.categoryList.forEach(item => {
if (item.categoryName === xName) {
arr = item.detail
total = item.total
}
})
let title = `<div style='margin-bottom: 10px;'><span>${xName}分类需求</span>${total}个</div>`
let desc = ''
let unit = '个'
arr.forEach(item => {
if (item.legendCode == 'volunteer') unit = '名'
else unit = '个'
if (item.legendCode == 'unfinished') {
desc += `<div><span>尚有 ${item.serviceDemandTotal} 个需求未完成</span></div>`
}else {
desc += `<div><span>共 ${item.totalService} ${unit} ${item.legendName} 完成需求 ${item.serviceDemandTotal} 个</span></div>`
}
})
res= title + desc
return res
}
},
legend: {
@ -232,7 +273,11 @@ export default {
xAxis: {
type: 'category',
axisLabel: {
color: '#fff'
color: '#fff',
interval: 0
},
axisTick: {
interval: 0
},
data: xData
},
@ -247,76 +292,13 @@ export default {
// axisLine: false
},
series: yData
// [
// {
// name: '',
// type: 'bar',
// stack: 'total',
// // barWidth: 20,
// label: {
// show: true
// },
// emphasis: {
// focus: 'series'
// },
// data: [320, 302, 301, 334, 390, 330, 320]
// },
// {
// name: '',
// type: 'bar',
// stack: 'total',
// // barWidth: 20,
// label: {
// show: true
// },
// emphasis: {
// focus: 'series'
// },
// data: [120, 132, 101, 134, 90, 230, 210]
// },
// {
// name: '',
// type: 'bar',
// stack: 'total',
// // barWidth: 20,
// label: {
// show: true
// },
// emphasis: {
// focus: 'series'
// },
// data: [220, 182, 191, 234, 290, 330, 310]
// },
// {
// name: '',
// type: 'bar',
// stack: 'total',
// // barWidth: 20,
// label: {
// show: true
// },
// emphasis: {
// focus: 'series'
// },
// data: [150, 212, 201, 154, 190, 330, 410]
// },
// {
// name: '',
// type: 'bar',
// stack: 'total',
// // barWidth: 20,
// label: {
// show: true
// },
// emphasis: {
// focus: 'series'
// },
// data: [820, 832, 901, 934, 1290, 1330, 1320]
// }
// ]
};
option && _charts.setOption(option);
_charts.on('click', params => {
this.clickBar(params)
})
},
async getServicePie(orgId, orgType) {
@ -331,6 +313,7 @@ export default {
if (code === 0) {
console.log('pie-data', data)
const { categoryList, legend } = data
this.categoryList = categoryList
let xData = categoryList.map(item => item.categoryName)
let yData = []
yData = legend.map(item => {
@ -475,6 +458,18 @@ export default {
return y + '-' + m + '-' + d
},
clickBar(params) {
console.log('params---p', params)
let code = ''
this.categoryList.forEach(item => {
if (item.categoryName == params.name) code = item.categoryCode
})
if (code) {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getServiceList(_arr[0], orgType, code)
}
},
async handleLook(val) {
// this.detailId = val.id
@ -484,16 +479,21 @@ export default {
},
handleCascader(val) {
console.log('val-vvv', val)
const _arr = val[val.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getServiceList(_arr[0], orgType)
if (val.length > 0) {
const _arr = val[val.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getServicePie(_arr[0], orgType)
}
},
pageSizeChangeHandleNew(val) {
this.pageNo = 1;
this.pageSize = val;
this.handleCascader(this.selectAgency)
},
pageCurrentChangeHandleNew(val) {
this.pageNo = val;
this.handleCascader(this.selectAgency)
},
},
};

6
src/views/modules/visual/measure/volunteer.vue

@ -596,14 +596,14 @@ export default {
}
.card-wr-map {
height: calc(100vh - 140px);
height: calc(100vh - 150px);
text-align: center;
.card-map {
margin-top: 10px;
width: 100%;
height: calc(100vh - 285px);
// height: calc(100vh - 295px);
// height: calc(100vh - 285px);
height: calc(100vh - 315px);
.map {
width: 100%;

Loading…
Cancel
Save