Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
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
海康威视
web-project
Commits
43ea53e8
Commit
43ea53e8
authored
Jan 13, 2025
by
方建宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
警告接口、热用户数据接口、AI无人站接口
parent
22f69d70
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
124 additions
and
121 deletions
+124
-121
AItoken.js
src/views/AIStation/AItoken.js
+28
-28
HeatUserPage.vue
src/views/HeatUserPage/HeatUserPage.vue
+22
-19
home.vue
src/views/home.vue
+74
-74
No files found.
src/views/AIStation/AItoken.js
View file @
43ea53e8
...
@@ -6,22 +6,22 @@ import store from "@/store/index.js";
...
@@ -6,22 +6,22 @@ import store from "@/store/index.js";
export
function
handleGetAIToken
()
{
export
function
handleGetAIToken
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
AIToken
=
localStorage
.
getItem
(
'AIToken'
);
const
AIToken
=
localStorage
.
getItem
(
'AIToken'
);
if
(
AIToken
)
{
//
if (AIToken) {
// 有存储token判断token有没有过期
//
// 有存储token判断token有没有过期
// 检验token是否过期
//
// 检验token是否过期
checkToken
(
AIToken
).
then
(
res
=>
{
//
checkToken(AIToken).then(res => {
if
(
res
.
data
===
false
)
{
//
if (res.data === false) {
localStorage
.
removeItem
(
'AIToken'
);
//
localStorage.removeItem('AIToken');
// token过期
//
// token过期
getToken
().
then
(
resolve
).
catch
(
reject
);
//
getToken().then(resolve).catch(reject);
}
else
{
//
} else {
resolve
();
//
resolve();
}
//
}
}).
catch
(
reject
);
//
}).catch(reject);
}
else
{
//
} else {
// 没有token的话获取存储token
//
// 没有token的话获取存储token
getToken
().
then
(
resolve
).
catch
(
reject
);
//
getToken().then(resolve).catch(reject);
}
//
}
});
});
}
}
...
@@ -31,17 +31,17 @@ function getToken() {
...
@@ -31,17 +31,17 @@ function getToken() {
const
userId
=
userInfo
.
userId
;
const
userId
=
userInfo
.
userId
;
const
params
=
{
username
:
userName
};
const
params
=
{
username
:
userName
};
// 通过userName获取uuid
// 通过userName获取uuid
return
getAuthUUID
(
params
).
then
(
res
=>
{
//
return getAuthUUID(params).then(res => {
const
uuid
=
res
.
data
;
//
const uuid = res.data;
const
params
=
{
//
const params = {
userId
:
userId
,
//
userId: userId,
username
:
userName
,
//
username: userName,
uuid
:
uuid
,
//
uuid: uuid,
};
//
};
// 通过userId,username,uuid获取token
// 通过userId,username,uuid获取token
return
createToken
(
params
).
then
(
r
es
=>
{
// return createToken(params).then(r-
es => {
const
token
=
res
.
data
;
//
const token = res.data;
localStorage
.
setItem
(
'AIToken'
,
token
);
//
localStorage.setItem('AIToken', token);
});
//
});
});
//
});
}
}
src/views/HeatUserPage/HeatUserPage.vue
View file @
43ea53e8
...
@@ -10,16 +10,16 @@
...
@@ -10,16 +10,16 @@
@
change=
"changeData"
/>
@
change=
"changeData"
/>
</div>
</div>
</div>
</div>
<div
class=
"div-dropdown text-center"
>
<div
class=
"div-dropdown text-center"
>
<el-form-item
label=
"小区名称:"
>
<el-form-item
label=
"小区名称:"
>
<el-cascader
:options=
"DataInfo.tree"
v-model=
"DataInfo.name"
:props=
"props"
collapse-tags
<el-cascader
:options=
"DataInfo.tree"
v-model=
"DataInfo.name"
:props=
"props"
collapse-tags
clearable
:show-all-levels=
"false"
filterable
placeholder=
"请选择"
style=
"min-width: 280px;"
/>
clearable
:show-all-levels=
"false"
filterable
placeholder=
"请选择"
style=
"min-width: 280px;"
/>
</el-form-item>
</el-form-item>
</div>
</div>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
>
<div
class=
"div-time-picker"
v-show=
"isHisData"
>
<div
class=
"div-time-picker"
v-show=
"isHisData"
>
<el-form-item
label=
"开始时间:"
style=
"margin-right: 20px;"
>
<el-form-item
label=
"开始时间:"
style=
"margin-right: 20px;"
>
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-button
class=
"el-button-button"
type=
"primary"
:span=
"6"
@
click=
"ExportDataFile"
>
<el-button
class=
"el-button-button"
type=
"primary"
:span=
"6"
@
click=
"ExportDataFile"
>
导出
</el-button>
导出
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
</div>
</div>
</el-col>
</el-col>
...
@@ -193,8 +193,8 @@
...
@@ -193,8 +193,8 @@
padding-top: 7px;
padding-top: 7px;
height: 50px;
height: 50px;
padding-left: 10px;
padding-left: 10px;
.el-dropdown-link {
.el-dropdown-link {
margin-top: 5px;
margin-top: 5px;
color: white;
color: white;
...
@@ -490,17 +490,20 @@ async function getName() {
...
@@ -490,17 +490,20 @@ async function getName() {
//根据参数获得数据
//根据参数获得数据
async
function
getHisDataByInfo
(
name
,
start
,
end
,
startPage
,
pagesCount
,
sort
)
{
async
function
getHisDataByInfo
(
name
,
start
,
end
,
startPage
,
pagesCount
,
sort
)
{
loading
.
value
=
true
loading
.
value
=
true
await
http
.
post
(
dataUrl
,
{
name
:
name
,
startTime
:
start
,
endTime
:
end
,
start
:
startPage
,
count
:
pagesCount
,
sort
:
sort
}).
then
((
result
)
=>
{
//
await http.post(dataUrl, { name: name, startTime: start, endTime: end, start: startPage, count: pagesCount, sort: sort }).then((result) => {
if
(
result
.
status
===
0
)
{
//
if (result.status === 0) {
//处理返回数据
//处理返回数据
tableInfo
.
hisData
=
result
.
data
.
dataInfoList
;
// tableInfo.hisData = result.data.dataInfoList;
total
.
value
=
result
.
data
.
rowCount
;
// total.value = result.data.rowCount;
setshowData
();
// setshowData();
}
else
{
tableInfo
.
hisData
=
tigerTigerHeatUserHis
.
dataInfoList
;
tableInfo
.
tableData
.
length
=
0
;
total
.
value
=
tigerTigerHeatUserHis
.
rowCount
;
total
.
value
=
0
;
setshowData
();
}
// } else {
})
// tableInfo.tableData.length = 0;
// total.value=0;
// }
// })
loading
.
value
=
false
loading
.
value
=
false
}
}
...
@@ -677,7 +680,7 @@ function getFileName(name){
...
@@ -677,7 +680,7 @@ function getFileName(name){
const
hours
=
now
.
getHours
().
toString
().
padStart
(
2
,
'0'
);
const
hours
=
now
.
getHours
().
toString
().
padStart
(
2
,
'0'
);
const
minutes
=
now
.
getMinutes
().
toString
().
padStart
(
2
,
'0'
);
const
minutes
=
now
.
getMinutes
().
toString
().
padStart
(
2
,
'0'
);
const
seconds
=
now
.
getSeconds
().
toString
().
padStart
(
2
,
'0'
);
const
seconds
=
now
.
getSeconds
().
toString
().
padStart
(
2
,
'0'
);
return
name
+
`_
${
year
}${
month
}${
day
}${
hours
}${
minutes
}${
seconds
}
.xls`
;
return
name
+
`_
${
year
}${
month
}${
day
}${
hours
}${
minutes
}${
seconds
}
.xls`
;
}
}
//表格样式设置
//表格样式设置
...
@@ -774,4 +777,4 @@ function sortMethod({ order, prop }) {
...
@@ -774,4 +777,4 @@ function sortMethod({ order, prop }) {
//页面载入
//页面载入
init
();
init
();
</
script
>
</
script
>
\ No newline at end of file
src/views/home.vue
View file @
43ea53e8
...
@@ -864,80 +864,80 @@ export default defineComponent({
...
@@ -864,80 +864,80 @@ export default defineComponent({
RoleId
:
roleIds
.
value
,
RoleId
:
roleIds
.
value
,
};
};
}
}
//警告接口
function
alarm
()
{
//
function alarm() {
http
//
http
.
post
(
"/api/alarm/GetAlarmMsg"
,
AlarmInfo
.
value
,
false
)
//
.post("/api/alarm/GetAlarmMsg", AlarmInfo.value, false)
.
then
((
result
)
=>
{
//
.then((result) => {
if
(
result
.
success
&&
result
.
data
.
lenth
===
0
&&
sta
.
value
===
0
)
{
//
if (result.success && result.data.lenth === 0 && sta.value === 0) {
sta
.
value
=
1
;
//
sta.value = 1;
title
.
value
=
result
.
data
[
0
].
title
;
//
title.value = result.data[0].title;
msg
.
value
=
result
.
data
[
0
].
msg
;
//
msg.value = result.data[0].msg;
id
.
value
=
result
.
data
[
0
].
id
;
//
id.value = result.data[0].id;
ElNotification
({
//
ElNotification({
title
:
title
.
value
,
//
title: title.value,
dangerouslyUseHTMLString
:
true
,
//
dangerouslyUseHTMLString: true,
message
:
msg
.
value
.
replace
(
"
\n
"
,
"<br />"
),
//
message: msg.value.replace("\n", "
<
br
/>
"),
position
:
"bottom-right"
,
//
position: "
bottom
-
right
",
type
:
"error"
,
//
type: "
error
",
duration
:
0
,
//
duration: 0,
onClick
()
{
//
onClick() {
activeTable
.
value
=
"/Video"
;
//
activeTable.value = "
/
Video
";
localStorage
.
setItem
(
"activeTab"
,
"/Video"
);
//
localStorage.setItem("
activeTab
", "
/
Video
");
//路由跳转
//
//路由跳转
this
.
$router
.
push
({
//
this.$router.push({
//如果要是用 name 传参 就直接 携带一个 query 对象中包含参数
//
//如果要是用 name 传参 就直接 携带一个 query 对象中包含参数
path
:
"/Video"
,
//
path: "
/
Video
",
query
:
{
//
query: {
id
:
id
.
value
,
//
id: id.value,
},
//
},
});
//
});
},
//
},
onClose
()
{
//
onClose() {
sta
.
value
=
0
;
//
sta.value = 0;
},
//
},
});
//
});
}
//
}
});
//
});
}
//
}
function
countalarm
()
{
//
function countalarm() {
http
.
post
(
"/api/alarm/GetAlarmMsg"
,
AlarmInfo
.
value
).
then
((
result
)
=>
{
//
http.post("
/
api
/
alarm
/
GetAlarmMsg
", AlarmInfo.value).then((result) => {
if
(
result
.
success
&&
result
.
data
.
lenth
===
0
&&
consta
.
value
===
0
)
{
//
if (result.success && result.data.lenth === 0 && consta.value === 0) {
consta
.
value
=
1
;
//
consta.value = 1;
counttitle
.
value
=
result
.
data
[
1
].
title
;
//
counttitle.value = result.data[1].title;
countmsg
.
value
=
result
.
data
[
1
].
msg
;
//
countmsg.value = result.data[1].msg;
countid
.
value
=
result
.
data
[
1
].
id
;
//
countid.value = result.data[1].id;
ElNotification
({
//
ElNotification({
title
:
counttitle
.
value
,
//
title: counttitle.value,
dangerouslyUseHTMLString
:
true
,
//
dangerouslyUseHTMLString: true,
message
:
countmsg
.
value
.
replace
(
"
\n
"
,
"<br />"
),
//
message: countmsg.value.replace("
\
n
", "
<
br
/>
"),
position
:
"bottom-right"
,
//
position: "
bottom
-
right
",
type
:
"error"
,
//
type: "
error
",
duration
:
0
,
//
duration: 0,
onClick
()
{
//
onClick() {
activeTable
.
value
=
"/Video"
;
//
activeTable.value = "
/
Video
";
localStorage
.
setItem
(
"activeTab"
,
"/Video"
);
//
localStorage.setItem("
activeTab
", "
/
Video
");
//路由跳转
//
//路由跳转
this
.
$router
.
push
({
//
this.$router.push({
//如果要是用 name 传参 就直接 携带一个 query 对象中包含参数
//
//如果要是用 name 传参 就直接 携带一个 query 对象中包含参数
path
:
"/Video"
,
//
path: "
/
Video
",
query
:
{
//
query: {
id
:
countid
.
value
,
//
id: countid.value,
},
//
},
});
//
});
},
//
},
onClose
()
{
//
onClose() {
consta
.
value
=
0
;
//
consta.value = 0;
},
//
},
});
//
});
}
//
}
});
//
});
}
//
}
setInterval
(()
=>
{
//
setInterval(() => {
getinfo
();
//
getinfo();
alarm
();
//
alarm();
countalarm
();
//
countalarm();
},
60
*
1000
);
// 每分钟执行一次
//
}, 60 * 1000); // 每分钟执行一次
//个人资料弹出框
//个人资料弹出框
const funsel = ref(true);
const funsel = ref(true);
...
...
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