feat(database): 将数据库从 SQLite 迁移到 MySQL
- 修改了 DBService 类,增加了 MySQL 数据库连接配置 - 重新定义了表结构,适应 MySQL 数据库- 更新了相关的 SQL 查询语句 - 增加了创建数据库的逻辑 - 优化了表创建语句,使用 InnoDB 引擎和 UTF-8 字符集
This commit is contained in:
@@ -38,7 +38,7 @@ const previousPage = () => {
|
||||
};
|
||||
// 保存
|
||||
const saveReport = () => {
|
||||
console.log('保存成功')
|
||||
current.value = 0
|
||||
}
|
||||
// 表单数据
|
||||
const formState = ref<string>('');
|
||||
@@ -58,7 +58,7 @@ const formState = ref<string>('');
|
||||
<a-col :span="12" offset="16">
|
||||
<a-space>
|
||||
<a-button type="default" v-if="current > 0" @click="previousPage">上一步</a-button>
|
||||
<a-button type="primary" v-if="current < items.length-1 " @click="nextPage">下一步</a-button>
|
||||
<a-button type="primary" v-if="current < items.length-1 " :disabled="!filePath" @click="nextPage">下一步</a-button>
|
||||
<a-button type="dashed" v-if="current == items.length-1" @click="saveReport">完成</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<a-layout-content>
|
||||
<a-spin v-if="loadding">
|
||||
</a-spin>
|
||||
<a-result
|
||||
:status="formState.status"
|
||||
:title="formState.cyjgxx"
|
||||
@@ -16,7 +18,7 @@ import {ref,onMounted } from 'vue';
|
||||
import request from "../../utils/request.ts";
|
||||
const props = defineProps({ filePath: String });
|
||||
import {baseURL} from "../../utils/baseurl.ts";
|
||||
|
||||
let loadding = ref(true)
|
||||
const fileType = ref<string>('img')
|
||||
onMounted(() => {
|
||||
// alert(props.filePath)
|
||||
@@ -25,6 +27,7 @@ onMounted(() => {
|
||||
request.get('/verify?filePath='+encodeURIComponent(props.filePath)).then((res) => {
|
||||
console.log(res)
|
||||
formState.value = res.data
|
||||
loadding.value = false
|
||||
})
|
||||
fileUrl.value = baseURL+"/"+props.filePath
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ const handleUpload = (options: any) => {
|
||||
:max-count="1"
|
||||
@remove="handleRemove"
|
||||
>
|
||||
<a-button >
|
||||
<a-button>
|
||||
<upload-outlined></upload-outlined>
|
||||
上传发票
|
||||
</a-button>
|
||||
|
||||
Reference in New Issue
Block a user