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
aaf4cfbb
Commit
aaf4cfbb
authored
Aug 06, 2024
by
裴文涛
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.91isoft.com:90/hikvision/web-project
parents
4ea227f5
95a1666f
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
431 additions
and
101 deletions
+431
-101
energy.js
src/api/mockData/energy.js
+24
-24
scheduling.js
src/api/scheduling.js
+31
-1
main.js
src/main.js
+3
-3
TapPage.vue
src/views/HeatUserPage/TapPage.vue
+1
-1
AnalysisManage.vue
src/views/Scheduling/AnalysisManage.vue
+3
-0
AnnualParam.vue
src/views/Scheduling/AnnualParam.vue
+3
-0
ConfigBoiler.vue
src/views/Scheduling/ConfigBoiler.vue
+3
-0
EnergyManage.vue
src/views/Scheduling/EnergyManage.vue
+3
-0
InstantHeat.vue
src/views/Scheduling/InstantHeat.vue
+3
-0
Phenomenon.vue
src/views/Scheduling/Phenomenon.vue
+3
-0
WeatherManage.vue
src/views/Scheduling/WeatherManage.vue
+3
-0
WeatherManagePage.vue
src/views/Scheduling/WeatherManagePage.vue
+241
-0
WindManage.vue
src/views/Scheduling/WindManage.vue
+3
-0
ConfigBoilerPage.vue
src/views/SchedulingPage/ConfigBoilerPage.vue
+10
-8
EnergyManagePage.vue
src/views/SchedulingPage/EnergyManagePage.vue
+42
-31
InstantHeatPage.vue
src/views/SchedulingPage/InstantHeatPage.vue
+55
-33
No files found.
src/api/mockData/energy.js
View file @
aaf4cfbb
...
...
@@ -23,12 +23,12 @@ const count = 100
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
List
.
push
(
Mock
.
mock
({
i
d
:
"@increment()"
,
'
n
ame|1'
:
Mock
.
mock
([
'东部供热站'
,
'行政区供热站'
,
'福宛里供热站'
]),
'
t
ype|1-4'
:
1
,
'
t
ype|1'
:
Mock
.
mock
([
'热'
,
'光'
,
'电'
,
'机械'
]),
'
use
d|100-3000'
:
1
,
d
ate
:
Mock
.
mock
(
'@date("yyyy/MM/dd")'
)
+
' 0:00:00'
allowPagingI
d
:
"@increment()"
,
'
supplyN
ame|1'
:
Mock
.
mock
([
'东部供热站'
,
'行政区供热站'
,
'福宛里供热站'
]),
'
energyT
ype|1-4'
:
1
,
'
energyT
ype|1'
:
Mock
.
mock
([
'热'
,
'光'
,
'电'
,
'机械'
]),
'
recor
d|100-3000'
:
1
,
recordD
ate
:
Mock
.
mock
(
'@date("yyyy/MM/dd")'
)
+
' 0:00:00'
})
)
}
...
...
@@ -43,11 +43,11 @@ export default {
*/
getEnergyList
:
config
=>
{
//limit默认是10,因为分页器默认也是一页10个
const
{
n
ame
,
page
=
1
,
limit
=
10
}
=
param2Obj
(
config
.
url
)
const
{
supplyN
ame
,
page
=
1
,
limit
=
10
}
=
param2Obj
(
config
.
url
)
const
mockList
=
List
.
filter
(
energy
=>
{
//如果name存在会,根据name筛选数据
if
(
name
&&
energy
.
name
.
indexOf
(
n
ame
)
===
-
1
)
return
false
if
(
supplyName
&&
energy
.
supplyName
.
indexOf
(
supplyN
ame
)
===
-
1
)
return
false
return
true
})
//分页
...
...
@@ -66,17 +66,17 @@ export default {
* @return {*}
*/
deleteEnergy
:
config
=>
{
const
{
id
}
=
param2Obj
(
config
.
url
)
const
{
allowPagingId
}
=
param2Obj
(
config
.
url
)
// console.log("前端传来的id:"+id);
if
(
!
i
d
)
{
if
(
!
allowPagingI
d
)
{
return
{
code
:
-
999
,
message
:
'参数不正确'
}
}
else
{
List
=
List
.
filter
(
item
=>
item
.
id
!=
i
d
)
List
=
List
.
filter
(
item
=>
item
.
allowPagingId
!=
allowPagingI
d
)
console
.
log
(
List
);
return
{
code
:
200
,
...
...
@@ -91,14 +91,14 @@ export default {
* @return {{code: number, data: {message: string}}}
*/
createEnery
:
config
=>
{
const
{
name
,
type
,
used
,
d
ate
}
=
JSON
.
parse
(
config
.
body
)
const
{
supplyName
,
energyType
,
record
,
recordD
ate
}
=
JSON
.
parse
(
config
.
body
)
List
.
unshift
({
i
d
:
Mock
.
mock
(
'@increment()'
),
name
:
n
ame
,
type
:
t
ype
,
used
:
use
d
,
date
:
d
ate
allowPagingI
d
:
Mock
.
mock
(
'@increment()'
),
supplyName
:
supplyN
ame
,
energyType
:
energyT
ype
,
record
:
recor
d
,
recordDate
:
recordD
ate
})
return
{
code
:
200
,
...
...
@@ -109,14 +109,14 @@ export default {
},
updateEnergy
:
config
=>
{
const
{
id
,
name
,
type
,
used
,
d
ate
}
=
JSON
.
parse
(
config
.
body
)
const
type_num
=
parseInt
(
t
ype
)
const
{
allowPagingId
,
supplyName
,
energyType
,
record
,
recordD
ate
}
=
JSON
.
parse
(
config
.
body
)
const
energyType_num
=
parseInt
(
energyT
ype
)
List
.
some
(
e
=>
{
if
(
e
.
id
===
i
d
)
{
e
.
name
=
n
ame
e
.
type
=
t
ype
e
.
used
=
use
d
e
.
date
=
d
ate
if
(
e
.
allowPagingId
===
allowPagingI
d
)
{
e
.
supplyName
=
supplyN
ame
e
.
energyType
=
energyT
ype
e
.
record
=
recor
d
e
.
recordDate
=
recordD
ate
return
true
}
})
...
...
src/api/scheduling.js
View file @
aaf4cfbb
import
http
from
'./http'
//能源消耗
export
const
postEnergyManage
=
params
=>
{
return
http
.
post
(
`/api/
manage/sheduling/EnergyManage
`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
return
http
.
post
(
`/api/
energy/getData
`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
// 瞬时热量-获取列表
export
const
postInstantHeat
=
params
=>
{
return
http
.
post
(
`api/Scheduling/BizInstantaneousHeat/Get`
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
// 瞬时热量-新增修改
export
const
postInstantHeatUpdate
=
params
=>
{
return
http
.
post
(
`api/Scheduling/BizInstantaneousHeat/Update`
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
export
const
postSecAbsTUc
=
params
=>
{
return
http
.
post
(
`/api/analysis/external/SecAbsTUc`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
export
const
postEnergyManageSave
=
params
=>
{
return
http
.
post
(
`/api/energy/Save`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
})
}
export
const
getWeatherMagData
=
()
=>
{
// 获取气象干预数据
return
http
.
get
(
`/api/cusweather/getData`
)
}
...
...
@@ -34,3 +63,4 @@ export const deleteAnnualParam = params =>{ // 删除年度参数
// console.log("地址:",`/api/Scheduling/BizHeatSet/Delete?Id=${params}`)
return
http
.
post
(
`/api/Scheduling/BizHeatSet/Delete?Id=
${
params
}
`
)
}
src/main.js
View file @
aaf4cfbb
...
...
@@ -23,8 +23,8 @@ import http from './api/http'
import
store
from
'./store'
import
$
from
'jquery'
// import {WebControl} from '@/assets/script/video/web-control.esm.min.js'
import
"@/api/mock.js"
import
api
from
'@/api/api'
//
import "@/api/mock.js"
//
import api from '@/api/api'
const
app
=
createApp
(
App
)
...
...
@@ -36,7 +36,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app
.
component
(
'Notification'
,
Notification
)
app
.
config
.
globalProperties
.
http
=
http
;
app
.
config
.
globalProperties
.
$api
=
api
;
//
app.config.globalProperties.$api = api;
//将element-plus注册成全局可用组件库
app
.
use
(
store
)
.
use
(
ElementPlus
)
...
...
src/views/HeatUserPage/TapPage.vue
View file @
aaf4cfbb
...
...
@@ -218,7 +218,7 @@
justify-content: center;
}
.span-text {}
//
.span-text {}
</
style
>
<
script
setup
>
...
...
src/views/Scheduling/AnalysisManage.vue
0 → 100644
View file @
aaf4cfbb
<
template
>
生产与结算数据分析表
</
template
>
\ No newline at end of file
src/views/Scheduling/AnnualParam.vue
0 → 100644
View file @
aaf4cfbb
<
template
>
年度参数管理
</
template
>
\ No newline at end of file
src/views/Scheduling/ConfigBoiler.vue
0 → 100644
View file @
aaf4cfbb
<
template
>
锅炉参数配置
</
template
>
\ No newline at end of file
src/views/Scheduling/EnergyManage.vue
0 → 100644
View file @
aaf4cfbb
<
template
>
能源消耗
</
template
>
\ No newline at end of file
src/views/Scheduling/InstantHeat.vue
0 → 100644
View file @
aaf4cfbb
<
template
>
瞬时热量对比配置
</
template
>
\ No newline at end of file
src/views/Scheduling/Phenomenon.vue
0 → 100644
View file @
aaf4cfbb
<
template
>
天气工况
</
template
>
\ No newline at end of file
src/views/Scheduling/WeatherManage.vue
0 → 100644
View file @
aaf4cfbb
<
template
>
气象干预
</
template
>
\ No newline at end of file
src/views/Scheduling/WeatherManagePage.vue
0 → 100644
View file @
aaf4cfbb
<
script
setup
>
import
{
computed
,
isRef
,
ref
,
shallowRef
}
from
"vue"
;
import
zhCn
from
'element-plus/dist/locale/zh-cn.mjs'
import
ReviseWindow
from
"./weatherManageSub/ReviseWindow.vue"
;
import
BindWindow
from
"./weatherManageSub/BindWindow.vue"
;
const
data
=
ref
([
{
id
:
1
,
customName
:
'非节能(行政区)'
,
// 自定义名称
heatingStationName
:
'行政区供热站'
,
// 供热站名称
operateTime
:
'2024-03-19 21:33:50'
,
// 操作时间
interventionMode
:
'气象仪模式'
,
// 干预模式
temperature
:
15.5
,
// 温度
windSpeed
:
0
,
// 风速
illumination
:
0
,
// 光照
switching
:
'手动模式'
,
// 手自动切换
deviationPercentage
:
10
,
// 自动偏差百分比
verifyTime
:
'20'
,
// 验证时间
adjustTemperature
:
1
,
// 调节温度
sort
:
1
// 排序
},
{
id
:
2
,
customName
:
'非节能(行政区)'
,
// 自定义名称
heatingStationName
:
'行政区供热站'
,
// 供热站名称
operateTime
:
'2024-03-19 21:33:50'
,
// 操作时间
interventionMode
:
'气象仪模式'
,
// 干预模式
temperature
:
15.5
,
// 温度
windSpeed
:
0
,
// 风速
illumination
:
0
,
// 光照
switching
:
'手动模式'
,
// 手自动切换
deviationPercentage
:
10
,
// 自动偏差百分比
verifyTime
:
'20'
,
// 验证时间
adjustTemperature
:
1
,
// 调节温度
sort
:
2
// 排序
},
{
id
:
3
,
customName
:
'非节能(行政区)'
,
// 自定义名称
heatingStationName
:
'行政区供热站'
,
// 供热站名称
operateTime
:
'2024-03-19 21:33:50'
,
// 操作时间
interventionMode
:
'气象仪模式'
,
// 干预模式
temperature
:
15.5
,
// 温度
windSpeed
:
0
,
// 风速
illumination
:
0
,
// 光照
switching
:
'手动模式'
,
// 手自动切换
deviationPercentage
:
10
,
// 自动偏差百分比
verifyTime
:
'20'
,
// 验证时间
adjustTemperature
:
1
,
// 调节温度
sort
:
3
// 排序
},
{
id
:
4
,
customName
:
'非节能(行政区)'
,
// 自定义名称
heatingStationName
:
'行政区供热站'
,
// 供热站名称
operateTime
:
'2024-03-19 21:33:50'
,
// 操作时间
interventionMode
:
'气象仪模式'
,
// 干预模式
temperature
:
15.5
,
// 温度
windSpeed
:
0
,
// 风速
illumination
:
0
,
// 光照
switching
:
'手动模式'
,
// 手自动切换
deviationPercentage
:
10
,
// 自动偏差百分比
verifyTime
:
'20'
,
// 验证时间
adjustTemperature
:
1
,
// 调节温度
sort
:
4
// 排序
}
])
const
currentPage
=
ref
(
1
)
// 当前页码
const
pageSize
=
ref
(
30
)
// 每页显示条数
const
reviseWindowOpen
=
ref
(
false
)
// 修改按钮弹窗状态
const
bindWindowOpen
=
ref
(
false
)
// 绑定按钮弹窗状态
const
totalPageCount
=
computed
(()
=>
{
// 页面左下角总页数计算
return
Math
.
ceil
(
data
.
value
.
length
/
pageSize
.
value
)
})
const
dependentSub
=
ref
({})
// 弹窗数据
const
tableHeaderClass
=
data
=>
{
// 表头样式
return
'table-header-class'
}
const
tableBodyClass
=
data
=>
{
// 表体样式
return
'table-body-class'
}
const
setCellStyle
=
(
row
,
column
,
rowIndex
,
columnIndex
)
=>
{
let
css_color
=
{}
css_color
[
'padding-left'
]
=
'0px'
css_color
[
'padding-right'
]
=
'0px'
css_color
[
'padding-top'
]
=
'3px'
css_color
[
'padding-bottom'
]
=
'3px'
return
css_color
}
const
revise
=
(
row
)
=>
{
// 修改按钮单击事件
dependentSub
.
value
=
row
reviseWindowOpen
.
value
=
true
}
const
bind
=
(
row
)
=>
{
// 绑定按钮单击事件
dependentSub
.
value
=
row
bindWindowOpen
.
value
=
true
}
const
confirmRevise
=
val
=>
{
// 修改弹窗确认按钮事件
for
(
let
i
=
0
;
i
<
data
.
value
.
length
;
i
++
)
{
if
(
data
.
value
[
i
].
id
===
val
.
id
)
{
data
.
value
[
i
].
customName
=
val
.
customName
data
.
value
[
i
].
interventionMode
=
val
.
interventionMode
data
.
value
[
i
].
temperature
=
val
.
temperature
data
.
value
[
i
].
windSpeed
=
val
.
windSpeed
data
.
value
[
i
].
illumination
=
val
.
illumination
data
.
value
[
i
].
switching
=
val
.
switching
data
.
value
[
i
].
deviationPercentage
=
val
.
deviationPercentage
data
.
value
[
i
].
verifyTime
=
val
.
verifyTime
data
.
value
[
i
].
adjustTemperature
=
val
.
adjustTemperature
data
.
value
[
i
].
sort
=
val
.
sort
break
}
}
reviseWindowOpen
.
value
=
false
}
const
confirmBind
=
val
=>
{
console
.
log
(
"处理换热站绑定"
)
bindWindowOpen
.
value
=
false
}
</
script
>
<
template
>
<div
class=
"container"
>
<div
class=
"table-wrapper"
>
<el-table
:data=
"data"
stripe
border
style=
"width: 100%"
:cell-style=
"setCellStyle"
:header-cell-class-name=
"tableHeaderClass"
:row-class-name=
"tableBodyClass"
>
<el-table-column
label=
"序号"
type=
"index"
align=
"center"
width=
"60"
/>
<el-table-column
prop=
"customName"
label=
"自定义名称"
width=
"200"
/>
<el-table-column
prop=
"heatingStationName"
label=
"供热站名称"
width=
"160"
/>
<el-table-column
prop=
"operateTime"
label=
"操作时间"
width=
"210"
/>
<el-table-column
prop=
"interventionMode"
label=
"干预模式"
width=
"120"
/>
<el-table-column
prop=
"temperature"
label=
"温度"
width=
"60"
/>
<el-table-column
prop=
"windSpeed"
label=
"风速"
width=
"60"
/>
<el-table-column
prop=
"illumination"
label=
"光照"
width=
"60"
/>
<el-table-column
prop=
"switching"
label=
"手自动切换"
width=
"120"
/>
<el-table-column
prop=
"deviationPercentage"
label=
"自动偏差百分比"
/>
<el-table-column
prop=
"verifyTime"
label=
"验证时间"
/>
<el-table-column
prop=
"adjustTemperature"
label=
"调节温度"
/>
<el-table-column
prop=
"sort"
label=
"排序"
width=
"60"
/>
<el-table-column
label=
"操作"
width=
"200"
>
<template
#
default=
"scope"
>
<div
class=
"table-operate-column"
>
<el-button
link
@
click=
"revise(scope.row)"
type=
"primary"
>
修改
</el-button>
<el-button
link
@
click=
"bind(scope.row)"
type=
"primary"
>
绑定换热站
</el-button>
<el-button
link
type=
"primary"
>
详情
</el-button>
</div>
</
template
>
</el-table-column>
</el-table>
</div>
<div
class=
"pagination-wrapper"
>
<div
class=
"pagination-text-area"
>
<div
class=
"pagination-text"
>
共{{ data.length }}条记录,当前为第{{ currentPage }}页,共{{ totalPageCount }}页
</div>
</div>
<el-config-provider
:locale=
"zhCn"
>
<el-pagination
v-model:current-page=
"currentPage"
v-model:page-size=
"pageSize"
:page-sizes=
"[30, 40, 50, 100, 200, 300]"
:small=
"true"
layout=
"sizes, prev, pager, next, jumper"
:total=
"data.length"
@
change=
"data"
class=
"pagination"
/>
</el-config-provider>
</div>
<div
class=
"dialog-wrapper"
>
<ReviseWindow
:open=
"reviseWindowOpen"
:data=
"dependentSub"
@
onCancel=
"reviseWindowOpen = false"
@
onConfirm=
"confirmRevise"
></ReviseWindow>
<BindWindow
:open=
"bindWindowOpen"
:data=
"dependentSub"
@
onCancel=
"bindWindowOpen = false"
@
onConfirm=
"confirmBind"
></BindWindow>
</div>
</div>
</template>
<
style
scoped
>
:deep
(
.table-header-class
)
{
text-align
:
center
;
background-color
:
#c4d8f1
!important
;
color
:
#124c6a
;
font-weight
:
normal
;
}
:deep
(
.table-body-class
)
{
color
:
black
;
}
.table-operate-column
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.table-operate-column
.el-button
{
color
:
#124c6a
;
font-size
:
12px
;
}
.pagination-wrapper
{
padding
:
10px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.pagination-text
{
font-size
:
12px
;
}
.pagination
{
}
::v-deep
.el-table__body
tr
:hover
>
td
{
background
:
linear-gradient
(
to
top
,
rgb
(
0
,
198
,
255
),
rgb
(
255
,
255
,
255
))
!important
;
}
</
style
>
\ No newline at end of file
src/views/Scheduling/WindManage.vue
0 → 100644
View file @
aaf4cfbb
<
template
>
风力配置管理
</
template
>
\ No newline at end of file
src/views/SchedulingPage/ConfigBoilerPage.vue
View file @
aaf4cfbb
...
...
@@ -159,8 +159,6 @@
</tr>
<tr>
<th
style=
"width: 25%"
>
总管流量上下限范围内持续时间
</th>
<td
style=
"width: 60%; margin: 0; padding: 0"
>
...
...
@@ -185,19 +183,15 @@
<th
rowspan=
"3"
>
<div>
<div
class=
"btngrounp"
>
<el-button
type=
"primary"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"save"
>
保存
</el-button>
<el-button
type=
"primary"
style=
"margin: 0 0 0 5px"
>
关闭
</el-button>
</div>
</div>
</th>
</tr>
</table>
</el-card>
</div>
</div>
...
...
@@ -221,12 +215,20 @@ const formDatas = ref({
const
listData
=
()
=>
{
http
.
get
(
"/api/configboiler/getData"
).
then
((
result
)
=>
{
formDatas
.
value
=
result
.
data
;
console
.
log
(
'***********&&&&&&&&&&&&'
)
console
.
log
(
formDatas
.
value
)
console
.
log
({...
formDatas
.
value
})
})
}
listData
()
const
save
=
()
=>
{
console
.
log
(
formDatas
.
value
)
http
.
post
(
"/api/configboiler/Save"
,{...
formDatas
.
value
},
false
).
then
((
result
)
=>
{
}).
catch
((
error
)
=>
{
console
.
log
(
error
)
})
}
...
...
src/views/SchedulingPage/EnergyManagePage.vue
View file @
aaf4cfbb
...
...
@@ -3,42 +3,51 @@ 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
{
postEnergyManage
,
postSecAbsTUc
,
postEnergyManageSave
}
from
"@/api/scheduling"
const
{
proxy
}
=
getCurrentInstance
()
const
tableData
=
ref
([])
const
formEnergy
=
reactive
({})
const
dialogVisible
=
ref
(
false
)
const
getEnergyData
=
async
()
=>
{
const
data
=
await
proxy
.
$api
.
getEnergyData
(
config
)
// console.log(data);
tableData
.
value
=
data
.
list
.
map
(
item
=>
({
...
item
}))
// const data = await proxy.$api.getEnergyData(config)
// const data = await postSecAbsTUc(config)
// const data = await postEnergyManage(config)
// const data = await postEnergyManageSave(formEnergy.value)
console
.
log
(
data
);
tableData
.
value
=
data
.
list
// .map(item => ({
// ...item,
// }))
config
.
total
=
data
.
count
}
const
tableLabel
=
reactive
([
{
prop
:
'
i
d'
,
prop
:
'
allowPagingI
d'
,
label
:
"序号"
,
width
:
100
},
{
prop
:
'
n
ame'
,
prop
:
'
supplyN
ame'
,
label
:
'名称'
,
width
:
200
},
{
prop
:
'
t
ype'
,
prop
:
'
energyT
ype'
,
label
:
"能源类型"
},
{
prop
:
'
use
d'
,
prop
:
'
recor
d'
,
label
:
"用度"
,
width
:
200
},
{
prop
:
'
d
ate'
,
prop
:
'
recordD
ate'
,
label
:
"日期"
,
width
:
300
}
...
...
@@ -51,13 +60,13 @@ const formInline = reactive({
const
config
=
reactive
({
total
:
0
,
page
:
1
,
n
ame
:
""
,
supplyN
ame
:
""
,
})
const
handleSearch
=
()
=>
{
config
.
n
ame
,
config
.
supplyN
ame
,
getEnergyData
(),
config
.
n
ame
=
''
config
.
supplyN
ame
=
''
}
const
timeFormat
=
(
time
)
=>
{
...
...
@@ -74,13 +83,13 @@ const timeFormat = (time) => {
//表单校验规则
const
rules
=
reactive
({
n
ame
:
[{
required
:
true
,
message
:
"名称是必填项"
,
trigger
:
"blur"
}],
t
ype
:
[
supplyN
ame
:
[{
required
:
true
,
message
:
"名称是必填项"
,
trigger
:
"blur"
}],
energyT
ype
:
[
{
required
:
true
,
message
:
"能源类型是必填项"
,
trigger
:
"blur"
},
],
use
d
:
[{
required
:
true
,
message
:
"能源用度是必选项"
,
trigger
:
"change"
}],
d
ate
:
[{
required
:
true
,
message
:
"日期是必选项"
}]
recor
d
:
[{
required
:
true
,
message
:
"能源用度是必选项"
,
trigger
:
"change"
}],
recordD
ate
:
[{
required
:
true
,
message
:
"日期是必选项"
}]
})
...
...
@@ -113,7 +122,7 @@ const handleDelete = (row) => {
// 新增
const
action
=
ref
(
'add'
)
const
formEnergy
=
reactive
({})
const
handleClose
=
()
=>
{
dialogVisible
.
value
=
false
proxy
.
$ref
[
'energyForm'
].
resetFields
()
...
...
@@ -124,12 +133,11 @@ const handleCancel = () => {
}
const
handleAdd
=
()
=>
{
action
.
value
=
"add"
,
dialogVisible
.
value
=
true
;
proxy
.
$refs
[
'energyForm'
].
resetFields
()
formEnergy
.
n
ame
=
''
,
formEnergy
.
t
ype
=
''
formEnergy
.
supplyN
ame
=
''
,
formEnergy
.
energyT
ype
=
''
}
...
...
@@ -147,9 +155,12 @@ const onSubmit = () => {
proxy
.
$refs
[
'energyForm'
].
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
let
res
=
null
;
formEnergy
.
date
=
/^
\d{4}
-
\d{2}
-
\d{2}
$/
.
test
(
formEnergy
.
date
)
?
formEnergy
.
date
:
timeFormat
(
formEnergy
.
d
ate
)
formEnergy
.
recordDate
=
/^
\d{4}
-
\d{2}
-
\d{2}
$/
.
test
(
formEnergy
.
recordDate
)
?
formEnergy
.
recordDate
:
timeFormat
(
formEnergy
.
recordD
ate
)
if
(
action
.
value
===
'add'
)
{
res
=
await
proxy
.
$api
.
addEnergy
(
formEnergy
)
// res = await proxy.$api.addEnergy(formEnergy)
res
=
postEnergyManageSave
(
formEnergy
)
console
.
log
(
res
);
if
(
res
)
{
dialogVisible
.
value
=
false
...
...
@@ -192,8 +203,8 @@ onMounted(() => {
<div
class=
"th_div"
>
<el-form
ref=
"formRef"
:model=
"formInline"
:inline=
"true"
style=
"display: flex; justify-content: center; align-items: center; margin: 0;"
>
<el-form-item
class=
"select-clean"
prop=
"
n
ame"
label-width=
"280px"
style=
"margin: 0;"
>
<el-select
v-model=
"config.
n
ame"
placeholder=
"请选择"
style=
"width:360px; margin-left: 20px;"
>
<el-form-item
class=
"select-clean"
prop=
"
supplyN
ame"
label-width=
"280px"
style=
"margin: 0;"
>
<el-select
v-model=
"config.
supplyN
ame"
placeholder=
"请选择"
style=
"width:360px; margin-left: 20px;"
>
<el-option
label=
"东部供热站"
value=
"东部供热站"
/>
<el-option
label=
"行政区供热站"
value=
"行政区供热站"
/>
<el-option
label=
"福宛里供热站"
value=
"福宛里供热站"
/>
...
...
@@ -255,7 +266,7 @@ onMounted(() => {
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-select
v-model=
"formEnergy.
n
ame"
placeholder=
"请选择"
>
<el-select
v-model=
"formEnergy.
supplyN
ame"
placeholder=
"请选择"
>
<el-option
label=
"东部供热站"
value=
"东部供热站"
/>
<el-option
label=
"行政区供热站"
value=
"行政区供热站"
/>
<el-option
label=
"福宛里供热站"
value=
"福宛里供热站"
/>
...
...
@@ -272,7 +283,7 @@ onMounted(() => {
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-select
v-model=
"formEnergy.
t
ype"
placeholder=
"请选择"
>
<el-select
v-model=
"formEnergy.
energyT
ype"
placeholder=
"请选择"
>
<el-option
label=
"热"
value=
"1"
/>
<el-option
label=
"水"
value=
"2"
/>
<el-option
label=
"电"
value=
"3"
/>
...
...
@@ -292,8 +303,8 @@ onMounted(() => {
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left;"
>
<el-form-item
prop=
"
use
d"
style=
"margin: 0;padding: 0;width: 100%;"
>
<el-input
v-model=
"formEnergy.
use
d"
placeholder=
"请输入能源用度"
/>
<el-form-item
prop=
"
recor
d"
style=
"margin: 0;padding: 0;width: 100%;"
>
<el-input
v-model=
"formEnergy.
recor
d"
placeholder=
"请输入能源用度"
/>
</el-form-item>
</td>
</tr>
...
...
@@ -308,8 +319,8 @@ onMounted(() => {
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td>
<el-form-item
prop=
"
d
ate"
style=
"margin: 0;padding: 0;width: 100%;"
>
<el-date-picker
value-format=
"YYYY-MM-DD HH:mm:ss"
v-model=
"formEnergy.
d
ate"
type=
"datetime"
placeholder=
"请输入日期"
style=
"width: 100%"
/>
<el-form-item
prop=
"
recordD
ate"
style=
"margin: 0;padding: 0;width: 100%;"
>
<el-date-picker
value-format=
"YYYY-MM-DD HH:mm:ss"
v-model=
"formEnergy.
recordD
ate"
type=
"datetime"
placeholder=
"请输入日期"
style=
"width: 100%"
/>
</el-form-item>
</td>
</tr>
...
...
src/views/SchedulingPage/InstantHeatPage.vue
View file @
aaf4cfbb
...
...
@@ -2,23 +2,21 @@
<div
class=
"contentBlock"
>
<div
class=
"contentBlockInn"
>
<el-card
class=
"card-contianer"
>
<div
class=
"card-header"
>
<span>
瞬时热量对比配置
</span>
</div>
<el-form
ref=
"formRef"
:data=
"formData"
:model=
"formModel"
label-width=
"auto"
>
<table
cellpadding=
"0"
cellspacing=
"1"
>
<table
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=
"formModel
.planName"
></el-input>
<el-input
style=
"width: 80%"
v-model=
"List
.planName"
></el-input>
</td>
</tr>
</table>
</td>
</tr>
...
...
@@ -28,12 +26,11 @@
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-input
style=
"width: 80%"
v-model=
"formModel
.diffPercentage"
></el-input>
<el-input
style=
"width: 80%"
v-model=
"List
.diffPercentage"
></el-input>
</td>
</tr>
</table>
</td>
</tr>
...
...
@@ -43,16 +40,11 @@
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-form>
<el-input
style=
"width: 80%"
v-model=
"formModel.timeoutMin"
></el-input>
</el-form>
<el-input
style=
"width: 80%"
v-model=
"List.timeoutMin"
></el-input>
</td>
</tr>
</table>
</td>
</tr>
...
...
@@ -62,12 +54,11 @@
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-input
style=
"width: 80%"
v-model=
"formModel
.tempRegulation"
></el-input>
<el-input
style=
"width: 80%"
v-model=
"List
.tempRegulation"
></el-input>
</td>
</tr>
</table>
</td>
</tr>
...
...
@@ -77,9 +68,9 @@
<table
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<td
style=
"text-align: left"
>
<el-input
style=
"width: 80%"
type=
"textarea"
rows=
"6"
v-model=
"formModel.description"
></el-input>
<el-input
style=
"width: 80%"
type=
"textarea"
rows=
"6"
v-model=
"List.description"
></el-input>
</td>
</tr>
</table>
</td>
...
...
@@ -88,10 +79,9 @@
</table>
<div
class=
"btngrounp"
>
<el-button
type=
"primary"
>
保存
</el-button>
<el-button
type=
"primary"
style=
"margin: 0 0 0 5px"
>
关闭
</el-button>
<el-button
type=
"primary"
@
click=
"onSave"
>
保存
</el-button>
<el-button
type=
"primary"
style=
"margin: 0 0 0 5px"
@
click=
"onCancel"
>
关闭
</el-button>
</div>
</el-form>
</el-card>
</div>
...
...
@@ -100,28 +90,60 @@
</
template
>
<
script
setup
>
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
}
from
"vue"
;
const
formModel
=
reactive
({
planId
:
''
,
planName
:
'瞬时热量偏差'
,
diffPercentage
:
'10'
,
timeoutMin
:
'10'
,
tempRegulation
:
'1'
,
description
:
'"预测瞬时热量"与集团"瞬时热量"进行对比,偏差10%(可变),超过10分钟(可变),对下发温度进行+-温度调节(温度可调)'
})
import
{
postInstantHeat
,
postInstantHeatUpdate
}
from
"@/api/scheduling"
import
{
toRaw
}
from
"@vue/reactivity"
;
import
{
ElMessage
}
from
"element-plus"
;
import
http
from
"../../api/http"
;
const
loading
=
ref
(
false
)
const
List
=
ref
([
{
"planId"
:
""
,
"planName"
:
""
,
"diffPercentage"
:
""
,
"timeoutMin"
:
""
,
"tempRegulation"
:
""
,
"description"
:
""
,
"isActive"
:
''
}
])
const
getInstanceHeat
=
async
()
=>
{
loading
.
value
=
true
const
data
=
await
postInstantHeat
();
console
.
log
(
data
);
List
.
value
=
data
.
data
[
0
]
loading
.
value
=
false
}
const
onSave
=
async
()
=>
{
// await postInstantHeatUpdate(List.value)
await
http
.
post
(
"/api/Scheduling/BizInstantaneousHeat/Update"
,{...
List
.
value
},
false
).
then
((
result
)
=>
{
}).
catch
((
error
)
=>
{
console
.
log
(
error
)
})
ElMessage
.
success
(
'修改成功'
)
getInstanceHeat
()
}
onMounted
(()
=>
{
getInstanceHeat
()
})
</
script
>
<
style
lang=
"less"
scoped
>
.card-contianer {
background-color: #DFE8F6;
}
.card-header {
text-align: center;
font-weight: 700;
font-size: 28px;
margin-bottom:10px;
margin-bottom:
10px;
}
.btngrounp {
margin-top: 10px;
text-align: center;
...
...
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