flx:合并代码

This commit is contained in:
Rain_ 2025-11-14 18:17:02 +08:00
commit 4bf1a43eec
4 changed files with 128 additions and 54 deletions

View File

@ -246,6 +246,12 @@ export default {
if (controls) { if (controls) {
controls.classList.remove("video-controls_flex"); controls.classList.remove("video-controls_flex");
} }
const findIndex = Array.from(wnd.childNodes).findIndex(
(item) => item.localName == "img" || item.className == "classImg"
);
if (findIndex !== -1) {
wnd.removeChild(wnd.childNodes[findIndex]);
}
} }
}); });
this.devH5List = []; this.devH5List = [];

View File

@ -962,7 +962,6 @@ const getSelectAllProjectInfoList = () => {
const onSelectProject = () => { const onSelectProject = () => {
workTicketInfo.pageNo = 1; workTicketInfo.pageNo = 1;
workTicketList.value = []; workTicketList.value = [];
getProjectVideoConfigList();
getWorkTicketPage(); getWorkTicketPage();
getWorkTicketCountWorkTicket(); getWorkTicketCountWorkTicket();
getWorkTicketTypeTreePage(); getWorkTicketTypeTreePage();
@ -973,7 +972,7 @@ const videoConfig = ref({
// //
const getProjectVideoConfigList = () => { const getProjectVideoConfigList = () => {
projectVideoConfigListApi({ projectVideoConfigListApi({
projectSn: workTicketInfo.projectSn, projectSn: workTicketDetail.value.projectSn,
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
if (res.result) { if (res.result) {
@ -1059,6 +1058,7 @@ const timeInterval = ref(null);
const onViewDetail = (row, flag) => { const onViewDetail = (row, flag) => {
if (row.id == workTicketDetail.value.id && flag != true) return; if (row.id == workTicketDetail.value.id && flag != true) return;
workTicketDetail.value = row; workTicketDetail.value = row;
getProjectVideoConfigList();
getWorkTicketQueryById(); getWorkTicketQueryById();
getWorkTicketHistoryList(); getWorkTicketHistoryList();
initPoliceCameraItemList(); initPoliceCameraItemList();

View File

@ -33,15 +33,33 @@
<div class="bg-icon" @click="onRefresh"> <div class="bg-icon" @click="onRefresh">
<div class="refresh-icon"></div> <div class="refresh-icon"></div>
</div> </div>
<div class="bg-icon" @click="onExpand"> <div
<div class="shrink-icon"></div> class="bg-icon"
@click="onExpand"
>
<div class="shrink-icon" :class="{ 'shrink-icon_active': this.defaultExpand }"></div>
</div> </div>
</div> </div>
</div> </div>
<div class="header-box1"> <div class="header-box1">
<div @click="onDeviceState(0)" :class="{'bg-active': searchInfo.deviceState == 0}">全部({{ filterTreeDataTotal(1) }})</div> <div
<div @click="onDeviceState(1)" :class="{'bg-active': searchInfo.deviceState == 1}">在线({{ filterTreeDataTotal(2) }})</div> @click="onDeviceState(0)"
<div @click="onDeviceState(2)" :class="{'bg-active': searchInfo.deviceState == 2}">离线({{ filterTreeDataTotal(3) }})</div> :class="{ 'bg-active': searchInfo.deviceState == 0 }"
>
全部({{ filterTreeDataTotal(1) }})
</div>
<div
@click="onDeviceState(1)"
:class="{ 'bg-active': searchInfo.deviceState == 1 }"
>
在线({{ filterTreeDataTotal(2) }})
</div>
<div
@click="onDeviceState(2)"
:class="{ 'bg-active': searchInfo.deviceState == 2 }"
>
离线({{ filterTreeDataTotal(3) }})
</div>
</div> </div>
</div> </div>
<div class="treeBox"> <div class="treeBox">
@ -88,8 +106,7 @@
}} }}
/ {{ data.totalNum || 0 }}) / {{ data.totalNum || 0 }})
</span> </span>
</span </span>
>
<!-- <span <!-- <span
:title="data.projectNum" :title="data.projectNum"
v-show="data.projectNum && videoType == 0" v-show="data.projectNum && videoType == 0"
@ -373,6 +390,12 @@ export default {
this.recursiveFilterList(cur.children, rountCount, resultList); this.recursiveFilterList(cur.children, rountCount, resultList);
} }
if (cur.type == "video") { if (cur.type == "video") {
if(this.searchInfo.deviceState) {
if(this.searchInfo.deviceState == cur.videoItem.deviceState){
resultList.push(cur);
}
return prev;
}
resultList.push(cur); resultList.push(cur);
} }
return prev; return prev;
@ -529,44 +552,52 @@ export default {
return data.name.indexOf(value) !== -1; return data.name.indexOf(value) !== -1;
}, },
recursion(array) { recursion(array) {
return array.filter((item) => { return array.map((item) => {
if ( if (
item.children && item.children &&
Array.isArray(item.children) && Array.isArray(item.children) &&
item.children.length > 0 item.children.length > 0
) { ) {
const resultList = this.recursion(item.children); item.children = this.recursion(item.children);
return resultList.length > 0; return item;
} }
return item.videoItem && item.videoItem.deviceState === this.searchInfo.deviceState; console.log(item.deviceState, this.searchInfo.deviceState);
}); if(item.type == "video") {
if(item.videoItem && item.videoItem.deviceState == this.searchInfo.deviceState) {
return item;
}
return
}
return item;
}).filter(item => item != undefined);
}, },
}, },
computed: { computed: {
filterTreeDataTotal() { filterTreeDataTotal() {
return (type) => { return (type) => {
if(type == 1) { if (type == 1) {
// //
return this.filterTreeData.reduce((prev, cur) => { return this.filterTreeData.reduce((prev, cur) => {
return prev += cur.totalNum return (prev += cur.totalNum);
}, 0) }, 0);
} else if(type == 2) { } else if (type == 2) {
// 线 // 线
return this.filterTreeData.reduce((prev, cur) => { return this.filterTreeData.reduce((prev, cur) => {
return prev += cur.onlineNum return (prev += cur.onlineNum);
}, 0) }, 0);
} else if(type == 3) { } else if (type == 3) {
// 线 // 线
return this.filterTreeData.reduce((prev, cur) => { return this.filterTreeData.reduce((prev, cur) => {
return prev += (cur.totalNum - cur.onlineNum) return (prev += cur.totalNum - cur.onlineNum);
}, 0) }, 0);
}
return 0
} }
return 0;
};
}, },
filterTreeData() { filterTreeData() {
if (!this.searchInfo.deviceState) return this.treeData; if (!this.searchInfo.deviceState) return this.treeData;
return this.treeData.map((item) => { const dataList = structuredClone(this.treeData);
return dataList.map((item) => {
let children = []; let children = [];
if ( if (
item.children && item.children &&
@ -614,7 +645,7 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
>.bg-active { > .bg-active {
background-image: url("~@/assets/images/videoSurveillance/bg-icon1_active.png"); background-image: url("~@/assets/images/videoSurveillance/bg-icon1_active.png");
color: #ffffff; color: #ffffff;
} }
@ -652,6 +683,9 @@ export default {
.shrink-icon { .shrink-icon {
background-image: url("~@/assets/images/videoSurveillance/shrink-icon.png"); background-image: url("~@/assets/images/videoSurveillance/shrink-icon.png");
} }
.shrink-icon_active {
transform: rotate(180deg);
}
} }
} }
:deep(.el-input) { :deep(.el-input) {

View File

@ -298,7 +298,7 @@
> >
<el-button <el-button
type="text" type="text"
@click="onStateShow(3, scope.row.id)" @click="onStateShow(3, scope.row.id, 'restart')"
icon="el-icon-video-play" icon="el-icon-video-play"
v-if="scope.row.status == 4" v-if="scope.row.status == 4"
>重新开始</el-button >重新开始</el-button
@ -915,7 +915,7 @@
继续作业 继续作业
</div> </div>
<div <div
@click="onStateShow(3, workTicketDetail.id)" @click="onStateShow(3, workTicketDetail.id, 'restart')"
class="bg-3e" class="bg-3e"
v-if="workTicketDetail.status == 4" v-if="workTicketDetail.status == 4"
> >
@ -1856,19 +1856,26 @@ export default {
} }
}); });
}, },
onStateShow(type, id) { onStateShow(type, id, restartType) {
const obj = { const obj = {
1: "是否确认开始作业?", 1: "是否确认开始作业?",
2: "暂未全部施工完成,将进入暂停施工状态,待下次点击继续作业...", 2: "暂未全部施工完成,将进入暂停施工状态,待下次点击继续作业...",
3: "是否确认继续作业?", 3: "是否确认继续作业?",
4: "作业已全部施工完成,点击结束作业", 4: "作业已全部施工完成,点击结束作业",
}; };
this.$confirm(obj[type], "提示", {
this.$confirm(
restartType == "restart" ? "是否确认重新开始?" : obj[type],
"提示",
{
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
customClass: `customConfirm customConfirm-box customConfirm${type}`, customClass: `customConfirm customConfirm-box customConfirm${
restartType == "restart" ? 5 : type
}`,
type: "warning", type: "warning",
}).then(() => { }
).then(() => {
this.workTicketId = id; this.workTicketId = id;
this.onChangeState(type); this.onChangeState(type);
}); });
@ -2321,6 +2328,22 @@ export default {
.el-tooltip__popper { .el-tooltip__popper {
max-width: 30%; max-width: 30%;
} }
.customConfirm5 {
.el-message-box__status {
display: none;
}
.el-message-box__message {
padding-left: 16px;
}
.el-message-box__message::after {
content: "点击重新开始作业后,需要到执法记录仪上手动结束工单,结束后录像将会自动上传到平台,可在历史回放中查看";
color: #ffa026;
font-size: 12px;
display: inline-block;
width: 400px;
display: none;
}
}
.customConfirm4 .el-message-box__message::after { .customConfirm4 .el-message-box__message::after {
content: "点击结束作业后,需要到执法记录仪上手动结束工单,结束后录像将会自动上传到平台,可在历史回放中查看"; content: "点击结束作业后,需要到执法记录仪上手动结束工单,结束后录像将会自动上传到平台,可在历史回放中查看";
color: #ffa026; color: #ffa026;
@ -2406,6 +2429,25 @@ export default {
text-align: center; text-align: center;
} }
} }
.el-message-box__wrapper {
.el-message-box__title {
font-weight: normal;
font-size: 16px;
color: #272d45;
margin-left: 15px;
position: relative;
}
.el-message-box__title::before {
content: "";
width: 3px;
height: 100%;
background-color: #5c81ee;
position: absolute;
left: -15px;
top: 50%;
transform: translateY(-50%);
}
}
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
.hls-video-dialog { .hls-video-dialog {
@ -2977,14 +3019,6 @@ export default {
background-color: #88cf65; background-color: #88cf65;
color: #1a1a1a; color: #1a1a1a;
} }
.ybfx_active {
background-color: #88cf65;
color: #ffffff;
}
.gfx_active {
background-color: #ff0000;
color: #ffffff;
}
.checkPoint { .checkPoint {
/deep/ .el-form-item { /deep/ .el-form-item {
margin-bottom: 20px; margin-bottom: 20px;