Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4ddb678a
authored
Dec 05, 2022
by
wuwx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
线上问题修复-用户管理导入数据
1 parent
567d07b0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
2 deletions
src/views/home/index.vue
src/views/user/assign.vue
src/views/user/import.vue
src/views/user/index.vue
src/views/home/index.vue
View file @
4ddb678
...
@@ -273,13 +273,29 @@ export default {
...
@@ -273,13 +273,29 @@ export default {
// 离线率
// 离线率
let
n
=
[];
let
n
=
[];
// console.log('obj.offlineRate', this.accSub(100, obj.offlineRate));
n
.
push
({
value
:
100
-
obj
.
offlineRate
,
name
:
""
});
n
.
push
({
value
:
100
-
obj
.
offlineRate
,
name
:
""
});
n
.
push
({
value
:
obj
.
offlineRate
,
name
:
""
});
n
.
push
({
value
:
obj
.
offlineRate
,
name
:
""
});
this
.
createBindChart
(
"offlineChart"
,
n
);
this
.
createBindChart
(
"offlineChart"
,
n
);
});
});
},
},
accSub
(
arg1
,
arg2
)
{
let
r1
,
r2
,
m
,
n
try
{
r1
=
arg1
.
toString
().
split
(
'.'
)[
1
].
length
}
catch
(
e
)
{
r1
=
0
}
try
{
r2
=
arg2
.
toString
().
split
(
'.'
)[
1
].
length
}
catch
(
e
)
{
r2
=
0
}
m
=
Math
.
pow
(
10
,
Math
.
max
(
r1
,
r2
))
n
=
r1
>=
r2
?
r1
:
r2
return
((
arg1
*
m
-
arg2
*
m
)
/
m
).
toFixed
(
n
)
},
// 获取警情统计
// 获取警情统计
getAlarm
()
{
getAlarm
()
{
GET_HOME_ALARMNUMBER
().
then
((
res
)
=>
{
GET_HOME_ALARMNUMBER
().
then
((
res
)
=>
{
...
...
src/views/user/assign.vue
View file @
4ddb678
...
@@ -35,6 +35,7 @@ export default {
...
@@ -35,6 +35,7 @@ export default {
activeTabs
:
"1"
,
activeTabs
:
"1"
,
userId
:
""
,
userId
:
""
,
randomKey
:
""
,
randomKey
:
""
,
monitorFlags
:
false
};
};
},
},
watch
:
{
watch
:
{
...
@@ -62,6 +63,7 @@ export default {
...
@@ -62,6 +63,7 @@ export default {
return
false
;
return
false
;
}
}
this
.
$refs
.
importVehicleCom
.
saveInfo
();
this
.
$refs
.
importVehicleCom
.
saveInfo
();
this
.
monitorFlags
=
this
.
$refs
.
importVehicleCom
.
monitorFlag
;
},
},
},
},
};
};
...
...
src/views/user/import.vue
View file @
4ddb678
...
@@ -67,6 +67,7 @@ export default {
...
@@ -67,6 +67,7 @@ export default {
uploadResult
:
{},
uploadResult
:
{},
acceptFile
:
".xlsx,.xls"
,
acceptFile
:
".xlsx,.xls"
,
fileList
:
[],
fileList
:
[],
monitorFlag
:
false
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -97,6 +98,7 @@ export default {
...
@@ -97,6 +98,7 @@ export default {
// 文件上传前
// 文件上传前
beforeUpload
()
{
beforeUpload
()
{
this
.
uploadResult
=
{};
this
.
uploadResult
=
{};
this
.
monitorFlag
=
false
;
},
},
// 文件上传失败
// 文件上传失败
...
@@ -107,6 +109,7 @@ export default {
...
@@ -107,6 +109,7 @@ export default {
// 监听文件上传成功
// 监听文件上传成功
onSuccess
(
response
,
file
,
fileList
)
{
onSuccess
(
response
,
file
,
fileList
)
{
console
.
log
(
response
);
console
.
log
(
response
);
this
.
monitorFlag
=
true
;
let
_this
=
this
;
let
_this
=
this
;
broadcast
(
"cancel-loading"
);
broadcast
(
"cancel-loading"
);
_this
.
$refs
.
uploadBox
.
clearFiles
();
_this
.
$refs
.
uploadBox
.
clearFiles
();
...
@@ -131,7 +134,6 @@ export default {
...
@@ -131,7 +134,6 @@ export default {
showToast
({
showToast
({
message
:
"请选择文件"
,
message
:
"请选择文件"
,
});
});
console
.
log
(
"7777777777777"
);
broadcast
(
"cancel-loading"
);
broadcast
(
"cancel-loading"
);
return
false
;
return
false
;
}
}
...
...
src/views/user/index.vue
View file @
4ddb678
...
@@ -737,6 +737,9 @@ export default {
...
@@ -737,6 +737,9 @@ export default {
saveInfo
()
{
saveInfo
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
$refs
.
assignInfo
.
saveInfo
();
this
.
$refs
.
assignInfo
.
saveInfo
();
if
(
this
.
$refs
.
assignInfo
.
monitorFlags
)
{
this
.
loading
=
false
;
}
},
},
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment