123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- <template>
- <div class="main-data data-employee-profile">
- <!-- <div class="title-area">员工概况</div> -->
- <div class="content-area">
- <div class="content-left">
- <div class="content-title">
- <div class="title">员工类型</div>
- </div>
- <div class="content">
- <pie-chart
- :chart-data="pieData"
- :legend="pieLegend"
- :title="pieTitle"
- width="220px"
- height="180px"
- />
- </div>
- </div>
- <div class="content-right">
- <div class="content-title">
- <div class="title">入楼情况(当天)
- </div>
- </div>
- <div class="content">
- <div class="data-content">
- <div class="data-item">
- <span class="data">{{grossNum.value}}</span>
- <span class="name">{{ grossNum.name }}</span>
- </div>
-
- <div class="data-item">
- <span class="data1">{{entryInternalNum.value}}</span>
- <span class="name">{{ entryInternalNum.name }}</span>
- </div>
-
- <div class="data-item">
- <span class="data2">{{visitorNum.value}}</span>
- <span class="name">{{ visitorNum.name }}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import PieChart from "@/components/Echarts/PieChart";
- import { getEnterBuildData, getEmployeePieData } from "@/api/screen/service";
- export default {
- name: "EmployeeProfile",
- components: {
- PieChart,
- },
- props: {
- appOrg: {
- type: String,
- default: "0000",
- },
- },
- watch:{
- appOrg(newValue,oldValue){
- //员工类型
- this.getEmployeePieData();
- //入楼情况
- this.getEnterBuildData();
- },
- },
- data() {
- return {
- currentTime: new Date(),
- pieData: [],
- pieLegend: {
- top: 30,
- orient: "vertical",
- right: 0,
- itemWidth: 8, // 设置图例标记的宽度
- itemHeight: 8, // 设置图例标记的高度
- textStyle: {
- color: "#FFF",
- },
- },
- pieTitle: {},
- grossNum:{},
- entryAssistNum:{},
- entryInternalNum:{},
- entryPropertyNum:{},
- entryToLoanNum:{},
- visitorNum:{},
- };
- },
- created() {
- //员工类型
- this.getEmployeePieData();
- //入楼情况
- this.getEnterBuildData();
- },
- destroyed() {},
- beforeDestroy() {},
- mounted() {},
- methods: {
- //获取员工类型
- getEmployeePieData() {
- getEmployeePieData(this.$props.appOrg).then((res) => {
- if (Number(res.code) === 200) {
- this.pieData = res.data;
- } else {
- //构造默认数据
- this.handlePieChart();
- }
- });
- },
- //入楼情况
- getEnterBuildData() {
- getEnterBuildData(this.$props.appOrg).then((res) => {
- if (Number(res.code) === 200) {
- this.grossNum = res.data.grossNum;
- this.entryToLoanNum = res.data.entryToLoanNum;
- this.entryAssistNum = res.data.entryAssistNum;
- this.entryInternalNum = res.data.entryInternalNum;
- this.entryPropertyNum = res.data.entryPropertyNum;
- this.visitorNum = res.data.visitorNum;
- } else {
- //构造默认数据
- this.handleBuildData();
- }
- });
- },
- //实例化饼图
- handlePieChart() {
- },
- //构造假数据
- handleBuildData(){
- }
- },
- };
- </script>
- <style lang="scss">
- .data-employee-profile {
- overflow: hidden;
- .content-area {
- display: flex;
- flex-direction: row;
- align-items: flex-start;
- justify-content: space-between;
- padding: 15px 20px 0 15px;
- .content-left, .content-right{
- width:calc(50% - 20px);
- }
- }
- .content-title {
- width: 230px;
- height: 26px;
- background: url("../../../assets/images/main/title_pro.png") no-repeat;
- background-size: 100% 100%;
- font-family: "PingFangSC";
- font-size: 16px;
- font-weight: bold;
- color: #00ffff;
- padding-left: 25px;
- .title {
- display: block;
- position: relative;
- top:-5px;
- }
- .smallTitle{
- font-size: 10px;
- font-weight: 100;
- color: #ffffff;
- }
- }
- .content {
- margin-top: 20px;
- .data-content{
- display: flex;
- flex-direction: row;
- align-items: center;
- flex-wrap: wrap;
- height: 130px;
- .mar{
- margin-bottom: 15px;
- }
- .data-item{
- position: relative;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- margin-right: 15px;
- .data{
- width: auto;
- font-size: 25px;
- color:#00FFFF;
- font-family: 'electronicFont';
- background: url("../../../assets/images/service_new/data_bgg.png") no-repeat;
- background-size: 100% 100%;
- background-position: center;
- height: 85px;
- width: 68px;
- text-align: center;
- padding-top: 23px;
- // position: relative;
- // top: 50px;
- }
- .data1{
- width: auto;
- font-size: 25px;
- color:#00FFDF;
- font-family: 'electronicFont';
- background: url("../../../assets/images/service_new/data_bgg1.png") no-repeat;
- background-size: 100% 100%;
- background-position: center;
- height: 85px;
- width: 68px;
- text-align: center;
- padding-top: 23px;
- // position: relative;
- // top: 50px;
- }
- .data2{
- width: auto;
- font-size: 25px;
- color:#F4CB57;
- font-family: 'electronicFont';
- background: url("../../../assets/images/service_new/data_bgg2.png") no-repeat;
- background-size: 100% 100%;
- background-position: center;
- height: 85px;
- width: 68px;
- text-align: center;
- padding-top: 23px;
- // position: relative;
- // top: 50px;
- }
-
- .name{
- font-size: 12px;
- color:#FFFFFF;
- }
- }
- .data-item:nth-child(3n){
- margin-right: 0;
- }
- }
- }
- ::-webkit-scrollbar {
- width: 3px;
- height: 3px;
- }
- ::-webkit-scrollbar-thumb {
- //滑块部分
- // border-radius: 5px;
- background-color: #58cbbb;
- }
- ::-webkit-scrollbar-track {
- //轨道部分
- // box-shadow: inset 0 0 5px #ddd;
- background: #ddd;
- // border-radius: 5px;
- }
- }
- </style>
|