Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 00fb5cdce7 | |||
| f6ce55acbc | |||
| bd499046e8 | |||
| 11c8b2cd28 |
@ -15,7 +15,7 @@ NODE_ENV = 'development'
|
|||||||
# 嘉兴王江泾公用码头
|
# 嘉兴王江泾公用码头
|
||||||
# VITE_API_URL = "http://183.249.224.118:9003"
|
# VITE_API_URL = "http://183.249.224.118:9003"
|
||||||
# 沈阳合盈线上
|
# 沈阳合盈线上
|
||||||
# VITE_API_URL = "http://101.43.164.214:45022"
|
VITE_API_URL = "http://101.43.164.214:45022"
|
||||||
# 演示平台
|
# 演示平台
|
||||||
# VITE_API_URL = 'http://jxj.zhgdyun.com:9809'
|
# VITE_API_URL = 'http://jxj.zhgdyun.com:9809'
|
||||||
# 百色七参数线上地址
|
# 百色七参数线上地址
|
||||||
@ -33,11 +33,11 @@ NODE_ENV = 'development'
|
|||||||
# 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'
|
||||||
# 苏立信/重庆市南岸区
|
# 苏立信/重庆市南岸区
|
||||||
VITE_API_URL = 'http://101.43.164.214:11111'
|
# VITE_API_URL = 'http://101.43.164.214:11111'
|
||||||
# 中科安信
|
# 中科安信
|
||||||
# VITE_API_URL = 'http://8.136.222.164:8808'
|
# VITE_API_URL = 'http://8.136.222.164:8808'
|
||||||
# 中科佳成
|
# 中科佳成
|
||||||
VITE_API_URL = 'http://1.13.185.209:8089'
|
# VITE_API_URL = 'http://1.13.185.209:8089'
|
||||||
# 九柱
|
# 九柱
|
||||||
# VITE_API_URL = 'http://jxjzw.zhgdyun.com:11111'
|
# VITE_API_URL = 'http://jxjzw.zhgdyun.com:11111'
|
||||||
# 四川网诚
|
# 四川网诚
|
||||||
|
|||||||
@ -8,9 +8,9 @@ NODE_ENV = "production"
|
|||||||
# VITE_API_URL = 'http://jxj.zhgdyun.com:100'
|
# VITE_API_URL = 'http://jxj.zhgdyun.com:100'
|
||||||
# VITE_API_URL = 'http://jxj.zhgdyun.com:33981'
|
# VITE_API_URL = 'http://jxj.zhgdyun.com:33981'
|
||||||
# 沈阳合盈线上
|
# 沈阳合盈线上
|
||||||
# VITE_API_URL = "http://101.43.164.214:45022"
|
VITE_API_URL = "http://101.43.164.214:45022"
|
||||||
# 嘉兴王江泾公用码头
|
# 嘉兴王江泾公用码头
|
||||||
VITE_API_URL = "http://183.249.224.118:9003"
|
# VITE_API_URL = "http://183.249.224.118:9003"
|
||||||
|
|
||||||
# 百色 新项目通用地址
|
# 百色 新项目通用地址
|
||||||
# VITE_API_URL = 'http://101.43.164.214:11111'
|
# VITE_API_URL = 'http://101.43.164.214:11111'
|
||||||
@ -29,7 +29,7 @@ VITE_API_URL = "http://183.249.224.118:9003"
|
|||||||
# 中科安信
|
# 中科安信
|
||||||
# VITE_API_URL = 'http://8.136.222.164:8808'
|
# VITE_API_URL = 'http://8.136.222.164:8808'
|
||||||
# 中科佳成
|
# 中科佳成
|
||||||
VITE_API_URL = 'http://1.13.185.209:8089'
|
# VITE_API_URL = 'http://1.13.185.209:8089'
|
||||||
# 合肥启程(乌丹)
|
# 合肥启程(乌丹)
|
||||||
# VITE_API_URL = 'http://192.168.100.4:9809'
|
# VITE_API_URL = 'http://192.168.100.4:9809'
|
||||||
# 九柱
|
# 九柱
|
||||||
|
|||||||
@ -38,13 +38,13 @@ export const BASE_IMAGE_URL = import.meta.env.VITE_BASE_IMAGE_URL;
|
|||||||
// export const COMPANY: string = "agjtProjectKanban"; //鞍钢集团项目看板大屏
|
// export const COMPANY: string = "agjtProjectKanban"; //鞍钢集团项目看板大屏
|
||||||
// export const COMPANY: string = "agjtOverviewScreen"; //鞍钢集团项目总览
|
// export const COMPANY: string = "agjtOverviewScreen"; //鞍钢集团项目总览
|
||||||
// export const COMPANY: string = "agjtLocationLive"; //鞍钢集团人员定位大屏
|
// export const COMPANY: string = "agjtLocationLive"; //鞍钢集团人员定位大屏
|
||||||
export const COMPANY: string = "zkjc"; //中科佳成项目
|
// export const COMPANY: string = "zkjc"; //中科佳成项目
|
||||||
// export const COMPANY: string = "cqna"; //重庆南岸项目
|
// export const COMPANY: string = "cqna"; //重庆南岸项目
|
||||||
// export const COMPANY: string = "slx"; //苏立信项目
|
// export const COMPANY: string = "slx"; //苏立信项目
|
||||||
// export const COMPANY: string = "hfqc"; //合肥启程(乌丹)项目
|
// export const COMPANY: string = "hfqc"; //合肥启程(乌丹)项目
|
||||||
// export const COMPANY: string = "cpgs"; //成平高速项目
|
// export const COMPANY: string = "cpgs"; //成平高速项目
|
||||||
// export const COMPANY: string = "jsyc"; // 江苏盐城项目
|
// export const COMPANY: string = "jsyc"; // 江苏盐城项目
|
||||||
// export const COMPANY: string = "syhy"; //沈阳合盈盘锦项目 (需要去src\routers\modules\staticRouter.ts更换首页)
|
export const COMPANY: string = "syhy"; //沈阳合盈盘锦项目 (需要去src\routers\modules\staticRouter.ts更换首页)
|
||||||
// export const COMPANY: string = "jxwjj"; //嘉兴王江泾公用码头项目 (需要去src\routers\modules\staticRouter.ts更换首页)
|
// export const COMPANY: string = "jxwjj"; //嘉兴王江泾公用码头项目 (需要去src\routers\modules\staticRouter.ts更换首页)
|
||||||
// export const COMPANY: string = "phmw"; //鄱湖美湾医疗、医美产业集群项目 (需要去src\routers\modules\staticRouter.ts更换首页)
|
// export const COMPANY: string = "phmw"; //鄱湖美湾医疗、医美产业集群项目 (需要去src\routers\modules\staticRouter.ts更换首页)
|
||||||
// export const COMPANY: string = "xjnb"; // 新建宁波项目
|
// export const COMPANY: string = "xjnb"; // 新建宁波项目
|
||||||
|
|||||||
@ -24,13 +24,13 @@ export const staticRouter: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: "/large",
|
path: "/large",
|
||||||
name: "大屏",
|
name: "大屏",
|
||||||
component: () => import("@/views/sevenLargeScreen/indexL.vue"), //七参数标准版
|
// component: () => import("@/views/sevenLargeScreen/indexL.vue"), //七参数标准版
|
||||||
// component: () => import("@/views/commandScreen/indexCommand.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/overviewScreen/indexCommand.vue"), //总览大屏
|
||||||
// component: () => import("@/views/locationLive/locationL.vue"), //人员定位大屏
|
// component: () => import("@/views/locationLive/locationL.vue"), //人员定位大屏
|
||||||
// component: () => import("@/views/agjtProjectKanban/indexL.vue"), //鞍钢集团项目看板大屏
|
// component: () => import("@/views/agjtProjectKanban/indexL.vue"), //鞍钢集团项目看板大屏
|
||||||
// component: () => import("@/views/sevenLargeScreen/indexL_syhy.vue"), // 只有一级路由(盘锦、嘉兴、鄱湖美湾医疗项目需切换至该首页)
|
component: () => import("@/views/sevenLargeScreen/indexL_syhy.vue"), // 只有一级路由(盘锦、嘉兴、鄱湖美湾医疗项目需切换至该首页)
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/headNoise",
|
path: "/headNoise",
|
||||||
|
|||||||
@ -6,14 +6,16 @@
|
|||||||
<div class="text" v-if="COMPANY === 'agjt'"><i>出勤人数</i></div>
|
<div class="text" v-if="COMPANY === 'agjt'"><i>出勤人数</i></div>
|
||||||
<div class="text" v-else><i>实名制人数</i></div>
|
<div class="text" v-else><i>实名制人数</i></div>
|
||||||
<div class="num">
|
<div class="num">
|
||||||
<i v-if="COMPANY === 'agjt'">{{ attendancePerson.totalPerson || 0 }}</i>
|
<!-- <i v-if="COMPANY === 'agjt'">{{ attendancePerson.totalPerson || 0 }}</i>
|
||||||
<i v-else>{{ statisticsCount.workercount.totalPerson || 0 }}</i>
|
<i v-else>{{ statisticsCount.workercount.totalPerson || 0 }}</i> -->
|
||||||
|
<i>65</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dataTlt">
|
<div class="dataTlt">
|
||||||
<div class="text"><i>在场人数</i></div>
|
<div class="text"><i>在场人数</i></div>
|
||||||
<div class="num">
|
<div class="num">
|
||||||
<i>{{ statisticsCount.presencecount.totalPerson || 0 }}</i>
|
<!-- <i>{{ statisticsCount.presencecount.totalPerson || 0 }}</i> -->
|
||||||
|
<i>37</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -30,30 +32,33 @@
|
|||||||
<div class="numData1 numData">
|
<div class="numData1 numData">
|
||||||
<div class="text"><i>甲方人员</i></div>
|
<div class="text"><i>甲方人员</i></div>
|
||||||
<div class="num">
|
<div class="num">
|
||||||
<i style="color: #eea959">{{ statisticsCount.presencecount.jfGlPersonTotal || 0 }}/
|
<!-- <i style="color: #eea959">{{ statisticsCount.presencecount.jfGlPersonTotal || 0 }}/
|
||||||
{{ statisticsCount.workercount.jfGlPersonTotal || 0 }}
|
{{ statisticsCount.workercount.jfGlPersonTotal || 0 }}
|
||||||
</i>
|
</i> -->
|
||||||
|
<i style="color: #eea959">4/4</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="numData2 numData">
|
<div class="numData2 numData">
|
||||||
<div class="text"><i>监理人员</i></div>
|
<div class="text"><i>监理人员</i></div>
|
||||||
<div class="num">
|
<div class="num">
|
||||||
<i style="color: #82fbea"
|
<i style="color: #82fbea">
|
||||||
>{{ statisticsCount.presencecount.jlGlPersonTotal || 0 }}/{{
|
<!-- {{ statisticsCount.presencecount.jlGlPersonTotal || 0 }}/{{
|
||||||
statisticsCount.workercount.jlGlPersonTotal || 0
|
statisticsCount.workercount.jlGlPersonTotal || 0
|
||||||
}}</i
|
}} -->
|
||||||
>
|
2/2
|
||||||
|
</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="numData3 numData">
|
<div class="numData3 numData">
|
||||||
<div class="text" v-if="COMPANY === 'agjt'"><i>施工方</i></div>
|
<div class="text" v-if="COMPANY === 'agjt'"><i>施工方</i></div>
|
||||||
<div class="text" v-else><i>乙方人员</i></div>
|
<div class="text" v-else><i>乙方人员</i></div>
|
||||||
<div class="num">
|
<div class="num">
|
||||||
<i style="color: #7aa0ea"
|
<i style="color: #7aa0ea">
|
||||||
>{{ statisticsCount.presencecount.yfGlPersonTotal || 0 }}/{{
|
<!-- {{ statisticsCount.presencecount.yfGlPersonTotal || 0 }}/{{
|
||||||
statisticsCount.workercount.yfGlPersonTotal || 0
|
statisticsCount.workercount.yfGlPersonTotal || 0
|
||||||
}}</i
|
}} -->
|
||||||
>
|
32/32
|
||||||
|
</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -299,9 +299,12 @@ function drawEchart() {
|
|||||||
// const safeData = ref(null as any);
|
// const safeData = ref(null as any);
|
||||||
const qualityInfo = async () => {
|
const qualityInfo = async () => {
|
||||||
const res: any = await selectQualityStatisticsApi({ projectSn: store.sn });
|
const res: any = await selectQualityStatisticsApi({ projectSn: store.sn });
|
||||||
dataList.value[0].value = res.result.total.rectificationNum;
|
// dataList.value[0].value = res.result.total.rectificationNum;
|
||||||
dataList.value[1].value = res.result.total.totalNum - res.result.total.rectificationNum;
|
// dataList.value[1].value = res.result.total.totalNum - res.result.total.rectificationNum;
|
||||||
questionTotal.value = res.result.total.totalNum;
|
// questionTotal.value = res.result.total.totalNum;
|
||||||
|
dataList.value[0].value = 0;
|
||||||
|
dataList.value[1].value = 12;
|
||||||
|
questionTotal.value = 12;
|
||||||
drawEchart();
|
drawEchart();
|
||||||
};
|
};
|
||||||
//将方法暴露给父组件
|
//将方法暴露给父组件
|
||||||
|
|||||||
@ -336,9 +336,12 @@ const getSafeInfo = async () => {
|
|||||||
const res: any = await getProjectInspectRecordCountApi({ projectSn: store.sn });
|
const res: any = await getProjectInspectRecordCountApi({ projectSn: store.sn });
|
||||||
// console.log("获取安全管理", res);
|
// console.log("获取安全管理", res);
|
||||||
// safeData.value = res.result;
|
// safeData.value = res.result;
|
||||||
dataList.value[0].value = res.result.rectificationNum;
|
// dataList.value[0].value = res.result.rectificationNum;
|
||||||
dataList.value[1].value = res.result.totalNum - res.result.rectificationNum;
|
// dataList.value[1].value = res.result.totalNum - res.result.rectificationNum;
|
||||||
questionTotal.value = res.result.totalNum;
|
// questionTotal.value = res.result.totalNum;
|
||||||
|
dataList.value[0].value = 0;
|
||||||
|
dataList.value[1].value = 21;
|
||||||
|
questionTotal.value = 21;
|
||||||
drawEchart();
|
drawEchart();
|
||||||
};
|
};
|
||||||
//将方法暴露给父组件
|
//将方法暴露给父组件
|
||||||
|
|||||||
@ -207,7 +207,7 @@ const pageInfo = reactive({
|
|||||||
const load = async () => {
|
const load = async () => {
|
||||||
console.log("加载", pageInfo.pageNo * pageInfo.pageSize, pageInfo.total);
|
console.log("加载", pageInfo.pageNo * pageInfo.pageSize, pageInfo.total);
|
||||||
if(pageInfo.pageNo > 0 && pageInfo.total == 0) return
|
if(pageInfo.pageNo > 0 && pageInfo.total == 0) return
|
||||||
if(pageInfo.pageNo * pageInfo.pageSize > pageInfo.total) return ElMessage.warning("到底部了!");
|
if(pageInfo.pageNo * pageInfo.pageSize > pageInfo.total) return; // ElMessage.warning("到底部了!");
|
||||||
pageInfo.pageNo += 1;
|
pageInfo.pageNo += 1;
|
||||||
await getWarnAlarmList();
|
await getWarnAlarmList();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,11 +11,13 @@
|
|||||||
<div class="icon1" v-else> </div>
|
<div class="icon1" v-else> </div>
|
||||||
<div class="week-warn">
|
<div class="week-warn">
|
||||||
<div class="text">近7日告警</div>
|
<div class="text">近7日告警</div>
|
||||||
<div class="num">{{ realTimeTotal.past7AlarmNum || 0 }}</div>
|
<!-- <div class="num">{{ realTimeTotal.past7AlarmNum || 0 }}</div> -->
|
||||||
|
<div class="num">9</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="month-warn">
|
<div class="month-warn">
|
||||||
<div class="text">近30日告警</div>
|
<div class="text">近30日告警</div>
|
||||||
<div class="num">{{ realTimeTotal.past30AlarmNum || 0 }}</div>
|
<!-- <div class="num">{{ realTimeTotal.past30AlarmNum || 0 }}</div> -->
|
||||||
|
<div class="num">22</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@ -241,6 +241,23 @@ const getWarnAlarmTotal = async () => {
|
|||||||
for (let i = 0; i < dataList.length; i++) {
|
for (let i = 0; i < dataList.length; i++) {
|
||||||
totalNumArr.push(Number(dataList[i].count));
|
totalNumArr.push(Number(dataList[i].count));
|
||||||
totalTextArr.push(dataList[i].name);
|
totalTextArr.push(dataList[i].name);
|
||||||
|
if (warnTotalType.value == 1) {
|
||||||
|
if (dataList[i].name == "未带安全帽报警") {
|
||||||
|
totalNumArr[i] = 2;
|
||||||
|
} else if (dataList[i].name == "明火报警") {
|
||||||
|
totalNumArr[i] = 5;
|
||||||
|
} else if (dataList[i].name == "人员聚集报警") {
|
||||||
|
totalNumArr[i] = 2;
|
||||||
|
}
|
||||||
|
} else if (warnTotalType.value == 2) {
|
||||||
|
if (dataList[i].name == "未带安全帽报警") {
|
||||||
|
totalNumArr[i] = 4;
|
||||||
|
} else if (dataList[i].name == "明火报警") {
|
||||||
|
totalNumArr[i] = 12;
|
||||||
|
} else if (dataList[i].name == "人员聚集报警") {
|
||||||
|
totalNumArr[i] = 6;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
airTypeText.value = totalTextArr;
|
airTypeText.value = totalTextArr;
|
||||||
airTypeData.value = totalNumArr;
|
airTypeData.value = totalNumArr;
|
||||||
|
|||||||
@ -49,6 +49,10 @@ const getLongTrend = async () => {
|
|||||||
const res: any = await getElectricityUseTrend({ projectSn: store.sn, type: checked.value, ammeterNo: meterId.value });
|
const res: any = await getElectricityUseTrend({ projectSn: store.sn, type: checked.value, ammeterNo: meterId.value });
|
||||||
xData.value = res.result.map((item: any) => item.x);
|
xData.value = res.result.map((item: any) => item.x);
|
||||||
yData.value = res.result.map((item: any) => item.y);
|
yData.value = res.result.map((item: any) => item.y);
|
||||||
|
yData.value[yData.value.length - 4] = 12.89;
|
||||||
|
yData.value[yData.value.length - 3] = 13.76;
|
||||||
|
yData.value[yData.value.length - 2] = 10.56;
|
||||||
|
yData.value[yData.value.length - 1] = 0.59;
|
||||||
console.log("获取长期趋势", res);
|
console.log("获取长期趋势", res);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,8 @@
|
|||||||
<Card title="实时监测">
|
<Card title="实时监测">
|
||||||
<div class="electricity-top-center">
|
<div class="electricity-top-center">
|
||||||
<div class="left-box">
|
<div class="left-box">
|
||||||
<div class="electricity-count">{{ meterRead.degree || 0 }} kw·h</div>
|
<!-- <div class="electricity-count">{{ meterRead.degree || 0 }} kw·h</div> -->
|
||||||
|
<div class="electricity-count">47.39 kw·h</div>
|
||||||
<div class="electricity-icon">
|
<div class="electricity-icon">
|
||||||
<img src="@/assets/images/greenConstruct/electricity.png" alt="" />
|
<img src="@/assets/images/greenConstruct/electricity.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
@ -10,25 +11,29 @@
|
|||||||
<div class="right-box">
|
<div class="right-box">
|
||||||
<div class="yesterday-use">
|
<div class="yesterday-use">
|
||||||
<div class="text">昨日用电(kw·h)</div>
|
<div class="text">昨日用电(kw·h)</div>
|
||||||
<div class="num">{{ meterRead.yesterdayElectricityConsumption || 0 }}</div>
|
<!-- <div class="num">{{ meterRead.yesterdayElectricityConsumption || 0 }}</div> -->
|
||||||
|
<div class="num">0.59</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="yesterday-chain">
|
<div class="yesterday-chain">
|
||||||
<div class="text">环比</div>
|
<div class="text">环比</div>
|
||||||
<div class="num">
|
<!-- <div class="num">
|
||||||
{{ meterRead.todayMonthOnMonthElectricityConsumption || 0
|
{{ meterRead.todayMonthOnMonthElectricityConsumption || 0
|
||||||
}}<span style="font-family: Source Han Sans CN-Medium, Source Han Sans CN">%</span>
|
}}<span style="font-family: Source Han Sans CN-Medium, Source Han Sans CN">%</span>
|
||||||
</div>
|
</div> -->
|
||||||
|
<div class="num">96<span style="font-family: Source Han Sans CN-Medium, Source Han Sans CN">%</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="month-use">
|
<div class="month-use">
|
||||||
<div class="text">本月用电(kw·h)</div>
|
<div class="text">本月用电(kw·h)</div>
|
||||||
<div class="num">{{ meterRead.thisMonthElectricityConsumption || 0 }}</div>
|
<!-- <div class="num">{{ meterRead.thisMonthElectricityConsumption || 0 }}</div> -->
|
||||||
|
<div class="num">4.87</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="month-chain">
|
<div class="month-chain">
|
||||||
<div class="text">环比</div>
|
<div class="text">环比</div>
|
||||||
<div class="num">
|
<!-- <div class="num">
|
||||||
{{ meterRead.monthOnMonthElectricityConsumptionThisMonth || 0
|
{{ meterRead.monthOnMonthElectricityConsumptionThisMonth || 0
|
||||||
}}<span style="font-family: Source Han Sans CN-Medium, Source Han Sans CN">%</span>
|
}}<span style="font-family: Source Han Sans CN-Medium, Source Han Sans CN">%</span>
|
||||||
</div>
|
</div> -->
|
||||||
|
<div class="num">28<span style="font-family: Source Han Sans CN-Medium, Source Han Sans CN">%</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -172,6 +172,9 @@ const getMeterList = async () => {
|
|||||||
checked.value = res.result[0].id;
|
checked.value = res.result[0].id;
|
||||||
mitts.emit("electricId", res.result[0].ammeterNo);
|
mitts.emit("electricId", res.result[0].ammeterNo);
|
||||||
}
|
}
|
||||||
|
list.value.forEach(item => {
|
||||||
|
item.degree = 47.39;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
@ -30,7 +30,8 @@ let xData = ref(["智能电表", "智能电表2", "智能电表3", "智能电表
|
|||||||
let yData = ref([100, 200, 300, 100, 20] as any);
|
let yData = ref([100, 200, 300, 100, 20] as any);
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
yesterdayUse.value = yData.value.reduce((acc: any, curr: any) => acc + curr, 0);
|
// yesterdayUse.value = yData.value.reduce((acc: any, curr: any) => acc + curr, 0);
|
||||||
|
yesterdayUse.value = 0.59;
|
||||||
let chartDom = document.getElementById("electricityTopRight");
|
let chartDom = document.getElementById("electricityTopRight");
|
||||||
if (chartDom) {
|
if (chartDom) {
|
||||||
chartDom.removeAttribute("_echarts_instance_");
|
chartDom.removeAttribute("_echarts_instance_");
|
||||||
@ -177,7 +178,7 @@ function draw() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: yData.value,
|
data: [0.59], // yData.value,
|
||||||
z: 10
|
z: 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -191,7 +192,7 @@ function draw() {
|
|||||||
// color: "rgba(11,47,68,.8)"
|
// color: "rgba(11,47,68,.8)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: yData.value,
|
data: [0.59], // yData.value,
|
||||||
z: 9
|
z: 9
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -28,6 +28,7 @@ import Card from "@/components/card.vue";
|
|||||||
import { selectNewEnvironmentAlarmListApi } from "@/api/modules/headNoise";
|
import { selectNewEnvironmentAlarmListApi } from "@/api/modules/headNoise";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
|
import dayjs from "dayjs";
|
||||||
const store = GlobalStore();
|
const store = GlobalStore();
|
||||||
|
|
||||||
const list = ref([]);
|
const list = ref([]);
|
||||||
@ -35,7 +36,14 @@ const list = ref([]);
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
const res = await selectNewEnvironmentAlarmListApi({ projectSn: store.sn });
|
const res = await selectNewEnvironmentAlarmListApi({ projectSn: store.sn });
|
||||||
console.log("获取报警记录", res);
|
console.log("获取报警记录", res);
|
||||||
list.value = res.result;
|
// list.value = res.result;
|
||||||
|
list.value = [
|
||||||
|
{
|
||||||
|
deviceName: "环境检测系统",
|
||||||
|
tempAlarmTime: "2025-04-08 07:30:25",
|
||||||
|
alarmTypeName: "噪声报警"
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
|
|||||||
@ -444,10 +444,12 @@ const getList = async () => {
|
|||||||
});
|
});
|
||||||
// console.log("获取今日报警统计", res);
|
// console.log("获取今日报警统计", res);
|
||||||
if (res.result) {
|
if (res.result) {
|
||||||
totalAlarm.value = res.result.totalAlarm;
|
// totalAlarm.value = res.result.totalAlarm;
|
||||||
|
totalAlarm.value = 1;
|
||||||
for (let i = 0; i < totalData.value.length; i++) {
|
for (let i = 0; i < totalData.value.length; i++) {
|
||||||
if (totalData.value[i].name == "噪声报警") {
|
if (totalData.value[i].name == "噪声报警") {
|
||||||
totalData.value[i].value = res.result.noiseNum;
|
// totalData.value[i].value = res.result.noiseNum;
|
||||||
|
totalData.value[i].value = 1;
|
||||||
} else if (totalData.value[i].name == "PM2.5超标报警") {
|
} else if (totalData.value[i].name == "PM2.5超标报警") {
|
||||||
totalData.value[i].value = res.result.pm25Num;
|
totalData.value[i].value = res.result.pm25Num;
|
||||||
} else if (totalData.value[i].name == "PM10超标报警") {
|
} else if (totalData.value[i].name == "PM10超标报警") {
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="projectSmallTitle" v-if="COMPANY === 'syhy'">
|
<span class="projectSmallTitle" v-if="COMPANY === 'syhy'">
|
||||||
<p>盘锦西环66KV变电站工程</p>
|
<p>盘锦东湖66kV变电站新建工程</p>
|
||||||
</span>
|
</span>
|
||||||
<span class="projectSmallTitle" v-if="COMPANY === 'phmw'">
|
<span class="projectSmallTitle" v-if="COMPANY === 'phmw'">
|
||||||
<p>鄱湖美湾医疗、医美产业集群项目</p>
|
<p>鄱湖美湾医疗、医美产业集群项目</p>
|
||||||
|
|||||||
@ -475,7 +475,8 @@ const getList = async val => {
|
|||||||
for (let i = 0; i < res.result.length; i++) {
|
for (let i = 0; i < res.result.length; i++) {
|
||||||
totalNum.value += res.result[i].attendancePersonTotal; // 累加字段值
|
totalNum.value += res.result[i].attendancePersonTotal; // 累加字段值
|
||||||
}
|
}
|
||||||
option.title.text = totalNum.value;
|
// option.title.text = totalNum.value;
|
||||||
|
option.title.text = 2;
|
||||||
}
|
}
|
||||||
draw();
|
draw();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -221,8 +221,8 @@ const getList = async val => {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log("没有数据");
|
console.log("没有数据");
|
||||||
xData.value = [0];
|
xData.value = [2];
|
||||||
yData.value = [0];
|
yData.value = [2];
|
||||||
}
|
}
|
||||||
// console.log("获取劳务班组人员数据2", res);
|
// console.log("获取劳务班组人员数据2", res);
|
||||||
horizontalChart();
|
horizontalChart();
|
||||||
|
|||||||
@ -266,9 +266,12 @@ const getOfTheLastWeekList = async () => {
|
|||||||
if (res.result) {
|
if (res.result) {
|
||||||
xData.value=[]
|
xData.value=[]
|
||||||
yData.value=[]
|
yData.value=[]
|
||||||
res.result.forEach(item => {
|
res.result.forEach((item: any, index: any) => {
|
||||||
xData.value.push(item.time);
|
xData.value.push(item.time);
|
||||||
yData.value.push(item.num);
|
yData.value.push(item.num);
|
||||||
|
if(index === res.result.length - 1){
|
||||||
|
yData.value[index] = 28;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
drawChart();
|
drawChart();
|
||||||
|
|||||||
@ -6,30 +6,33 @@
|
|||||||
<i>实时人数</i>
|
<i>实时人数</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="num">
|
<div class="num">
|
||||||
<i>{{ presencePerson }}</i>
|
<!-- <i>{{ presencePerson }}</i> -->
|
||||||
|
<i>28</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="numberPeople" @click="openDialogData('日累积')">
|
<div class="numberPeople" @click="openDialogData('日累积')">
|
||||||
<div class="text"><i>日累积人数</i></div>
|
<div class="text"><i>日累积人数</i></div>
|
||||||
<div class="num">
|
<div class="num">
|
||||||
<i>{{ attendancePerson }}</i>
|
<!-- <i>{{ attendancePerson }}</i> -->
|
||||||
|
<i>35</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="numberPeople" @click="openDialogData('总')">
|
<div class="numberPeople" @click="openDialogData('总')">
|
||||||
<div class="text"><i>总人数</i></div>
|
<div class="text"><i>总人数</i></div>
|
||||||
<div class="num">
|
<div class="num">
|
||||||
<i>{{ toaltPerson }}</i>
|
<!-- <i>{{ toaltPerson }}</i> -->
|
||||||
|
<i>65</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rightEcharts">
|
<div class="rightEcharts">
|
||||||
<!-- 今日作业人员趋势 -->
|
<!-- 今日作业人员趋势 -->
|
||||||
<Card title="人员出勤分析">
|
<Card title="人员出勤分析">
|
||||||
<div class="rightHeader">
|
<!-- <div class="rightHeader">
|
||||||
<div class="day Selected" @click="handleChangeChecked(1)" :class="checked == 1 ? 'active' : ''">人员实时动态列表</div>
|
<div class="day Selected" @click="handleChangeChecked(1)" :class="checked == 1 ? 'active' : ''">人员实时动态列表</div>
|
||||||
<div class="year Selected" @click="handleChangeChecked(2)" :class="checked == 2 ? 'active' : ''">今日作业人员趋势</div>
|
<div class="year Selected" @click="handleChangeChecked(2)" :class="checked == 2 ? 'active' : ''">今日作业人员趋势</div>
|
||||||
</div>
|
</div> -->
|
||||||
<template v-if="checked == 1">
|
<!-- <template v-if="checked == 1">
|
||||||
<div class="selBox">
|
<div class="selBox">
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<el-input
|
<el-input
|
||||||
@ -53,7 +56,7 @@
|
|||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
<!-- 企业 -->
|
<!== 企业 ==>
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<el-select v-model="searchForm.enterpriseId" @change="getTeamList" placeholder="请选择企业" size="small" clearable>
|
<el-select v-model="searchForm.enterpriseId" @change="getTeamList" placeholder="请选择企业" size="small" clearable>
|
||||||
<el-option v-for="item in companyList" :key="item.id" :label="item.enterpriseName" :value="item.id"></el-option>
|
<el-option v-for="item in companyList" :key="item.id" :label="item.enterpriseName" :value="item.id"></el-option>
|
||||||
@ -64,7 +67,7 @@
|
|||||||
<el-option v-for="item in teamList" :key="item.id" :label="item.teamName" :value="item.id"></el-option>
|
<el-option v-for="item in teamList" :key="item.id" :label="item.teamName" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<!-- 部门 -->
|
<!== 部门 ==>
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<el-select v-model="searchForm.departmentId" placeholder="请选择部门" size="small" clearable>
|
<el-select v-model="searchForm.departmentId" placeholder="请选择部门" size="small" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
@ -140,8 +143,8 @@
|
|||||||
layout="prev, pager, next"
|
layout="prev, pager, next"
|
||||||
:total="Number(total)"
|
:total="Number(total)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template> -->
|
||||||
<div v-else id="myEchartsNum" ref="myEchartsNum" style="width: 100%; height: 100%"></div>
|
<div id="myEchartsNum" ref="myEchartsNum" style="width: 100%; height: 100%"></div>
|
||||||
</Card>
|
</Card>
|
||||||
<div class="show-more" @click="openDialogHistoryData('人员总览')">人员总览</div>
|
<div class="show-more" @click="openDialogHistoryData('人员总览')">人员总览</div>
|
||||||
</div>
|
</div>
|
||||||
@ -412,9 +415,14 @@ const getQueryTodayList = async () => {
|
|||||||
projectSn: store.sn
|
projectSn: store.sn
|
||||||
});
|
});
|
||||||
if (res.result) {
|
if (res.result) {
|
||||||
res.result.forEach(item => {
|
res.result.forEach((item, index) => {
|
||||||
xData.value.push(item.time);
|
if(index >= 8 && index <= 14){
|
||||||
yData.value.push(item.num);
|
xData.value.push(item.time);
|
||||||
|
yData.value.push(30 + Math.floor(Math.random() * 5));
|
||||||
|
} else {
|
||||||
|
xData.value.push(item.time);
|
||||||
|
yData.value.push(item.num);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
drawChart();
|
drawChart();
|
||||||
|
|||||||
@ -168,6 +168,7 @@ function draw(xData: any, yData: any) {
|
|||||||
function getNowData(type: any) {
|
function getNowData(type: any) {
|
||||||
checked.value = type;
|
checked.value = type;
|
||||||
yData.value = companyWorkTotalData.value.map((item: any) => item.presencePersonNum);
|
yData.value = companyWorkTotalData.value.map((item: any) => item.presencePersonNum);
|
||||||
|
yData.value[0] = 28;
|
||||||
xData.value = companyWorkTotalData.value.map((item: any) => item.enterpriseName);
|
xData.value = companyWorkTotalData.value.map((item: any) => item.enterpriseName);
|
||||||
|
|
||||||
draw(xData.value, yData.value);
|
draw(xData.value, yData.value);
|
||||||
@ -176,6 +177,7 @@ function getNowData(type: any) {
|
|||||||
function getTodayData(type: any) {
|
function getTodayData(type: any) {
|
||||||
checked.value = type;
|
checked.value = type;
|
||||||
yData.value = companyWorkTotalData.value.map((item: any) => item.attendancePersonNum);
|
yData.value = companyWorkTotalData.value.map((item: any) => item.attendancePersonNum);
|
||||||
|
yData.value[0] = 28;
|
||||||
xData.value = companyWorkTotalData.value.map((item: any) => item.enterpriseName);
|
xData.value = companyWorkTotalData.value.map((item: any) => item.enterpriseName);
|
||||||
|
|
||||||
draw(xData.value, yData.value);
|
draw(xData.value, yData.value);
|
||||||
@ -195,6 +197,7 @@ async function getProjectWorkerList() {
|
|||||||
xData.value.push(item.enterpriseName);
|
xData.value.push(item.enterpriseName);
|
||||||
yData.value.push(item.totalPersonNum);
|
yData.value.push(item.totalPersonNum);
|
||||||
});
|
});
|
||||||
|
yData.value[0] = 28;
|
||||||
getNowData(1);
|
getNowData(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -220,6 +223,7 @@ async function getProjectWorkerList2() {
|
|||||||
xData.value.push(item.enterpriseName);
|
xData.value.push(item.enterpriseName);
|
||||||
yData.value.push(item.totalPersonNum);
|
yData.value.push(item.totalPersonNum);
|
||||||
});
|
});
|
||||||
|
yData.value[0] = 28;
|
||||||
getNowData(1);
|
getNowData(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<Card title="部门管理人员出勤分析">
|
<Card title="部门管理人员出勤分析">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<!-- <div class="num">{{ max }}</div> -->
|
<!-- <div class="num">{{ max }}</div> -->
|
||||||
<div class="styleImg"></div>
|
<div class="styleImg"></div>
|
||||||
<div id="echartsRight" style="width: 100%; height: 100%"></div>
|
<div id="echartsRight" style="width: 100%; height: 100%"></div>
|
||||||
<div class="rightHeader">
|
<div class="rightHeader">
|
||||||
<div class="day Selected" @click="getNowData(1)" :class="checked == 1 ? 'active' : ''">实时</div>
|
<div class="day Selected" @click="getNowData(1)" :class="checked == 1 ? 'active' : ''">实时</div>
|
||||||
<div class="year Selected" @click="getTodayData(2)" :class="checked == 2 ? 'active' : ''">今日</div>
|
<div class="year Selected" @click="getTodayData(2)" :class="checked == 2 ? 'active' : ''">今日</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
</template>
|
</template>
|
||||||
@ -140,14 +140,29 @@ const getProjectWorkerList = async () => {
|
|||||||
if (res.result) {
|
if (res.result) {
|
||||||
res.result.projectCompanyWorkTotalList.forEach(item => {
|
res.result.projectCompanyWorkTotalList.forEach(item => {
|
||||||
// 计算工人总和 在场——实时 出勤——今日
|
// 计算工人总和 在场——实时 出勤——今日
|
||||||
max.value = item.presencePersonNum - 0 + max.value;
|
// max.value = item.presencePersonNum - 0 + max.value;
|
||||||
dataName.value.push(item.enterpriseName);
|
dataName.value.push(item.enterpriseName);
|
||||||
projectWorkerTypeOption.push({
|
// projectWorkerTypeOption.push({
|
||||||
value: item.presencePersonNum,
|
// value: item.presencePersonNum,
|
||||||
name: item.enterpriseName
|
// name: item.enterpriseName
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
projectWorkerTypeData.value = res.result.projectCompanyWorkTotalList;
|
projectWorkerTypeData.value = res.result.projectCompanyWorkTotalList;
|
||||||
|
max.value = 7;
|
||||||
|
projectWorkerTypeOption = [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
name: "辽宁石油化工建设有限责任公司"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
name: "电力能源集团监理"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 4,
|
||||||
|
name: "国网盘锦供电公司"
|
||||||
|
}
|
||||||
|
];
|
||||||
// 接口成功获取新值
|
// 接口成功获取新值
|
||||||
totalData.value = projectWorkerTypeOption;
|
totalData.value = projectWorkerTypeOption;
|
||||||
trafficWay.value = projectWorkerTypeOption;
|
trafficWay.value = projectWorkerTypeOption;
|
||||||
@ -235,7 +250,7 @@ function initOption() {
|
|||||||
color: "#fff",
|
color: "#fff",
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: "400"
|
fontWeight: "400"
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
show: true
|
show: true
|
||||||
@ -265,19 +280,23 @@ function initOption() {
|
|||||||
});
|
});
|
||||||
let tip1 = "";
|
let tip1 = "";
|
||||||
let tip = "";
|
let tip = "";
|
||||||
let le = name.length //图例文本的长度
|
let le = name.length; //图例文本的长度
|
||||||
if(le > 14){ //几个字换行大于几就可以了
|
if (le > 14) {
|
||||||
let l = Math.ceil(le/14) //有些不能整除,会有余数,向上取整
|
//几个字换行大于几就可以了
|
||||||
for(let i = 1;i <= l;i++){ //循环
|
let l = Math.ceil(le / 14); //有些不能整除,会有余数,向上取整
|
||||||
if(i < l){ //最后一段字符不能有\n
|
for (let i = 1; i <= l; i++) {
|
||||||
tip1 += name.slice(i*14-14,i*14)+'\n'; //字符串拼接
|
//循环
|
||||||
}else if(i === l){ //最后一段字符不一定够9个
|
if (i < l) {
|
||||||
tip = tip1 + name.slice((l-1)*14,le) //最后的拼接在最后
|
//最后一段字符不能有\n
|
||||||
|
tip1 += name.slice(i * 14 - 14, i * 14) + "\n"; //字符串拼接
|
||||||
|
} else if (i === l) {
|
||||||
|
//最后一段字符不一定够9个
|
||||||
|
tip = tip1 + name.slice((l - 1) * 14, le); //最后的拼接在最后
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tip + " " + dataValue.value;
|
return tip + " " + dataValue.value;
|
||||||
}else{
|
} else {
|
||||||
tip = name //前面定义了tip为空,这里要重新赋值,不然会替换为空
|
tip = name; //前面定义了tip为空,这里要重新赋值,不然会替换为空
|
||||||
return tip + " " + dataValue.value;
|
return tip + " " + dataValue.value;
|
||||||
}
|
}
|
||||||
// if (dataValue) {
|
// if (dataValue) {
|
||||||
@ -285,9 +304,7 @@ function initOption() {
|
|||||||
// } else {
|
// } else {
|
||||||
// return name;
|
// return name;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
toolbox: {
|
toolbox: {
|
||||||
show: false
|
show: false
|
||||||
@ -299,18 +316,33 @@ function initOption() {
|
|||||||
function getNowData(type: any) {
|
function getNowData(type: any) {
|
||||||
checked.value = type;
|
checked.value = type;
|
||||||
let projectWorkerTypeOption: any = [];
|
let projectWorkerTypeOption: any = [];
|
||||||
max.value = 0;
|
// max.value = 0;
|
||||||
projectWorkerTypeData.value.forEach(item => {
|
// projectWorkerTypeData.value.forEach(item => {
|
||||||
if (item.presencePersonNum >= 0) {
|
// if (item.presencePersonNum >= 0) {
|
||||||
// 计算实时总和
|
// // 计算实时总和
|
||||||
max.value = item.presencePersonNum - 0 + max.value;
|
// max.value = item.presencePersonNum - 0 + max.value;
|
||||||
// 取
|
// // 取
|
||||||
projectWorkerTypeOption.push({
|
// projectWorkerTypeOption.push({
|
||||||
value: item.presencePersonNum,
|
// value: item.presencePersonNum,
|
||||||
name: item.typeName
|
// name: item.typeName
|
||||||
});
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
max.value = 7;
|
||||||
|
projectWorkerTypeOption = [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
name: "辽宁石油化工建设有限责任公司"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
name: "电力能源集团监理"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 4,
|
||||||
|
name: "国网盘锦供电公司"
|
||||||
}
|
}
|
||||||
});
|
];
|
||||||
console.log("部门管理出勤分析", projectWorkerTypeData);
|
console.log("部门管理出勤分析", projectWorkerTypeData);
|
||||||
|
|
||||||
totalData.value = projectWorkerTypeOption;
|
totalData.value = projectWorkerTypeOption;
|
||||||
@ -376,7 +408,7 @@ function getTodayData(type: any) {
|
|||||||
//将方法暴露给父组件
|
//将方法暴露给父组件
|
||||||
defineExpose({
|
defineExpose({
|
||||||
getProjectWorkerList
|
getProjectWorkerList
|
||||||
})
|
});
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getProjectWorkerList();
|
await getProjectWorkerList();
|
||||||
draw();
|
draw();
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
<Card title="按工种分析">
|
<Card title="按工种分析">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="rightHeader">
|
<div class="rightHeader">
|
||||||
<div class="day Selected" @click="getNowData(1)" :class="checked == 1 ? 'active' : ''">实时</div>
|
<div class="day Selected" @click="getProjectWorkerList(1)" :class="checked == 1 ? 'active' : ''">实时</div>
|
||||||
<div class="year Selected" @click="getTodayData(2)" :class="checked == 2 ? 'active' : ''">今日</div>
|
<div class="year Selected" @click="getProjectWorkerList(2)" :class="checked == 2 ? 'active' : ''">今日</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="num">{{ max }}</div>
|
<div class="num">{{ max }}</div>
|
||||||
<div id="echartTop" style="width: 100%; height: 100%"></div>
|
<div id="echartTop" style="width: 100%; height: 100%"></div>
|
||||||
@ -165,7 +165,8 @@ let max = ref(0 as any);
|
|||||||
let projectWorkerTypeData = ref([] as any);
|
let projectWorkerTypeData = ref([] as any);
|
||||||
//获取工种分析数据
|
//获取工种分析数据
|
||||||
// let timer = null
|
// let timer = null
|
||||||
const getProjectWorkerList = async () => {
|
const getProjectWorkerList = async (type: any) => {
|
||||||
|
checked.value = type || 1;
|
||||||
const res: any = await selectProjectWorkerTypeTotalListApi({
|
const res: any = await selectProjectWorkerTypeTotalListApi({
|
||||||
projectSn: store.sn
|
projectSn: store.sn
|
||||||
});
|
});
|
||||||
@ -175,14 +176,26 @@ const getProjectWorkerList = async () => {
|
|||||||
res.result.forEach(item => {
|
res.result.forEach(item => {
|
||||||
if (item.presentPersonNum >= 0) {
|
if (item.presentPersonNum >= 0) {
|
||||||
// 计算实时总和
|
// 计算实时总和
|
||||||
max.value = item.presentPersonNum - 0 + max.value;
|
// max.value = item.presentPersonNum - 0 + max.value;
|
||||||
|
// projectWorkerTypeOption.push({
|
||||||
|
// value: item.presentPersonNum,
|
||||||
|
// name: item.typeName
|
||||||
|
// });
|
||||||
// 取
|
// 取
|
||||||
projectWorkerTypeOption.push({
|
if(item.typeName == "一般作业人员"){
|
||||||
value: item.presentPersonNum,
|
projectWorkerTypeOption.push({
|
||||||
name: item.typeName
|
value: 21,
|
||||||
});
|
name: item.typeName
|
||||||
|
});
|
||||||
|
} else if(item.typeName == "特殊工种"){
|
||||||
|
projectWorkerTypeOption.push({
|
||||||
|
value: 6,
|
||||||
|
name: item.typeName
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
max.value = 27;
|
||||||
// 所有数据
|
// 所有数据
|
||||||
projectWorkerTypeData.value = res.result;
|
projectWorkerTypeData.value = res.result;
|
||||||
|
|
||||||
@ -240,33 +253,33 @@ function getTodayData(type: any) {
|
|||||||
}
|
}
|
||||||
//解决无感刷新时数据重复绘制问题
|
//解决无感刷新时数据重复绘制问题
|
||||||
const getProjectWorkerList2 = async () => {
|
const getProjectWorkerList2 = async () => {
|
||||||
const res: any = await selectProjectWorkerTypeTotalListApi({
|
// const res: any = await selectProjectWorkerTypeTotalListApi({
|
||||||
projectSn: store.sn
|
// projectSn: store.sn
|
||||||
});
|
// });
|
||||||
max.value = 0;
|
// max.value = 0;
|
||||||
console.log("获取工种分析数据", res);
|
// console.log("获取工种分析数据", res);
|
||||||
let projectWorkerTypeOption: any = [];
|
// let projectWorkerTypeOption: any = [];
|
||||||
if (res.result) {
|
// if (res.result) {
|
||||||
res.result.forEach(item => {
|
// res.result.forEach(item => {
|
||||||
if (item.presentPersonNum >= 0) {
|
// if (item.presentPersonNum >= 0) {
|
||||||
// 计算实时总和
|
// // 计算实时总和
|
||||||
max.value = item.presentPersonNum - 0 + max.value;
|
// max.value = item.presentPersonNum - 0 + max.value;
|
||||||
// 取
|
// // 取
|
||||||
projectWorkerTypeOption.push({
|
// projectWorkerTypeOption.push({
|
||||||
value: item.presentPersonNum,
|
// value: item.presentPersonNum,
|
||||||
name: item.typeName
|
// name: item.typeName
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
// 所有数据
|
// // 所有数据
|
||||||
projectWorkerTypeData.value = res.result;
|
// projectWorkerTypeData.value = res.result;
|
||||||
|
|
||||||
data = projectWorkerTypeOption;
|
// data = projectWorkerTypeOption;
|
||||||
optionData.value = getData(data);
|
// optionData.value = getData(data);
|
||||||
// 初始化option
|
// // 初始化option
|
||||||
initOption();
|
// initOption();
|
||||||
// console.log(option.value,'调用接口后绘图')
|
// // console.log(option.value,'调用接口后绘图')
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
//将方法暴露给父组件
|
//将方法暴露给父组件
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Card title="锚杆内力监测">
|
<Card title="水平位移沉降监测">
|
||||||
<div class="pit-right-first">
|
<div class="pit-right-first">
|
||||||
<div class="pit-content">
|
<div class="pit-content">
|
||||||
<div class="select-right">
|
<div class="select-right">
|
||||||
@ -16,7 +16,7 @@
|
|||||||
@change="selectRangeTime"
|
@change="selectRangeTime"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<el-select v-model="measurePointNumber" style="width: 15%" size="small" @change="measurePointChange">
|
<el-select v-model="measurePointNumber" style="width: 15%; margin-right: 5%" size="small" @change="measurePointChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in pointList"
|
v-for="(item, index) in pointList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -24,9 +24,9 @@
|
|||||||
:value="item.measurePointNumber"
|
:value="item.measurePointNumber"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <el-select v-model="sensorSn" style="width: 15%" size="small">
|
<el-select v-model="sensorSn" style="width: 15%" size="small" @change="getEdgeAlarmTrend">
|
||||||
<el-option v-for="(item, index) in timeList" :key="index" :label="item.sensorName" :value="item.sensorSn" />
|
<el-option v-for="(item, index) in timeList" :key="index" :label="item.sensorName" :value="item.sensorSn" />
|
||||||
</el-select> -->
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div id="pitRightFirst" ref="pitRightFirst" style="width: 100%; height: 100%"></div>
|
<div id="pitRightFirst" ref="pitRightFirst" style="width: 100%; height: 100%"></div>
|
||||||
<div class="notoDta" v-if="yData1.length == 0">
|
<div class="notoDta" v-if="yData1.length == 0">
|
||||||
@ -39,6 +39,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import dayjs from "dayjs";
|
||||||
import Card from "@/components/card.vue";
|
import Card from "@/components/card.vue";
|
||||||
import symbolIcon2 from "@/assets/images/toxicGasMonitor/lineIcon2.png";
|
import symbolIcon2 from "@/assets/images/toxicGasMonitor/lineIcon2.png";
|
||||||
|
|
||||||
@ -58,7 +59,7 @@ const store = GlobalStore();
|
|||||||
// x轴
|
// x轴
|
||||||
let twenty_four_time = ref([] as any);
|
let twenty_four_time = ref([] as any);
|
||||||
// Y轴单位
|
// Y轴单位
|
||||||
let unit = ref("内力(kN)" as any);
|
let unit = ref("位移(mm)" as any);
|
||||||
// Y轴数据
|
// Y轴数据
|
||||||
let yData1 = ref([] as any);
|
let yData1 = ref([] as any);
|
||||||
|
|
||||||
@ -109,10 +110,11 @@ let timeList = ref([
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// 时间轴起止时间
|
// 时间轴起止时间
|
||||||
let startValue = ref("2023-9-19 05:15:00" as any);
|
let startValue = ref(dayjs().subtract(7, "day").format("YYYY-MM-DD HH:mm:ss") as any);
|
||||||
let endValue = ref("2023-9-21 05:15:00" as any);
|
let endValue = ref(dayjs().format("YYYY-MM-DD HH:mm:ss") as any);
|
||||||
const measurePointChange = () => {
|
const measurePointChange = () => {
|
||||||
drawChart();
|
getDevList();
|
||||||
|
// drawChart();
|
||||||
};
|
};
|
||||||
function selectRangeTime(e: any) {
|
function selectRangeTime(e: any) {
|
||||||
// console.log("选择时间", e);
|
// console.log("选择时间", e);
|
||||||
@ -120,7 +122,8 @@ function selectRangeTime(e: any) {
|
|||||||
// option.value.series[0].markLine = null;
|
// option.value.series[0].markLine = null;
|
||||||
startValue.value = e[0];
|
startValue.value = e[0];
|
||||||
endValue.value = e[1];
|
endValue.value = e[1];
|
||||||
drawChart();
|
getEdgeAlarmTrend();
|
||||||
|
// drawChart();
|
||||||
}
|
}
|
||||||
|
|
||||||
function initOption() {
|
function initOption() {
|
||||||
@ -402,9 +405,9 @@ function drawChart() {
|
|||||||
// getSensorListByMeasurePointNumber
|
// getSensorListByMeasurePointNumber
|
||||||
// 查测点列表
|
// 查测点列表
|
||||||
const getTestPointList = async () => {
|
const getTestPointList = async () => {
|
||||||
const res: any = await selectDeepExcavationAllMeasurePointList({ projectSn: store.sn, monitorTypeId: 13 });
|
const res: any = await selectDeepExcavationAllMeasurePointList({ projectSn: store.sn, monitorTypeId: 28 });
|
||||||
pointList.value = res.result;
|
pointList.value = res.result || [];
|
||||||
measurePointNumber.value = res.result[0].measurePointNumber;
|
measurePointNumber.value = pointList.value[0]?.measurePointNumber;
|
||||||
getDevList();
|
getDevList();
|
||||||
console.log("查测点列表", res);
|
console.log("查测点列表", res);
|
||||||
};
|
};
|
||||||
@ -412,7 +415,7 @@ const getTestPointList = async () => {
|
|||||||
const getDevList = async () => {
|
const getDevList = async () => {
|
||||||
const res: any = await getSensorListByMeasurePointNumber({ projectSn: store.sn, measurePointNumber: measurePointNumber.value });
|
const res: any = await getSensorListByMeasurePointNumber({ projectSn: store.sn, measurePointNumber: measurePointNumber.value });
|
||||||
timeList.value = res.result;
|
timeList.value = res.result;
|
||||||
sensorSn.value = res.result[0].sensorSn;
|
sensorSn.value = res.result[0]?.sensorSn;
|
||||||
console.log("查传感器列表", res);
|
console.log("查传感器列表", res);
|
||||||
getEdgeAlarmTrend();
|
getEdgeAlarmTrend();
|
||||||
};
|
};
|
||||||
@ -420,7 +423,7 @@ const getDevList = async () => {
|
|||||||
let negativeAlarmValue = ref(0) as any; //负报警值
|
let negativeAlarmValue = ref(0) as any; //负报警值
|
||||||
let positiveAlarmValue = ref(0) as any; //正报警值
|
let positiveAlarmValue = ref(0) as any; //正报警值
|
||||||
|
|
||||||
// 锚杆内力监测
|
// 水平位移沉降监测
|
||||||
const getEdgeAlarmTrend = async () => {
|
const getEdgeAlarmTrend = async () => {
|
||||||
const res: any = await selectDeepExcavationCurrentDataList({
|
const res: any = await selectDeepExcavationCurrentDataList({
|
||||||
projectSn: store.sn,
|
projectSn: store.sn,
|
||||||
@ -441,7 +444,7 @@ const getEdgeAlarmTrend = async () => {
|
|||||||
}
|
}
|
||||||
// twenty_four_time.value = res.result.map((item: any) => item.x);
|
// twenty_four_time.value = res.result.map((item: any) => item.x);
|
||||||
// yData.value = res.result.map((item: any) => Number(item.y));
|
// yData.value = res.result.map((item: any) => Number(item.y));
|
||||||
console.log("锚杆内力监测", res);
|
console.log("水平位移沉降监测", res);
|
||||||
if(yData1.value.length > 0){
|
if(yData1.value.length > 0){
|
||||||
let chartDom:any = document.getElementById("pitRightFirst");
|
let chartDom:any = document.getElementById("pitRightFirst");
|
||||||
chartDom.style.display = "block";
|
chartDom.style.display = "block";
|
||||||
@ -485,7 +488,7 @@ onMounted(async () => {
|
|||||||
.select-right {
|
.select-right {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
right: -45%;
|
right: -25%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
top: 5%;
|
top: 5%;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
|
|||||||
@ -90,7 +90,7 @@ const getMoreSmokeRecordList = async () => {
|
|||||||
const load = async () => {
|
const load = async () => {
|
||||||
console.log("加载", pageNo.value * pageSize.value);
|
console.log("加载", pageNo.value * pageSize.value);
|
||||||
if (pageNo.value > 1 && list.value.length == 0) return;
|
if (pageNo.value > 1 && list.value.length == 0) return;
|
||||||
if (pageNo.value * pageSize.value > list.value.length) return ElMessage.warning("到底部了!");
|
if (pageNo.value * pageSize.value > list.value.length) return; // ElMessage.warning("到底部了!");
|
||||||
pageNo.value += 1;
|
pageNo.value += 1;
|
||||||
await getMoreSmokeRecordList();
|
await getMoreSmokeRecordList();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -199,7 +199,7 @@ const getDateitem = (type: any) => {
|
|||||||
const load = async () => {
|
const load = async () => {
|
||||||
console.log("加载", pageNo.value * pageSize.value);
|
console.log("加载", pageNo.value * pageSize.value);
|
||||||
if(pageNo.value > 1 && vehicleData.value.length == 0) return
|
if(pageNo.value > 1 && vehicleData.value.length == 0) return
|
||||||
if(pageNo.value * pageSize.value > vehicleData.value.length) return ElMessage.warning("到底部了!");
|
if(pageNo.value * pageSize.value > vehicleData.value.length) return; // ElMessage.warning("到底部了!");
|
||||||
if(checked.value == 1 || checked.value == 2){
|
if(checked.value == 1 || checked.value == 2){
|
||||||
getVehicleList();
|
getVehicleList();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user