|
@@ -7,7 +7,7 @@ import { defineComponent, ref, watch, PropType, onMounted, computed } from 'vue'
|
|
|
import { QueryTSDataRsp, QueryQuoteDayRsp } from '@/services/go/quote/interface';
|
|
import { QueryTSDataRsp, QueryQuoteDayRsp } from '@/services/go/quote/interface';
|
|
|
import { QueryTSData } from '@/services/go/quote';
|
|
import { QueryTSData } from '@/services/go/quote';
|
|
|
import { debounce, getRangeTime } from '@/utils/time';
|
|
import { debounce, getRangeTime } from '@/utils/time';
|
|
|
-import { toDecimalFull } from '@/utils/number';
|
|
|
|
|
|
|
+import { formatDecimal } from '@/utils/number';
|
|
|
import EchartBase from '../echart-base/index.vue';
|
|
import EchartBase from '../echart-base/index.vue';
|
|
|
import { handleEchart } from './setup';
|
|
import { handleEchart } from './setup';
|
|
|
import moment from 'moment';
|
|
import moment from 'moment';
|
|
@@ -121,8 +121,8 @@ export default defineComponent({
|
|
|
// 计算总价
|
|
// 计算总价
|
|
|
const total = maIndexs.reduce((sum, val) => sum + data[val], 0);
|
|
const total = maIndexs.reduce((sum, val) => sum + data[val], 0);
|
|
|
// 计算均线
|
|
// 计算均线
|
|
|
- const ma = toDecimalFull(total / count, decimal);
|
|
|
|
|
- result.push(ma);
|
|
|
|
|
|
|
+ const ma = formatDecimal(total / count, decimal);
|
|
|
|
|
+ result.push(ma.toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|