Browse Source

Merge branch 'dev-shuju' into test

shibei_master
13176889840 4 years ago
parent
commit
c74c64e684
  1. 16
      src/assets/scss/modules/visual/incident-info.scss
  2. 4
      src/assets/scss/modules/visual/typeAnalyze.scss
  3. 24
      src/views/modules/communityParty/elegant/index.vue
  4. 93
      src/views/modules/visual/communityGovern/cpt/project-info.vue
  5. 82
      src/views/modules/visual/communityGovern/typeAnalyze.vue
  6. 19
      src/views/modules/visual/components/screen-echarts-frame/index.vue
  7. 62
      src/views/modules/visual/measure/service.vue

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;
}

4
src/assets/scss/modules/visual/typeAnalyze.scss

@ -135,3 +135,7 @@
height: 90%;
}
}
.table-status {
margin-top: 200px;
}

24
src/views/modules/communityParty/elegant/index.vue

@ -339,18 +339,18 @@ export default {
.then((res) => {
this.importLoading = false
this.importBtnTitle = '导入人员数据'
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
// let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
// console.log('filename', fileName)
// let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
// var url = window.URL.createObjectURL(blob)
// var aLink = document.createElement('a')
// aLink.style.display = 'none'
// aLink.href = url
// aLink.setAttribute('download', fileName)
// document.body.appendChild(aLink)
// aLink.click()
// document.body.removeChild(aLink) //
// window.URL.revokeObjectURL(url) //blob
this.getTableData()
})
.catch( err => {

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

@ -134,11 +134,13 @@
<div class="m-yanpan"
v-if="groupIndex == 0">
<div v-if="projectId">
<analyse v-if="!yanPan.loading"
<analyse v-if="yanPan.loading"
singleTitle="楼院小组"
:userList="yanPan.homeUserList"
:userName="yanPan.icUserName"
:singleList="yanPan.categoryList"
:singleList="yanPan.singleList"
:hasEvent="yanPan.hasEvent"
:moreList="yanPan.moreList"
@user="toUserInfo"
@project="toProjectInfo" />
<screen-loading v-else>加载中</screen-loading>
@ -258,7 +260,7 @@ import dateFormat from "dai-js/tools/dateFormat";
function iniData () {
return {
projectIdCopy: this.projectId,
groupList: [
{ label: "研判分析" },
{ label: "项目来源" },
@ -266,7 +268,6 @@ function iniData () {
groupIndex: 0,
startGroupIndex: 0,
projectProcess: [],
projectInfo: {
@ -345,7 +346,7 @@ function iniData () {
// icUserName: '',
// }
],
categoryList: [],
singleList: [],//
projectData: [
// {
// firstCategoryCode: '',
@ -353,6 +354,9 @@ function iniData () {
// projectList: [],
// }
],
hasEvent: false,
moreList: [],//
},
};
}
@ -396,9 +400,14 @@ export default {
});
this.getApiData();
},
// projectIdCopy () {
// },
},
mounted () {
console.log(this.projectIdCopy)
this.getApiData();
},
@ -450,7 +459,7 @@ export default {
const url = "/gov/project/trace/projectdetail";
const { data, code, msg } = await requestPost(url, {
projectId: this.projectId,
projectId: this.projectIdCopy,
});
if (code === 0) {
@ -533,7 +542,7 @@ export default {
const url = "/gov/project/trace/processlist-v2";
const { data, code, msg } = await requestPost(url, {
projectId: this.projectId,
projectId: this.projectIdCopy,
});
if (code === 0) {
@ -554,7 +563,7 @@ export default {
const url = "/gov/project/projectcategory/categorytaglist";
const { data, code, msg } = await requestPost(url, {
projectId: this.projectId,
projectId: this.projectIdCopy,
});
if (code === 0) {
@ -576,34 +585,73 @@ export default {
});
if (code === 0) {
let array = []
if (this.projectInfo.origin === 'issue') {
array = [...data.groupProjectList]
} else if (this.projectInfo.origin === 'resi_event') {
array = [...data.eventProjectList]
data.icResiUserId = data.icUserId
data.homeUserList.forEach(item => {
item.icResiUserId = item.icUserId
});
let array1 = []
let array2 = []
// debugger
//
if (data.groupProjectList && data.groupProjectList.length > 0 && data.eventProjectList && data.eventProjectList.length > 0) {
this.yanPan.hasEvent = true
array1 = [...data.groupProjectList]
array2 = [...data.eventProjectList]
} else {
this.yanPan.hasEvent = false
if (data.groupProjectList && data.groupProjectList.length > 0) {
array1 = [...data.groupProjectList]
} else if (data.eventProjectList && data.eventProjectList.length > 0) {
array1 = [...data.eventProjectList]
} else {
array1 = []
}
}
data.categoryList = array.map((item) => {
if (array1.length > 0) {
data.singleList = array1.map((item) => {
return {
categoryCode: item.categoryCode,
categoryName: item.categoryName,
showItem: true,
projectList: item.projectList.map((subItem) => {
return {
title: subItem.title,
status: subItem.status,
statusName:
subItem.status == "pending" ? "待处理" : "结案",
projectId: subItem.projectId,
};
}),
};
});
}
if (array2.length > 0) {
data.moreList = array2.map((item) => {
return {
categoryCode: item.categoryCode,
categoryName: item.categoryName,
showItem: true,
projectList: item.projectList.map((subItem) => {
return {
title: subItem.projectTitle,
status: subItem.projectStatus,
title: subItem.title,
status: subItem.status,
statusName:
subItem.projectStatus == "pending" ? "待处理" : "结案",
subItem.status == "pending" ? "待处理" : "结案",
projectId: subItem.projectId,
};
}),
};
});
}
this.yanPan = { ...this.yanPan, ...data };
this.yanPan.loading = false;
this.yanPan = { ...this.yanPan, ...data };
console.log(this.yanPan)
this.yanPan.loading = true;
} else {
this.$message.error(msg);
}
@ -617,7 +665,12 @@ export default {
toProjectInfo (item) {
console.log(item);
this.projectId = item.projectId;
this.projectIdCopy = item.projectId;
// let data = iniData();
// Object.keys(data).forEach((k) => {
// this[k] = data[k];
// });
this.getApiData();
},
},
};

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

@ -31,10 +31,15 @@
<div class="g-cpt-resi">
<div class="g-l">
<screen-echarts-frame class="echart-wr"
<screen-echarts-frame v-if="!dataLoading"
class="echart-wr"
@myChartMethod="pieInitOk"
ref="pieChart"></screen-echarts-frame>
<div class="table-status"
v-if="dataLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
<div class="g-r">
<div class="m-tb">
@ -77,7 +82,7 @@ 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 ScreenLoading from "@/views/modules/visual/components/screen-loading";
import { pieOption } from './typePieOption.js'
import nextTick from 'dai-js/tools/nextTick'
@ -85,8 +90,7 @@ export default {
name: "HomeMap",
data () {
return {
showNoData: false,
timer: null,
dataLoading: true,
pieChartS: null,
pieChart: '',
pieOption: {},
@ -183,15 +187,17 @@ export default {
},
// mixins: [animate]
beforeDestroy () {
this.timer && clearInterval(this.timer)
},
async mounted () {
this.dataLoading = true
this.initData()
await this.getAgencylist()//
await nextTick(500)
await this.getPie()
await this.getPieChart()
this.dataLoading = false
this.getPie()
},
methods: {
@ -253,21 +259,15 @@ export default {
this.pieInitState = true
},
getPie () {
if (this.pieInitState) {
this.getPieChart()
} else {
setTimeout(() => {
this.getPie()
}, 500)
}
},
//
async getPieChart () {
this.$refs.pieChart.clear()
this.pieTotal = 0
const _that = this
// this.$refs.pieChart.showLoading()
if (this.$refs.pieChart) {
this.$refs.pieChart.showLoading()
}
const url = "/data/aggregator/project/projectcategorylist";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectcategorylist";
let params = {
@ -279,15 +279,40 @@ export default {
// pieChart
if (code === 0) {
// pieChart
this.pieOption = pieOption(this.pieChartS)
if (data && data.length > 0) {
this.pieData = data
} else {
this.pieData = [{ total: 0, categoryName: '无分类', color: '#00E5ED' }]
this.pieData = []
}
if (this.$refs.pieChart) {
this.$refs.pieChart.hideLoading()
}
} else {
this.$message.error(msg);
}
},
getPie () {
if (this.pieInitState) {
this.assignPieChart()
} else {
setTimeout(() => {
this.getPie()
}, 500)
}
},
assignPieChart () {
if (this.pieData.length > 0) {
this.$refs.pieChart.setNoData(false)
this.$refs.pieChart.clear()
this.pieTotal = 0
const _that = this
// pieChart
this.pieOption = pieOption(this.pieChartS)
let maxValue = this.pieData[0].total
let maxIndex = 0
this.pieData[0].selected = true
@ -323,9 +348,8 @@ export default {
this.$refs.pieChart.handleClick(fun)
this.clickPie(maxIndex)
} else {
this.$message.error(msg);
this.$refs.pieChart.setNoData(true)
}
},
async clickPie (seriesIndex) {
@ -395,6 +419,7 @@ export default {
if (code === 0) {
this.demand.total = data.total;
this.tableList = data.list
if (data.list.length > 0) {
this.demand.list = data.list.map((item) => {
//:issue :agency :resi_event
item.originShow = item.origin === 'issue' ? '楼院小组' : item.origin === 'agency' ? '项目立项' : '事件上报'
@ -412,6 +437,10 @@ export default {
{ type: "operate", list: ["查看"] },
];
});
} else {
this.demand.list = []
}
} else {
this.$message.error(msg);
}
@ -446,6 +475,7 @@ export default {
cptTb,
screenEchartsFrame,
projectInfo,
ScreenLoading,
},
watch: {

19
src/views/modules/visual/components/screen-echarts-frame/index.vue

@ -1,15 +1,22 @@
<template>
<div class="screenEchartsFrame"
<div>
<div v-show="!noData"
class="screenEchartsFrame"
ref="screenEchartsFrame"></div>
<screen-nodata v-if="noData"
class="nodata"></screen-nodata>
</div>
</template>
<script>
import * as echarts from 'echarts';
import ScreenNodata from "@/views/modules/visual/components/screen-nodata";
export default {
name: 'screen-echarts-frame',
data () {
return {
myChart: ''
myChart: '',
noData: false,
}
},
props: {
@ -28,6 +35,10 @@ export default {
if (this.myChart) this.myChart.dispose()
},
watch: {},
components: {
ScreenNodata,
},
methods: {
initChart () {
@ -43,6 +54,10 @@ export default {
handleClick (fun) {
this.myChart.on('click', fun);
},
//
setNoData (nodata) {
this.noData = nodata
},
//
highLight (index) {

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

@ -116,7 +116,9 @@
<div class="echarts-container">
<div id="echartsBox" class="echarts-boxs"></div>
</div>
<div class="ecahrts-button">
<el-button type="warning" size="small" @click="handleExport">导出</el-button>
</div>
<div class="warning-box-bottom">
<screen-table
:headerList="headerList"
@ -153,6 +155,7 @@ import screenTable from "../components/screen-table/index";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
import dialogInfo from './dialogInfo'
import axios from 'axios'
import * as echarts from 'echarts';
export default {
@ -179,7 +182,8 @@ export default {
{ title: "服务方", coulmn: 'serviceName' },
{ title: "服务时间", coulmn: 'wantServiceTime' },
],
categoryList: {},
categoryList: [],
categoryCode: '',
timeRange: '',
tableData: [
// [1,'','','2',''],
@ -336,7 +340,8 @@ export default {
console.log('yData', yData)
this.initCharts(xData, yData)
this.getServiceList(orgId, orgType, data.categoryList[0].categoryCode)
this.categoryCode = categoryList[0].categoryCode
this.getServiceList(orgId, orgType, categoryList[0].categoryCode)
} else {
}
this.visibleLoading = false;
@ -414,6 +419,44 @@ export default {
this.$message.error(msg)
}
},
handleExport() {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
let params = {
orgId: _arr[0],
orgType: orgType,
categoryCode: this.categoryCode,
startDateId: this.timeRange && this.timeRange[0] || '',
endDateId: this.timeRange && this.timeRange[1] || ''
}
// .post('epmetuser/icresiuser/exportExcel', params)
axios({
url: window.SITE_CONFIG['apiURL'] + '/heart/userdemand/analysis-export',
// url: 'epmetuser/icresiuser/exportExcel',
method: 'post',
data: params,
responseType: 'blob'
})
.then(res => {
console.log('resllll', res)
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
})
.catch((err) => {
console.log('获取导出情失败', err)
return this.$message.error('网络错误')
})
},
getTreeData(data){
if (!Array.isArray(data)) return []
let arr = data.map(item => {
@ -468,6 +511,7 @@ export default {
if (item.categoryName == params.name) code = item.categoryCode
})
if (code) {
this.categoryCode = code
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getServiceList(_arr[0], orgType, code)
@ -508,6 +552,9 @@ export default {
scoped
></style>
<style lang="scss" scoped>
.warning-box-bottom {
margin-top: 10px;
}
.card-title {
display: flex;
align-items: center;
@ -723,5 +770,14 @@ export default {
height: 400px;
}
.ecahrts-button {
width: 100%;
text-align: right;
::v-deep .el-button--warning {
background: linear-gradient(90deg, #0863EA, #3B9FFC);
border: 0;
}
}
</style>

Loading…
Cancel
Save