|
@@ -213,12 +213,12 @@
|
|
></td>
|
|
></td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td class="first">健康异常人数</td>
|
|
|
|
|
|
+ <td class="first">心理异常人数</td>
|
|
<td>{{ unHealthNum1 }}</td>
|
|
<td>{{ unHealthNum1 }}</td>
|
|
<td>{{ unHealthNum2 }}</td>
|
|
<td>{{ unHealthNum2 }}</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td class="first">健康异常占比</td>
|
|
|
|
|
|
+ <td class="first">心理异常占比</td>
|
|
<td :class="{ warn: isRed(5, 1) }">{{ getUnHealthRate(1) }}</td>
|
|
<td :class="{ warn: isRed(5, 1) }">{{ getUnHealthRate(1) }}</td>
|
|
<td :class="{ warn: isRed(5, 2) }">{{ getUnHealthRate(2) }}</td>
|
|
<td :class="{ warn: isRed(5, 2) }">{{ getUnHealthRate(2) }}</td>
|
|
</tr>
|
|
</tr>
|
|
@@ -425,7 +425,7 @@ export default {
|
|
},
|
|
},
|
|
//计划下---组织改变--触发的方法
|
|
//计划下---组织改变--触发的方法
|
|
orgChangeOne(val) {
|
|
orgChangeOne(val) {
|
|
- console.log(val)
|
|
|
|
|
|
+ console.log(val);
|
|
//设置该处选择的对象
|
|
//设置该处选择的对象
|
|
//设置当前选择的对象
|
|
//设置当前选择的对象
|
|
//获取val 为ID
|
|
//获取val 为ID
|
|
@@ -452,7 +452,6 @@ export default {
|
|
//设置的话触发一次对比
|
|
//设置的话触发一次对比
|
|
},
|
|
},
|
|
orgChangeTwo(val) {
|
|
orgChangeTwo(val) {
|
|
-
|
|
|
|
let list1 = [];
|
|
let list1 = [];
|
|
list1 = this.organizationsList.filter((item) => {
|
|
list1 = this.organizationsList.filter((item) => {
|
|
return item.id == val;
|
|
return item.id == val;
|
|
@@ -636,10 +635,10 @@ export default {
|
|
},
|
|
},
|
|
compareHandle() {
|
|
compareHandle() {
|
|
if (this.firstParams == 1) {
|
|
if (this.firstParams == 1) {
|
|
- this.options.dataset.source[0][1] = this.compareOptionsOrg1.orgName+' ';
|
|
|
|
|
|
+ this.options.dataset.source[0][1] = this.compareOptionsOrg1.orgName + " ";
|
|
this.options.dataset.source[0][2] = this.compareOptionsOrg2.orgName;
|
|
this.options.dataset.source[0][2] = this.compareOptionsOrg2.orgName;
|
|
} else {
|
|
} else {
|
|
- this.options.dataset.source[0][1] = this.compareOptionsPlan1.planName+' ';
|
|
|
|
|
|
+ this.options.dataset.source[0][1] = this.compareOptionsPlan1.planName + " ";
|
|
this.options.dataset.source[0][2] = this.compareOptionsPlan2.planName;
|
|
this.options.dataset.source[0][2] = this.compareOptionsPlan2.planName;
|
|
}
|
|
}
|
|
if (this.firstParams == 1) {
|
|
if (this.firstParams == 1) {
|
|
@@ -700,17 +699,24 @@ export default {
|
|
|
|
|
|
// 健康异常占比计算
|
|
// 健康异常占比计算
|
|
getUnHealthRate(i) {
|
|
getUnHealthRate(i) {
|
|
- let rate = parseInt(
|
|
|
|
- (this[`unHealthNum${i}`] / (this[`unComplete${i}`] + this[`completeNum${i}`])) *
|
|
|
|
- 100
|
|
|
|
- );
|
|
|
|
- return rate > 0 ? `${rate}%` : rate;
|
|
|
|
|
|
+ let rate =
|
|
|
|
+ this[`unComplete${i}`] + this[`completeNum${i}`] == 0
|
|
|
|
+ ? 0
|
|
|
|
+ : parseInt(
|
|
|
|
+ (this[`unHealthNum${i}`] /
|
|
|
|
+ (this[`unComplete${i}`] + this[`completeNum${i}`])) *
|
|
|
|
+ 100
|
|
|
|
+ );
|
|
|
|
+ return rate > 0 ? `${rate}%` : `${rate}%`;
|
|
},
|
|
},
|
|
|
|
|
|
// 其他占比计算
|
|
// 其他占比计算
|
|
getOtherRate(name, i, m) {
|
|
getOtherRate(name, i, m) {
|
|
let tempNum = this[`dimensionList${i}`][m][name];
|
|
let tempNum = this[`dimensionList${i}`][m][name];
|
|
- let rate = parseInt((tempNum / this[`completeNum${i}`]) * 100);
|
|
|
|
|
|
+ let rate =
|
|
|
|
+ this[`completeNum${i}`] == 0
|
|
|
|
+ ? 0
|
|
|
|
+ : parseInt((tempNum / this[`completeNum${i}`]) * 100);
|
|
// if (rate > 0 && rate <= 50) {
|
|
// if (rate > 0 && rate <= 50) {
|
|
// rate = `<span>${rate}%</span>`
|
|
// rate = `<span>${rate}%</span>`
|
|
// } else if (rate > 50 && rate <= 75) {
|
|
// } else if (rate > 50 && rate <= 75) {
|
|
@@ -718,7 +724,7 @@ export default {
|
|
// } else if (rate > 75) {
|
|
// } else if (rate > 75) {
|
|
// rate = `<span style='color: red'>${rate}%</span>`
|
|
// rate = `<span style='color: red'>${rate}%</span>`
|
|
// }
|
|
// }
|
|
- return rate > 0 ? `${rate}%` : rate;
|
|
|
|
|
|
+ return rate > 0 ? `${rate}%` : `${rate}%`;
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|