Commit 9050bcae authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents e5ec3eb5 524b4aa8
...@@ -48,3 +48,12 @@ export function ageRate(params) { ...@@ -48,3 +48,12 @@ export function ageRate(params) {
export function TopNationStatistic(params) { export function TopNationStatistic(params) {
return http.get(`${baseURL}/inter/statistic/TopNationStatistic`, params); return http.get(`${baseURL}/inter/statistic/TopNationStatistic`, params);
} }
//用户列表
export function peopelList(params) {
return http.get(`${baseURL}/inter/Personas/peopelList`, params);
}
//用户分析
export function userAnalysis(params) {
return http.get(`${baseURL}/inter/Personas/userAnalysis`, params);
}
<template> <template>
<div> <div>
<div :id="id" :style="{height: this.height+'px', width: this.width+'px'}"></div> <div :id="id" :style="{ height: this.height + 'px', width: this.width + 'px' }"></div>
</div> </div>
</template> </template>
<script > <script >
import * as echarts from 'echarts' import * as echarts from 'echarts'
let myChart= null let myChart = null
export default { export default {
props: { props: {
id: { id: {
type: String type: String
}, },
height:{ height: {
type: String | Number, type: String | Number,
}, },
width:{ width: {
type: String | Number, type: String | Number,
}, },
datas: Object datas: Object
}, },
data() { data() {
return { return {
} }
}, },
watch:{ watch: {
datas: function(obj){ datas: function (obj) {
if(obj){ if (obj) {
this.pieInit(obj.data) this.pieInit(obj.data, obj.nameArr)
} }
} }
}, },
methods: { methods: {
pieInit(data) { pieInit(data, nameArr) {
console.log(data)
let total = 0
data[0].value.forEach(i => {
total += parseInt(i)
})
console.log(total)
let arrType = {
yycount: '在线预约',
qhcount: '现场取号',
pjcount: '评价次数',
comcount: '意见建议',
imcount: '办不成事',
}
let arr = nameArr.map(i => {
return { name: arrType[i], max: total }
})
console.log(arr)
myChart = echarts.init(document.getElementById(this.id)) myChart = echarts.init(document.getElementById(this.id))
let option = { let option = {
radar: { radar: {
// shape: 'circle', // shape: 'circle',
indicator: [ indicator: arr
{ name: '在线预约', max: 100 },
{ name: '现场取号', max: 100 },
{ name: '个人申报', max: 100 },
{ name: '评价次数', max: 100 },
{ name: '意见建议', max: 100 },
{ name: '办不成事', max: 100 }
]
}, },
series: [ series: [
{ {
...@@ -51,15 +61,14 @@ export default { ...@@ -51,15 +61,14 @@ export default {
data: data data: data
} }
] ]
}; };
myChart.setOption(option) myChart.setOption(option)
// 让图表跟随屏幕自动的去适应 // 让图表跟随屏幕自动的去适应
window.addEventListener('resize', function () { window.addEventListener('resize', function () {
myChart.resize() myChart.resize()
}) })
} }
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style> \ No newline at end of file
\ No newline at end of file
<template> <template>
<div class="Container"> <div class="Container">
<div class="main"> <div class="main">
<div class="first_card"> <div class="first_card">
<div class="breadMenu"> <div class="breadMenu">
<Breadcrumb/> <Breadcrumb />
</div>
<div class="searchBox">
<a-select show-search placeholder="请输入群众名称搜索" style="width: 35.625rem"
:default-active-first-option="false" :show-arrow="false" :filter-option="false" allowClear
:not-found-content="null" :options="peopleArr" @search="peopelListFn"
@change="handleChange"></a-select>
<!-- <a-input v-model="peopleName" placeholder="请输入群众名称搜索" style="width: 35.625rem"></a-input> -->
<a-button type="primary" class="addclass" v-if="!btnShow" @click="startAnalysis()">开始分析</a-button>
<a-button type="primary" class="addclass" v-else @click="backBase()">返回</a-button>
</div>
</div> </div>
<div class="searchBox"> <div class="content_view">
<a-input v-model="peopleName" placeholder="请输入群众名称搜索" style="width: 35.625rem"></a-input> <router-view keep-alive />
<a-button type="primary" class="addclass" @click="startAnalysis()">开始分析</a-button>
<a-button type="primary" class="addclass" v-if="btnShow" @click="backBase()">返回</a-button>
</div> </div>
</div> </div>
<div class="content_view">
<router-view />
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import Breadcrumb from "./breadcrumb/index.vue"; import Breadcrumb from "./breadcrumb/index.vue";
export default { import { peopelList } from '@/api/userPortrait'
components:{ export default {
components: {
Breadcrumb Breadcrumb
}, },
data() { data() {
return { return {
// 搜索框 // 搜索框
peopleName: '', peopleId: '',
btnShow: false, peopleArr: [],
} btnShow: false,
}
}, },
methods:{ methods: {
//输入框回显
peopelListFn(val) {
this.peopleArr = []
peopelList({ siteid: localStorage.getItem('siteId'), name: val }).then(res => {
if (res.code == 1) {
res.data.forEach(r => {
this.peopleArr.push({
value: r.id,
label: r.idcard_Name + '    ' + r.idcard_IDCardNo,
});
});
}
})
},
handleChange(val) {
this.peopleId = val;
},
startAnalysis() { startAnalysis() {
this.peopleName= '' if (this.peopleId) {
this.$router.push({ path: 'portrayalAnalysis'}) this.$router.push({ path: 'portrayalAnalysis', query: { peopleid: this.peopleId } })
this.btnShow= true this.btnShow = true
} else {
this.$message.warning('请选择群众后搜索')
}
}, },
backBase() { backBase() {
this.peopleName= '' this.peopleArr = []
this.$router.push({ path: 'portrayalBase'}) this.$router.push({ path: 'portrayalBase' })
this.btnShow= false this.btnShow = false
}, },
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
.Container {
.Container {
height: 100% !important; height: 100% !important;
// background: #fac; // background: #fac;
background: #f5f5f5; background: #f5f5f5;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.main { .main {
// background: #afc; // background: #afc;
border-radius: 6px; border-radius: 6px;
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
} }
&::before { &::before {
content: ""; content: "";
display: block; display: block;
width: 100%; width: 100%;
height: @headerH; height: @headerH;
background: rgb(59, 135, 255); background: rgb(59, 135, 255);
background: -moz-linear-gradient( background: -moz-linear-gradient(174deg,
174deg, rgba(59, 135, 255, 1) 24%,
rgba(59, 135, 255, 1) 24%, rgba(108, 53, 247, 1) 85%);
rgba(108, 53, 247, 1) 85% background: -webkit-linear-gradient(174deg,
); rgba(59, 135, 255, 1) 24%,
background: -webkit-linear-gradient( rgba(108, 53, 247, 1) 85%);
174deg, background: linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85% rgba(108, 53, 247, 1) 85%);
); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1);
} }
/deep/.ant-tabs-nav { /deep/.ant-tabs-nav {
.ant-tabs-tab { .ant-tabs-tab {
margin: 0 !important; margin: 0 !important;
} }
} }
/deep/.ant-tabs-tab { /deep/.ant-tabs-tab {
font-size: 14px !important; font-size: 14px !important;
& + .ant-tabs-tab {
margin: 0 !important; &+.ant-tabs-tab {
margin-left: 0.7rem !important; margin: 0 !important;
} margin-left: 0.7rem !important;
}
} }
/deep/.ant-tabs-bar{
/deep/.ant-tabs-bar {
margin: 0; margin: 0;
} }
} }
.first_card{
.first_card {
background: #FFF; background: #FFF;
margin-bottom: .9375rem; margin-bottom: .9375rem;
} }
.breadMenu{
.breadMenu {
height: 2.8125rem; height: 2.8125rem;
line-height: 2.8125rem; line-height: 2.8125rem;
padding: 0 5rem; padding: 0 5rem;
border-bottom: 1px solid rgba(226, 226, 226, 1); border-bottom: 1px solid rgba(226, 226, 226, 1);
} }
.searchBox{
.searchBox {
height: 6.25rem; height: 6.25rem;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.content_view{
.content_view {
padding: 0 5rem; padding: 0 5rem;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="station"> <div class="station">
<div class="title"> <div class="title">
<h3>以客户为中心,以奋斗者为本,永远坚持艰苦奋斗</h3> <!-- <h3>以客户为中心,以奋斗者为本,永远坚持艰苦奋斗</h3>
<p>“互联网+政务服务”整体解决方案提供商和服务商</p> <p>“互联网+政务服务”整体解决方案提供商和服务商</p> -->
</div> </div>
<div class="classification"> <div class="classification">
<div class="modules"> <div class="modules">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment