页面样式调整

This commit is contained in:
白菜
2025-06-24 23:50:29 +08:00
parent 6cec2849ba
commit d68d48ddee
13 changed files with 183 additions and 118 deletions

View File

@ -10,8 +10,8 @@
<div>数据更新时间2024-10-11 12:00:00</div>
</div>
<div class="pcs-btns">
<el-button type="warning" size="small">警告按钮</el-button>
<el-button size="small">默认按钮</el-button>
<el-button type="warning" size="small" @click="problemSaved">故障复位</el-button>
<el-button size="small" @click="machineClosed">关机</el-button>
</div>
</el-header>
<el-main style="padding: 0">
@ -45,6 +45,7 @@
import RealTimeBaseInfo from "./../RealTimeBaseInfo.vue";
export default {
name:'ZdjkSbjkPcs',
components:{RealTimeBaseInfo},
data() {
return {
@ -67,6 +68,70 @@ export default {
],
}
},
methods:{
problemSaved(){
this.$confirm('确认故障已复位?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
showClose:false,
closeOnClickModal:false,
type: 'warning',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
instance.confirmButtonLoading = true;
setTimeout(() => {
// todo 调用接口如果关机成功 调用done方法 否则不关闭弹窗
done();
// setTimeout(() => {
instance.confirmButtonLoading = false;
// }, 300);
}, 3000);
} else {
done();
}
}
}).then(() => {
//只有在故障复位成功的情况下会走到这里
this.$message({
type: 'success',
message: '故障复位成功!'
});
}).catch(() => {
//取消复位
});
},
machineClosed(){
this.$confirm('确认要关机吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
showClose:false,
closeOnClickModal:false,
type: 'warning',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
instance.confirmButtonLoading = true;
setTimeout(() => {
// todo 调用接口如果关机成功 调用done方法 否则不关闭弹窗
done();
// setTimeout(() => {
instance.confirmButtonLoading = false;
// }, 300);
}, 3000);
} else {
done();
}
}
}).then(() => {
//只有在关机成功的情况下会走到这里
this.$message({
type: 'success',
message: '关机成功!'
});
}).catch(() => {
//取消关机
});
}
}
}
</script>