fix:调整api服务端端口
This commit is contained in:
parent
a88efdad2c
commit
de4463cc24
@ -5,7 +5,7 @@
|
||||
"HiddenSideBar": false,
|
||||
"MultiTagsCache": true,
|
||||
"KeepAlive": true,
|
||||
"Locale": "zh",
|
||||
"Locale": "en",
|
||||
"Layout": "vertical",
|
||||
"Theme": "light",
|
||||
"DarkMode": false,
|
||||
|
@ -60,7 +60,7 @@ function getObjectKeys(obj) {
|
||||
|
||||
/** 将展开的key缓存 */
|
||||
const keysCache: Map<string, Set<string>> = new Map();
|
||||
const flatI18n = (prefix = "zh-CN") => {
|
||||
const flatI18n = (prefix = "en") => {
|
||||
let cache = keysCache.get(prefix);
|
||||
if (!cache) {
|
||||
cache = getObjectKeys(siphonI18n(prefix));
|
||||
@ -88,9 +88,9 @@ export function transformI18n(message: any = "") {
|
||||
|
||||
const key = message.match(/(\S*)\./)?.input;
|
||||
|
||||
if (key && flatI18n("zh-CN").has(key)) {
|
||||
if (key && flatI18n("en").has(key)) {
|
||||
return i18n.global.t.call(i18n.global.locale, message);
|
||||
} else if (!key && Object.hasOwn(siphonI18n("zh-CN"), message)) {
|
||||
} else if (!key && Object.hasOwn(siphonI18n("en"), message)) {
|
||||
// 兼容非嵌套形式的国际化写法
|
||||
return i18n.global.t.call(i18n.global.locale, message);
|
||||
} else {
|
||||
@ -107,7 +107,7 @@ export const i18n: I18n = createI18n({
|
||||
storageLocal().getItem<StorageConfigs>(
|
||||
`${responsiveStorageNameSpace()}locale`
|
||||
)?.locale ?? "en",
|
||||
fallbackLocale: "zh",
|
||||
fallbackLocale: "en",
|
||||
messages: localesConfigs
|
||||
});
|
||||
|
||||
|
@ -273,7 +273,7 @@
|
||||
<el-descriptions border :column="1">
|
||||
<el-descriptions-item
|
||||
align="center"
|
||||
:label="t('QueryStatistics.tag.codeId')"
|
||||
:label="t('QueryStatistics.tag.transID')"
|
||||
>{{ item.id }}</el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item
|
||||
@ -285,7 +285,7 @@
|
||||
>
|
||||
<el-descriptions-item
|
||||
align="center"
|
||||
:label="t('QueryStatistics.tag.description')"
|
||||
:label="t('HtsDescription.tag.similar_description')"
|
||||
>{{ item.description }}</el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item
|
||||
@ -303,7 +303,7 @@
|
||||
type="primary"
|
||||
:disabled="!hasAuth('code:btn:addFeedback')"
|
||||
@click="handleFeedback('Feedback', item)"
|
||||
>{{ t("buttons.Feedback") }}</el-button
|
||||
>{{ t("buttons.ErrorRecovery") }}</el-button
|
||||
>
|
||||
<el-button
|
||||
class="w-full top-2"
|
||||
|
@ -179,7 +179,7 @@
|
||||
<el-descriptions border :column="1">
|
||||
<el-descriptions-item
|
||||
align="center"
|
||||
:label="t('QueryStatistics.tag.codeId')"
|
||||
:label="t('QueryStatistics.tag.transID')"
|
||||
>{{ item.id }}</el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item
|
||||
@ -193,7 +193,7 @@
|
||||
>
|
||||
<el-descriptions-item
|
||||
align="center"
|
||||
:label="t('QueryStatistics.tag.description')"
|
||||
:label="t('HtsDescription.tag.similar_description')"
|
||||
>{{ item.description }}</el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item
|
||||
@ -211,7 +211,7 @@
|
||||
type="primary"
|
||||
:disabled="!hasAuth('code:btn:addFeedback')"
|
||||
@click="handleFeedback('Feedback', item)"
|
||||
>{{ t("buttons.Feedback") }}</el-button
|
||||
>{{ t("buttons.ErrorRecovery") }}</el-button
|
||||
>
|
||||
<el-button
|
||||
class="w-full top-2"
|
||||
|
@ -121,7 +121,11 @@ export const useCode = (tableRef: Ref) => {
|
||||
},
|
||||
{
|
||||
label: transformI18n($t("review.tag.feedbackHtsCode")),
|
||||
prop: "feedback_code"
|
||||
prop: "feedback_code",
|
||||
formatter: ({ feedback_code }) =>
|
||||
feedback_code
|
||||
? feedback_code.replace(/(\d{2})/g, "$1.").slice(0, -1)
|
||||
: ""
|
||||
},
|
||||
{
|
||||
label: transformI18n($t("review.tag.feedbackDescription")),
|
||||
@ -158,9 +162,9 @@ export const useCode = (tableRef: Ref) => {
|
||||
const res = await getCodeFeedbackListAPI({
|
||||
page: pagination.currentPage,
|
||||
pageSize: pagination.pageSize,
|
||||
feedback_code: form.feedback_code,
|
||||
feedback_code: form.feedback_code.replace(/\D/g, ""),
|
||||
feedback_description: form.feedback_description,
|
||||
code: form.code,
|
||||
code: form.code.replace(/\D/g, ""),
|
||||
status: form.status,
|
||||
username: form.username,
|
||||
department_id: form.department_id,
|
||||
@ -209,9 +213,9 @@ export const useCode = (tableRef: Ref) => {
|
||||
const res = await getCodeFeedbackListAPI({
|
||||
page: pagination.currentPage,
|
||||
pageSize: val,
|
||||
feedback_code: form.feedback_code,
|
||||
feedback_code: form.feedback_code.replace(/\D/g, ""),
|
||||
feedback_description: form.feedback_description,
|
||||
code: form.code,
|
||||
code: form.code.replace(/\D/g, ""),
|
||||
status: form.status,
|
||||
username: form.username,
|
||||
department_id: form.department_id,
|
||||
@ -238,9 +242,9 @@ export const useCode = (tableRef: Ref) => {
|
||||
const res = await getCodeFeedbackListAPI({
|
||||
page: val,
|
||||
pageSize: pagination.pageSize,
|
||||
feedback_code: form.feedback_code,
|
||||
feedback_code: form.feedback_code.replace(/\D/g, ""),
|
||||
feedback_description: form.feedback_description,
|
||||
code: form.code,
|
||||
code: form.code.replace(/\D/g, ""),
|
||||
status: form.status,
|
||||
username: form.username,
|
||||
department_id: form.department_id,
|
||||
@ -341,7 +345,7 @@ export const useCode = (tableRef: Ref) => {
|
||||
const FormData = formRef.value.newFormInline;
|
||||
let form = {
|
||||
feedback_description: FormData.feedback_description ?? "",
|
||||
feedback_code: FormData.feedback_code ?? "",
|
||||
feedback_code: FormData.feedback_code.replace(/\D/g, "") ?? "",
|
||||
code_id: FormData.code_id ?? ""
|
||||
};
|
||||
if (title === "Add") {
|
||||
|
@ -161,7 +161,7 @@ export const useCode = (tableRef: Ref) => {
|
||||
page: pagination.currentPage,
|
||||
pageSize: pagination.pageSize,
|
||||
description: form.description,
|
||||
code: form.code,
|
||||
code: form.code.replace(/\D/g, ""),
|
||||
status: form.status,
|
||||
username: form.username,
|
||||
department_id: form.department_id,
|
||||
@ -211,7 +211,7 @@ export const useCode = (tableRef: Ref) => {
|
||||
page: pagination.currentPage,
|
||||
pageSize: val,
|
||||
description: form.description,
|
||||
code: form.code,
|
||||
code: form.code.replace(/\D/g, ""),
|
||||
status: form.status,
|
||||
username: form.username,
|
||||
department_id: form.department_id,
|
||||
@ -239,7 +239,7 @@ export const useCode = (tableRef: Ref) => {
|
||||
page: val,
|
||||
pageSize: pagination.pageSize,
|
||||
description: form.description,
|
||||
code: form.code,
|
||||
code: form.code.replace(/\D/g, ""),
|
||||
status: form.status,
|
||||
username: form.username,
|
||||
department_id: form.department_id,
|
||||
@ -334,7 +334,7 @@ export const useCode = (tableRef: Ref) => {
|
||||
const FormData = formRef.value.newFormInline;
|
||||
let form = {
|
||||
description: FormData.description ?? "",
|
||||
code: FormData.code ?? ""
|
||||
code: FormData.code.replace(/\D/g, "") ?? ""
|
||||
};
|
||||
if (title === "Add") {
|
||||
const res = await postAddCodeAPI(form);
|
||||
|
@ -122,7 +122,7 @@ export const useCode = (tableRef: Ref) => {
|
||||
page: pagination.currentPage,
|
||||
pageSize: pagination.pageSize,
|
||||
description: form.description,
|
||||
code: form.code,
|
||||
code: form.code.replace(/\D/g, ""),
|
||||
department_id: form.department_id,
|
||||
nickname: form.nickname,
|
||||
username: form.username,
|
||||
@ -171,7 +171,7 @@ export const useCode = (tableRef: Ref) => {
|
||||
page: pagination.currentPage,
|
||||
pageSize: val,
|
||||
description: form.description,
|
||||
code: form.code,
|
||||
code: form.code.replace(/\D/g, ""),
|
||||
department_id: form.department_id,
|
||||
nickname: form.nickname,
|
||||
username: form.username,
|
||||
@ -198,7 +198,7 @@ export const useCode = (tableRef: Ref) => {
|
||||
page: val,
|
||||
pageSize: pagination.pageSize,
|
||||
description: form.description,
|
||||
code: form.code,
|
||||
code: form.code.replace(/\D/g, ""),
|
||||
department_id: form.department_id,
|
||||
nickname: form.nickname,
|
||||
username: form.username,
|
||||
@ -265,7 +265,7 @@ export const useCode = (tableRef: Ref) => {
|
||||
h(editForm, {
|
||||
formInline: {
|
||||
description: row?.description ?? "",
|
||||
code: row?.code ?? ""
|
||||
code: row?.code.replace(/\D/g, "") ?? ""
|
||||
},
|
||||
ref: formRef
|
||||
}),
|
||||
@ -273,7 +273,7 @@ export const useCode = (tableRef: Ref) => {
|
||||
const FormData = formRef.value.newFormInline;
|
||||
let form = {
|
||||
description: FormData.name ?? "",
|
||||
code: FormData.code ?? ""
|
||||
code: FormData.code.replace(/\D/g, "") ?? ""
|
||||
};
|
||||
if (title === "Add") {
|
||||
const res = await postAddCodeAPI(form);
|
||||
|
@ -223,7 +223,8 @@ export const useHtsItem = (tableRef: Ref) => {
|
||||
const res = await getHtsItemListAPI({
|
||||
page: pagination.currentPage,
|
||||
pageSize: pagination.pageSize,
|
||||
...toRaw(form)
|
||||
...toRaw(form),
|
||||
htsno: form.htsno.replace(/\D/g, "") || ""
|
||||
});
|
||||
if (res.success) {
|
||||
dataList.value = res.data.result;
|
||||
@ -267,7 +268,8 @@ export const useHtsItem = (tableRef: Ref) => {
|
||||
const res = await getHtsItemListAPI({
|
||||
page: pagination.currentPage,
|
||||
pageSize: val,
|
||||
...toRaw(form)
|
||||
...toRaw(form),
|
||||
htsno: form.htsno.replace(/\D/g, "") || ""
|
||||
});
|
||||
if (res.success) {
|
||||
dataList.value = res.data.result;
|
||||
@ -290,7 +292,8 @@ export const useHtsItem = (tableRef: Ref) => {
|
||||
const res = await getHtsItemListAPI({
|
||||
page: val,
|
||||
pageSize: pagination.pageSize,
|
||||
...toRaw(form)
|
||||
...toRaw(form),
|
||||
htsno: form.htsno.replace(/\D/g, "") || ""
|
||||
});
|
||||
if (res.success) {
|
||||
dataList.value = res.data.result;
|
||||
@ -568,7 +571,7 @@ export const useHtsItem = (tableRef: Ref) => {
|
||||
parent_id: FormData.parent_id ?? "",
|
||||
|
||||
/** 编码 */
|
||||
htsno: FormData.htsno ?? "",
|
||||
htsno: FormData.htsno.replace(/\D/g, "") ?? "",
|
||||
|
||||
/** 层级 */
|
||||
indent: FormData.indent ?? "",
|
||||
@ -615,7 +618,7 @@ export const useHtsItem = (tableRef: Ref) => {
|
||||
parent_id: FormData.parent_id ?? "",
|
||||
|
||||
/** 编码 */
|
||||
htsno: FormData.htsno ?? "",
|
||||
htsno: FormData.htsno.replace(/\D/g, "") ?? "",
|
||||
|
||||
/** 层级 */
|
||||
indent: FormData.indent ?? "",
|
||||
|
@ -27,7 +27,7 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
||||
proxy: {
|
||||
"/api": {
|
||||
// 这里填写后端地址
|
||||
target: "http://localhost:9090",
|
||||
target: "http://localhost:8082",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, "")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user