Merge branch 'shenzhen-dev' of http://139.9.66.234:18023/yjlHub/zhgdlarge into shenzhen-dev
This commit is contained in:
commit
f007144d33
@ -436,12 +436,17 @@ const getEnterpriseInfoList = async () => {
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
});
|
||||
console.log("获取劳务班组公司数据1", res);
|
||||
noiseList.value = res.result.records;
|
||||
valueName.value = res.result.records[0].enterpriseName;
|
||||
enterpriseId.value = res.result.records[0].id;
|
||||
getList(enterpriseId.value);
|
||||
mitts.emit("enterpriseId", enterpriseId.value);
|
||||
if(res.result.total !== '0'){
|
||||
console.log("获取劳务班组公司数据1", res);
|
||||
noiseList.value = res.result.records;
|
||||
valueName.value = res.result.records[0].enterpriseName;
|
||||
enterpriseId.value = res.result.records[0].id;
|
||||
getList(enterpriseId.value);
|
||||
mitts.emit("enterpriseId", enterpriseId.value);
|
||||
}else{
|
||||
mitts.emit("enterpriseId", '无数据');
|
||||
|
||||
}
|
||||
};
|
||||
//切换企业
|
||||
const realTimeMonitor = val => {
|
||||
|
||||
@ -221,20 +221,26 @@ const getList = async val => {
|
||||
}
|
||||
} else {
|
||||
console.log("没有数据");
|
||||
xData.value = [];
|
||||
yData.value = [];
|
||||
xData.value = [0];
|
||||
yData.value = [0];
|
||||
}
|
||||
// console.log("获取劳务班组人员数据2", res);
|
||||
horizontalChart();
|
||||
};
|
||||
onMounted(async () => {
|
||||
mitts.on("enterpriseId", e => {
|
||||
// horizontalEcharts = echarts.init(document.getElementById('chart-view'))
|
||||
// 清数据
|
||||
xData.value = [];
|
||||
yData.value = [];
|
||||
getList(e);
|
||||
});
|
||||
if(e !== '无数据' ){
|
||||
// horizontalEcharts = echarts.init(document.getElementById('chart-view'))
|
||||
// 清数据
|
||||
xData.value = [];
|
||||
yData.value = [];
|
||||
getList(e);
|
||||
}else{
|
||||
xData.value = [0];
|
||||
yData.value = [0];
|
||||
horizontalChart();
|
||||
}
|
||||
})
|
||||
});
|
||||
//
|
||||
onBeforeUnmount(async () => {
|
||||
|
||||
@ -191,7 +191,8 @@ async function getProjectWorkerList() {
|
||||
let res = await getComapnyWorkTotalListApi({
|
||||
projectSn: store.sn
|
||||
});
|
||||
if (res.result) {
|
||||
if(res.result.length !== 0){
|
||||
if (res.result) {
|
||||
res.result.forEach((item: any) => {
|
||||
companyWorkTotalData.value.push(item);
|
||||
xData.value.push(item.enterpriseName);
|
||||
@ -199,6 +200,12 @@ async function getProjectWorkerList() {
|
||||
});
|
||||
getNowData(1);
|
||||
}
|
||||
} else {
|
||||
companyWorkTotalData.value.push(0);
|
||||
xData.value.push('无数据');
|
||||
yData.value.push(0);
|
||||
draw(xData.value, yData.value)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -37,9 +37,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="notoDta" v-else>
|
||||
<img src="@/assets/images/noData.png" alt="" />
|
||||
<p>暂无数据</p>
|
||||
<div class="content" v-else>
|
||||
<div class="notoDta" >
|
||||
<img src="@/assets/images/noData.png" alt="" />
|
||||
<p>暂无数据</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -37,9 +37,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="notoDta" v-else>
|
||||
<img src="@/assets/images/noData.png" alt="" />
|
||||
<p>暂无数据</p>
|
||||
<div class="content" v-else>
|
||||
<div class="notoDta" >
|
||||
<img src="@/assets/images/noData.png" alt="" />
|
||||
<p>暂无数据</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user