Browse Source

Merge branch 'prod' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into prod

shibei_master
dai 4 years ago
parent
commit
48e2f4796b
  1. 19
      src/assets/scss/modules/visual/distributionAnalyze.scss
  2. 14
      src/views/modules/communityParty/regionalParty/activitys.vue
  3. 13
      src/views/modules/communityParty/regionalParty/activitysForm.vue
  4. 98
      src/views/modules/visual/communityGovern/distributionAnalyze.vue

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

@ -28,7 +28,7 @@
display: block; display: block;
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 20px;
.second-title-label { .second-title-label {
position: relative; position: relative;
padding-left: 40px; padding-left: 40px;
@ -117,11 +117,11 @@
flex-direction: row; flex-direction: row;
// flex-wrap: wrap; // flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
height: calc(100vh - 230px); height: calc(100vh - 190px);
.g-l { .g-l {
width: 40%; width: 40%;
height: calc(100vh - 240px); height: calc(100vh - 200px);
.echart-line { .echart-line {
margin-left: 30px; margin-left: 30px;
@ -135,16 +135,25 @@
width: 100%; width: 100%;
height: 90%; height: 90%;
} }
> img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
} }
} }
.g-r { .g-r {
width: 55%; width: 55%;
height: calc(100vh - 250px); height: calc(100vh - 210px);
.r-map { .r-map {
position: relative; position: relative;
height: calc(100vh - 250px - 50px); height: calc(100vh - 210px - 50px);
width: 100%; width: 100%;
.map { .map {

14
src/views/modules/communityParty/regionalParty/activitys.vue

@ -148,6 +148,16 @@
label="活动时间" label="活动时间"
width="230"> width="230">
</el-table-column> </el-table-column>
<el-table-column prop="activityTime"
header-align="center"
align="center"
label="来源"
width="100">
<template slot-scope="scope">
<span v-if="scope.row.actId">小程序</span>
<span v-else>管理平台</span>
</template>
</el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
fixed="right" fixed="right"
@ -161,7 +171,8 @@
style="color:#1C6AFD;text-decoration: underline;" style="color:#1C6AFD;text-decoration: underline;"
size="small" size="small"
@click="handleDetail(scope.row)">查看</el-button> @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" <el-button v-if="!scope.row.actId"
type="text"
style="color:#00A7A9;text-decoration: underline;" style="color:#00A7A9;text-decoration: underline;"
size="small" size="small"
@click="handleEdit(scope.row)">修改</el-button> @click="handleEdit(scope.row)">修改</el-button>
@ -199,6 +210,7 @@
@dialogCancle="addFormCancle" @dialogCancle="addFormCancle"
@dialogOk="addFormOk"></activitys-form> @dialogOk="addFormOk"></activitys-form>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="detailShow" <el-dialog :visible.sync="detailShow"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"

13
src/views/modules/communityParty/regionalParty/activitysForm.vue

@ -244,6 +244,8 @@ export default {
} }
this.endLoading() this.endLoading()
}, },
// //
@ -258,7 +260,16 @@ export default {
if (code === 0) { if (code === 0) {
this.formData = data this.formData = data
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude)) console.log(this.formData.content)
let style_img = "style='width:50px;height:40px;' "
if (this.formData.content) {
this.formData.content = this.formData.content.replace(/<img/g, "<img style='width:200px;height:120px;'")
// let array=this.formData.content.split('<img')
}
console.log(this.formData.content)
map.setCenter(new TMap.LatLng(parseFloat(this.formData.latitude), parseFloat(this.formData.longitude)))
this.setMarker(this.formData.latitude, this.formData.longitude) this.setMarker(this.formData.latitude, this.formData.longitude)
} else { } else {
this.$message.error(msg) this.$message.error(msg)

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

@ -4,9 +4,9 @@
<div class="card-title"> <div class="card-title">
<img src="@/assets/img/shuju/title-tip.png" /> <img src="@/assets/img/shuju/title-tip.png" />
<span>项目分布分析</span> <span>项目分布分析</span>
</div>
<div class="second-title"> <div class="second-title">
<div class="second-title-label">不同事件类别在不同时间段的变化和分布</div>
<div class="second-select cascader"> <div class="second-select cascader">
<el-cascader class="customer_cascader" <el-cascader class="customer_cascader"
@ -31,24 +31,27 @@
</div> </div>
</div> </div>
</div>
</div> </div>
<div class="g-cpt-resi"> <div class="g-cpt-resi">
<div class="g-l"> <div class="g-l">
<screen-echarts-frame class="echart-line" <screen-echarts-frame v-if="!showNoData"
class="echart-line"
@myChartMethod="lineInitOk" @myChartMethod="lineInitOk"
ref="lineChart"></screen-echarts-frame> ref="lineChart"></screen-echarts-frame>
<div v-else
class="echart-line">
<img src="../../../../assets/img/modules/visual/noData.png" />
</div>
<!-- <div class="table-status" <!-- <div class="table-status"
v-if="loading"> v-if="loading">
<screen-loading>加载中</screen-loading> <screen-loading>加载中</screen-loading>
</div> </div>
<div class="table-status" <div class="table-status"
v-if="lineList.length == 0 && !loading"> v-if="lineList.length == 0 && !loading">
<div class="no-data">
<img src="../../../../assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div> --> </div> -->
</div> </div>
@ -208,6 +211,7 @@ export default {
await this.getAgencylist()// await this.getAgencylist()//
await nextTick(500) await nextTick(500)
await this.loadOrgData() await this.loadOrgData()
await this.getApiData(); await this.getApiData();
}, },
@ -237,6 +241,15 @@ export default {
if (month2 < 10) { if (month2 < 10) {
month2 = '0' + month2; month2 = '0' + month2;
} }
if (month < 10) {
month = '0' + month;
}
if (day < 10) {
day = '0' + day;
}
if (day2 < 10) {
day2 = '0' + day2;
}
var t2 = year2 + '-' + month2 + '-' + day2; var t2 = year2 + '-' + month2 + '-' + day2;
var t1 = year + '-' + month + '-' + day; var t1 = year + '-' + month + '-' + day;
// let t3 = formate(t2, style); // let t3 = formate(t2, style);
@ -250,9 +263,19 @@ export default {
}, },
async getApiData () { async getApiData () {
await this.getLineChart()
await this.getLine()
await this.loadMapData(); await this.loadMapData();
this.assignData()
},
assignData () {
if (!this.showNoData) {
this.getLine()
}
this.loadMap()
this.isfirstInit = false
}, },
// //
@ -351,17 +374,17 @@ export default {
if (code === 0) { if (code === 0) {
this.legendArray = [] this.legendArray = []
if (data.under) { if (data.under === 0 || data.under) {
this.under = data.under this.under = data.under
this.legendArray.push( this.legendArray.push(
{ {
color: this.colorArray[0], color: this.colorArray[0],
name: data.under + '以下' name: data.under + '以下'
} }
) )
} }
if (data.above) { if (data.above === 0 || data.above) {
this.above = data.above this.above = data.above
this.legendArray.push( this.legendArray.push(
{ {
@ -372,7 +395,7 @@ export default {
this.legendArray.push( this.legendArray.push(
{ {
color: this.colorArray[2], color: this.colorArray[2],
name: data.above + '以上' name: data.above + '以上'
} }
) )
} }
@ -393,12 +416,12 @@ export default {
item.latitude = agencyItem.latitude item.latitude = agencyItem.latitude
item.coordinates = agencyItem.coordinates item.coordinates = agencyItem.coordinates
if (this.under) { if (this.under === 0 || this.under) {
if (item.count < this.under || item.count === this.under) { if (item.count < this.under || item.count === this.under) {
item.color = this.colorArray[0] item.color = this.colorArray[0]
item.fillColor = this.colorFillArray[0] item.fillColor = this.colorFillArray[0]
} else { } else {
if (this.above) { if (this.above === 0 || this.above) {
if (item.count > this.under && item.count < this.above) { if (item.count > this.under && item.count < this.above) {
item.color = this.colorArray[1] item.color = this.colorArray[1]
item.fillColor = this.colorFillArray[1] item.fillColor = this.colorFillArray[1]
@ -409,7 +432,6 @@ export default {
} }
} }
} }
break break
} }
@ -419,8 +441,7 @@ export default {
}); });
console.log(this.mapList) console.log(this.mapList)
this.loadMap()
this.isfirstInit = false
} else { } else {
this.$message.error(msg); this.$message.error(msg);
@ -445,7 +466,7 @@ export default {
}, },
getLine () { getLine () {
if (this.lineInitState) { if (this.lineInitState) {
this.getLineChart() this.assignLineChart()
} else { } else {
setTimeout(() => { setTimeout(() => {
this.getLine() this.getLine()
@ -454,9 +475,13 @@ export default {
}, },
// 线 // 线
async getLineChart () { async getLineChart () {
if (!this.showNoData) {
this.$refs.lineChart.clear() this.$refs.lineChart.clear()
const _that = this
this.$refs.lineChart.showLoading() this.$refs.lineChart.showLoading()
}
const _that = this
const url = "/gov/project/project/projectdistributionanalysisleft"; const url = "/gov/project/project/projectdistributionanalysisleft";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/projectdistributionanalysisleft"; // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/projectdistributionanalysisleft";
let params = { let params = {
@ -466,16 +491,30 @@ export default {
}; };
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
if (!this.showNoData) {
this.$refs.lineChart.hideLoading() this.$refs.lineChart.hideLoading()
}
if (code === 0) { if (code === 0) {
// pieChart
this.lineOption = lineOption()
if (data && data.length > 0) { if (data && data.length > 0) {
this.lineList = data this.lineList = data
this.showNoData = false
} else {
this.lineList = []
this.showNoData = true
}
this.loadCategoryData() this.loadCategoryData()
} else {
this.$message.error(msg);
}
},
assignLineChart () {
// pieChart
this.lineOption = lineOption()
this.$refs.lineChart.setOption(this.lineOption, true) this.$refs.lineChart.setOption(this.lineOption, true)
this.$refs.lineChart.setOption({ this.$refs.lineChart.setOption({
@ -483,16 +522,6 @@ export default {
legend: { data: this.legend }, legend: { data: this.legend },
series: this.series series: this.series
}, true) }, true)
} else {
this.lineList = []
}
} else {
this.$message.error(msg);
}
}, },
//线 //线
@ -501,6 +530,9 @@ export default {
this.xaxis = [] this.xaxis = []
this.series = [] this.series = []
this.legend = [] this.legend = []
if (this.lineList.length > 0) {
let num = this.lineList[0].categoryList.length let num = this.lineList[0].categoryList.length
let dataArray = new Array(num) let dataArray = new Array(num)
@ -548,7 +580,7 @@ export default {
}); });
}
}, },
handleChangeAgency (value) { handleChangeAgency (value) {

Loading…
Cancel
Save