t20-common-lib 0.14.7 → 0.14.8

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,6 +1,6 @@
1
1
  {
2
2
  "name": "t20-common-lib",
3
- "version": "0.14.7",
3
+ "version": "0.14.8",
4
4
  "description": "T20",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -4,7 +4,7 @@
4
4
  style="margin-bottom: 0; margin-top: 30px"
5
5
  :width="width"
6
6
  :visible.sync="progressV"
7
- :title="title"
7
+ :title="dialogTitle"
8
8
  append-to-body
9
9
  :close-on-click-modal="false"
10
10
  :close-on-press-escape="false"
@@ -13,14 +13,14 @@
13
13
  <slot name="top" :validateResult="validateResult"></slot>
14
14
  <div style="min-height: 28px">
15
15
  <template v-if="!hidePercent">
16
- <p v-if="!percentType">系统处理中,请稍等......</p>
16
+ <p v-if="!percentType">{{ $lc('系统处理中,请稍等......') }}</p>
17
17
  <div v-else>
18
18
  <div v-if="validateResult" class="m-b">
19
- <span class="m-r-m">导入文件</span>
19
+ <span class="m-r-m">{{ $lc('导入文件') }}</span>
20
20
  {{ validateResult.name }}
21
21
  </div>
22
22
  <div class="flex-box">
23
- <div class="m-r-m">导入进度</div>
23
+ <div class="m-r-m">{{ $lc('导入进度') }}</div>
24
24
  <div class="flex-item">
25
25
  <el-progress
26
26
  class="m-b"
@@ -33,24 +33,24 @@
33
33
  </template>
34
34
  <template v-if="validateResult">
35
35
  <div class="m-b">
36
- <span class="m-r">导入统计</span>
37
- <span>共计导入{{ validateResult.totalNum }}条,</span>
36
+ <span class="m-r">{{ $lc('导入统计') }}</span>
37
+ <span>{{ $lc('共计导入') }}{{ validateResult.totalNum }}{{ $lc('条') }},</span>
38
38
  <span class="m-r-s">
39
- 其中有效数据
39
+ {{ $lc('其中有效数据') }}
40
40
  <span class="color-success">{{ validateResult.successNum }}</span>
41
- 条,
41
+ {{ $lc('条') }},
42
42
  </span>
43
43
  <span>
44
- 无效数据
44
+ {{ $lc('无效数据') }}
45
45
  <span class="color-danger">{{ validateResult.errorList?.length }}</span>
46
- 条。
46
+ {{ $lc('条。') }}
47
47
  </span>
48
48
  </div>
49
49
  <template v-if="validateResult.errorList?.length">
50
50
  <div class="bd-a">
51
51
  <div class="flex-box flex-lr flex-v m-t m-b p-l p-r">
52
- <span>无效数据详情</span>
53
- <el-button v-if="showErrorExport" type="text" @click="importError">导出错误数据</el-button>
52
+ <span>{{ $lc('无效数据详情') }}</span>
53
+ <el-button v-if="showErrorExport" type="text" @click="importError">{{ $lc('导出错误数据') }}</el-button>
54
54
  </div>
55
55
  <N20-table-pro
56
56
  ref="vTable"
@@ -72,6 +72,7 @@
72
72
  />
73
73
  </div>
74
74
  </div>
75
+ <div class="color-warning m-t-s">{{ '上述数据输入有误,请修改导入文件中相关信息!' | $lc }}</div>
75
76
  </template>
76
77
  </template>
77
78
  </div>
@@ -101,9 +102,7 @@
101
102
  {{ footerBtn.cancel.text | $lc }}
102
103
  </el-button>
103
104
  </template>
104
- <el-button v-else-if="validateResult || percentType === 'success'" type="primary" @click="confirmFn">
105
- 确认
106
- </el-button>
105
+ <el-button v-else-if="validateResult || percentType === 'success'" type="primary" @click="confirmFn">{{ $lc('确认') }}</el-button>
107
106
  </div>
108
107
  </el-dialog>
109
108
  </template>
@@ -153,6 +152,9 @@ export default {
153
152
  }
154
153
  },
155
154
  computed: {
155
+ dialogTitle() {
156
+ return this.title || this.$lc('提示')
157
+ },
156
158
  progressV: {
157
159
  get() {
158
160
  return this.visible
@@ -4,13 +4,13 @@
4
4
  <el-button size="mini" type="primary">{{ $t('gbebit_w_c_0103') }}</el-button>
5
5
  </slot>
6
6
  <el-dropdown-menu slot="dropdown">
7
- <el-dropdown-item command="import">模版导入</el-dropdown-item>
8
- <el-dropdown-item command="down">模版下载</el-dropdown-item>
7
+ <el-dropdown-item command="import">{{ $lc('模版导入') }}</el-dropdown-item>
8
+ <el-dropdown-item command="down">{{ $lc('模版下载') }}</el-dropdown-item>
9
9
  </el-dropdown-menu>
10
10
  <div style="display: none">
11
11
  <uploadMsg
12
12
  :pagination="pagination"
13
- :title="$t('导入文件')"
13
+ :title="$lc('导入文件')"
14
14
  :visible.sync="errorV"
15
15
  :width="width"
16
16
  :show-error-export="showErrorExport"
@@ -81,10 +81,10 @@ export default {
81
81
  },
82
82
  methods: {
83
83
  getDefaultErrorExportFileName() {
84
- const baseName = String(this.fileName || '导入文件')
84
+ const baseName = String(this.fileName || this.$lc('导入文件'))
85
85
  const pureName = baseName.replace(/\.(xlsx|xls|csv)$/i, '')
86
- const date = parseDate(new Date(), "yyyyMMdd");
87
- return `${pureName}-错误数据-${date}.xlsx`
86
+ const date = parseDate(new Date(), 'yyyyMMdd')
87
+ return `${pureName}-${this.$lc('错误数据')}-${date}.xlsx`
88
88
  },
89
89
  getErrorExportParams() {
90
90
  return {
@@ -248,7 +248,7 @@ export default {
248
248
  }
249
249
  writeImportErrorExcel(this.getErrorExportParams()).catch(error => {
250
250
  console.error('writeImportErrorExcel failed:', error)
251
- this.$message.error(this.$l('导入模板解析失败,请检查模板内容后重试'))
251
+ this.$message.error(this.$lc('导入模板解析失败,请检查模板内容后重试'))
252
252
  })
253
253
  },
254
254
  commandFn(val) {
package/src/i18n.json CHANGED
@@ -37,5 +37,53 @@
37
37
  },
38
38
  "请输入": {
39
39
  "en": "Please enter"
40
+ },
41
+ "模版导入": {
42
+ "en": "Import Template"
43
+ },
44
+ "模版下载": {
45
+ "en": "Download Template"
46
+ },
47
+ "导入文件": {
48
+ "en": "Import File"
49
+ },
50
+ "错误数据": {
51
+ "en": "Error Data"
52
+ },
53
+ "导入模板解析失败,请检查模板内容后重试": {
54
+ "en": "Failed to parse import template. Please check the template content and try again."
55
+ },
56
+ "提示": {
57
+ "en": "Prompt"
58
+ },
59
+ "系统处理中,请稍等......": {
60
+ "en": "Processing, please wait..."
61
+ },
62
+ "导入进度": {
63
+ "en": "Import Progress"
64
+ },
65
+ "导入统计": {
66
+ "en": "Import Statistics"
67
+ },
68
+ "共计导入": {
69
+ "en": "Total Imported"
70
+ },
71
+ "其中有效数据": {
72
+ "en": "Valid Data"
73
+ },
74
+ "无效数据": {
75
+ "en": "Invalid Data"
76
+ },
77
+ "无效数据详情": {
78
+ "en": "Invalid Data Details"
79
+ },
80
+ "导出错误数据": {
81
+ "en": "Export Error Data"
82
+ },
83
+ "条": {
84
+ "en": " items"
85
+ },
86
+ "条。": {
87
+ "en": " items."
40
88
  }
41
89
  }