Merge branch 'main' of git.zdool.com:xs/ggfwjsc

This commit is contained in:
duanxiaohai 2024-06-19 11:11:41 +08:00
commit be6ab950df
5 changed files with 121 additions and 68 deletions

View File

@ -111,8 +111,14 @@
v-model:current-page="pagination.currentPage"
/>
</div>
<div v-if="data.tab == '1'" style="width: 100%; height: 70vh">
<tL :list1="data.list1" :year="data.year"></tL>
<div
v-if="data.tab == '1'"
style="width: 100%; height: 550px;"
>
<tL
:list1="data.list1"
:year="data.year"
></tL>
</div>
</div>
</el-dialog>

View File

@ -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"

View File

@ -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;
getOption();
setChart();
}
);
watch(
() => props.list2,
() => {
data.list2 = props.list2;
getOption();
setChart();
}
);
watch(
() => props.year,
() => {
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);
});

View File

@ -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,21 @@ const getOption = () => {
],
};
};
watch(
() => props.list1,
() => {
setTimeout(() => {
data.list1 = props.list1;
data.year = props.year;
data.bg=[];
data.year.forEach(() => {
data.bg.push(0);
});
getOption();
setChart();
}, 600);
}
);
const setChart = () => {
// Vue3
var myChart = echarts.init(chart.value);
@ -158,6 +172,7 @@ onBeforeMount(() => {
setTimeout(() => {
data.list1 = props.list1;
data.year = props.year;
data.bg=[];
data.year.forEach(() => {
data.bg.push(0);
});

View File

@ -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;
@ -2424,7 +2429,6 @@ const showTab = (val) => {
font-style: normal;
display: inline-block;
}
}
}
//