后台首页功能开发

dev_xd
lj7788@126.com 2025-07-10 14:54:38 +08:00
parent 423dd47d53
commit 6181678825
28 changed files with 527 additions and 120 deletions

View File

@ -713,8 +713,8 @@ export default {
}
if (this.attendanceNav == 1) {
ajax = this.$api.detail.groupByCraftTypeByAttendance
//posData.createTime = this.$dt(new Date()).format("YYYY-MM-DD");
posData.createTime = '2024-10-13'
posData.createTime = this.$dt(new Date()).format("YYYY-MM-DD");
//posData.createTime = '2024-10-13'
}
ajax(posData).then((d) => {
this.attendanceData = (d.data || []).map((it) => {

View File

@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
import org.apache.ibatis.annotations.Param;
/**
@ -77,4 +78,9 @@ public interface ProProjectInfoSubdeptsGroupMapper
public void updateUseStatusByParams(Long subDeptId);
public int updatePhone(@Param("oldUserPhone")String oldUserPhone, @Param("newUserPhone")String newUserPhone);
/**
*
*/
Long getUnitCount(Long prjId);
}

View File

@ -191,4 +191,9 @@ public interface ProProjectInfoSubdeptsUsersMapper
* @return
*/
List<ProProjectInfoSubdeptsUsers> getAttendanceAlert(@Param("projectId")Long prjId);
/**
*
*/
Long getEduCompletedCount(Long prjId);
}

View File

@ -1,6 +1,7 @@
package com.yanzhu.manage.mapper;
import com.yanzhu.manage.domain.SurProjectAttendanceGroup;
import com.yanzhu.manage.domain.SurProjectAttendanceUser;
import java.util.List;
@ -83,4 +84,9 @@ public interface SurProjectAttendanceGroupMapper
* @return
*/
public int batchSurProjectAttendanceGroup(List<SurProjectAttendanceGroup> surProjectAttendanceGroupList);
/**
*
*/
List<SurProjectAttendanceUser> getUnitCount(Long prjId);
}

View File

@ -197,4 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update pro_project_info_subdepts_group set group_leader_phone = #{newUserPhone} where group_leader_phone = #{oldUserPhone}
</update>
<select id="getUnitCount" parameterType="Long" resultType="Long">
SELECT count(1) from pro_project_info_subdepts where project_id=#{prjId} and is_del=0
</select>
</mapper>

View File

@ -468,4 +468,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by userId
order by max(ifnull(inTime,outTime)) ) att on us.id=att.userId
</select>
<select id="getEduCompletedCount" parameterType="Long" resultType="Long">
select count(1) from pro_project_info_subdepts_users where project_id=#{prjId} and edu_status='0' and is_del=0
</select>
</mapper>

View File

@ -230,4 +230,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</insert>
<select id="getUnitCount" parameterType="Long" resultMap="SurProjectAttendanceGroupResult">
select DISTINCT g.companyName,g.companyTypeId
from sur_project_attendance_group g
join attendance_cfg cfg on g.cfgId=cfg.id
where cfg.project_id=#{prjId} and g.is_del=0
</select>
</mapper>

View File

@ -11,10 +11,7 @@ import com.yanzhu.manage.domain.AttendanceUbiData;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
import com.yanzhu.manage.domain.SurProjectAttendanceData;
import com.yanzhu.manage.domain.SurProjectAttendanceUser;
import com.yanzhu.manage.service.IAttendanceUbiDataService;
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
import com.yanzhu.manage.service.ISurProjectAttendanceDataService;
import com.yanzhu.manage.service.ISurProjectAttendanceUserService;
import com.yanzhu.manage.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@ -40,9 +37,14 @@ public class LaborController extends BaseController {
@Autowired
IProProjectInfoSubdeptsUsersService proProjectInfoSubdeptsUsersService;
@Autowired
IProProjectInfoSubdeptsGroupService proGroupService;
@Autowired
ISurProjectAttendanceDataService surProjectAttendanceDataService;
@Autowired
ISurProjectAttendanceGroupService surGroupService;
/**
*
* @return
@ -119,4 +121,31 @@ public class LaborController extends BaseController {
}
}
/**
*
*/
@GetMapping("/getUnitCount/{type}/{prjId}")
public AjaxResult getUnitCount(@PathVariable("type")String type, @PathVariable("prjId") Long prjId){
if("uni".equals(type.toLowerCase())){
Long count=proGroupService.getUnitCount(prjId);
return AjaxResult.success(count);
}else{
List<SurProjectAttendanceUser> pList=surGroupService.getUnitCount(prjId);
return AjaxResult.success(pList.size());
}
}
/**
*
*/
@GetMapping("/getEduCompletedCount/{type}/{prjId}")
public AjaxResult getEduCompletedCount(@PathVariable("type")String type, @PathVariable("prjId") Long prjId){
if("uni".equals(type.toLowerCase())){
Long count=proProjectInfoSubdeptsUsersService.getEduCompletedCount(prjId);
return AjaxResult.success(count);
}else{
return AjaxResult.success(0);
}
}
}

View File

@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
/**
* Service
@ -83,4 +84,9 @@ public interface IProProjectInfoSubdeptsGroupService
* @return
*/
public int deleteProProjectInfoSubdeptsGroupById(Long id);
/**
*
*/
Long getUnitCount(Long prjId);
}

View File

@ -260,4 +260,9 @@ public interface IProProjectInfoSubdeptsUsersService
* @return
*/
List<ProProjectInfoSubdeptsUsers> getAttendanceAlert(Long prjId);
/**
*
*/
Long getEduCompletedCount(Long prjId);
}

View File

@ -2,6 +2,7 @@ package com.yanzhu.manage.service;
import com.yanzhu.manage.domain.SurProjectAttendanceGroup;
import com.yanzhu.manage.domain.SurProjectAttendanceUser;
import java.util.List;
@ -92,4 +93,9 @@ public interface ISurProjectAttendanceGroupService
* @param group
*/
public void updateJgw(SurProjectAttendanceGroup group);
/**
*
*/
List<SurProjectAttendanceUser> getUnitCount(Long prjId);
}

View File

@ -486,4 +486,12 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
{
return proProjectInfoSubdeptsGroupMapper.deleteProProjectInfoSubdeptsGroupById(id);
}
/**
*
*/
@Override
public Long getUnitCount(Long prjId) {
return proProjectInfoSubdeptsGroupMapper.getUnitCount(prjId);
}
}

View File

@ -1790,4 +1790,12 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
return proProjectInfoSubdeptsUsersMapper.getAttendanceAlert(prjId);
}
/**
*
*/
@Override
public Long getEduCompletedCount(Long prjId) {
return proProjectInfoSubdeptsUsersMapper.getEduCompletedCount(prjId);
}
}

View File

@ -3,6 +3,7 @@ package com.yanzhu.manage.service.impl;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.manage.domain.SurProjectAttendanceGroup;
import com.yanzhu.manage.domain.SurProjectAttendanceUser;
import com.yanzhu.manage.mapper.SurProjectAttendanceGroupMapper;
import com.yanzhu.manage.service.ISurProjectAttendanceGroupService;
import org.springframework.beans.factory.annotation.Autowired;
@ -159,4 +160,12 @@ public class SurProjectAttendanceGroupServiceImpl implements ISurProjectAttendan
updateSurProjectAttendanceGroup(g);
}
}
/**
*
*/
@Override
public List<SurProjectAttendanceUser> getUnitCount(Long prjId) {
return surProjectAttendanceGroupMapper.getUnitCount(prjId);
}
}

View File

@ -15,3 +15,53 @@ export function groupAttendanceLastWeek (type, prjId){
method: "get",
});
};
// 统计参建单位数量
export function getUnitCount(type, prjId) {
return request({
url: `/manage/bgscreen/labor/getUnitCount/${type}/${prjId}`,
method: "get",
});
}
export function getEduCompletedCount(type, prjId) {
return request({
url: `/manage/bgscreen/labor/getEduCompletedCount/${type}/${prjId}`,
method: "get",
});
}
//今日出勤人员信息(第三方考勤)
export function groupByComany(data) {
return request({
url: `/manage/bgscreen/attendance/groupByComany`,
data: data,
method: "post",
});
};
//在岗人员信息(第三方考勤)
export function groupAllByComany(data) {
return request({
url: `/manage/bgscreen/attendance/groupAllByComany`,
data: data,
method: "post",
});
};
//在岗人员信息
export function groupByCraftType(data) {
return request({
url: "/manage/proProjectInfoSubdeptsUsers/groupByCraftType",
method: "get",
params: data,
});
};
//今日出勤
export function groupByCraftTypeByAttendance(data) {
return request({
url: "/manage/proProjectInfoSubdeptsUsers/groupByCraftTypeByAttendance",
method: "get",
params: data,
});
};

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -2,28 +2,28 @@
<div class="app-container home">
<el-card class="nav-top">
<nav-top-unit />
<nav-top-att-worker-count />
<nav-top-att-online-count />
<nav-top-att-mgr-count />
<nav-top-att-real-count />
<nav-top-att-worker-count :attInfo="attInfo" :key="elKey" />
<nav-top-att-online-count :attInfo="attInfo" :key="elKey" />
<nav-top-att-mgr-count :attInfo="attInfo" :key="elKey" />
<nav-top-att-real-count v-if="vendorsCode == 'uni'" :attInfo="attInfo" :key="elKey" />
</el-card>
<el-card class="nav-body" style="margin-top: 20px">
<el-row>
<el-col :span="8">
<nav-attendance-rate />
<nav-attendance-rate :attInfo="attInfo" :key="elKey" />
</el-col>
<el-col :span="8">
<nav-att-laborer-rate />
<nav-att-laborer-rate :attInfo="attInfo" :key="elKey"/>
</el-col>
<el-col :span="8">
<nav-att-manager-rate />
<nav-att-manager-rate :attInfo="attInfo" :key="elKey"/>
</el-col>
<el-col :span="8">
<nav-att-laborer-trend />
</el-col>
<el-col :span="8">
<nav-att-woker-prop />
<el-col :span="8" v-if="vendorsCode == 'uni'">
<nav-att-woker-prop :attInfo="attInfo" :key="elKey"/>
</el-col>
<el-col :span="8">
<nav-att-job-type-group />
@ -48,7 +48,8 @@ import navAttLaborerTrend from "./indexCompents/navAttLaborerTrend.vue";
import navAttWokerProp from "./indexCompents/navAttWokerProp.vue";
import navAttJobTypeGroup from "./indexCompents/navAttJobTypeGroup.vue";
import NavTopAttOnlineCount from "./indexCompents/navTopAttOnlineCount.vue";
import useUserStore from "@/store/modules/user";
import { groupByComany, groupAllByComany,groupByCraftType,groupByCraftTypeByAttendance ,getEduCompletedCount} from "@/api/manage/labor.js";
export default {
components: {
navTopAttMgrCount,
@ -64,6 +65,131 @@ export default {
navAttJobTypeGroup,
NavTopAttOnlineCount,
},
data() {
return {
currentPrjId: null,
currentComId: null,
vendorsCode: "",
attInfo: null,
elKey: 0,
};
},
mounted() {
this.userStore = useUserStore();
this.currentPrjId = this.userStore.currentPrjId;
this.currentComId = this.userStore.currentComId;
this.vendorsCode = this.userStore.vendorsCode;
if (this.vendorsCode == "jgw") {
this.vendorsCode = "uni";
}
this.loadAttInfo(); //
},
methods: {
loadAttInfo() {
if (this.vendorsCode != "uni") {
this.loadJhAttendanceData();
} else {
this.loadUniAttendanceData();
}
},
loadUniAttendanceData(){
let data={
comId:this.currentComId,
projectId:this.currentPrjId
};
let ajax=[];
ajax.push(groupByCraftTypeByAttendance({...data,createTime:this.$dt(new Date()).format("YYYY-MM-DD")}))
ajax.push(groupByCraftType(data));
ajax.push(getEduCompletedCount(this.vendorsCode,this.currentPrjId))
Promise.all(ajax).then(res=>{
let tmps = res[0].data || [];
let obj = {
job: {
//
total: 0,
mgr: 0,
worker: 0,
},
att: {
//
total: 0,
mgr: 0,
worker: 0,
},
edu:0
};
tmps.forEach(d=>{
let cnt=(d.id||0)*1
obj.att.total+=cnt
if(d.createBy=="管理人员"){
obj.att.mgr+=cnt
}else{
obj.att.worker+=cnt
}
});
tmps = res[1].data || [];
tmps.forEach(d=>{
let cnt=(d.id||0)*1
obj.job.total+=cnt
if(d.createBy=="管理人员"){
obj.job.mgr+=cnt
}else{
obj.job.worker+=cnt
}
})
obj.edu=res[2].data||0;
this.attInfo = obj;
this.elKey++;
});
},
loadJhAttendanceData() {
let ajax = [];
let data = {
projectId: this.currentPrjId,
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD"),
};
ajax.push(groupByComany({ ...data, id: 1 }));
ajax.push(groupAllByComany({ ...data, id: 0 }));
Promise.all(ajax).then((res) => {
let tmps = res[0].data || [];
let obj = {
job: {
//
total: 0,
mgr: 0,
worker: 0,
},
att: {
//
total: 0,
mgr: 0,
worker: 0,
},
};
tmps.forEach((d) => {
let cnt = d.id * 1;
obj.att.total += cnt;
if (["1"].includes(d.companyTypeId)) {
obj.att.mgr += cnt;
} else {
obj.att.worker += cnt;
}
});
tmps = res[1].data || [];
tmps.forEach((d) => {
let cnt = d.id * 1;
obj.job.total += cnt;
if (["1"].includes(d.companyTypeId)) {
obj.job.mgr += cnt;
} else {
obj.job.worker += cnt;
}
});
this.attInfo = obj;
this.elKey++;
});
},
},
};
</script>
@ -129,6 +255,23 @@ export default {
justify-content: center;
}
}
.no-data {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.svg-icon {
width: 100px;
height: 100px;
fill: #999;
}
div {
color: #999;
font-size: 14px;
}
}
}
}
}

View File

@ -1,9 +1,13 @@
<template>
<div class="index-nav-body">
<div class="index-nav-body-title">劳务人员工种分布</div>
<div class="chart-content">
<div class="chart-content" v-if="chartData.length>0">
<my-chart :key="elKey" ref="chart" id="navAttJobTypeGroupChart" width="100%" height="100%" :render="renderChart" />
</div>
<div class="no-data" v-if="chartData.length==0">
<svg-icon icon-class="nodata"/>
<div>暂无数据</div>
</div>
</div>
</template>
@ -29,7 +33,9 @@ export default {
this.currentPrjId = this.userStore.currentPrjId;
this.currentComId = this.userStore.currentComId;
this.vendorsCode = this.userStore.vendorsCode;
console.log(this.userStore);
if(this.vendorsCode=="jgw"){
this.vendorsCode="uni"
}
this.init();
},
methods: {
@ -126,7 +132,7 @@ export default {
});
this.elKey++;
});
}
},
},
};
</script>

View File

@ -1,11 +1,13 @@
<template>
<div class="index-nav-body">
<div class="index-nav-body-title">
劳务人员出勤率
</div>
<div class="chart-content">
<div class="index-nav-body-title">劳务人员出勤率</div>
<div class="chart-content" v-if="chartData.length > 0">
<my-chart ref="chart" id="navAttLaborerRateChart" width="100%" height="100%" :render="renderChart" />
</div>
<div class="no-data" v-if="chartData.length == 0">
<svg-icon icon-class="nodata" />
<div>暂无数据</div>
</div>
</div>
</template>
@ -15,9 +17,17 @@ export default {
components: {
MyChart,
},
props: {
attInfo: {
type: Object,
default: () => {
return null;
},
},
},
data() {
return {
chartData:[]
chartData: [],
};
},
mounted() {
@ -37,7 +47,7 @@ export default {
orient: "horizontal",
left: "center",
top: "10",
data:this.chartData.map(d=>d.name),
data: this.chartData.map((d) => d.name),
textStyle: {
color: "#444",
fontSize: 12,
@ -79,15 +89,22 @@ export default {
},
init() {
setTimeout(() => {
this.chartData=[{
let total = this.attInfo ? this.attInfo.job.worker : 0;
let totalAtt = this.attInfo ? this.attInfo.att.worker : 0;
this.chartData = [
{
name: "出勤人数",
value:33
},{
value: totalAtt,
},
{
name: "未出勤人数",
value:22
}]
value: total - totalAtt,
},
];
if (this.$refs.chart) {
this.$refs.chart.reLoad();
}, 1000);
}
}, 400);
},
},
};

View File

@ -1,9 +1,13 @@
<template>
<div class="index-nav-body">
<div class="index-nav-body-title">劳务人员出勤趋势图</div>
<div class="chart-content">
<div class="chart-content" v-if="sum>0">
<my-chart ref="chart" id="navAttLaborerTrendChart" width="100%" height="100%" :render="renderChart" />
</div>
<div class="no-data" v-if="sum==0">
<svg-icon icon-class="nodata"/>
<div>暂无数据</div>
</div>
</div>
</template>
<script>
@ -21,6 +25,7 @@ export default {
currentPrjId: null,
currentComId: null,
vendorsCode: "",
sum:0,
};
},
mounted() {
@ -28,6 +33,9 @@ export default {
this.currentPrjId = this.userStore.currentPrjId;
this.currentComId = this.userStore.currentComId;
this.vendorsCode = this.userStore.vendorsCode;
if(this.vendorsCode=="jgw"){
this.vendorsCode="uni"
}
this.init();
},
methods: {
@ -96,7 +104,9 @@ export default {
},
init() {
groupAttendanceLastWeek(this.vendorsCode, this.currentPrjId).then((d) => {
this.sum=0;
this.weekData = (d.data || []).map((it) => {
this.sum+=it.cnt;
return {
name: it.dt.substring(5).replace("-", "."),
value: it.cnt,

View File

@ -1,11 +1,13 @@
<template>
<div class="index-nav-body">
<div class="index-nav-body-title">
管理人员出勤率
</div>
<div class="chart-content">
<div class="index-nav-body-title">管理人员出勤率</div>
<div class="chart-content" v-if="chartData.length > 0">
<my-chart ref="chart" id="navAttManagerRateChart" width="100%" height="100%" :render="renderChart" />
</div>
<div class="no-data" v-if="chartData.length == 0">
<svg-icon icon-class="nodata" />
<div>暂无数据</div>
</div>
</div>
</template>
<script>
@ -13,10 +15,18 @@ import MyChart from "@/components/Chart/MyChart";
export default {
components: {
MyChart,
},
props: {
attInfo: {
type: Object,
default: () => {
return null;
},
},
},
data() {
return {
chartData:[]
chartData: [],
};
},
mounted() {
@ -36,7 +46,7 @@ export default {
orient: "horizontal",
left: "center",
top: "10",
data:this.chartData.map(d=>d.name),
data: this.chartData.map((d) => d.name),
textStyle: {
color: "#444",
fontSize: 12,
@ -47,7 +57,7 @@ export default {
type: "pie",
radius: ["30%", "60%"], //
center: ["50%", "50%"],
roseType: 'radius',
roseType: "radius",
data: this.chartData,
label: {
normal: {
@ -78,15 +88,22 @@ export default {
},
init() {
setTimeout(() => {
this.chartData=[{
let total=this.attInfo?this.attInfo.job.mgr:0;
let totalAtt=this.attInfo?this.attInfo.att.mgr:0;
this.chartData = [
{
name: "出勤人数",
value:33
},{
value: totalAtt,
},
{
name: "未出勤人数",
value:22
}]
value: total-totalAtt,
},
];
if (this.$refs.chart) {
this.$refs.chart.reLoad();
}, 1000);
}
}, 400);
},
},
};

View File

@ -1,9 +1,13 @@
<template>
<div class="index-nav-body">
<div class="index-nav-body-title">劳务人员参与教育人员比例</div>
<div class="chart-content">
<div class="index-nav-body-title">劳务人员完成三级安全教育比例</div>
<div class="chart-content" v-if="chartData.length > 0">
<my-chart ref="chart" id="navAttWokerPropChart" width="100%" height="100%" :render="renderChart" />
</div>
<div class="no-data" v-if="chartData.length == 0">
<svg-icon icon-class="nodata" />
<div>暂无数据</div>
</div>
</div>
</template>
@ -13,6 +17,14 @@ export default {
components: {
MyChart,
},
props: {
attInfo: {
type: Object,
default: () => {
return null;
},
},
},
data() {
return {
chartData: [],
@ -77,18 +89,22 @@ export default {
},
init() {
setTimeout(() => {
let total = this.attInfo ? this.attInfo.job.total : 0;
let edu = this.attInfo ? this.attInfo.edu : 0;
this.chartData = [
{
name: "参与人数",
value: 33,
value: edu,
},
{
name: "未参与人数",
value: 22,
value: total - edu,
},
];
if (this.$refs.chart) {
this.$refs.chart.reLoad();
}, 1000);
}
}, 400);
},
},
};

View File

@ -1,9 +1,13 @@
<template>
<div class="index-nav-body">
<div class="index-nav-body-title">今日出勤率</div>
<div class="chart-content">
<div class="chart-content" v-if="chartData.length > 0">
<my-chart ref="chart" id="navAttendanceRateChart" width="100%" height="100%" :render="renderChart" />
</div>
<div class="no-data" v-if="chartData.length == 0">
<svg-icon icon-class="nodata" />
<div>暂无数据</div>
</div>
</div>
</template>
@ -13,9 +17,17 @@ export default {
components: {
MyChart,
},
props: {
attInfo: {
type: Object,
default: () => {
return null;
},
},
},
data() {
return {
chartData:[]
chartData: [],
};
},
mounted() {
@ -35,7 +47,7 @@ export default {
orient: "horizontal",
left: "center",
top: "10",
data:this.chartData.map(d=>d.name),
data: this.chartData.map((d) => d.name),
textStyle: {
color: "#444",
fontSize: 12,
@ -76,15 +88,22 @@ export default {
},
init() {
setTimeout(() => {
this.chartData=[{
let total=this.attInfo?this.attInfo.job.total:0;
let totalAtt=this.attInfo?this.attInfo.att.total:0;
this.chartData = [
{
name: "出勤人数",
value:33
},{
value: totalAtt,
},
{
name: "未出勤人数",
value:22
}]
value: total-totalAtt,
},
];
if (this.$refs.chart) {
this.$refs.chart.reLoad();
}, 1000);
}
}, 400);
},
},
};

View File

@ -4,8 +4,8 @@
<svg-icon icon-class="mgrworker" />
</div>
<div class="top-data">
<div class="data-title">管理人员数</div>
<div class="data-number">100</div>
<div class="data-title">管理人员数</div>
<div class="data-number">{{attInfo?attInfo.job.mgr:0}}</div>
</div>
</div>
</template>
@ -13,9 +13,12 @@
<script>
//
export default {
data(){
return {
props:{
attInfo:{
type:Object,
default:()=>{
return null
}
}
}
}

View File

@ -4,8 +4,8 @@
<svg-icon icon-class="onlineworker" />
</div>
<div class="top-data">
<div class="data-title">工人数</div>
<div class="data-number">100</div>
<div class="data-title">工人数</div>
<div class="data-number">{{attInfo?attInfo.job.worker:0}}</div>
</div>
</div>
</template>
@ -13,9 +13,12 @@
<script>
//
export default {
data(){
return {
props:{
attInfo:{
type:Object,
default:()=>{
return null
}
}
}
}

View File

@ -4,19 +4,22 @@
<svg-icon icon-class="certification" />
</div>
<div class="top-data">
<div class="data-title">实名认证人数</div>
<div class="data-number">100</div>
<div class="data-title">完成三级安全教育人数</div>
<div class="data-number">{{attInfo?attInfo.edu:0}}</div>
</div>
</div>
</template>
<script>
//
//
export default {
data() {
return {};
},
};
props:{
attInfo:{
type:Object,
default:()=>{
return null
}
}
}
}
</script>
<style></style>

View File

@ -5,7 +5,7 @@
</div>
<div class="top-data">
<div class="data-title">总人数</div>
<div class="data-number">100</div>
<div class="data-number">{{attInfo?attInfo.job.total:0}}</div>
</div>
</div>
</template>
@ -13,14 +13,13 @@
<script>
//
export default {
data(){
return {
props:{
attInfo:{
type:Object,
default:()=>{
return null
}
}
}
}
</script>
<style>
</style>

View File

@ -5,22 +5,42 @@
</div>
<div class="top-data">
<div class="data-title">参建单位总数</div>
<div class="data-number">100</div>
<div class="data-number">{{ sum }}</div>
</div>
</div>
</template>
<script>
//
import useUserStore from "@/store/modules/user";
import { getUnitCount } from "@/api/manage/labor.js";
export default {
data() {
return {
}
}
currentPrjId: null,
currentComId: null,
vendorsCode: "",
sum: 0,
};
},
mounted() {
this.userStore = useUserStore();
this.currentPrjId = this.userStore.currentPrjId;
this.currentComId = this.userStore.currentComId;
this.vendorsCode = this.userStore.vendorsCode;
if (this.vendorsCode == "jgw") {
this.vendorsCode = "uni";
}
this.init();
},
methods: {
init() {
getUnitCount(this.vendorsCode, this.currentPrjId).then((res) => {
this.sum = res.data || 0;
});
},
},
};
</script>
<style>
</style>
<style></style>