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
13817988
Commit
13817988
authored
Aug 13, 2024
by
xuke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交-能源消耗
parent
440306ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
EnergyManagePage.vue
src/views/SchedulingPage/EnergyManagePage.vue
+13
-8
No files found.
src/views/SchedulingPage/EnergyManagePage.vue
View file @
13817988
...
...
@@ -2,7 +2,7 @@
import
{
ref
,
onMounted
,
getCurrentInstance
,
reactive
,
nextTick
}
from
"vue"
;
import
{
ElMessageBox
,
ElMessage
}
from
"element-plus"
;
import
axios
from
"axios"
;
import
{
Search
,
Document
}
from
"@element-plus/icons-vue"
;
import
{
Search
,
Minus
,
Document
}
from
"@element-plus/icons-vue"
;
import
{
getOrganizationStructureInterface
}
from
"@/api/scheduling"
;
...
...
@@ -87,11 +87,14 @@ const config = reactive({
const
handleSearch
=
()
=>
{
config
.
supplyType
=
formInline
.
keyWord
;
config
.
supplyType
=
[
`
${
config
.
supplyType
}
`
];
getEnergyData
(),
(
formEnergy
.
value
.
energyType
=
""
),
ElMessage
.
success
(
"获取数据成功"
);
getEnergyData
()
};
// 重置按钮
const
handleReset
=
()
=>
{
formInline
.
keyWord
=
""
}
const
timeFormat
=
(
time
)
=>
{
var
time
=
new
Date
(
time
);
var
year
=
time
.
getFullYear
();
...
...
@@ -100,7 +103,7 @@ const timeFormat = (time) => {
function
add
(
m
)
{
return
m
<
10
?
"0"
+
m
:
m
;
}
return
year
+
'/'
+
add
(
month
)
+
'/'
+
add
(
date
)
+
' 0:00:00'
return
year
+
'/'
+
add
(
month
)
+
'/'
+
add
(
date
)
}
//表单校验规则
...
...
@@ -111,9 +114,7 @@ const rules = reactive({
],
record
:
[
{
required
:
true
,
message
:
"能源用度是必选项"
,
trigger
:
"blur"
},
{
pattern
:
/^
(
-
?[
0-9
]
+
(\.[
0-9
]
+
)?){1,10}
$/
,
message
:
"能源用度必须输入1-10位数字"
,
trigger
:
"blur"
},
{
min
:
1
,
max
:
10
,
message
:
'能源用度必须是 1-10位的数字'
,
trigger
:
'blur'
}
{
pattern
:
/^
(\d{1,10})
$/
,
"message"
:
"能源用度是 1-10位正整数"
,
trigger
:
"blur"
}
],
recordDate
:
[{
required
:
true
,
message
:
"日期是必选项"
}],
});
...
...
@@ -288,6 +289,10 @@ onMounted(() => {
<Search
style=
"width: 1em; height: 1em; margin-right: 8px"
/>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"handleReset"
>
<Minus
style=
"width: 1em; height: 1em; margin-right: 8px"
/>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
<Document
style=
"width: 1em; height: 1em; margin-right: 8px"
/>
新增
...
...
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