6 changed files with 1022 additions and 132 deletions
@ -0,0 +1,165 @@ |
|||
<template> |
|||
<div class="m-pop"> |
|||
<div class="wrap wrap-width2"> |
|||
<cpt-card> |
|||
<div class="title"> |
|||
<img src="@/assets/img/shuju/title-tip.png" /> |
|||
<span>详情</span> |
|||
</div> |
|||
|
|||
<div class="btn-close" |
|||
@click="handleClose"> |
|||
<img src="@/assets/img/shuju/people/close.png" /> |
|||
</div> |
|||
<div class="m-top"> |
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span>姓名:</span> |
|||
<span>{{ eventInfo.name }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>手机号:</span> |
|||
<span>{{ eventInfo.mobile }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span>证件号:</span> |
|||
<span>{{ eventInfo.idCard }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span>关注原因:</span> |
|||
<span>{{ eventInfo.reason || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>隔离状态:</span> |
|||
<span>{{ eventInfo.isolatedState === '0' ? '集中隔离' : eventInfo.isolatedState === '1' ? '居家隔离' : eventInfo.isolatedState === '2' ? '国家健康监测' : '--', }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>备注:</span> |
|||
<span>{{ eventInfo.remark || "--" }}</span> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</cpt-card> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import cptCard from "@/views/modules/visual/cpts/card"; |
|||
import screenLoading from "@/views/modules/visual/cpts/loading"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
|
|||
|
|||
|
|||
import foldText from "@/views/components/foldText"; |
|||
import dateFormat from "dai-js/tools/dateFormat"; |
|||
|
|||
function iniData () { |
|||
return { |
|||
|
|||
|
|||
eventProcess: [], |
|||
|
|||
eventInfo: { |
|||
gridId: "", |
|||
gridName: '', |
|||
createdTime: [], |
|||
eventContent: "", |
|||
imageUrls: [], |
|||
voiceUrls: [], |
|||
sourceType: '', |
|||
address: '', |
|||
reportUserId: "", |
|||
name: "", |
|||
mobile: "", |
|||
idCard: "", |
|||
|
|||
}, |
|||
|
|||
|
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
name: "demandInfo", |
|||
props: { |
|||
detailId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
|
|||
|
|||
|
|||
}, |
|||
|
|||
components: { |
|||
cptCard, |
|||
screenLoading, |
|||
foldText, |
|||
}, |
|||
|
|||
data: iniData, |
|||
|
|||
computed: {}, |
|||
|
|||
watch: { |
|||
detailId () { |
|||
let data = iniData(); |
|||
Object.keys(data).forEach((k) => { |
|||
this[k] = data[k]; |
|||
}); |
|||
this.getApiData(); |
|||
}, |
|||
|
|||
}, |
|||
|
|||
mounted () { |
|||
console.log(this.detailId); |
|||
this.getApiData(); |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
handleClose () { |
|||
this.$emit("close"); |
|||
}, |
|||
|
|||
async getApiData () { |
|||
await this.getEventInfo(); |
|||
|
|||
|
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getEventInfo () { |
|||
const url = "/epmetuser/icEpidemicSpecialAttention/detail"; |
|||
//const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/eventDetail/" + this.detailId; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
id: this.detailId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.eventInfo = data; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
|
|||
|
|||
|
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/visual/incident-info.scss" |
|||
scoped |
|||
></style> |
@ -0,0 +1,540 @@ |
|||
<template> |
|||
<cpt-card style="margin-top:40px"> |
|||
<div class="title"> |
|||
<img src="@/assets/img/shuju/title-tip.png" /> |
|||
<span>隔离管控分析</span> |
|||
|
|||
</div> |
|||
<div class="g-cpt-resi"> |
|||
<div class="g-l"> |
|||
<div class="l_top"> |
|||
|
|||
<div v-if="!pieNoData && !dataLoading" |
|||
class="g-pie"> |
|||
<screen-echarts-frame class="echart-wr" |
|||
@myChartMethod="pieInitOk" |
|||
ref="pieChart"></screen-echarts-frame> |
|||
</div> |
|||
<screen-nodata class="nodata" |
|||
v-if="pieNoData&& !dataLoading"></screen-nodata> |
|||
<div class="table-status" |
|||
v-if="dataLoading"> |
|||
<screen-loading>加载中</screen-loading> |
|||
</div> |
|||
|
|||
</div> |
|||
<div class="l_bottom"> |
|||
<div v-if="!gridPieNoData && !dataLoading" |
|||
class="g-pie"> |
|||
<screen-echarts-frame class="echart-grid-pie" |
|||
@myChartMethod="gridPieInitOk" |
|||
ref="gridPieChart"></screen-echarts-frame> |
|||
</div> |
|||
<screen-nodata class="nodata" |
|||
v-if="gridPieNoData&& !dataLoading"></screen-nodata> |
|||
<div class="table-status" |
|||
v-if="dataLoading"> |
|||
<screen-loading>加载中</screen-loading> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="g-r"> |
|||
<div class="m-tb"> |
|||
|
|||
<div class="tb"> |
|||
<cpt-tb :col-list="demand.colList" |
|||
:loading="demand.loading" |
|||
:header="demand.header" |
|||
:list="demand.list" |
|||
@handleClickRow="toPeopleInfo" |
|||
@operate="toDetailInfo"></cpt-tb> |
|||
|
|||
</div> |
|||
<div class="m-pagination"> |
|||
<el-pagination hide-on-single-page |
|||
:current-page="demand.pageNo" |
|||
:page-size="demand.pageSize" |
|||
:total="demand.total" |
|||
background |
|||
layout="prev, pager, next,total" |
|||
@current-change="handlePageNoChange_demand"> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<detail-info v-if="showProject" |
|||
:detailId="detailId" |
|||
@close="showProject = false" /> |
|||
</cpt-card> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import { requestPost } from "@/js/dai/request" |
|||
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 ScreenLoading from "@/views/modules/visual/components/screen-loading" |
|||
import ScreenNodata from "@/views/modules/visual/components/screen-nodata" |
|||
import detailInfo from "./detail-info.vue" |
|||
|
|||
import { pieOption } from './pieOption.js' |
|||
import dateFormat from "dai-js/tools/dateFormat" |
|||
import nextTick from 'dai-js/tools/nextTick' |
|||
|
|||
//红rgba(255, 120, 0, 1) 橙rgba(198, 0, 255, 1) 黄rgba(120, 0, 255, 1) 绿rgba(0, 229, 237, 1) |
|||
const colorArray = ['rgba(255, 186, 0, 1)', 'rgba(198, 0, 255, 1)', 'rgba(120, 0, 255, 1)', '#00E5ED'] |
|||
export default { |
|||
name: "shijianchulifenxi", |
|||
data () { |
|||
return { |
|||
showProject: false, |
|||
dataLoading: true, |
|||
pieNoData: false, |
|||
gridPieNoData: false, |
|||
|
|||
pieChartS: null, |
|||
pieChart: '', |
|||
pieOption: {}, |
|||
pieInitState: false, |
|||
pieTotal: 0, |
|||
pieData: [], |
|||
|
|||
gridPieChartS: null, |
|||
gridPieChart: '', |
|||
gridPieOption: {}, |
|||
gridPieInitState: false, |
|||
gridPieTotal: 0, |
|||
gridPieData: [], |
|||
|
|||
tableList: [], |
|||
demand: { |
|||
loading: true, |
|||
colList: [ |
|||
{ |
|||
align: "center", |
|||
width: "5%", |
|||
}, |
|||
{ |
|||
align: "center", |
|||
width: "10%", |
|||
}, |
|||
{ |
|||
align: "center", |
|||
width: "25%", |
|||
}, |
|||
{ |
|||
align: "center", |
|||
width: "20%", |
|||
}, |
|||
{ |
|||
align: "center", |
|||
width: "10%", |
|||
}, |
|||
{ |
|||
align: "center", |
|||
width: "20%", |
|||
}, |
|||
{ |
|||
align: "center", |
|||
width: "10%", |
|||
}, |
|||
|
|||
], |
|||
header: ["序号", "姓名", "所属房屋", "关注原因", "隔离状态", "最近一次核酸时间", "查看"], |
|||
list: [], |
|||
pageSize: 10, |
|||
pageNo: 1, |
|||
total: 0, |
|||
}, |
|||
|
|||
categoryCode: '', |
|||
|
|||
detailId: '', |
|||
processStatus: '', |
|||
|
|||
} |
|||
}, |
|||
// mixins: [animate] |
|||
beforeDestroy () { |
|||
|
|||
}, |
|||
async created () { |
|||
|
|||
}, |
|||
|
|||
async mounted () { |
|||
this.dataLoading = true |
|||
await this.getApiData() |
|||
this.dataLoading = false |
|||
}, |
|||
|
|||
methods: { |
|||
async getApiData () { |
|||
await this.getPieData() |
|||
|
|||
}, |
|||
|
|||
assignData () { |
|||
this.getPie() |
|||
this.getGridPie() |
|||
}, |
|||
|
|||
// 加载饼图1数据 |
|||
async getPieData () { |
|||
if (this.$refs.pieChart) { |
|||
this.$refs.pieChart.showLoading() |
|||
this.$refs.pieChart.clear() |
|||
} |
|||
if (this.$refs.gridPieChart) { |
|||
this.$refs.gridPieChart.showLoading() |
|||
this.$refs.gridPieChart.clear() |
|||
} |
|||
|
|||
|
|||
const url = "/epmetuser/icEpidemicSpecialAttention/pie" |
|||
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icEpidemicSpecialAttention/pie" |
|||
let params = {} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
if (this.$refs.pieChart) { |
|||
this.$refs.pieChart.hideLoading() |
|||
} |
|||
if (this.$refs.gridPieChart) { |
|||
this.$refs.gridPieChart.hideLoading() |
|||
} |
|||
if (code === 0) { |
|||
this.pieData = [] |
|||
data.isolatedList.forEach((item, index) => { |
|||
|
|||
let obj = { |
|||
value: item.total, |
|||
name: item.categoryName, |
|||
categoryCode: item.categoryCode, |
|||
color: item.color, |
|||
selected: false |
|||
} |
|||
this.pieData.push(obj) |
|||
}) |
|||
this.getPie() |
|||
|
|||
this.gridPieData = [] |
|||
data.historyList.forEach((item, index) => { |
|||
|
|||
let obj = { |
|||
value: item.total, |
|||
name: item.categoryName, |
|||
categoryCode: item.categoryCode, |
|||
color: colorArray[3], |
|||
selected: false |
|||
} |
|||
this.gridPieData.push(obj) |
|||
}) |
|||
this.getGridPie() |
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
|
|||
//加载组织数据 |
|||
async getTable () { |
|||
const url = "/epmetuser/icEpidemicSpecialAttention/list" |
|||
let params = { |
|||
isolatedState: this.categoryCode, |
|||
attentionType: '2', |
|||
pageNo: this.demand.pageNo, |
|||
pageSize: this.demand.pageSize, |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
this.demand.loading = false |
|||
|
|||
if (code === 0) { |
|||
this.demand.total = data.total |
|||
this.tableList = data.list |
|||
this.demand.list = data.list.map((item, index) => { |
|||
return [ |
|||
index + 1, |
|||
item.name ? item.name : '--', |
|||
item.allName ? item.allName : '--', |
|||
item.reason ? item.reason : '--', |
|||
item.isolatedState === '0' ? '集中隔离' : item.isolatedState === '1' ? '居家隔离' : item.isolatedState === '2' ? '国家健康监测' : '', |
|||
item.lastNatTime ? item.lastNatTime : '--', |
|||
{ type: "operate", list: ["查看"] }, |
|||
] |
|||
}) |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
handlePageNoChange_demand (val) { |
|||
this.demand.pageNo = val |
|||
this.getTable() |
|||
}, |
|||
|
|||
|
|||
async toPeopleInfo (index) { |
|||
if (this.tableList[index].userId) { |
|||
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${this.tableList[index].userId}` }) |
|||
} else { |
|||
this.$message.info('无居民信息') |
|||
} |
|||
|
|||
|
|||
}, |
|||
async toDetailInfo (index) { |
|||
|
|||
const { tableList } = this |
|||
this.detailId = tableList[index].id |
|||
this.showProject = true |
|||
}, |
|||
|
|||
pieInitOk (dom) { |
|||
this.pieChartS = dom |
|||
this.pieInitState = true |
|||
}, |
|||
|
|||
getPie () { |
|||
if (this.pieInitState) { |
|||
this.assignPieChart() |
|||
} else { |
|||
setTimeout(() => { |
|||
this.getPie() |
|||
}, 500) |
|||
} |
|||
}, |
|||
// 获取饼状图 |
|||
async assignPieChart () { |
|||
|
|||
this.pieTotal = 0 |
|||
let maxIndex = 0 |
|||
let maxValue = this.pieData[0].value |
|||
const _that = this |
|||
|
|||
// 获取pieChart配置 |
|||
this.pieOption = pieOption(this.pieChartS) |
|||
|
|||
this.pieData.forEach((item, index) => { |
|||
this.pieTotal = this.pieTotal + item.value |
|||
if (item.value > maxValue) { |
|||
maxValue = item.value |
|||
maxIndex = index |
|||
item.selected = true |
|||
} else if (index !== 0) { |
|||
item.selected = false |
|||
} |
|||
}) |
|||
|
|||
this.pieOption.title.text = this.pieTotal |
|||
|
|||
// this.clickPie() // |
|||
this.clickPie(null, maxIndex) |
|||
|
|||
let fun = function (params) { |
|||
_that.clickPie(params) |
|||
} |
|||
this.$refs.pieChart.handleClick(fun) |
|||
|
|||
}, |
|||
|
|||
clickPie (params, index) { |
|||
|
|||
let dataIndex = params ? params.dataIndex : index ? index : null |
|||
let componentIndex = params ? params.componentIndex : null |
|||
if (componentIndex === 2) { // 点击中心 |
|||
dataIndex = -1 |
|||
this.categoryCode = '' |
|||
this.$refs.pieChart.clear() |
|||
} |
|||
this.pieData.forEach((element, index) => { |
|||
if (index === dataIndex) { |
|||
element.label = { |
|||
show: true, |
|||
} |
|||
element.labelLine = { |
|||
show: true, |
|||
lineStyle: { |
|||
opacity: 1, |
|||
} |
|||
} |
|||
this.categoryCode = element.categoryCode |
|||
element.selected = !element.selected |
|||
} else { |
|||
element.label = { |
|||
show: false, |
|||
} |
|||
element.labelLine = { |
|||
show: false, |
|||
lineStyle: { |
|||
opacity: 0, |
|||
color: 'rgba(255,255,255,0)' |
|||
} |
|||
} |
|||
element.selected = false |
|||
} |
|||
}) |
|||
this.pieOption.series[1].data = this.pieData |
|||
// this.$refs.pieChart.hideLoading() |
|||
this.pieOption.series[1].itemStyle = { |
|||
color: function (params) { |
|||
|
|||
return params.data.color |
|||
} |
|||
} |
|||
this.$refs.pieChart.setOption(this.pieOption) |
|||
|
|||
this.demand.pageNo = 1 |
|||
this.getTable() |
|||
|
|||
}, |
|||
|
|||
|
|||
gridPieInitOk (dom) { |
|||
this.gridPieChartS = dom |
|||
this.gridPieInitState = true |
|||
}, |
|||
|
|||
getGridPie () { |
|||
if (this.gridPieInitState) { |
|||
this.assignGridPieChart() |
|||
} else { |
|||
setTimeout(() => { |
|||
this.getGridPie() |
|||
}, 500) |
|||
} |
|||
}, |
|||
|
|||
// 获取饼状图 |
|||
async assignGridPieChart () { |
|||
this.gridPieTotal = 0 |
|||
let maxIndex = 0 |
|||
let maxValue = this.gridPieData[0].value |
|||
const _that = this |
|||
|
|||
// 获取pieChart配置 |
|||
this.gridPieOption = pieOption(this.gridPieChartS) |
|||
|
|||
this.gridPieData.forEach((item, index) => { |
|||
this.gridPieTotal = this.gridPieTotal + item.value |
|||
|
|||
}) |
|||
|
|||
this.gridPieOption.title.text = this.gridPieTotal |
|||
// this.gridPieOption.legend.bottom = 50 |
|||
|
|||
this.clickGridPie() // this.clickGridPie(maxIndex) |
|||
|
|||
let fun = function (params) { |
|||
_that.clickGridPie(params) |
|||
} |
|||
this.$refs.gridPieChart.handleClick(fun) |
|||
|
|||
|
|||
}, |
|||
|
|||
clickGridPie (params) { |
|||
let dataIndex = params ? params.dataIndex : null |
|||
let componentIndex = params ? params.componentIndex : null |
|||
if (componentIndex === 2) { // 点击中心 |
|||
dataIndex = -1 |
|||
this.tableOrgId = '' |
|||
this.tableOrgType = '' |
|||
this.$refs.gridPieChart.clear() |
|||
} |
|||
this.gridPieData.forEach((element, index) => { |
|||
if (index === dataIndex) { |
|||
element.label = { |
|||
show: true, |
|||
} |
|||
element.labelLine = { |
|||
show: true, |
|||
lineStyle: { |
|||
opacity: 1, |
|||
} |
|||
} |
|||
this.tableOrgId = element.orgId |
|||
this.tableOrgType = element.orgType |
|||
console.log(element) |
|||
} else { |
|||
element.label = { |
|||
show: false, |
|||
} |
|||
element.labelLine = { |
|||
show: false, |
|||
lineStyle: { |
|||
opacity: 0, |
|||
color: 'rgba(255,255,255,0)' |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
this.gridPieOption.series[1].data = this.gridPieData |
|||
this.gridPieOption.series[1].itemStyle = { |
|||
color: function (params) { |
|||
console.log(params) |
|||
return params.data.color |
|||
} |
|||
} |
|||
// this.$refs.pieChart.hideLoading() |
|||
this.$refs.gridPieChart.setOption(this.gridPieOption) |
|||
|
|||
}, |
|||
|
|||
toUserInfo (uid) { |
|||
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` }) |
|||
}, |
|||
}, |
|||
props: { |
|||
uid: { |
|||
type: String, |
|||
default: "", |
|||
// default: "8ada68cb6f1e4b9a8333348a39ef3aee", |
|||
} |
|||
}, |
|||
|
|||
computed: {}, |
|||
|
|||
components: { |
|||
cptCard, |
|||
cptTb, |
|||
screenEchartsFrame, |
|||
|
|||
ScreenLoading, |
|||
ScreenNodata, |
|||
detailInfo |
|||
}, |
|||
|
|||
watch: { |
|||
dateIdShow () { |
|||
// let dataArray = this.dateIdShow.split('-') |
|||
// this.dateId = dataArray.join('') |
|||
}, |
|||
uid (id) { |
|||
this.userId = id |
|||
}, |
|||
userId () { |
|||
this.getApiData() |
|||
window.scrollTo(0, 0) |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/visual/shijianfenleifenxi.scss" |
|||
scoped |
|||
></style> |
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/visual/search_1.scss" |
|||
scoped |
|||
></style> |
|||
|
|||
|
@ -0,0 +1,179 @@ |
|||
|
|||
export function pieOption (_charts) { |
|||
const center= ['50%', '140px'] |
|||
return { |
|||
title: { |
|||
text: '0', |
|||
top: 115, |
|||
left: 'center', |
|||
textStyle: { |
|||
width: '100%', |
|||
fontSize: 26, |
|||
color: '#FFFFFF', |
|||
fontWeight: 400 |
|||
}, |
|||
itemGap: 5, |
|||
subtext: '总数', |
|||
subtextStyle: { |
|||
fontSize: 18, |
|||
color: '#fff', |
|||
fontWeight: 400 |
|||
} |
|||
}, |
|||
tooltip: { |
|||
show: false |
|||
}, |
|||
legend: { |
|||
bottom: 0, |
|||
itemWidth: 20, |
|||
itemHeight: 10, |
|||
textStyle: { |
|||
color: '#D2E7FF', |
|||
fontSize: 14, |
|||
lineHeight: 20, |
|||
}, |
|||
|
|||
}, |
|||
series: [ |
|||
// 外侧圆环
|
|||
{ |
|||
type: 'pie', |
|||
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
|
|||
startAngle: 0, |
|||
hoverAnimation: false, |
|||
// tooltip: {
|
|||
// },
|
|||
center: center, |
|||
radius: ['48%', '48.3%'], |
|||
label: { |
|||
show: false |
|||
}, |
|||
labelLine: { |
|||
show: false |
|||
}, |
|||
data: [{ |
|||
value: 360, |
|||
itemStyle: { |
|||
color: 'rgba(40, 101, 250, 0)', |
|||
width:0, |
|||
borderColor: 'rgba(40, 101, 250, 0.5)', |
|||
borderWidth: 1, |
|||
borderType: 'dotted' |
|||
} |
|||
} |
|||
] |
|||
}, |
|||
|
|||
// 突出的
|
|||
{ |
|||
hoverAnimation: false, |
|||
// name: 'Access From',
|
|||
type: 'pie', |
|||
center: center, |
|||
radius: ['25%', '38%'], |
|||
avoidLabelOverlap: false, |
|||
// top: top + '%',
|
|||
// height: '80%',
|
|||
selectedMode: 'single', |
|||
left: 'center', |
|||
width: 480, |
|||
label: { |
|||
// show: false,
|
|||
position: 'outside', |
|||
alignTo: 'edge', |
|||
// formatter: '{a|{c}}\n\n{name|{b}}',
|
|||
formatter: '{a|{c}}\n{r|}\n{name|{b}}', |
|||
minMargin: 5, |
|||
edgeDistance: 1, |
|||
lineHeight: 15, |
|||
color: '#fff', |
|||
fontSize: 10, |
|||
// distanceToLabelLine: -60,
|
|||
rich: { |
|||
name: { |
|||
padding: [0, 6, 0, 6] |
|||
}, |
|||
a: { |
|||
fontSize: 18, |
|||
color: '#fff', |
|||
padding: [0, 6, 6, 6] |
|||
}, |
|||
r: { |
|||
backgroundColor: 'auto', |
|||
borderRadius: 6, |
|||
width: 6, |
|||
height: 6, |
|||
// padding: [3, 3, 0, -12]
|
|||
} |
|||
} |
|||
}, |
|||
labelLine: { |
|||
show: false, |
|||
smooth: 0.2, |
|||
length: 20, |
|||
length2: 0, |
|||
maxSurfaceAngle: 80 |
|||
}, |
|||
labelLayout: function (params) { |
|||
|
|||
const isLeft = params.labelRect.x < _charts.getWidth() / 2; |
|||
const points = params.labelLinePoints; |
|||
// Update the end point.
|
|||
if (points) { |
|||
points[2][0] = isLeft |
|||
? params.labelRect.x |
|||
: params.labelRect.x + params.labelRect.width; |
|||
} |
|||
|
|||
return { |
|||
labelLinePoints: points |
|||
}; |
|||
}, |
|||
itemStyle: { |
|||
// color:function(params) {
|
|||
// //自定义颜色
|
|||
// var colorList = [
|
|||
// '#00FFFF', '#00FF00', '#FFFF00', '#FF8C00', '#FF0000', '#FE8463',
|
|||
// ];
|
|||
// return colorList[params.dataIndex]
|
|||
// }
|
|||
}, |
|||
data: [], |
|||
|
|||
}, |
|||
// 中间圆环
|
|||
{ |
|||
type: 'pie', |
|||
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
|
|||
startAngle: 0, |
|||
hoverAnimation: false, |
|||
center: center, |
|||
// tooltip: {
|
|||
// },
|
|||
radius: ['0%', '20%'], |
|||
label: { |
|||
|
|||
show: false |
|||
|
|||
}, |
|||
labelLine: { |
|||
|
|||
show: false |
|||
|
|||
}, |
|||
data: [{ |
|||
value: 360, |
|||
itemStyle: { |
|||
normal: { |
|||
color: 'rgba(8, 37, 134, 1)', |
|||
|
|||
} |
|||
} |
|||
} |
|||
] |
|||
}, |
|||
] |
|||
|
|||
} |
|||
} |
|||
|
Loading…
Reference in new issue