@nstc-business/imes 1.0.26 → 1.0.28
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/README.md +87 -87
- package/package.json +71 -71
- package/src/components/calculateDetail/dialog.vue +38 -38
- package/src/components/calculateDetail/index.vue +1888 -1888
- package/src/components/common.js +109 -109
- package/src/components/measureCalc/EvaOfCreditConditionsRewrite.vue +624 -637
- package/src/components/measureCalc/MeasureEvalFlatTable.vue +438 -432
- package/src/components/measureCalc/MeasureGroupBlocks.vue +208 -208
- package/src/components/measureCalc/MeasureQualAnalysis.vue +415 -415
- package/src/components/measureCalc/MeasureStatCell.vue +181 -183
- package/src/components/measureCalc/MeasureStatFlatTable.vue +258 -254
- package/src/components/measureCalc/MeasureStatModelTable.vue +196 -193
- package/src/components/measureCalc/MeasureStatPanel.vue +45 -45
- package/src/components/measureCalc/MeasureSubModelPanel.vue +83 -83
- package/src/components/measureCalc/MeasureTreeTable.vue +817 -797
- package/src/components/measureCalc/api.js +18 -18
- package/src/components/measureCalc/helpers.js +507 -489
- package/src/components/measureCalc/index.vue +1676 -1671
- package/src/components/measureCalc/statModelHelper.js +585 -533
- package/src/components/measureCalc/ui/index.js +10 -10
- package/src/components/model-calculate/index.vue +153 -153
- package/src/components/model-calculate/input-number.vue +294 -294
- package/src/components/model-calculate/modelCalcTest.vue +1242 -1242
- package/src/components/model-calculate/tree.vue +132 -132
- package/src/index.js +28 -28
|
@@ -1,183 +1,181 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="measure-stat-cell">
|
|
3
|
-
<template v-if="!cell">—</template>
|
|
4
|
-
<!-- 手工填报 -->
|
|
5
|
-
<template v-else-if="cell.sourceType === 3">
|
|
6
|
-
<span v-if="column.disabled || readonly">{{ displayValue(cell) }}</span>
|
|
7
|
-
<InputNumber
|
|
8
|
-
v-else
|
|
9
|
-
class="full-w"
|
|
10
|
-
size="small"
|
|
11
|
-
:type="cell.displayStyle === 1 ? 'rate' : 'money'"
|
|
12
|
-
:d-num="digits"
|
|
13
|
-
v-model="cell.value"
|
|
14
|
-
/>
|
|
15
|
-
</template>
|
|
16
|
-
<!-- 不可量化下拉 -->
|
|
17
|
-
<template v-else-if="cell.sourceType === 0">
|
|
18
|
-
<span v-if="column.disabled || readonly">{{ displayValue(cell) }}</span>
|
|
19
|
-
|
|
20
|
-
<el-select
|
|
21
|
-
v-else
|
|
22
|
-
class="full-w"
|
|
23
|
-
v-model="cell.value"
|
|
24
|
-
size="small"
|
|
25
|
-
placeholder="请选择"
|
|
26
|
-
value-key="scoreMapID"
|
|
27
|
-
>
|
|
28
|
-
<el-option
|
|
29
|
-
v-for="option in cell.optionList || []"
|
|
30
|
-
:key="option.scoreMapID || option.scoreText"
|
|
31
|
-
:label="option.scoreText"
|
|
32
|
-
:value="option"
|
|
33
|
-
style="height: auto"
|
|
34
|
-
>
|
|
35
|
-
<div class="select-top">{{ option.scoreText }}</div>
|
|
36
|
-
<div class="select-bottom">{{ option.reason }}</div>
|
|
37
|
-
</el-option>
|
|
38
|
-
</el-select>
|
|
39
|
-
</template>
|
|
40
|
-
<!-- 其余:只读或调整(可调整时原值与输入框同时展示) -->
|
|
41
|
-
<template v-else>
|
|
42
|
-
<el-tooltip
|
|
43
|
-
v-if="showOriginalWhenAdjust && showFormulaTip"
|
|
44
|
-
placement="top"
|
|
45
|
-
effect="dark"
|
|
46
|
-
>
|
|
47
|
-
<div slot="content">
|
|
48
|
-
{{ cell.displayFormula }}:
|
|
49
|
-
<br />
|
|
50
|
-
{{ cell.relFormula }}
|
|
51
|
-
</div>
|
|
52
|
-
<span>{{ originalValue(cell) }}</span>
|
|
53
|
-
</el-tooltip>
|
|
54
|
-
<span v-else-if="showOriginalWhenAdjust">{{ originalValue(cell) }}</span>
|
|
55
|
-
<InputNumber
|
|
56
|
-
v-if="
|
|
57
|
-
cell.modifyRank === 2 &&
|
|
58
|
-
cell.value !== '' &&
|
|
59
|
-
cell.value !== null &&
|
|
60
|
-
!column.disabled
|
|
61
|
-
"
|
|
62
|
-
class="full-w"
|
|
63
|
-
size="small"
|
|
64
|
-
:type="cell.displayStyle === 1 ? 'rate' : 'money'"
|
|
65
|
-
:d-num="digits"
|
|
66
|
-
:disabled="readonly"
|
|
67
|
-
v-model="cell.value"
|
|
68
|
-
/>
|
|
69
|
-
<el-tooltip
|
|
70
|
-
v-else-if="showFormulaTip"
|
|
71
|
-
placement="top"
|
|
72
|
-
effect="dark"
|
|
73
|
-
>
|
|
74
|
-
<div slot="content">
|
|
75
|
-
{{ cell.displayFormula }}:
|
|
76
|
-
<br />
|
|
77
|
-
{{ cell.relFormula }}
|
|
78
|
-
</div>
|
|
79
|
-
<span>{{ displayValue(cell) }}</span>
|
|
80
|
-
</el-tooltip>
|
|
81
|
-
<span v-else-if="!showOriginalWhenAdjust">{{ displayValue(cell) }}</span>
|
|
82
|
-
</template>
|
|
83
|
-
</div>
|
|
84
|
-
</template>
|
|
85
|
-
|
|
86
|
-
<script>
|
|
87
|
-
import { InputNumber } from './ui'
|
|
88
|
-
import { toFixedTrunc, addThousands } from '../common'
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
this.cell
|
|
113
|
-
this.cell.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
if (
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="measure-stat-cell">
|
|
3
|
+
<template v-if="!cell">—</template>
|
|
4
|
+
<!-- 手工填报 -->
|
|
5
|
+
<template v-else-if="cell.sourceType === 3">
|
|
6
|
+
<span v-if="column.disabled || readonly">{{ displayValue(cell) }}</span>
|
|
7
|
+
<InputNumber
|
|
8
|
+
v-else
|
|
9
|
+
class="full-w"
|
|
10
|
+
size="small"
|
|
11
|
+
:type="cell.displayStyle === 1 ? 'rate' : 'money'"
|
|
12
|
+
:d-num="digits"
|
|
13
|
+
v-model="cell.value"
|
|
14
|
+
/>
|
|
15
|
+
</template>
|
|
16
|
+
<!-- 不可量化下拉 -->
|
|
17
|
+
<template v-else-if="cell.sourceType === 0">
|
|
18
|
+
<span v-if="column.disabled || readonly">{{ displayValue(cell) }}</span>
|
|
19
|
+
|
|
20
|
+
<el-select
|
|
21
|
+
v-else
|
|
22
|
+
class="full-w"
|
|
23
|
+
v-model="cell.value"
|
|
24
|
+
size="small"
|
|
25
|
+
placeholder="请选择"
|
|
26
|
+
value-key="scoreMapID"
|
|
27
|
+
>
|
|
28
|
+
<el-option
|
|
29
|
+
v-for="option in cell.optionList || []"
|
|
30
|
+
:key="option.scoreMapID || option.scoreText"
|
|
31
|
+
:label="option.scoreText"
|
|
32
|
+
:value="option"
|
|
33
|
+
style="height: auto"
|
|
34
|
+
>
|
|
35
|
+
<div class="select-top">{{ option.scoreText }}</div>
|
|
36
|
+
<div class="select-bottom">{{ option.reason }}</div>
|
|
37
|
+
</el-option>
|
|
38
|
+
</el-select>
|
|
39
|
+
</template>
|
|
40
|
+
<!-- 其余:只读或调整(可调整时原值与输入框同时展示) -->
|
|
41
|
+
<template v-else>
|
|
42
|
+
<el-tooltip
|
|
43
|
+
v-if="showOriginalWhenAdjust && showFormulaTip"
|
|
44
|
+
placement="top"
|
|
45
|
+
effect="dark"
|
|
46
|
+
>
|
|
47
|
+
<div slot="content">
|
|
48
|
+
{{ cell.displayFormula }}:
|
|
49
|
+
<br />
|
|
50
|
+
{{ cell.relFormula }}
|
|
51
|
+
</div>
|
|
52
|
+
<span>{{ originalValue(cell) }}</span>
|
|
53
|
+
</el-tooltip>
|
|
54
|
+
<span v-else-if="showOriginalWhenAdjust">{{ originalValue(cell) }}</span>
|
|
55
|
+
<InputNumber
|
|
56
|
+
v-if="
|
|
57
|
+
cell.modifyRank === 2 &&
|
|
58
|
+
cell.value !== '' &&
|
|
59
|
+
cell.value !== null &&
|
|
60
|
+
!column.disabled
|
|
61
|
+
"
|
|
62
|
+
class="full-w"
|
|
63
|
+
size="small"
|
|
64
|
+
:type="cell.displayStyle === 1 ? 'rate' : 'money'"
|
|
65
|
+
:d-num="digits"
|
|
66
|
+
:disabled="readonly"
|
|
67
|
+
v-model="cell.value"
|
|
68
|
+
/>
|
|
69
|
+
<el-tooltip
|
|
70
|
+
v-else-if="showFormulaTip"
|
|
71
|
+
placement="top"
|
|
72
|
+
effect="dark"
|
|
73
|
+
>
|
|
74
|
+
<div slot="content">
|
|
75
|
+
{{ cell.displayFormula }}:
|
|
76
|
+
<br />
|
|
77
|
+
{{ cell.relFormula }}
|
|
78
|
+
</div>
|
|
79
|
+
<span>{{ displayValue(cell) }}</span>
|
|
80
|
+
</el-tooltip>
|
|
81
|
+
<span v-else-if="!showOriginalWhenAdjust">{{ displayValue(cell) }}</span>
|
|
82
|
+
</template>
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|
|
85
|
+
|
|
86
|
+
<script>
|
|
87
|
+
import { InputNumber } from './ui'
|
|
88
|
+
import { toFixedTrunc, addThousands } from '../common'
|
|
89
|
+
import { formatScoreText } from './helpers'
|
|
90
|
+
|
|
91
|
+
export default {
|
|
92
|
+
name: 'MeasureStatCell',
|
|
93
|
+
components: { InputNumber },
|
|
94
|
+
inject: ['measureCtx'],
|
|
95
|
+
props: {
|
|
96
|
+
cell: { type: Object, default: null },
|
|
97
|
+
column: { type: Object, default: () => ({}) },
|
|
98
|
+
/** 指标值小数位(可读模型配置);得分列固定 SCORE_DIGITS */
|
|
99
|
+
digits: { type: Number, default: 2 }
|
|
100
|
+
},
|
|
101
|
+
computed: {
|
|
102
|
+
readonly() {
|
|
103
|
+
return !!this.measureCtx().readonly
|
|
104
|
+
},
|
|
105
|
+
/** 指标值列才展示公式;得分列 column.disabled 不展示 */
|
|
106
|
+
showFormulaTip() {
|
|
107
|
+
if (!this.cell || this.column.disabled) return false
|
|
108
|
+
return !!(this.cell.displayFormula || this.cell.relFormula)
|
|
109
|
+
},
|
|
110
|
+
showOriginalWhenAdjust() {
|
|
111
|
+
return (
|
|
112
|
+
this.cell &&
|
|
113
|
+
this.cell.modifyRank === 2 &&
|
|
114
|
+
this.cell.indicatorResult !== '' &&
|
|
115
|
+
this.cell.indicatorResult !== null
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
methods: {
|
|
120
|
+
originalValue(cell) {
|
|
121
|
+
const val = cell.indicatorResult
|
|
122
|
+
if (val === '' || val == null) return ''
|
|
123
|
+
let text = Number(val).toFixed(this.digits)
|
|
124
|
+
if (cell.showStyle === 2) {
|
|
125
|
+
text = addThousands(toFixedTrunc(val, this.digits))
|
|
126
|
+
}
|
|
127
|
+
const suffix = cell.displayStyle === 1 && (val || val === 0) ? '%' : ''
|
|
128
|
+
return text + suffix
|
|
129
|
+
},
|
|
130
|
+
displayValue(cell) {
|
|
131
|
+
// 满分值列:按录入原样展示,不做位数格式化
|
|
132
|
+
if (this.column.isFullScore) {
|
|
133
|
+
const val =
|
|
134
|
+
cell.result !== '' && cell.result != null ? cell.result : cell.value
|
|
135
|
+
if (val === '' || val == null) return ''
|
|
136
|
+
return String(val)
|
|
137
|
+
}
|
|
138
|
+
// 得分列:固定 2 位四舍五入,不读模型 digits
|
|
139
|
+
if (this.column.disabled) {
|
|
140
|
+
const val =
|
|
141
|
+
cell.result !== '' && cell.result != null ? cell.result : cell.value
|
|
142
|
+
return formatScoreText(val, { thousands: cell.showStyle === 2 })
|
|
143
|
+
}
|
|
144
|
+
const val = cell.value
|
|
145
|
+
if (val === '' || val == null) return ''
|
|
146
|
+
if (typeof val === 'object' && val.scoreText) return val.scoreText
|
|
147
|
+
let text = val || val === 0 ? Number(val).toFixed(this.digits) : ''
|
|
148
|
+
if (cell.showStyle === 2 && text) {
|
|
149
|
+
text = addThousands(toFixedTrunc(val, this.digits))
|
|
150
|
+
}
|
|
151
|
+
const suffix = cell.displayStyle === 1 && (val || val === 0) ? '%' : ''
|
|
152
|
+
return text + suffix
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
</script>
|
|
157
|
+
|
|
158
|
+
<style lang="less" scoped>
|
|
159
|
+
.full-w {
|
|
160
|
+
width: 100%;
|
|
161
|
+
}
|
|
162
|
+
.select-top {
|
|
163
|
+
margin-top: 2px;
|
|
164
|
+
height: 14px;
|
|
165
|
+
line-height: 16px;
|
|
166
|
+
font-size: 14px;
|
|
167
|
+
}
|
|
168
|
+
.select-bottom {
|
|
169
|
+
margin-top: 1px;
|
|
170
|
+
min-height: 14px;
|
|
171
|
+
line-height: 16px;
|
|
172
|
+
color: #999999;
|
|
173
|
+
font-size: 13px;
|
|
174
|
+
max-width: 500px;
|
|
175
|
+
white-space: normal;
|
|
176
|
+
word-wrap: break-word;
|
|
177
|
+
}
|
|
178
|
+
/deep/ .el-select .el-input__inner {
|
|
179
|
+
text-align: center;
|
|
180
|
+
}
|
|
181
|
+
</style>
|