flx:修改指挥部大屏总览显示问题 新增分页 注销海康插件

This commit is contained in:
X_Rian 2024-07-05 23:23:08 +08:00
parent 5917a1a011
commit 38cb6555a3
5 changed files with 99 additions and 76 deletions

View File

@ -4,7 +4,7 @@ NODE_ENV = 'development'
# 本地环境接口地址(/api/index.ts文件中使用) # 本地环境接口地址(/api/index.ts文件中使用)
# 后端本地 # 后端本地
# VITE_API_URL = 'http://192.168.34.155:19111' # VITE_API_URL = 'http://192.168.34.155:19111'
VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地 # VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地
# VITE_API_URL = 'http://182.90.224.237:51234' #雄哥远程 # VITE_API_URL = 'http://182.90.224.237:51234' #雄哥远程
# VITE_API_URL = 'http://192.168.34.221:28889' # VITE_API_URL = 'http://192.168.34.221:28889'
# VITE_API_URL = 'http://121.196.214.246/api' # VITE_API_URL = 'http://121.196.214.246/api'
@ -25,7 +25,7 @@ VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地
# 七参数标准版(演示平台) # 七参数标准版(演示平台)
# VITE_API_URL = 'http://jxj.zhgdyun.com:9809' # VITE_API_URL = 'http://jxj.zhgdyun.com:9809'
# agjt # agjt
# VITE_API_URL = 'http://42.180.188.17:9809' #生产环境 VITE_API_URL = 'http://42.180.188.17:9809' #生产环境
# VITE_API_URL = 'http://42.180.188.17:11211' #测试环境 # VITE_API_URL = 'http://42.180.188.17:11211' #测试环境
# VITE_API_URL = 'http://jxj.zhgdyun.com:19812' # VITE_API_URL = 'http://jxj.zhgdyun.com:19812'
# 苏立信/重庆市南岸区 # 苏立信/重庆市南岸区

View File

@ -21,7 +21,7 @@ NODE_ENV = "production"
# 七参数标准版(测试平台) # 七参数标准版(测试平台)
# VITE_API_URL = 'http://182.90.224.237:15551' # VITE_API_URL = 'http://182.90.224.237:15551'
# agjt # agjt
# VITE_API_URL = 'http://42.180.188.17:9809' #生产环境 VITE_API_URL = 'http://42.180.188.17:9809' #生产环境
# VITE_API_URL = 'http://42.180.188.17:11211' #测试环境 # VITE_API_URL = 'http://42.180.188.17:11211' #测试环境
# 苏立信/重庆市南岸区 # 苏立信/重庆市南岸区
# VITE_API_URL = 'http://101.43.164.214:11111' # VITE_API_URL = 'http://101.43.164.214:11111'
@ -32,7 +32,7 @@ NODE_ENV = "production"
# 合肥启程(乌丹) # 合肥启程(乌丹)
# VITE_API_URL = 'http://192.168.100.4:9809' # VITE_API_URL = 'http://192.168.100.4:9809'
# 九柱 # 九柱
VITE_API_URL = 'http://jxjzw.zhgdyun.com:11111' # VITE_API_URL = 'http://jxjzw.zhgdyun.com:11111'
# 打包 # 打包
VITE_ULD_API_URL = 'http://jxj.zhgdyun.com:8012/onlinePreview?url=' VITE_ULD_API_URL = 'http://jxj.zhgdyun.com:8012/onlinePreview?url='

View File

@ -363,46 +363,46 @@ onMounted(async () => {
// //
// setTimeout(() => { // setTimeout(() => {
// }, 2500); // }, 2500);
await initPlugin(); // await initPlugin();
// ee // ee
const pageInstance = getCurrentInstance(); // const pageInstance = getCurrentInstance();
// dom // // dom
const tagDomObj = pageInstance?.refs.playWndBox; // const tagDomObj = pageInstance?.refs.playWndBox;
playWndHeight.value = tagDomObj?.clientHeight; // playWndHeight.value = tagDomObj?.clientHeight;
playWndWidth.value = tagDomObj?.clientWidth; // playWndWidth.value = tagDomObj?.clientWidth;
// scroll使DIV // // scroll使DIV
window.addEventListener("scroll", () => { // window.addEventListener("scroll", () => {
if (oWebControl.value == undefined) { // if (oWebControl.value == undefined) {
setTimeout(function () { // setTimeout(function () {
oWebControl.JS_Resize(playWndWidth.value * store.globalScale, playWndHeight.value * store.globalScale); // oWebControl.JS_Resize(playWndWidth.value * store.globalScale, playWndHeight.value * store.globalScale);
}, 200); // }, 200);
} // }
}); // });
// resize使DIV // resize使DIV
window.addEventListener("resize", e => { // window.addEventListener("resize", e => {
if (oWebControl.value == undefined) { // if (oWebControl.value == undefined) {
setTimeout(function () { // setTimeout(function () {
oWebControl.JS_Resize(playWndWidth.value * store.globalScale, playWndHeight.value * store.globalScale); // oWebControl.JS_Resize(playWndWidth.value * store.globalScale, playWndHeight.value * store.globalScale);
}, 200); // }, 200);
} // }
// if (oWebControl.value == undefined) { // // if (oWebControl.value == undefined) {
// // console.log("wwwww", e); // // // console.log("wwwww", e);
// oWebControl.JS_Resize(tagDomObj?.clientWidth, tagDomObj?.clientHeight); // // oWebControl.JS_Resize(tagDomObj?.clientWidth, tagDomObj?.clientHeight);
// // oWebControl.JS_Resize(playWndHeight.value, playWndWidth.value); // // // oWebControl.JS_Resize(playWndHeight.value, playWndWidth.value);
// // setWndCover(); // // // setWndCover();
// } // // }
}); // });
// previewVideo(cameraIndexCode.value) // previewVideo(cameraIndexCode.value)
}); });
onBeforeUnmount(() => { onBeforeUnmount(() => {
// //
oWebControl.JS_HideWnd(); // oWebControl.JS_HideWnd();
// // //
oWebControl.JS_RequestInterface({ funcName: "destroyWnd" }); // oWebControl.JS_RequestInterface({ funcName: "destroyWnd" });
// // //
oWebControl.JS_Disconnect(); // oWebControl.JS_Disconnect();
}); });
const initPlugin = () => { const initPlugin = () => {

View File

@ -165,13 +165,18 @@ const getCompanyAttendData = async () => {
const res: any = await getComapnyWorkTotalListApi(data); const res: any = await getComapnyWorkTotalListApi(data);
if (res.code == 200) { if (res.code == 200) {
var Data = res.result; let Data = res.result;
var xData: any = [], let xData: any = [],
yData1: any = [], yData1: any = [],
yData2: any = [], yData2: any = [],
yData3: any = []; yData3: any = [];
Data.forEach((element: any) => { Data.forEach((element: any) => {
xData.push(element.enterpriseName); // xData.push(element.enterpriseName);
if (element.enterpriseName.length > 4) {
xData.push(element.enterpriseName.substring(0, 4) + "...");
} else {
xData.push(element.enterpriseName);
}
yData1.push(element.attendancePersonNum); yData1.push(element.attendancePersonNum);
yData2.push(element.totalPersonNum); yData2.push(element.totalPersonNum);
yData3.push(element.presencePersonNum); yData3.push(element.presencePersonNum);
@ -224,24 +229,26 @@ const createdBarCharts = (xData: any, yData1: any, yData2: any, yData3: any, el:
axisLabel: { axisLabel: {
color: "#9fa2ad", color: "#9fa2ad",
fontSize: 12, fontSize: 12,
interval: 0, // interval: 0 //
} }
} }
], ],
dataZoom: [ dataZoom: [
{ {
type: "slider", // 使 type: "slider", // 使
start: 0, // // start: 0, //
end: 50, // // end: 50, //
height: 10, // startValue: xData.length - 1,
bottom: 0, // endValue: xData.length - 9,
showDetail: false, // height: 10, //
showDataShadow: false, // bottom: 0, //
fillerColor: "#2758C0", // showDetail: false, //
borderColor: "transparent", // showDataShadow: false, //
zoomLock: true, // fillerColor: "#2758C0", //
}, borderColor: "transparent", //
], zoomLock: true //
}
],
yAxis: { yAxis: {
type: "value", type: "value",
axisTick: { axisTick: {

View File

@ -88,11 +88,20 @@
<el-image v-else :src="noDataImage" :preview-src-list="[noDataImage]" fit="contain" class="el-no-img" alt="" /> <el-image v-else :src="noDataImage" :preview-src-list="[noDataImage]" fit="contain" class="el-no-img" alt="" />
</div> </div>
</div> </div>
<div class="notoDta" v-if="partyMemberList.length == 0"> <div class="notoDta" v-if="crewRealTimeList.length == 0">
<img src="@/assets/images/noData.png" alt="" /> <img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p> <p>暂无数据</p>
</div> </div>
</el-scrollbar> </el-scrollbar>
<el-pagination
v-if="crewRealTimeList.length != 0"
background
:page-size="10"
style="justify-content: center"
@current-change="onCurrentChange"
layout="prev, pager, next"
:total="total"
/>
</div> </div>
</div> </div>
</template> </template>
@ -162,6 +171,11 @@ const getCompanyList = async () => {
enterpriseListData.value = res.result; enterpriseListData.value = res.result;
} }
}; };
let total = ref(0 as any);
const onCurrentChange = (event: number) => {
pageNo.value = event;
getMemberCountList(true);
};
// //
const getMemberCountList = async (tip: any) => { const getMemberCountList = async (tip: any) => {
let data:any = { let data:any = {
@ -172,7 +186,7 @@ const getMemberCountList = async (tip: any) => {
teamId: searchForm.value.belongTeam, teamId: searchForm.value.belongTeam,
departmentId: searchForm.value.belongDepart, departmentId: searchForm.value.belongDepart,
pageNo: tip == 'search'?1:pageNo.value, pageNo: tip == 'search'?1:pageNo.value,
pageSize: 20 pageSize: 10
}; };
if(searchForm.value.rangeTime){ if(searchForm.value.rangeTime){
data.startTime = searchForm.value.rangeTime[0] data.startTime = searchForm.value.rangeTime[0]
@ -180,10 +194,12 @@ const getMemberCountList = async (tip: any) => {
} }
const res: any = await getRealTimeMoreDataApi(data); const res: any = await getRealTimeMoreDataApi(data);
if (tip == "more") { if (tip == "more") {
crewRealTimeList.value = crewRealTimeList.value.concat(res.result.records); // crewRealTimeList.value = crewRealTimeList.value.concat(res.result.records);
crewRealTimeList.value = res.result.records;
} else { } else {
crewRealTimeList.value = res.result.records; crewRealTimeList.value = res.result.records;
} }
total.value = Number(res.result.total);
crewRealTimeList.value.map((item: any) => { crewRealTimeList.value.map((item: any) => {
if (item.imageUrl) { if (item.imageUrl) {
if(item.imageUrl.indexOf("http") == -1 && item.imageUrl.indexOf("https") == -1){ if(item.imageUrl.indexOf("http") == -1 && item.imageUrl.indexOf("https") == -1){
@ -196,30 +212,30 @@ const getMemberCountList = async (tip: any) => {
} }
}); });
console.log(crewRealTimeList.value,777888) console.log(crewRealTimeList.value,777888)
if (res.result.pages == pageNo.value) { // if (res.result.pages == pageNo.value) {
moreScroll.value = false; // moreScroll.value = false;
} else { // } else {
pageNo.value = pageNo.value + 1; // pageNo.value = pageNo.value + 1;
} // }
}; };
onMounted(async () => { onMounted(async () => {
await getCompanyList(); await getCompanyList();
await getMemberCountList("search"); await getMemberCountList("search");
refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => { // refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => {
// console.log("", e); // // console.log("", e);
const scrollTop = e.target.scrollTop; // const scrollTop = e.target.scrollTop;
const scrollHeight = e.target.scrollHeight; // const scrollHeight = e.target.scrollHeight;
const clientHeight = e.target.clientHeight; // const clientHeight = e.target.clientHeight;
// console.log("", scrollTop, scrollHeight, clientHeight); // // console.log("", scrollTop, scrollHeight, clientHeight);
// // //
if (scrollTop >= scrollHeight - clientHeight - 1) { // if (scrollTop >= scrollHeight - clientHeight - 1) {
// console.log(""); // // console.log("");
if (moreScroll.value) { // if (moreScroll.value) {
getMemberCountList("more"); // getMemberCountList("more");
} // }
} // }
}); // });
}); });
</script> </script>
@ -275,7 +291,7 @@ onMounted(async () => {
.listBox { .listBox {
width: 95%; width: 95%;
margin: 0 auto; margin: 0 auto;
height: 80%; height: 72%;
.listStyle { .listStyle {
display: flex; display: flex;
align-items: center; align-items: center;