flx:修改bug

This commit is contained in:
Rain_ 2025-09-29 09:13:40 +08:00
parent cb9e2ec63c
commit dc520acfc2
6 changed files with 77 additions and 51 deletions

View File

@ -17,13 +17,10 @@
<el-image
v-if="$store.state.userInfo.avatar"
:src="$store.state.FILEURL + $store.state.userInfo.avatar"
style="width: 40px;height: 40px;border-radius: 50%;"
style="width: 40px; height: 40px; border-radius: 50%"
>
<div slot="error" class="image-slot">
<el-avatar
size="large"
icon="el-icon-user-solid"
></el-avatar>
<el-avatar size="large" icon="el-icon-user-solid"></el-avatar>
</div>
</el-image>
<el-avatar size="large" icon="el-icon-user-solid" v-else></el-avatar>
@ -178,9 +175,7 @@
<div
class="width_100"
@click="toOverview()"
v-if="
$route.path.indexOf('/projectList') == -1
"
v-if="$route.path.indexOf('/projectList') == -1"
title="数据看板"
>
<img src="@/assets/images/xmht.png" width="15px" height="15px" />
@ -213,11 +208,9 @@
</div>
</template>
<script>
import {
getNewUserAllModulePageApi,
} from "@/assets/js/api/jxjadmin.js";
import { getNewUserAllModulePageApi } from "@/assets/js/api/jxjadmin.js";
import { getProjectDetail } from "@/assets/js/api/baseInfo.js";
import { getScreenAuthModuleAndMenuApi } from '@/assets/js/api/jxjadmin.js'
import { getScreenAuthModuleAndMenuApi } from "@/assets/js/api/jxjadmin.js";
export default {
data() {
return {
@ -280,19 +273,19 @@ export default {
},
methods: {
async getAuthModuleAndMenu() {
let bool = false
const res = await getScreenAuthModuleAndMenuApi()
let bool = false;
const res = await getScreenAuthModuleAndMenuApi();
if (res.code === 200) {
bool = res.result.length ? true : false
bool = res.result.length ? true : false;
}
return bool
return bool;
},
toOverview() {
console.info(this.$store.state.userInfo.accountType,'----')
if(![5, 6, 10].includes(this.$store.state.userInfo.accountType)) {
return this.goProjectBackstage()
console.info(this.$store.state.userInfo.accountType, "----");
if (![5, 6, 10].includes(this.$store.state.userInfo.accountType)) {
return this.goProjectBackstage();
}
this.toOverview2()
this.toOverview2();
},
async toOverview2() {
this.$forceUpdate();
@ -304,19 +297,26 @@ export default {
// type: "warning",
// });
// } else {
const isPermission = await this.getAuthModuleAndMenu()
if(!isPermission && !this.newBigScreen) {
return this.$message({
message: "当前用户没有访问数据看板权限",
type: "warning",
});
}
console.log("当前跳转链接", this.newBigScreen);
//--------------------
this.jumpToken = localStorage.getItem("jumpToken");
let userId = this.$store.state.userInfo.userId;
window.open(this.newBigScreen + "?userId=" + userId + '&sn=' + this.$store.state.projectSn, "_self");
// window.open('http://192.168.34.216:8081/#/large?userId=' + userId + '&sn=' + this.$store.state.projectSn, "_self")//token
const isPermission = await this.getAuthModuleAndMenu();
if (!isPermission && !this.newBigScreen) {
return this.$message({
message: "当前用户没有访问数据看板权限",
type: "warning",
});
}
console.log("当前跳转链接", this.newBigScreen);
//--------------------
this.jumpToken = localStorage.getItem("jumpToken");
let userId = this.$store.state.userInfo.userId;
window.open(
this.newBigScreen +
"?userId=" +
userId +
"&sn=" +
this.$store.state.projectSn,
"_self"
);
// window.open('http://192.168.34.216:8081/#/large?userId=' + userId + '&sn=' + this.$store.state.projectSn, "_self")//token
// }
},
async getProjectDetail() {
@ -325,8 +325,13 @@ export default {
};
await getProjectDetail(data).then((res) => {
if (res.result) {
this.newBigScreen = res.result.newBigScreen;
console.log("接口获取数据看板地址", this.newBigScreen);
if (res.result.newBigScreen) {
this.newBigScreen = res.result.newBigScreen;
console.log("接口获取数据看板地址", this.newBigScreen);
} else {
this.newBigScreen = "/bigscreen/#/large";
console.log("获取默认地址", this.newBigScreen);
}
}
});
},

View File

@ -139,11 +139,14 @@ export default {
this.play(item, this.iWndIndex);
} else if (a.length == 1) {
this.play(item, this.iWndIndex);
this.devH5List.push(item);
} else {
this.play(item, index);
}
});
this.devH5List = a;
if(a.length > 1) {
this.devH5List = a;
}
},
},
mounted() {
@ -165,7 +168,9 @@ export default {
);
if (wnd) {
const controls = document.getElementById(`controls-${index + 1}`);
wnd.removeChild(controls);
if (controls) {
controls.classList.remove("video-controls_flex");
}
}
});
this.devH5List = [];
@ -176,7 +181,7 @@ export default {
);
},
//
stopPlay(currentWindowIndex) {
stopPlay(currentWindowIndex, type) {
this.player.JS_Stop(currentWindowIndex - 1).then(
() => {
this.playback.rate = 0;
@ -188,7 +193,10 @@ export default {
const controls = document.getElementById(
`controls-${currentWindowIndex}`
);
wnd.removeChild(controls);
if (controls) {
controls.classList.remove("video-controls_flex");
}
if(type == "delete") return;
this.devH5List.splice(currentWindowIndex - 1, 1);
}
},
@ -374,6 +382,7 @@ export default {
}
}
if (controls) {
console.log(888777, iWndIndex, _this.devH5List.length - 1);
if (iWndIndex > _this.devH5List.length - 1) return;
controls.classList.add("video-controls_flex");
}
@ -474,7 +483,7 @@ export default {
*/
play(row, index) {
const _this = this;
this.stopPlay(index + 1);
this.stopPlay(index + 1, "delete");
this.getPreviewUrl({
...row,
}).then((res) => {

View File

@ -1010,7 +1010,7 @@
"
>
<el-input
v-model="currentVideoTypeDetail.password"
v-model="currentVideoTypeDetail.port"
:placeholder="$t('message.videoManage.placeholder')"
></el-input>
</el-form-item>
@ -1917,8 +1917,8 @@ export default {
this.getProjectVideoConfigList();
this.Popup.accountServer = true;
this.currentVideoTypeDetail.account = this.currentVideoTypeDetail.account;
this.currentVideoTypeDetail.password =
this.currentVideoTypeDetail.password;
this.currentVideoTypeDetail.port =
this.currentVideoTypeDetail.port;
this.currentVideoTypeDetail.appId = this.currentVideoTypeDetail.appId;
this.currentVideoTypeDetail.appSecret =
this.currentVideoTypeDetail.appSecret;

View File

@ -429,7 +429,7 @@
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<div class="operation-style">
<el-button @click.stop="previewUrl(scope.row)" type="text">
<el-button @click.stop="previewFn(scope.row)" type="text">
<i class="el-icon-view"></i>
预览
</el-button>
@ -476,7 +476,7 @@
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<div class="operation-style">
<el-button @click.stop="previewUrl(scope.row)" type="text">
<el-button @click.stop="previewFn(scope.row)" type="text">
<i class="el-icon-view"></i>
预览
</el-button>

View File

@ -223,16 +223,19 @@ export default {
devList: function (a, b) {
console.log("isc_plugin.vue获取到设备列表", a, b, this.devH5List);
//avalueb
a.forEach((item) => {
a.forEach((item, index) => {
if (this.numCount == 1) {
this.play(item, this.iWndIndex);
} else if (a.length == 1) {
this.play(item, this.iWndIndex);
this.devH5List.push(item);
} else {
this.play(item, index);
}
});
this.devH5List = a;
if(a.length > 1) {
this.devH5List = a;
}
},
isReplayNum: function (newVal, oldVal) {
console.log("新的值", newVal);
@ -393,7 +396,9 @@ export default {
);
if (wnd) {
const controls = document.getElementById(`controls-${index + 1}`);
wnd.removeChild(controls);
if (controls) {
controls.classList.remove("video-controls_flex");
}
}
});
this.devH5List = [];
@ -404,7 +409,7 @@ export default {
);
},
//
stopPlay(currentWindowIndex) {
stopPlay(currentWindowIndex, type) {
this.player.JS_Stop(currentWindowIndex - 1).then(
() => {
this.playback.rate = 0;
@ -416,7 +421,10 @@ export default {
const controls = document.getElementById(
`controls-${currentWindowIndex}`
);
wnd.removeChild(controls);
if (controls) {
controls.classList.remove("video-controls_flex");
}
if(type == "delete") return;
this.devH5List.splice(currentWindowIndex - 1, 1);
}
},

View File

@ -160,7 +160,11 @@ export default {
let originUserInfo = this.$store.state.userInfo;
that.$store.commit("setUserInfo", {
...originUserInfo,
...that.ruleForm
avatar: that.ruleForm.avatar,
realName: that.ruleForm.realName,
personMail: that.ruleForm.personMail,
userTel: that.ruleForm.userTel,
sex: that.ruleForm.sex,
});
});
},