feat:更新
This commit is contained in:
parent
6f2e181a10
commit
afdc7973ae
BIN
backend/cmd/server/app
Normal file
BIN
backend/cmd/server/app
Normal file
Binary file not shown.
1
frontend/.env.production
Normal file
1
frontend/.env.production
Normal file
@ -0,0 +1 @@
|
|||||||
|
VITE_API_BASE = /api
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import { useAuthStore } from '@/stores/auth'
|
import { useAuthStore } from '@/stores/auth'
|
||||||
import axios, { AxiosError, type AxiosInstance, type InternalAxiosRequestConfig } from 'axios'
|
import axios, { AxiosError, type AxiosInstance, type InternalAxiosRequestConfig } from 'axios'
|
||||||
|
|
||||||
const apiBase = import.meta.env.DEV ? '' : (import.meta.env.VITE_API_BASE || 'http://localhost:8080')
|
const apiBase = import.meta.env.DEV ? 'http://localhost:8080' : ''
|
||||||
|
|
||||||
export const http: AxiosInstance = axios.create({
|
export const http: AxiosInstance = axios.create({
|
||||||
baseURL: apiBase,
|
baseURL: apiBase,
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from 'vue'
|
|
||||||
import {
|
import {
|
||||||
apiDownloadOrdersTemplate,
|
apiDownloadOrdersTemplate,
|
||||||
apiImportJobErrors,
|
apiImportJobErrors,
|
||||||
@ -9,6 +8,7 @@ import {
|
|||||||
apiImportOrdersPreview,
|
apiImportOrdersPreview,
|
||||||
type ImportJob,
|
type ImportJob,
|
||||||
} from '@/api/importer'
|
} from '@/api/importer'
|
||||||
|
import { onMounted, ref } from 'vue'
|
||||||
|
|
||||||
const file = ref<File | null>(null)
|
const file = ref<File | null>(null)
|
||||||
const preview = ref<any[]>([])
|
const preview = ref<any[]>([])
|
||||||
@ -127,7 +127,7 @@ onMounted(loadJobs)
|
|||||||
<div class="text-sm font-medium">Excel 导入</div>
|
<div class="text-sm font-medium">Excel 导入</div>
|
||||||
<input type="file" accept=".xlsx" @change="pick" class="text-sm text-slate-300" />
|
<input type="file" accept=".xlsx" @change="pick" class="text-sm text-slate-300" />
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<button class="rounded bg-indigo-600 px-3 py-2 text-sm hover:bg-indigo-500 disabled:opacity-60" :disabled="!file || loading" @click="doPreview">
|
<button class="rounded bg-indigo-600 px-3 py-2 text-sm hover:bg-indigo-500 disabled:opacity-60" :disabled="loading" @click="doPreview">
|
||||||
预览
|
预览
|
||||||
</button>
|
</button>
|
||||||
<button class="rounded bg-emerald-600 px-3 py-2 text-sm hover:bg-emerald-500 disabled:opacity-60" :disabled="!file || loading" @click="doCommit">
|
<button class="rounded bg-emerald-600 px-3 py-2 text-sm hover:bg-emerald-500 disabled:opacity-60" :disabled="!file || loading" @click="doCommit">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user