Browse Source

Merge branch 'yantai_dev' into yantai_master

jly/task002
tianq 3 years ago
parent
commit
85f3bed16d
  1. 7
      src/views/modules/census/census-accountActiveList.vue
  2. 96
      src/views/modules/census/census-accountList.vue
  3. 18
      src/views/modules/census/census-houseList.vue
  4. 1
      src/views/modules/census/census-nineList.vue
  5. 5
      src/views/modules/census/census-orgStatusList.vue
  6. 55
      src/views/modules/census/census-residentList.vue
  7. 116
      src/views/modules/census/chart.vue
  8. 18
      src/views/modules/communityParty/dyhx/party.vue

7
src/views/modules/census/census-accountActiveList.vue

@ -67,10 +67,10 @@
:height="maxTableHeight"
>
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column prop="agencyName" align="center" label="组织名称" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="loginCount" label="登录次数" width="110" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="agencyName" align="center" width="200" label="组织名称" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="loginCount" label="登录次数" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="accountActivityCount" label="活跃账号数" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="accountCount" align="center" width="110" label="总账号数" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="accountCount" align="center" label="总账号数" :show-overflow-tooltip="true"></el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@ -228,6 +228,7 @@ export default {
if (typeof this.formData[n] == 'object') this.formData[n] = [];
else this.formData[n] = '';
}
this.handleSearch();
},
handleSizeChange(val) {
this.pageSize = val;

96
src/views/modules/census/census-accountList.vue

@ -15,7 +15,7 @@
:show-all-levels="false"
/>
</el-form-item>
<el-form-item label="上报时间" prop="startDate">
<el-form-item label="登录时间" prop="startDate">
<el-date-picker
v-model="formData.startDate"
:picker-options="startPickerOptions"
@ -123,12 +123,12 @@
<el-dialog :title="title" :visible.sync="dialogVisible" v-if="dialogVisible" width="50%" :before-close="handleClose">
<div
style=" text-align: right;
margin-top: -30px;
margin-top: -10px;
margin-bottom: 10px;"
>
<el-button size="small" class="diy-button--output" @click="handleExport()">导出</el-button>
<el-button size="small" v-if="orgType == 'community'" class="diy-button--output" @click="handleExport()">导出</el-button>
</div>
<el-table :data="tableDataView" border v-loading="tableLoading2" :header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" class="table" style="width: 100%">
<el-table :data="tableDataView" border v-loading="tableLoading2" :header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" class="table" style="width: 100%;">
<template v-if="orgType == 'community'">
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column prop="agencyName" align="center" label="社区名称" :show-overflow-tooltip="true"></el-table-column>
@ -159,6 +159,7 @@
:total="total"
></el-pagination>
</el-dialog>
</div>
</template>
@ -281,6 +282,7 @@ export default {
if (typeof this.formData[n] == 'object') this.formData[n] = [];
else this.formData[n] = '';
}
this.handleSearch();
},
async handleExport() {
const url = '/gov/org/staffLoginLog/community-count-export';
@ -375,7 +377,7 @@ export default {
endDate: this.formData.endDate,
isPage: true,
pageNo: this.pageNo,
pageSize: this.pageSize
pageSize: this.pageSize,
};
this.tableLoading2 = true;
const { data, code, msg } = await requestPost(url, param);
@ -453,7 +455,7 @@ export default {
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
pageSize:10,
pageNo,
isPage: true,
dataRange: 'exclude_zero',
@ -476,6 +478,7 @@ export default {
},
async getsubData() {
this.$refs.pieChart.showLoading();
// staffLoginLog/streetTotal
let url = '/gov/org/staffLoginLog/sub-count';
let param = {
orgId: this.formData.orgId,
@ -494,6 +497,62 @@ export default {
this.$message.error(msg);
}
},
async getPiesubData(orgId, orgType) {
// staffLoginLog/streetTotal
console.log(orgType);
let url = '';
if (orgType == 'street') {
url = '/gov/org/staffLoginLog/community-count';
} else {
url = '/gov/org/staffLoginLog/streetTotal';
}
this.dialogVisible = true;
let param = {};
console.log('orgType', orgType);
// district street community
// 1 2 3 4
switch (this.orgType) {
case 'district':
this.title = '区县级账号登录情况';
// url = '/gov/org/staffLoginLog/district-count';
break;
case 'street':
this.title = '镇街级账号登录情况';
// url = '/gov/org/staffLoginLog/street-count';
break;
case 'community':
this.title = '社区级账号登录情况';
// url = '/gov/org/staffLoginLog/community-count';
break;
}
param = {
orgId: orgId,
level: orgType,
startDate: this.formData.startDate,
endDate: this.formData.endDate,
isPage: true,
pageNo: this.pageNo,
pageSize: this.pageSize
};
this.tableLoading2 = true;
const { data, code, msg } = await requestPost(url, param);
this.tableLoading2 = false;
if (code === 0) {
console.log('ddd data', data);
this.dialogVisible = true;
this.total = data.total || 0;
this.tableDataView = data.list
? data.list.map(item => {
return item;
})
: [];
} else {
this.$message.error(msg);
}
},
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem('pageSize', val);
@ -590,8 +649,8 @@ export default {
color: '#F3F7FD'
}
},
min:0,
max:1000,
min: 0,
max: 1000
},
series: [
{
@ -600,17 +659,19 @@ export default {
type: 'bar',
itemStyle: {
color: 'rgb(33, 149, 254)',
borderRadius: [4, 4, 0, 0],
borderRadius: [4, 4, 0, 0]
}
}
]
};
if (chartData.data.length>0) {
this.pieOption.yAxis.max=null
if (chartData.data.length > 0) {
this.pieOption.yAxis.max = null;
}
this.$refs.pieChart.setOption(this.pieOption);
},
handelClickMyPei(param) {
console.log('param', param);
if (param.data.level != 'community') {
if (param.data.level == 'district') {
this.orgType = 'street';
@ -619,11 +680,8 @@ export default {
this.orgType = 'community';
}
this.orgId = param.data.id;
this.orgName = param.data.name;
this.pageNo = 1;
this.showNext();
this.dialogVisible = true;
this.getPiesubData(param.data.id, param.data.level);
}
}
}
@ -686,8 +744,8 @@ export default {
}
}
}
.div_table{
padding: 30px!important;
.div_table {
padding: 30px !important;
}
.div_table_title {
margin-top: -10px;
@ -718,5 +776,7 @@ export default {
flex: 1;
}
}
/deep/.el-table::before {
z-index: inherit;
}
</style>

18
src/views/modules/census/census-houseList.vue

@ -62,10 +62,10 @@
<div class="flex1">
<div class="box">
<div class="legend">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartData.data" @click="handleClickItem(item)">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartDataData" @click="handleClickItem(item)">
<div class="kuai" :style="{ backgroundColor: color1[index] }"></div>
<div class="content">
<div class="name">{{ index }}{{ item.name }}</div>
<div class="name">{{ item.name }}</div>
<div class="num">{{ item.value }}</div>
<div class="unit" :style="{ color: color1[index] }">{{ item.radio }}%</div>
</div>
@ -91,7 +91,7 @@
<div class="flex1">
<div class="box">
<div class="legend2">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartData2.data" @click="handleClickItem2(item)">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartData2Data" @click="handleClickItem2(item)">
<div class="kuai" v-if="item.name == '自住'"><img src="../../../assets/img/census/自住.png" /></div>
<div class="kuai" v-if="item.name == '出租'"><img src="../../../assets/img/census/出租.png" /></div>
<div class="kuai" v-if="item.name == '闲置'"><img src="../../../assets/img/census/闲置.png" /></div>
@ -242,7 +242,9 @@ export default {
orgId: '',
purpose: '',
rentFlag: '',
orgIdPath: ''
orgIdPath: '',
chartDataData:[],
chartData2Data:[]
};
},
computed: {
@ -276,6 +278,7 @@ export default {
this.orgId = this.optionData.agencyId;
this.orgIdPath = this.optionData.orgIdPath;
this.orgType = this.optionData.level;
this.handleSearch();
},
show(row) {
this.dialogVisible = true;
@ -412,7 +415,8 @@ export default {
radio: item.count == 0 ? '0' : ((item.count / this.pieData.total) * 100).toFixed(2)
};
});
this.chartDataData=this.chartData.data ;
this.$forceUpdate();
this.iniPieChart(this.chartData);
},
setPieData2() {
@ -432,7 +436,8 @@ export default {
radio: item.count == 0 ? '0' : ((item.count / this.pieData2.total) * 100).toFixed(2)
};
});
this.chartData2Data=this.chartData2.data ;
this.$forceUpdate();
this.iniPieChart2(this.chartData2);
},
//
@ -954,5 +959,4 @@ export default {
}
}
}
</style>

1
src/views/modules/census/census-nineList.vue

@ -218,6 +218,7 @@ export default {
else this.formData[n] = '';
}
this.orgType = '';
this.handleSearch();
},
show(row) {
this.dialogVisible = true;

5
src/views/modules/census/census-orgStatusList.vue

@ -113,13 +113,13 @@
</el-col>
</el-row>
</div>
<el-dialog :title="title" :visible.sync="dialogVisible" v-if="dialogVisible" width="30%" :before-close="handleClose">
<el-dialog :title="title" :visible.sync="dialogVisible" v-if="dialogVisible" width="50%" :before-close="handleClose">
<el-table :data="tableDataView" border v-loading="tableLoading2" :header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" class="table" style="width: 100%">
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column prop="name" align="center" label="社区名称" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="streeName" label="所属街道" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="districtName" label="所属区县" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="createTime" align="center" width="110" label="开通时间" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="createTime" align="center" width="200" label="开通时间" :show-overflow-tooltip="true"></el-table-column>
</el-table>
<el-pagination
@ -260,6 +260,7 @@ export default {
if (typeof this.formData[n] == 'object') this.formData[n] = [];
else this.formData[n] = '';
}
this.handleSearch();
},
handleSearch(val) {
this.getTableData();

55
src/views/modules/census/census-residentList.vue

@ -40,7 +40,7 @@
<div class="flex1">
<div class="box">
<div class="legend">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartData.data" @click="handleClickItem(item)">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartDataData" @click="handleClickItem(item)">
<div class="kuai" :style="{ backgroundColor: color[index] }"></div>
<div class="content">
<div class="name">{{ item.name }}</div>
@ -69,7 +69,7 @@
<div class="flex1">
<div class="box">
<div class="legend">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartData2.data" @click="handleClickItem2(item)">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartData2Data" @click="handleClickItem2(item)">
<div class="kuai" :style="{ backgroundColor: color[index] }"></div>
<div class="content">
<div class="name">{{ item.name }}</div>
@ -201,7 +201,7 @@ export default {
pieInitState2: false,
pieOption: [],
pieOption2: [],
color: ['#3C94FE', '#A17AFA', '#A19FFF', '#22C1C3', '#6FC364', '#F0D915', '#FEB349', '#FE6252', '#F44230', '#5DC7F0'],
color: ['#3C94FE', '#F0D915', '#6FC364', '#FEB349', '#F44230', '#A17AFA', '#22C1C3', '#A19FFF', '#FE6252', '#5DC7F0'],
chartData: [],
chartData2: [],
pieData: [],
@ -211,7 +211,9 @@ export default {
code: '',
pieDatatotal: 0,
pieDatatotal2: 0,
codeType: 'education'
codeType: 'education',
chartDataData: [],
chartData2Data: []
};
},
computed: {
@ -246,6 +248,7 @@ export default {
else this.formData[n] = '';
}
this.orgType = '';
this.handleSearch();
},
show(row) {
this.dialogVisible = true;
@ -361,34 +364,35 @@ export default {
}
},
setPieData() {
let data = [...this.pieData];
this.pieDatatotal = data
.map(item => item.totalResi)
.reduce(function(prev, cur, index, arr) {
console.log(prev, cur, index);
return prev + cur;
});
let data = [...this.pieData.list];
// this.pieDatatotal = data
// .map(item => item.totalResi)
// .reduce(function(prev, cur, index, arr) {
// console.log(prev, cur, index);
// return prev + cur;
// });
this.chartData.name = data.map(item => item.codeName);
this.chartData.data = data.map(item => {
return {
value: item.totalResi,
name: item.codeName,
code: item.code,
radio: item.totalResi == 0 ? '0' : ((item.totalResi / this.pieDatatotal) * 100).toFixed(2)
radio: item.totalResi == 0 ? '0' : ((item.totalResi / this.pieData.total) * 100).toFixed(2)
};
});
this.chartDataData = this.chartData.data;
console.log('chartData', this.chartData);
this.iniPieChart(this.chartData);
},
setPieData2() {
let data = [...this.pieData2];
let data = [...this.pieData2.list];
this.pieDatatotal2 = data
.map(item => item.totalResi)
.reduce(function(prev, cur, index, arr) {
console.log(prev, cur, index);
return prev + cur;
});
// this.pieDatatotal2 = data
// .map(item => item.totalResi)
// .reduce(function(prev, cur, index, arr) {
// console.log(prev, cur, index);
// return prev + cur;
// });
this.chartData2.name = data.map(item => item.codeName);
this.chartData2.data = data.map(item => {
@ -396,10 +400,10 @@ export default {
value: item.totalResi,
name: item.codeName,
code: item.code,
radio: item.totalResi == 0 ? '0' : ((item.totalResi / this.pieDatatotal2) * 100).toFixed(2)
radio: item.totalResi == 0 ? '0' : ((item.totalResi / this.pieData2.total) * 100).toFixed(2)
};
});
this.chartData2Data = this.chartData2.data;
console.log('chartData', this.chartData2);
this.iniPieChart2(this.chartData2);
},
@ -419,7 +423,7 @@ export default {
},
color: this.color,
title: {
text: this.pieDatatotal,
text: this.pieData.total,
subtext: '总数',
x: 'center',
y: 'center',
@ -529,7 +533,7 @@ export default {
},
color: this.color,
title: {
text: this.pieDatatotal2,
text: this.pieData2.total,
subtext: '总数',
x: 'center',
y: 'center',
@ -840,7 +844,9 @@ export default {
}
.div_table {
padding: 30px !important;
.table{margin-top: 16px!important;}
.table {
margin-top: 16px !important;
}
}
.div_table_title {
margin-top: -10px;
@ -881,5 +887,4 @@ export default {
}
}
}
</style>

116
src/views/modules/census/chart.vue

@ -1,70 +1,70 @@
<template>
<div class="screenEchartsFrame"
ref="screenEchartsFrame"></div>
<div class="screenEchartsFrame" ref="screenEchartsFrame"></div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'screen-echarts-frame',
data () {
data() {
return {
myChart: ''
}
};
},
props: {
chartMethod: {
type: Function
}
},
mounted () {
this.initChart()
mounted() {
this.initChart();
window.onresize = () => {
this.myChart.resize()
}
this.myChart.resize();
};
},
beforeDestroy () {
beforeDestroy() {
// echarts
if (this.myChart) this.myChart.dispose()
if (this.myChart) this.myChart.dispose();
},
watch: {},
methods: {
initChart () {
initChart() {
this.$nextTick(() => {
const dom = this.$refs.screenEchartsFrame
this.myChart = echarts.init(dom)
const dom = this.$refs.screenEchartsFrame;
this.myChart = echarts.init(dom);
// this.myChart.setOption(this.chartMethod())
this.$emit('myChartMethod', this.myChart)
})
this.$emit('myChartMethod', this.myChart);
});
},
// option
setOption (option) {
this.myChart.setOption(option)
let than = this
this.myChart.on('click',function(param){
than.$emit('handelClickMyPei',param)
})
setOption(option) {
this.myChart.setOption(option);
let than = this;
this.myChart.off('click');
this.myChart.on('click', function(param) {
than.$emit('handelClickMyPei', param);
});
},
// option
getOption () {
getOption() {
if (this.myChart) {
return this.myChart.getOption()
return this.myChart.getOption();
} else {
return null
return null;
}
},
//
resize () {
resize() {
if (this.myChart) {
this.myChart.resize()
this.myChart.resize();
}
},
clear () {
clear() {
if (this.myChart) {
this.myChart.clear()
this.myChart.clear();
}
},
showLoading () {
showLoading() {
if (this.myChart) {
this.$nextTick(() => {
this.myChart.showLoading({
@ -73,86 +73,86 @@ export default {
textColor: '#29cdff',
maskColor: 'rgba(255, 255, 255, 0)',
zlevel: 0
})
})
});
});
}
},
hideLoading () {
hideLoading() {
if (this.myChart) {
this.myChart.hideLoading()
this.myChart.hideLoading();
}
},
// 使
tooltipAnimate (chart, length) {
tooltipAnimate(chart, length) {
//
this.timeTicket && clearInterval(this.timeTicket)
const count = 0
this.timeTicket && clearInterval(this.timeTicket);
const count = 0;
//
this._action(chart, count, length)
this._action(chart, count, length);
chart && //
chart.on('mouseover', params => {
this._cleanAction(chart, params)
})
this._cleanAction(chart, params);
});
//
chart &&
chart.on('mouseout', () => {
this._action(chart, count, length)
})
this._action(chart, count, length);
});
},
// tooltipaction
_action (chart, count, length) {
this.timeTicket && clearInterval(this.timeTicket)
_action(chart, count, length) {
this.timeTicket && clearInterval(this.timeTicket);
this.timeTicket = setInterval(() => {
if (!chart) {
clearInterval(this.timeTicket)
return
clearInterval(this.timeTicket);
return;
}
chart &&
chart.dispatchAction({
type: 'downplay',
seriesIndex: 0
})
});
chart &&
chart.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: count % length
})
});
chart &&
chart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: count % length
})
count++
}, 1000 * 3)
});
count++;
}, 1000 * 3);
},
_cleanAction (chart, params) {
this.timeTicket && clearInterval(this.timeTicket)
_cleanAction(chart, params) {
this.timeTicket && clearInterval(this.timeTicket);
if (!chart) {
clearInterval(this.timeTicket)
return
clearInterval(this.timeTicket);
return;
}
chart &&
chart.dispatchAction({
type: 'downplay',
seriesIndex: 0
})
});
chart &&
chart.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: params.dataIndex
})
});
chart &&
chart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: params.dataIndex
})
});
}
}
}
};
</script>
<style lang="scss" scoped>

18
src/views/modules/communityParty/dyhx/party.vue

@ -37,7 +37,7 @@
<div class="flex1">
<div class="box">
<div class="legend">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartData.data" @click="handleClickItem(item)">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartDataData" @click="handleClickItem(item)">
<div class="kuai" :style="{ backgroundColor: color[index] }"></div>
<div class="content">
<div class="name">{{ item.name }}</div>
@ -103,7 +103,7 @@
<div class="flex1">
<div class="box">
<div class="legend">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartData2.data" @click="handleClickItem(item)">
<div class="legend-row" :key="item.name" v-for="(item, index) in chartData2Data" @click="handleClickItem(item)">
<div class="kuai" :style="{ backgroundColor: color[index] }"></div>
<div class="content">
<div class="name">{{ item.name }}</div>
@ -218,7 +218,8 @@ export default {
pieInitState2: false,
pieOption: [],
pieOption2: [],
color: ['#3C94FE', '#A17AFA', '#A19FFF', '#22C1C3', '#6FC364', '#F0D915', '#FEB349', '#FE6252', '#F44230', '#5DC7F0'],
color: ['#3C94FE', '#F0D915', '#6FC364', '#FEB349', '#F44230', '#A17AFA', '#22C1C3', '#A19FFF', '#FE6252', '#5DC7F0'],
// color: ['#3C94FE', '#A17AFA', '#A19FFF', '#22C1C3', '#6FC364', '#F0D915', '#FEB349', '#FE6252', '#F44230', '#5DC7F0'],
chartData: [],
chartData2: [],
pieData: [],
@ -268,7 +269,9 @@ export default {
pieEduOptions: null,
formData: {
orgId: ''
}
},
chartDataData: [],
chartData2Data: []
};
},
computed: {
@ -300,6 +303,7 @@ export default {
if (typeof this.formData[n] == 'object') this.formData[n] = [];
else this.formData[n] = '';
}
this.handleSearch();
},
handleChangeAgency(val) {
let obj = this.$refs['myCascader'].getCheckedNodes()[0].data;
@ -669,7 +673,7 @@ export default {
console.log(prev, cur, index);
return prev + cur;
});
console.log('this.pieDatatotal',this.pieDatatotal);
console.log('this.pieDatatotal', this.pieDatatotal);
this.chartData.name = data.map(item => item.value);
this.chartData.data = data.map(item => {
return {
@ -679,6 +683,7 @@ export default {
radio: item.radio
};
});
this.chartDataData = this.chartData.data;
console.log('chartData', this.chartData);
this.$forceUpdate();
this.initAgeCharts(this.chartData);
@ -703,7 +708,7 @@ export default {
radio: item.radio
};
});
this.chartData2Data = this.chartData2.data;
console.log('chartData', this.chartData2);
this.$forceUpdate();
this.initEduCharts(this.chartData2);
@ -1024,5 +1029,4 @@ export default {
}
}
}
</style>

Loading…
Cancel
Save