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
80ee880d
Commit
80ee880d
authored
Aug 07, 2024
by
xuke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://gitlab.91isoft.com:10022/hikvision/web-project
parents
a89502af
60f70b9c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1084 additions
and
1036 deletions
+1084
-1036
scheduling.js
src/api/scheduling.js
+13
-2
dataSource.js
src/directive/dataSource.js
+25
-0
AnnualParamPage.vue
src/views/SchedulingPage/AnnualParamPage.vue
+2
-2
PhenomenonPage.vue
src/views/SchedulingPage/PhenomenonPage.vue
+185
-290
WeatherManagePage.vue
src/views/SchedulingPage/WeatherManagePage.vue
+15
-28
AddWindow.vue
src/views/SchedulingPage/weatherManageSub/AddWindow.vue
+24
-24
home.vue
src/views/home.vue
+820
-690
No files found.
src/api/scheduling.js
View file @
80ee880d
...
...
@@ -55,12 +55,12 @@ export const getWeatherMagData = () => { // 获取气象干预数据
return
http
.
get
(
`/api/cusweather/getData`
)
}
export
const
alterWeatherMagData
=
params
=>
{
//
更新气象干预数据
export
const
alterWeatherMagData
=
params
=>
{
//
添加或修改气象干预数据/重新绑定换热站
return
http
.
post
(
`/api/cusweather/SaveAll`
,
params
)
}
export
const
getTransfer
=
param
=>
{
// 获取换热站列表
return
http
.
post
(
`
\`/api/cusweather/getTransferIdsid=?
${
param
}
\`
`
,
param
)
return
http
.
post
(
`
/api/cusweather/getTransferIds?id=
${
param
}
`
,
param
)
}
export
const
getAnnualParam
=
()
=>
{
// 获取年度参数列表
...
...
@@ -80,3 +80,14 @@ export const deleteAnnualParam = params =>{ // 删除年度参数
return
http
.
post
(
`/api/Scheduling/BizHeatSet/Delete?Id=
${
params
}
`
)
}
export
const
getPhenomenon
=
()
=>
{
// 获取数据列表————天气工况
return
http
.
post
(
'/api/Scheduling/WeatherCondition/Get'
)
}
export
const
alterPhenomenon
=
params
=>
{
// 修改数据————天气工况
return
http
.
post
(
'/api/Scheduling/WeatherCondition/Update'
,
params
)
}
export
const
deletePhenomenon
=
params
=>
{
// 删除数据————天气工况
return
http
.
post
(
`/api/Scheduling/WeatherCondition/Delete?Id=
${
params
}
`
)
}
src/directive/dataSource.js
0 → 100644
View file @
80ee880d
import
{
ref
}
from
"vue"
;
import
http
from
"@/api/http"
;
let
api
=
ref
(
""
);
let
source
=
ref
([]);
let
total
=
ref
(
0
);
const
getData
=
(
params
=
{})
=>
{
http
.
get
(
api
.
value
,
params
).
then
((
res
)
=>
{
source
.
value
=
res
.
data
;
console
.
log
(
source
.
value
);
});
};
export
default
{
install
(
app
)
{
app
.
directive
(
"dataSource"
,
{
mounted
(
el
,
binding
)
{
api
.
value
=
binding
.
value
;
getData
();
},
updated
(
el
,
binding
)
{
console
.
log
(
"updated"
);
},
});
},
};
export
{
source
,
total
,
getData
};
src/views/SchedulingPage/AnnualParamPage.vue
View file @
80ee880d
...
...
@@ -48,7 +48,7 @@ function handleDelete(val) {
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'
W
arning'
type
:
'
w
arning'
}
).
then
(()
=>
{
deleteAnnualParam
(
val
.
paramId
).
then
(
res
=>
{
...
...
@@ -158,7 +158,7 @@ function resetInput(){
<el-row
first
>
<el-col
:span=
"8"
col-label
class=
"energy-type-class"
>
节能等级:
</el-col>
<el-col
:span=
"16"
col-value
>
<el-select
placeholder=
""
size=
"small"
v-model=
"
add
Form.energyType"
style=
"width: 370px"
>
<el-select
placeholder=
""
size=
"small"
v-model=
"
revise
Form.energyType"
style=
"width: 370px"
>
<el-option
v-for=
"item in energyTypeList"
:key=
"item"
...
...
src/views/SchedulingPage/PhenomenonPage.vue
View file @
80ee880d
This diff is collapsed.
Click to expand it.
src/views/SchedulingPage/WeatherManagePage.vue
View file @
80ee880d
<
script
setup
>
import
{
computed
,
isRef
,
onMounted
,
reactive
,
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"
;
import
{
getWeatherMagData
,
alterWeatherMagData
,
getTransfer
}
from
'@/api/scheduling.js'
...
...
@@ -9,64 +8,52 @@ import AddWindow from "./weatherManageSub/AddWindow.vue";
const
data
=
ref
()
const
reviseWindowOpen
=
ref
(
false
)
// 修改按钮弹窗状态
const
bindWindowOpen
=
ref
(
false
)
// 绑定按钮弹窗状态
const
addWindowOpen
=
ref
(
false
)
const
dependentSub
=
ref
({})
// 弹窗数据
const
addWindowOpen
=
ref
(
false
)
// 新增按钮弹窗状态
const
dependentSub
=
ref
({})
// 修改和绑定弹窗数据依赖
const
tableHeaderClass
=
data
=>
{
// 表头样式
return
'table-header-class'
}
const
tableBodyClass
=
data
=>
{
// 表体样式
return
'table-body-class'
}
const
revise
=
(
row
)
=>
{
// 修改按钮单击事件
dependentSub
.
value
=
row
reviseWindowOpen
.
value
=
true
}
const
bind
=
(
row
)
=>
{
// 绑定按钮单击事件
getTransfer
(
row
.
customizeId
).
then
(
res
=>
{
console
.
log
(
res
)
})
// getTransfer(id).then(res=>
{
// //
console.log(res)
//
})
dependentSub
.
value
=
row
bindWindowOpen
.
value
=
true
}
const
confirmRevise
=
val
=>
{
// 修改弹窗确认按钮事件
for
(
let
i
=
0
;
i
<
data
.
value
.
length
;
i
++
)
{
if
(
data
.
value
[
i
].
customizeId
===
val
.
customizeId
)
{
// data.value[i] = {...val}
console
.
log
(
val
)
// alterWeatherMagData(val).then(res => {
// console.log(res)
// console.log("操作结果")
// }).catch(err=>{
// console.log("错误信息",err)
// })
break
}
}
reviseWindowOpen
.
value
=
false
alterWeatherMagData
(
val
).
then
(
res
=>
{
getData
()
reviseWindowOpen
.
value
=
false
})
}
const
confirmBind
=
val
=>
{
console
.
log
(
"处理换热站绑定"
)
bindWindowOpen
.
value
=
false
}
onMounted
(()
=>
{
getData
()
})
function
getData
()
{
getWeatherMagData
().
then
(
res
=>
{
data
.
value
=
res
.
data
})
}
function
handleAddWinOpenClose
(){
addWindowOpen
.
value
=
false
}
function
handleAdd
(
val
){
addWindowOpen
.
value
=
false
}
alterWeatherMagData
(
val
).
then
(
res
=>
{
getData
()
addWindowOpen
.
value
=
false
})
}
// 新增数据提交
</
script
>
<
template
>
...
...
src/views/SchedulingPage/weatherManageSub/AddWindow.vue
View file @
80ee880d
...
...
@@ -10,38 +10,26 @@ const props = defineProps({
})
const
emit
=
defineEmits
([
'onCancel'
,
'onConfirm'
])
const
addData
=
ref
({
transfers
:[],
// 换热站
customizeName
:
''
,
// 自定义名称
isFixed
:
false
,
// 干预模式:true 固定模式,false 气象仪模式
temperature
:
''
,
// 温度
wind
:
''
,
// 风速
diffPercentage
:
''
,
// 自动偏差百分比
illumination
:
''
,
// 光照
sort
:
''
,
// 排序
isAuto
:
false
,
// 是否自动模式
diffPercentage
:
''
,
// 自动偏差百分比
timeoutMin
:
''
,
// 自动验证循环时间
tempRegulation
:
''
,
// 自动调节温度
isFixed
:
false
,
// 干预模式:true 固定模式,false 气象仪模式
operateTime
:
""
,
// 操作时间
sort
:
''
,
// 排序
tempRegulation
:
''
,
// 自动调节温度
temperature
:
''
,
// 温度
timeoutMin
:
''
,
// 自动验证循环时间
wind
:
''
,
// 风速
description
:
null
,
// 排序字段,全为Null
updateNullField
:
""
,
// 无用,但不为空
updateNullField
s
:
""
,
// 无用,但不为空
isActive
:
false
,
// 是否启用
supplyId
:
''
,
// 供热站编号
})
const
inputStyle
=
{
color
:
'black'
,
height
:
'24px'
}
const
switchingisAuto
=
computed
({
get
()
{
return
addData
.
value
.
isAuto
===
'自动模式'
},
set
(
newValue
)
{
if
(
newValue
)
{
addData
.
value
.
isAuto
=
'自动模式'
}
else
{
addData
.
value
.
isAuto
=
'手动模式'
}
}
})
// 可写计算属性,手动、自动模式切换
function
handleClose
()
{
addData
.
value
=
{
customizeName
:
''
,
// 自定义名称
...
...
@@ -63,6 +51,7 @@ function handleClose() {
emit
(
'onCancel'
)
}
function
handleConfirm
()
{
addData
.
value
.
operateTime
=
getCurrentDateTime
()
emit
(
'onConfirm'
,
addData
.
value
)
addData
.
value
=
{
customizeName
:
''
,
// 自定义名称
...
...
@@ -82,6 +71,17 @@ function handleConfirm() {
supplyId
:
''
,
// 供热站编号
}
}
function
getCurrentDateTime
()
{
const
now
=
new
Date
();
const
year
=
now
.
getFullYear
();
const
month
=
(
'0'
+
(
now
.
getMonth
()
+
1
)).
slice
(
-
2
);
// 月份从0开始,所以加1
const
day
=
(
'0'
+
now
.
getDate
()).
slice
(
-
2
);
const
hours
=
(
'0'
+
now
.
getHours
()).
slice
(
-
2
);
const
minutes
=
(
'0'
+
now
.
getMinutes
()).
slice
(
-
2
);
const
seconds
=
(
'0'
+
now
.
getSeconds
()).
slice
(
-
2
);
return
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
;
}
// 生成时间
</
script
>
<
template
>
...
...
@@ -102,8 +102,8 @@ function handleConfirm() {
<el-col
:span=
"8"
class=
"content-col-label"
>
干预模式:
</el-col>
<el-col
:span=
"16"
class=
"content-col-value"
>
<el-radio-group
v-model=
"addData.isFixed"
>
<el-radio
value=
"固定模式
"
:style=
"
{marginLeft:'10px'}">固定模式
</el-radio>
<el-radio
value=
"气象仪模式
"
:style=
"
{marginLeft:'-15px'}">气象仪模式
</el-radio>
<el-radio
:value=
"true
"
:style=
"
{marginLeft:'10px'}">固定模式
</el-radio>
<el-radio
:value=
"false
"
:style=
"
{marginLeft:'-15px'}">气象仪模式
</el-radio>
</el-radio-group>
</el-col>
</el-row>
...
...
@@ -134,7 +134,7 @@ function handleConfirm() {
<el-row>
<el-col
:span=
"5"
class=
"content-col-label"
>
切换自动模式:
</el-col>
<el-col
:span=
"7"
class=
"content-col-value"
>
<el-checkbox
:style=
"
{marginLeft:'10px'}" v-model="
switching
isAuto" label="自动模式"/>
<el-checkbox
:style=
"
{marginLeft:'10px'}" v-model="
addData.
isAuto" label="自动模式"/>
</el-col>
<el-col
:span=
"5"
class=
"content-col-label"
>
自动偏差百分比(%d):
</el-col>
<el-col
:span=
"7"
class=
"content-col-value"
>
...
...
src/views/home.vue
View file @
80ee880d
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