Commit 73805b72 authored by 王启林's avatar 王启林

优化画像图谱+人物分析对接

parent 75de4e66
......@@ -48,3 +48,12 @@ export function ageRate(params) {
export function 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>
<div>
<div :id="id" :style="{height: this.height+'px', width: this.width+'px'}"></div>
</div>
<div>
<div :id="id" :style="{ height: this.height + 'px', width: this.width + 'px' }"></div>
</div>
</template>
<script >
import * as echarts from 'echarts'
let myChart= null
let myChart = null
export default {
props: {
props: {
id: {
type: String
},
height:{
height: {
type: String | Number,
},
width:{
width: {
type: String | Number,
},
datas: Object
},
data() {
return {
},
data() {
return {
}
},
watch:{
datas: function(obj){
if(obj){
this.pieInit(obj.data)
},
watch: {
datas: function (obj) {
if (obj) {
this.pieInit(obj.data, obj.nameArr)
}
}
},
methods: {
pieInit(data) {
methods: {
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))
let option = {
radar: {
// shape: 'circle',
indicator: [
{ name: '在线预约', max: 100 },
{ name: '现场取号', max: 100 },
{ name: '个人申报', max: 100 },
{ name: '评价次数', max: 100 },
{ name: '意见建议', max: 100 },
{ name: '办不成事', max: 100 }
]
indicator: arr
},
series: [
{
......@@ -51,15 +61,14 @@ export default {
data: data
}
]
};
myChart.setOption(option)
// 让图表跟随屏幕自动的去适应
window.addEventListener('resize', function () {
myChart.resize()
})
}
}
};
myChart.setOption(option)
// 让图表跟随屏幕自动的去适应
window.addEventListener('resize', function () {
myChart.resize()
})
}
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<style lang="less" scoped></style>
\ No newline at end of file
<template>
<div class="Container">
<div class="main">
<div class="first_card">
<div class="breadMenu">
<Breadcrumb/>
<div class="main">
<div class="first_card">
<div class="breadMenu">
<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 class="searchBox">
<a-input v-model="peopleName" placeholder="请输入群众名称搜索" style="width: 35.625rem"></a-input>
<a-button type="primary" class="addclass" @click="startAnalysis()">开始分析</a-button>
<a-button type="primary" class="addclass" v-if="btnShow" @click="backBase()">返回</a-button>
<div class="content_view">
<router-view keep-alive />
</div>
</div>
<div class="content_view">
<router-view />
</div>
</div>
</div>
</template>
<script>
import Breadcrumb from "./breadcrumb/index.vue";
export default {
components:{
<script>
import Breadcrumb from "./breadcrumb/index.vue";
import { peopelList } from '@/api/userPortrait'
export default {
components: {
Breadcrumb
},
data() {
return {
// 搜索框
peopleName: '',
btnShow: false,
}
return {
// 搜索框
peopleId: '',
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() {
this.peopleName= ''
this.$router.push({ path: 'portrayalAnalysis'})
this.btnShow= true
if (this.peopleId) {
this.$router.push({ path: 'portrayalAnalysis', query: { peopleid: this.peopleId } })
this.btnShow = true
} else {
this.$message.warning('请选择群众后搜索')
}
},
backBase() {
this.peopleName= ''
this.$router.push({ path: 'portrayalBase'})
this.btnShow= false
this.peopleArr = []
this.$router.push({ path: 'portrayalBase' })
this.btnShow = false
},
}
}
</script>
}
</script>
<style lang="less" scoped>
@headerH: 4.5rem;
.Container {
<style lang="less" scoped>
@headerH: 4.5rem;
.Container {
height: 100% !important;
// background: #fac;
background: #f5f5f5;
display: flex;
flex-direction: column;
.main {
// background: #afc;
border-radius: 6px;
flex: 1;
overflow-y: auto;
overflow-x: hidden;
// background: #afc;
border-radius: 6px;
flex: 1;
overflow-y: auto;
overflow-x: hidden;
}
&::before {
content: "";
display: block;
width: 100%;
height: @headerH;
background: rgb(59, 135, 255);
background: -moz-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
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);
content: "";
display: block;
width: 100%;
height: @headerH;
background: rgb(59, 135, 255);
background: -moz-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: -webkit-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
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 {
.ant-tabs-tab {
margin: 0 !important;
}
.ant-tabs-tab {
margin: 0 !important;
}
}
/deep/.ant-tabs-tab {
font-size: 14px !important;
& + .ant-tabs-tab {
margin: 0 !important;
margin-left: 0.7rem !important;
}
font-size: 14px !important;
&+.ant-tabs-tab {
margin: 0 !important;
margin-left: 0.7rem !important;
}
}
/deep/.ant-tabs-bar{
/deep/.ant-tabs-bar {
margin: 0;
}
}
.first_card{
}
.first_card {
background: #FFF;
margin-bottom: .9375rem;
}
.breadMenu{
}
.breadMenu {
height: 2.8125rem;
line-height: 2.8125rem;
padding: 0 5rem;
border-bottom: 1px solid rgba(226, 226, 226, 1);
}
.searchBox{
}
.searchBox {
height: 6.25rem;
display: flex;
justify-content: center;
align-items: center;
}
.content_view{
}
.content_view {
padding: 0 5rem;
}
</style>
}
</style>
\ No newline at end of file
<template>
<div class="station">
<div class="title">
<h3>以客户为中心,以奋斗者为本,永远坚持艰苦奋斗</h3>
<p>“互联网+政务服务”整体解决方案提供商和服务商</p>
<!-- <h3>以客户为中心,以奋斗者为本,永远坚持艰苦奋斗</h3>
<p>“互联网+政务服务”整体解决方案提供商和服务商</p> -->
</div>
<div class="classification">
<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