flx:修改指挥部大屏总览显示问题 新增分页 注销海康插件
This commit is contained in:
parent
5917a1a011
commit
38cb6555a3
@ -4,7 +4,7 @@ NODE_ENV = 'development'
|
||||
# 本地环境接口地址(/api/index.ts文件中使用)
|
||||
# 后端本地
|
||||
# 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://192.168.34.221:28889'
|
||||
# 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'
|
||||
# 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://jxj.zhgdyun.com:19812'
|
||||
# 苏立信/重庆市南岸区
|
||||
|
||||
@ -21,7 +21,7 @@ NODE_ENV = "production"
|
||||
# 七参数标准版(测试平台)
|
||||
# VITE_API_URL = 'http://182.90.224.237:15551'
|
||||
# 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://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://jxjzw.zhgdyun.com:11111'
|
||||
# VITE_API_URL = 'http://jxjzw.zhgdyun.com:11111'
|
||||
# 打包
|
||||
VITE_ULD_API_URL = 'http://jxj.zhgdyun.com:8012/onlinePreview?url='
|
||||
|
||||
|
||||
@ -363,46 +363,46 @@ onMounted(async () => {
|
||||
// 加载海康插件
|
||||
// setTimeout(() => {
|
||||
// }, 2500);
|
||||
await initPlugin();
|
||||
// await initPlugin();
|
||||
// 获取页面的实例对象 ee
|
||||
const pageInstance = getCurrentInstance();
|
||||
// 获取dom节点对象
|
||||
const tagDomObj = pageInstance?.refs.playWndBox;
|
||||
playWndHeight.value = tagDomObj?.clientHeight;
|
||||
playWndWidth.value = tagDomObj?.clientWidth;
|
||||
// const pageInstance = getCurrentInstance();
|
||||
// // 获取dom节点对象
|
||||
// const tagDomObj = pageInstance?.refs.playWndBox;
|
||||
// playWndHeight.value = tagDomObj?.clientHeight;
|
||||
// playWndWidth.value = tagDomObj?.clientWidth;
|
||||
|
||||
// 监听scroll事件,使插件窗口尺寸跟随DIV窗口变化
|
||||
window.addEventListener("scroll", () => {
|
||||
if (oWebControl.value == undefined) {
|
||||
setTimeout(function () {
|
||||
oWebControl.JS_Resize(playWndWidth.value * store.globalScale, playWndHeight.value * store.globalScale);
|
||||
}, 200);
|
||||
}
|
||||
});
|
||||
// // 监听scroll事件,使插件窗口尺寸跟随DIV窗口变化
|
||||
// window.addEventListener("scroll", () => {
|
||||
// if (oWebControl.value == undefined) {
|
||||
// setTimeout(function () {
|
||||
// oWebControl.JS_Resize(playWndWidth.value * store.globalScale, playWndHeight.value * store.globalScale);
|
||||
// }, 200);
|
||||
// }
|
||||
// });
|
||||
|
||||
// 监听resize事件,使插件窗口尺寸跟随DIV窗口变化
|
||||
window.addEventListener("resize", e => {
|
||||
if (oWebControl.value == undefined) {
|
||||
setTimeout(function () {
|
||||
oWebControl.JS_Resize(playWndWidth.value * store.globalScale, playWndHeight.value * store.globalScale);
|
||||
}, 200);
|
||||
}
|
||||
// window.addEventListener("resize", e => {
|
||||
// if (oWebControl.value == undefined) {
|
||||
// // console.log("wwwww", e);
|
||||
// oWebControl.JS_Resize(tagDomObj?.clientWidth, tagDomObj?.clientHeight);
|
||||
// // oWebControl.JS_Resize(playWndHeight.value, playWndWidth.value);
|
||||
// // setWndCover();
|
||||
// setTimeout(function () {
|
||||
// oWebControl.JS_Resize(playWndWidth.value * store.globalScale, playWndHeight.value * store.globalScale);
|
||||
// }, 200);
|
||||
// }
|
||||
});
|
||||
// // if (oWebControl.value == undefined) {
|
||||
// // // console.log("wwwww", e);
|
||||
// // oWebControl.JS_Resize(tagDomObj?.clientWidth, tagDomObj?.clientHeight);
|
||||
// // // oWebControl.JS_Resize(playWndHeight.value, playWndWidth.value);
|
||||
// // // setWndCover();
|
||||
// // }
|
||||
// });
|
||||
// previewVideo(cameraIndexCode.value)
|
||||
});
|
||||
onBeforeUnmount(() => {
|
||||
// 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
|
||||
oWebControl.JS_HideWnd();
|
||||
// 销毁当前播放的视频
|
||||
oWebControl.JS_RequestInterface({ funcName: "destroyWnd" });
|
||||
// 断开与插件服务连接
|
||||
oWebControl.JS_Disconnect();
|
||||
// oWebControl.JS_HideWnd();
|
||||
// // 销毁当前播放的视频
|
||||
// oWebControl.JS_RequestInterface({ funcName: "destroyWnd" });
|
||||
// // 断开与插件服务连接
|
||||
// oWebControl.JS_Disconnect();
|
||||
});
|
||||
|
||||
const initPlugin = () => {
|
||||
|
||||
@ -165,13 +165,18 @@ const getCompanyAttendData = async () => {
|
||||
const res: any = await getComapnyWorkTotalListApi(data);
|
||||
|
||||
if (res.code == 200) {
|
||||
var Data = res.result;
|
||||
var xData: any = [],
|
||||
let Data = res.result;
|
||||
let xData: any = [],
|
||||
yData1: any = [],
|
||||
yData2: any = [],
|
||||
yData3: any = [];
|
||||
Data.forEach((element: any) => {
|
||||
// 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);
|
||||
yData2.push(element.totalPersonNum);
|
||||
yData3.push(element.presencePersonNum);
|
||||
@ -224,23 +229,25 @@ const createdBarCharts = (xData: any, yData1: any, yData2: any, yData3: any, el:
|
||||
axisLabel: {
|
||||
color: "#9fa2ad",
|
||||
fontSize: 12,
|
||||
interval: 0, // 强制显示所有标签
|
||||
interval: 0 // 强制显示所有标签
|
||||
}
|
||||
}
|
||||
],
|
||||
dataZoom: [
|
||||
{
|
||||
type: "slider", // 使用滑动条形式的数据区域缩放组件
|
||||
start: 0, // 数据窗口范围的起始百分比
|
||||
end: 50, // 数据窗口范围的结束百分比
|
||||
// start: 0, // 数据窗口范围的起始百分比
|
||||
// end: 50, // 数据窗口范围的结束百分比
|
||||
startValue: xData.length - 1,
|
||||
endValue: xData.length - 9,
|
||||
height: 10, // 滑动条组件高度
|
||||
bottom: 0, // 距离图表区域下边的距离
|
||||
showDetail: false, // 拖拽时是否显示详情
|
||||
showDataShadow: false, // 是否在组件中显示数据阴影
|
||||
fillerColor: "#2758C0", // 平移条的填充颜色
|
||||
borderColor: "transparent", // 边框颜色
|
||||
zoomLock: true, // 锁定视图
|
||||
},
|
||||
zoomLock: true // 锁定视图
|
||||
}
|
||||
],
|
||||
yAxis: {
|
||||
type: "value",
|
||||
|
||||
@ -88,11 +88,20 @@
|
||||
<el-image v-else :src="noDataImage" :preview-src-list="[noDataImage]" fit="contain" class="el-no-img" alt="" />
|
||||
</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="" />
|
||||
<p>暂无数据</p>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
@ -162,6 +171,11 @@ const getCompanyList = async () => {
|
||||
enterpriseListData.value = res.result;
|
||||
}
|
||||
};
|
||||
let total = ref(0 as any);
|
||||
const onCurrentChange = (event: number) => {
|
||||
pageNo.value = event;
|
||||
getMemberCountList(true);
|
||||
};
|
||||
//获取数据
|
||||
const getMemberCountList = async (tip: any) => {
|
||||
let data:any = {
|
||||
@ -172,7 +186,7 @@ const getMemberCountList = async (tip: any) => {
|
||||
teamId: searchForm.value.belongTeam,
|
||||
departmentId: searchForm.value.belongDepart,
|
||||
pageNo: tip == 'search'?1:pageNo.value,
|
||||
pageSize: 20
|
||||
pageSize: 10
|
||||
};
|
||||
if(searchForm.value.rangeTime){
|
||||
data.startTime = searchForm.value.rangeTime[0]
|
||||
@ -180,10 +194,12 @@ const getMemberCountList = async (tip: any) => {
|
||||
}
|
||||
const res: any = await getRealTimeMoreDataApi(data);
|
||||
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 {
|
||||
crewRealTimeList.value = res.result.records;
|
||||
}
|
||||
total.value = Number(res.result.total);
|
||||
crewRealTimeList.value.map((item: any) => {
|
||||
if (item.imageUrl) {
|
||||
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)
|
||||
if (res.result.pages == pageNo.value) {
|
||||
moreScroll.value = false;
|
||||
} else {
|
||||
pageNo.value = pageNo.value + 1;
|
||||
}
|
||||
// if (res.result.pages == pageNo.value) {
|
||||
// moreScroll.value = false;
|
||||
// } else {
|
||||
// pageNo.value = pageNo.value + 1;
|
||||
// }
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
await getCompanyList();
|
||||
await getMemberCountList("search");
|
||||
refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => {
|
||||
// console.log("滚动容器", e);
|
||||
const scrollTop = e.target.scrollTop;
|
||||
const scrollHeight = e.target.scrollHeight;
|
||||
const clientHeight = e.target.clientHeight;
|
||||
// console.log("滚动容器", scrollTop, scrollHeight, clientHeight);
|
||||
// 向上加载更多
|
||||
if (scrollTop >= scrollHeight - clientHeight - 1) {
|
||||
// console.log("加载更多");
|
||||
if (moreScroll.value) {
|
||||
getMemberCountList("more");
|
||||
}
|
||||
}
|
||||
});
|
||||
// refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => {
|
||||
// // console.log("滚动容器", e);
|
||||
// const scrollTop = e.target.scrollTop;
|
||||
// const scrollHeight = e.target.scrollHeight;
|
||||
// const clientHeight = e.target.clientHeight;
|
||||
// // console.log("滚动容器", scrollTop, scrollHeight, clientHeight);
|
||||
// // 向上加载更多
|
||||
// if (scrollTop >= scrollHeight - clientHeight - 1) {
|
||||
// // console.log("加载更多");
|
||||
// if (moreScroll.value) {
|
||||
// getMemberCountList("more");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -275,7 +291,7 @@ onMounted(async () => {
|
||||
.listBox {
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
height: 80%;
|
||||
height: 72%;
|
||||
.listStyle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user