@nstc-business/imes 1.0.12 → 1.0.13

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 CHANGED
@@ -27,15 +27,29 @@ export default {
27
27
  :code="modelCode"
28
28
  :log-id="logId"
29
29
  :model-data="modelData"
30
+ :readonly="isReadonly"
30
31
  :show-measure-cond="true"
31
32
  :cond-param="condParam"
32
33
  @calcResult="handleCalcResult"
33
34
  @getLogId="handleLogId"
35
+ @modelLoaded="handleModelLoaded"
36
+ @calcComplete="handleCalcComplete"
34
37
  />
35
38
  ```
36
39
 
37
40
  `modelData` 和 `id/code/logId` 二选一;传入 `modelData` 时优先使用完整模型数据。执行测算时必须提供 `condParam.cltNo`,或开启 `showMeasureCond` 由用户填写单位编号。
38
41
 
42
+ `readonly` 会隐藏整体和子模型测算按钮,并禁用所有录入项,展开、收起和锚点查看仍然可用。`modelLoaded` 返回组件归一化后的模型值,`calcComplete` 返回完整测算结果;原有的 `calcResult` 和 `getLogId` 事件继续兼容。
43
+
44
+ 宿主保存或提交前可通过公开方法完成校验和取值:
45
+
46
+ ```js
47
+ const validation = this.$refs.measureCalc.validate({ silent: true })
48
+ const value = this.$refs.measureCalc.getValue()
49
+ ```
50
+
51
+ `getValue()` 包含模型编号、版本、日志 ID、结果、测算入参以及兼容旧评级申报书的 `qualitativeData` 字符串。
52
+
39
53
  宿主项目需要先安装 Element UI 和 n20-common-lib。`Vue.use(n20)` 会注入组件使用的 `$axios`:
40
54
 
41
55
  ```js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nstc-business/imes",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -438,8 +438,7 @@ export default {
438
438
  modelData: {
439
439
  handler() {
440
440
  this.init()
441
- },
442
- deep: true
441
+ }
443
442
  }
444
443
  },
445
444
  mounted() {
package/src/index.js CHANGED
@@ -19,7 +19,7 @@ if (typeof window !== 'undefined' && window.Vue) {
19
19
  }
20
20
 
21
21
  export default {
22
- version: '1.0.12',
22
+ version: '1.0.13',
23
23
  install,
24
24
  ModelCalculate,
25
25
  MeasureCalc,