refactor(webapp): 更新 API地址并优化代码
-将本地 API 地址替换为阿里云服务器地址 - 更新 HTML 文件中的脚本和样式链接- 优化 manage.vue 文件中的导入路径和类型定义 - 移除 report.vue 中的冗余 alert
This commit is contained in:
@@ -19,7 +19,7 @@ import {baseURL} from "../../utils/baseurl.ts";
|
||||
|
||||
const fileType = ref<string>('img')
|
||||
onMounted(() => {
|
||||
alert(props.filePath)
|
||||
// alert(props.filePath)
|
||||
if(props.filePath){
|
||||
fileType.value = props.filePath.split('.').pop() ==='pdf'?'pdf':'img'
|
||||
request.get('/verify?filePath='+encodeURIComponent(props.filePath)).then((res) => {
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
FileSearchOutlined,
|
||||
PlusOutlined
|
||||
} from '@ant-design/icons-vue'
|
||||
import request from '#/utils/request.ts';
|
||||
import request from '../utils/request.ts';
|
||||
import {baseURL} from "../utils/baseurl.ts";
|
||||
import type {TableProps, UploadChangeParam, UploadProps} from "ant-design-vue";
|
||||
import { message } from 'ant-design-vue';
|
||||
@@ -15,6 +15,7 @@ import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
||||
import dayjs from 'dayjs';
|
||||
import 'dayjs/locale/zh-cn';
|
||||
import type {UploadFile} from "ant-design-vue/es/upload/interface";
|
||||
import type {Key} from "ant-design-vue/es/_util/type";
|
||||
const [messageApi, contextHolder] = message.useMessage();
|
||||
interface DataType {
|
||||
id: string;
|
||||
@@ -102,7 +103,7 @@ let searchParams = ref({
|
||||
});
|
||||
// 下拉框
|
||||
const rowSelection: TableProps['rowSelection'] = {
|
||||
onChange: (selectedRowKeys: string[], selectedRows: DataType[]) => {
|
||||
onChange: (selectedRowKeys: Key[], selectedRows: DataType[]) => {
|
||||
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
|
||||
},
|
||||
getCheckboxProps: (record: DataType) => ({
|
||||
@@ -137,7 +138,7 @@ const handleOk = () => {
|
||||
}
|
||||
})
|
||||
};
|
||||
const handleOpen = (record) => {
|
||||
const handleOpen = (record:any) => {
|
||||
if (record.status === 'yes') {
|
||||
modalTitle.value = "备注"
|
||||
}else {
|
||||
@@ -188,7 +189,7 @@ const handleCancelPreview = () => {
|
||||
previewVisible.value = false;
|
||||
previewTitle.value = '';
|
||||
};
|
||||
const handlePreview = async (file: UploadProps['fileList'][number]) => {
|
||||
const handlePreview = async (file: any) => {
|
||||
if (!file.url && !file.preview) {
|
||||
file.preview = (await getBase64(file.originFileObj)) as string;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const baseURL = "http://127.0.0.1:5555"
|
||||
// export const baseURL = "http://101.200.148.149:8555"
|
||||
// export const baseURL = "http://127.0.0.1:5555"
|
||||
export const baseURL = "http://101.200.148.149:8555"
|
||||
Reference in New Issue
Block a user