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