fix(frontend): 修复操作日志与数据转换类型错误,修正普通用户角色取值

- OperationLogView: showDetail 调用补充 OperationLog 类型断言
- DataConvertView: beforeUpload 参数类型改为 UploadRawFile 并直接读取 file.type
- UserCreateView: 普通用户角色值 user 修正为 operator

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
wuyongtao
2026-08-19 11:33:45 +08:00
parent 9379f93633
commit 93449b7f0e
3 changed files with 6 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
import { onMounted, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { Plus, Delete, Refresh } from '@element-plus/icons-vue'
import type { TagProps, UploadRequestOptions, UploadFile } from 'element-plus'
import type { TagProps, UploadRequestOptions, UploadFile, UploadRawFile } from 'element-plus'
import PageCard from '@/components/PageCard.vue'
import {
getDataConvertTasks,
@@ -30,9 +30,9 @@ async function load() {
}
// 文件上传前的校验(仅校验文件格式)
function beforeUpload(file: UploadFile) {
function beforeUpload(file: UploadRawFile) {
// 检查文件类型
const isJson = file.name.endsWith('.json') || file.raw?.type === 'application/json'
const isJson = file.name.endsWith('.json') || file.type === 'application/json'
if (!isJson) {
ElMessage.error('只能上传 .json 格式的文件')
return false