flx:修改现场大屏总包单位轮播 危险特殊作业增加轮播

This commit is contained in:
X_Rian 2024-07-05 15:59:01 +08:00
parent 7fa5e78047
commit 1d22698048
5 changed files with 318 additions and 184 deletions

View File

@ -23,7 +23,7 @@ export const countProjectEnterpriseApi = (params: {}, noLoading: boolean) => {
};
//获取承包商进度列表API
export const countProcessApi = (params: {}, noLoading: boolean) => {
return http.get(BASEURL + `/xmgl/xzTaskProgress/list?projectSn=`+params.projectSn+`&orderBy=`+params.orderBy, );
return http.get(BASEURL + `/xmgl/xzTaskProgress/list?projectSn=` + params.projectSn + `&orderBy=` + params.orderBy);
};
//获取企业信息API
@ -46,12 +46,16 @@ export const configWeekVideoListApi = (params: {}, noLoading: boolean) => {
//获取劳务实名制信息API---上
export const selectPersonTypeAndEduStatisticsApi = (params: {}, noLoading: boolean) => {
// return http.post(BASEURL + `/xmgl/workerInfo/selectPersonTypeAndEduStatistics`, params, { headers: { noLoading: noLoading } });
return http.post(BASEURL + `/xmgl/workerAttendance/selectEnterpriseAttendanceCount`, params, { headers: { noLoading: noLoading } });
return http.post(BASEURL + `/xmgl/workerAttendance/selectEnterpriseAttendanceCount`, params, {
headers: { noLoading: noLoading }
});
};
//获取劳务实名制信息API---下
export const selectWorkerTeamAndDepartmentStatisticsApi = (params: {}, noLoading: boolean) => {
return http.post(BASEURL + `/xmgl/workerInfo/selectWorkerTeamAndDepartmentStatistics`, params, { headers: { noLoading: noLoading } });
return http.post(BASEURL + `/xmgl/workerInfo/selectWorkerTeamAndDepartmentStatistics`, params, {
headers: { noLoading: noLoading }
});
};
//获取质量待办信息API
@ -66,7 +70,9 @@ export const securityPageApi = (params: {}, noLoading: boolean) => {
// 获取安全评分数据API
export const getStatScoreApi = (params: {}, showLoading: boolean) => {
return http.get(BASEURL + `/xmgl/xzSecurityQualityInspectionRecord/getStatScore`, params, { headers: { noLoading: showLoading } });
return http.get(BASEURL + `/xmgl/xzSecurityQualityInspectionRecord/getStatScore`, params, {
headers: { noLoading: showLoading }
});
};
//获取应急记录信息API
@ -80,3 +86,11 @@ export const getStatBySpecialApi = (params: {}, noLoading: boolean) => {
// return http.get(BASEURL + `/xmgl/xzFlow/getStatBySpecial`, params, { headers: { noLoading: noLoading } });
return http.post(BASEURL + `/xmgl/xzSpecial/countSpecialByFinalStatus`, params, { headers: { noLoading: noLoading } });
};
//危大数据信息API
export const getcountDangerEngineerApi = (params: {}, noLoading: boolean) => {
// return http.get(BASEURL + `/xmgl/xzFlow/getStatBySpecial`, params, { headers: { noLoading: noLoading } });
return http.post(BASEURL + `/xmgl/agjtLiveScreen/countDangerEngineerByFinalStatus`, params, {
headers: { noLoading: noLoading }
});
};

View File

@ -28,11 +28,11 @@ export const BASE_IMAGE_URL = import.meta.env.VITE_BASE_IMAGE_URL;
// export const COMPANY: string = "zsbf"; //中水北方
// export const COMPANY: string = "as"; //鞍山项目
// export const COMPANY: string = "agjt"; //鞍钢集团
// export const COMPANY: string = "agjtLive"; //鞍钢集团现场大屏
export const COMPANY: string = "agjtLive"; //鞍钢集团现场大屏
// export const COMPANY: string = "agjtCommand"; //鞍钢集团指挥部大屏
// export const COMPANY: string = "agjtProjectKanban"; //鞍钢集团项目看板大屏
// export const COMPANY: string = "agjtOverviewScreen"; //鞍钢集团项目总览
export const COMPANY: string = "zkjc"; //中科佳成项目
// export const COMPANY: string = "zkjc"; //中科佳成项目
// export const COMPANY: string = "cqna"; //重庆南岸项目
// export const COMPANY: string = "slx"; //苏立信项目
// export const COMPANY: string = "hfqc"; //合肥启程(乌丹)项目

View File

@ -24,9 +24,9 @@ export const staticRouter: RouteRecordRaw[] = [
{
path: "/large",
name: "大屏",
component: () => import("@/views/sevenLargeScreen/indexL.vue"), //七参数标准版
// component: () => import("@/views/sevenLargeScreen/indexL.vue"), //七参数标准版
// component: () => import("@/views/commandScreen/indexCommand.vue"), //指挥部大屏
// component: () => import("@/views/agjtLiveScreen/indexLive.vue"), //鞍钢现场大屏
component: () => import("@/views/agjtLiveScreen/indexLive.vue"), //鞍钢现场大屏
// component: () => import("@/views/overviewScreen/indexCommand.vue"), //总览大屏
// component: () => import("@/views/agjtProjectKanban/indexL.vue"), //鞍钢集团项目看板大屏
// component: () => import("@/views/sevenLargeScreen/indexL_syhy.vue"), // 只有一级路由(盘锦、嘉兴、鄱湖美湾医疗项目需切换至该首页)

View File

@ -1,25 +1,34 @@
<template>
<div class="leftBottom">
<Card title="特殊作业情况">
<Card title="危险特殊作业情况">
<!-- <div class="not-data" v-show="isShow">
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div> -->
<el-carousel indicator-position="none" trigger="click" :autoplay="true" :interval="10000">
<el-carousel-item>
<div class="mainContainer">
<div id="pieEchart" style="width: 100%; height: 100%"></div>
<div id="pieEchart1" style="width: 100%; height: 100%"></div>
</div>
</el-carousel-item>
<el-carousel-item>
<div class="mainContainer">
<div id="pieEchart2" style="width: 100%; height: 100%"></div>
</div>
</el-carousel-item>
</el-carousel>
</Card>
</div>
</template>
<script setup lang="ts">
import Card from "@/components/card.vue";
import { ref, onMounted, watch } from "vue";
import { ref, onMounted, watch, reactive } from "vue";
import { GlobalStore } from "@/stores";
import * as echarts from "echarts";
import { COMPANY } from "@/config/config";
//API
import { getStatBySpecialApi } from "@/api/modules/agjtLiveApi";
import { getStatBySpecialApi, getcountDangerEngineerApi } from "@/api/modules/agjtLiveApi";
const store = GlobalStore();
const BASEURL = import.meta.env.VITE_API_URL;
@ -33,49 +42,100 @@ const outPie = ref([
// {name:'',value:0,doing:0,per:0},{name:'',value:0,doing:0,per:0},{name:'',value:0,doing:0,per:0},{name:'',value:0,doing:0,per:0},
// {name:'',value:0,doing:0,per:0},{name:'',value:0,doing:0,per:0},{name:'',value:0,doing:0,per:0},{name:'',value:0,doing:0,per:0},
] as any);
const tempData = ref([]as any)
const tempData = ref([] as any);
const carouselPieInfo = reactive({
innerPieDanger: [] as any[],
outPieDanger: [] as any[],
tempDataDanger: [] as any[]
});
//
async function getSpecialInfo() {
const getSpecialInfo = () => {
let data = {
projectSn: store.sn
};
await getStatBySpecialApi(data,true).then(res => {
getStatBySpecialApi(data, true).then((res: any) => {
if (res.success) {
if (res.result) {
//
if (res.result.total) {
// innerPie.value[0].value = res.result.total.running
// innerPie.value[1].value = res.result.total.complete
innerPie.value = []
innerPie.value.push({ value: res.result.total.running, name: "进行中" });
innerPie.value.push({ value: res.result.total.complete, name: "已完成" });
innerPie.value = [
{ value: res.result.total.running, name: "进行中" },
{ value: res.result.total.complete, name: "已完成" }
];
}
//
outPie.value = res.result.groupByType;
tempData.value = []
outPie.value.map(item => {
tempData.value = outPie.value.map((item: any) => {
item.value = Number(item.num);
tempData.value.push({
return {
label: item.name,
value: item.num
})
};
});
// outPie.value.map(item => {
// item.value = Number(item.num);
// tempData.value.push({
// label: item.name,
// value: item.num
// });
// });
// //
// let chart = echarts.init(document.getElementById("pieEchart1"));
// // 使 clear()
// chart.clear();
drawPie(1, {
innerPie: innerPie.value,
outPie: outPie.value,
tempData: tempData.value
});
//
let chart = echarts.init(document.getElementById('pieEchart'));
// 使 clear()
chart.clear();
drawPie();
}
}
});
}
};
function drawPie() {
//
const getcountDangerEngineer = () => {
let data = {
projectSn: store.sn
};
getcountDangerEngineerApi(data, true).then((res: any) => {
if (res.success) {
if (res.result) {
//
if (res.result.total) {
carouselPieInfo.innerPieDanger = [
{ value: res.result.total.running, name: "进行中" },
{ value: res.result.total.complete, name: "已完成" }
];
}
//
carouselPieInfo.outPieDanger = res.result.groupByType;
carouselPieInfo.tempDataDanger = carouselPieInfo.outPieDanger.map((item: any) => {
item.value = Number(item.num);
return {
label: item.name,
value: item.num
};
});
drawPie(2, {
innerPie: carouselPieInfo.innerPieDanger,
outPie: carouselPieInfo.outPieDanger,
tempData: carouselPieInfo.tempDataDanger
});
}
}
});
};
function drawPie(pieNum: number, pieInfo: any) {
type EChartsOption = echarts.EChartsOption;
var chartDom = document.getElementById("pieEchart")!;
var myChart = echarts.init(chartDom);
var option: EChartsOption;
let chartDom: any = document.getElementById(`pieEchart${pieNum}`)!;
let myChart = echarts.init(chartDom);
let option: EChartsOption;
option = {
tooltip: {
@ -83,19 +143,19 @@ function drawPie() {
// formatter: '{a} <br/>{b}: {c} ({d}%)'
formatter: function (params: any) {
if (params.seriesName == "innerPie") {
return "<div>" + innerPie.value[params.dataIndex].name + "" + innerPie.value[params.dataIndex].value + "</div>";
return "<div>" + pieInfo.innerPie[params.dataIndex].name + "" + pieInfo.innerPie[params.dataIndex].value + "</div>";
} else {
return (
"<div style='width:auto;height:auto'>" +
"<div>" +
outPie.value[params.dataIndex].name +
pieInfo.outPie[params.dataIndex].name +
" " +
outPie.value[params.dataIndex].ratio +
pieInfo.outPie[params.dataIndex].ratio +
"%</div>" +
"<div>已完成:" +
outPie.value[params.dataIndex].complete +
pieInfo.outPie[params.dataIndex].complete +
"&nbsp;&nbsp;&nbsp;&nbsp;进行中:" +
outPie.value[params.dataIndex].running +
pieInfo.outPie[params.dataIndex].running +
"</div>" +
"</div>"
);
@ -125,7 +185,7 @@ function drawPie() {
labelLine: {
show: false
},
data: innerPie.value
data: pieInfo.innerPie
},
{
name: "pieCircle",
@ -138,16 +198,16 @@ function drawPie() {
label: {
// formatter: '{a|{a}}{abg|}\n{hr|}\n {b|{b}}{c} {per|{d}%} ',
formatter: function (params: any) {
let done = "已完成:" + outPie.value[params.dataIndex].complete + " ";
let done = "已完成:" + pieInfo.outPie[params.dataIndex].complete + " ";
return (
"{name|" +
outPie.value[params.dataIndex].name +
pieInfo.outPie[params.dataIndex].name +
"}{abg|} {per|" +
outPie.value[params.dataIndex].ratio +
pieInfo.outPie[params.dataIndex].ratio +
"%}\n{hr|}\n{done|" +
done +
"} 进行中:" +
outPie.value[params.dataIndex].running
pieInfo.outPie[params.dataIndex].running
);
},
// backgroundColor: '#1c447b',
@ -180,7 +240,7 @@ function drawPie() {
}
}
},
data: outPie.value
data: pieInfo.outPie
// data: tempData.value
// data: [{name:123,value:123},{name:456,value:0}]
}
@ -192,7 +252,7 @@ function drawPie() {
//
const leftBottomMethod = async () => {
getSpecialInfo()
getSpecialInfo();
};
//
defineExpose({
@ -201,6 +261,7 @@ defineExpose({
onMounted(async () => {
getSpecialInfo();
getcountDangerEngineer();
});
</script>
@ -233,4 +294,41 @@ onMounted(async () => {
font-size: 14px;
}
}
:deep() {
.el-carousel__indicators li {
padding-top: 6px;
padding-bottom: 2px;
}
.el-carousel__indicator--horizontal .el-carousel__button {
width: 10px;
height: 10px;
background: #a8c3dd;
border: 1px solid #a8c3dd;
border-radius: 50%;
opacity: 0.3;
}
.el-carousel__indicator--horizontal.is-active .el-carousel__button {
width: 10px;
height: 10px;
background: #4ac0f3;
border: 1px solid #4ac0f3;
border-radius: 50%;
opacity: 1;
}
.el-carousel__arrow--left {
// top: 70px;
left: -12px;
font-size: 16px;
}
.el-carousel__arrow--right {
// top: 70px;
right: -12px;
font-size: 16px;
}
}
</style>

View File

@ -2,55 +2,71 @@
<div class="leftTop">
<Card title="总包单位信息轮播">
<!-- <el-carousel style="width: 110%;transform:translateX(-4.5%) translateY(-5%);" :autoplay="false" indicator-position="none" -->
<el-carousel style="width: 110%;transform:translateX(-4.5%) translateY(-5%);" :autoplay="true" :interval="10000" indicator-position="none"
v-if="cbsProjectInfo && cbsProjectInfo.length>0">
<el-carousel
style="width: 110%; transform: translateX(-4.5%) translateY(-5%)"
:autoplay="true"
:interval="10000"
indicator-position="none"
v-if="cbsProjectInfo && cbsProjectInfo.length > 0"
>
<el-carousel-item style="height: 100%" v-for="(item, i) in cbsProjectInfo" :key="i">
<div class="mainContainer" style="transform: translateX(5%) translateY(5%)" v-if="item.lbType == 1">
<div class="lineBox">
<span class="aLine" style="width:auto;margin-left: 5%;">承包商名称</span>
<span class="cLine">{{item.projectEnterprise.cbsName || '--'}}</span>
<span class="aLine" style="width: auto; margin-left: 5%">承包商名称</span>
<span class="cLine">{{ item.projectEnterprise.cbsName || "--" }}</span>
</div>
<div class="lineBox">
<div class="boxInner1">
<span class="aLine">项目编号</span>
<span class="cLine">{{item.projectEnterprise.projectNumber || '--'}}</span></div>
<span class="cLine">{{ item.projectEnterprise.projectNumber || "--" }}</span>
</div>
<div class="boxInner2">
<span class="aLine">建筑面积</span>
<span v-if="item.projectEnterprise.projectAcreage"><span class="cLine">{{item.projectEnterprise.projectAcreage + ''}}</span></span>
<span v-if="item.projectEnterprise.projectAcreage"
><span class="cLine">{{ item.projectEnterprise.projectAcreage + "㎡" }}</span></span
>
<span v-else>--</span>
</div>
</div>
<div class="lineBox">
<div class="boxInner1">
<span class="aLine">项目经理</span>
<span class="cLine">{{item.projectEnterprise.projectManage || '--'}}</span></div>
<span class="cLine">{{ item.projectEnterprise.projectManage || "--" }}</span>
</div>
<div class="boxInner2">
<span class="aLine">联系电话</span>
<span class="cLine">{{item.projectEnterprise.projectTel || '--'}}</span></div>
<span class="cLine">{{ item.projectEnterprise.projectTel || "--" }}</span>
</div>
</div>
<div class="lineBox">
<div class="boxInner1">
<span class="aLine">项目类型</span>
<span class="cLine">{{item.projectEnterprise.cbsProjectTypeName || '--'}}</span></div>
<span class="cLine">{{ item.projectEnterprise.cbsProjectTypeName || "--" }}</span>
</div>
<div class="boxInner2">
<span class="aLine">工程类别</span>
<span class="cLine">{{item.projectEnterprise.projectTypeName || '--'}}</span></div>
<span class="cLine">{{ item.projectEnterprise.projectTypeName || "--" }}</span>
</div>
</div>
<div class="lineBox">
<div class="boxInner1">
<span class="aLine">开工日期</span>
<span class="cLine">{{item.projectEnterprise.startWorkDate || '--'}}</span></div>
<span class="cLine">{{ item.projectEnterprise.startWorkDate || "--" }}</span>
</div>
<div class="boxInner2">
<span class="aLine">竣工日期</span>
<span class="cLine">{{item.projectEnterprise.completionDate || '--'}}</span></div>
<span class="cLine">{{ item.projectEnterprise.completionDate || "--" }}</span>
</div>
</div>
<div class="lineBox">
<div class="boxInner1">
<span class="aLine">施工阶段</span>
<span class="cLine">{{item.projectEnterprise.constructionStageName || '--'}}</span></div>
<span class="cLine">{{ item.projectEnterprise.constructionStageName || "--" }}</span>
</div>
<div class="boxInner2">
<span class="aLine">结构类型</span>
<span class="cLine">{{item.projectEnterprise.structureTypeName || '--'}}</span></div>
<span class="cLine">{{ item.projectEnterprise.structureTypeName || "--" }}</span>
</div>
</div>
<div class="lineBox">
<!-- <div class="boxInner1">
@ -59,30 +75,28 @@
</div> -->
<div class="boxInner1">
<span class="aLine">工程状态</span>
<span class="cLine">{{item.projectEnterprise.bulidStatus == 0 ? '未开工' :
item.projectEnterprise.bulidStatus == 1 ? '在建' :
item.projectEnterprise.bulidStatus == 2 ? '停工' :
item.projectEnterprise.bulidStatus == 3 ? '验收' :
item.projectEnterprise.bulidStatus == 4 ? '完工' : '--'}}</span>
<span class="cLine">{{
item.projectEnterprise.bulidStatus == 0
? "未开工"
: item.projectEnterprise.bulidStatus == 1
? "在建"
: item.projectEnterprise.bulidStatus == 2
? "停工"
: item.projectEnterprise.bulidStatus == 3
? "验收"
: item.projectEnterprise.bulidStatus == 4
? "完工"
: "--"
}}</span>
</div>
</div>
</div>
<div class="mainContainer" style="transform: translateX(5%) translateY(5%)" v-else>
<div>
<span>承包商名称</span>
<span>{{item.name || '--'}}</span>
<span>{{ item.name || "--" }}</span>
</div>
<div class="cbProcess" v-if="item.processList.length > 3">
<!-- v-if="listData.length>0" :list="listData" -->
<vue3-seamless-scroll
v-if="item.processList.length > 0"
:list="item.processList"
:speed="1"
:limitScrollNum="3"
:step="0.3"
:hover="true"
class="scroll"
>
<el-scroll v-if="item.processList.length > 3" class="cbProcess">
<div class="pItem" v-for="(item2, i) in item.processList" :key="i">
<div class="pLeft">
<span :class="['plInner', 'plBgc' + ((i + 1) % 12)]">
@ -103,15 +117,15 @@
</div>
</div>
</div>
</vue3-seamless-scroll>
</div>
</el-scroll>
<div class="cbProcess" v-else-if="item.processList.length == 0">
<div class="processNotDta" v-if="item.processList.length == 0">
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div>
</div>
<div class="cbProcess" v-else>
<!-- <div class="cbProcess" v-else>
<el-scroll style="height: 50%">
<div class="pItem" v-for="(item2, i) in item.processList" :key="i">
<div class="pLeft">
<span :class="['plInner', 'plBgc' + ((i + 1) % 12)]">
@ -132,10 +146,8 @@
</div>
</div>
</div>
<!-- </vue3-seamless-scroll> -->
</div>
</el-scroll>
</div> -->
</div>
</el-carousel-item>
</el-carousel>
@ -158,70 +170,80 @@ import {
getEnterpriseIdApi,
getEnterpriseInfoByIdApi,
countProjectEnterpriseApi,
countProcessApi,
countProcessApi
} from "@/api/modules/agjtLiveApi";
const store = GlobalStore();
const BASEURL = import.meta.env.VITE_API_URL
const BASEURL = import.meta.env.VITE_API_URL;
const cbsProjectInfo = ref({} as any)
const cbsProjectInfo = ref({} as any);
async function getCbsProjectInfo() {
let data1 = {
page: 1,
pageSize: 999,
projectSn: store.sn,
isCountMainEnterprise: 1
}
let peList:any = []
};
let peList: any = [];
await countProjectEnterpriseApi(data1, true).then((res: any) => {
if (res.success) {
if (res.result && res.result.records) {
peList = res.result.records
peList = res.result.records;
peList.map((item: any) => {
item.lbType = 1
})
item.lbType = 1;
});
}
}
});
let data2 = {
projectSn: store.sn,
orderBy: 1
}
let pList:any = []
};
let pList: any = [];
await countProcessApi(data2, true).then((res: any) => {
if (res.success) {
pList = res.result
pList = res.result;
}
})
cbsProjectInfo.value = []
});
cbsProjectInfo.value = [];
peList.map((item: any, i: any) => {
cbsProjectInfo.value.push(item)
let processList = pList.filter((item2: any) => item2.enterpriseId == item.id) || []
if(processList.length>3){
let tempList:any = []
// cbsProjectInfo.value.map((item3:any,i:any) => {
processList.map((item3:any,i:any) => {
tempList.push(item3)
if((i+1)%3 == 0){
cbsProjectInfo.value.push({
cbsProjectInfo.value.push(item);
let processList = pList.filter((item2: any) => item2.enterpriseId == item.id) || [];
if (processList.length == 0) return;
// console.log(555555555, processList);
cbsProjectInfo.value = [
...cbsProjectInfo.value,
{
id: item.id,
name: item.projectEnterprise.cbsName,
lbType: 2,
processList: tempList
})
tempList = []
processList: processList.map((item3: any) => item3)
}
})
}else{
cbsProjectInfo.value.push({
id: item.id,
name: item.projectEnterprise.cbsName,
lbType: 2,
processList: processList
})
];
// if (processList.length > 3) {
// let tempList: any = [];
// processList.map((item3: any, i: any) => {
// tempList.push(item3);
// if ((i + 1) % 6 == 0) {
// cbsProjectInfo.value.push({
// id: item.id,
// name: item.projectEnterprise.cbsName,
// lbType: 2,
// processList: tempList
// });
// tempList = [];
// }
// });
// } else {
// cbsProjectInfo.value.push({
// id: item.id,
// name: item.projectEnterprise.cbsName,
// lbType: 2,
// processList: processList
// });
// }
});
console.log("cbsProjectInfo", cbsProjectInfo.value);
}
})
console.log('cbsProjectInfo',cbsProjectInfo.value)
};
// async function getCbsProjectInfo() {
// //Id
// await getEnterpriseIdApi().then(res => {
@ -241,15 +263,15 @@ async function getCbsProjectInfo() {
//
const leftTopMethod = async () => {
getCbsProjectInfo()
}
getCbsProjectInfo();
};
//
defineExpose({
leftTopMethod
})
});
onMounted(async () => {
getCbsProjectInfo()
})
getCbsProjectInfo();
});
</script>
<style lang="scss" scoped>
@ -314,8 +336,9 @@ onMounted( async () => {
.cbProcess {
padding-top: 5px;
height: calc(100% - 55px);
overflow-y: scroll;
// width: calc(100% - 55px);
overflow: hidden;
// overflow: hidden;
// background-color: #fff;
.pItem {
width: 85%;
@ -407,7 +430,6 @@ onMounted( async () => {
margin: -6% 30%;
}
}
}
.scroll {
height: 100%;