代码提交

This commit is contained in:
lixiaobang 2023-03-23 10:26:45 +08:00
parent 1559a86cd8
commit 70db821295
6 changed files with 1112 additions and 1340 deletions

View File

@ -88,64 +88,3 @@ export const getCompleteMonthStatus = (params) => {
{params}, {params},
) )
}; };
export function filterCompanyAPI (params) {
return request({
url: '/rcm/company-credit/filterCompany',
method: 'post',
data: params
})
}
export function normalScanAPI (params) {
return request({
url: '/rcm/company-credit/report',
method: 'post',
data: params
})
}
export function deepScanAPI (params) {
return request({
url: '/rcm/company-credit/deepAuthUrl',
method: 'post',
data: params
})
}
export function reportDetailAPI (params) {
return request({
url: `/rcm/company-credit/detail?requestId=${params.id}`,
method: 'get',
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
export function deepReportAPI (params) {
return request({
url: `/rcm/company-credit/deep-report`,
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
export function taxInfoAPI (params) {
return request({
url: `/rcm/company-credit/taxInfo`,
method: 'post',
data: params
})
}
export function saveScoreAPI (params) {
return request({
url: `/rcm/company-credit/updateScore`,
method: 'post',
data: params
})
}

View File

@ -26,4 +26,16 @@ export const getUserGroup = (params) => {
{params}, {params},
) )
}; };
//施工人员组成
export const getGroupCensus = (params) => {
return axios.get('api/ems-third-party-service/user/groupCensus',
{params},
)
};
//考勤监控
export const getAttend = (params) => {
return axios.get('api/ems-third-party-service/user/attend',
{params},
)
};

View File

@ -1,7 +1,7 @@
<template> <template>
<div style="width:100%;height:100%;"> <div style="width:100%;height:100%;">
<div ref="chart" style="width:100%;height:100%;"></div> <div ref="chart" style="width:100%;height:100%;"></div>
<div class="boxPeople aa"> <!-- <div class="boxPeople aa">
<div class="name" style="color: #fcecb8;">架子工</div> <div class="name" style="color: #fcecb8;">架子工</div>
<div class="nucm" style="color: #eadfb4;">33<span <div class="nucm" style="color: #eadfb4;">33<span
style=" font-size: 18px; font-weight: 400;color: #fcecb8;">%</span></div> style=" font-size: 18px; font-weight: 400;color: #fcecb8;">%</span></div>
@ -20,7 +20,7 @@
<div class="name" style="color: #53E3FF">项目监理组</div> <div class="name" style="color: #53E3FF">项目监理组</div>
<div class="nucm" style="color: #d9def4;">40<span style=" font-size: 18px; font-weight: 400;color:#d9def4">%</span> <div class="nucm" style="color: #d9def4;">40<span style=" font-size: 18px; font-weight: 400;color:#d9def4">%</span>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
<script> <script>
@ -39,7 +39,10 @@ export default {
return ['#00A572', '#007EC1', '#DA9300', '#878787'] return ['#00A572', '#007EC1', '#DA9300', '#878787']
} }
}, },
constructionPersonnel:{
type: Array,
default:null
}
}, },
components: { components: {
@ -49,61 +52,30 @@ export default {
return {} return {}
}, },
mounted() { mounted() {
this.initCharts(window.innerHeight)
}, },
watch: { watch: {
// Echarts // // Echarts
chartData: { // chartData: {
// deep: true,
// handler() {
// this.resetOption()
// }
// },
constructionPersonnel:{
deep: true, deep: true,
handler() { handler(newVal) {
this.resetOption() this.initCharts(newVal)
} }
} }
}, },
methods: { methods: {
initCharts() { initCharts(dataList) {
let myChart = this.$echarts.init(this.$refs.chart) let myChart = this.$echarts.init(this.$refs.chart)
var val1data2 = [{ var val1data2 = []
value: 33, val1data2 = Object.keys(dataList).map((item,index)=>{
name: '电工', return {name:dataList[item].post,value:dataList[item].percent}
itemStyle: { // })
normal: {
borderWidth: 2,
borderColor: '#52FFC1'
}
},
},
{
value: 13,
name: '项目监理组',
itemStyle: { //
normal: {
borderWidth: 2,
borderColor: '#B6F9FF'
}
},
},
{
value: 14,
name: '土建专工',
itemStyle: { //
normal: {
borderWidth: 2,
borderColor: '#DCD6FF'
}
},
},
{
value: 43,
name: '架子工',
itemStyle: { //
normal: {
borderWidth: 2,
borderColor: '#FFF6DA'
}
},
}
]
var arr = ['middleLost', 0.6, val1data2, '今日完成进度'] var arr = ['middleLost', 0.6, val1data2, '今日完成进度']
// //
myChart.setOption({ myChart.setOption({
@ -116,30 +88,37 @@ export default {
height:120 height:120
}, },
left: '162',// left: '162',//
top: '109' // top: '104' //
}] }]
}, },
series: [ series: [
// ['48%', '60%'] // ['48%', '60%']
{ {
type: 'pie', type: 'pie',
radius: this.picIsShow ? ['51%', '63%'] : ['60%', '60%'], radius: this.picIsShow ? ['48%', '60%'] : ['57%', '57%'],
center: ['50%', '170'], center: ['50%', '55%'],
color: this.colorList, color: this.colorList,
hoverAnimation: true, /// / hoverAnimation: true, /// /
label: { label: {
show: false, show: true,
formatter: '{b}{c}%', formatter: '{b}{c}%',
padding:[0,10,0,50],
itemStyle: { //
normal: {
borderWidth: 2,
borderColor: '#52FFC1'
}
},
rich: { rich: {
d: { d: {
color: '#fff', color: '#fff',
fontSize: 16, fontSize: 20,
lineHeight: 24, lineHeight: 24,
height: 24 height: 24
}, },
c: { c: {
color: "red", color: "red",
fontSize: 14, fontSize: 20,
lineHeight: 20, lineHeight: 20,
align: 'left', align: 'left',
} }

View File

@ -5,7 +5,7 @@
<span>{{totalPer}}</span> <span>{{totalPer}}</span>
<span></span> <span></span>
</div> </div>
<div ref="chart" style="width:100%;height:100%;"></div> <div ref="chart" style="width:100%;height:100%;position: relative;left: 53%;"></div>
<div class="jsBox"> <div class="jsBox">
<div class="bogJs" v-for="(item, i) in pieData" :key="i"> <div class="bogJs" v-for="(item, i) in pieData" :key="i">
<div class="jsChild"> <div class="jsChild">
@ -101,323 +101,127 @@ export default {
initCharts() { initCharts() {
let myChart = this.$echarts.init(this.$refs.chart); let myChart = this.$echarts.init(this.$refs.chart);
// var placeHolderStyle = { var placeHolderStyle = {
// normal: { normal: {
// label: { label: {
// show: false, show: false,
// position: "center" position: "center"
// }, },
// labelLine: { labelLine: {
// show: false show: false
// }, },
// color: "#104841a3", color: "#104841a3",
// borderWidth: 0 borderWidth: 0
// }, },
// emphasis: { emphasis: {
// color: "#104841a3", color: "#104841a3",
// borderColor: "#00b3ff", borderColor: "#00b3ff",
// borderWidth: 0 borderWidth: 0
// } }
// }; };
// // //
// myChart.setOption({ myChart.setOption({
// series: [ series: [
// { {
// name: '', name: '值',
// type: 'pie',
// clockWise: true,
// hoverAnimation: false,
// radius: ['92%', '97%'],
// center: ['50%', '50%'],
// itemStyle: {
// normal: {
// label: {
// show: false
// },
// labelLine: {
// show: false,
// length: 100,
// smooth: 0.5
// },
// borderWidth: 5,
// shadowBlur: 40,
// borderColor: "#00B3FF",
// shadowColor: 'rgba(0, 0, 0, 0)' //
// }
// },
// data: [{
// value: 12,
// }, {
// value: 4,
// name: '',
// itemStyle: placeHolderStyle
// }]
// },
// // ------------2
// {
// name: '',
// type: 'pie',
// clockWise: true,
// hoverAnimation: false,
// radius: ['72%', '67%'],
// center: ['50%', '50%'],
// itemStyle: {
// normal: {
// label: {
// show: false
// },
// labelLine: {
// show: false,
// length: 100,
// smooth: 0.5
// },
// borderWidth: 5,
// shadowBlur: 40,
// borderColor: "#F1E453",
// shadowColor: 'rgba(0, 0, 0, 0)' //
// }
// },
// data: [{
// value: 6,
// }, {
// value: 4,
// name: '',
// itemStyle: placeHolderStyle
// }]
// },
// // ------------3
// {
// name: '',
// type: 'pie',
// clockWise: true,
// hoverAnimation: false,
// radius: ['48%', '44%'],
// center: ['50%', '50%'],
// itemStyle: {
// normal: {
// label: {
// show: false
// },
// labelLine: {
// show: false,
// length: 100,
// smooth: 0.5
// },
// borderWidth: 5,
// shadowBlur: 40,
// borderColor: "#f85b60",
// shadowColor: 'rgba(0, 0, 0, 0)' //
// }
// },
// data: [{
// value: 9,
// }, {
// value: 44,
// name: '',
// itemStyle: placeHolderStyle
// }]
// },
// ]
// });
var data = [{
name: "本科及以上",
value: 13211
},
{
name: "高中",
value: 42111
},
{
name: "初中及以下",
value: 81711
},
{
name: "其他",
value: 121711
}
];
function getArrayValue(array, key) {
var key = key || "value";
var res = [];
if (array) {
array.forEach(function(t) {
res.push(t[key]);
});
}
return res;
}
function array2obj(array,key) {
var resObj = {};
for(var i=0;i<array.length;i++){
resObj[array[i][key]] = array[i];
}
return resObj;
}
function getData(data) {
var res = {
series: [],
yAxis: []
};
for (let i = 0; i < data.length; i++) {
res.series.push({
name: '学历',
type: 'pie', type: 'pie',
clockWise: false, // clockWise: true,
hoverAnimation: false, // hoverAnimation: false,
radius: [65 - i * 15 + '%', 57 - i * 15 + '%'], radius: ['92%', '97%'],
center: ["30%", "55%"], center: ['50%', '50%'],
label: {
show: false
},
itemStyle: { itemStyle: {
normal: {
label: { label: {
show: false, show: false
}, },
labelLine: { labelLine: {
show: false show: false,
length: 100,
smooth: 0.5
}, },
borderWidth: 5, borderWidth: 5,
shadowBlur: 40,
borderColor: "#00B3FF",
shadowColor: 'rgba(0, 0, 0, 0)' //
}
}, },
data: [{ data: [{
value: data[i].value, value: 12,
name: data[i].name
}, { }, {
value: sumValue - data[i].value, value: 4,
name: '', name: '',
itemStyle: { itemStyle: placeHolderStyle
color: "rgba(0,0,0,0)",
borderWidth: 0
},
tooltip: {
show: false
},
hoverAnimation: false
}] }]
}); },
res.series.push({ // ------------2
name: '', {
name: '值',
type: 'pie', type: 'pie',
silent: true, clockWise: true,
z: 1, hoverAnimation: false,
clockWise: false, // radius: ['72%', '67%'],
hoverAnimation: false, // center: ['50%', '50%'],
radius: [65 - i * 15 + '%', 57 - i * 15 + '%'],
center: ["30%", "55%"],
label: {
show: false
},
itemStyle: { itemStyle: {
normal: {
label: { label: {
show: false, show: false
}, },
labelLine: { labelLine: {
show: false show: false,
length: 100,
smooth: 0.5
}, },
borderWidth: 5, borderWidth: 5,
shadowBlur: 40,
borderColor: "#F1E453",
shadowColor: 'rgba(0, 0, 0, 0)' //
}
}, },
data: [{ data: [{
value: 7.5, value: 6,
itemStyle: {
color: "#E3F0FF",
borderWidth: 0
},
tooltip: {
show: false
},
hoverAnimation: false
}, { }, {
value: 2.5, value: 4,
name: '', name: '',
itemStyle: { itemStyle: placeHolderStyle
color: "rgba(0,0,0,0)",
borderWidth: 0
},
tooltip: {
show: false
},
hoverAnimation: false
}] }]
}); },
res.yAxis.push((data[i].value / sumValue * 100).toFixed(2) + "%"); // ------------3
} {
return res; name: '值',
} type: 'pie',
var arrName = getArrayValue(data, "name"); clockWise: true,
var arrValue = getArrayValue(data, "value"); hoverAnimation: false,
var sumValue = eval(arrValue.join('+')); radius: ['48%', '44%'],
var objData = array2obj(data, "name"); center: ['50%', '50%'],
var optionData = getData(data); itemStyle: {
normal: {
label: {
myChart.option = { show: false
backgroundColor:'#fff',
legend: {
show: true,
top: "center",
left: '70%',
data: arrName,
itemWidth: 30,
itemHeight: 20,
width:50,
padding: [0, 5],
itemGap: 25,
formatter: function(name) {
return "{title|" + name + "}\n{value|" + (objData[name].value) + "人}"
},
textStyle: {
rich: {
title: {
fontSize: 10,
lineHeight: 10,
color: "rgba(0,0,0,.45)"
}, },
value: { labelLine: {
fontSize: 14, show: false,
lineHeight: 18, length: 100,
color: "rgba(0,0,0,.85)" smooth: 0.5
} },
} borderWidth: 5,
}, shadowBlur: 40,
}, borderColor: "#f85b60",
tooltip: { shadowColor: 'rgba(0, 0, 0, 0)' //
show: true, }
trigger: "item",
formatter: "{a}<br>{b}:{c}({d}%)"
},
color: ['#FF8700', '#ffc300', '#00e473', '#009DFF'],
grid: {
top: '20%',
bottom: '48%',
left: "30%",
containLabel: false
},
yAxis: [{
type: 'category',
inverse: true,
axisLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
interval: 0,
inside: true,
textStyle: {
color: "#000",
fontSize: 10,
}, },
show: true data: [{
}, value: 9,
data: optionData.yAxis }, {
}], value: 44,
xAxis: [{ name: '',
show: false itemStyle: placeHolderStyle
}], }]
series: optionData.series },
}; ]
});
// //
// myChart.dispatchAction({ type: 'highlight', seriesIndex: [0, 1, 2], dataIndex: 0 }); myChart.dispatchAction({ type: 'highlight', seriesIndex: [0, 1, 2], dataIndex: 0 });
}, },
} }
@ -428,7 +232,8 @@ myChart.option = {
.allTotle { .allTotle {
position: absolute; position: absolute;
bottom: 69px; bottom: 69px;
left: 60px; left: 87%;
width: 50%;
div { div {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;

View File

@ -679,7 +679,6 @@ export default {
getProjectStatus({ getProjectStatus({
projectId: this.projectId, projectId: this.projectId,
}).then((res) => { }).then((res) => {
console.log(res.data.data,'==================');
this.jinduList = res.data.data.length this.jinduList = res.data.data.length
for(var i = 0; i < res.data.data.length; i++){ for(var i = 0; i < res.data.data.length; i++){
if (res.data.data[i].completionStatusValue == '正常完成') { if (res.data.data[i].completionStatusValue == '正常完成') {
@ -692,7 +691,6 @@ export default {
} }
} }
} }
console.log(this.progress,'----------------');
this.boxList = Object.keys(res.data.data).map((item, index) => { this.boxList = Object.keys(res.data.data).map((item, index) => {
if (res.data.data[item].planEndTime != null) { if (res.data.data[item].planEndTime != null) {
res.data.data[item].planEndTime = res.data.data[ res.data.data[item].planEndTime = res.data.data[

File diff suppressed because it is too large Load Diff