Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-trialrun
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 049165b0
authored
Apr 16, 2022
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v1.6.0版本需求
1 parent
155d8249
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
47 deletions
src/common/index.js
src/views/reportManage/electricity.vue
src/common/index.js
View file @
049165b
import
moment
from
'moment'
;
// 警情中心-围栏报警
export
const
fenceShortcuts
=
[{
text
:
"今日"
,
onClick
(
picker
)
{
const
end
=
moment
().
format
(
"YYYY-MM-DD"
);
picker
.
$emit
(
"pick"
,
[
end
,
end
]);
}
},
{
text
:
"昨日"
,
onClick
(
picker
)
{
const
start
=
moment
()
.
day
(
moment
().
day
()
-
1
)
.
format
(
"YYYY-MM-DD"
);
const
end
=
moment
()
.
day
(
moment
().
day
()
-
1
)
.
format
(
"YYYY-MM-DD"
);
picker
.
$emit
(
"pick"
,
[
start
,
end
]);
}
},
{
text
:
"近7天"
,
onClick
(
picker
)
{
const
end
=
moment
().
format
(
"YYYY-MM-DD"
);
const
start
=
moment
()
.
day
(
moment
().
day
()
-
7
)
.
format
(
"YYYY-MM-DD"
);
picker
.
$emit
(
"pick"
,
[
start
,
end
]);
}
},
{
text
:
"近15天"
,
onClick
(
picker
)
{
const
end
=
moment
().
format
(
"YYYY-MM-DD"
);
const
start
=
moment
()
.
day
(
moment
().
day
()
-
15
)
.
format
(
"YYYY-MM-DD"
);
picker
.
$emit
(
"pick"
,
[
start
,
end
]);
export
const
fenceShortcuts
=
[
{
text
:
"全部"
,
onClick
(
picker
)
{
const
end
=
""
;
const
start
=
""
;
picker
.
$emit
(
"pick"
,
[
start
,
end
]);
},
},
{
text
:
"今日"
,
onClick
(
picker
)
{
const
end
=
moment
().
format
(
"YYYY-MM-DD"
);
picker
.
$emit
(
"pick"
,
[
end
,
end
]);
}
},
{
text
:
"昨日"
,
onClick
(
picker
)
{
const
start
=
moment
()
.
day
(
moment
().
day
()
-
1
)
.
format
(
"YYYY-MM-DD"
);
const
end
=
moment
()
.
day
(
moment
().
day
()
-
1
)
.
format
(
"YYYY-MM-DD"
);
picker
.
$emit
(
"pick"
,
[
start
,
end
]);
}
},
{
text
:
"近7天"
,
onClick
(
picker
)
{
const
end
=
moment
().
format
(
"YYYY-MM-DD"
);
const
start
=
moment
()
.
day
(
moment
().
day
()
-
7
)
.
format
(
"YYYY-MM-DD"
);
picker
.
$emit
(
"pick"
,
[
start
,
end
]);
}
},
},
{
text
:
"近30天"
,
onClick
(
picker
)
{
const
end
=
moment
().
format
(
"YYYY-MM-DD"
);
const
start
=
moment
(
)
.
day
(
moment
().
day
()
-
30
)
.
format
(
"YYYY-MM-DD"
);
picker
.
$emit
(
"pick"
,
[
start
,
end
]);
{
text
:
"近15天"
,
onClick
(
picker
)
{
const
end
=
moment
().
format
(
"YYYY-MM-DD"
);
const
start
=
moment
()
.
day
(
moment
().
day
()
-
15
)
.
format
(
"YYYY-MM-DD"
);
picker
.
$emit
(
"pick"
,
[
start
,
end
]
);
},
},
}
{
text
:
"近30天"
,
onClick
(
picker
)
{
const
end
=
moment
().
format
(
"YYYY-MM-DD"
);
const
start
=
moment
()
.
day
(
moment
().
day
()
-
30
)
.
format
(
"YYYY-MM-DD"
);
picker
.
$emit
(
"pick"
,
[
start
,
end
]);
},
}
]
// 警情中心-停驶报警
...
...
src/views/reportManage/electricity.vue
View file @
049165b
...
...
@@ -129,7 +129,7 @@ export default {
label
:
"当前电量"
,
prop
:
"soc"
,
formatter
:
(
row
)
=>
{
return
`
${
row
.
soc
}
%`
;
return
`
${
row
.
soc
||
0
}
%`
;
},
},
],
...
...
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