@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,254 +1,258 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="measure-stat-flat">
|
|
3
|
-
<div v-if="!rows.length" class="stat-empty">暂无统计数据</div>
|
|
4
|
-
<vxe-table
|
|
5
|
-
v-else
|
|
6
|
-
border
|
|
7
|
-
:data="rows"
|
|
8
|
-
:merge-cells="mergeCells"
|
|
9
|
-
:row-config="{ keyField: '_rowKey' }"
|
|
10
|
-
:scroll-y="{ enabled: false }"
|
|
11
|
-
>
|
|
12
|
-
<vxe-column field="pName" title="指标项" min-width="150" align="center" />
|
|
13
|
-
<vxe-column field="statsName" title="统计项名称" min-width="150" align="center" />
|
|
14
|
-
<vxe-column field="name" title="指标名称" min-width="150" align="center">
|
|
15
|
-
<template #default="{ row }">
|
|
16
|
-
<span>{{ row.name }}</span>
|
|
17
|
-
<el-tooltip
|
|
18
|
-
v-if="row.indicatorRemark"
|
|
19
|
-
placement="top"
|
|
20
|
-
effect="dark"
|
|
21
|
-
popper-class="indicator-remark-tooltip"
|
|
22
|
-
>
|
|
23
|
-
<template #content>
|
|
24
|
-
<div class="remark-content">{{ row.indicatorRemark }}</div>
|
|
25
|
-
</template>
|
|
26
|
-
<i class="n20-icon-xinxitishi cur-point color-secondary remark-icon"></i>
|
|
27
|
-
</el-tooltip>
|
|
28
|
-
</template>
|
|
29
|
-
</vxe-column>
|
|
30
|
-
|
|
31
|
-
<vxe-column title="指标模拟数据输入" min-width="280" align="center">
|
|
32
|
-
<template #default="{ row }">
|
|
33
|
-
<template v-if="isQualFn(row)">
|
|
34
|
-
<el-select
|
|
35
|
-
class="full-w"
|
|
36
|
-
v-model="row.value"
|
|
37
|
-
:disabled="ctx.readonly"
|
|
38
|
-
size="small"
|
|
39
|
-
placeholder="请选择"
|
|
40
|
-
value-key="scoreMapID"
|
|
41
|
-
@change="onQualChange(row)"
|
|
42
|
-
>
|
|
43
|
-
<el-option
|
|
44
|
-
v-for="option in row.optionList"
|
|
45
|
-
:key="option.scoreMapID || option.scoreText"
|
|
46
|
-
:label="option.scoreText"
|
|
47
|
-
:value="option"
|
|
48
|
-
style="height: auto"
|
|
49
|
-
>
|
|
50
|
-
<div class="select-top">{{ option.scoreText }}</div>
|
|
51
|
-
<div class="select-bottom">{{ option.reason }}</div>
|
|
52
|
-
</el-option>
|
|
53
|
-
</el-select>
|
|
54
|
-
</template>
|
|
55
|
-
<template v-else>
|
|
56
|
-
<el-tooltip
|
|
57
|
-
v-if="
|
|
58
|
-
row.sourceType !== 3 &&
|
|
59
|
-
(!row.optionList || !row.optionList.length) &&
|
|
60
|
-
hasFormulaFn(row)
|
|
61
|
-
"
|
|
62
|
-
placement="top"
|
|
63
|
-
effect="dark"
|
|
64
|
-
>
|
|
65
|
-
<div slot="content">
|
|
66
|
-
{{ row.displayFormula }}:
|
|
67
|
-
<br />
|
|
68
|
-
{{ row.relFormula }}
|
|
69
|
-
</div>
|
|
70
|
-
<span>{{ indicatorTextFn(row) }}</span>
|
|
71
|
-
</el-tooltip>
|
|
72
|
-
<span
|
|
73
|
-
v-else-if="
|
|
74
|
-
row.sourceType !== 3 &&
|
|
75
|
-
(!row.optionList || !row.optionList.length)
|
|
76
|
-
"
|
|
77
|
-
>
|
|
78
|
-
{{ indicatorTextFn(row) }}
|
|
79
|
-
</span>
|
|
80
|
-
<InputNumber
|
|
81
|
-
v-if="row.sourceType === 3 && row.itemType == 21"
|
|
82
|
-
class="full-w"
|
|
83
|
-
size="small"
|
|
84
|
-
:type="row.displayStyle === 1 ? 'rate' : 'money'"
|
|
85
|
-
:d-num="digitsFn(row)"
|
|
86
|
-
:disabled="ctx.readonly"
|
|
87
|
-
v-model="row.value"
|
|
88
|
-
placeholder="请输入"
|
|
89
|
-
/>
|
|
90
|
-
<InputNumber
|
|
91
|
-
v-else-if="
|
|
92
|
-
row.modifyRank === 2 &&
|
|
93
|
-
row.indicatorResult !== '' &&
|
|
94
|
-
row.indicatorResult !== null
|
|
95
|
-
"
|
|
96
|
-
class="full-w"
|
|
97
|
-
size="small"
|
|
98
|
-
:type="row.displayStyle === 1 ? 'rate' : 'money'"
|
|
99
|
-
:d-num="digitsFn(row)"
|
|
100
|
-
:disabled="ctx.readonly"
|
|
101
|
-
v-model="row.value"
|
|
102
|
-
placeholder="请输入"
|
|
103
|
-
/>
|
|
104
|
-
</template>
|
|
105
|
-
</template>
|
|
106
|
-
</vxe-column>
|
|
107
|
-
|
|
108
|
-
<vxe-column title="指标得分" width="140" align="center">
|
|
109
|
-
<template #default="{ row }">
|
|
110
|
-
<div>{{ resultFn(row) }}</div>
|
|
111
|
-
<InputNumber
|
|
112
|
-
v-if="
|
|
113
|
-
row.result !== '' &&
|
|
114
|
-
row.result !== null &&
|
|
115
|
-
row.modifyRank === 1
|
|
116
|
-
"
|
|
117
|
-
class="full-w"
|
|
118
|
-
:d-num="
|
|
119
|
-
:max="row.fullScore"
|
|
120
|
-
:disabled="ctx.readonly"
|
|
121
|
-
v-model="row.modifiedResult"
|
|
122
|
-
placeholder="修改指标得分"
|
|
123
|
-
/>
|
|
124
|
-
</template>
|
|
125
|
-
</vxe-column>
|
|
126
|
-
|
|
127
|
-
<vxe-column title="指标值显示" min-width="140" align="center">
|
|
128
|
-
<template #default="{ row }">
|
|
129
|
-
{{ row.indicatorValText || '—' }}
|
|
130
|
-
</template>
|
|
131
|
-
</vxe-column>
|
|
132
|
-
</vxe-table>
|
|
133
|
-
</div>
|
|
134
|
-
</template>
|
|
135
|
-
|
|
136
|
-
<script>
|
|
137
|
-
import { InputNumber } from './ui'
|
|
138
|
-
import { setMergeCells } from '../common'
|
|
139
|
-
import {
|
|
140
|
-
isQualIndicator,
|
|
141
|
-
digitsCalc,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
{ prop: '
|
|
150
|
-
{ prop: '
|
|
151
|
-
{ prop: '
|
|
152
|
-
{ prop: '
|
|
153
|
-
{ prop: '
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="measure-stat-flat">
|
|
3
|
+
<div v-if="!rows.length" class="stat-empty">暂无统计数据</div>
|
|
4
|
+
<vxe-table
|
|
5
|
+
v-else
|
|
6
|
+
border
|
|
7
|
+
:data="rows"
|
|
8
|
+
:merge-cells="mergeCells"
|
|
9
|
+
:row-config="{ keyField: '_rowKey' }"
|
|
10
|
+
:scroll-y="{ enabled: false }"
|
|
11
|
+
>
|
|
12
|
+
<vxe-column field="pName" title="指标项" min-width="150" align="center" />
|
|
13
|
+
<vxe-column field="statsName" title="统计项名称" min-width="150" align="center" />
|
|
14
|
+
<vxe-column field="name" title="指标名称" min-width="150" align="center">
|
|
15
|
+
<template #default="{ row }">
|
|
16
|
+
<span>{{ row.name }}</span>
|
|
17
|
+
<el-tooltip
|
|
18
|
+
v-if="row.indicatorRemark"
|
|
19
|
+
placement="top"
|
|
20
|
+
effect="dark"
|
|
21
|
+
popper-class="indicator-remark-tooltip"
|
|
22
|
+
>
|
|
23
|
+
<template #content>
|
|
24
|
+
<div class="remark-content">{{ row.indicatorRemark }}</div>
|
|
25
|
+
</template>
|
|
26
|
+
<i class="n20-icon-xinxitishi cur-point color-secondary remark-icon"></i>
|
|
27
|
+
</el-tooltip>
|
|
28
|
+
</template>
|
|
29
|
+
</vxe-column>
|
|
30
|
+
|
|
31
|
+
<vxe-column title="指标模拟数据输入" min-width="280" align="center">
|
|
32
|
+
<template #default="{ row }">
|
|
33
|
+
<template v-if="isQualFn(row)">
|
|
34
|
+
<el-select
|
|
35
|
+
class="full-w"
|
|
36
|
+
v-model="row.value"
|
|
37
|
+
:disabled="ctx.readonly"
|
|
38
|
+
size="small"
|
|
39
|
+
placeholder="请选择"
|
|
40
|
+
value-key="scoreMapID"
|
|
41
|
+
@change="onQualChange(row)"
|
|
42
|
+
>
|
|
43
|
+
<el-option
|
|
44
|
+
v-for="option in row.optionList"
|
|
45
|
+
:key="option.scoreMapID || option.scoreText"
|
|
46
|
+
:label="option.scoreText"
|
|
47
|
+
:value="option"
|
|
48
|
+
style="height: auto"
|
|
49
|
+
>
|
|
50
|
+
<div class="select-top">{{ option.scoreText }}</div>
|
|
51
|
+
<div class="select-bottom">{{ option.reason }}</div>
|
|
52
|
+
</el-option>
|
|
53
|
+
</el-select>
|
|
54
|
+
</template>
|
|
55
|
+
<template v-else>
|
|
56
|
+
<el-tooltip
|
|
57
|
+
v-if="
|
|
58
|
+
row.sourceType !== 3 &&
|
|
59
|
+
(!row.optionList || !row.optionList.length) &&
|
|
60
|
+
hasFormulaFn(row)
|
|
61
|
+
"
|
|
62
|
+
placement="top"
|
|
63
|
+
effect="dark"
|
|
64
|
+
>
|
|
65
|
+
<div slot="content">
|
|
66
|
+
{{ row.displayFormula }}:
|
|
67
|
+
<br />
|
|
68
|
+
{{ row.relFormula }}
|
|
69
|
+
</div>
|
|
70
|
+
<span>{{ indicatorTextFn(row) }}</span>
|
|
71
|
+
</el-tooltip>
|
|
72
|
+
<span
|
|
73
|
+
v-else-if="
|
|
74
|
+
row.sourceType !== 3 &&
|
|
75
|
+
(!row.optionList || !row.optionList.length)
|
|
76
|
+
"
|
|
77
|
+
>
|
|
78
|
+
{{ indicatorTextFn(row) }}
|
|
79
|
+
</span>
|
|
80
|
+
<InputNumber
|
|
81
|
+
v-if="row.sourceType === 3 && row.itemType == 21"
|
|
82
|
+
class="full-w"
|
|
83
|
+
size="small"
|
|
84
|
+
:type="row.displayStyle === 1 ? 'rate' : 'money'"
|
|
85
|
+
:d-num="digitsFn(row)"
|
|
86
|
+
:disabled="ctx.readonly"
|
|
87
|
+
v-model="row.value"
|
|
88
|
+
placeholder="请输入"
|
|
89
|
+
/>
|
|
90
|
+
<InputNumber
|
|
91
|
+
v-else-if="
|
|
92
|
+
row.modifyRank === 2 &&
|
|
93
|
+
row.indicatorResult !== '' &&
|
|
94
|
+
row.indicatorResult !== null
|
|
95
|
+
"
|
|
96
|
+
class="full-w"
|
|
97
|
+
size="small"
|
|
98
|
+
:type="row.displayStyle === 1 ? 'rate' : 'money'"
|
|
99
|
+
:d-num="digitsFn(row)"
|
|
100
|
+
:disabled="ctx.readonly"
|
|
101
|
+
v-model="row.value"
|
|
102
|
+
placeholder="请输入"
|
|
103
|
+
/>
|
|
104
|
+
</template>
|
|
105
|
+
</template>
|
|
106
|
+
</vxe-column>
|
|
107
|
+
|
|
108
|
+
<vxe-column title="指标得分" width="140" align="center">
|
|
109
|
+
<template #default="{ row }">
|
|
110
|
+
<div>{{ resultFn(row) }}</div>
|
|
111
|
+
<InputNumber
|
|
112
|
+
v-if="
|
|
113
|
+
row.result !== '' &&
|
|
114
|
+
row.result !== null &&
|
|
115
|
+
row.modifyRank === 1
|
|
116
|
+
"
|
|
117
|
+
class="full-w"
|
|
118
|
+
:d-num="SCORE_DIGITS"
|
|
119
|
+
:max="row.fullScore"
|
|
120
|
+
:disabled="ctx.readonly"
|
|
121
|
+
v-model="row.modifiedResult"
|
|
122
|
+
placeholder="修改指标得分"
|
|
123
|
+
/>
|
|
124
|
+
</template>
|
|
125
|
+
</vxe-column>
|
|
126
|
+
|
|
127
|
+
<vxe-column title="指标值显示" min-width="140" align="center">
|
|
128
|
+
<template #default="{ row }">
|
|
129
|
+
{{ row.indicatorValText || '—' }}
|
|
130
|
+
</template>
|
|
131
|
+
</vxe-column>
|
|
132
|
+
</vxe-table>
|
|
133
|
+
</div>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
<script>
|
|
137
|
+
import { InputNumber } from './ui'
|
|
138
|
+
import { setMergeCells } from '../common'
|
|
139
|
+
import {
|
|
140
|
+
isQualIndicator,
|
|
141
|
+
digitsCalc,
|
|
142
|
+
SCORE_DIGITS,
|
|
143
|
+
resultByShowStyle,
|
|
144
|
+
indicatorResultText
|
|
145
|
+
} from './helpers'
|
|
146
|
+
|
|
147
|
+
/** 与表格列顺序一致,供 setMergeCells 计算列索引 */
|
|
148
|
+
const STAT_FLAT_COLUMNS = [
|
|
149
|
+
{ prop: 'pName' },
|
|
150
|
+
{ prop: 'statsName' },
|
|
151
|
+
{ prop: 'name' },
|
|
152
|
+
{ prop: 'indicatorResult' },
|
|
153
|
+
{ prop: 'result' },
|
|
154
|
+
{ prop: 'indicatorValText' }
|
|
155
|
+
]
|
|
156
|
+
|
|
157
|
+
export default {
|
|
158
|
+
name: 'MeasureStatFlatTable',
|
|
159
|
+
components: { InputNumber },
|
|
160
|
+
inject: ['measureCtx'],
|
|
161
|
+
data() {
|
|
162
|
+
return { SCORE_DIGITS }
|
|
163
|
+
},
|
|
164
|
+
props: {
|
|
165
|
+
rows: {
|
|
166
|
+
type: Array,
|
|
167
|
+
default: () => []
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
computed: {
|
|
171
|
+
ctx() {
|
|
172
|
+
return this.measureCtx()
|
|
173
|
+
},
|
|
174
|
+
/** 同目录(pid)下的「指标项」列合并,对齐旧版 modelCalcTest */
|
|
175
|
+
mergeCells() {
|
|
176
|
+
return setMergeCells({
|
|
177
|
+
list: this.rows,
|
|
178
|
+
columns: STAT_FLAT_COLUMNS,
|
|
179
|
+
merges: ['pName'],
|
|
180
|
+
condition: ['pid'],
|
|
181
|
+
field: 'prop'
|
|
182
|
+
})
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
methods: {
|
|
186
|
+
isQualFn(row) {
|
|
187
|
+
return isQualIndicator(row)
|
|
188
|
+
},
|
|
189
|
+
digitsFn(row) {
|
|
190
|
+
return digitsCalc(row, this.ctx.modelWrap)
|
|
191
|
+
},
|
|
192
|
+
resultFn(row) {
|
|
193
|
+
return resultByShowStyle(row, this.ctx.modelWrap)
|
|
194
|
+
},
|
|
195
|
+
indicatorTextFn(row) {
|
|
196
|
+
return indicatorResultText(row, this.ctx.modelWrap)
|
|
197
|
+
},
|
|
198
|
+
hasFormulaFn(row) {
|
|
199
|
+
return !!(row && (row.displayFormula || row.relFormula))
|
|
200
|
+
},
|
|
201
|
+
onQualChange(row) {
|
|
202
|
+
const option = row.value
|
|
203
|
+
if (!option || !option.scoreMapID) return
|
|
204
|
+
this.$set(row, 'scoreMapID', option.scoreMapID)
|
|
205
|
+
this.$set(row, 'scoreText', option.scoreText)
|
|
206
|
+
this.$set(row, 'scoreValue', option.scoreValue)
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
</script>
|
|
211
|
+
|
|
212
|
+
<style lang="less">
|
|
213
|
+
.indicator-remark-tooltip {
|
|
214
|
+
max-width: 360px;
|
|
215
|
+
.remark-content {
|
|
216
|
+
white-space: pre-wrap;
|
|
217
|
+
word-break: break-word;
|
|
218
|
+
line-height: 1.6;
|
|
219
|
+
font-size: 14px;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
</style>
|
|
223
|
+
|
|
224
|
+
<style lang="less" scoped>
|
|
225
|
+
.measure-stat-flat {
|
|
226
|
+
width: 100%;
|
|
227
|
+
}
|
|
228
|
+
.remark-icon {
|
|
229
|
+
margin-left: 4px;
|
|
230
|
+
}
|
|
231
|
+
.full-w {
|
|
232
|
+
width: 100%;
|
|
233
|
+
}
|
|
234
|
+
.stat-empty {
|
|
235
|
+
padding: 12px;
|
|
236
|
+
color: #909399;
|
|
237
|
+
text-align: center;
|
|
238
|
+
}
|
|
239
|
+
.select-top {
|
|
240
|
+
margin-top: 2px;
|
|
241
|
+
height: 14px;
|
|
242
|
+
line-height: 16px;
|
|
243
|
+
font-size: 14px;
|
|
244
|
+
}
|
|
245
|
+
.select-bottom {
|
|
246
|
+
margin-top: 1px;
|
|
247
|
+
min-height: 14px;
|
|
248
|
+
line-height: 16px;
|
|
249
|
+
color: #999999;
|
|
250
|
+
font-size: 14px;
|
|
251
|
+
max-width: 500px;
|
|
252
|
+
white-space: normal;
|
|
253
|
+
word-wrap: break-word;
|
|
254
|
+
}
|
|
255
|
+
/deep/ .el-select .el-input__inner {
|
|
256
|
+
text-align: center;
|
|
257
|
+
}
|
|
258
|
+
</style>
|