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
1aafb16d
Commit
1aafb16d
authored
Aug 21, 2024
by
xuke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://gitlab.91isoft.com:10022/hikvision/web-project
parents
726bd962
890795eb
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
465 additions
and
161 deletions
+465
-161
AnnualParamPage.vue
src/views/SchedulingPage/AnnualParamPage.vue
+167
-39
PhenomenonPage.vue
src/views/SchedulingPage/PhenomenonPage.vue
+62
-25
WeatherManagePage.vue
src/views/SchedulingPage/WeatherManagePage.vue
+1
-0
WindManagePage.vue
src/views/SchedulingPage/WindManagePage.vue
+60
-20
AddWindow.vue
src/views/SchedulingPage/weatherManageSub/AddWindow.vue
+84
-21
BindWindow.vue
src/views/SchedulingPage/weatherManageSub/BindWindow.vue
+6
-2
ReviseWindow.vue
src/views/SchedulingPage/weatherManageSub/ReviseWindow.vue
+85
-54
No files found.
src/views/SchedulingPage/AnnualParamPage.vue
View file @
1aafb16d
This diff is collapsed.
Click to expand it.
src/views/SchedulingPage/PhenomenonPage.vue
View file @
1aafb16d
...
@@ -15,12 +15,25 @@ const addSaveBtnLoading = ref(false)
...
@@ -15,12 +15,25 @@ const addSaveBtnLoading = ref(false)
const
formRef
=
ref
()
const
formRef
=
ref
()
//校验规则
//校验规则
const
rules
=
reactive
({
const
rules
=
reactive
({
phenomenonName
:
[
{
required
:
true
,
message
:
'请选择天气名称'
,
trigger
:
'blur'
}
],
phenomenonDesc
:
[
{
required
:
true
,
message
:
'请输入描述'
,
trigger
:
'blur'
}
],
phenomenonTemp
:
[
phenomenonTemp
:
[
{
required
:
true
,
message
:
'请输入正确的对应温度'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入正确的对应温度'
,
trigger
:
'blur'
},
{
pattern
:
/^
(
-
?\d{1,11})(\.[
0-9
]{1,4})?
$/
,
message
:
"请输入正确的对应温度"
,
trigger
:
"
change
"
}
{
pattern
:
/^
(
-
?\d{1,11})(\.[
0-9
]{1,4})?
$/
,
message
:
"请输入正确的对应温度"
,
trigger
:
"
blur
"
}
]
]
});
});
const
tableHeaderClass
=
data
=>
{
// 表头样式
const
tableHeaderClass
=
data
=>
{
// 表头样式
...
@@ -90,9 +103,9 @@ function handleClose() {
...
@@ -90,9 +103,9 @@ function handleClose() {
function
onReviseSubmit
()
{
function
onReviseSubmit
()
{
formRef
.
value
.
validate
((
valid
)
=>
{
formRef
.
value
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
Math
.
abs
(
Number
(
reviseForm
.
value
.
phenomenonTemp
))
>
30
){
if
(
Number
(
reviseForm
.
value
.
phenomenonTemp
)
>
45
||
Number
(
reviseForm
.
value
.
phenomenonTemp
)
<
-
30
){
ElMessage
({
ElMessage
({
message
:
'对应温度不能大于
30
度或小于-30度'
,
message
:
'对应温度不能大于
45
度或小于-30度'
,
type
:
'error'
,
type
:
'error'
,
})
})
return
return
...
@@ -132,9 +145,9 @@ function onReviseSubmit() {
...
@@ -132,9 +145,9 @@ function onReviseSubmit() {
function
onAddSubmit
()
{
function
onAddSubmit
()
{
addSaveBtnLoading
.
value
=
true
addSaveBtnLoading
.
value
=
true
formRef
.
value
.
validate
(
valid
=>
{
formRef
.
value
.
validate
(
valid
=>
{
if
(
Math
.
abs
(
Number
(
addForm
.
value
.
phenomenonTemp
))
>
30
){
if
(
Number
(
addForm
.
value
.
phenomenonTemp
)
>
45
||
Number
(
addForm
.
value
.
phenomenonTemp
)
<
-
30
){
ElMessage
({
ElMessage
({
message
:
'对应温度不能大于
30
度或小于-30度'
,
message
:
'对应温度不能大于
45
度或小于-30度'
,
type
:
'error'
,
type
:
'error'
,
})
})
addSaveBtnLoading
.
value
=
false
addSaveBtnLoading
.
value
=
false
...
@@ -238,29 +251,39 @@ function customSort(a, b) {
...
@@ -238,29 +251,39 @@ function customSort(a, b) {
<div
class=
"dialog-window"
>
<div
class=
"dialog-window"
>
<el-dialog
title=
"天气工况设置修改"
v-model=
"reviseWindowOpen"
width=
"700px"
:before-close=
"handleClose"
>
<el-dialog
title=
"天气工况设置修改"
v-model=
"reviseWindowOpen"
width=
"700px"
:before-close=
"handleClose"
>
<
template
#
default
>
<
template
#
default
>
<el-form
ref=
"formRef"
:rules=
"rules"
:model=
"reviseForm"
label-width=
"auto"
>
<el-form
ref=
"formRef"
:rules=
"rules"
:model=
"reviseForm"
:inline-message=
"true"
label-width=
"auto"
>
<el-row
first
>
<el-row
first
>
<el-col
:span=
"8"
col-label
class=
"energy-type-class"
>
名称:
</el-col>
<el-col
:span=
"8"
col-label
class=
"energy-type-class"
>
名称:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-select
placeholder=
""
size=
"small"
v-model=
"reviseForm.phenomenonName"
style=
"width: 370px"
>
<el-form-item
prop=
"phenomenonName"
style=
"padding: 0;margin: 0;"
>
<el-option
value=
"晴天"
label=
"晴天"
/>
<el-select
placeholder=
""
size=
"small"
v-model=
"reviseForm.phenomenonName"
style=
"width: 290px"
>
<el-option
value=
"多云"
label=
"多云"
/>
<el-option
value=
"晴天"
label=
"晴天"
/>
<el-option
value=
"阴天"
label=
"阴天"
/>
<el-option
value=
"多云"
label=
"多云"
/>
</el-select>
<el-option
value=
"阴天"
label=
"阴天"
/>
</el-select>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"8"
col-label
>
对应温度:
</el-col>
<el-col
:span=
"8"
col-label
>
对应温度:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-form-item
prop=
"phenomenonTemp"
style=
"padding: 0;margin: 0;"
>
<el-form-item
prop=
"phenomenonTemp"
style=
"padding: 0;margin: 0;"
>
<el-input
maxlength=
"1
1"
v-model=
"reviseForm.phenomenonTemp"
placeholder=
""
style=
"width: 37
0px"
/>
<el-input
maxlength=
"1
0"
v-model=
"reviseForm.phenomenonTemp"
placeholder=
""
style=
"width: 29
0px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row
id=
"phenomenonDesc"
>
<el-col
:span=
"8"
col-label
>
描述:
</el-col>
<el-col
:span=
"8"
col-label
>
描述:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-input
maxlength=
"11"
v-model=
"reviseForm.phenomenonDesc"
placeholder=
""
style=
"width: 370px"
/>
<el-form-item
prop=
"phenomenonDesc"
style=
"padding: 0;margin: 0;"
>
<el-input
type=
"textarea"
v-model=
"reviseForm.phenomenonDesc"
maxlength=
"200"
show-word-limit
style=
"width: 290px"
autosize
/>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
...
@@ -275,29 +298,39 @@ function customSort(a, b) {
...
@@ -275,29 +298,39 @@ function customSort(a, b) {
</el-dialog>
<!-- 修改弹窗 -->
</el-dialog>
<!-- 修改弹窗 -->
<el-dialog
title=
"天气工况设置新增"
v-model=
"addWindowOpen"
width=
"700px"
:before-close=
"handleClose"
>
<el-dialog
title=
"天气工况设置新增"
v-model=
"addWindowOpen"
width=
"700px"
:before-close=
"handleClose"
>
<
template
#
default
>
<
template
#
default
>
<el-form
ref=
"formRef"
:model=
"addForm"
:rules=
"rules"
label-width=
"auto"
>
<el-form
ref=
"formRef"
:model=
"addForm"
:rules=
"rules"
:inline-message=
"true"
label-width=
"auto"
>
<el-row
first
>
<el-row
first
>
<el-col
:span=
"8"
col-label
class=
"energy-type-class"
>
名称:
</el-col>
<el-col
:span=
"8"
col-label
class=
"energy-type-class"
>
名称:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-select
placeholder=
""
size=
"small"
v-model=
"addForm.phenomenonName"
style=
"width: 370px"
>
<el-form-item
prop=
"phenomenonName"
style=
"padding: 0;margin: 0;"
>
<el-option
value=
"晴天"
label=
"晴天"
/>
<el-select
placeholder=
""
size=
"small"
v-model=
"addForm.phenomenonName"
style=
"width: 290px"
>
<el-option
value=
"多云"
label=
"多云"
/>
<el-option
value=
"晴天"
label=
"晴天"
/>
<el-option
value=
"阴天"
label=
"阴天"
/>
<el-option
value=
"多云"
label=
"多云"
/>
</el-select>
<el-option
value=
"阴天"
label=
"阴天"
/>
</el-select>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"8"
col-label
>
对应温度:
</el-col>
<el-col
:span=
"8"
col-label
>
对应温度:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-form-item
prop=
"phenomenonTemp"
style=
"padding: 0;margin: 0;"
>
<el-form-item
prop=
"phenomenonTemp"
style=
"padding: 0;margin: 0;"
>
<el-input
maxlength=
"1
1"
v-model=
"addForm.phenomenonTemp"
placeholder=
""
style=
"width: 37
0px"
/>
<el-input
maxlength=
"1
0"
v-model=
"addForm.phenomenonTemp"
placeholder=
""
style=
"width: 29
0px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row
id=
"phenomenonDesc"
>
<el-col
:span=
"8"
col-label
>
描述:
</el-col>
<el-col
:span=
"8"
col-label
>
描述:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-input
maxlength=
"11"
v-model=
"addForm.phenomenonDesc"
placeholder=
""
style=
"width: 370px"
/>
<el-form-item
prop=
"phenomenonDesc"
style=
"padding: 0;margin: 0;"
>
<el-input
type=
"textarea"
v-model=
"addForm.phenomenonDesc"
maxlength=
"200"
show-word-limit
style=
"width: 290px"
autosize
/>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
...
@@ -398,6 +431,10 @@ function customSort(a, b) {
...
@@ -398,6 +431,10 @@ function customSort(a, b) {
padding-left: 5px;
padding-left: 5px;
}
}
#phenomenonDesc{
height: 100%;
}
.el-input {
.el-input {
color: black;
color: black;
height: 24px;
height: 24px;
...
...
src/views/SchedulingPage/WeatherManagePage.vue
View file @
1aafb16d
...
@@ -56,6 +56,7 @@ const revise = (row) => { // 修改按钮单击事件
...
@@ -56,6 +56,7 @@ const revise = (row) => { // 修改按钮单击事件
}
}
const
bind
=
(
row
)
=>
{
// 绑定按钮单击事件
const
bind
=
(
row
)
=>
{
// 绑定按钮单击事件
dependentSub
.
value
=
row
dependentSub
.
value
=
row
console
.
log
(
'绑定换热站数据'
,
row
)
bindWindowOpen
.
value
=
true
bindWindowOpen
.
value
=
true
}
}
const
cancelRevise
=
()
=>
{
const
cancelRevise
=
()
=>
{
...
...
src/views/SchedulingPage/WindManagePage.vue
View file @
1aafb16d
...
@@ -37,6 +37,13 @@ const formRef = ref()
...
@@ -37,6 +37,13 @@ const formRef = ref()
//校验规则
//校验规则
const
rules
=
reactive
({
const
rules
=
reactive
({
windLevel
:
[
{
required
:
true
,
message
:
'请选择风力级数'
,
trigger
:
"blur"
},
],
windTemp
:
[
windTemp
:
[
{
{
required
:
true
,
required
:
true
,
...
@@ -46,8 +53,15 @@ const rules = reactive({
...
@@ -46,8 +53,15 @@ const rules = reactive({
{
{
pattern
:
/^
(
-
?\d{1,11})(\.[
0-9
]{1,4})?
$/
,
pattern
:
/^
(
-
?\d{1,11})(\.[
0-9
]{1,4})?
$/
,
message
:
"请输入正确的对应温度"
,
message
:
"请输入正确的对应温度"
,
trigger
:
"
change
"
trigger
:
"
blur
"
}
}
],
windDesc
:
[
{
required
:
true
,
message
:
'请输入描述'
,
trigger
:
"blur"
}
]
]
});
});
...
@@ -113,9 +127,9 @@ function onReviseSubmit() {
...
@@ -113,9 +127,9 @@ function onReviseSubmit() {
reviseSaveBtnLoading
.
value
=
true
reviseSaveBtnLoading
.
value
=
true
formRef
.
value
.
validate
(
valid
=>
{
formRef
.
value
.
validate
(
valid
=>
{
if
(
valid
){
if
(
valid
){
if
(
Math
.
abs
(
Number
(
reviseForm
.
value
.
windTemp
))
>
30
){
if
(
Number
(
reviseForm
.
value
.
windTemp
)
>
45
||
Number
(
reviseForm
.
value
.
windTemp
)
<
-
30
){
ElMessage
({
ElMessage
({
message
:
'对应温度不能大于
30
度或小于-30度'
,
message
:
'对应温度不能大于
45
度或小于-30度'
,
type
:
'error'
,
type
:
'error'
,
})
})
reviseSaveBtnLoading
.
value
=
false
reviseSaveBtnLoading
.
value
=
false
...
@@ -153,9 +167,9 @@ function onAddSubmit() {
...
@@ -153,9 +167,9 @@ function onAddSubmit() {
addSaveBtnLoading
.
value
=
true
;
addSaveBtnLoading
.
value
=
true
;
formRef
.
value
.
validate
(
valid
=>
{
formRef
.
value
.
validate
(
valid
=>
{
if
(
valid
){
if
(
valid
){
if
(
Math
.
abs
(
Number
(
addForm
.
value
.
windTemp
))
>
30
){
if
(
Number
(
addForm
.
value
.
windTemp
)
>
45
||
Number
(
addForm
.
value
.
windTemp
)
<
-
30
){
ElMessage
({
ElMessage
({
message
:
'对应温度不能大于
30
度或小于-30度'
,
message
:
'对应温度不能大于
45
度或小于-30度'
,
type
:
'error'
,
type
:
'error'
,
})
})
addSaveBtnLoading
.
value
=
false
addSaveBtnLoading
.
value
=
false
...
@@ -254,27 +268,37 @@ function customSort(a, b) {
...
@@ -254,27 +268,37 @@ function customSort(a, b) {
<div
class=
"dialog-window"
>
<div
class=
"dialog-window"
>
<el-dialog
title=
"风力配置修改"
v-model=
"reviseWindowOpen"
width=
"700px"
:before-close=
"handleClose"
>
<el-dialog
title=
"风力配置修改"
v-model=
"reviseWindowOpen"
width=
"700px"
:before-close=
"handleClose"
>
<
template
#
default
>
<
template
#
default
>
<el-form
:rules=
"rules"
ref=
"formRef"
:model=
"reviseForm"
label-width=
"auto"
>
<el-form
:rules=
"rules"
ref=
"formRef"
:
inline-message=
"true"
:
model=
"reviseForm"
label-width=
"auto"
>
<el-row
first
>
<el-row
first
>
<el-col
:span=
"8"
col-label
class=
"energy-type-class"
>
级数:
</el-col>
<el-col
:span=
"8"
col-label
class=
"energy-type-class"
>
级数:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-select
placeholder=
""
size=
"small"
v-model=
"reviseForm.windLevel"
style=
"width: 370px"
>
<el-form-item
prop=
"windLevel"
style=
"padding: 0; margin: 0;"
>
<el-option
v-for=
"(item, index) in 14"
:key=
"index"
:value=
"item"
:label=
"item + '级风'"
/>
<el-select
placeholder=
""
size=
"small"
v-model=
"reviseForm.windLevel"
style=
"width: 290px"
>
</el-select>
<el-option
v-for=
"(item, index) in 14"
:key=
"index"
:value=
"item"
:label=
"item + '级风'"
/>
</el-select>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"8"
col-label
>
对应温度:
</el-col>
<el-col
:span=
"8"
col-label
>
对应温度:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-form-item
prop=
"windTemp"
style=
"padding: 0; margin: 0;"
>
<el-form-item
prop=
"windTemp"
style=
"padding: 0; margin: 0;"
>
<el-input
maxlength=
"1
1"
v-model=
"reviseForm.windTemp"
placeholder=
""
style=
"width: 37
0px"
/>
<el-input
maxlength=
"1
0"
v-model=
"reviseForm.windTemp"
placeholder=
""
style=
"width: 29
0px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row
id=
"windDesc"
>
<el-col
:span=
"8"
col-label
>
描述:
</el-col>
<el-col
:span=
"8"
col-label
>
描述:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-input
maxlength=
"11"
v-model=
"reviseForm.windDesc"
placeholder=
""
style=
"width: 370px"
/>
<el-form-item
prop=
"windDesc"
style=
"padding: 0; margin: 0;"
>
<el-input
type=
"textarea"
v-model=
"reviseForm.windDesc"
maxlength=
"200"
show-word-limit
style=
"width: 290px"
autosize
/>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
...
@@ -290,27 +314,37 @@ function customSort(a, b) {
...
@@ -290,27 +314,37 @@ function customSort(a, b) {
<!-- 修改弹窗 -->
<!-- 修改弹窗 -->
<el-dialog
title=
"风力配置新增"
v-model=
"addWindowOpen"
width=
"700px"
:before-close=
"handleClose"
>
<el-dialog
title=
"风力配置新增"
v-model=
"addWindowOpen"
width=
"700px"
:before-close=
"handleClose"
>
<
template
#
default
>
<
template
#
default
>
<el-form
ref=
"formRef"
:rules=
"rules"
:model=
"addForm"
label-width=
"auto"
>
<el-form
ref=
"formRef"
:rules=
"rules"
:model=
"addForm"
:inline-message=
"true"
label-width=
"auto"
>
<el-row
first
>
<el-row
first
>
<el-col
:span=
"8"
col-label
class=
"energy-type-class"
>
级数:
</el-col>
<el-col
:span=
"8"
col-label
class=
"energy-type-class"
>
级数:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-select
placeholder=
""
size=
"small"
v-model=
"addForm.windLevel"
style=
"width: 370px"
>
<el-form-item
prop=
"windLevel"
style=
"padding: 0; margin: 0;"
>
<el-option
v-for=
"(item, index) in 14"
:key=
"index"
:value=
"item"
:label=
"item + '级风'"
/>
<el-select
placeholder=
""
size=
"small"
v-model=
"addForm.windLevel"
style=
"width: 290px"
>
</el-select>
<el-option
v-for=
"(item, index) in 14"
:key=
"index"
:value=
"item"
:label=
"item + '级风'"
/>
</el-select>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"8"
col-label
>
对应温度:
</el-col>
<el-col
:span=
"8"
col-label
>
对应温度:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-form-item
prop=
"windTemp"
style=
"padding: 0; margin: 0;"
>
<el-form-item
prop=
"windTemp"
style=
"padding: 0; margin: 0;"
>
<el-input
maxlength=
"1
1"
v-model=
"addForm.windTemp"
placeholder=
""
style=
"width: 37
0px"
/>
<el-input
maxlength=
"1
0"
v-model=
"addForm.windTemp"
placeholder=
""
style=
"width: 29
0px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row
id=
"windDesc"
>
<el-col
:span=
"8"
col-label
>
描述:
</el-col>
<el-col
:span=
"8"
col-label
>
描述:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-col
:span=
"16"
col-value
>
<el-input
maxlength=
"11"
v-model=
"addForm.windDesc"
placeholder=
""
style=
"width: 370px"
/>
<el-form-item
prop=
"windDesc"
style=
"padding: 0; margin: 0;"
>
<el-input
type=
"textarea"
v-model=
"addForm.windDesc"
maxlength=
"200"
show-word-limit
style=
"width: 290px"
autosize
/>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
...
@@ -368,7 +402,9 @@ function customSort(a, b) {
...
@@ -368,7 +402,9 @@ function customSort(a, b) {
font-size: 12px;
font-size: 12px;
color: black;
color: black;
}
}
.dialog-window{
height: 500px;
}
.table-operate-column {
.table-operate-column {
display: flex;
display: flex;
justify-content: center;
justify-content: center;
...
@@ -414,6 +450,10 @@ function customSort(a, b) {
...
@@ -414,6 +450,10 @@ function customSort(a, b) {
padding-left: 5px;
padding-left: 5px;
}
}
#windDesc{
height: 100%;
}
.el-input {
.el-input {
color: black;
color: black;
height: 24px;
height: 24px;
...
...
src/views/SchedulingPage/weatherManageSub/AddWindow.vue
View file @
1aafb16d
<
script
setup
>
<
script
setup
>
import
{
ref
,
defineProps
,
defineEmits
,
computed
,
isRef
,
onMounted
,
watchEffect
,
reactive
}
from
"vue"
;
import
{
ref
,
defineProps
,
defineEmits
,
computed
,
isRef
,
onMounted
,
watchEffect
,
reactive
}
from
"vue"
;
import
{
vFloatNumber
}
from
"@/utils/directives.js"
;
import
{
vFloatNumber
}
from
"@/utils/directives.js"
;
import
{
ElMessage
}
from
"element-plus"
;
const
props
=
defineProps
({
const
props
=
defineProps
({
open
:
{
open
:
{
...
@@ -39,6 +40,54 @@ function handleConfirm() {
...
@@ -39,6 +40,54 @@ function handleConfirm() {
addSaveBtnLoading
.
value
=
true
addSaveBtnLoading
.
value
=
true
formRef
.
value
.
validate
(
valid
=>
{
formRef
.
value
.
validate
(
valid
=>
{
if
(
valid
){
if
(
valid
){
if
(
Number
(
addData
.
value
.
temperature
)
>
45
||
Number
(
addData
.
value
.
temperature
)
<
-
30
){
ElMessage
({
message
:
'温度不能大于45度或小于-30度'
,
type
:
'error'
,
})
addSaveBtnLoading
.
value
=
false
return
}
if
(
Number
(
addData
.
value
.
wind
)
>
17
||
Number
(
addData
.
value
.
wind
)
<=
0
){
ElMessage
({
message
:
'风速不能大于17或小于等于0'
,
type
:
'error'
,
})
addSaveBtnLoading
.
value
=
false
return
}
if
(
Number
(
addData
.
value
.
illumination
)
>
5000
||
Number
(
addData
.
value
.
illumination
)
<=
0
){
ElMessage
({
message
:
'光照不能大于5000或小于等于0'
,
type
:
'error'
,
})
addSaveBtnLoading
.
value
=
false
return
}
if
(
Number
(
addData
.
value
.
diffPercentage
)
>
100
||
Number
(
addData
.
value
.
diffPercentage
)
<=
0
){
ElMessage
({
message
:
'自动偏差百分比不能大于100或小于等于0'
,
type
:
'error'
,
})
addSaveBtnLoading
.
value
=
false
return
}
if
(
Number
(
addData
.
value
.
sort
)
<
0
){
ElMessage
({
message
:
'排序不能小于0'
,
type
:
'error'
,
})
addSaveBtnLoading
.
value
=
false
return
}
if
(
Number
(
addData
.
value
.
timeoutMin
)
<
0
){
ElMessage
({
message
:
'自动验证循环时间不能小于0'
,
type
:
'error'
,
})
addSaveBtnLoading
.
value
=
false
return
}
addData
.
value
.
operateTime
=
getCurrentDateTime
()
addData
.
value
.
operateTime
=
getCurrentDateTime
()
emit
(
'onConfirm'
,
addData
.
value
)
emit
(
'onConfirm'
,
addData
.
value
)
resetInput
()
resetInput
()
...
@@ -87,26 +136,38 @@ const formRef = ref()
...
@@ -87,26 +136,38 @@ const formRef = ref()
//校验规则
//校验规则
const
rules
=
reactive
({
const
rules
=
reactive
({
diffPercentage
:
[
customizeName
:
[
// 自定义名称
{
pattern
:
/^
([
0-9
]\d{0,1}
|100$
)(\.\d{1,4})?
$/
,
"message"
:
"请输入正确的百分比格式"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
'请输入自定义名称'
}
],
],
wind
:
[
diffPercentage
:
[
// 自动偏差百分比
{
pattern
:
/^
(\d{1,11})(\.[
0-9
]{1,4})?
$/
,
"message"
:
"风速必须是1-11位实数"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
'请输入正确数值'
},
{
pattern
:
/
[
0-9
]{1,10}
/
,
"message"
:
"请输入正确数值"
,
trigger
:
"blur"
}
],
wind
:
[
// 风速
{
required
:
true
,
message
:
'请输入正确数值'
},
{
pattern
:
/
[
0-9
]{1,10}
/
,
"message"
:
"请输入正确数值"
,
trigger
:
"blur"
}
],
],
illumination
:
[
illumination
:
[
{
pattern
:
/^
(\d{1,2})?
$/
,
"message"
:
"光照必须是1-2位实数"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
'请输入正确数值'
},
{
pattern
:
/
[
0-9
]{1,10}
/
,
"message"
:
"请输入正确数值"
,
trigger
:
"blur"
}
],
],
sort
:
[
sort
:
[
{
pattern
:
/^
(\d{1,11})
$/
,
"message"
:
"排序必须是1-11位正整数"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
'请输入正确数值'
},
{
pattern
:
/
[
0-9
]{1,10}
/
,
"message"
:
"请输入正确数值"
,
trigger
:
"blur"
}
],
],
timeoutMin
:
[
timeoutMin
:
[
// 验证时间
{
pattern
:
/^
(\d{1,11})(\.[
0-9
]{1,4})?
$/
,
"message"
:
"判断时间必须是1-11位实数"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
'请输入正确数值'
},
{
pattern
:
/
[
0-9
]{1,10}
/
,
"message"
:
"请输入正确数值"
,
trigger
:
"blur"
}
],
],
temperature
:
[
temperature
:
[
{
required
:
true
,
message
:
'请输入正确的温度'
},
{
required
:
true
,
message
:
'请输入正确的温度'
},
{
pattern
:
/^
(
-
?\d{1,11})(\.[
0-9
]{1,4})?
$/
,
message
:
"请输入正确的温度"
,
trigger
:
"blur"
}
{
pattern
:
/^
(
-
?\d{1,11})(\.[
0-9
]{1,4})?
$/
,
message
:
"请输入正确的温度"
,
trigger
:
"blur"
}
],
tempRegulation
:
[
{
required
:
true
,
message
:
'请输入正确数值'
},
{
pattern
:
/^
(
-
?\d{1,11})(\.[
0-9
]{1,4})?
$/
,
message
:
"请输入正确数值"
,
trigger
:
"blur"
}
]
]
})
;
})
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -114,12 +175,14 @@ const rules = reactive({
...
@@ -114,12 +175,14 @@ const rules = reactive({
<template
#
default
>
<template
#
default
>
<div
class=
"dialog-content"
>
<div
class=
"dialog-content"
>
<el-form
:rules=
"rules"
ref=
"formRef"
:model=
"addData"
label-width=
"auto"
>
<el-form
:rules=
"rules"
ref=
"formRef"
:model=
"addData"
:inline-message=
"true"
label-width=
"auto"
>
<el-row
style=
"border-top: #a6c3e9 1px solid"
>
<el-row
style=
"border-top: #a6c3e9 1px solid"
>
<el-col
:span=
"8"
class=
"content-col-label"
>
自定义名称:
</el-col>
<el-col
:span=
"8"
class=
"content-col-label"
>
自定义名称:
</el-col>
<el-col
:span=
"16"
class=
"content-col-value"
>
<el-col
:span=
"16"
class=
"content-col-value"
>
<el-input
maxlength=
"11"
:input-style=
"inputStyle"
v-model=
"addData.customizeName"
style=
"width: 510px"
/>
<el-form-item
prop=
"customizeName"
style=
"padding: 0;margin: 0;"
>
<el-input
maxlength=
"10"
:input-style=
"inputStyle"
v-model=
"addData.customizeName"
style=
"width: 510px"
/>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -138,7 +201,7 @@ const rules = reactive({
...
@@ -138,7 +201,7 @@ const rules = reactive({
<el-col
:span=
"8"
class=
"content-col-label"
>
温度:
</el-col>
<el-col
:span=
"8"
class=
"content-col-label"
>
温度:
</el-col>
<el-col
:span=
"16"
class=
"content-col-value"
>
<el-col
:span=
"16"
class=
"content-col-value"
>
<el-form-item
prop=
"temperature"
style=
"padding: 0;margin: 0;"
>
<el-form-item
prop=
"temperature"
style=
"padding: 0;margin: 0;"
>
<el-input
maxlength=
"1
1
"
:input-style=
"inputStyle"
v-model=
"addData.temperature"
style=
"width: 510px"
/>
<el-input
maxlength=
"1
0
"
:input-style=
"inputStyle"
v-model=
"addData.temperature"
style=
"width: 510px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -147,7 +210,7 @@ const rules = reactive({
...
@@ -147,7 +210,7 @@ const rules = reactive({
<el-col
:span=
"8"
class=
"content-col-label"
>
风速:
</el-col>
<el-col
:span=
"8"
class=
"content-col-label"
>
风速:
</el-col>
<el-col
:span=
"16"
class=
"content-col-value"
>
<el-col
:span=
"16"
class=
"content-col-value"
>
<el-form-item
prop=
"wind"
style=
"padding: 0;margin: 0;"
>
<el-form-item
prop=
"wind"
style=
"padding: 0;margin: 0;"
>
<el-input
:input-style=
"inputStyle"
maxlength=
"11
"
v-model=
"addData.wind"
style=
"width: 510px"
/>
<el-input
v-float-number
:input-style=
"inputStyle"
maxlength=
"10
"
v-model=
"addData.wind"
style=
"width: 510px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -155,7 +218,7 @@ const rules = reactive({
...
@@ -155,7 +218,7 @@ const rules = reactive({
<el-col
:span=
"8"
class=
"content-col-label"
>
光照:
</el-col>
<el-col
:span=
"8"
class=
"content-col-label"
>
光照:
</el-col>
<el-col
:span=
"16"
class=
"content-col-value"
>
<el-col
:span=
"16"
class=
"content-col-value"
>
<el-form-item
prop=
"illumination"
style=
"padding: 0;margin: 0;"
>
<el-form-item
prop=
"illumination"
style=
"padding: 0;margin: 0;"
>
<el-input
:input-style=
"inputStyle"
maxlength=
"2
"
v-model=
"addData.illumination"
<el-input
v-float-number
:input-style=
"inputStyle"
maxlength=
"10
"
v-model=
"addData.illumination"
style=
"width: 510px"
/>
style=
"width: 510px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -165,7 +228,7 @@ const rules = reactive({
...
@@ -165,7 +228,7 @@ const rules = reactive({
<el-col
:span=
"8"
class=
"content-col-label"
>
排序:
</el-col>
<el-col
:span=
"8"
class=
"content-col-label"
>
排序:
</el-col>
<el-col
:span=
"16"
class=
"content-col-value"
>
<el-col
:span=
"16"
class=
"content-col-value"
>
<el-form-item
prop=
"sort"
style=
"padding: 0;margin: 0;"
>
<el-form-item
prop=
"sort"
style=
"padding: 0;margin: 0;"
>
<el-input
:input-style=
"inputStyle"
maxlength=
"11
"
v-model=
"addData.sort"
style=
"width: 510px"
/>
<el-input
v-float-number
:input-style=
"inputStyle"
maxlength=
"10
"
v-model=
"addData.sort"
style=
"width: 510px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -178,8 +241,8 @@ const rules = reactive({
...
@@ -178,8 +241,8 @@ const rules = reactive({
<el-col
:span=
"5"
class=
"content-col-label"
>
自动偏差百分比(%d):
</el-col>
<el-col
:span=
"5"
class=
"content-col-label"
>
自动偏差百分比(%d):
</el-col>
<el-col
:span=
"7"
class=
"content-col-value"
>
<el-col
:span=
"7"
class=
"content-col-value"
>
<el-form-item
prop=
"diffPercentage"
style=
"padding: 0;margin: 0;"
>
<el-form-item
prop=
"diffPercentage"
style=
"padding: 0;margin: 0;"
>
<el-input
v-float-number
:input-style=
"inputStyle"
maxlength=
"1
1
"
v-model=
"addData.diffPercentage"
<el-input
v-float-number
:input-style=
"inputStyle"
maxlength=
"1
0
"
v-model=
"addData.diffPercentage"
style=
"width:
240
px"
/>
style=
"width:
175
px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -188,16 +251,16 @@ const rules = reactive({
...
@@ -188,16 +251,16 @@ const rules = reactive({
<el-col
:span=
"5"
class=
"content-col-label"
>
自动验证循环时间(分钟):
</el-col>
<el-col
:span=
"5"
class=
"content-col-label"
>
自动验证循环时间(分钟):
</el-col>
<el-col
:span=
"7"
class=
"content-col-value"
>
<el-col
:span=
"7"
class=
"content-col-value"
>
<el-form-item
prop=
"timeoutMin"
style=
"padding: 0;margin: 0;"
>
<el-form-item
prop=
"timeoutMin"
style=
"padding: 0;margin: 0;"
>
<el-input
v-float-number
:input-style=
"inputStyle"
maxlength=
"1
1
"
v-model=
"addData.timeoutMin"
<el-input
v-float-number
:input-style=
"inputStyle"
maxlength=
"1
0
"
v-model=
"addData.timeoutMin"
style=
"width:
240
px"
/>
style=
"width:
175
px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"5"
class=
"content-col-label"
>
自动调节温度(℃):
</el-col>
<el-col
:span=
"5"
class=
"content-col-label"
>
自动调节温度(℃):
</el-col>
<el-col
:span=
"7"
class=
"content-col-value"
>
<el-col
:span=
"7"
class=
"content-col-value"
>
<el-form-item
prop=
"tempRegulation"
style=
"padding: 0;margin: 0;"
>
<el-form-item
prop=
"tempRegulation"
style=
"padding: 0;margin: 0;"
>
<el-input
:input-style=
"inputStyle"
maxlength=
"1
1
"
v-model=
"addData.tempRegulation"
<el-input
:input-style=
"inputStyle"
maxlength=
"1
0
"
v-model=
"addData.tempRegulation"
style=
"width:
240
px"
/>
style=
"width:
175
px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
...
src/views/SchedulingPage/weatherManageSub/BindWindow.vue
View file @
1aafb16d
...
@@ -71,7 +71,7 @@ function onSubmit() {
...
@@ -71,7 +71,7 @@ function onSubmit() {
bindData
.
value
.
isAuto
=
bindData
.
value
.
isAuto
===
'自动模式'
?
true
:
false
;
bindData
.
value
.
isAuto
=
bindData
.
value
.
isAuto
===
'自动模式'
?
true
:
false
;
bindData
.
value
.
isFixed
=
bindData
.
value
.
isFixed
===
'固定模式'
?
true
:
false
;
bindData
.
value
.
isFixed
=
bindData
.
value
.
isFixed
===
'固定模式'
?
true
:
false
;
bindData
.
value
.
updateNullFields
=
""
bindData
.
value
.
updateNullFields
=
""
emit
(
'onConfirm'
,
bindData
.
value
)
gi
emit
(
'onConfirm'
,
bindData
.
value
)
}
else
{
}
else
{
ElMessage
.
error
(
'请选择供热站'
)
ElMessage
.
error
(
'请选择供热站'
)
}
}
...
@@ -83,7 +83,7 @@ function onSubmit() {
...
@@ -83,7 +83,7 @@ function onSubmit() {
* @param isAvailable 是否可用,默认为true,表示可用
* @param isAvailable 是否可用,默认为true,表示可用
*/
*/
async
function
getTransfer
(
supplyId
,
isAvailable
=
true
)
{
async
function
getTransfer
(
supplyId
,
isAvailable
=
true
)
{
selectedTransfer
.
value
.
length
=
0
// 置空,不然会重复添加
console
.
log
(
'supplyId>>>>>>>'
,
supplyId
)
let
param
=
{
let
param
=
{
customizeId
:
bindData
.
value
.
customizeId
,
customizeId
:
bindData
.
value
.
customizeId
,
supplyId
:
supplyId
supplyId
:
supplyId
...
@@ -93,6 +93,10 @@ async function getTransfer(supplyId, isAvailable = true) {
...
@@ -93,6 +93,10 @@ async function getTransfer(supplyId, isAvailable = true) {
*/
*/
const
result
=
await
getTransferInterface
(
param
)
const
result
=
await
getTransferInterface
(
param
)
transferData
.
value
=
result
.
data
transferData
.
value
=
result
.
data
if
(
isAvailable
){
// 每次需要为换热站推入数据时,清空已有的数据
selectedTransfer
.
value
.
length
=
0
}
for
(
const
item
of
transferData
.
value
)
{
for
(
const
item
of
transferData
.
value
)
{
if
(
!
isAvailable
)
{
if
(
!
isAvailable
)
{
item
.
selected
=
item
.
selected
.
toLowerCase
()
===
'true'
?
true
:
false
item
.
selected
=
item
.
selected
.
toLowerCase
()
===
'true'
?
true
:
false
...
...
src/views/SchedulingPage/weatherManageSub/ReviseWindow.vue
View file @
1aafb16d
This diff is collapsed.
Click to expand it.
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