|
|
@@ -14,16 +14,17 @@ |
|
|
|
<div class="tabBar"> |
|
|
|
<span |
|
|
|
:class="[tabIndex == 1 ? 'checkedColor' : 'uncheckedColor']" |
|
|
|
style="margin-right: 97px" |
|
|
|
style="margin-right: 97px;cursor:pointer" |
|
|
|
@click="showTask" |
|
|
|
>任务</span> |
|
|
|
<span |
|
|
|
:class="[tabIndex == 1 ? 'uncheckedColor' : 'checkedColor']" |
|
|
|
style="cursor:pointer" |
|
|
|
@click="showProblem" |
|
|
|
>问题</span> |
|
|
|
</div> |
|
|
|
<div v-if="tabIndex == 1" class="listDetail"> |
|
|
|
<ul> |
|
|
|
<ul style="user-select: none;"> |
|
|
|
<li |
|
|
|
v-for="(item, index) in taskList" |
|
|
|
:key="index" |
|
|
@@ -31,7 +32,7 @@ |
|
|
|
> |
|
|
|
<div |
|
|
|
style=" |
|
|
|
width: 150px; |
|
|
|
width: 195px; |
|
|
|
white-space: nowrap; |
|
|
|
overflow: hidden; |
|
|
|
text-overflow: ellipsis; |
|
|
@@ -41,7 +42,7 @@ |
|
|
|
{{ item.date }} {{ item.taskName }} |
|
|
|
</div> |
|
|
|
<div style="margin-right: 30px">{{ item.statusInfo }}</div> |
|
|
|
<div v-if="item.status == 1" style="float: left; width: 56px"> |
|
|
|
<div v-if="item.status == 1" style="float: left; width: 56px;cursor:pointer"> |
|
|
|
<n-popconfirm |
|
|
|
@positive-click="handlePositiveClick(item)" |
|
|
|
@negative-click="handleNegativeClick" |
|
|
@@ -55,7 +56,7 @@ |
|
|
|
|
|
|
|
<div |
|
|
|
v-else |
|
|
|
style="color: #1890ff; float: left; width: 56px" |
|
|
|
style="color: #1890ff; float: left; width: 56px;cursor:pointer" |
|
|
|
@click="liveShow(item)" |
|
|
|
> |
|
|
|
直播 |
|
|
@@ -71,10 +72,10 @@ |
|
|
|
</div> |
|
|
|
<div v-else class="listDetail"> |
|
|
|
<n-date-picker |
|
|
|
:on-update:formatted-value="abc" |
|
|
|
:default-formatted-value="efg" |
|
|
|
:on-update:formatted-value="changeDate" |
|
|
|
:default-formatted-value="lastSevenDateList" |
|
|
|
type="daterange" |
|
|
|
:default-value="[Date.now() - 6.048e8, Date.now()]" |
|
|
|
|
|
|
|
:is-date-disabled="disablePreviousDate" |
|
|
|
style="margin-bottom: 15px" |
|
|
|
/> |
|
|
@@ -102,8 +103,9 @@ |
|
|
|
<img |
|
|
|
v-if="listChecked == true" |
|
|
|
src="../../../assets/images/listChecked.png" |
|
|
|
style="cursor:pointer" |
|
|
|
> |
|
|
|
<img v-else src="../../../assets/images/listUnchecked.png"> |
|
|
|
<img v-else src="../../../assets/images/listUnchecked.png" style="cursor:pointer"> |
|
|
|
</div> |
|
|
|
|
|
|
|
<span :style="{ color: listChecked ? '#1890FF' : '#666666' }">列表</span> |
|
|
@@ -113,8 +115,9 @@ |
|
|
|
<img |
|
|
|
v-if="airportSelected == true" |
|
|
|
src="../../../assets/images/airportChecked.png" |
|
|
|
style="cursor:pointer" |
|
|
|
> |
|
|
|
<img v-else src="../../../assets/images/airportUnchecked.png"> |
|
|
|
<img v-else src="../../../assets/images/airportUnchecked.png" style="cursor:pointer"> |
|
|
|
</div> |
|
|
|
|
|
|
|
<span :style="{ color: airportSelected ? '#1890FF' : '#666666' }">机场</span> |
|
|
@@ -200,6 +203,8 @@ export default { |
|
|
|
listShow: false, |
|
|
|
// 时间范围是一周前至今天 |
|
|
|
efg: '', |
|
|
|
initDate: 0, |
|
|
|
clickListNum: 0, |
|
|
|
listIcon: new URL( |
|
|
|
'../../../assets/images/listChecked.png', |
|
|
|
import.meta.url |
|
|
@@ -226,7 +231,8 @@ export default { |
|
|
|
listChecked: false, |
|
|
|
airportSelected: true, |
|
|
|
problemLayerList: [], |
|
|
|
airportPopupShow: false |
|
|
|
airportPopupShow: false, |
|
|
|
lastSevenDateList: [] |
|
|
|
}) |
|
|
|
watch( |
|
|
|
() => data.page, |
|
|
@@ -273,6 +279,21 @@ export default { |
|
|
|
}) |
|
|
|
data.map.addLayer(wmsSource) |
|
|
|
wmsSource.setOpacity(0.3) |
|
|
|
// 机场信息覆盖物 |
|
|
|
data.airOverlay = new Overlay({ |
|
|
|
id: 'air_overlay', |
|
|
|
element: document.getElementById('airOverlay'), |
|
|
|
// autoPan: true, |
|
|
|
offset: [10, 10] |
|
|
|
}) |
|
|
|
data.airportPopupShow = true |
|
|
|
|
|
|
|
data.problemOverlay = new Overlay({ |
|
|
|
id: 'problem_overlay', |
|
|
|
element: document.getElementById('problemOverlay'), |
|
|
|
// autoPan: true, |
|
|
|
offset: [10, 10] |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -360,21 +381,6 @@ export default { |
|
|
|
}) |
|
|
|
data.map.addLayer(data.airLayer) |
|
|
|
|
|
|
|
// 机场信息覆盖物 |
|
|
|
data.airOverlay = new Overlay({ |
|
|
|
id: 'air_overlay', |
|
|
|
element: document.getElementById('airOverlay'), |
|
|
|
// autoPan: true, |
|
|
|
offset: [10, 10] |
|
|
|
}) |
|
|
|
data.airportPopupShow = true |
|
|
|
|
|
|
|
data.problemOverlay = new Overlay({ |
|
|
|
id: 'problem_overlay', |
|
|
|
element: document.getElementById('problemOverlay'), |
|
|
|
// autoPan: true, |
|
|
|
offset: [10, 10] |
|
|
|
}) |
|
|
|
// 点击事件 |
|
|
|
data.map.on('click', (evt) => { |
|
|
|
showAirInfo(evt) |
|
|
@@ -382,6 +388,10 @@ export default { |
|
|
|
|
|
|
|
// console.log(new Date().getFullYear()) |
|
|
|
} |
|
|
|
// 获取近7天的日期 |
|
|
|
const initSevenDate = () => { |
|
|
|
data.lastSevenDateList = [getDay(-7), getDay(0)] |
|
|
|
} |
|
|
|
/** |
|
|
|
* 展示机场信息 |
|
|
|
* @param {} e |
|
|
@@ -470,10 +480,24 @@ export default { |
|
|
|
query: { rowInfo: JSON.stringify(item) } |
|
|
|
}) |
|
|
|
} |
|
|
|
const abc = (value) => { |
|
|
|
const changeDate = (value) => { |
|
|
|
if (value) { |
|
|
|
data.lastSevenDateList = value |
|
|
|
} |
|
|
|
if (data.initDate == 0) { |
|
|
|
// 默认加载近7天的问题图层 |
|
|
|
// 获取近7天的日期 |
|
|
|
getQuestionInfo(getDay(-7), getDay(0)) |
|
|
|
} else { |
|
|
|
getQuestionInfo(value[0], value[1]) |
|
|
|
} |
|
|
|
data.initDate += 1 |
|
|
|
} |
|
|
|
// 获取问题图层数据 |
|
|
|
const getQuestionInfo = (startTime, endTime) => { |
|
|
|
getQuestionList({ |
|
|
|
startTime: value[0], |
|
|
|
endTime: value[1] |
|
|
|
startTime: startTime, |
|
|
|
endTime: endTime |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === 0) { |
|
|
|
const arr = res.data |
|
|
@@ -491,10 +515,40 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
// 添加问题图层 |
|
|
|
initProblemType() |
|
|
|
addproblemLayer(nar) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
// 获取日期 |
|
|
|
const getDay = (day) => { |
|
|
|
var today = new Date() |
|
|
|
|
|
|
|
var targetday_milliseconds = today.getTime() + 1000 * 60 * 60 * 24 * day |
|
|
|
|
|
|
|
today.setTime(targetday_milliseconds) // 注意,这行是关键代码 |
|
|
|
|
|
|
|
var tYear = today.getFullYear() |
|
|
|
|
|
|
|
var tMonth = today.getMonth() |
|
|
|
|
|
|
|
var tDate = today.getDate() |
|
|
|
|
|
|
|
tMonth = doHandleMonth(tMonth + 1) |
|
|
|
|
|
|
|
tDate = doHandleMonth(tDate) |
|
|
|
|
|
|
|
return tYear + '-' + tMonth + '-' + tDate |
|
|
|
} |
|
|
|
const doHandleMonth = (month) => { |
|
|
|
var m = month |
|
|
|
|
|
|
|
if (month.toString().length == 1) { |
|
|
|
m = '0' + month |
|
|
|
} |
|
|
|
|
|
|
|
return m |
|
|
|
} |
|
|
|
// 添加问题图层 |
|
|
|
const addproblemLayer = (narr) => { |
|
|
|
if (data.problemLayerList.length > 0) { |
|
|
@@ -505,6 +559,7 @@ export default { |
|
|
|
}) |
|
|
|
data.problemLayerList.length = 0 |
|
|
|
} |
|
|
|
hideProblemInfo() |
|
|
|
narr.map((item) => { |
|
|
|
if (item.fraction.length > 0) { |
|
|
|
const Features = [] |
|
|
@@ -609,6 +664,12 @@ export default { |
|
|
|
* @description:是否展示列表 |
|
|
|
*/ |
|
|
|
const showList = () => { |
|
|
|
// 判断是不是第一次点击列表按钮 |
|
|
|
if (data.clickListNum == 0) { |
|
|
|
// 第一次点击列表按钮会显示问题图层 |
|
|
|
changeDate() |
|
|
|
} |
|
|
|
data.clickListNum += 1 |
|
|
|
data.listChecked = !data.listChecked |
|
|
|
} |
|
|
|
/** |
|
|
@@ -651,6 +712,7 @@ export default { |
|
|
|
initMap() |
|
|
|
initTaskList() |
|
|
|
initProblemType() |
|
|
|
initSevenDate() |
|
|
|
}) |
|
|
|
|
|
|
|
return { |
|
|
@@ -678,7 +740,7 @@ export default { |
|
|
|
} |
|
|
|
return ts > Date.now() |
|
|
|
}, |
|
|
|
abc, |
|
|
|
changeDate, |
|
|
|
showAirportList, |
|
|
|
handleProblemTypeValue, |
|
|
|
hideProblemInfo, |
|
|
@@ -776,7 +838,7 @@ export default { |
|
|
|
position: absolute; |
|
|
|
top: 64px; |
|
|
|
right: 90px; |
|
|
|
width: 355px; |
|
|
|
width: 400px; |
|
|
|
height: 428px; |
|
|
|
background: #000000; |
|
|
|
box-sizing: border-box; |
|
|
@@ -797,7 +859,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
.listDetail { |
|
|
|
width: 345px; |
|
|
|
width: 390px; |
|
|
|
height: 383px; |
|
|
|
background: #2c2c2c; |
|
|
|
font-size: 14px; |