Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
Project
Project
Details
Activity
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
耿迪迪
gassafety
Commits
fbef3d99
Commit
fbef3d99
authored
Aug 18, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报警详情页整理
parent
bd66120d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
302 deletions
+23
-302
index.vue
gassafety-web/src/views/dataMonitoring/alarmdetail/index.vue
+23
-302
No files found.
gassafety-web/src/views/dataMonitoring/alarmdetail/index.vue
View file @
fbef3d99
...
...
@@ -19,11 +19,6 @@
</div>
-->
<el-form
ref=
"form"
v-model=
"form"
:rules=
"rules"
label-width=
"100px"
style=
"float: left;margin-left: 50px;"
>
<el-form-item
label=
"设备类型:"
prop=
"deviceType"
>
<!--
<font
v-if=
"form.deviceType == 0"
>
管道
</font>
<font
v-if=
"form.deviceType == 1"
>
调压阀
</font>
<font
v-if=
"form.deviceType == 2"
>
阀门井
</font>
<font
v-if=
"form.deviceType == 3"
>
流量计
</font>
<font
v-if=
"form.deviceType == 4"
>
压力表
</font>
-->
<font>
{{
form
.
deviceType
}}
</font>
</el-form-item>
<el-form-item
label=
"设备编号:"
prop=
"deviceCode"
>
...
...
@@ -58,8 +53,6 @@
<font
v-if=
"form.dealStatus == 3"
>
未处理完成
</font>
</el-form-item>
</el-form>
</div>
<el-divider></el-divider>
...
...
@@ -76,7 +69,6 @@
<el-table-column
label=
"报警开始时间"
align=
"center"
prop=
"startTime"
/>
</el-table>
<el-table
:data=
"dataListdetail3"
style=
"width: 100%;margin-top: 20px;"
>
<el-table-column
label=
"报警结束时间"
align=
"center"
prop=
"endTime"
/>
<el-table-column
label=
"处理状态"
align=
"center"
prop=
"dealStatus"
>
...
...
@@ -124,9 +116,6 @@
</div>
</div>
</div>
<!-- <div style="height: 320px;width: 100%;margin-top: 15px;padding: 10px;">
<div id="main1" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</div>
...
...
@@ -141,23 +130,17 @@
<div id="main4" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;margin-left: 5px;">
</div>
</div> -->
</div>
</div>
</template>
</template>
<
script
>
import
{
listDeviceAlarm
,
getDeviceAlarm
}
from
"@/api/dataMonitoring/deviceAlarm"
;
import
{
getDeviceAlarm
}
from
"@/api/dataMonitoring/deviceAlarm"
;
import
{
deviceTree
}
from
"@/api/device/deviceInfo"
;
import
gaodeMap
from
"utils/gaodeMap.js"
;
import
{
map
,
DEVICE_TYPE
}
from
"utils/gaodeMap.js"
;
import
{
inspectorList
}
from
"@/api/system/user"
;
import
echarts
from
'echarts'
;
import
{
addBasicsInfo
}
from
"@/api/workOrder/basicsInfo"
;
export
default
{
name
:
"DeviceAlarm"
,
...
...
@@ -165,103 +148,29 @@ export default {
},
data
()
{
return
{
order_list
:[],
tableData
:
[{
date
:
'2016-05-02'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1518 弄'
},],
inspector
:
[],
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
rules
:{},
// 报警信息表格数据
deviceAlarmList
:
[],
// 报警类型字典
typeOptions
:
[],
// 设备级联
options
:
[],
dataListdetail1
:
[],
dataListdetail2
:
[],
dataListdetail3
:
[],
props
:
{
multiple
:
true
,
value
:
"id"
,
label
:
"name"
,
level
:
"level"
,
children
:
"childList"
,
},
devices
:
null
,
// 巡检员列表
inspector
:
[],
alarmId
:
''
,
//
弹出层
标题
//
折线图
标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
deviceId
:
null
,
orderId
:
null
,
alarmType
:
null
,
alarmValue
:
null
,
startTime
:
null
,
endTime
:
null
,
dealStatus
:
null
},
// 表单参数
form
:
{
},
};
},
created
()
{
// 如果是跳转来的,则接受初始化参数
// this.user_id = this.$route.query.id; //详细信息页接收参数
this
.
alarmId
=
+
this
.
$route
.
query
.
alarmId
;
console
.
log
(
"query"
,
this
.
$route
.
query
.
alarmId
)
this
.
getList
();
this
.
getDicts
(
"t_order_status"
).
then
(
response
=>
{
this
.
typeOptions
=
response
.
data
;
});
this
.
getDicts
(
"t_order_type"
).
then
(
response
=>
{
this
.
ordertypeOptions
=
response
.
data
;
});
this
.
getDeviceAlarm
();
this
.
getDetail
();
},
mounted
(){
let
gaoMap
=
new
gaodeMap
(
"石家庄"
);
this
.
gaoMap
=
gaoMap
;
// this.getDeviceAlarm();
},
methods
:
{
getInspectorList
(){
this
.
loading
=
true
;
inspectorList
().
then
(
response
=>
{
this
.
inspector
=
response
.
data
;
this
.
loading
=
false
;
});
},
initData
(
getData1
,
getData2
,
getData3
)
{
// 基于准备好的dom,初始化echarts实例
var
myChart1
=
echarts
.
init
(
document
.
getElementById
(
'main1'
));
// 绘制图表
myChart1
.
setOption
({
title
:
{
...
...
@@ -349,14 +258,10 @@ export default {
}
]
});
},
drawPieChart
(
getData4
,
getData5
,
getData3
)
{
// 基于准备好的dom,初始化echarts实例
var
myChart2
=
echarts
.
init
(
document
.
getElementById
(
'main2'
));
// 绘制图表
myChart2
.
setOption
({
title
:
{
...
...
@@ -445,8 +350,6 @@ export default {
main3
(
getData6
,
getData3
)
{
// 基于准备好的dom,初始化echarts实例
var
myChart3
=
echarts
.
init
(
document
.
getElementById
(
'main3'
));
// 绘制图表
myChart3
.
setOption
({
title
:
{
...
...
@@ -513,12 +416,10 @@ export default {
}
]
});
},
main4
(
getData7
,
getData3
)
{
// 基于准备好的dom,初始化echarts实例
var
myChart4
=
echarts
.
init
(
document
.
getElementById
(
'main4'
));
// 绘制图表
myChart4
.
setOption
({
title
:
{
...
...
@@ -585,54 +486,8 @@ export default {
}
]
});
},
// 点击按钮显示隐藏
// changeDisplay(e){
// this.isDisplay = !this.isDisplay
// let $timeline = this.$refs.timeline;
// if(!this.showAndHide){
// for(let i = 0; i
<
$timeline
.
$children
.
length
;
i
++
){
// if(i>1){
// $timeline.$children[i].$el.style.display = "block";
// }
// }
// this.showAndHide = true;
// }else{
// for(let i = 0; i
<
$timeline
.
$children
.
length
;
i
++
){
// if(i>1){
// $timeline.$children[i].$el.style.display = "none";
// }
// }
// this.showAndHide = false;
// }
// //$timeline.toggleRowExpansion(row,true)
// },
handleRemove
(
file
)
{
console
.
log
(
file
);
},
handlePictureCardPreview
(
file
)
{
this
.
dialogImageUrl
=
file
.
url
;
this
.
dialogVisible
=
true
;
},
handleDownload
(
file
)
{
console
.
log
(
file
);
},
/** 查询工单基础信息列表 */
getList
()
{
this
.
loading
=
true
;
listDeviceAlarm
(
this
.
queryParams
).
then
(
response
=>
{
this
.
deviceAlarmList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
getDeviceAlarm
(){
getDetail
(){
getDeviceAlarm
(
this
.
alarmId
).
then
(
response
=>
{
const
{
deviceName
,
deviceCode
,
alarmType
,
alarmValue
,
startTime
,
endTime
,
deviceStatus
}
=
response
.
data
;
const
obj1
=
{
deviceName
,
deviceCode
,
alarmType
};
...
...
@@ -664,8 +519,6 @@ export default {
getData5
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
workingConditionAccumulation
)
getData6
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
temperature
)
getData7
.
push
(
this
.
form
.
deviceReportDataList
[
i
].
pressure
)
}
this
.
initData
(
getData1
,
getData2
,
getData3
);
this
.
drawPieChart
(
getData4
,
getData5
,
getData3
);
...
...
@@ -676,17 +529,6 @@ export default {
console
.
log
(
"getData2"
,
getData2
)
console
.
log
(
"getData3"
,
getData3
)
// this.active = parseInt(response.data.orderStatus) + 1;
// if(this.form.deviceInfoList.length>0){
// this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]);
// }
// for(var i = 0; i
<
this
.
form
.
deviceInfoList
.
length
;
i
++
){
// let obj = this.form.deviceInfoList[i];
// this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj)
// }
if
(
this
.
form
.
orderType
==
'1'
)
{
// 获取设备列表树
let
data
=
{
...
...
@@ -699,127 +541,6 @@ export default {
}
});
},
// 筛选节点
// filterNode(value, data) {
// if (!value) return true;
// return data.label.indexOf(value) !== -1;
// },
// 节点单击事件
handleNodeClick
(
data
)
{
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
// this.reset();
},
// 表单重置
reset
()
{
this
.
form
=
{
orderId
:
null
,
orderType
:
null
,
orderName
:
null
,
orderStatus
:
"0"
,
createTime
:
null
,
appointInspector
:
null
,
allotTime
:
null
,
actualInspector
:
null
,
actualTime
:
null
,
remarks
:
null
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
orderId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加工单基础信息"
;
},
/** 归档按钮操作 */
handleFinish
(
res
)
{
// this.reset();
getDeviceAlarm
(
res
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"工单信息归档"
;
});
},
/** 修改按钮操作 */
handleUpdate
(
res
)
{
// this.reset();
this
.
getInspectorList
();
getInspectorList
(
this
.
orderId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"工单信息修改"
;
});
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
orderStatus
==
'0'
)
{
updateBasicsInfo
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
if
(
this
.
form
.
orderStatus
==
'2'
){
updateOrderStatus
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"操作成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
orderIds
=
row
.
orderId
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除工单基础信息编号为"'
+
orderIds
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
delBasicsInfo
(
orderIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有工单基础信息数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportBasicsInfo
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
}
</
script
>
...
...
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