Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DC-TOM
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘照晖
DC-TOM
Commits
d5aaddd8
Commit
d5aaddd8
authored
May 23, 2025
by
Cai Wei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(*): 修改登录逻辑
parent
17e8fae2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
61 deletions
+90
-61
index.js
src/router/index.js
+1
-0
index.vue
src/views/dashboard/index.vue
+54
-55
index.vue
src/views/dustOverview/index.vue
+31
-4
index.vue
src/views/login/index.vue
+4
-2
No files found.
src/router/index.js
View file @
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'
,
...
...
src/views/dashboard/index.vue
View file @
d5aaddd8
...
@@ -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
()
=>
{
...
...
src/views/dustOverview/index.vue
View file @
d5aaddd8
...
@@ -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
>
...
...
src/views/login/index.vue
View file @
d5aaddd8
...
@@ -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
);
}
}
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment