优化
This commit is contained in:
parent
f750eec2f2
commit
b9ba1edb5e
@ -38,7 +38,6 @@ service.interceptors.request.use(config => {
|
||||
// if (getToken() && !isToken) {
|
||||
// config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
// }
|
||||
console.log(' Vue.cookies: ', Vue.$cookies)
|
||||
config.headers['token'] = Vue.$cookies.get('token') || ''
|
||||
return config
|
||||
}, error => {
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
业务指标权重:{{handleGetWeight(i)}}%/{{Math.round((i.weight * 100)*1000)/1000}}%
|
||||
</div>
|
||||
<div>
|
||||
所有指标总权重: {{ Math.round((obj.weight * 100)*1000)/1000}}%
|
||||
所有指标总权重: {{ handleGetWeight1()}}%
|
||||
</div>
|
||||
</div>
|
||||
<div style=" padding: 10px;">
|
||||
@ -203,7 +203,17 @@ export default {
|
||||
})
|
||||
history.go(-1)
|
||||
},
|
||||
handleGetWeight1 () {
|
||||
let num = 0
|
||||
this.obj.recortModelDtos.map(i => {
|
||||
i.detailDtos.filter(i => !i.isDelete).map(i => {
|
||||
num += i.checkWeight
|
||||
})
|
||||
})
|
||||
return Math.round((num * 100) * 1000) / 1000
|
||||
},
|
||||
handleGetWeight (arr) {
|
||||
console.log('arr: ', arr)
|
||||
const weight = arr.detailDtos.filter(i => !i.isDelete).reduce((num, i) => {
|
||||
num += i.isDelete !== 1 ? i.checkWeight : 0
|
||||
return num
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user