Commit 535c681d authored by 蔡伟's avatar 蔡伟

Merge branch 'feat/layout-style' into 'dev'

fix(*): 修改登录逻辑

See merge request !11
parents 17e8fae2 d5aaddd8
......@@ -17,6 +17,7 @@ const routes = [
{
path: '/',
component: Layout,
redirect: '/dashboard',
children: [
{
path: '/dashboard',
......
......@@ -70,70 +70,69 @@ const customColorMethod = (percentage) => {
};
const healthOverview = () => {
// getHealthOverview().then(res => {
// healthOverview.value = res.data
// })
const res = {
"data": {
"average": "20%",
"bag": "10%",
"pulseValve": "20%",
"poppetValve": "30%"
},
msg: "访问成功",
success: true,
code: 1
}
average.value = Number(res.data.average.split('%')[0])
getHealthOverview().then(res => {
average.value = Number(res.data.average.split('%')[0])
bag.value = Number(res.data.bag.split('%')[0])
pulseValve.value = Number(res.data.pulseValve.split('%')[0])
poppetValve.value = Number(res.data.poppetValve.split('%')[0])
})
// const res = {
// "data": {
// "average": "20%",
// "bag": "10%",
// "pulseValve": "20%",
// "poppetValve": "30%"
// },
// msg: "访问成功",
// success: true,
// code: 1
// }
}
const healthStatistic = () => {
// getHealthStatistic().then(res => {
// healthStatistic.value = res.data
// })
const res = {
"data": [
{
"date": "2025-05-01",
"healthDegree": "75"
},
{
"date": "2025-05-02",
"healthDegree": "68"
}
],
"msg": "访问成功",
"success": true,
code: 1,
};
chartData.value = res.data;
getHealthStatistic().then(res => {
chartData.value = res.data;
})
// const res = {
// "data": [
// {
// "date": "2025-05-01",
// "healthDegree": "75"
// },
// {
// "date": "2025-05-02",
// "healthDegree": "68"
// }
// ],
// "msg": "访问成功",
// "success": true,
// code: 1,
// };
};
const exceptionMonitor = () => {
// getExceptionMonitor().then(res => {
// exceptionMonitor.value = res.data
// })
const res = {
"data": [
{
"date": "2025-05-01 10:00",
"dusterName": "3#除尘器",
"message": "三仓室存在轻重泄露"
},
{
"date": "2025-05-01 10:00",
"dusterName": "3#除尘器",
"message": "三仓室存在轻重泄露"
}
],
msg: "访问成功",
success: true,
code: 1
}
msgList.value = res.data;
getExceptionMonitor().then(res => {
msgList.value = res.data;
})
// const res = {
// "data": [
// {
// "date": "2025-05-01 10:00",
// "dusterName": "3#除尘器",
// "message": "三仓室存在轻重泄露"
// },
// {
// "date": "2025-05-01 10:00",
// "dusterName": "3#除尘器",
// "message": "三仓室存在轻重泄露"
// }
// ],
// msg: "访问成功",
// success: true,
// code: 1
// }
// msgList.value = res.data;
}
onMounted(async () => {
......
......@@ -5,7 +5,7 @@
<img src="@/assets/icons/warn.png" alt="dust" />
<div class="title">
<span>泄漏告警(条)</span>
<div class="content">6</div>
<div class="content">{{dusterLeakNum}}</div>
</div>
</div>
......@@ -13,7 +13,7 @@
<img src="@/assets/icons/health.png" alt="dust" />
<div class="title">
<span>综合健康度</span>
<div class="content">98%</div>
<div class="content">{{healthPercent}}</div>
</div>
</div>
......@@ -21,7 +21,7 @@
<img src="@/assets/icons/close.png" alt="dust" />
<div class="title">
<span>闭环(条)</span>
<div class="content">6</div>
<div class="content">{{closeLoopNum}}</div>
</div>
</div>
</div>
......@@ -167,6 +167,9 @@ const formInline = ref({
const currentPage = ref(1);
const pageSize = ref(10);
const dusterLeakNum = ref(0);
const healthPercent = ref('100%');
const closeLoopNum = ref(0);
const options = ref([
{
......@@ -600,7 +603,31 @@ const handleSaveDustCollector = (data) => {
isAddDustCollectorVisible.value = false;
};
onMounted(async () => {});
const IdusterLeakNum = () => {
getDusterLeakNum().then(res => {
dusterLeakNum.value = res.data || 0;
})
}
const IhealthPercent = () => {
getHealthPercent().then(res => {
healthPercent.value = res.data || '100%';
})
}
const IcloseLoopNum = () => {
getCloseLoopNum().then(res => {
closeLoopNum.value = res.data || 0;
})
}
onMounted(async () => {
IdusterLeakNum();
IhealthPercent();
IcloseLoopNum();
});
onBeforeUnmount(() => {});
</script>
......
......@@ -304,7 +304,7 @@ export default {
} else if (
bindIphones &&
bindIphones.length > 0 &&
$.inArray(value, bindIphones) < 0
!bindIphones.includes(value)
) {
callback(new Error("该手机号码没有绑定过"));
this.captchaSendStatus = true;
......@@ -840,8 +840,9 @@ export default {
this.store
.login(phoneFormOrigin)
.then((data) => {
console.log(!bindIphones.includes(this.phoneForm.iphone) && this.phoneForm.captcha != "BME202288");
if (
$.inArray(this.phoneForm.iphone, bindIphones) < 0 &&
!bindIphones.includes(this.phoneForm.iphone) &&
this.phoneForm.captcha != "BME202288"
) {
postData("/user/updateAccountIphone", {
......@@ -853,6 +854,7 @@ export default {
}
});
} else {
console.log(data);
this.getProfile(data);
}
})
......
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