Commit 7f7a7a3c authored by 张牧越's avatar 张牧越

安全检查 联调

parent fad28904
......@@ -418,3 +418,42 @@ export function getElevatorRealData(params) {
}
//projectcheck
export function getCurrentMonthCheckStats() {
return request({
url: '/pweb/s/check/current/month/statistics',
method: 'get',
})
}
export function getBlackspotRankingList(params) {
return request({
url: '/pweb/s/check/item/sort',
method: 'get',
params
})
}
export function getMonthCheckStatis(params) {
return request({
url: '/pweb/s/check/month/statistics',
method: 'get',
params
})
}
export function getCorrectRecords(params) {
return request({
url: '/pweb/s/check/danger',
method: 'get',
params
})
}
export function getCorrectRecordDetail(id) {
return request({
url: `/pweb/s/check/${id}`,
method: 'get',
})
}
......@@ -79,7 +79,11 @@
<div class="warning-table-message">报警信息</div>
<div class="warning-table-status">处理状态</div>
</div>
<div class="warning-table-list" v-infinite-scroll="load">
<div
class="warning-table-list"
v-infinite-scroll="load"
:infinite-scroll-distance="1"
>
<div
class="warning-table-column"
v-for="(column, index) in elevatorWarningList"
......@@ -340,7 +344,15 @@ export default {
limit: 20,
}).then((res) => {
this.page += 1;
this.getElevatorWarningList += res.data.data;
this.elevatorWarningList = [
...this.elevatorWarningList,
...res.data.data,
];
});
} else if (this.elevatorWarningList.length == 0) {
getElevatorWarningList({ page: 1, limit: 20 }).then((res) => {
this.page = 1;
this.elevatorWarningList = res.data.data;
});
}
},
......@@ -377,9 +389,6 @@ export default {
this.currentElevatorTower = res.data[0];
this.getCurrentElevatorStatus(this.currentElevatorTower);
});
getElevatorWarningList({ page: 1, limit: 20 }).then((res) => {
this.elevatorWarningList = res.data.data;
});
getElevatorWarningStatus().then((res) => {
this.elevatorWarningStatus = res.data;
});
......@@ -645,7 +654,7 @@ export default {
line-height: 40px;
color: #c6def9;
font-size: 14px;
padding: 0 30px;
padding: 0 12px;
margin-bottom: 2px;
&:last-child {
margin-bottom: 0;
......
......@@ -119,7 +119,11 @@
<div class="warning-table-info">告警信息</div>
<div class="warning-table-status">处理状态</div>
</div>
<div class="warning-table-list" v-infinite-scroll="load">
<div
class="warning-table-list"
v-infinite-scroll="load"
:infinite-scroll-distance="1"
>
<div
class="warning-table-column"
v-for="(column, index) in fallwarningTableData"
......@@ -341,7 +345,15 @@ export default {
if (this.fallwarningTableData.length == this.page * 10) {
getFallWarningTableList({ page: this.page + 1 }).then((res) => {
this.page += 1;
this.fallwarningTableData += res.data.data;
this.fallwarningTableData = [
...this.fallwarningTableData,
...res.data.data,
];
});
} else if (this.fallwarningTableData.length == 0) {
getFallWarningTableList({ page: 1 }).then((res) => {
this.page = 1;
this.fallwarningTableData = res.data.data;
});
}
},
......@@ -365,9 +377,6 @@ export default {
getFallWarningStatus().then((res) => {
this.fallwarningStatus = res.data;
});
getFallWarningTableList({ page: 1 }).then((res) => {
this.fallwarningTableData = res.data.data;
});
},
};
</script>
......
......@@ -128,14 +128,18 @@
<div class="warning-table-message">报警信息</div>
<div class="warning-table-status">处理状态</div>
</div>
<div class="warning-table-list" v-infinite-scroll="load">
<div
class="warning-table-list"
v-infinite-scroll="load"
:infinite-scroll-distance="1"
>
<div
class="warning-table-column"
v-for="(column, index) in warnings"
:key="index"
>
<div class="warning-table-time">{{ column.log_time }}</div>
<div class="warning-table-device"></div>
<div class="warning-table-device">{{ column.device_no }}</div>
<div class="warning-table-message">
{{ column.alarm_content }}
</div>
......@@ -478,13 +482,6 @@ export default {
this.renderAQIChart();
});
});
getWarningMessageList({
start_log_time: this.getTime(new Date().getTime() - 2592000000),
end_log_time: this.getTime(new Date().getTime()),
page: 1,
}).then((res) => {
this.warnings = res.data.data;
});
getNoiseDeviceList({ top_cat: 9 }).then((res) => {
this.noiseMonitors = res.data;
if (res.data.length > 0) {
......@@ -510,9 +507,20 @@ export default {
if (this.warnings.length == this.page * 10) {
getWarningMessageList({
page: this.page + 1,
start_log_time: this.getTime(new Date().getTime() - 2592000000),
end_log_time: this.getTime(new Date().getTime()),
}).then((res) => {
this.page += 1;
this.warnings += res.data.data;
this.warnings = [...this.warnings, ...res.data.data];
});
} else if (this.warnings.length == 0) {
getWarningMessageList({
start_log_time: this.getTime(new Date().getTime() - 2592000000),
end_log_time: this.getTime(new Date().getTime()),
page: 1,
}).then((res) => {
this.page = 1;
this.warnings = res.data.data;
});
}
},
......
<template>
<el-dialog
:visible.sync="dialogVisible"
title="整改详情"
width="70vw"
top="10vh"
append-to-body
>
<div class="step-area" v-if="correctDetail.check_result == 2">
<el-steps :active="correctDetail.step" align-center>
<el-step
v-for="(step, index) in correctDetail.progress"
:key="index"
:title="step.title"
:description="`${step.person} / ${step.time}`"
:status="
step.status == 1
? 'process'
: step.status == 3
? 'error'
: step.status == 2
? 'success'
: 'wait'
"
></el-step>
</el-steps>
</div>
<div
class="dialog-title"
:style="{ marginTop: correctDetail.check_result == 1 ? '0px' : '12px' }"
>
生成检查单
</div>
<div class="dialog-form">
<div class="dialog-item">
检查人员:{{ correctDetail.check_person_name }}
</div>
<div class="dialog-item">检查时间:{{ correctDetail.check_date }}</div>
<div class="dialog-item">巡查类型:{{ correctDetail.check_type }}</div>
<div class="dialog-item">
检查部位:{{ correctDetail.check_part_name }}
</div>
<div class="dialog-item">
检查事项:{{ correctDetail.check_item_name }}
</div>
<div class="dialog-item">
检查结果:
<span
:style="{
color: correctDetail.check_result == 1 ? '#24F0B8' : '#FF5A56',
}"
>{{ correctDetail.check_result_text }}</span
>
</div>
<div class="dialog-item">
负责人:{{ correctDetail.duty_person_name }}
</div>
<template v-if="correctDetail.check_result == 2">
<div class="dialog-item inline">
问题描述:{{ correctDetail.check_describe }}
</div>
<div class="dialog-item inline">
隐患图片:
<el-image
class="imgs"
v-for="(img, index) in correctDetail.check_images_list"
:key="index"
:src="img.url"
:preview-src-list="computedUrlList(correctDetail.check_images_list)"
/>
</div>
<div class="dialog-item">
问题等级:<span style="color: #ff5a56">{{
correctDetail.level_text
}}</span>
</div>
<div class="dialog-item">
整改期限:{{ correctDetail.rectify_date }}
</div>
<div class="dialog-item">
整改人员:{{ correctDetail.rectify_person_name }}
</div>
<div class="dialog-item">
短信通知:{{ correctDetail.is_message_text }}
</div>
<div class="dialog-item">
整改要求:{{ correctDetail.rectify_require }}
</div>
<div class="dialog-item">
补充描述:{{ correctDetail.other_describe }}
</div>
</template>
</div>
<template v-if="correctDetail.check_result == 2">
<div v-for="(correct, index) in correctDetail.rectify_list" :key="index">
<div class="dialog-title">整改上传</div>
<div class="dialog-form">
<div class="dialog-item">
整改人员:{{ correct.rectify_person_name }}
</div>
<div class="dialog-item">整改时间:{{ correct.create_time }}</div>
<div class="dialog-item inline">
整改描述:{{ correct.rectify_describe }}
</div>
<div class="dialog-item inline">
整改图片:
<el-image
class="imgs"
v-for="(img, index) in correct.rectify_images_list"
:key="index"
:src="img.url"
:preview-src-list="computedUrlList(correct.rectify_images_list)"
/>
</div>
</div>
<template v-if="correct.examine_status != 1">
<div class="dialog-title">复查审核</div>
<div class="dialog-form">
<div class="dialog-item">
复查人员:{{ correct.examine_person_name }} /
<span
:style="{
color: correct.examine_status == 2 ? '#24F0B8' : '#FF5A56',
}"
>{{ correct.examine_status_text }}</span
>
</div>
<div class="dialog-item">复查时间:{{ correct.examine_time }}</div>
<div class="dialog-item inline">
审核备注:{{ correct.examine_remark }}
</div>
</div>
</template>
</div>
</template>
</el-dialog>
</template>
<script>
export default {
name: "CorrectDialog",
props: {
visible: {
type: Boolean,
default: false,
},
data: {
type: Object,
default: () => {
return {};
},
},
},
data() {
return {
correctDetail: {
check_images_list: [],
},
};
},
methods: {
computedUrlList(data) {
return data.map((item) => {
return item.url;
});
},
},
computed: {
dialogVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("changeVisible", val);
},
},
},
watch: {
dialogVisible(val) {
if (val) {
this.correctDetail = this.data;
console.log(this.correctDetail);
}
},
},
};
</script>
<style lang="less" scoped>
.step-area {
padding: 24px;
background: #0e3b72;
}
.dialog-title {
line-height: 44px;
background: #0e3b72;
text-align: center;
font-size: 16px;
color: #24f0b8;
margin-bottom: 2px;
margin-top: 12px;
}
.dialog-form {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.dialog-item {
width: calc(50% - 50px);
margin-bottom: 2px;
background: #114483;
padding: 12px 24px;
color: #c6def9;
font-size: 14px;
&.inline {
width: 100%;
}
}
}
.imgs {
width: 100px;
height: 100px;
margin-right: 12px;
vertical-align: middle;
}
::v-deep .el-step__description {
line-height: 40px;
background: rgba(36, 240, 184, 0.05);
border-radius: 4px;
}
::v-deep .el-step.is-center .el-step__description {
padding: 0 !important;
margin: 0 20% !important;
}
::v-deep .el-step__title.is-finish {
color: #67c23a !important;
}
::v-deep .el-step__description.is-finish {
color: #67c23a !important;
}
::v-deep .el-step__title.is-process {
color: #c6def9 !important;
}
::v-deep .el-step__description.is-process {
color: #c6def9 !important;
}
::v-deep .el-step__icon .el-step__icon-inner {
display: inherit !important;
}
::v-deep .el-step__icon.is-text {
border-color: inherit !important;
}
::v-deep div.el-step__icon-inner {
color: transparent !important;
}
</style>
\ No newline at end of file
This diff is collapsed.
......@@ -92,7 +92,11 @@
<div class="warning-table-info">报警信息</div>
<div class="warning-table-status">处理状态</div>
</div>
<div class="warning-table-list" v-infinite-scroll="load">
<div
class="warning-table-list"
v-infinite-scroll="load"
:infinite-scroll-distance="1"
>
<div
class="warning-table-column"
v-for="(column, index) in warnings"
......@@ -425,9 +429,6 @@ export default {
this.renderForceChart();
this.renderDipChart();
});
getTowerWarnings({ page: 1, limit: 20 }).then((res) => {
this.warnings = res.data.data;
});
getBaseInfo().then((res) => {
this.mapCenter = [res.data.longitude, res.data.latitude];
......@@ -657,7 +658,12 @@ export default {
if (this.warnings.length == this.page * 20) {
getTowerWarnings({ page: this.page + 1, limit: 20 }).then((res) => {
this.page += 1;
this.warnings += res.data.data;
this.warnings = [...this.warnings, ...res.data.data];
});
} else if (this.warnings.length == 0) {
getTowerWarnings({ page: 1, limit: 20 }).then((res) => {
this.page = 1;
this.warnings = res.data.data;
});
}
},
......
......@@ -103,7 +103,11 @@
<div class="warning-table-info">告警信息</div>
<div class="warning-table-status">处理状态</div>
</div>
<div class="warning-table-list" v-infinite-scroll="load">
<div
class="warning-table-list"
v-infinite-scroll="load"
:infinite-scroll-distance="1"
>
<div
class="warning-table-column"
v-for="(column, index) in platformWarningList"
......@@ -414,9 +418,17 @@ export default {
getPlatformWarningList({ page: this.page + 1, limit: 20 }).then(
(res) => {
this.page += 1;
this.platformWarningList += res.data.data;
this.platformWarningList = [
...this.platformWarningList,
...res.data.data,
];
}
);
} else if (this.platformWarningList.length == 0) {
getPlatformWarningList({ page: 1, limit: 20 }).then((res) => {
this.page = 1;
this.platformWarningList = res.data.data;
});
}
},
},
......@@ -436,15 +448,9 @@ export default {
this.renderWeightChart();
});
});
getPlatformWarningList({ page: 1, limit: 20 }).then((res) => {
this.platformWarningList = res.data.data;
});
getPlatformWarningStatus().then((res) => {
this.platformWarningStatus = res.data;
});
// getFallWarningTableList().then((res) => {
// this.fallwarningTableData = res.data.data;
// });
},
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment