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
326b1c15
Commit
326b1c15
authored
Aug 12, 2024
by
xuke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表单校验
parent
10e2e52a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
483 additions
and
334 deletions
+483
-334
AlarmStatusPage.vue
src/views/AlarmPage/AlarmStatusPage.vue
+155
-103
ConfigBoilerPage.vue
src/views/SchedulingPage/ConfigBoilerPage.vue
+209
-146
EnergyManagePage.vue
src/views/SchedulingPage/EnergyManagePage.vue
+21
-13
InstantHeatPage.vue
src/views/SchedulingPage/InstantHeatPage.vue
+98
-72
No files found.
src/views/AlarmPage/AlarmStatusPage.vue
View file @
326b1c15
This diff is collapsed.
Click to expand it.
src/views/SchedulingPage/ConfigBoilerPage.vue
View file @
326b1c15
This diff is collapsed.
Click to expand it.
src/views/SchedulingPage/EnergyManagePage.vue
View file @
326b1c15
...
...
@@ -110,9 +110,14 @@ const timeFormat = (time) => {
const
rules
=
reactive
({
supplyId
:
[{
required
:
true
,
message
:
"名称是必填项"
,
trigger
:
"blur"
}],
energyType
:
[
{
required
:
true
,
message
:
"能源类型是必填项"
,
trigger
:
"blur"
},
{
required
:
true
,
message
:
"能源类型是必填项"
,
trigger
:
"blur"
}
],
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'
}
],
record
:
[{
required
:
true
,
message
:
"能源用度是必选项"
,
trigger
:
"blur"
}],
recordDate
:
[{
required
:
true
,
message
:
"日期是必选项"
}],
});
...
...
@@ -125,15 +130,19 @@ const handleDelete = (row) => {
cancelButtonText
:
'取消'
,
type
:
'warning'
,
confirmButtonClass
:
'ExitConfirmButton'
}).
then
(()
=>
{
http
.
post
(
"api/energy/Delete"
,
{
id
:
row
.
energyId
},
false
).
then
(
res
=>
{
if
(
res
.
success
)
{
ElMessage
.
success
(
res
.
message
)
getEnergyData
();
}
else
{
ElMessage
.
error
(
"删除失败"
);
}
})
}).
catch
(()
=>
{
ElMessage
.
success
(
"取消删除操作"
);
})
http
.
post
(
"api/energy/Delete"
,
{
id
:
row
.
energyId
},
false
).
then
(
res
=>
{
if
(
res
.
success
)
{
ElMessage
.
success
(
res
.
message
)
getEnergyData
();
}
else
{
ElMessage
.
error
(
"删除失败"
);
}
})
};
...
...
@@ -317,9 +326,8 @@ onMounted(() => {
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-form-item
prop=
"supplyName"
style=
"margin: 0; padding: 0; width: 100%"
>
<el-select
v-model=
"formEnergy.supplyId"
placeholder=
""
style=
"width: 210px;"
class=
"custom-select"
size=
"small"
>
<el-form-item
prop=
"supplyName"
style=
"margin: 0; padding: 0; width: 100%;"
>
<el-select
v-model=
"formEnergy.supplyId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in supplyData"
:key=
"item.supplyId"
:label=
"item.supplyName"
:value=
"item.supplyId"
/>
</el-select>
...
...
src/views/SchedulingPage/InstantHeatPage.vue
View file @
326b1c15
...
...
@@ -5,76 +5,85 @@
<div
class=
"card-header"
>
<span>
瞬时热量对比配置
</span>
</div>
<table
v-loading=
"loading"
cellpadding=
"0"
cellspacing=
"1"
>
<tr>
<th
style=
"width: 25%"
>
计划名称:
</th>
<td
style=
"width: 60%; margin:0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-input
style=
"width: 80%"
v-model=
"List.planName"
></el-input>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th
style=
"width: 25%"
>
偏差百分比 (%):
</th>
<td
style=
"width: 60%; margin: 0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-input
v-float-number
style=
"width: 80%"
v-model=
"List.diffPercentage"
></el-input>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th
style=
"width: 25%"
>
判断时间 (分):
</th>
<td
style=
"width: 60%; margin: 0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-input
style=
"width: 80%"
v-model=
"List.timeoutMin"
></el-input>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th
style=
"width: 25%"
>
调节温度 (℃)
</th>
<td
style=
"width: 60%; margin: 0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-input
v-float-number
style=
"width: 80%"
v-model=
"List.tempRegulation"
></el-input>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th
style=
"width: 25%"
>
备注
</th>
<td
style=
"width: 60%; margin: 0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-input
style=
"width: 80%"
type=
"textarea"
rows=
"6"
v-model=
"List.description"
></el-input>
</td>
</tr>
</table>
</td>
</tr>
</table>
<el-form
ref=
"formRef"
:rules=
"rules"
:model=
"List"
label-width=
"auto"
>
<table
v-loading=
"loading"
cellpadding=
"0"
cellspacing=
"1"
>
<tr>
<th
style=
"width: 25%"
>
计划名称:
</th>
<td
style=
"width: 60%; margin:0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-input
style=
"width: 80%"
v-model=
"List.planName"
></el-input>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th
style=
"width: 25%"
>
偏差百分比 (%):
</th>
<td
style=
"width: 60%; margin: 0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-form-item
prop=
"diffPercentage"
style=
"padding: 0;margin: 0;"
>
<el-input
v-float-number
style=
"width: 80%"
v-model=
"List.diffPercentage"
></el-input>
</el-form-item>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th
style=
"width: 25%"
>
判断时间 (分):
</th>
<td
style=
"width: 60%; margin: 0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-form-item
prop=
"timeoutMin"
style=
"padding: 0;margin: 0;"
>
<el-input
style=
"width: 80%"
v-model=
"List.timeoutMin"
></el-input>
</el-form-item>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th
style=
"width: 25%"
>
调节温度 (℃)
</th>
<td
style=
"width: 60%; margin: 0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-form-item
prop=
"tempRegulation"
style=
"padding: 0;margin: 0;"
>
<el-input
v-float-number
style=
"width: 80%"
v-model=
"List.tempRegulation"
></el-input>
</el-form-item>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th
style=
"width: 25%"
>
备注
</th>
<td
style=
"width: 60%; margin: 0; padding: 0"
>
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-input
style=
"width: 80%"
type=
"textarea"
rows=
"6"
v-model=
"List.description"
></el-input>
</td>
</tr>
</table>
</td>
</tr>
</table>
</el-form>
<div
class=
"btngrounp"
>
<el-button
type=
"primary"
@
click=
"onSave"
>
保存
</el-button>
<el-button
type=
"primary"
style=
"margin: 0 0 0 5px"
@
click=
"onCancel"
>
关闭
</el-button>
...
...
@@ -92,7 +101,7 @@ import { ElMessage } from "element-plus";
import
http
from
"../../api/http"
;
import
{
vFloatNumber
}
from
"@/utils/directives.js"
;
const
loading
=
ref
(
false
)
const
formRef
=
ref
()
const
List
=
ref
(
{
...
...
@@ -105,7 +114,24 @@ const List = ref(
"isActive"
:
''
}
)
//校验规则
const
rules
=
reactive
({
diffPercentage
:
[
{
required
:
true
,
message
:
"偏差百分比是必填项"
,
trigger
:
"blur"
},
{
pattern
:
/^
(
-
?[
0-9
]
+
(\.[
0-9
]
+
)?){1,10}
$/
,
"message"
:
"偏差百分比输入不合法"
,
trigger
:
'blur'
},
{
min
:
1
,
max
:
10
,
message
:
'偏差百分比必须是 1-10位的数字'
,
trigger
:
'blur'
}
],
timeoutMin
:
[
{
required
:
true
,
message
:
"判断时间是必填项"
,
trigger
:
"blur"
},
{
pattern
:
/^
[
0-9
]\d{1,10}
$/
,
"message"
:
"判断时间必须是 1-10位的数字"
,
trigger
:
'blur'
}
],
tempRegulation
:
[
{
required
:
true
,
message
:
"调节温度是必选项"
,
trigger
:
"blur"
},
{
pattern
:
/^
(
-
?[
0-9
]
+
(\.[
0-9
]
+
)?)
$/
,
"message"
:
"调节温度输入不合法"
,
trigger
:
'blur'
},
{
min
:
1
,
max
:
10
,
message
:
'调节温度必须是 1-10位的数字'
,
trigger
:
'blur'
}
]
});
const
getInstanceHeat
=
()
=>
{
loading
.
value
=
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