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) {
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 = [];

View File

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

View File

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

View File

@ -298,7 +298,7 @@
>
<el-button
type="text"
@click="onStateShow(3, scope.row.id)"
@click="onStateShow(3, scope.row.id, 'restart')"
icon="el-icon-video-play"
v-if="scope.row.status == 4"
>重新开始</el-button
@ -915,7 +915,7 @@
继续作业
</div>
<div
@click="onStateShow(3, workTicketDetail.id)"
@click="onStateShow(3, workTicketDetail.id, 'restart')"
class="bg-3e"
v-if="workTicketDetail.status == 4"
>
@ -1856,19 +1856,26 @@ export default {
}
});
},
onStateShow(type, id) {
onStateShow(type, id, restartType) {
const obj = {
1: "是否确认开始作业?",
2: "暂未全部施工完成,将进入暂停施工状态,待下次点击继续作业...",
3: "是否确认继续作业?",
4: "作业已全部施工完成,点击结束作业",
};
this.$confirm(obj[type], "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
customClass: `customConfirm customConfirm-box customConfirm${type}`,
type: "warning",
}).then(() => {
this.$confirm(
restartType == "restart" ? "是否确认重新开始?" : obj[type],
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
customClass: `customConfirm customConfirm-box customConfirm${
restartType == "restart" ? 5 : type
}`,
type: "warning",
}
).then(() => {
this.workTicketId = id;
this.onChangeState(type);
});
@ -2321,6 +2328,22 @@ export default {
.el-tooltip__popper {
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 {
content: "点击结束作业后,需要到执法记录仪上手动结束工单,结束后录像将会自动上传到平台,可在历史回放中查看";
color: #ffa026;
@ -2406,6 +2429,25 @@ export default {
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 lang="less" scoped>
.hls-video-dialog {
@ -2977,14 +3019,6 @@ export default {
background-color: #88cf65;
color: #1a1a1a;
}
.ybfx_active {
background-color: #88cf65;
color: #ffffff;
}
.gfx_active {
background-color: #ff0000;
color: #ffffff;
}
.checkPoint {
/deep/ .el-form-item {
margin-bottom: 20px;