n20-common-lib 3.3.8 → 3.3.10
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 +1 -1
- package/src/components/DateChoose/index.vue +4 -1
- package/src/components/DatePicker/index.vue +0 -5
- package/src/components/Layout/HeaderWrap/index.vue +11 -10
- package/src/components/Layout/HeaderWrap/indexN.vue +5 -1
- package/src/components/LoginTemporary/indexN.vue +3 -1
- package/src/components/ProFilterView/index.vue +26 -2
- package/src/i18n.json +4066 -1809
- package/src/utils/amountInWords.js +1 -0
- package/src/utils/auth.js +1 -1
- package/src/utils/i18n/index.js +4 -0
package/package.json
CHANGED
|
@@ -176,7 +176,10 @@ export default {
|
|
|
176
176
|
value: 6
|
|
177
177
|
}
|
|
178
178
|
],
|
|
179
|
-
|
|
179
|
+
// 西班牙语星期使用缩写,避免与季度共用的数字词条混淆。
|
|
180
|
+
weeks: this._lang === 'es'
|
|
181
|
+
? ['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map(day => $lc(day))
|
|
182
|
+
: [$lc("一"), $lc("二"), $lc("三"), $lc("四"), $lc("五"), $lc("六"), $lc("日")],
|
|
180
183
|
months: [
|
|
181
184
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
|
182
185
|
31
|
|
@@ -152,10 +152,6 @@ export default {
|
|
|
152
152
|
display: inline-block;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
.n20-date-picker > .n20-date-editor {
|
|
156
|
-
width: 100%;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
155
|
.n20-date-picker.has-long-term {
|
|
160
156
|
display: inline-flex;
|
|
161
157
|
align-items: center;
|
|
@@ -163,7 +159,6 @@ export default {
|
|
|
163
159
|
|
|
164
160
|
.n20-date-picker.has-long-term > .n20-date-editor {
|
|
165
161
|
flex: 1;
|
|
166
|
-
width: auto;
|
|
167
162
|
min-width: 0;
|
|
168
163
|
}
|
|
169
164
|
|
|
@@ -133,7 +133,8 @@
|
|
|
133
133
|
<el-radio-group v-model="langVal" @change="setLang">
|
|
134
134
|
<el-radio label="zh-cn" border>{{ $lc('简体中文') }}</el-radio>
|
|
135
135
|
<el-radio label="zh-hk" border>{{ $lc('繁體中文') }}</el-radio>
|
|
136
|
-
<el-radio label="en" border>
|
|
136
|
+
<el-radio label="en" border>{{ $lc('英文') }}</el-radio>
|
|
137
|
+
<el-radio label="es" border>{{ $lc('西班牙语') }}</el-radio>
|
|
137
138
|
</el-radio-group>
|
|
138
139
|
</div>
|
|
139
140
|
</dialogWrap>
|
|
@@ -170,26 +171,26 @@
|
|
|
170
171
|
</template>
|
|
171
172
|
|
|
172
173
|
<script>
|
|
173
|
-
import
|
|
174
|
+
import dayjs from 'dayjs'
|
|
175
|
+
import duration from 'dayjs/plugin/duration'
|
|
174
176
|
import Cookies from 'js-cookie'
|
|
175
|
-
import { themeList } from '../../../utils/theme.config.js'
|
|
176
177
|
|
|
177
|
-
import operatingStatus from '../../operatingStatus/index.vue'
|
|
178
|
-
import dialogWrap from '../../Dialog/index.vue'
|
|
179
178
|
import changePwd from './changePwd.vue'
|
|
180
179
|
import noticePop from './noticePop.vue'
|
|
181
180
|
import switchUser from './switchUser.vue'
|
|
182
181
|
|
|
183
|
-
import axios from '../../../utils/axios'
|
|
184
182
|
import getJsonc from '../../../assets/getJsonc'
|
|
185
183
|
import realUrl from '../../../assets/realUrl'
|
|
186
184
|
import auth from '../../../utils/auth'
|
|
185
|
+
import axios from '../../../utils/axios'
|
|
186
|
+
import { $lc } from '../../../utils/i18n/index'
|
|
187
|
+
import { themeList } from '../../../utils/theme.config.js'
|
|
187
188
|
import { linkPush } from '../../../utils/urlToGo'
|
|
188
|
-
import
|
|
189
|
-
import duration from 'dayjs/plugin/duration'
|
|
190
|
-
dayjs.extend(duration)
|
|
191
|
-
|
|
189
|
+
import dialogWrap from '../../Dialog/index.vue'
|
|
192
190
|
import { siteTree2menus } from '../../LoginTemporary/utils'
|
|
191
|
+
import operatingStatus from '../../operatingStatus/index.vue'
|
|
192
|
+
|
|
193
|
+
dayjs.extend(duration)
|
|
193
194
|
|
|
194
195
|
const prefix = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || process.env.BASE_URL || '/'
|
|
195
196
|
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
:class="{
|
|
88
88
|
'icon-zhongwen': langVal === 'zh-cn',
|
|
89
89
|
'icon-fanti': langVal === 'zh-hk',
|
|
90
|
-
'icon-yuyanqiehuan':
|
|
90
|
+
'icon-yuyanqiehuan': ['en', 'es'].includes(langVal)
|
|
91
91
|
}"
|
|
92
92
|
></span>
|
|
93
93
|
|
|
@@ -112,6 +112,10 @@
|
|
|
112
112
|
><i class="n20-icon-a-yuenanyuyanqiehuan_huaban1 f-s-icon"></i
|
|
113
113
|
>{{ '越南语' | $lc }}</el-dropdown-item
|
|
114
114
|
>
|
|
115
|
+
<el-dropdown-item v-if="langMap.includes('es')" command="es"
|
|
116
|
+
><i class="iconfont icon-yuyanqiehuan f-s-icon"></i
|
|
117
|
+
>{{ '西班牙语' | $lc }}</el-dropdown-item
|
|
118
|
+
>
|
|
115
119
|
</el-dropdown-menu>
|
|
116
120
|
</el-dropdown>
|
|
117
121
|
|
|
@@ -111,6 +111,7 @@
|
|
|
111
111
|
<el-dropdown-item v-if="langConf.lang.includes('en')" command="en">{{ '英文' | $lc }}</el-dropdown-item>
|
|
112
112
|
<el-dropdown-item v-if="langConf.lang.includes('th')" command="th">{{ '泰文' | $lc }}</el-dropdown-item>
|
|
113
113
|
<el-dropdown-item v-if="langConf.lang.includes('vi')" command="vi">{{ '越南语' | $lc }}</el-dropdown-item>
|
|
114
|
+
<el-dropdown-item v-if="langConf.lang.includes('es')" command="es">{{ '西班牙语' | $lc }}</el-dropdown-item>
|
|
114
115
|
</el-dropdown-menu>
|
|
115
116
|
</el-dropdown>
|
|
116
117
|
<slot name="header">{{ '欢 迎 登 录' | $lc }}</slot>
|
|
@@ -224,7 +225,8 @@ export default {
|
|
|
224
225
|
'zh-hk': $lc("繁体中文"),
|
|
225
226
|
en: $lc("英文"),
|
|
226
227
|
th: $lc("泰文"),
|
|
227
|
-
vi: $lc("越南语")
|
|
228
|
+
vi: $lc("越南语"),
|
|
229
|
+
es: $lc("西班牙语")
|
|
228
230
|
},
|
|
229
231
|
wrapStyle: '',
|
|
230
232
|
logUrl: `${protocol}//${host}${pathname}`,
|
|
@@ -140,7 +140,10 @@
|
|
|
140
140
|
<el-form-item
|
|
141
141
|
:label="$lc('视图名称')"
|
|
142
142
|
prop="viewName"
|
|
143
|
-
:rules="[
|
|
143
|
+
:rules="[
|
|
144
|
+
{ required: true, message: $lc('请输入视图名称'), trigger: 'blur' },
|
|
145
|
+
{ validator: validateViewName, trigger: 'blur' }
|
|
146
|
+
]"
|
|
144
147
|
>
|
|
145
148
|
<el-input v-model="form.viewName" maxlength="30" show-word-limit />
|
|
146
149
|
</el-form-item>
|
|
@@ -653,6 +656,22 @@ export default {
|
|
|
653
656
|
return fallback
|
|
654
657
|
}
|
|
655
658
|
},
|
|
659
|
+
// 编辑时排除当前视图,避免将未修改的原名称误判为重复
|
|
660
|
+
validateViewName(rule, value, callback) {
|
|
661
|
+
const viewName = typeof value === 'string' ? value.trim() : ''
|
|
662
|
+
if (!viewName) {
|
|
663
|
+
callback()
|
|
664
|
+
return
|
|
665
|
+
}
|
|
666
|
+
const isDuplicate = this.list.some(
|
|
667
|
+
(item) => typeof item.viewName === 'string' && item.viewName.trim() === viewName && item.viewId !== this.viewId
|
|
668
|
+
)
|
|
669
|
+
if (isDuplicate) {
|
|
670
|
+
callback(new Error($lc('视图名称不能重复')))
|
|
671
|
+
return
|
|
672
|
+
}
|
|
673
|
+
callback()
|
|
674
|
+
},
|
|
656
675
|
// 保存筛选条件
|
|
657
676
|
saveCheckData(data = []) {
|
|
658
677
|
this.form.keyIds = data.map((item) => item.id).filter((id) => id !== undefined && id !== null && id !== '')
|
|
@@ -704,9 +723,14 @@ export default {
|
|
|
704
723
|
return
|
|
705
724
|
}
|
|
706
725
|
|
|
726
|
+
if (typeof this.form.viewName === 'string') {
|
|
727
|
+
this.form.viewName = this.form.viewName.trim()
|
|
728
|
+
}
|
|
707
729
|
this.$refs.form.validate(async (valid) => {
|
|
708
730
|
if (!valid) {
|
|
709
|
-
this
|
|
731
|
+
if (!this.form.viewName) {
|
|
732
|
+
this.$message.error($lc('请输入视图名称'))
|
|
733
|
+
}
|
|
710
734
|
return
|
|
711
735
|
}
|
|
712
736
|
if (this.form.viewType === VIEW_TYPE.BASIC) {
|