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" v-model:current-page="pagination.currentPage"
/> />
</div> </div>
<div v-if="data.tab == '1'" style="width: 100%; height: 70vh"> <div
<tL :list1="data.list1" :year="data.year"></tL> v-if="data.tab == '1'"
style="width: 100%; height: 550px;"
>
<tL
:list1="data.list1"
:year="data.year"
></tL>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>

View File

@ -44,7 +44,7 @@
/> />
</div> </div>
</div> </div>
<div style="width: 100%; height: 70vh"> <div style="width: 100%; height: 600px">
<eL <eL
:list1="data.list1" :list1="data.list1"
:list2="data.list2" :list2="data.list2"

View File

@ -3,7 +3,7 @@
</template> </template>
<script setup > <script setup >
import { onBeforeMount, reactive, ref } from "vue"; import { onBeforeMount, reactive, ref, watch } from "vue";
// echarts // echarts
import * as echarts from "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 = () => { const setChart = () => {
// Vue3 // Vue3
var myChart = echarts.init(chart.value); var myChart = echarts.init(chart.value);
@ -224,6 +251,7 @@ onBeforeMount(() => {
data.list1 = props.list1; data.list1 = props.list1;
data.list2 = props.list2; data.list2 = props.list2;
data.year = props.year; data.year = props.year;
data.bg = [];
data.year.forEach(() => { data.year.forEach(() => {
data.bg.push(0); data.bg.push(0);
}); });

View File

@ -3,7 +3,7 @@
</template> </template>
<script setup > <script setup >
import { onBeforeMount, reactive, ref } from "vue"; import { onBeforeMount, reactive, ref,watch } from "vue";
// echarts // echarts
import * as echarts from "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 = () => { const setChart = () => {
// Vue3 // Vue3
var myChart = echarts.init(chart.value); var myChart = echarts.init(chart.value);
@ -158,6 +172,7 @@ onBeforeMount(() => {
setTimeout(() => { setTimeout(() => {
data.list1 = props.list1; data.list1 = props.list1;
data.year = props.year; data.year = props.year;
data.bg=[];
data.year.forEach(() => { data.year.forEach(() => {
data.bg.push(0); data.bg.push(0);
}); });

View File

@ -258,14 +258,14 @@
<img src="../assets/images/sy/dropDown.png" /> <img src="../assets/images/sy/dropDown.png" />
<span>浙里办平均日活</span> <span>浙里办平均日活</span>
</div> </div>
<span style="margin-right: 20px;">8135</span> <span style="margin-right: 20px">8135</span>
</div> </div>
<div class="dailyActivityBox"> <div class="dailyActivityBox">
<div class="dailyActivitybottom"> <div class="dailyActivitybottom">
<img src="../assets/images/sy/dropDown.png" /> <img src="../assets/images/sy/dropDown.png" />
<span>龙游通平均日活</span> <span>龙游通平均日活</span>
</div> </div>
<span style="margin-right: 20px;" >2714</span> <span style="margin-right: 20px">2714</span>
</div> </div>
</div> </div>
<el-table <el-table
@ -553,7 +553,7 @@
:title="dataEc.title" :title="dataEc.title"
:list1="dataEc.list1" :list1="dataEc.list1"
:list2="dataEc.list2" :list2="dataEc.list2"
:year="dataEc.year" :year="dataEc.times"
@close="close" @close="close"
> >
</DialogEc> </DialogEc>
@ -562,13 +562,18 @@
:title="dataTab.title" :title="dataTab.title"
:list1="dataTab.list1" :list1="dataTab.list1"
:list2="dataTab.list2" :list2="dataTab.list2"
:year="dataTab.year" :year="dataTab.times"
:columns="dataTab.columns" :columns="dataTab.columns"
:tableData="dataTab.data" :tableData="dataTab.data"
:pagination="pagination" :pagination="pagination"
@handle="handlePagination" @handle="handlePaginationTab"
@close="close" @close="close"
> >
<template #dd="{ currentCol, currentData }">
<div>
{{currentData.dd.substring(0,currentData.dd.indexOf("."))}}
</div>
</template>
</DialogTab> </DialogTab>
</div> </div>
</template> </template>
@ -755,13 +760,15 @@ const pagination = reactive({
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
}); });
//
const handlePagination = (current) => { const handlePagination = (current) => {
pagination.currentPage = current; pagination.currentPage = current;
// if (tableType.title == "") {
// getTable2(tableType.url, pagination.currentPage);
// } else {
getTable(tableType.url, pagination.currentPage); getTable(tableType.url, pagination.currentPage);
// } };
//Tab
const handlePaginationTab = (current) => {
pagination.currentPage = current;
getTableTab(dataTab.url, pagination.currentPage);
}; };
const showDialog = (title, url) => { const showDialog = (title, url) => {
tableType.title = title; tableType.title = title;
@ -798,6 +805,7 @@ const dataEc = reactive({
}); });
// - // -
const dataTab = reactive({ const dataTab = reactive({
url: "",
title: "", title: "",
list1: [], list1: [],
list2: [], list2: [],
@ -805,15 +813,16 @@ const dataTab = reactive({
columns: [ columns: [
{ {
label: "班次", label: "班次",
property: "bc", property: "cc",
}, },
{ {
label: "始发站-终点站", label: "始发站-终点站",
property: "sfzd", property: "qqz",
}, },
{ {
label: "始发时间", label: "始发时间",
property: "time", type: "slot",
property: "dd",
}, },
], ],
data: [], data: [],
@ -1262,10 +1271,14 @@ const getData = async () => {
data.tysyList[index].value = res.data.whtysy[key]; data.tysyList[index].value = res.data.whtysy[key];
}); });
// //
data.jtsyList[1].key1_value = res.data.transportation.electricbicycle.cyclingFrequency data.jtsyList[1].key1_value =
data.jtsyList[1].key2_value = res.data.transportation.electricbicycle.cyclingDduration res.data.transportation.electricbicycle.cyclingFrequency;
data.jtsyList[4].key1_value = res.data.transportation.highSpeedRail.trainSchedule data.jtsyList[1].key2_value =
data.jtsyList[4].key2_value = res.data.transportation.highSpeedRail.passengerFlow 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; const getTableTab = (url, currentPage) => {
// http dataTab.url = url;
// .get(`${url}?page=${currentPage}&size=${pagination.pageSize}`) http
// .then((res) => { .get(`${url}?page=${currentPage}&size=${pagination.pageSize}`)
// if (res.code == 200) { .then((res) => {
// tableType.data = res.data; if (res.code == 200) {
// pagination.total = res.count; dataTab.data = res.data;
// dialogShow.value = true; pagination.total = res.count;
// } dialogShowTab.value = true;
// }); }
});
}; };
// //
const qyfyList = reactive([ const qyfyList = reactive([
@ -1333,14 +1347,18 @@ const showEc = (val) => {
case "公共自行车": case "公共自行车":
dataEc.list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 122]; 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.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; dialogShowEc.value = true;
break; break;
case "电动单车": case "电动单车":
dataEc.list1 = [11, 21, 31, 41, 5, 6, 7, 8, 9, 10, 11, 122]; http.get("/api/ggfwyth/ddcList").then((res) => {
dataEc.list2 = [11, 21, 31, 4, 51, 61, 7, 8, 9, 10, 11, 112]; if(res.code == 200){
dataEc.year = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; dataEc.list1=res.data.qxcs;
dataEc.list2=res.data.qxsc;
dataEc.times=res.data.times;
dialogShowEc.value = true; dialogShowEc.value = true;
}
});
break; break;
default: default:
break; break;
@ -1349,12 +1367,12 @@ const showEc = (val) => {
const showTab = (val) => { const showTab = (val) => {
dataTab.title = val; dataTab.title = val;
dataTab.list1 = []; dataTab.list1 = [];
dataTab.year = []; dataTab.times = [];
dataTab.data = []; dataTab.data = [];
switch (val) { switch (val) {
case "公共汽车": case "公共汽车":
dataTab.list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 122]; 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 = [ dataTab.data = [
{ {
bc: "G13214", bc: "G13214",
@ -1376,7 +1394,7 @@ const showTab = (val) => {
break; break;
case "长途汽车": case "长途汽车":
dataTab.list1 = [11, 21, 31, 4, 51, 6, 7, 81, 91, 10, 11, 122]; 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 = [ dataTab.data = [
{ {
bc: "D6456", bc: "D6456",
@ -1397,26 +1415,13 @@ const showTab = (val) => {
dialogShowTab.value = true; dialogShowTab.value = true;
break; break;
case "高铁": case "高铁":
dataTab.list1 = [1, 222, 333, 444, 5, 6, 7, 8, 9, 10, 11, 122]; getTableTab("/api/ggfwyth/lyzlcskList", pagination.currentPage);
dataTab.year = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; http.get(`/api/ggfwyth/lckll`).then((res) => {
dataTab.data = [ if (res.code == 200) {
{ dataTab.list1=res.data.data;
bc: "G13214", dataTab.times=res.data.times;
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;
break; break;
default: default:
break; break;
@ -2407,7 +2412,7 @@ const showTab = (val) => {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 50%; width: 50%;
.dailyActivitybottom{ .dailyActivitybottom {
display: flex; display: flex;
align-items: center; align-items: center;
} }
@ -2424,7 +2429,6 @@ const showTab = (val) => {
font-style: normal; font-style: normal;
display: inline-block; display: inline-block;
} }
} }
} }
// //