Commit ac8e0d29 authored by miaojiale's avatar miaojiale

接口联调,缺地图部分

parent 4554d034
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"core-js": "^3.6.5", "core-js": "^3.6.5",
"crypto-js": "^4.0.0", "crypto-js": "^4.0.0",
"dayjs": "^1.8.28", "dayjs": "^1.8.28",
"echarts": "4.8.0", "echarts": "5.3.0",
"element-ui": "^2.15.2", "element-ui": "^2.15.2",
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"jsbarcode": "^3.11.5", "jsbarcode": "^3.11.5",
......
import request from "@/utils/request"
/* 总体数据 */
export function screenOverview(params = {}) {
return request({
url: "/disease-data/data/screen/overview",
method: "get",
params,
})
}
// 医联体地图
export function unionList(params = {}) {
return request({
url: "/disease-data/data/screen/union",
method: "get",
params,
})
}
//近六个月上报量
export function sixMonthList(params = {}) {
return request({
url: "/disease-data/data/screen/union/sixMonth",
method: "get",
params,
})
}
//性别分布
export function genderCount(params = {}) {
return request({
url: "/disease-data/data/screen/genderCount",
method: "get",
params,
})
}
//年龄段分布
export function ageCount(params = {}) {
return request({
url: "/disease-data/data/screen/ageCount",
method: "get",
params,
})
}
//风险分布
export function riskCount(params = {}) {
return request({
url: "/disease-data/data/screen/riskCount",
method: "get",
params,
})
}
//应答情况
export function checkCondition(params = {}) {
return request({
url: "/disease-data/data/screen/checkCondition",
method: "get",
params,
})
}
// 良性疾病
export function esophagusBenign(params = {}) {
return request({
url: "/disease-data/data/screen/esophagus/benign",
method: "get",
params,
})
}
// 良性疾病
export function gastricBenign(params = {}) {
return request({
url: "/disease-data/data/screen/gastric/benign",
method: "get",
params,
})
}
// 胃癌内镜检出率
export function cancerFound(params = {}) {
return request({
url: "/disease-data/data/screen/gastric/cancer",
method: "get",
params,
})
}
// 早癌占比
export function earlyGastric(params = {}) {
return request({
url: "/disease-data/data/screen/earlyGastric/cancer",
method: "get",
params,
})
}
...@@ -70,11 +70,16 @@ export default { ...@@ -70,11 +70,16 @@ export default {
const option = { const option = {
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
formatter: "{b}检出率" + ":" + "{c}%", // formatter: "{b}检出率" + ":" + "{c}%",
valueFormatter: (value) => "检出率:" + value + "%",
axisPointer: { axisPointer: {
// 坐标轴指示器,坐标轴触发有效 // 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow' type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
}, },
backgroundColor: "rgba(50,50,50,0.7)",
textStyle: {
color: "#fff",
},
}, },
grid: { grid: {
top: "20%", top: "20%",
...@@ -133,7 +138,7 @@ export default { ...@@ -133,7 +138,7 @@ export default {
axisLabel: { axisLabel: {
show: true, show: true,
interval: "0", interval: "0",
rotate: 20, rotate: 25,
textStyle: { textStyle: {
color: "#fff", //X轴文字颜色 color: "#fff", //X轴文字颜色
}, },
...@@ -143,7 +148,7 @@ export default { ...@@ -143,7 +148,7 @@ export default {
{ {
type: "bar", type: "bar",
stack: "vistors", stack: "vistors",
barWidth: "30%", barWidth: 15,
data: [], data: [],
itemStyle: { itemStyle: {
normal: { normal: {
......
...@@ -71,6 +71,11 @@ export default { ...@@ -71,6 +71,11 @@ export default {
: params.name : params.name
return str return str
}, },
// valueFormatter: (value) => value + "%",
backgroundColor: "rgba(50,50,50,0.7)",
textStyle: {
color: "#fff",
},
// textStyle: { fontSize: 14, fontFamily: "fzzz", color: "#fff" }, // textStyle: { fontSize: 14, fontFamily: "fzzz", color: "#fff" },
// backgroundColor: "rgba(0,0,0,0.3)", // backgroundColor: "rgba(0,0,0,0.3)",
// borderColor: "rgba(0,0,0,0.3)", // borderColor: "rgba(0,0,0,0.3)",
......
...@@ -41,7 +41,37 @@ export default { ...@@ -41,7 +41,37 @@ export default {
data() { data() {
return { return {
chart: null, chart: null,
pieConfig: { pieConfig: {},
}
},
watch: {
chartData: {
deep: true,
handler(val) {
this.setOptions(val)
},
},
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$el)
this.setOptions(this.chartData)
},
setOptions(chartData) {
// if (!chartData.data) return
this.pieConfig = {
title: { title: {
text: this.title, text: this.title,
subtext: `筛查总例数 {number|${this.totalNum}}`, subtext: `筛查总例数 {number|${this.totalNum}}`,
...@@ -62,6 +92,11 @@ export default { ...@@ -62,6 +92,11 @@ export default {
}, },
tooltip: { tooltip: {
trigger: "item", trigger: "item",
valueFormatter: (value) => value + "%",
backgroundColor: "rgba(50,50,50,0.7)",
textStyle: {
color: "#fff",
},
}, },
legend: { legend: {
orient: "horizontal", orient: "horizontal",
...@@ -93,7 +128,7 @@ export default { ...@@ -93,7 +128,7 @@ export default {
{ {
name: this.title, name: this.title,
type: "pie", type: "pie",
radius: "50%", radius: "44%",
data: this.chartData, data: this.chartData,
emphasis: { emphasis: {
itemStyle: { itemStyle: {
...@@ -104,36 +139,7 @@ export default { ...@@ -104,36 +139,7 @@ export default {
}, },
}, },
], ],
}, }
}
},
watch: {
chartData: {
deep: true,
handler(val) {
this.setOptions(val)
},
},
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$el)
this.setOptions(this.chartData)
},
setOptions(chartData) {
// if (!chartData.data) return
let option = JSON.parse( let option = JSON.parse(
JSON.stringify(Object.assign(this.pieConfig, this.chartConfig)) JSON.stringify(Object.assign(this.pieConfig, this.chartConfig))
) )
......
...@@ -92,6 +92,11 @@ export default { ...@@ -92,6 +92,11 @@ export default {
}, },
tooltip: { tooltip: {
trigger: "item", trigger: "item",
valueFormatter: (value) => value + "%",
backgroundColor: "rgba(50,50,50,0.7)",
textStyle: {
color: "#fff",
},
}, },
legend: { legend: {
show: true, show: true,
...@@ -128,7 +133,7 @@ export default { ...@@ -128,7 +133,7 @@ export default {
{ {
name: this.title, name: this.title,
type: "pie", type: "pie",
radius: "50%", radius: "44%",
data: this.chartData, data: this.chartData,
emphasis: { emphasis: {
itemStyle: { itemStyle: {
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
// if (!chartData.data) return // if (!chartData.data) return
let option = { let option = {
title: { title: {
text: this.title + "\n\n" + `{number|${this.totalNum}}`, // text: this.title + "\n\n" + `{number|${this.totalNum}}`,
left: "center", left: "center",
top: "34%", top: "34%",
textStyle: { textStyle: {
...@@ -90,6 +90,11 @@ export default { ...@@ -90,6 +90,11 @@ export default {
}, },
tooltip: { tooltip: {
trigger: "item", trigger: "item",
valueFormatter: (value) => value + "%",
backgroundColor: "rgba(50,50,50,0.7)",
textStyle: {
color: "#fff",
},
}, },
legend: { legend: {
show: true, show: true,
...@@ -123,7 +128,8 @@ export default { ...@@ -123,7 +128,8 @@ export default {
name: this.title, name: this.title,
type: "pie", type: "pie",
top: "-18%", top: "-18%",
radius: ["38%", "50%"], radius: "44%",
// radius: ["30%", "44%"],
data: this.chartData, data: this.chartData,
emphasis: { emphasis: {
itemStyle: { itemStyle: {
......
This diff is collapsed.
...@@ -3926,12 +3926,13 @@ ecc-jsbn@~0.1.1: ...@@ -3926,12 +3926,13 @@ ecc-jsbn@~0.1.1:
jsbn "~0.1.0" jsbn "~0.1.0"
safer-buffer "^2.1.0" safer-buffer "^2.1.0"
echarts@4.8.0: echarts@5.3.0:
version "4.8.0" version "5.3.0"
resolved "https://registry.npmmirror.com/echarts/-/echarts-4.8.0.tgz#b2c1cfb9229b13d368ee104fc8eea600b574d4c4" resolved "https://registry.npmmirror.com/echarts/-/echarts-5.3.0.tgz#39342fcf0f763413fecd9d2afd1c415163de694d"
integrity sha512-YwShpug8fWngj/RlgxDaYrLBoD+LsZUArrusjNPHpAF+is+gGe38xx4W848AwWMGoi745t3OXM52JedNrv+F6g== integrity sha512-zENufmwFE6WjM+24tW3xQq4ICqQtI0CGj4bDVDNd3BK3LtaA/5wBp+64ykIyKy3QElz0cieKqSYP4FX9Lv9MwQ==
dependencies: dependencies:
zrender "4.3.1" tslib "2.3.0"
zrender "5.3.0"
ee-first@1.1.1: ee-first@1.1.1:
version "1.1.1" version "1.1.1"
...@@ -10434,6 +10435,11 @@ ts-pnp@^1.1.6: ...@@ -10434,6 +10435,11 @@ ts-pnp@^1.1.6:
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92"
integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==
tslib@2.3.0:
version "2.3.0"
resolved "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"
integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
tslib@^1.9.0: tslib@^1.9.0:
version "1.14.1" version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
...@@ -11384,10 +11390,12 @@ zip-stream@^2.1.2: ...@@ -11384,10 +11390,12 @@ zip-stream@^2.1.2:
compress-commons "^2.1.1" compress-commons "^2.1.1"
readable-stream "^3.4.0" readable-stream "^3.4.0"
zrender@4.3.1: zrender@5.3.0:
version "4.3.1" version "5.3.0"
resolved "https://registry.npmmirror.com/zrender/-/zrender-4.3.1.tgz#baf8aa6dc8187a2f819692d7d5f9bedfa2b90fa3" resolved "https://registry.npmmirror.com/zrender/-/zrender-5.3.0.tgz#297c05dc2521362816c4ddced10a1e306646bbc8"
integrity sha512-CeH2TpJeCdG0TAGYoPSAcFX2ogdug1K7LIn9UO/q9HWqQ54gWhrMAlDP9AwWYMUDhrPe4VeazQ4DW3msD96nUQ== integrity sha512-Ln2QB5uqI1ftNYMtCRxd+XDq6MOttLgam2tmhKAVA+j0ko47UT+VNlDvKTkqe4K2sJhBvB0EhYNLebqlCTjatQ==
dependencies:
tslib "2.3.0"
zwitch@^1.0.0: zwitch@^1.0.0:
version "1.0.5" version "1.0.5"
......
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