|
@@ -328,7 +328,6 @@ export default {
|
|
|
circle.setText(total);
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
expandRestItems(item, index) {
|
|
|
this.systemList.forEach((eq) => {
|
|
|
if (eq.smsxt !== item.smsxt) {
|
|
@@ -504,10 +503,7 @@ export default {
|
|
|
},
|
|
|
// 获取右侧统计数据
|
|
|
getRightstatic() {
|
|
|
- // 对右侧数据做遍历
|
|
|
- this.statisticsList.forEach((statisticItem) => {
|
|
|
- const TYPE = statisticItem.type; // 类型
|
|
|
- const Dom = document.getElementById(`canvas_${TYPE}`);
|
|
|
+ // 设置圆环半径
|
|
|
const BoxDom = document.getElementsByClassName("canvas-circle")[0];
|
|
|
this.canvasCircle = 0;
|
|
|
if (BoxDom.offsetHeight > BoxDom.offsetWidth) {
|
|
@@ -515,44 +511,51 @@ export default {
|
|
|
} else {
|
|
|
this.canvasCircle = BoxDom.offsetHeight / 2;
|
|
|
}
|
|
|
- // 设置Dom得width\height
|
|
|
- Dom.height = this.canvasCircle * 2;
|
|
|
- Dom.width = this.canvasCircle * 2;
|
|
|
- this.projectStatistics(
|
|
|
- statisticItem.type,
|
|
|
- statisticItem.system,
|
|
|
- statisticItem.type == 1
|
|
|
- ? moment().format("YYYYMM")
|
|
|
- : moment().format("YYYY")
|
|
|
- ).then((res) => {
|
|
|
- let circle_basename = null;
|
|
|
- statisticItem.type == 1
|
|
|
- ? (circle_basename = "本月总任务")
|
|
|
- : (circle_basename = "本年总任务");
|
|
|
- const circle = new SCircle(`canvas_${TYPE}`, this.canvasCircle * 0.8);
|
|
|
- circle.baseName = circle_basename;
|
|
|
- // 总数
|
|
|
- let total = 0;
|
|
|
- // 即将预期
|
|
|
- let due_num = 0;
|
|
|
- // 未完成任务
|
|
|
- let unfinished = 0;
|
|
|
- // 累计统计
|
|
|
- res.data.forEach((item) => {
|
|
|
- total = total + item.total;
|
|
|
- due_num = due_num + item.due_num;
|
|
|
- unfinished = unfinished + item.unfinished;
|
|
|
- });
|
|
|
- // 赋值
|
|
|
- Object.assign(statisticItem, {
|
|
|
- total,
|
|
|
- due_num,
|
|
|
- unfinished,
|
|
|
+ // 对右侧数据做遍历
|
|
|
+ this.statisticsList.forEach((statisticItem) => {
|
|
|
+ const TYPE = statisticItem.type; // 类型
|
|
|
+ const Dom = document.getElementById(`canvas_${TYPE}`);
|
|
|
+ // 设置Dom得width\height
|
|
|
+ Dom.height = this.canvasCircle * 2;
|
|
|
+ Dom.width = this.canvasCircle * 2;
|
|
|
+ this.projectStatistics(
|
|
|
+ statisticItem.type,
|
|
|
+ statisticItem.system,
|
|
|
+ statisticItem.type == 1
|
|
|
+ ? moment().format("YYYYMM")
|
|
|
+ : moment().format("YYYY")
|
|
|
+ ).then((res) => {
|
|
|
+ let circle_basename = null;
|
|
|
+ statisticItem.type == 1
|
|
|
+ ? (circle_basename = "本月总任务")
|
|
|
+ : (circle_basename = "本年总任务");
|
|
|
+ const circle = new SCircle(
|
|
|
+ `canvas_${TYPE}`,
|
|
|
+ this.canvasCircle * 0.8
|
|
|
+ );
|
|
|
+ circle.baseName = circle_basename;
|
|
|
+ // 总数
|
|
|
+ let total = 0;
|
|
|
+ // 即将预期
|
|
|
+ let due_num = 0;
|
|
|
+ // 未完成任务
|
|
|
+ let unfinished = 0;
|
|
|
+ // 累计统计
|
|
|
+ res.data.forEach((item) => {
|
|
|
+ total = total + item.total;
|
|
|
+ due_num = due_num + item.due_num;
|
|
|
+ unfinished = unfinished + item.unfinished;
|
|
|
+ });
|
|
|
+ // 赋值
|
|
|
+ Object.assign(statisticItem, {
|
|
|
+ total,
|
|
|
+ due_num,
|
|
|
+ unfinished,
|
|
|
+ });
|
|
|
+ circle.persentTransform(total, due_num, unfinished);
|
|
|
+ circle.setText(total);
|
|
|
});
|
|
|
- circle.persentTransform(total, due_num, unfinished);
|
|
|
- circle.setText(total);
|
|
|
});
|
|
|
- });
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
@@ -750,7 +753,7 @@ export default {
|
|
|
/deep/ .p-select-cursor-input {
|
|
|
color: #ffffff !important;
|
|
|
&::-webkit-input-placeholder {
|
|
|
- color: #ffffff !important;
|
|
|
+ color: #ffffff !important;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -857,7 +860,7 @@ export default {
|
|
|
display: flex;
|
|
|
margin-top: 28px;
|
|
|
.legend-item {
|
|
|
- margin-right: 30px;
|
|
|
+ margin-right: 25px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
.legend-color {
|
|
@@ -994,15 +997,17 @@ export default {
|
|
|
align-items: center;
|
|
|
height: calc(100% - 52px);
|
|
|
.circle {
|
|
|
- flex: 1;
|
|
|
+ max-width: 150px;
|
|
|
+ min-width: 120px;
|
|
|
height: 100%;
|
|
|
display: flex;
|
|
|
margin-left: 20px;
|
|
|
align-items: center;
|
|
|
}
|
|
|
.msg {
|
|
|
- width: 200px;
|
|
|
- padding: 0 0 0 30px;
|
|
|
+ flex: 1;
|
|
|
+ padding: 0 0 0 20px;
|
|
|
+ white-space:nowrap;
|
|
|
box-sizing: border-box;
|
|
|
.msg-item:nth-of-type(1) {
|
|
|
display: flex;
|