n20-common-lib 2.6.29 → 2.6.32

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
@@ -1,25 +1,26 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "2.6.29",
3
+ "version": "2.6.32",
4
4
  "private": false,
5
- "main": "src/index.js",
6
5
  "scripts": {
7
- "dev": "vue-cli-service serve --doc",
8
- "build:docs": "vue-cli-service build --doc",
9
6
  "serve": "vue-cli-service serve",
10
- "serve:theme": "vue-cli-service serve --testTheme",
11
- "test": "vue-cli-service serve --test",
12
7
  "build": "node versionInfo.js && npm run build:css && vue-cli-service build --testTheme",
8
+ "test:unit": "vue-cli-service test:unit",
13
9
  "lint": "vue-cli-service lint",
14
- "info": "node versionInfo.js",
15
10
  "build:Jenkins_1": "vue-cli-service build --serverConfig ./server-config-jenkins.jsonc",
16
- "build:gzip": "vue-cli-service build --gzip",
17
- "build:report": "vue-cli-service build --analy",
18
11
  "build:css": "node build_css",
19
- "build:js": "vue-cli-service build --formats umd-min --target lib src/index.js --name index --dest lib --analy",
20
12
  "build:doc": "node versionInfo.js && vue-cli-service build --testTheme",
21
- "getI18n": "node ./node_modules/nstc-get-i18n"
13
+ "build:docs": "vue-cli-service build --doc",
14
+ "build:gzip": "vue-cli-service build --gzip",
15
+ "build:js": "vue-cli-service build --formats umd-min --target lib src/index.js --name index --dest lib --analy",
16
+ "build:report": "vue-cli-service build --analy",
17
+ "dev": "vue-cli-service serve --doc",
18
+ "getI18n": "node ./node_modules/nstc-get-i18n",
19
+ "info": "node versionInfo.js",
20
+ "serve:theme": "vue-cli-service serve --testTheme",
21
+ "test": "vue-cli-service serve --test"
22
22
  },
23
+ "main": "src/index.js",
23
24
  "files": [
24
25
  "src/_qiankun",
25
26
  "src/assets",
@@ -54,7 +55,7 @@
54
55
  "lz-string": "^1.4.4",
55
56
  "normalize.css": "^8.0.1",
56
57
  "numerify": "*",
57
- "nzh": "1.0.12",
58
+ "nzh": "^1.0.12",
58
59
  "panzoom": "*",
59
60
  "qrcode": "*",
60
61
  "resize-detector": "*",
@@ -63,26 +64,31 @@
63
64
  "vuedraggable": "*"
64
65
  },
65
66
  "devDependencies": {
66
- "element-ui": "^2.15.14",
67
67
  "@babel/plugin-proposal-optional-chaining": "^7.14.5",
68
68
  "@babel/plugin-transform-flow-comments": "^7.14.5",
69
69
  "@vue/cli-plugin-babel": "~4.5.0",
70
70
  "@vue/cli-plugin-eslint": "~4.5.0",
71
+ "@vue/cli-plugin-unit-jest": "^5.0.8",
71
72
  "@vue/cli-service": "~4.5.0",
72
73
  "@vue/compiler-dom": "^3.2.47",
74
+ "@vue/test-utils": "^1.1.3",
75
+ "@vue/vue2-jest": "^27.0.0-alpha.2",
73
76
  "babel-eslint": "^10.1.0",
77
+ "babel-jest": "^27.0.6",
74
78
  "babel-plugin-component": "^1.1.1",
75
79
  "clipboard": "^2.0.11",
76
80
  "compression-webpack-plugin": "^3.1.0",
77
81
  "copy-webpack-plugin": "^6.4.1",
78
82
  "core-js": "^3.6.5",
79
83
  "echarts": "^5.3.3",
84
+ "element-ui": "^2.15.14",
80
85
  "eslint": "^6.7.2",
81
86
  "eslint-plugin-vue": "^6.2.2",
82
87
  "exceljs": "^4.3.0",
83
88
  "file-saver": "^2.0.5",
84
89
  "fuse.js": "^6.6.2",
85
90
  "html-webpack-tags-plugin": "^2.0.17",
91
+ "jest": "^27.0.5",
86
92
  "jszip": "^3.10.0",
87
93
  "lodash": "^4.17.21",
88
94
  "md2vue-loader": "file:./md2vue-loader",
@@ -103,6 +109,7 @@
103
109
  "vue": "^2.6.11",
104
110
  "vue-cli-plugin-axios": "~0.0.4",
105
111
  "vue-grid-layout": "^2.3.12",
112
+ "vue-jest": "^3.0.7",
106
113
  "vue-router": "^3.5.2",
107
114
  "vue-template-compiler": "^2.6.11",
108
115
  "vuex": "^3.6.2",
@@ -348,6 +348,7 @@ export default {
348
348
  'update:end-value': (value) => {
349
349
  this.$set(form, item.endValue, value)
350
350
  },
351
+ clear: this.handleClear,
351
352
  blur: this.handleBlur,
352
353
  ...item.on
353
354
  },
@@ -12,6 +12,7 @@
12
12
  v-if="!uploadHttpRequest"
13
13
  v-bind="uploadProps"
14
14
  :width="width"
15
+ :showErrorExport="showErrorExport"
15
16
  :validate-result="validateResult"
16
17
  :validate-confirm="validateConfirm"
17
18
  :pagination="pagination"
@@ -24,6 +25,7 @@
24
25
  :title="'导入文件' | $lc"
25
26
  :visible.sync="errorV"
26
27
  :width="width"
28
+ :showErrorExport="showErrorExport"
27
29
  :validate-result="validateResult"
28
30
  :hide-percent="true"
29
31
  :footer-btn="footer"
@@ -77,6 +79,10 @@ export default {
77
79
  type: Boolean,
78
80
  default: false
79
81
  },
82
+ showErrorExport: {
83
+ type: Boolean,
84
+ default: false
85
+ },
80
86
  validateDialog: {
81
87
  type: Boolean,
82
88
  default: false
@@ -7,6 +7,7 @@
7
7
  :type="type"
8
8
  style="width: calc(50% - 8px)"
9
9
  @input="startChange"
10
+ @clear="$emit('clear')"
10
11
  @blur="blurFn"
11
12
  />
12
13
  <span class="numbre-range text-c" style="display: inline-block; width: 16px">-</span>
@@ -17,6 +18,7 @@
17
18
  :type="type"
18
19
  style="width: calc(50% - 8px)"
19
20
  @input="endChange"
21
+ @clear="$emit('clear')"
20
22
  @blur="blurFn"
21
23
  />
22
24
  </div>
@@ -42,6 +42,7 @@
42
42
  :percent="percent"
43
43
  :width="width"
44
44
  title="文件导入"
45
+ :showErrorExport="showErrorExport"
45
46
  :pagination="pagination"
46
47
  :footer-btn="footer"
47
48
  :validate-result="validateResult"
@@ -169,6 +170,10 @@ export default {
169
170
  footer: {
170
171
  type: Object,
171
172
  default: undefined
173
+ },
174
+ showErrorExport: {
175
+ type: Boolean,
176
+ default: false
172
177
  }
173
178
  },
174
179
  data() {
@@ -49,7 +49,7 @@
49
49
  <div class="bd-a">
50
50
  <div class="flex-box flex-lr flex-v m-t m-b p-l p-r">
51
51
  <span>{{ '无效数据详情' | $lc }}</span>
52
- <el-button type="text" @click="importError">{{ '导出错误数据' | $lc }}</el-button>
52
+ <el-button type="text" v-if="showErrorExport" @click="importError">{{ '导出错误数据' | $lc }}</el-button>
53
53
  </div>
54
54
  <el-table ref="tables" :key="index" :data="errorListC" border style="width: 100%" height="300px">
55
55
  <el-table-column
@@ -161,6 +161,10 @@ export default {
161
161
  hidePercent: {
162
162
  type: Boolean,
163
163
  default: false
164
+ },
165
+ showErrorExport: {
166
+ type: Boolean,
167
+ default: false
164
168
  }
165
169
  },
166
170
  filters: {
@@ -182,7 +186,7 @@ export default {
182
186
  errorList: {
183
187
  handler() {
184
188
  this.errorListC = this.errorList
185
- this.page.total = Math.ceil(this.tableData.length / this.page.pageSize)
189
+ this.page.total = this.tableData.length
186
190
  }
187
191
  },
188
192
  page: {
@@ -222,8 +226,7 @@ export default {
222
226
  this.tableData = cloneDeep(_errorList)
223
227
  const startIndex = (this.page.current - 1) * this.page.pageSize
224
228
  const endIndex = startIndex + this.page.pageSize
225
- let dto = this.tableData.slice(startIndex, endIndex)
226
- return dto
229
+ return this.pagination ? this.tableData.slice(startIndex, endIndex) : this.tableData
227
230
  } else {
228
231
  return undefined
229
232
  }
@@ -250,7 +253,6 @@ export default {
250
253
  const startIndex = (this.page.current - 1) * this.page.pageSize
251
254
  const endIndex = startIndex + this.page.pageSize
252
255
  this.errorListC = this.tableData.slice(startIndex, endIndex)
253
-
254
256
  this.index += 1
255
257
  this.$nextTick(() => {
256
258
  this.$refs.tables.doLayout()
@@ -4,7 +4,7 @@ export const convert = (
4
4
  money,
5
5
  options = {
6
6
  ch: '零壹贰叁肆伍陆柒捌玖', // 数字字符
7
- ch_u: '个十百千万亿兆京', // 数位单位字符,万以下十进制,万以上万进制,个位不能省略
7
+ ch_u: '个拾佰仟万亿兆京', // 数位单位字符,万以下十进制,万以上万进制,个位不能省略
8
8
  ch_f: '负', // 负字符
9
9
  ch_d: '点', // 小数点字符
10
10
  m_u: '元角分厘', // 金额单位