flx:修复

This commit is contained in:
Rain_ 2025-12-02 11:29:07 +08:00
parent 2e4d719de6
commit 2a11a72faa
3 changed files with 62 additions and 77 deletions

View File

@ -326,6 +326,8 @@ Vue.directive('permission', {
const { value } = binding;
// 判断当前用户是否拥有该按钮权限
if (!Vue.prototype.checkPermission(value)) {
console.log('权限:', el.parentNode)
el.parentNode.removeChild(el);
}
}
@ -337,13 +339,14 @@ Vue.prototype.checkPermission = function(permission) {
permissions = permissions.filter(
(x) => x.path == permission.menuPath
)[0];
// console.log('权限', permissions)
console.log('权限', permissions)
if (!permissions || !permissions.actionList) {
return false;
}
let index = permissions.actionList.findIndex(
(x) => x.actionCode == permission.key
)
console.log('index', index != -1, permission.key)
return index != -1 ? true : false;
}
// 加载缩略图

View File

@ -237,12 +237,12 @@
{{ workTicketDetail.applicationTime }}
</div>
</div>
<div class="box1">
<!-- <div class="box1">
<div>安全措施</div>
<div>
{{ workTicketDetail.safetyMeasure }}
</div>
</div>
</div> -->
<div class="box1">
<div>作业内容</div>
<div>
@ -674,7 +674,7 @@
}}
</div>
</div>
<div>
<!-- <div>
<div>安全措施</div>
<div>
{{
@ -683,7 +683,7 @@
: "--"
}}
</div>
</div>
</div> -->
<div>
<div>作业内容</div>
<div>

View File

@ -33,11 +33,11 @@
<div class="bg-icon" @click="onRefresh">
<div class="refresh-icon"></div>
</div>
<div
class="bg-icon"
@click="onExpand"
>
<div class="shrink-icon" :class="{ 'shrink-icon_active': this.defaultExpand }"></div>
<div class="bg-icon" @click="onExpand">
<div
class="shrink-icon"
:class="{ 'shrink-icon_active': this.defaultExpand }"
></div>
</div>
</div>
</div>
@ -85,12 +85,12 @@
>
</span>
<span
:class="
{'videoName' : data.videoName,
'projectName' : data.projectName,
'companyName2' : data.companyType == 2,
'color-01' : data.videoItem && data.videoItem.deviceState == 1}
"
:class="{
videoName: data.videoName,
projectName: data.projectName,
companyName2: data.companyType == 2,
'color-01': data.videoItem && data.videoItem.deviceState == 1,
}"
:title="node.label"
>{{ node.label }}
<span v-if="data.children.length > 0">
@ -109,11 +109,7 @@
v-show="data.projectNum && videoType == 0"
>{{ data.projectNum }}</span
> -->
<el-tooltip
effect="dark"
content="播放项目所有视频"
placement="top"
>
<el-tooltip effect="dark" content="播放项目所有视频" placement="top">
<!-- data.type == 'project' && -->
<span
class="playAllBtn"
@ -246,8 +242,7 @@ export default {
//
getProjectVideoConfigList(dataItem, type, itemList) {
projectVideoConfigListApi({
projectSn:
this.$store.state.projectSn || dataItem.sn || dataItem.projectSn,
projectSn: this.$store.state.projectSn || dataItem.sn || dataItem.projectSn,
}).then((res) => {
if (res.code == 200) {
console.log(res.result, "resresresres");
@ -387,8 +382,8 @@ export default {
this.recursiveFilterList(cur.children, rountCount, resultList);
}
if (cur.type == "video") {
if(this.searchInfo.deviceState) {
if(this.searchInfo.deviceState == cur.videoItem.deviceState){
if (this.searchInfo.deviceState) {
if (this.searchInfo.deviceState == cur.videoItem.deviceState) {
resultList.push(cur);
}
return prev;
@ -537,11 +532,7 @@ export default {
},
playMutipleVideo(data) {
this.videoInfo = data.allvideolist[0];
this.getProjectVideoConfigList(
data.allvideolist[0],
"all",
data.allvideolist
);
this.getProjectVideoConfigList(data.allvideolist[0], "all", data.allvideolist);
},
filterNode(value, data) {
this.defaultExpand = true;
@ -549,30 +540,34 @@ export default {
return data.name.indexOf(value) !== -1;
},
recursion(array) {
return array.map((item) => {
if (
item.children &&
Array.isArray(item.children) &&
item.children.length > 0
) {
item.children = this.recursion(item.children);
if(item.children.length > 0) {
return item;
return array
.map((item) => {
if (item.children && Array.isArray(item.children) && item.children.length > 0) {
item.children = this.recursion(item.children);
if (item.children.length > 0) {
return item;
}
return;
}
return
}
console.log(item.deviceState, this.searchInfo.deviceState);
if(item.type == "video") {
if(item.videoItem && item.videoItem.deviceState == this.searchInfo.deviceState) {
return item;
console.log(888444, item);
if (item.type == "video") {
if (
item.videoItem &&
item.videoItem.deviceState == this.searchInfo.deviceState
) {
return item;
}
return;
}
return
}
return item;
}).filter(item => item != undefined);
return item;
})
.filter((item) => item != undefined)
.filter((item) => (item.type != "video" ? item.children.length > 0 : true));
},
},
computed: {
// 线线
// type: 1- 2-线 3-线
filterTreeDataTotal() {
return (type) => {
if (type == 1) {
@ -599,11 +594,7 @@ export default {
const dataList = structuredClone(this.treeData);
return dataList.map((item) => {
let children = [];
if (
item.children &&
Array.isArray(item.children) &&
item.children.length > 0
) {
if (item.children && Array.isArray(item.children) && item.children.length > 0) {
children = this.recursion(item.children);
}
return {
@ -631,8 +622,8 @@ export default {
};
</script>
<style lang="less" scoped>
.color-01{
color: #01FFF0 !important;
.color-01 {
color: #01fff0 !important;
}
.header-search {
padding: 10px 15px;
@ -715,12 +706,7 @@ export default {
background: linear-gradient(180deg, #082a68 0%, #001e53 100%);
border-radius: 0px 0px 0px 0px;
border: 4px solid;
border-image: linear-gradient(
150deg,
rgba(0, 255, 240, 0.7),
rgba(0, 255, 240, 0)
)
4 4;
border-image: linear-gradient(150deg, rgba(0, 255, 240, 0.7), rgba(0, 255, 240, 0)) 4 4;
}
.header-box {
background-image: url("~@/assets/images/videoSurveillance/header-bg2.png");
@ -875,11 +861,10 @@ export default {
color: #5181f6;
// font-weight: bold;
.icon-video {
background: url("~@/assets/images/icon-video-blue.png") center center
no-repeat;
background: url("~@/assets/images/icon-video-blue.png") center center no-repeat;
&.icon-video2 {
background: url("~@/assets/images/icon-video2-blue.png") center
center no-repeat;
background: url("~@/assets/images/icon-video2-blue.png") center center
no-repeat;
}
}
}
@ -1033,19 +1018,19 @@ export default {
color: #5181f6;
// font-weight: bold;
.icon-video {
background: url("~@/assets/images/longguang/icon-video-blue.png") center
center no-repeat !important;
background: url("~@/assets/images/longguang/icon-video-blue.png") center center
no-repeat !important;
&.icon-video2 {
background: url("~@/assets/images/longguang/icon-video2-blue.png")
center center no-repeat !important;
background: url("~@/assets/images/longguang/icon-video2-blue.png") center center
no-repeat !important;
}
}
}
}
.playAllBtn {
&:hover {
background: url("~@/assets/images/longguang/icon-watch-video.png") center
center no-repeat !important;
background: url("~@/assets/images/longguang/icon-watch-video.png") center center
no-repeat !important;
}
}
}
@ -1090,13 +1075,11 @@ export default {
}
}
.icon-video {
background: url("~@/assets/images/icon-video-white.png") center center
no-repeat;
background: url("~@/assets/images/icon-video-white.png") center center no-repeat;
// background-size: 14px auto ;
vertical-align: top;
&.icon-video2 {
background: url("~@/assets/images/icon-video2.png") center center
no-repeat;
background: url("~@/assets/images/icon-video2.png") center center no-repeat;
}
}
.projectName:hover {
@ -1129,4 +1112,3 @@ export default {
}
}
</style>