0218 改变日期函数处理

This commit is contained in:
pm 2025-02-18 21:58:52 +08:00
parent 743f30cbb9
commit f1968de5d9
3 changed files with 124 additions and 107 deletions

View File

@ -8,7 +8,7 @@
<div class="search-area">
<div class="search-item">
<label for="year">年度:</label>
<input type="number" v-model="year" class="year-input"/>
<input type="number" v-model="year" class="year-input" @change="handleChangeYear" />
</div>
<div class="search-item">
<label for="taskName">任务名称:</label>
@ -116,9 +116,7 @@ export default {
try {
const data = {
command: "SearchTask",
year: this.year,
taskName: this.taskName
command: "LoadScenario"
}
webrtc.webrtc.emitUIInter(data);
} catch (error) {
@ -136,6 +134,18 @@ export default {
console.error('Error in emitCommand:', error);
}
},
handleChangeYear() {
const data = {
command: "LoadScenarioTask",
year: this.year
};
try {
webrtc.webrtc.emitUIInter(data);
} catch (error) {
console.error('Error in emitCommand:', error);
}
},
},
created() {
this.initData();
@ -216,7 +226,8 @@ h2 {
width: 100px;
}
input, select {
input,
select {
background-color: #1e2c42;
border: 1px solid #3a4b66;
color: white;
@ -238,7 +249,8 @@ table {
background-color: #1e2c42;
}
th, td {
th,
td {
border: 1px solid #3a4b66;
padding: 4px;
text-align: center;
@ -289,7 +301,8 @@ button {
line-height: 16px;
}
.search-btn, .reset-btn {
.search-btn,
.reset-btn {
padding: 2px 8px;
height: 20px;
line-height: 16px;

View File

@ -775,8 +775,7 @@ function onWebRtcAnswer(webRTCData) {
// qualityStatus.className = `${color}Status`;
statsText += `<div>Duration: ${timeFormat.format(runTimeHours)}:${timeFormat.format(runTimeMinutes)}:${timeFormat.format(runTimeSeconds)}</div>`;
statsText += `<div>Video Resolution: ${
aggregatedStats.hasOwnProperty('frameWidth') && aggregatedStats.frameWidth && aggregatedStats.hasOwnProperty('frameHeight') && aggregatedStats.frameHeight ?
statsText += `<div>Video Resolution: ${aggregatedStats.hasOwnProperty('frameWidth') && aggregatedStats.frameWidth && aggregatedStats.hasOwnProperty('frameHeight') && aggregatedStats.frameHeight ?
aggregatedStats.frameWidth + 'x' + aggregatedStats.frameHeight : 'Chrome only'
}</div>`;
statsText += `<div>Received (${receivedBytesMeasurement}): ${numberFormat.format(receivedBytes)}</div>`;
@ -1866,7 +1865,7 @@ function connect() {
}
// ws = new WebSocket("ws://localhost/");
// ws = new WebSocket(window.location.href.replace('http://', 'ws://').replace('https://', 'wss://'));
let connectionUrl = window.location.href.replace('http://', 'ws://').replace('https://', 'wss://').replace(/:\d+/, '');
let connectionUrl = window.location.href.replace('http://', 'ws://').replace('https://', 'wss://').replace(/:\d+/, ':8000');
console.log(`Creating a websocket connection to: ${connectionUrl}`);
ws = new WebSocket(connectionUrl);
ws.attemptStreamReconnection = true;
@ -1942,8 +1941,10 @@ let webrtc =
webRtcPlayer: webRtcPlayerObj,
playVideo: playVideoStream,
resizePlayer: resizePlayerStyle,
emitUIInter:emitUIInteraction
emitUIInter: emitUIInteraction,
emitCommand: emitCommand
}
export default
{
webrtc

View File

@ -1,5 +1,8 @@
module.exports =
{
configureWebpack: {
devtool: "source-map",
},
css:
{
loaderOptions: