@nstc-business/imes 1.0.28 → 1.0.29
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 +88 -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 -624
- package/src/components/measureCalc/MeasureEvalFlatTable.vue +438 -438
- package/src/components/measureCalc/MeasureGroupBlocks.vue +218 -208
- package/src/components/measureCalc/MeasureQualAnalysis.vue +436 -415
- package/src/components/measureCalc/MeasureStatCell.vue +181 -181
- package/src/components/measureCalc/MeasureStatFlatTable.vue +258 -258
- package/src/components/measureCalc/MeasureStatModelTable.vue +196 -196
- package/src/components/measureCalc/MeasureStatPanel.vue +45 -45
- package/src/components/measureCalc/MeasureSubModelPanel.vue +83 -83
- package/src/components/measureCalc/MeasureTreeTable.vue +817 -817
- package/src/components/measureCalc/api.js +18 -18
- package/src/components/measureCalc/helpers.js +507 -507
- package/src/components/measureCalc/index.vue +1692 -1676
- package/src/components/measureCalc/statModelHelper.js +585 -585
- 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
package/README.md
CHANGED
|
@@ -1,87 +1,88 @@
|
|
|
1
|
-
### 模型测算工具
|
|
2
|
-
|
|
3
|
-
```
|
|
4
|
-
import modelCalculate from '@nstc-business/imes/src/components/model-calculate/index.vue'
|
|
5
|
-
<modelCalculate :modelId="modelId"></modelCalculate>
|
|
6
|
-
```
|
|
7
|
-
|
|
8
|
-
### 新版模型测算组件
|
|
9
|
-
|
|
10
|
-
指标计量项目可以直接把原来的本地组件导入替换为包导入:
|
|
11
|
-
|
|
12
|
-
```js
|
|
13
|
-
import { MeasureCalc } from '@nstc-business/imes'
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
components: {
|
|
17
|
-
measureCalc: MeasureCalc
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
原模板不需要改名:
|
|
23
|
-
|
|
24
|
-
```vue
|
|
25
|
-
<measureCalc
|
|
26
|
-
:id="modelId"
|
|
27
|
-
:code="modelCode"
|
|
28
|
-
:log-id="logId"
|
|
29
|
-
:model-data="modelData"
|
|
30
|
-
:readonly="isReadonly"
|
|
31
|
-
:show-measure-cond="true"
|
|
32
|
-
:
|
|
33
|
-
|
|
34
|
-
@
|
|
35
|
-
@
|
|
36
|
-
@
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
import '
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Vue.use(
|
|
66
|
-
Vue.use(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
1
|
+
### 模型测算工具
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
import modelCalculate from '@nstc-business/imes/src/components/model-calculate/index.vue'
|
|
5
|
+
<modelCalculate :modelId="modelId"></modelCalculate>
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
### 新版模型测算组件
|
|
9
|
+
|
|
10
|
+
指标计量项目可以直接把原来的本地组件导入替换为包导入:
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
import { MeasureCalc } from '@nstc-business/imes'
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
components: {
|
|
17
|
+
measureCalc: MeasureCalc
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
原模板不需要改名:
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
<measureCalc
|
|
26
|
+
:id="modelId"
|
|
27
|
+
:code="modelCode"
|
|
28
|
+
:log-id="logId"
|
|
29
|
+
:model-data="modelData"
|
|
30
|
+
:readonly="isReadonly"
|
|
31
|
+
:show-measure-cond="true"
|
|
32
|
+
:default-collapsed="true"
|
|
33
|
+
:cond-param="condParam"
|
|
34
|
+
@calcResult="handleCalcResult"
|
|
35
|
+
@getLogId="handleLogId"
|
|
36
|
+
@modelLoaded="handleModelLoaded"
|
|
37
|
+
@calcComplete="handleCalcComplete"
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`modelData` 和 `id/code/logId` 二选一;传入 `modelData` 时优先使用完整模型数据。执行测算时必须提供 `condParam.cltNo`,或开启 `showMeasureCond` 由用户填写单位编号。
|
|
42
|
+
|
|
43
|
+
`readonly` 会隐藏整体和子模型测算按钮,并禁用所有录入项,展开、收起和锚点查看仍然可用。`defaultCollapsed` 控制模型加载后是否默认收起全部分组/分区,默认 `false`(不收起);传 `true` 时初始全部收起,仍可用「全部展开」或单个展开。`modelLoaded` 返回组件归一化后的模型值,`calcComplete` 返回完整测算结果;原有的 `calcResult` 和 `getLogId` 事件继续兼容。
|
|
44
|
+
|
|
45
|
+
宿主保存或提交前可通过公开方法完成校验和取值:
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
const validation = this.$refs.measureCalc.validate({ silent: true })
|
|
49
|
+
const value = this.$refs.measureCalc.getValue()
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`getValue()` 包含模型编号、版本、日志 ID、结果、测算入参以及兼容旧评级申报书的 `qualitativeData` 字符串。
|
|
53
|
+
|
|
54
|
+
宿主项目需要先安装 Element UI 和 n20-common-lib。`Vue.use(n20)` 会注入组件使用的 `$axios`:
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
import Vue from 'vue'
|
|
58
|
+
import ElementUI from 'element-ui'
|
|
59
|
+
import n20 from 'n20-common-lib'
|
|
60
|
+
import Imes from '@nstc-business/imes'
|
|
61
|
+
|
|
62
|
+
import 'element-ui/lib/theme-chalk/index.css'
|
|
63
|
+
import 'n20-common-lib/style/index.css'
|
|
64
|
+
|
|
65
|
+
Vue.use(ElementUI)
|
|
66
|
+
Vue.use(n20, { prefix: 'N20' })
|
|
67
|
+
Vue.use(Imes)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
全局安装后组件名默认为 `<n-measure-calc />`。如果宿主使用 Vue CLI,因为包发布的是源码,需要在 `vue.config.js` 中保留:
|
|
71
|
+
|
|
72
|
+
```js
|
|
73
|
+
module.exports = {
|
|
74
|
+
transpileDependencies: ['n20-common-lib', '@nstc-business/imes']
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 测算详情弹框
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
import calculateDetailDialog from "@nstc-business/imes/src/components/calculateDetail/dialog.vue";
|
|
82
|
+
<calculateDetailDialog ref="calculateDetailDialog"></calculateDetailDialog>
|
|
83
|
+
this.$refs.calculateDetailDialog.open({
|
|
84
|
+
modelId: '476cfddfec584e3ab5ae53719ff03819',
|
|
85
|
+
logId: '9ed289ff9e4c46f99df7f58172011d7b',
|
|
86
|
+
showModelInfo: true // 是否显示模型信息
|
|
87
|
+
});
|
|
88
|
+
```
|
package/package.json
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@nstc-business/imes",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"private": false,
|
|
5
|
-
"main": "src/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"serve": "vue-cli-service serve",
|
|
8
|
-
"test": "vue-cli-service serve --test",
|
|
9
|
-
"deadcode": "vue-cli-service serve --seecode",
|
|
10
|
-
"analy": "vue-cli-service build --analy",
|
|
11
|
-
"getI18n": "node ./node_modules/nstc-get-i18n",
|
|
12
|
-
"format": "prettier --write \"./**/*.{html,vue,ts,js,json,md}\"",
|
|
13
|
-
"build": "vue-cli-service build"
|
|
14
|
-
},
|
|
15
|
-
"publishConfig": {
|
|
16
|
-
"access": "public"
|
|
17
|
-
},
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"axios": "^1.15.1",
|
|
20
|
-
"core-js": "^3.6.5",
|
|
21
|
-
"dayjs": "^1.10.7",
|
|
22
|
-
"echarts": "^5.3.3",
|
|
23
|
-
"el-table-draggable": "^1.4.4",
|
|
24
|
-
"element-ui": "^2.15.6",
|
|
25
|
-
"jquery": "^3.6.0",
|
|
26
|
-
"moment": "^2.30.1",
|
|
27
|
-
"qrcode": "^1.5.0",
|
|
28
|
-
"resize-detector": "^0.3.0",
|
|
29
|
-
"swiper": "^11.1.14",
|
|
30
|
-
"vue": "^2.6.11",
|
|
31
|
-
"vue-router": "^3.5.2",
|
|
32
|
-
"vuedraggable": "^2.24.3",
|
|
33
|
-
"vuex": "^3.6.2",
|
|
34
|
-
"vxe-table": "3.6.17",
|
|
35
|
-
"xe-utils": "^3.5.11",
|
|
36
|
-
"n20-common-lib": "2.9.115"
|
|
37
|
-
},
|
|
38
|
-
"files": [
|
|
39
|
-
"src/components",
|
|
40
|
-
"src/index.js"
|
|
41
|
-
],
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
|
44
|
-
"@babel/plugin-transform-flow-comments": "^7.14.5",
|
|
45
|
-
"@vue/cli-plugin-babel": "~4.5.0",
|
|
46
|
-
"@vue/cli-plugin-eslint": "~4.5.0",
|
|
47
|
-
"@vue/cli-service": "~4.5.0",
|
|
48
|
-
"@vue/compiler-sfc": "^3.0.0-rc.6",
|
|
49
|
-
"babel-eslint": "^10.1.0",
|
|
50
|
-
"babel-plugin-component": "^1.1.1",
|
|
51
|
-
"compression-webpack-plugin": "^3.1.0",
|
|
52
|
-
"copy-webpack-plugin": "^6.4.1",
|
|
53
|
-
"eslint": "^6.7.2",
|
|
54
|
-
"prettier": "^3.0.3",
|
|
55
|
-
"husky": "^8.0.0",
|
|
56
|
-
"eslint-plugin-vue": "^6.2.2",
|
|
57
|
-
"less": "^3.12.2",
|
|
58
|
-
"nstc-gitinfo": "^0.0.6",
|
|
59
|
-
"nstc-get-i18n": "^0.0.3",
|
|
60
|
-
"less-loader": "^7.0.0",
|
|
61
|
-
"vue-template-compiler": "^2.6.11",
|
|
62
|
-
"webpack": "^4.46.0",
|
|
63
|
-
"webpack-bundle-analyzer": "^3.9.0",
|
|
64
|
-
"webpack-deadcode-plugin": "^0.1.15"
|
|
65
|
-
},
|
|
66
|
-
"browserslist": [
|
|
67
|
-
"> 1%",
|
|
68
|
-
"last 2 versions",
|
|
69
|
-
"not dead"
|
|
70
|
-
]
|
|
71
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@nstc-business/imes",
|
|
3
|
+
"version": "1.0.29",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"serve": "vue-cli-service serve",
|
|
8
|
+
"test": "vue-cli-service serve --test",
|
|
9
|
+
"deadcode": "vue-cli-service serve --seecode",
|
|
10
|
+
"analy": "vue-cli-service build --analy",
|
|
11
|
+
"getI18n": "node ./node_modules/nstc-get-i18n",
|
|
12
|
+
"format": "prettier --write \"./**/*.{html,vue,ts,js,json,md}\"",
|
|
13
|
+
"build": "vue-cli-service build"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"axios": "^1.15.1",
|
|
20
|
+
"core-js": "^3.6.5",
|
|
21
|
+
"dayjs": "^1.10.7",
|
|
22
|
+
"echarts": "^5.3.3",
|
|
23
|
+
"el-table-draggable": "^1.4.4",
|
|
24
|
+
"element-ui": "^2.15.6",
|
|
25
|
+
"jquery": "^3.6.0",
|
|
26
|
+
"moment": "^2.30.1",
|
|
27
|
+
"qrcode": "^1.5.0",
|
|
28
|
+
"resize-detector": "^0.3.0",
|
|
29
|
+
"swiper": "^11.1.14",
|
|
30
|
+
"vue": "^2.6.11",
|
|
31
|
+
"vue-router": "^3.5.2",
|
|
32
|
+
"vuedraggable": "^2.24.3",
|
|
33
|
+
"vuex": "^3.6.2",
|
|
34
|
+
"vxe-table": "3.6.17",
|
|
35
|
+
"xe-utils": "^3.5.11",
|
|
36
|
+
"n20-common-lib": "2.9.115"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"src/components",
|
|
40
|
+
"src/index.js"
|
|
41
|
+
],
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
|
44
|
+
"@babel/plugin-transform-flow-comments": "^7.14.5",
|
|
45
|
+
"@vue/cli-plugin-babel": "~4.5.0",
|
|
46
|
+
"@vue/cli-plugin-eslint": "~4.5.0",
|
|
47
|
+
"@vue/cli-service": "~4.5.0",
|
|
48
|
+
"@vue/compiler-sfc": "^3.0.0-rc.6",
|
|
49
|
+
"babel-eslint": "^10.1.0",
|
|
50
|
+
"babel-plugin-component": "^1.1.1",
|
|
51
|
+
"compression-webpack-plugin": "^3.1.0",
|
|
52
|
+
"copy-webpack-plugin": "^6.4.1",
|
|
53
|
+
"eslint": "^6.7.2",
|
|
54
|
+
"prettier": "^3.0.3",
|
|
55
|
+
"husky": "^8.0.0",
|
|
56
|
+
"eslint-plugin-vue": "^6.2.2",
|
|
57
|
+
"less": "^3.12.2",
|
|
58
|
+
"nstc-gitinfo": "^0.0.6",
|
|
59
|
+
"nstc-get-i18n": "^0.0.3",
|
|
60
|
+
"less-loader": "^7.0.0",
|
|
61
|
+
"vue-template-compiler": "^2.6.11",
|
|
62
|
+
"webpack": "^4.46.0",
|
|
63
|
+
"webpack-bundle-analyzer": "^3.9.0",
|
|
64
|
+
"webpack-deadcode-plugin": "^0.1.15"
|
|
65
|
+
},
|
|
66
|
+
"browserslist": [
|
|
67
|
+
"> 1%",
|
|
68
|
+
"last 2 versions",
|
|
69
|
+
"not dead"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Dialog
|
|
3
|
-
v-drag
|
|
4
|
-
:visible.sync="visible"
|
|
5
|
-
title="模型应用详情"
|
|
6
|
-
width="85%"
|
|
7
|
-
max-dialog
|
|
8
|
-
:destroy-on-open="true"
|
|
9
|
-
>
|
|
10
|
-
<calculate-detail :logId="logId" :modelId="modelId" :showModelInfo="showModelInfo" />
|
|
11
|
-
</Dialog>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
import {Dialog} from 'n20-common-lib'
|
|
16
|
-
import calculateDetail from './index.vue'
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
name: 'calculateDetailDialog',
|
|
20
|
-
components: {Dialog, calculateDetail},
|
|
21
|
-
data() {
|
|
22
|
-
return {
|
|
23
|
-
visible: false,
|
|
24
|
-
logId: '',
|
|
25
|
-
modelId: '',
|
|
26
|
-
showModelInfo: true
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
methods: {
|
|
30
|
-
open(value) {
|
|
31
|
-
this.visible = true
|
|
32
|
-
this.logId = value.logId
|
|
33
|
-
this.modelId = value.modelId
|
|
34
|
-
this.showModelInfo = value.showModelInfo
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<Dialog
|
|
3
|
+
v-drag
|
|
4
|
+
:visible.sync="visible"
|
|
5
|
+
title="模型应用详情"
|
|
6
|
+
width="85%"
|
|
7
|
+
max-dialog
|
|
8
|
+
:destroy-on-open="true"
|
|
9
|
+
>
|
|
10
|
+
<calculate-detail :logId="logId" :modelId="modelId" :showModelInfo="showModelInfo" />
|
|
11
|
+
</Dialog>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import {Dialog} from 'n20-common-lib'
|
|
16
|
+
import calculateDetail from './index.vue'
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: 'calculateDetailDialog',
|
|
20
|
+
components: {Dialog, calculateDetail},
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
visible: false,
|
|
24
|
+
logId: '',
|
|
25
|
+
modelId: '',
|
|
26
|
+
showModelInfo: true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
open(value) {
|
|
31
|
+
this.visible = true
|
|
32
|
+
this.logId = value.logId
|
|
33
|
+
this.modelId = value.modelId
|
|
34
|
+
this.showModelInfo = value.showModelInfo
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
</script>
|