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
e78f8f67
Commit
e78f8f67
authored
Aug 08, 2024
by
xuke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://gitlab.91isoft.com:10022/hikvision/web-project
parents
ff08c5c5
7ed9fbec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
126 additions
and
101 deletions
+126
-101
AnnualParamPage.vue
src/views/SchedulingPage/AnnualParamPage.vue
+115
-99
PhenomenonPage.vue
src/views/SchedulingPage/PhenomenonPage.vue
+11
-2
No files found.
src/views/SchedulingPage/AnnualParamPage.vue
View file @
e78f8f67
<
script
setup
>
<
script
setup
>
import
{
computed
,
onMounted
,
reactive
,
ref
}
from
"vue"
;
import
{
computed
,
onMounted
,
reactive
,
ref
}
from
"vue"
;
import
{
zhCn
}
from
"element-plus/es/locale/index"
;
import
{
zhCn
}
from
"element-plus/es/locale/index"
;
import
{
getAnnualParam
,
alterAnnualParam
,
addAnnualParam
,
deleteAnnualParam
}
from
'@/api/scheduling.js'
import
{
getAnnualParam
,
alterAnnualParam
,
addAnnualParam
,
deleteAnnualParam
}
from
'@/api/scheduling.js'
import
{
ElMessageBox
}
from
"element-plus"
;
import
{
ElMessageBox
}
from
"element-plus"
;
const
data
=
ref
()
const
data
=
ref
()
const
dataBackup
=
ref
([])
const
tableHeaderClass
=
data
=>
{
// 表头样式
const
tableHeaderClass
=
data
=>
{
// 表头样式
return
'table-header-class'
return
'table-header-class'
}
}
...
@@ -16,23 +17,23 @@ const reviseWindowOpen = ref(false)
...
@@ -16,23 +17,23 @@ const reviseWindowOpen = ref(false)
const
addWindowOpen
=
ref
(
false
)
const
addWindowOpen
=
ref
(
false
)
const
reviseForm
=
ref
({})
const
reviseForm
=
ref
({})
const
addForm
=
ref
({
const
addForm
=
ref
({
supplyId
:
"00000000-0000-0000-0000-000000000000"
,
supplyId
:
"00000000-0000-0000-0000-000000000000"
,
energyType
:
''
,
energyType
:
''
,
year
:
''
,
year
:
''
,
standard
:
''
,
standard
:
''
,
degreeStandard
:
''
,
degreeStandard
:
''
,
indoorTemperature
:
''
,
indoorTemperature
:
''
,
outdoorTemperature
:
''
,
outdoorTemperature
:
''
,
backWaterTemperature
:
''
backWaterTemperature
:
''
})
})
const
energyTypeList
=
ref
([
'一步节能'
,
'二步节能'
,
'三步节能'
,
'四步节能'
,
'非节能'
])
// 节能等级列表
const
energyTypeList
=
ref
([
'一步节能'
,
'二步节能'
,
'三步节能'
,
'四步节能'
,
'非节能'
])
// 节能等级列表
const
currentMonth
=
ref
(
0
)
const
currentMonth
=
ref
(
0
)
const
currentYear
=
ref
(
0
)
const
currentYear
=
ref
(
0
)
const
selectYearValue
=
computed
(()
=>
{
const
selectYearValue
=
computed
(()
=>
{
if
(
currentMonth
.
value
>=
7
){
if
(
currentMonth
.
value
>=
7
)
{
return
currentYear
.
value
+
"年-"
+
(
currentYear
.
value
+
1
)
+
"年"
return
currentYear
.
value
+
"年-"
+
(
currentYear
.
value
+
1
)
+
"年"
}
else
{
}
else
{
return
(
currentYear
.
value
-
1
)
+
"年-"
+
currentYear
.
value
+
"年"
return
(
currentYear
.
value
-
1
)
+
"年-"
+
currentYear
.
value
+
"年"
}
}
})
})
...
@@ -47,15 +48,18 @@ function handleDelete(val) {
...
@@ -47,15 +48,18 @@ function handleDelete(val) {
'点击确定后,该条数据将删除,是否继续?'
,
'点击确定后,该条数据将删除,是否继续?'
,
'Warning'
,
'Warning'
,
{
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}
).
then
(()
=>
{
deleteAnnualParam
(
val
.
paramId
).
then
(
res
=>
{
if
(
res
.
success
)
{
getData
()
}
}
).
then
(()
=>
{
deleteAnnualParam
(
val
.
paramId
).
then
(
res
=>
{
if
(
res
.
success
){
getData
()}
})
})
}).
catch
(
err
=>
{})
}).
catch
(
err
=>
{
})
}
// 处理删除
}
// 处理删除
function
handleAdd
()
{
function
handleAdd
()
{
currentYear
.
value
=
new
Date
().
getFullYear
()
currentYear
.
value
=
new
Date
().
getFullYear
()
...
@@ -63,23 +67,28 @@ function handleAdd() {
...
@@ -63,23 +67,28 @@ function handleAdd() {
addWindowOpen
.
value
=
true
addWindowOpen
.
value
=
true
}
// 处理新增
}
// 处理新增
function
handleSearch
()
{
function
handleSearch
()
{
if
(
!
searchKey
.
value
)
{
getData
()
}
else
{
data
.
value
=
dataBackup
.
value
.
filter
(
item
=>
item
.
year
.
includes
(
searchKey
.
value
))
}
}
// 处理查询
}
// 处理查询
function
onSubmit
()
{
function
onSubmit
()
{
alterAnnualParam
(
reviseForm
.
value
).
then
(
res
=>
{
alterAnnualParam
(
reviseForm
.
value
).
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
getData
()
getData
()
handleClose
()
handleClose
()
}
}
})
})
}
// 提交修改
}
// 提交修改
function
onAddSubmit
(){
// 提交新增
function
onAddSubmit
()
{
// 提交新增
data
.
value
.
forEach
((
item
,
index
,
array
)
=>
{
data
.
value
.
forEach
((
item
,
index
,
array
)
=>
{
if
(
item
.
energyType
===
addForm
.
energyType
&&
item
.
year
===
addForm
.
year
)
{
if
(
item
.
energyType
===
addForm
.
energyType
&&
item
.
year
===
addForm
.
year
)
{
alert
(
"该类型年度已存在"
)
alert
(
"该类型年度已存在"
)
return
return
}
}
})
})
addAnnualParam
(
addForm
.
value
).
then
(
res
=>
{
addAnnualParam
(
addForm
.
value
).
then
(
res
=>
{
getData
()
getData
()
handleClose
()
handleClose
()
})
})
...
@@ -89,24 +98,26 @@ function handleClose() {
...
@@ -89,24 +98,26 @@ function handleClose() {
addWindowOpen
.
value
=
false
addWindowOpen
.
value
=
false
resetInput
()
resetInput
()
}
// 关闭弹窗
}
// 关闭弹窗
onMounted
(()
=>
{
onMounted
(()
=>
{
getData
()
getData
()
})
})
function
getData
(){
function
getData
()
{
getAnnualParam
().
then
(
res
=>
{
getAnnualParam
().
then
(
res
=>
{
data
.
value
=
res
.
data
data
.
value
=
res
.
data
dataBackup
.
value
=
[...
data
.
value
]
})
})
}
}
function
resetInput
(){
function
resetInput
()
{
addForm
.
value
=
{
addForm
.
value
=
{
energyType
:
''
,
energyType
:
''
,
year
:
''
,
year
:
''
,
standard
:
''
,
standard
:
''
,
degreeStandard
:
''
,
degreeStandard
:
''
,
indoorTemperature
:
''
,
indoorTemperature
:
''
,
outdoorTemperature
:
''
,
outdoorTemperature
:
''
,
backWaterTemperature
:
''
backWaterTemperature
:
''
}
}
}
}
</
script
>
</
script
>
...
@@ -117,7 +128,7 @@ function resetInput(){
...
@@ -117,7 +128,7 @@ function resetInput(){
<el-row>
<el-row>
<el-col
:span=
"8"
label
>
年度:
</el-col>
<el-col
:span=
"8"
label
>
年度:
</el-col>
<el-col
:span=
"16"
>
<el-col
:span=
"16"
>
<el-input
v-model=
"searchKey"
/>
<el-input
clearable
v-model=
"searchKey"
/>
</el-col>
</el-col>
</el-row>
</el-row>
<el-button
type=
"primary"
class=
"add-search-btn"
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
type=
"primary"
class=
"add-search-btn"
@
click=
"handleAdd"
>
新增
</el-button>
...
@@ -155,59 +166,59 @@ function resetInput(){
...
@@ -155,59 +166,59 @@ function resetInput(){
v-model=
"reviseWindowOpen"
v-model=
"reviseWindowOpen"
width=
"700px"
width=
"700px"
:before-close=
"handleClose"
>
:before-close=
"handleClose"
>
<
template
#
default
>
<
template
#
default
>
<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.energyType"
style=
"width: 370px"
>
<el-select
placeholder=
""
size=
"small"
v-model=
"reviseForm.energyType"
style=
"width: 370px"
>
<el-option
<el-option
v-for=
"item in energyTypeList"
v-for=
"item in energyTypeList"
:key=
"item"
:key=
"item"
:label=
"item"
:label=
"item"
:value=
"item"
:value=
"item"
/>
/>
</el-select>
</el-select>
</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-select
placeholder=
""
size=
"small"
v-model=
"reviseForm.year"
style=
"width: 370px"
>
<el-select
placeholder=
""
size=
"small"
v-model=
"reviseForm.year"
style=
"width: 370px"
>
<el-option
:value=
"selectYearValue"
:label=
"selectYearValue"
/>
<el-option
:value=
"selectYearValue"
:label=
"selectYearValue"
/>
</el-select>
</el-select>
</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-input
v-model=
"reviseForm.standard"
placeholder=
""
style=
"width: 370px"
/>
<el-input
v-model=
"reviseForm.standard"
placeholder=
""
style=
"width: 370px"
/>
</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-input
v-model=
"reviseForm.degreeStandard"
style=
"width: 370px"
/>
<el-input
v-model=
"reviseForm.degreeStandard"
style=
"width: 370px"
/>
</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-input
v-model=
"reviseForm.indoorTemperature"
style=
"width: 370px"
/>
<el-input
v-model=
"reviseForm.indoorTemperature"
style=
"width: 370px"
/>
</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-input
v-model=
"reviseForm.outdoorTemperature"
style=
"width: 370px"
/>
<el-input
v-model=
"reviseForm.outdoorTemperature"
style=
"width: 370px"
/>
</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-input
v-model=
"reviseForm.backWaterTemperature"
style=
"width: 370px"
/>
<el-input
v-model=
"reviseForm.backWaterTemperature"
style=
"width: 370px"
/>
</el-col>
</el-col>
</el-row>
</el-row>
</
template
>
</
template
>
<
template
#
footer
>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<div
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
保存
</el-button>
...
@@ -249,7 +260,7 @@ function resetInput(){
...
@@ -249,7 +260,7 @@ function resetInput(){
</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-input
v-model=
"addForm.degreeStandard"
style=
"width: 370px"
/>
<el-input
v-model=
"addForm.degreeStandard"
style=
"width: 370px"
/>
</el-col>
</el-col>
...
@@ -346,10 +357,12 @@ function resetInput(){
...
@@ -346,10 +357,12 @@ function resetInput(){
justify-content: space-between;
justify-content: space-between;
align-items: center;
align-items: center;
}
}
.el-row[first]{
.el-row[first] {
border-top: 1px solid #a6c3e9;
border-top: 1px solid #a6c3e9;
}
}
.el-row{
.el-row {
border-left: 1px solid #a6c3e9;
border-left: 1px solid #a6c3e9;
border-right: 1px solid #a6c3e9;
border-right: 1px solid #a6c3e9;
border-bottom: 1px solid #a6c3e9;
border-bottom: 1px solid #a6c3e9;
...
@@ -357,7 +370,8 @@ function resetInput(){
...
@@ -357,7 +370,8 @@ function resetInput(){
height: 35px;
height: 35px;
color: #124362;
color: #124362;
}
}
.el-col[col-label]{
.el-col[col-label] {
display: flex;
display: flex;
justify-content: end;
justify-content: end;
align-items: center;
align-items: center;
...
@@ -365,13 +379,15 @@ function resetInput(){
...
@@ -365,13 +379,15 @@ function resetInput(){
background-color: #f2f6f8;
background-color: #f2f6f8;
padding-right: 5px;
padding-right: 5px;
}
}
.el-col[col-value]{
.el-col[col-value] {
display: flex;
display: flex;
justify-content: start;
justify-content: start;
align-items: center;
align-items: center;
padding-left: 5px;
padding-left: 5px;
}
}
.el-input{
.el-input {
color: black;
color: black;
height: 24px;
height: 24px;
}
}
...
...
src/views/SchedulingPage/PhenomenonPage.vue
View file @
e78f8f67
...
@@ -4,6 +4,7 @@ import {ElMessageBox} from "element-plus";
...
@@ -4,6 +4,7 @@ import {ElMessageBox} from "element-plus";
import
{
getPhenomenon
,
addPhenomenon
,
alterPhenomenon
,
deletePhenomenon
}
from
"@/api/scheduling.js"
import
{
getPhenomenon
,
addPhenomenon
,
alterPhenomenon
,
deletePhenomenon
}
from
"@/api/scheduling.js"
const
data
=
ref
()
const
data
=
ref
()
const
dataBackup
=
ref
([])
const
searchKey
=
ref
(
''
)
// 查询参数
const
searchKey
=
ref
(
''
)
// 查询参数
const
reviseWindowOpen
=
ref
(
false
)
const
reviseWindowOpen
=
ref
(
false
)
const
addWindowOpen
=
ref
(
false
)
const
addWindowOpen
=
ref
(
false
)
...
@@ -39,6 +40,13 @@ function omit(val){
...
@@ -39,6 +40,13 @@ function omit(val){
})
})
}).
catch
(
err
=>
{})
}).
catch
(
err
=>
{})
}
// 删除按钮单击事件
}
// 删除按钮单击事件
function
search
(){
if
(
!
searchKey
.
value
){
getData
()
}
else
{
data
.
value
=
dataBackup
.
value
.
filter
(
item
=>
item
.
phenomenonName
.
includes
(
searchKey
.
value
)
)
}
}
function
handleClose
(){
function
handleClose
(){
reviseWindowOpen
.
value
=
false
reviseWindowOpen
.
value
=
false
addWindowOpen
.
value
=
false
addWindowOpen
.
value
=
false
...
@@ -72,6 +80,7 @@ onMounted(()=>{
...
@@ -72,6 +80,7 @@ onMounted(()=>{
function
getData
(){
function
getData
(){
getPhenomenon
().
then
(
res
=>
{
getPhenomenon
().
then
(
res
=>
{
data
.
value
=
res
.
data
data
.
value
=
res
.
data
dataBackup
.
value
=
[...
data
.
value
]
})
})
}
}
</
script
>
</
script
>
...
@@ -81,10 +90,10 @@ function getData(){
...
@@ -81,10 +90,10 @@ function getData(){
<el-row>
<el-row>
<el-col
:span=
"8"
label
>
名称:
</el-col>
<el-col
:span=
"8"
label
>
名称:
</el-col>
<el-col
:span=
"16"
>
<el-col
:span=
"16"
>
<el-input
v-model=
"searchKey"
/>
<el-input
clearable
v-model=
"searchKey"
/>
</el-col>
</el-col>
</el-row>
</el-row>
<el-button
type=
"primary"
class=
"add-search-btn"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"search"
class=
"add-search-btn"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"add"
class=
"add-search-btn"
>
新增
</el-button>
<el-button
type=
"primary"
@
click=
"add"
class=
"add-search-btn"
>
新增
</el-button>
</div>
</div>
<div
class=
"table-wrapper"
>
<div
class=
"table-wrapper"
>
...
...
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