-
加载中
@@ -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 = []
+ }
+
}
+ 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.title,
+ status: subItem.status,
+ statusName:
+ subItem.status == "pending" ? "待处理" : "结案",
+ projectId: subItem.projectId,
+ };
+ }),
+ };
+ });
+ }
- 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;
+ 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();
},
},
};
diff --git a/src/views/modules/visual/communityGovern/typeAnalyze.vue b/src/views/modules/visual/communityGovern/typeAnalyze.vue
index a78d2c245..c807e5634 100644
--- a/src/views/modules/visual/communityGovern/typeAnalyze.vue
+++ b/src/views/modules/visual/communityGovern/typeAnalyze.vue
@@ -31,10 +31,15 @@
@@ -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,23 +419,28 @@ 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' ? '项目立项' : '事件上报'
- //状态:待处理 pending,已结案closed
- item.statusShow = item.status === 'pending' ? '待处理' : '已结案'
- return [
- { type: "index" },
- item.projectCode ? item.projectCode : '',
- item.categoryNames.join(','),
- item.originShow ? item.originShow : '',
- item.gridName ? item.gridName : '',
- item.statusShow ? item.statusShow : '',
- item.title ? item.title : '',
- item.time ? item.time : '',
- { type: "operate", 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' ? '项目立项' : '事件上报'
+ //状态:待处理 pending,已结案closed
+ item.statusShow = item.status === 'pending' ? '待处理' : '已结案'
+ return [
+ { type: "index" },
+ item.projectCode ? item.projectCode : '',
+ item.categoryNames.join(','),
+ item.originShow ? item.originShow : '',
+ item.gridName ? item.gridName : '',
+ item.statusShow ? item.statusShow : '',
+ item.title ? item.title : '',
+ item.time ? item.time : '',
+ { type: "operate", list: ["查看"] },
+ ];
+ });
+ } else {
+ this.demand.list = []
+ }
+
} else {
this.$message.error(msg);
}
@@ -446,6 +475,7 @@ export default {
cptTb,
screenEchartsFrame,
projectInfo,
+ ScreenLoading,
},
watch: {
diff --git a/src/views/modules/visual/components/screen-echarts-frame/index.vue b/src/views/modules/visual/components/screen-echarts-frame/index.vue
index e9503385c..e34d34df6 100644
--- a/src/views/modules/visual/components/screen-echarts-frame/index.vue
+++ b/src/views/modules/visual/components/screen-echarts-frame/index.vue
@@ -1,15 +1,22 @@
-
+