This commit is contained in:
parent
1853dc9e12
commit
5d53cfb827
|
@ -121,7 +121,7 @@
|
|||
</div>
|
||||
<div
|
||||
v-if="data.tab == '1'"
|
||||
style="width: 100%; height: 70vh"
|
||||
style="width: 100%; height: 550px;"
|
||||
>
|
||||
<tL
|
||||
:list1="data.list1"
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%; height: 70vh">
|
||||
<div style="width: 100%; height: 600px">
|
||||
<eL
|
||||
:list1="data.list1"
|
||||
:list2="data.list2"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</template>
|
||||
|
||||
<script setup >
|
||||
import { onBeforeMount, reactive, ref } from "vue";
|
||||
import { onBeforeMount, reactive, ref, watch } from "vue";
|
||||
// 局部引入echarts核心模块
|
||||
import * as echarts from "echarts";
|
||||
|
||||
|
@ -208,7 +208,34 @@ const getOption = () => {
|
|||
],
|
||||
};
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.list1,
|
||||
() => {
|
||||
data.list1 = props.list1;
|
||||
data.list2 = props.list2;
|
||||
data.year = props.year;
|
||||
data.bg = [];
|
||||
data.year.forEach(() => {
|
||||
data.bg.push(0);
|
||||
});
|
||||
getOption();
|
||||
setChart();
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => props.list2,
|
||||
() => {
|
||||
data.list1 = props.list1;
|
||||
data.list2 = props.list2;
|
||||
data.year = props.year;
|
||||
data.bg = [];
|
||||
data.year.forEach(() => {
|
||||
data.bg.push(0);
|
||||
});
|
||||
getOption();
|
||||
setChart();
|
||||
}
|
||||
);
|
||||
const setChart = () => {
|
||||
// Vue3中: 需要引入
|
||||
var myChart = echarts.init(chart.value);
|
||||
|
@ -224,6 +251,7 @@ onBeforeMount(() => {
|
|||
data.list1 = props.list1;
|
||||
data.list2 = props.list2;
|
||||
data.year = props.year;
|
||||
data.bg=[];
|
||||
data.year.forEach(() => {
|
||||
data.bg.push(0);
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</template>
|
||||
|
||||
<script setup >
|
||||
import { onBeforeMount, reactive, ref } from "vue";
|
||||
import { onBeforeMount, reactive, ref,watch } from "vue";
|
||||
// 局部引入echarts核心模块
|
||||
import * as echarts from "echarts";
|
||||
|
||||
|
@ -143,7 +143,19 @@ const getOption = () => {
|
|||
],
|
||||
};
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.list1,
|
||||
() => {
|
||||
data.list1 = props.list1;
|
||||
data.year = props.year;
|
||||
data.bg=[];
|
||||
data.year.forEach(() => {
|
||||
data.bg.push(0);
|
||||
});
|
||||
getOption();
|
||||
setChart();
|
||||
}
|
||||
);
|
||||
const setChart = () => {
|
||||
// Vue3中: 需要引入
|
||||
var myChart = echarts.init(chart.value);
|
||||
|
@ -158,6 +170,7 @@ onBeforeMount(() => {
|
|||
setTimeout(() => {
|
||||
data.list1 = props.list1;
|
||||
data.year = props.year;
|
||||
data.bg=[];
|
||||
data.year.forEach(() => {
|
||||
data.bg.push(0);
|
||||
});
|
||||
|
|
116
src/view/sy.vue
116
src/view/sy.vue
|
@ -258,14 +258,14 @@
|
|||
<img src="../assets/images/sy/dropDown.png" />
|
||||
<span>浙里办平均日活</span>
|
||||
</div>
|
||||
<span style="margin-right: 20px;">8135</span>
|
||||
<span style="margin-right: 20px">8135</span>
|
||||
</div>
|
||||
<div class="dailyActivityBox">
|
||||
<div class="dailyActivitybottom">
|
||||
<img src="../assets/images/sy/dropDown.png" />
|
||||
<span>龙游通平均日活</span>
|
||||
</div>
|
||||
<span style="margin-right: 20px;" >2714</span>
|
||||
<span style="margin-right: 20px">2714</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
|
@ -553,7 +553,7 @@
|
|||
:title="dataEc.title"
|
||||
:list1="dataEc.list1"
|
||||
:list2="dataEc.list2"
|
||||
:year="dataEc.year"
|
||||
:year="dataEc.times"
|
||||
@close="close"
|
||||
>
|
||||
</DialogEc>
|
||||
|
@ -562,13 +562,18 @@
|
|||
:title="dataTab.title"
|
||||
:list1="dataTab.list1"
|
||||
:list2="dataTab.list2"
|
||||
:year="dataTab.year"
|
||||
:year="dataTab.times"
|
||||
:columns="dataTab.columns"
|
||||
:tableData="dataTab.data"
|
||||
:pagination="pagination"
|
||||
@handle="handlePagination"
|
||||
@handle="handlePaginationTab"
|
||||
@close="close"
|
||||
>
|
||||
<template #dd="{ currentCol, currentData }">
|
||||
<div>
|
||||
{{currentData.dd.substring(0,currentData.dd.indexOf("."))}}
|
||||
</div>
|
||||
</template>
|
||||
</DialogTab>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -755,13 +760,15 @@ const pagination = reactive({
|
|||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
});
|
||||
//表格分页
|
||||
const handlePagination = (current) => {
|
||||
pagination.currentPage = current;
|
||||
// if (tableType.title == "医院卫生院") {
|
||||
// getTable2(tableType.url, pagination.currentPage);
|
||||
// } else {
|
||||
getTable(tableType.url, pagination.currentPage);
|
||||
// }
|
||||
};
|
||||
//Tab切换分页
|
||||
const handlePaginationTab = (current) => {
|
||||
pagination.currentPage = current;
|
||||
getTableTab(dataTab.url, pagination.currentPage);
|
||||
};
|
||||
const showDialog = (title, url) => {
|
||||
tableType.title = title;
|
||||
|
@ -798,6 +805,7 @@ const dataEc = reactive({
|
|||
});
|
||||
// 交通事业-公交,高铁,大巴
|
||||
const dataTab = reactive({
|
||||
url: "",
|
||||
title: "",
|
||||
list1: [],
|
||||
list2: [],
|
||||
|
@ -805,15 +813,16 @@ const dataTab = reactive({
|
|||
columns: [
|
||||
{
|
||||
label: "班次",
|
||||
property: "bc",
|
||||
property: "cc",
|
||||
},
|
||||
{
|
||||
label: "始发站-终点站",
|
||||
property: "sfzd",
|
||||
property: "qqz",
|
||||
},
|
||||
{
|
||||
label: "始发时间",
|
||||
property: "time",
|
||||
type: "slot",
|
||||
property: "dd",
|
||||
},
|
||||
],
|
||||
data: [],
|
||||
|
@ -1262,10 +1271,14 @@ const getData = async () => {
|
|||
data.tysyList[index].value = res.data.whtysy[key];
|
||||
});
|
||||
// 交通事业
|
||||
data.jtsyList[1].key1_value = res.data.transportation.electricbicycle.cyclingFrequency
|
||||
data.jtsyList[1].key2_value = res.data.transportation.electricbicycle.cyclingDduration
|
||||
data.jtsyList[4].key1_value = res.data.transportation.highSpeedRail.trainSchedule
|
||||
data.jtsyList[4].key2_value = res.data.transportation.highSpeedRail.passengerFlow
|
||||
data.jtsyList[1].key1_value =
|
||||
res.data.transportation.electricbicycle.cyclingFrequency;
|
||||
data.jtsyList[1].key2_value =
|
||||
res.data.transportation.electricbicycle.cyclingDduration;
|
||||
data.jtsyList[4].key1_value =
|
||||
res.data.transportation.highSpeedRail.trainSchedule;
|
||||
data.jtsyList[4].key2_value =
|
||||
res.data.transportation.highSpeedRail.passengerFlow;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -1281,17 +1294,18 @@ const getTable = (url, currentPage) => {
|
|||
}
|
||||
});
|
||||
};
|
||||
const getTable2 = (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;
|
||||
// }
|
||||
// });
|
||||
//获取交通事业-公交,高铁,大巴数据
|
||||
const getTableTab = (url, currentPage) => {
|
||||
dataTab.url = url;
|
||||
http
|
||||
.get(`${url}?page=${currentPage}&size=${pagination.pageSize}`)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
dataTab.data = res.data;
|
||||
pagination.total = res.count;
|
||||
dialogShowTab.value = true;
|
||||
}
|
||||
});
|
||||
};
|
||||
//企业服务
|
||||
const qyfyList = reactive([
|
||||
|
@ -1333,14 +1347,18 @@ const showEc = (val) => {
|
|||
case "公共自行车":
|
||||
dataEc.list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 122];
|
||||
dataEc.list2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 112];
|
||||
dataEc.year = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
||||
dataEc.times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
||||
dialogShowEc.value = true;
|
||||
break;
|
||||
case "电动单车":
|
||||
dataEc.list1 = [11, 21, 31, 41, 5, 6, 7, 8, 9, 10, 11, 122];
|
||||
dataEc.list2 = [11, 21, 31, 4, 51, 61, 7, 8, 9, 10, 11, 112];
|
||||
dataEc.year = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
||||
http.get("/api/ggfwyth/ddcList").then((res) => {
|
||||
if(res.code == 200){
|
||||
dataEc.list1=res.data.qxcs;
|
||||
dataEc.list2=res.data.qxsc;
|
||||
dataEc.times=res.data.times;
|
||||
dialogShowEc.value = true;
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -1349,12 +1367,12 @@ const showEc = (val) => {
|
|||
const showTab = (val) => {
|
||||
dataTab.title = val;
|
||||
dataTab.list1 = [];
|
||||
dataTab.year = [];
|
||||
dataTab.times = [];
|
||||
dataTab.data = [];
|
||||
switch (val) {
|
||||
case "公共汽车":
|
||||
dataTab.list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 122];
|
||||
dataTab.year = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
||||
dataTab.times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
||||
dataTab.data = [
|
||||
{
|
||||
bc: "G13214",
|
||||
|
@ -1376,7 +1394,7 @@ const showTab = (val) => {
|
|||
break;
|
||||
case "长途汽车":
|
||||
dataTab.list1 = [11, 21, 31, 4, 51, 6, 7, 81, 91, 10, 11, 122];
|
||||
dataTab.year = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
||||
dataTab.times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
||||
dataTab.data = [
|
||||
{
|
||||
bc: "D6456",
|
||||
|
@ -1397,26 +1415,13 @@ const showTab = (val) => {
|
|||
dialogShowTab.value = true;
|
||||
break;
|
||||
case "高铁":
|
||||
dataTab.list1 = [1, 222, 333, 444, 5, 6, 7, 8, 9, 10, 11, 122];
|
||||
dataTab.year = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
||||
dataTab.data = [
|
||||
{
|
||||
bc: "G13214",
|
||||
sfzd: "A-B",
|
||||
time: "2024-06-12",
|
||||
},
|
||||
{
|
||||
bc: "G13214",
|
||||
sfzd: "A-B",
|
||||
time: "2024-06-13",
|
||||
},
|
||||
{
|
||||
bc: "G4564",
|
||||
sfzd: "A-B",
|
||||
time: "2024-06-14",
|
||||
},
|
||||
];
|
||||
dialogShowTab.value = true;
|
||||
getTableTab("/api/ggfwyth/lyzlcskList", pagination.currentPage);
|
||||
http.get(`/api/ggfwyth/lckll`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
dataTab.list1=res.data.data;
|
||||
dataTab.times=res.data.times;
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -2407,7 +2412,7 @@ const showTab = (val) => {
|
|||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 50%;
|
||||
.dailyActivitybottom{
|
||||
.dailyActivitybottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
@ -2424,7 +2429,6 @@ const showTab = (val) => {
|
|||
font-style: normal;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//企业服务
|
||||
|
|
Loading…
Reference in New Issue