Merge remote-tracking branch 'origin/main' into main

# Conflicts:
#	src/views/ProjectInfo.vue
main
wuyize 2022-07-13 10:23:44 +08:00
commit 6dd7eabba5
4 changed files with 34 additions and 2 deletions

View File

View File

@ -5,7 +5,6 @@
title="添加成员" title="添加成员"
:before-close="handleClose" :before-close="handleClose"
v-model="dialogFormVisible" v-model="dialogFormVisible"
width="500px" width="500px"
> >
<el-form :model="form" :rules="rules" ref="form"> <el-form :model="form" :rules="rules" ref="form">

View File

@ -87,7 +87,8 @@ export default {
option.legend = { option.legend = {
type: 'scroll', type: 'scroll',
orient: 'vertical', orient: 'vertical',
right: 10, // right: 10,
left:350,
top: 20, top: 20,
bottom: 20, bottom: 20,
} }

View File

@ -70,6 +70,7 @@
<p style="'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266;margin: 15px 0 30px 0;flex-shrink: 0;"> <p style="'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266;margin: 15px 0 30px 0;flex-shrink: 0;">
团队工作情况统计</p> 团队工作情况统计</p>
<div style="flex: 1;background-color: white; border-radius: 10px;"> <div style="flex: 1;background-color: white; border-radius: 10px;">
<EchartsPie id="pie_team" ref="pie_team" :isLegend="true" :dataList="teamList"/>
<!-- <EchartsPie id="pie_team" :isRadius="true" />--> <!-- <EchartsPie id="pie_team" :isRadius="true" />-->
</div> </div>
</div> </div>
@ -129,6 +130,7 @@ export default {
return { return {
// //
stationList: [], stationList: [],
teamList: [],
total: 20, total: 20,
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
@ -193,6 +195,34 @@ export default {
console.log(error); console.log(error);
}); });
}, },
getTeamList() {
let projectId = this.$route.params.projectId;
request({
url: `project/${projectId}/task/stats/group`,
method: "get",
})
.then((response) => {
if (response.data.code === 200) {
console.log(response.data.data);
let data = response.data.data;
let array = [];
for (let key in data) {
array.push({ value: data[key], name: key });
}
this.teamList = array;
this.$nextTick(() => {
this.$refs.pie_team.updateEcharts();
});
console.log(array);
}
})
.catch(function (error) {
console.log(error);
});
},
onCreatePerson() { onCreatePerson() {
this.dialogFormVisible = true; this.dialogFormVisible = true;
}, },
@ -246,6 +276,7 @@ export default {
}; };
this.getTableData(data); this.getTableData(data);
this.getStationList(); this.getStationList();
this.getTeamList();
this.$emit('groupChanged') this.$emit('groupChanged')
}, },
getTableData(param) { getTableData(param) {
@ -290,6 +321,7 @@ export default {
}, },
mounted() { mounted() {
this.getStationList(); this.getStationList();
this.getTeamList();
const param = { const param = {
pageCurrent: this.currentPage, pageCurrent: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,