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