Commit 3f9628e5 authored by ninglx's avatar ninglx

修正部分问题

parent fad89d6d
......@@ -23,6 +23,12 @@ export const getReports = (data) =>
method: 'post',
data: data
})
export const getReportsByPage = (data) =>
request({
url: '/design/component/resource/byPage',
method: 'post',
data: data
})
export const getPart5Text = (data) =>
request({
url: '/holo/analysis-report/cross-organize-diag',
......
<template>
<div class="reports">
<!-- <div class="previewDialog" v-if="showPreview">
<div class="anaReportHeader">
报告预览
<el-button class="back" type="primary" @click="showPreview = false"
>返回
</el-button>
</div>
<div class="preview_content">
<iframe :src="iframeUrl" height="100%" width="100%"></iframe>
</div>
</div> -->
<div class="his-report">
<div class="anaReportHeader">
历史报告
......@@ -123,7 +112,7 @@
<script>
import { download, getBlob } from "../../../utils/request";
// import fetch from "@/utils/fetch";
import { getReports } from "../../../dao/analysis";
import { getReports, getReportsByPage } from "../../../dao/analysis";
import JSZip from "jszip";
export default {
name: "reports",
......@@ -191,7 +180,7 @@ export default {
window.open(report.url);
},
tabClick(e) {
// console.log("click...", e);
// console.log("click...", e);
this.getReportsContent(e.name, "");
},
refreshGroups(group) {
......@@ -200,15 +189,22 @@ export default {
},
getReportsContent(requestGroupId, filterName) {
this.tabLoading = true;
getReports({
keyword: filterName,
groupId: requestGroupId,
getReportsByPage({
condition: {
keyword: filterName,
groupId: requestGroupId,
},
pageNum: 1,
pageSize: 99999,
}).then((res) => {
console.log("bypage", res);
this.tabLoading = false;
for (let ite of res.content) {
ite.check = false;
if (res.content.rows && Array.isArray(res.content.rows)) {
for (let ite of res.content.rows) {
ite.check = false;
}
this.tabItemReports[requestGroupId] = res.content.rows;
}
this.tabItemReports[requestGroupId] = res.content;
});
},
hideSelectBox() {
......@@ -234,7 +230,7 @@ export default {
urls.push(`/group1${item.url.split("group1")[1]}`);
}
}
// console.log("dabaoxiazai", urls);
// console.log("dabaoxiazai", urls);
const processedNames = new Set();
const zip = new JSZip();
const promises = urls.map(async (url, index) => {
......@@ -250,8 +246,8 @@ export default {
let count = 1;
let originalName = name;
while (processedNames.has(name)) {
// name = `${originalName}_${count}`;
name = `${originalName.split('.pdf')[0]}_${count}.pdf`
// name = `${originalName}_${count}`;
name = `${originalName.split(".pdf")[0]}_${count}.pdf`;
count++;
}
processedNames.add(name);
......@@ -470,39 +466,5 @@ export default {
}
}
}
.previewDialog {
position: absolute;
width: 100%;
height: 100%;
padding: 8px 16px 0 16px;
top: 0;
left: 0;
z-index: 9;
background: #040d1c;
.preview_content {
height: calc(100% - 40px);
padding: 10px 200px;
width: 100%;
display: flex;
justify-content: center;
}
}
.anaReportHeader {
color: white;
height: 40px;
line-height: 40px;
background: url("../../../assets/images/holo/title.png");
background-size: 100% 100%;
z-index: 2;
font-size: 20px;
font-weight: bold;
padding-left: 30px;
position: relative;
.back {
position: absolute;
right: 80px;
top: 4px;
}
}
}
</style>
<template>
<div v-show="titleShow" class="p__part1_container">
<span class="p__span">&nbsp;&nbsp;&nbsp;路口概况</span>
<span class="p__span">&nbsp;&nbsp;&nbsp;路口概况</span>
<p class="p__p">
<span v-show="VisInclude('a1')"
>{{ crossName }}路口位于{{ areaName }},路口类型是{{
......@@ -211,7 +211,7 @@ export default {
this.loadFlowLines();
} else {
let timer = setInterval(() => {
console.log('111',this.map11Ready,this.map12Ready);
console.log("111", this.map11Ready, this.map12Ready);
if (this.map11Ready && this.map12Ready) {
clearInterval(timer);
this.canvasToPng();
......@@ -263,6 +263,15 @@ export default {
}
this.tableData.push(totalRow);
// 验证tableData是否含有有效数据 否则填充占位数据防止表格变形
console.log("table...", this.tableData);
if (this.tableData.length === 1) {
for (let item of [1, 2, 3, 4]) {
this.tableColumns.push(item)
this.tableData[0][`prop${item}`] = "";
}
}
// lines
let linesGeo = this.convertToLineWithWkt(lines.content);
let startF = [];
......@@ -314,9 +323,9 @@ export default {
mapTools.addOrUpdateFlowLineR(map12, linesGeo);
mapTools.addOrUpdateFlowLineRArrow(map12, endFGeo);
mapTools.addOrUpdateFlowLineRText(map12, midPointWithFlowGeo);
let timer = setInterval(() => {
console.log('111',this.map11Ready,this.map12Ready);
console.log("111", this.map11Ready, this.map12Ready);
if (this.map11Ready && this.map12Ready) {
clearInterval(timer);
......
<template>
<div v-show="titleShow">
<span class="p__span">&nbsp;&nbsp;&nbsp;路口运行状态分析</span>
<span class="p__span">&nbsp;&nbsp;&nbsp;路口运行状态分析</span>
<p v-show="VisInclude('b1')" class="p__p" id="p__p2_1">
{{ timeRange }}
期间,{{ crossName }}路口总体处于{{ crossStatusVal }}状态,平均交通指数为
......
<template>
<div v-show="titleShow">
<span class="p__span">&nbsp;&nbsp;&nbsp;路口交通信号分析</span>
<span class="p__span">&nbsp;&nbsp;&nbsp;路口交通信号分析</span>
<p class="p__p" id="p__p3">
<span v-show="VisInclude('c1')"
>{{ timeRange }}期间,
......
<template>
<div v-show="titleShow">
<span class="p__span">&nbsp;&nbsp;&nbsp;路口交通安全分析</span>
<span class="p__span">&nbsp;&nbsp;&nbsp;路口交通安全分析</span>
<p class="p__p" id="p__p4_1">
<span v-show="VisInclude('d1')">{{ timeRange }}期间,
{{ crossName }}路口主要交通违法事件为{{
......
<template>
<div v-show="titleShow">
<span class="p__span">&nbsp;&nbsp;&nbsp;路口交通组织分析</span>
<span class="p__span">&nbsp;&nbsp;&nbsp;路口交通组织分析</span>
<p class="p__p" id="p__p5_1">
{{ timeRange }}期间,{{ crossName }}路口{{ laneOrgSuggestVal }}
<!-- {{ timeRange }}期间,{{ crossName }}路口{{ laneOrgSuggestVal }}。 -->
{{ timeRange }}期间,{{ crossName }}路口车道功能配置{{reasonAbleVal}},进出口车道{{isOffsetVal}}偏移,进出口车道匹配{{isMatchVal}}得当。
</p>
<!-- <p class="p__p" id="p__p5_2">
路口{{ dirs }}{{ turns }} {{ sightOrgSuggestVal }}
</p> -->
<!-- <p class="empty-line"></p>
<div class="p__flex p__chartHeight p55map">
<div style="width: 49%">
<w-map ref="report51" mapId="report_5_1" />
</div>
<div style="width: 49%">
<w-map ref="report52" mapId="report_5_2" />
</div>
</div> -->
</div>
</template>
......@@ -45,6 +34,15 @@ export default {
}
return false;
},
reasonAbleVal(){
return this.p5Text.laneOrgSuggest==0?'不合理':'合理'
},
isOffsetVal(){
return this.p5Text.inoutLaneOffsetStatus==0?'':''
},
isMatchVal(){
return this.p5Text.inoutLaneMatchStatus==0?'':''
},
crossName() {
return this.isValid(this.currentCross.name);
},
......@@ -133,20 +131,6 @@ export default {
},
init() {
this.getMixText();
// map51 = this.$refs.report51.initMap({ preserveDrawingBuffer: true });
// map52 = this.$refs.report52.initMap({ preserveDrawingBuffer: true });
// map51.on("style.load", () => {
// this.mapCanvasToPng(map51, "report_5_1");
// map51.setCenter(this.currentCross.location.split(","));
// map51.setPitch(0);
// map51.setZoom(18);
// });
// map52.on("style.load", () => {
// map52.setCenter(this.currentCross.location.split(","));
// map52.setPitch(0);
// map52.setZoom(18);
// this.mapCanvasToPng(map52, "report_5_2");
// });
},
},
};
......
......@@ -157,10 +157,13 @@
</div>
<div class="previewDialog" v-if="showPreview">
<div class="anaReportHeader">
报告预览
<el-button class="back" type="primary" @click="showPreview = false"
>返回
</el-button>
<div>报告预览</div>
<div>
<el-button type="success" @click="generate">报告生成</el-button>
<el-button class="back" type="primary" @click="showPreview = false"
>返回
</el-button>
</div>
</div>
<div class="preview_content">
<iframe :src="getIframeUrl()" height="100%" width="100%"></iframe>
......@@ -241,7 +244,7 @@ export default {
organization: [
{ label: "车道功能分析", value: "e1" },
{ label: "进出口车道是否偏移", value: "e2" },
{ label: "进出口车道匹配", value: "e3" },
{ label: "进出口车道是否匹配", value: "e3" },
],
run: [
{ label: "路口状态", value: "b1" },
......@@ -268,12 +271,12 @@ export default {
{
code: "0A326793EDF049B0AC44569D5B8792D8",
label: "月报",
days: 30,
days: [30, 31],
},
{
code: "FECDF15DDAEA48299C136CCADA2168C9",
label: "季报",
days: 90,
days: [90, 100],
},
{
code: "EA18339AE50B444693E4CDEF770C7B92",
......@@ -405,8 +408,20 @@ export default {
);
let reportType = this.tabGroups[this.tabGroups.length - 1];
for (let item of this.tabGroups) {
if (item.days && item.days === days) {
reportType = item;
// 如果有报告天数规则
if (item.days) {
// 如果是区间 满足区间条件则reportType为此报告类型
if (Array.isArray(item.days)) {
if (days >= item.days[0] && days <= item.days[1]) {
reportType = item;
}
}
// 否则 == 判断
else {
if (days == item.days) {
reportType = item;
}
}
}
}
let urlFinal = this.getIframeUrl();
......@@ -521,12 +536,16 @@ export default {
font-size: 20px;
font-weight: bold;
padding-left: 30px;
padding-right: 75px;
position: relative;
.back {
position: absolute;
right: 80px;
top: 4px;
}
display: flex;
align-items: center;
justify-content: space-between;
// .back {
// position: absolute;
// right: 80px;
// top: 4px;
// }
}
.reportMain {
z-index: 4;
......@@ -652,6 +671,7 @@ export default {
z-index: 9;
background: #040d1c;
.preview_content {
padding: 20px;
height: calc(100% - 40px);
// padding: 10px 200px;
// width: 100%;
......
......@@ -82,6 +82,7 @@
class="trafficItem"
v-for="i of item.eventTypeList"
:key="i"
:title='`${i.eventName} ${i.number}`'
>
<span class="left">
<span class="circle4"></span>{{ i.eventName }}</span
......@@ -1608,18 +1609,21 @@ export default {
flex-flow: row wrap;
.trafficItem {
width: 48%;
font-size: 14px;
flex: 0 0 49.2%;
height: 34px;
margin-bottom: 7px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: rgba(0, 14, 39, 1);
.left {
overflow: hidden;
text-overflow: ellipsis;
max-width: 85%;
// max-width: 85%;
width:75%;
white-space: nowrap;
.circle4 {
......@@ -1643,7 +1647,8 @@ export default {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
max-width: 80%;
width: 18%;
// max-width: 80%;
white-space: nowrap;
}
}
......
......@@ -738,6 +738,11 @@ export default {
},
// 模块一 模块二 请求轨迹并播放
queryPathByTime(rowData) {
if (!rowData.tracks || !rowData.tracks.length) {
ELEMENT.Message.warning("当前数据无轨迹对应时间,无法获取轨迹!");
return;
}
console.log("rowData", rowData);
viewer.entities.removeAll();
viewerS.entities.removeAll();
this.currentView = "first";
......
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