@nstc-business/imes 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
<script>
|
|
59
59
|
import { buildStatModelTables, hasStatPivotNodes } from './statModelHelper'
|
|
60
60
|
import { showLevelSerial } from './helpers'
|
|
61
|
+
import { withRequestTimestamp } from './api'
|
|
61
62
|
import MeasureStatCell from './MeasureStatCell.vue'
|
|
62
63
|
|
|
63
64
|
export default {
|
|
@@ -103,10 +104,9 @@ export default {
|
|
|
103
104
|
return (block.columns || []).filter(c => c.prop !== 'name')
|
|
104
105
|
},
|
|
105
106
|
async fetchScoreMap(itemID) {
|
|
106
|
-
const randomNumStr = `${Date.now()}${Math.floor(Math.random() * 1000000)}`
|
|
107
107
|
try {
|
|
108
108
|
const { code, data } = await this.$axios.post(
|
|
109
|
-
|
|
109
|
+
withRequestTimestamp('/imes/v1/indicator/getScoreMap'),
|
|
110
110
|
{ id: itemID }
|
|
111
111
|
)
|
|
112
112
|
return code === 0 && Array.isArray(data) ? data : []
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { axios } from 'n20-common-lib'
|
|
2
2
|
|
|
3
|
+
export function withRequestTimestamp(url) {
|
|
4
|
+
const separator = url.includes('?') ? '&' : '?'
|
|
5
|
+
const randomNumStr = `${Date.now()}${Math.floor(Math.random() * 1000000)}`
|
|
6
|
+
return `${url}${separator}randomNumStr=${randomNumStr}`
|
|
7
|
+
}
|
|
8
|
+
|
|
3
9
|
/**
|
|
4
10
|
* 获取不可量化指标的评分选项。
|
|
5
11
|
* 返回完整响应,和 measureCalc 其余请求的调用方式保持一致。
|
|
6
12
|
*/
|
|
7
13
|
export function getScoreMap(params) {
|
|
8
|
-
return axios.post(
|
|
14
|
+
return axios.post(
|
|
15
|
+
withRequestTimestamp('/imes/v1/indicator/getScoreMap'),
|
|
16
|
+
params
|
|
17
|
+
)
|
|
9
18
|
}
|
|
@@ -247,6 +247,7 @@ import {
|
|
|
247
247
|
mergeStatModelNode,
|
|
248
248
|
statItemChildren
|
|
249
249
|
} from './statModelHelper'
|
|
250
|
+
import { withRequestTimestamp } from './api'
|
|
250
251
|
import { formatFloat2 } from '../common'
|
|
251
252
|
|
|
252
253
|
export default {
|
|
@@ -615,7 +616,7 @@ export default {
|
|
|
615
616
|
this.loading = true
|
|
616
617
|
try {
|
|
617
618
|
const res = await this.$axios.post(
|
|
618
|
-
'/imes/v1/indicatorModel/getModelTree',
|
|
619
|
+
withRequestTimestamp('/imes/v1/indicatorModel/getModelTree'),
|
|
619
620
|
{ code, id, logId }
|
|
620
621
|
)
|
|
621
622
|
if (seq !== this.initSeq) return
|
|
@@ -731,12 +732,9 @@ export default {
|
|
|
731
732
|
async fetchQualOptions() {
|
|
732
733
|
await Promise.all(
|
|
733
734
|
this.qualList.map(async row => {
|
|
734
|
-
const randomNumStr = `${Date.now()}${Math.floor(
|
|
735
|
-
Math.random() * 1000000
|
|
736
|
-
)}`
|
|
737
735
|
try {
|
|
738
736
|
const { code, data } = await this.$axios.post(
|
|
739
|
-
|
|
737
|
+
withRequestTimestamp('/imes/v1/indicator/getScoreMap'),
|
|
740
738
|
{ id: row.itemID }
|
|
741
739
|
)
|
|
742
740
|
if (code === 0 && Array.isArray(data)) {
|
|
@@ -772,7 +770,7 @@ export default {
|
|
|
772
770
|
this.cltLoading = true
|
|
773
771
|
try {
|
|
774
772
|
const res = await this.$axios.post(
|
|
775
|
-
'/custman-core/customer/findSimpleList',
|
|
773
|
+
withRequestTimestamp('/custman-core/customer/findSimpleList'),
|
|
776
774
|
{ keyword: query }
|
|
777
775
|
)
|
|
778
776
|
this.cltOptions = res.code == 200 ? res.data || [] : []
|
|
@@ -1041,7 +1039,10 @@ export default {
|
|
|
1041
1039
|
|
|
1042
1040
|
this.calcLoading = true
|
|
1043
1041
|
try {
|
|
1044
|
-
const res = await this.$axios.post(
|
|
1042
|
+
const res = await this.$axios.post(
|
|
1043
|
+
withRequestTimestamp('/imes/v2/models/calcModelTree'),
|
|
1044
|
+
param
|
|
1045
|
+
)
|
|
1045
1046
|
if (res.code === 0) {
|
|
1046
1047
|
const resData = res.data || {}
|
|
1047
1048
|
if (this.statRootModel) {
|
|
@@ -1115,7 +1116,10 @@ export default {
|
|
|
1115
1116
|
|
|
1116
1117
|
this.$set(subModel, '_calcing', true)
|
|
1117
1118
|
try {
|
|
1118
|
-
const res = await this.$axios.post(
|
|
1119
|
+
const res = await this.$axios.post(
|
|
1120
|
+
withRequestTimestamp('/imes/v2/models/calcModelTree'),
|
|
1121
|
+
param
|
|
1122
|
+
)
|
|
1119
1123
|
if (res.code === 0) {
|
|
1120
1124
|
const data = res.data || {}
|
|
1121
1125
|
if (isStatModel(subModel)) {
|