修改bug

This commit is contained in:
‘937886381’ 2024-04-26 08:32:32 +08:00
parent be83c8196e
commit dacae0cbd8

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-04-25 18:24:31 * @LastEditTime: 2024-04-26 08:32:02
* @Description: * @Description:
--> -->
<template> <template>
@ -387,7 +387,7 @@ export default {
progressRate: 0.933333, progressRate: 0.933333,
specifications: '1100*5554*22', specifications: '1100*5554*22',
plan: 111111111111, plan: 111111111111,
actualQuantity:10000001111, actualQuantity:1000000111111,
}, },
{ {
id: '2', id: '2',
@ -459,11 +459,11 @@ export default {
if (ele.progressRate && ele.progressRate != 1) { if (ele.progressRate && ele.progressRate != 1) {
return { return {
id: ele.id, id: ele.id,
name: ele.name, name: this.getStr(String(ele.name), 8),
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)), progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
specifications: ele.specifications ? '规格' + ele.specifications : '', specifications: ele.specifications ? '规格' + ele.specifications : '',
planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan,6)) : '', planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan), 6) : '',
actualQuantity: ele.actualQuantity ?this.getStr(String(ele.actualQuantity,6)) : '', actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity), 6) : '',
}; };
} }
}); });
@ -568,7 +568,7 @@ export default {
getStr(str,num) { getStr(str,num) {
// //
if (str.length > num) { //10... if (str.length > num) { //10...
str = str.substr(0, 6) + "..." //10... str = str.substr(0, num) + "..." //10...
return str return str
} else { } else {
return str return str
@ -743,11 +743,11 @@ export default {
if (ele.progressRate && ele.progressRate != 1) { if (ele.progressRate && ele.progressRate != 1) {
return { return {
id: ele.id, id: ele.id,
name: this.getStr(String(ele.name,8)), name: this.getStr(String(ele.name), 8),
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)), progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
specifications: ele.specifications ? '规格' + ele.specifications : '', specifications: ele.specifications ? '规格' + ele.specifications : '',
planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan,6)) : '', planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan),6) : '',
actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity,6)) : '', actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity), 6) : '',
}; };
} }
}); });