fix: BUG修改

This commit is contained in:
kun 2024-05-22 00:45:31 +08:00
parent a5c597d808
commit e49b2eaab8
13 changed files with 631 additions and 351 deletions

View File

@ -53,4 +53,8 @@ export const delPluginApi = data => get('/xmgl/devMonitorPlugin/deleteById', da
// 监控数据分析
export const countStatusApi = data => post('xmgl/videoItem/countStatus', data);
export const countStatusTrendApi = data => post('xmgl/videoItem/countStatusTrend', data);
export const countStatusTrendApi = data => post('xmgl/videoItem/countStatusTrend', data);
export const countQualityApi = data => post('xmgl/projectVideoHkVqd/countQuality', data);
export const countFullApi = data => post('xmgl/xzHikvisionVideoFull/countFull', data);
export const countFullPageApi = data => get('xmgl/projectVideoHkVqd/page', data);

View File

@ -242,3 +242,15 @@ export const getEnterpriseListApi = data => post('/xmgl/enterpriseInfo/list', da
export const getSelectWorkerInfoListApi = data => post('/xmgl/workerInfo/selectWorkerInfoList', data); // 人员列表
export const getDeductScoreListApi = data => get('/xmgl/xzDeductScoreRecord/list', data); // 安全扣分记录
// 安全履职
export const SafeWatchAlarmPageApi = data => post('xmgl/xzWorkerSafeWatchAlarm/page', data);
// 安全履职阈值规则设置
export const SafeWatchConfigPageApi = data => post('xmgl/xzWorkerSafeWatchConfig/page', data);
export const SafeWatchConfigAddApi = data => post('xmgl/xzWorkerSafeWatchConfig/add', data);
export const SafeWatchConfigEditApi = data => post('xmgl/xzWorkerSafeWatchConfig/edit', data);
export const SafeWatchConfigDeleteApi = data => post('xmgl/xzWorkerSafeWatchConfig/delete', data);
// 推送人
export const SafeWatchManagerListApi = data => post('xmgl/xzWorkerSafeWatchManager/list', data);
export const SafeWatchManagerAddApi = data => post('xmgl/xzWorkerSafeWatchManager/add', data);
export const SafeWatchManagerEditApi = data => post('xmgl/xzWorkerSafeWatchManager/edit', data);
export const SafeWatchManagerDeleteApi = data => post('xmgl/xzWorkerSafeWatchManager/delete', data);

View File

@ -84,8 +84,8 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
axios.defaults.baseURL ='http://192.168.34.221:19111/' //郭圣雄本地
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
// axios.defaults.baseURL ='http://192.168.34.221:19111/' //郭圣雄本地
axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈

View File

@ -174,6 +174,7 @@ export default {
{ name: "安全", value: 10 },
{ name: "AI", value: 8 },
{ name: "通知公告", value: "other" },
{ name: "安全履职报警", value: "safeAlarm" },
],
devSn: "",
//
@ -458,7 +459,7 @@ export default {
margin-top: 15px;
margin-left: 25px;
.search-btn-item {
width: 65px;
width: 90px;
padding: 5px 1px;
text-align: center;
border: 1px solid #638ef7;

View File

@ -165,6 +165,7 @@ export default {
{ name: "安全", value: 10 },
{ name: "AI", value: 8 },
{ name: "通知公告", value: "other" },
{ name: "安全履职报警", value: "safeAlarm" },
],
devSn: "",
//
@ -393,7 +394,7 @@ export default {
margin-top: 15px;
margin-left: 25px;
.search-btn-item {
width: 65px;
width: 90px;
padding: 5px 1px;
text-align: center;
border: 1px solid #638ef7;

View File

@ -169,6 +169,7 @@ export default {
{ name: "安全", value: 10 },
{ name: "AI", value: 8 },
{ name: "通知公告", value: "other" },
{ name: "安全履职报警", value: "safeAlarm" },
],
devSn: "",
//
@ -450,7 +451,7 @@ export default {
margin-top: 15px;
margin-left: 25px;
.search-btn-item {
width: 65px;
width: 90px;
padding: 5px 1px;
text-align: center;
border: 1px solid #638ef7;

View File

@ -7,9 +7,9 @@
:model="searchForm"
ref="searchForm"
>
<el-form-item label="人员类型">
<el-form-item label="安全规则履职类型">
<el-input
v-model="searchForm.personTypeName"
v-model="searchForm.type"
:placeholder="$t('message.personnelPosition.please_enter')"
clearable
></el-input>
@ -23,7 +23,7 @@
</el-form-item>
<el-form-item label="班组/部门">
<el-input
v-model="searchForm.teamDepartmentName"
v-model="searchForm.deptName"
:placeholder="$t('message.personnelPosition.please_enter')"
clearable
></el-input>
@ -69,17 +69,17 @@
:label="$t('message.personnelPosition.beaconManage.table.index')"
></el-table-column>
<el-table-column
prop="personTypeName"
prop="type"
label="安全履职规则类型"
align="center"
></el-table-column>
<el-table-column
prop="personTypeName"
prop="dayNum"
label="连续未履职天数"
align="center"
></el-table-column>
<el-table-column
prop="alarmPromptTime"
prop="alarmTime"
label="预警提示时间"
align="center"
></el-table-column>
@ -89,7 +89,7 @@
align="center"
></el-table-column>
<el-table-column
prop="teamDepartmentName"
prop="deptName"
label="班组/部门"
align="center"
></el-table-column>
@ -192,7 +192,7 @@
<script>
import { getWorkerInfoListApi } from "@/assets/js/api/personnelPosition.js";
import {
delayAlarmRecordListApi,
SafeWatchAlarmPageApi,
workerBlacklistAddApi,
workerBlacklistEditApi,
workerBlacklistDeleteApi,
@ -202,9 +202,9 @@ export default {
return {
timeRange: [],
searchForm: {
personTypeName: "",
type: "",
enterpriseName: "",
teamDepartmentName: "",
deptName: "",
workerName: "",
},
pointList: [],
@ -255,7 +255,7 @@ export default {
},
methods: {
exportFn() {
fetch(this.$http.defaults.baseURL + "xmgl/xzCertificateExpireAlarmRecord/exportXls", {
fetch(this.$http.defaults.baseURL + "xmgl/xzWorkerSafeWatchAlarm/exportXls", {
headers: {
Authorization: this.$store.state.userInfo.token,
},
@ -346,10 +346,10 @@ export default {
...this.searchForm,
};
if (this.timeRange && this.timeRange.length > 0) {
requestData.alarmPromptTime_begin = this.timeRange[0];
requestData.alarmPromptTime_end = this.timeRange[1];
requestData.alarmTime_begin = this.timeRange[0];
requestData.alarmTime_end = this.timeRange[1];
}
delayAlarmRecordListApi(requestData).then((res) => {
SafeWatchAlarmPageApi(requestData).then((res) => {
this.pointList = res.result.records;
this.total = res.result.total;
});
@ -384,9 +384,9 @@ export default {
},
resetForm() {
this.searchForm = {
personTypeName: "",
type: "",
enterpriseName: "",
teamDepartmentName: "",
deptName: "",
workerName: "",
};
this.timeRange = [];

View File

@ -25,29 +25,31 @@
<span>报警推送时间</span>
</div>
<el-date-picker
v-model="alarmTime"
style="width: 210px"
type="date"
value-format="yyyy-MM-dd"
:placeholder="$t('message.laborMange.pleaseSelectADate')"
@change="changeSelect"
></el-date-picker>
</div>
</div>
<div class="table_wrap whiteBlock">
<vue-scroll>
<el-table class="tables" :data="workerList">
<el-table class="tables" :data="rulesList">
<el-table-column
prop="ruleName"
prop="type"
label="安全履职规则类型"
></el-table-column>
<el-table-column prop="startTime" label="连续未履职(天数)">
<el-table-column prop="dayNum" label="连续未履职(天数)">
<template v-slot="{ row }">
<el-input
v-if="row.isEdit"
v-model="row.date"
v-model="row.dayNum"
placeholder="请输入内容"
style="width: 200px"
></el-input>
<span v-else>3</span>
<span v-else>{{ row.dayNum }}</span>
</template>
</el-table-column>
<el-table-column width="300" label="操作" align="center">
@ -63,7 +65,7 @@
<el-button
v-else
size="small"
plain
type="primary"
@click="editForm(scope.$index)"
>编辑</el-button
>
@ -71,7 +73,6 @@
size="small"
type="danger"
@click="deleteItem(scope.row)"
plain
style="margin-right: 10px"
>删除</el-button
>
@ -86,6 +87,17 @@
</div>
</el-table-column>
</el-table>
<el-pagination
class="pagerBox"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageInfo.pageNo"
:page-sizes="$store.state.PAGESIZRS"
:page-size="pageInfo.pageSize"
layout="total, sizes, prev, pager, next"
:total="Number(pageInfo.total)"
background
></el-pagination>
</vue-scroll>
</div>
<el-dialog
@ -103,21 +115,15 @@
size="medium"
class="dialogFormBox"
>
<el-form-item
prop="ruleName"
label="安全履职规则类型"
>
<el-form-item prop="type" label="安全履职规则类型">
<el-input
v-model="workerInfo.ruleName"
v-model="workerInfo.type"
:placeholder="$t('message.workType.placeholder')"
></el-input>
</el-form-item>
<el-form-item
prop="ruleName"
label="连续未履职(天数)"
>
<el-form-item prop="dayNum" label="连续未履职(天数)">
<el-input
v-model="workerInfo.ruleName"
v-model="workerInfo.dayNum"
:placeholder="$t('message.workType.placeholder')"
></el-input>
</el-form-item>
@ -146,33 +152,48 @@
:modal-append-to-body="false"
title="配置报警推送人"
:visible.sync="pushConfigDialog"
width="667px"
width="1000px"
>
<div class="dialog_content">
<el-button type="primary" size="medium">新增</el-button>
<el-button type="primary" size="medium" @click="addTableData"
>新增</el-button
>
<div class="dialog-table">
<el-table class="tables" :data="dialogPushList">
<el-table-column prop="name" label="企业名称">
<template v-slot="{ row }">
<template v-slot="{ row,$index }">
<el-select
v-model="row.name"
v-model="row.enterpriseId"
placeholder="请选择"
v-if="row.isEdit"
@change="e => enterpriseChange(e,$index)"
>
<el-option label="测试" value="测试"> </el-option>
<el-option
:label="item.enterpriseName"
:value="item.enterpriseId"
v-for="(item, index) in enterpriseList"
:key="index"
></el-option>
</el-select>
<span v-else>3</span>
<span v-else>{{ row.enterpriseName }}</span>
</template>
</el-table-column>
<el-table-column prop="name2" label="报警推送人">
<el-table-column prop="userId" label="报警推送人">
<template v-slot="{ row }">
<el-input
<el-select
v-model="row.userId"
placeholder="请选择"
multiple
v-if="row.isEdit"
v-model="row.name2"
placeholder="请输入内容"
style="width: 100%"
></el-input>
<span v-else>3</span>
>
<el-option
:label="item.realName"
:value="item.userId"
v-for="(item, index) in personList"
:key="index"
></el-option>
</el-select>
<span v-else>{{ row.userName }}</span>
</template>
</el-table-column>
<el-table-column width="300" label="操作" align="center">
@ -181,14 +202,14 @@
v-if="scope.row.isEdit"
size="small"
type="primary"
@click="saveDialogForm(scope.$index)"
@click="saveDialogForm(scope.row, scope.$index)"
style="margin-right: 5px"
>保存</el-button
>
<el-button
v-else
size="small"
plain
type="primary"
@click="editDialogForm(scope.$index)"
>编辑</el-button
>
@ -196,7 +217,6 @@
size="small"
type="danger"
@click="deleteDialogItem(scope.row)"
plain
style="margin-right: 10px"
>删除</el-button
>
@ -204,25 +224,38 @@
</el-table-column>
</el-table>
</div>
<div class="dialog-footer">
<!-- 确认 取消 -->
<el-button class="cancleBtn" icon="el-icon-circle-close" size="medium" @click="pushConfigDialog = false">{{
$t('message.safeMangeCheck.dialog.cancel')
}}</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="medium" @click="pushConfigDialog = false">{{
$t('message.safeMangeCheck.dialog.confirm')
}}</el-button>
</div>
<!-- <div class="dialog-footer">
<el-button
class="cancleBtn"
icon="el-icon-circle-close"
size="medium"
@click="pushConfigDialog = false"
>{{ $t("message.safeMangeCheck.dialog.cancel") }}</el-button
>
<el-button
type="primary"
icon="el-icon-circle-check"
size="medium"
@click="pushConfigDialog = false"
>{{ $t("message.safeMangeCheck.dialog.confirm") }}</el-button
>
</div> -->
</div>
</el-dialog>
</div>
</template>
<script>
import {
workerAttendanceRuleList,
workerAttendanceRuleAdd,
workerAttendanceRuleEdit,
workerAttendanceRuleDelete,
SafeWatchConfigPageApi,
SafeWatchConfigAddApi,
SafeWatchConfigEditApi,
SafeWatchConfigDeleteApi,
SafeWatchManagerListApi,
SafeWatchManagerAddApi,
SafeWatchManagerEditApi,
SafeWatchManagerDeleteApi,
getEnterpriseInfoList,
getProjectChilderSystemUserListApi,
} from "@/assets/js/api/laborPerson";
import {
getProjectDetail,
@ -232,138 +265,209 @@ import {
export default {
data() {
return {
dialogPushList: [{ name: 111, name2: 111, isEdit: false }],
pageInfo: {
total: 0,
pageNo: 1,
pageSize: 10,
},
dialogPushList: [],
pushConfigDialog: false,
radioVal: 0,
alarmTime: "",
title: "",
dialogVisible: false,
workerList: [{ name: 111, date: 3, isEdit: false }],
rulesList: [],
enterpriseList: [],
personList: [],
workerInfo: {
ruleName: "",
isRest: "",
startTime: "",
endTime: "",
notLater: "",
yesLater: "",
notAdvance: "",
yesAdvance: "",
yesOrNotOvertime: "",
type: "",
dayNum: "",
},
rules: {
ruleName: [
type: [
{
required: true,
message: this.$t("message.workType.placeholder"),
trigger: "change",
},
],
startTime: [
dayNum: [
{
required: true,
message: this.$t("message.workType.placeholder_select"),
trigger: "change",
},
],
endTime: [
{
required: true,
message: this.$t("message.workType.placeholder_select"),
message: this.$t("message.workType.placeholder"),
trigger: "change",
},
],
},
rowObj: {},
};
},
mounted() {
// this.getWorker();
this.getDataList();
this.getProjectDetailFn();
},
methods: {
enterpriseChange(e,index) {
this.getPersonListFn(e);
this.dialogPushList[index].userId = [];
},
//
getEnterpriseListFn() {
let that = this;
let reqeustData = {
projectSn: this.$store.state.projectSn,
};
getEnterpriseInfoList(reqeustData).then((res) => {
that.enterpriseList = res.result;
});
},
//
getPersonListFn(enterpriseId) {
let that = this;
let reqeustData = {
projectSn: this.$store.state.projectSn,
enterpriseId,
};
getProjectChilderSystemUserListApi(reqeustData).then((res) => {
that.personList = res.result;
});
},
//
handleSizeChange(val) {
this.pageInfo.pageSize = val;
this.getDataList();
},
//
handleCurrentChange(val) {
this.pageInfo.pageNo = val;
this.getDataList();
},
//
addTableData() {
this.dialogPushList.push({ enterpriseId: "", userId: [], isEdit: true });
},
//
pushConfigOpen() {
pushConfigOpen(row) {
this.pushConfigDialog = true;
this.rowObj = row;
this.getDialogDataList();
this.getEnterpriseListFn();
},
//
deleteDialogItem(obj) {
// this.$confirm(', ?', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// })
// .then(() => {
// bridgeErectMachineDevDelete({ id: obj.id }).then(res => {
// if (res.success) {
// this.getList()
// this.$message({
// type: 'success',
// message: '!'
// })
// } else {
// this.$message({
// type: 'error',
// message: res.message
// })
// }
// })
// })
// .catch(() => {
// this.$message({
// type: 'info',
// message: ''
// })
// })
this.$confirm("请确认是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
SafeWatchManagerDeleteApi({ id: obj.id }).then((res) => {
if (res.success) {
this.getDialogDataList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message({
type: "error",
message: res.message,
});
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//
saveDialogForm(index) {
this.dialogPushList[index].isEdit = false;
saveDialogForm(obj, index) {
let requestData = {
...obj,
watchConfigId: this.rowObj.id,
};
if (requestData.userId) {
requestData.userId = requestData.userId.join(",");
}
if (obj.id) {
SafeWatchManagerEditApi(requestData).then((result) => {
this.$message.success(result.message);
this.dialogPushList[index].isEdit = false;
this.getDialogDataList();
});
} else {
SafeWatchManagerAddApi(requestData).then((result) => {
this.$message.success(result.message);
this.dialogPushList[index].isEdit = false;
this.getDialogDataList();
});
}
},
//
editDialogForm(index) {
console.log(this.dialogPushList[index])
this.getPersonListFn(this.dialogPushList[index].enterpriseId);
if (this.dialogPushList[index].userId) {
this.dialogPushList[index].userId =
this.dialogPushList[index].userId.split(",");
}
this.dialogPushList[index].isEdit = true;
},
//
deleteItem(obj) {
// this.$confirm(', ?', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// })
// .then(() => {
// bridgeErectMachineDevDelete({ id: obj.id }).then(res => {
// if (res.success) {
// this.getList()
// this.$message({
// type: 'success',
// message: '!'
// })
// } else {
// this.$message({
// type: 'error',
// message: res.message
// })
// }
// })
// })
// .catch(() => {
// this.$message({
// type: 'info',
// message: ''
// })
// })
this.$confirm("请确认是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
SafeWatchConfigDeleteApi({ id: obj.id }).then((res) => {
if (res.success) {
this.getDataList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message({
type: "error",
message: res.message,
});
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//
saveForm(index) {
this.workerList[index].isEdit = false;
let requestData = {
...this.rulesList[index],
};
SafeWatchConfigEditApi(requestData).then((result) => {
this.$message.success(result.message);
this.rulesList[index].isEdit = false;
this.getDataList();
});
},
//
editForm(index) {
this.workerList[index].isEdit = true;
this.rulesList[index].isEdit = true;
console.log(this.rulesList);
},
//
changeSelect() {
let reqeustData = {
projectSn: this.$store.state.projectSn,
enableWorkerAttendanceZero: this.radioVal,
enableWorkerSafeWatch: this.radioVal,
workerSafeWatchTime: this.alarmTime
};
editProjectInfo(reqeustData).then((res) => {
if (res.success) {
@ -382,32 +486,48 @@ export default {
}
});
},
getWorker() {
workerAttendanceRuleList({ projectSn: this.$store.state.projectSn }).then(
(result) => {
if (result.success) {
console.log("考勤列表", result);
this.workerList = result.result;
this.workerList.map((item) => {
item.isEdit = false;
});
}
}
);
getDialogDataList() {
let that = this;
let requestData = {
projectSn: this.$store.state.projectSn,
};
// if (this.timeRange && this.timeRange.length > 0) {
// requestData.alarmTime_begin = this.timeRange[0];
// requestData.alarmTime_end = this.timeRange[1];
// }
SafeWatchManagerListApi(requestData).then((res) => {
that.dialogPushList = [];
res.result.map(item => {
that.dialogPushList.push({...item,isEdit: false})
})
});
},
getDataList() {
let that = this;
let requestData = {
projectSn: this.$store.state.projectSn,
pageNo: this.pageInfo.pageNo,
pageSize: this.pageInfo.pageSize,
};
// if (this.timeRange && this.timeRange.length > 0) {
// requestData.alarmTime_begin = this.timeRange[0];
// requestData.alarmTime_end = this.timeRange[1];
// }
SafeWatchConfigPageApi(requestData).then((res) => {
let responseData = [...res.result.records];
that.rulesList = [];
responseData.map(item => {
that.rulesList.push({...item,isEdit: false})
})
that.pageInfo.total = res.result.total;
});
},
addBefore() {
this.title = "新增考勤规则";
this.dialogVisible = true;
(this.workerInfo = {
ruleName: "",
isRest: "",
startTime: "",
endTime: "",
notLater: "",
yesLater: "",
notAdvance: "",
yesAdvance: "",
yesOrNotOvertime: "",
type: "",
dayNum: "",
}),
this.$nextTick(() => {
this.$refs.form.clearValidate();
@ -423,36 +543,6 @@ export default {
this.workerInfo = JSON.parse(JSON.stringify(worker));
},
deleteBefore(worker) {},
deleteWorker(worker) {
this.$confirm(
this.$t("message.personnelPosition.beaconManage.table.confirmText") +
"【" +
worker.ruleName +
"】?",
this.$t("message.personnelPosition.beaconManage.table.Tips"),
{
confirmButtonText: this.$t(
"message.personnelPosition.confirmButtonText"
),
cancelButtonText: this.$t(
"message.personnelPosition.cancelButtonText"
),
type: "warning",
}
)
.then(() => {
workerAttendanceRuleDelete({ id: worker.id }).then((result) => {
if (result.success) {
console.log("删除成功", result);
this.getWorker();
this.dialogVisible = false;
this.$message.success(result.message);
}
});
this.getWorker();
})
.catch(() => {});
},
closeBtn() {
this.dialogVisible = false;
this.workerInfo = {};
@ -461,25 +551,13 @@ export default {
this.$refs.form.validate((valid) => {
this.workerInfo.projectSn = this.$store.state.projectSn;
if (valid) {
if (this.title === "新增考勤规则") {
workerAttendanceRuleAdd(this.workerInfo).then((result) => {
this.$message.success(result.message);
SafeWatchConfigAddApi(this.workerInfo).then((result) => {
this.$message.success(result.message);
this.dialogVisible = false;
this.getWorker();
});
} else if (this.title === "编辑考勤规则") {
workerAttendanceRuleEdit(this.workerInfo).then((result) => {
if (result.success) {
this.getWorker();
this.workerInfo = {};
this.dialogVisible = false;
this.$message.success(result.message);
}
});
}
this.dialogVisible = false;
this.getDataList();
});
} else {
console.log("用户注册信息未全部完成填写", valid);
return false;
}
});

View File

@ -5,7 +5,11 @@
<div>监控点运行情况趋势图</div>
</div>
<div class="time-condition">
<el-radio-group v-model="timeRadio" size="small">
<el-radio-group
v-model="timeRadio"
size="small"
@change="radioGroupChange"
>
<el-radio-button label="1">近七日</el-radio-button>
<el-radio-button label="2">近一月</el-radio-button>
</el-radio-group>
@ -22,9 +26,7 @@
</template>
<script>
import echarts from "echarts4";
import {
countStatusTrendApi
} from "@/assets/js/api/equipmentCenter/cameraList";
import { countStatusTrendApi } from "@/assets/js/api/equipmentCenter/cameraList";
export default {
data() {
return {
@ -34,33 +36,35 @@ export default {
created() {
this.getCountStatusTrendFn();
},
mounted() {
},
mounted() {},
methods: {
getCountStatusTrendFn(){
radioGroupChange() {
this.getCountStatusTrendFn();
},
getCountStatusTrendFn() {
let that = this;
countStatusTrendApi({
projectSn: this.$store.state.projectSn,
type: this.timeRadio
type: this.timeRadio,
}).then((res) => {
console.log("趋势图", res);
that.centerOne(res.result)
that.centerOne(res.result);
});
},
centerOne(arr) {
let xData = [];
let yData1 = [];
let yData2 = [];
if(arr){
arr.map(item => {
xData.push(item.date)
yData1.push(item.onlineRatio)
yData2.push(item.normalRatio)
})
if (arr) {
arr.map((item) => {
xData.push(item.date);
yData1.push(item.onlineRatio);
yData2.push(item.normalRatio);
});
}
let ageChart = echarts.init(this.$refs.ChartFour);
let option = {
color: ["#65B1E5","#4775FC"],
color: ["#65B1E5", "#4775FC"],
tooltip: {
trigger: "axis",
axisPointer: {
@ -71,9 +75,9 @@ export default {
},
},
legend: {
data: ["监控点在线率","图像正常率"],
data: ["监控点在线率", "图像正常率"],
right: 20,
top: 10
top: 10,
},
grid: {
left: "3%",
@ -85,15 +89,46 @@ export default {
xAxis: [
{
type: "category",
boundaryGap: false,
boundaryGap: true,
data: xData,
// axisLabel: {
// textStyle: {
// color: "#556677",
// },
// fontSize: 12,
// formatter: function (value, index) {
// if (index >= 12) {
// return ""; // 12
// } else {
// return value;
// }
// },
// },
},
],
yAxis: [
{
type: "value",
yAxis: {
min: 0,
max: 100,
axisLabel: {
show: true,
interval: "auto",
formatter: "{value}%",
},
],
},
// dataZoom: [
// {
// type: "slider", //
// show: true, // dataZoom
// start: 0, // 0
// end: 50, // 100
// // handleSize: 8, //
// handleStyle: {
// color: "#DCE2E8", //
// },
// xAxisIndex: [0], // x
// filterMode: "filter", // filter
// },
// ],
series: [
{
name: "监控点在线率",
@ -114,7 +149,7 @@ export default {
focus: "series",
},
data: yData2,
}
},
],
};
ageChart.setOption(option);

View File

@ -44,8 +44,10 @@ export default {
title: {
//
show: true,
left: "32%",
top: "40%",
left: "39%",
top: "37%",
textAlign: "center",
// textVerticalAlign: "middle",
text: this.countData.onlineRatio + "%",
textStyle: {
fontSize: 20,
@ -102,7 +104,7 @@ export default {
},
series: [
{
name: "Access From",
name: "监控点在线率",
type: "pie",
center: ["40%", "50%"], //
radius: ["55%", "80%"], //

View File

@ -11,15 +11,29 @@
</template>
<script>
import echarts from "echarts4";
import {
countFullApi
} from "@/assets/js/api/equipmentCenter/cameraList";
export default {
data() {
return {};
},
created() {},
created() {
this.getCountStatusFn();
},
mounted() {
this.topChartThree();
},
methods: {
getCountStatusFn(){
let that = this;
countFullApi({
projectSn: this.$store.state.projectSn,
}).then((res) => {
console.log("获取录像完整率", res);
that.countData = res.result;
that.topChartThree();
});
},
topChartThree() {
let ageChart = echarts.init(this.$refs.ChartThree);
let option = {
@ -27,9 +41,11 @@ export default {
title: {
//
show: true,
left: "32%",
top: "40%",
text: "100.00%",
left: "39%",
top: "37%",
textAlign: "center",
// textVerticalAlign: "middle",
text: this.countData.fullRatio + "%",
textStyle: {
fontSize: 20,
color: "#000"
@ -85,7 +101,7 @@ export default {
},
series: [
{
name: "Access From",
name: "录像完整率",
type: "pie",
center: ["40%", "50%"], //
radius: ["55%", "80%"], //
@ -106,10 +122,10 @@ export default {
show: false,
},
data: [
{ value: 1048, name: "录像完整" },
{ value: 735, name: "录像丢失" },
{ value: 580, name: "诊断失败" },
{ value: 580, name: "未检测" }
{ value: this.countData.fullNum, name: "录像完整" },
{ value: this.countData.loseNum, name: "录像丢失" },
{ value: this.countData.failNum, name: "诊断失败" },
{ value: this.countData.notDetectNum, name: "未检测" }
],
},
],

View File

@ -11,15 +11,31 @@
</template>
<script>
import echarts from "echarts4";
import {
countQualityApi
} from "@/assets/js/api/equipmentCenter/cameraList";
export default {
data() {
return {};
return {
countData: {}
};
},
created() {
this.getCountStatusFn();
},
created() {},
mounted() {
this.topChartTwo();
},
methods: {
getCountStatusFn(){
let that = this;
countQualityApi({
projectSn: this.$store.state.projectSn,
}).then((res) => {
console.log("获取图像正常率", res);
that.countData = res.result;
that.topChartTwo();
});
},
topChartTwo() {
let ageChart = echarts.init(this.$refs.ChartTwo);
let option = {
@ -27,14 +43,16 @@ export default {
title: {
//
show: true,
left: "32%",
top: "40%",
text: "100.00%",
left: "39%",
top: "37%",
textAlign: "center",
// textVerticalAlign: "middle",
text: this.countData.normalNumRatio + "%",
textStyle: {
fontSize: 20,
color: "#000"
},
subtext: "像正常率",
subtext: "像正常率",
subtextStyle: {
fontSize: 12,
color: "#000"
@ -85,7 +103,7 @@ export default {
},
series: [
{
name: "Access From",
name: "图像正常率",
type: "pie",
center: ["40%", "50%"], //
radius: ["55%", "80%"], //
@ -106,10 +124,10 @@ export default {
show: false,
},
data: [
{ value: 1048, name: "图像正常" },
{ value: 735, name: "图像异常" },
{ value: 580, name: "诊断失败" },
{ value: 735, name: "未检测" }
{ value: this.countData.normalNum, name: "图像正常" },
{ value: this.countData.exceptionNum, name: "图像异常" },
{ value: this.countData.failNum, name: "诊断失败" },
{ value: this.countData.notDetectNum, name: "未检测" }
],
},
],

View File

@ -3,7 +3,7 @@
<div class="top-content">
<div class="top-content-one">
<span>监控点总数</span>
<span>{{countData.total || 0}}</span>
<span>{{ countData.total || 0 }}</span>
</div>
<div class="top-content-two">
<ChartOne></ChartOne>
@ -26,7 +26,7 @@
<div class="bottom-content">
<div class="title-content">
<div class="box-between">
<div>目标检测数量分析</div>
<div>检测结果统计分析</div>
</div>
</div>
<div class="search-content">
@ -40,8 +40,8 @@
<el-date-picker
style="width: 335px"
v-model="formInline.timeRange"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
value-format="yyyy-MM-dd"
type="daterange"
:range-separator="$t('message.quality.to')"
:start-placeholder="$t('message.quality.startDate')"
:end-placeholder="$t('message.quality.endDate')"
@ -61,51 +61,120 @@
height="350"
style="width: 100%"
>
<el-table-column align="center" prop="changeLimitTime" label="监控点名称">
<template slot-scope="scope"> </template>
<el-table-column
align="center"
prop="videoName"
label="监控点名称"
></el-table-column>
<el-table-column
align="center"
prop="scChromaResult"
label="偏色检测结果"
>
<template slot-scope="scope">
<span>{{ scope.row.scChromaResult | resultText }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="监控点状态">
<template slot-scope="scope"> </template>
<el-table-column
align="center"
prop="scSnowResult"
label="雪花点干扰结果"
>
<template slot-scope="scope">
<span>{{ scope.row.scSnowResult | resultText }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="偏色检测结果">
<template slot-scope="scope"> </template>
<el-table-column
align="center"
prop="scDarkResult"
label="图像过暗结果"
>
<template slot-scope="scope">
<span>{{ scope.row.scDarkResult | resultText }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="雪花点干扰结果">
<template slot-scope="scope"> </template>
<el-table-column
align="center"
prop="scLumaResult"
label="亮度异常结果"
>
<template slot-scope="scope">
<span>{{ scope.row.scLumaResult | resultText }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="图像过暗结果">
<template slot-scope="scope"> </template>
<el-table-column
align="center"
prop="scFreezeResult"
label="画面冻结结果"
>
<template slot-scope="scope">
<span>{{ scope.row.scFreezeResult | resultText }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="亮度异常结果">
<template slot-scope="scope"> </template>
<el-table-column
align="center"
prop="scShakeResult"
label="视频抖动结果"
>
<template slot-scope="scope">
<span>{{ scope.row.scShakeResult | resultText }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="画面冻结结果">
<template slot-scope="scope"> </template>
<el-table-column align="center" prop="resolution" label="分辨率">
<template slot-scope="scope">
<span>{{ scope.row.resolution | resolutionText }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="视频抖动结果">
<template slot-scope="scope"> </template>
<el-table-column
align="center"
prop="scContrastResult"
label="对比度检测结果"
>
<template slot-scope="scope">
<span>{{ scope.row.scContrastResult | resultText }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="分辨率">
<template slot-scope="scope"> </template>
<el-table-column
align="center"
prop="scStreakResult"
label="条纹干扰结果"
>
<template slot-scope="scope">
<span>{{ scope.row.scStreakResult | resultText }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="对比度检测结果">
<template slot-scope="scope"> </template>
<el-table-column
align="center"
prop="scCoverResult"
label="视频遮挡结果"
>
<template slot-scope="scope">
<span>{{ scope.row.scCoverResult | resultText }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="条纹干扰结果">
<template slot-scope="scope"> </template>
<el-table-column
align="center"
prop="scFrameResult"
label="视频丢帧结果"
>
<template slot-scope="scope">
<span>{{ scope.row.scFrameResult | resultText }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="视频遮挡结果">
<template slot-scope="scope"> </template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="视频丢帧结果">
<template slot-scope="scope"> </template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="视频巡检结果">
<template slot-scope="scope"> </template>
</el-table-column>
<el-table-column align="center" prop="changeLimitTime" label="巡检日期">
<template slot-scope="scope"> </template>
<el-table-column
align="center"
prop="inspectResult"
label="视频巡检结果"
>
<template slot-scope="scope">
<span>{{ scope.row.inspectResult | inspectResultText }}</span>
</template>
</el-table-column>
<el-table-column
align="center"
prop="inspectDate"
label="巡检日期"
></el-table-column>
</el-table>
<el-pagination
class="pagerBox"
@ -130,7 +199,8 @@ import ChartThree from "./chartComponents/ChartThree";
import ChartFour from "./chartComponents/ChartFour";
import ChartFive from "./chartComponents/ChartFive";
import {
countStatusApi
countStatusApi,
countFullPageApi,
} from "@/assets/js/api/equipmentCenter/cameraList";
export default {
data() {
@ -144,7 +214,7 @@ export default {
pageSize: 10,
total: 0,
},
countData: {}
countData: {},
};
},
components: {
@ -154,11 +224,58 @@ export default {
ChartFour,
ChartFive,
},
filters: {
resultText(val) {
return val === 0
? "异常"
: val === 1
? "正常"
: val === 2
? "诊断失败"
: "未知";
},
resolutionText(val) {
return val === 1 ? "高清" : val === 0 ? "标清" : "未知";
},
inspectResultText(val) {
return val === 1
? "正常"
: val === 2
? "异常"
: val === 3
? "登录失败"
: val === 4
? "取流失败"
: val === 5
? "解码失败"
: val === 6
? "码流时延"
: "未检测";
},
},
created() {
this.getCountStatusFn();
this.getTableDataFn();
},
methods: {
getCountStatusFn(){
getTableDataFn() {
let that = this;
let requestData = {
projectSn: this.$store.state.projectSn,
pageNo: this.pageInfo.pageNo,
pageSize: this.pageInfo.pageSize,
};
if (this.formInline.timeRange) {
requestData.createTime_begin = this.formInline.timeRange[0];
requestData.createTime_end = this.formInline.timeRange[1];
}
countFullPageApi(requestData).then((res) => {
console.log("检测结果统计分析", res);
that.tableData = res.result.records;
that.pageInfo.total = +res.result.total;
});
},
getCountStatusFn() {
let that = this;
countStatusApi({
projectSn: this.$store.state.projectSn,
@ -175,49 +292,44 @@ export default {
this.pageInfo.pageNo = val;
this.searchData();
},
searchData() {},
searchData() {
this.getTableDataFn();
},
//
exportData() {
// if (this.COMPANY == "zjwj") {
// window.location.href =
// this.$http.defaults.baseURL +
// "xmgl/qualityRectifyRecord/recordRectify/excel/export?projectSn=" +
// this.$store.state.projectSn +
// "&recordType=" +
// this.formInline.recordType +
// "&inspectStartTime=" +
// this.formInline.inspectStartTime +
// "&inspectEndTime=" +
// this.formInline.inspectEndTime +
// "&level=" +
// this.formInline.level +
// "&status=" +
// this.formInline.status +
// "&pageNo=" +
// this.pageNo +
// "&pageSize=" +
// this.pageSize;
// } else {
// window.location.href =
// this.$http.defaults.baseURL +
// "xmgl/download/exporExcelQualityInspectionRecord?projectSn=" +
// this.$store.state.projectSn +
// "&recordType=" +
// this.formInline.recordType +
// "&inspectStartTime=" +
// this.formInline.inspectStartTime +
// "&inspectEndTime=" +
// this.formInline.inspectEndTime +
// "&level=" +
// this.formInline.level +
// "&status=" +
// this.formInline.status +
// "&urgentLevel=" +
// this.formInline.urgentLevel +
// "&pageNo=" +
// this.pageNo +
// "&pageSize=" +
// this.pageSize;
// }
fetch(this.$http.defaults.baseURL + "xmgl/projectVideoHkVqd/exportXls", {
headers: {
Authorization: this.$store.state.userInfo.token,
},
})
.then((response) => {
//
if (!response.ok) {
throw new Error("导出失败");
}
return response.blob();
})
.then((blob) => {
console.log("导出成功");
//
const url = window.URL.createObjectURL(blob);
// <a>
const link = document.createElement("a");
link.href = url;
link.download = "统计分析.xlsx"; //
//
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
// URL
window.URL.revokeObjectURL(url);
//
// 使blob
})
.catch((error) => {
//
console.error(error);
});
},
},
};
@ -291,10 +403,10 @@ export default {
margin-left: 60px;
margin-top: 30px;
}
.table-content{
.table-content {
// padding: 0 60px;
margin-bottom: 20px;
.table-content-data{
.table-content-data {
height: 350px;
}
}