master
“yu” 2024-07-18 00:34:49 +08:00
parent f924c18301
commit 622a29616c
1 changed files with 87 additions and 3 deletions

View File

@ -434,9 +434,21 @@
<!-- 添加提交按钮 --> <!-- 添加提交按钮 -->
<el-form-item> <el-form-item>
<el-button type="primary"></el-button> <el-button type="primary"></el-button>
<el-button type="primary" @click="submitForm()" <el-button
type="primary"
v-if="!send_Status"
:class="[btn_sendFlag ? '' : 'send_drp', `btnbg fs35 `]"
@click="submitForm()"
>下发指令</el-button >下发指令</el-button
> >
<div class="send_box" v-else>
<span class="fs45">发送中</span>
<div class="loading-dots">
<span>.</span>
<span>.</span>
<span>.</span>
</div>
</div>
<!-- @click="submitForm('formRef')" --> <!-- @click="submitForm('formRef')" -->
<!-- <el-button @click="resetForm('formRef')"></el-button> --> <!-- <el-button @click="resetForm('formRef')"></el-button> -->
</el-form-item> </el-form-item>
@ -757,8 +769,10 @@ const handledata_time = (data_s: any, time_s: any) => {
const formattedDate = `${year}-${month}-${day}`; const formattedDate = `${year}-${month}-${day}`;
return `${formattedDate} ${time_s}`; return `${formattedDate} ${time_s}`;
}; };
let send_Status = ref(false); //
let btn_sendFlag = ref(false); //
const submitForm = () => { const submitForm = () => {
console.log(formData, "1--------------formData"); send_Status.value = true; // div
// let dataNew // let dataNew
let datat_start = handledata_time( let datat_start = handledata_time(
formData.value.start_date, formData.value.start_date,
@ -777,7 +791,19 @@ const submitForm = () => {
startTime: datat_start, startTime: datat_start,
endTime: datat_end, endTime: datat_end,
}; };
setTimeout(() => {
send_Status.value=false
ajustCarPageFlag.value=false
}, 2000);
setTimeout(() => {
ElMessage({
showClose: true,
message: "指令下发成功",
type: "success",
});
}, 3000);
// send_Status.value=false
ajustInfo_api(datainput).then((res: any) => { ajustInfo_api(datainput).then((res: any) => {
console.log(res, "1-------car"); console.log(res, "1-------car");
}); });
@ -1763,7 +1789,22 @@ const styleVar = computed(() => {
font-size: changeHeight(30) !important; font-size: changeHeight(30) !important;
box-sizing: border-box; box-sizing: border-box;
} }
.send_drp {
cursor: no-drop; //
color: #cccccc;
}
.btns {
cursor: pointer;
display: flex;
width: changeHeight(550);
justify-content: space-between;
font-size: changeHeight(35);
.send_box {
width: changeHeight(250);
}
}
} }
// //
.el-select__wrapper { .el-select__wrapper {
width: changeHeight(120); width: changeHeight(120);
@ -2222,6 +2263,49 @@ const styleVar = computed(() => {
} }
} }
} }
.loading-dots {
display: inline-block;
font-size: changeHeight(80); /* 根据需要调整大小 */
color: #58a7cb; /* 点的颜色 */
}
.loading-dots span {
animation: blink 1s step-start infinite;
}
.loading-dots span:nth-child(1) {
animation-delay: 0s;
}
.loading-dots span:nth-child(2) {
animation-delay: 0.2s; /* 每个点的延迟时间稍微减少一点 */
}
.loading-dots span:nth-child(3) {
animation-delay: 0.4s;
}
.loading-dots span:nth-child(4) {
animation-delay: 0.6s;
}
.loading-dots span:nth-child(5) {
animation-delay: 0.8s;
}
.loading-dots span:nth-child(6) {
animation-delay: 1s;
}
@keyframes blink {
0%,
100% {
opacity: 0;
}
50% {
opacity: 1;
}
}
// //
/* 定义滚动条宽度 */ /* 定义滚动条宽度 */
::-webkit-scrollbar { ::-webkit-scrollbar {