This commit is contained in:
duanxiaohai 2024-06-24 16:04:31 +08:00
parent ef2c3272f8
commit c077e879cc
11 changed files with 200 additions and 89 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -9,7 +9,7 @@
</div>
</div>
<div class="hypertension">
<pie3dMt1 :list="data.gxy"></pie3dMt1>
<pie3dMt1 :list="data.analysis.lnr"></pie3dMt1>
<edxs
:list="data.whistleblower.culeTotal.data"
:month="data.whistleblower.culeTotal.time"
@ -122,7 +122,7 @@
</div>
</div>
<!-- <img src="@/assets/images/sjfx/right3D.png" alt="" class="right3d" /> -->
<right2></right2>
<right2 :list="data.analysis.push"></right2>
</div>
<div class="flex1">
<div class="yd_title right_3">
@ -261,12 +261,35 @@ const data = reactive({
},
], //
leftCenterYear: ["2019", "2020", "2021", "2022", "2023"], //
// leftCenter1: ["100", "120", "199", "133", "210"], //
// leftCenter3: ["100", "80", "199", "133", "210"], //
// leftCenter4: ["100", "120", "199", "133", "210"], //尿
zccs1: ["图书馆", "交通出行", "景区"], //
zccs2: ["100", "130", "220"], //
analysis: {
lnr: {
fgxy: { rs: "1610", zb: "51.77" },
gxy: { rs: "1500", zb: "48.23" },
rksj: {
man: "196576",
nl17: "48.23", // 17
nl60: "0", // 60
nl100: "0", // 100,
nl110: "0", // 1-10
nl1120: "0", // 11-20
nl1834: "0", // 18-34
nl2130: "0", // 21-30
nl3140: "0", // 31-40
nl3569: "0", // 35-69
nl4150: "0", // 41-50
nl5160: "0", // 51-60
nl6170: "0", // 61-70
nl7180: "0", // 71-80
nl8190: "0", // 81-90
nl91100: "0", // 91-100
rkzs: "390754",
woman: "194178",
},
},
push: [{ name: "小奔通", num: 4196 }],
},
});
const minData = reactive({
minTop: 49162,
@ -320,11 +343,26 @@ const toggleShow = () => {
const startAutoSwitching = () => {
interval = setInterval(toggleShow, 6000); // 6
};
const getData = async () => {
await http.get("/api/ggfwyth/analysis").then((res) => {
if (res.code == 200) {
// console.log(res.data, "");
data.analysis = res.data;
const ageBt = ["nl6170", "nl7180", "nl8190", "nl91100", "nl100"];
ageBt.forEach((key, index) => {
data.whistleblower.culeTotal.data[index] = res.data.lnr.rksj[key];
});
}
});
};
onMounted(() => {
startAutoSwitching();
});
onBeforeMount(() => {});
onBeforeMount(() => {
getData();
});
onBeforeUnmount(() => {
clearInterval(interval); //

View File

@ -67,6 +67,7 @@ const updateSeries = () => {
];
if (data.list.length > 0) {
// if (!data.list) {
data.list.forEach((item, index) => {
const color = data.bgColor[index % data.bgColor.length];
data.series.push({

View File

@ -35,8 +35,8 @@ const getOption = () => {
},
grid: {
top: "20%",
left: "1%",
right: "5%",
left: "0%",
right: "3%",
bottom: "0%",
containLabel: true,
},
@ -186,12 +186,12 @@ const setChart = () => {
var myChart = echarts.init(chart.value);
myChart.setOption(data.option);
};
// 使
onBeforeMount(() => {
setTimeout(() => {
data.list = props.list;
data.month = props.month;
// console.log(data.list, props.month, "");
getOption();
setChart();
}, 600);

View File

@ -565,13 +565,13 @@ const setChart = () => {
// 使
onBeforeMount(() => {
setTimeout(() => {
// data.list = props.list;
data.list = {
gxy: "1500",
notGxy: "1610",
};
pieData[0].value = data.list.gxy;
pieData[1].value = data.list.notGxy;
data.list = props.list;
// data.list = {
// gxy: "1500",
// notGxy: "1610",
// };
pieData[0].value = data.list.fgxy.rs;
pieData[1].value = data.list.gxy.rs;
getOption();
setChart();

View File

@ -7,6 +7,15 @@ import { onMounted, onBeforeMount, reactive, ref } from "vue";
// echarts
import * as echarts from "echarts";
const props = defineProps({
list: {
type: Array,
default: () => {
return [];
},
},
});
const chart = ref(); // DOM
const colors = [
@ -33,10 +42,21 @@ const colors = [
},
];
const maxList = ref([]);
const valueList = [20, 53, 47, 65, 29, 11, 10];
// const valueList = [20, 53, 47, 65, 29, 11, 10];
const data = reactive({
list: [],
option: {},
Max: 100,
Max: 200,
valueList: [20, 53, 47, 65, 29, 11, 10],
xxname: [
"小奔通",
"两慢病",
"水费",
"就业招工",
"零工市厂匹配",
"医保",
"交通出行",
],
});
// 5:
//c0:c1,c2:c3
@ -156,21 +176,13 @@ const getOption = () => {
left: 10,
right: 0,
bottom: 20,
top: 20,
top: 30,
containLabel: true,
},
xAxis: [
{
type: "category",
data: [
"小奔通",
"两慢病",
"水费",
"就业招工",
"零工市厂匹配",
"医保",
"交通出行",
],
data: data.xxname,
axisLine: {
show: false,
},
@ -190,15 +202,7 @@ const getOption = () => {
},
{
type: "category",
data: [
"小奔通",
"两慢病",
"水费",
"就业招工",
"零工市厂匹配",
"医保",
"交通出行",
],
data: data.xxname,
axisLine: {
show: false,
},
@ -216,9 +220,8 @@ const getOption = () => {
],
yAxis: {
min: 0,
// max: 200,
max: data.Max,
interval: 20,
// interval: 100,
type: "value",
axisLine: {
show: true,
@ -247,7 +250,7 @@ const getOption = () => {
{
type: "custom",
renderItem: function (params, api) {
console.log(api);
// console.log(api);
const location = api.coord([api.value(0), api.value(1)]);
return {
type: "group",
@ -399,7 +402,7 @@ const getOption = () => {
};
},
data: valueList,
data: data.valueList,
},
//
{
@ -418,7 +421,7 @@ const getOption = () => {
color: "rgba(221, 242, 255, 0)",
},
data: valueList.map((item) => item + 5),
data: data.valueList.map((item) => parseInt(item) + 5),
barWidth: 20,
},
],
@ -429,21 +432,30 @@ const setChart = () => {
myChart.setOption(data.option);
};
const getMaxCeilingValue = (arr) => {
let max = Math.max(...arr);
return Math.ceil(max / 100) * 100;
let max = Math.max(...arr);//
return Math.ceil(max / 100) * 100;// 100
};
const setChart1 = () => {
data.valueList = [];
data.xxname = [];
if (data.list.length !== 0) {
data.list.forEach((item) => {
data.xxname.push(item.name); //
data.valueList.push(item.num); //
});
}
};
onBeforeMount(() => {
setTimeout(() => {
data.Max = getMaxCeilingValue(valueList);
maxList.value = valueList.map((item) => data.Max * 0.9);
data.list = props.list;
setChart1();
data.Max = getMaxCeilingValue(data.valueList);
maxList.value = data.valueList.map((item) => parseInt(data.Max) * 0.9);// data.Max 90%
getOption();
setChart();
}, 600);
}, 800);
});
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@ -326,7 +326,7 @@ onBeforeMount(() => {
setTimeout(() => {
data.list = props.list;
data.day = props.list.day;
console.log(data.list, "助老服务");
// console.log(data.list, "");
setChart1();
getOption();
setChart();

View File

@ -92,32 +92,32 @@
<div class="schoolb">
<img src="../assets/eduImg/xxgkTop.png" class="gkTop" alt="" />
<div class="grade">
<div class="schoolbs" @click="showDialog('学校', '')">
<div class="schoolbs" @click="showDialog('学校', '/api/ggfwyth/schoolList')">
<span class="spot">初中</span>
<span>{{ data.xxgk.czxxsl }}</span>
</div>
<div class="schoolbs" @click="showDialog('学校', '')">
<div class="schoolbs" @click="showDialog('学校', '/api/ggfwyth/schoolList')">
<span class="spot">高中</span>
<span>{{ data.xxgk.gzxxsl }}</span>
</div>
</div>
<div class="grade">
<div class="schoolbs" @click="showDialog('学校', '')">
<div class="schoolbs" @click="showDialog('学校', '/api/ggfwyth/schoolList')">
<span class="spot">小学</span>
<span>{{ data.xxgk.xxxxsl }}</span>
</div>
<div class="schoolbs" @click="showDialog('学校', '')">
<div class="schoolbs" @click="showDialog('学校', '/api/ggfwyth/schoolList')">
<span class="spot">中职</span>
<span>{{ data.xxgk.zzxxsl }}</span>
</div>
</div>
<div class="grade grade1">
<div class="schoolbs" @click="showDialog('学校', '')">
<div class="schoolbs" @click="showDialog('学校', '/api/ggfwyth/schoolList')">
<span class="spot">幼儿园</span>
<span>{{ data.xxgk.yeyxxsl }}</span>
</div>
<div class="schoolbs">
<span class="spot" @click="showDialog('学校', '')"
<span class="spot" @click="showDialog('学校', '/api/ggfwyth/schoolList')"
>特殊教育</span
>
<span>{{ data.xxgk.tsjyxxsl }}</span>
@ -426,21 +426,50 @@ const tableType = reactive({
url: "",
title: "",
columns: [
// {
// label: "",
// property: "school",
// },
// {
// label: "",
// property: "teacher",
// },
// {
// label: "",
// property: "student",
// },
// {
// label: "",
// property: "banji",
// },
{
label: "学校",
property: "school",
label: "班级数",
property: "bjs",
},
{
label: "教师数",
property: "teacher",
label: " 教师数",
property: "jss",
},
{
label: "区域",
property: "qq",
},
{
label: "学段",
property: "xd",
},
{
label: "学生数",
property: "student",
property: "xss",
},
{
label: "班级数",
property: "banji",
label: " 学校名称",
property: "xxmc",
},
{
label: "性质",
property: "xz",
},
],
data: [],
@ -460,20 +489,20 @@ const showDialog = (title, url) => {
tableType.url = url;
pagination.currentPage = 1;
dialogShow.value = true;
// getTable(url, pagination.currentPage);
getTable(url, pagination.currentPage);
};
//
const getTable = (url, currentPage) => {
dialogShow.value = true;
// http
// .get(`${url}?page=${currentPage}&size=${pagination.pageSize}`)
// .then((res) => {
// if (res.code == 200) {
// tableType.data = res.data;
// pagination.total = res.count;
// dialogShow.value = true;
// }
// });
http
.get(`${url}?page=${currentPage}&size=${pagination.pageSize}`)
.then((res) => {
if (res.code == 200) {
tableType.data = res.data;
pagination.total = res.count;
dialogShow.value = true;
}
});
};
const close = () => {
dialogShow.value = false;
@ -1789,6 +1818,34 @@ onMounted(() => {
}
}
}
:deep(.el-table) {
background: rgba(32, 64, 115, 1);
--el-table-border-color: none;
border: 1px solid #7aceff;
}
.table {
:deep(.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf) {
border: none !important;
padding-left: 10px !important;
}
:deep(.el-table td.el-table__cell) {
padding-left: 10px;
}
}
:deep(.el-table--enable-row-hover .el-table__body tr:hover > td) {
background-color: #2f4b74;
}
:deep(.el-table__empty-block) {
background-color: #122560;
}
:deep(.el-table .el-table__row) {
border-bottom: none;
}
</style>
<style lang="scss">
.selectBox {

View File

@ -397,7 +397,7 @@
class="ylws_item"
v-for="(item, index) in data.ylwsList"
:key="index"
@click="showDialog2(item.name, '')"
@click="showDialog2(item.name, '/api/ggfwyth/yywsyList')"
>
<div class="name">{{ item.name }}</div>
<div class="value">{{ item.value }}</div>
@ -745,15 +745,15 @@ const columnss = reactive({
const ylws_columns = ref([
{
label: "医院名称",
property: "name",
property: "yymc",
},
{
label: "医生数",
property: "ys",
property: "zyyss",
},
{
label: "护士数",
property: "hs",
property: "zchss",
},
{
label: "家庭医生签约数",
@ -761,7 +761,7 @@ const ylws_columns = ref([
},
{
label: "床位数",
property: "cws",
property: "hdcws",
},
]);
const tableType = reactive({
@ -808,7 +808,7 @@ const showDialog2 = (title, url) => {
tableType.url = url;
tableType.columns = ylws_columns.value;
dialogShow.value = true;
// getTable(url, pagination.currentPage);
getTable(url, pagination.currentPage);
}
};
@ -1278,6 +1278,7 @@ const getTable = (url, currentPage) => {
.get(`${url}?page=${currentPage}&size=${pagination.pageSize}`)
.then((res) => {
if (res.code == 200) {
console.log(res,'表格数据');
tableType.data = res.data;
pagination.total = res.count;
dialogShow.value = true;

View File

@ -1207,6 +1207,7 @@ const getData = () => {
color: #ffffff;
}
}
:deep(.el-table) {
background: rgba(32, 64, 115, 1);

View File

@ -15,7 +15,8 @@ export default defineConfig({
// 第一个代理
"/api": {
// 匹配到啥来进行方向代理
target: "http://192.168.2.42:8095/", //本地
// target: "http://192.168.2.42:8095/", //本地
target: "http://192.168.2.17:8095/", //刘进
// target: "http://220.191.238.50:996/", //线上
changeOrigin: true, //是否支持跨域
//rewrite: (path) => path.replace(/^\/api/, '') // 如果不需要api 直接把路径上的api 替换成空,这个
@ -34,11 +35,11 @@ export default defineConfig({
replacement: resolve(__dirname, "src"),
},
],
},
build: {
chunkSizeWarningLimit: 1500,
assetsDir: 'assets', // 指定生成静态文件目录
},
base: './'
build: {
chunkSizeWarningLimit: 1500,
assetsDir: "assets", // 指定生成静态文件目录
},
base: "./",
});