| xqd
@@ -30,7 +30,7 @@
|
|
|
<div class="footer">
|
|
|
<view class="result dir-top-wrap cross-center" v-if="showResult">
|
|
|
<view v-for="item in rules" v-if="item.value && item.show">
|
|
|
- <text>{{item.name}}=</text>{{item.value}}{{item.unit}}
|
|
|
+ <text>{{item.name}}=</text>{{$util.round(item.value,2)}}{{item.unit}}
|
|
|
<text v-if="item.isHalf">{{$util.round(item.value/2,2)}}{{item.unit}}</text>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -119,11 +119,11 @@
|
|
|
|
|
|
if(biangao){
|
|
|
if(this.formData.angle === '1'){ // 顶角
|
|
|
- slice = biangao * this.$util.csc(this.rules.top.value)
|
|
|
+ slice = biangao * this.$util.tan(this.rules.top.value/2)*2
|
|
|
}else if(this.formData.angle === '2'){ // 左底角
|
|
|
- slice = biangao * this.$util.csc(this.rules.left.value)
|
|
|
+ slice = biangao * this.$util.tan(this.rules.left.value/2)*2
|
|
|
}else{
|
|
|
- slice = biangao * this.$util.csc(this.rules.right.value)
|
|
|
+ slice = biangao * this.$util.tan(this.rules.right.value/2)*2
|
|
|
}
|
|
|
}
|
|
|
|
| xqd
@@ -132,7 +132,7 @@
|
|
|
},
|
|
|
roundRules(){
|
|
|
for (const itemKey in this.rules) {
|
|
|
- this.rules[itemKey].value = this.$util.round(this.rules[itemKey].value,2);
|
|
|
+ //this.rules[itemKey].value = this.$util.round(this.rules[itemKey].value,2);
|
|
|
}
|
|
|
},
|
|
|
initRules(){
|