|
@@ -23,7 +23,11 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="版本更新说明" class="mandatory">
|
|
|
+ <el-form-item
|
|
|
+ label="版本更新说明"
|
|
|
+ class="mandatory"
|
|
|
+ style="white-space: pre-line"
|
|
|
+ >
|
|
|
<el-input
|
|
|
maxlength="200"
|
|
|
type="textarea"
|
|
@@ -51,7 +55,7 @@
|
|
|
<template v-slot:tip>
|
|
|
<div class="el-upload__tip">注:可上传{{ size }}以内的文件</div>
|
|
|
</template>
|
|
|
- <!-- <template v-slot:file="{ file }: { file: UploadFile }">
|
|
|
+ <template v-slot:file="{ file }: { file: UploadFile }">
|
|
|
<div class="file" @click.stop="previewFile()">
|
|
|
<div>
|
|
|
<el-icon><Document /></el-icon>
|
|
@@ -59,7 +63,7 @@
|
|
|
</div>
|
|
|
<el-icon @click.stop="removeFile()"><Close /></el-icon>
|
|
|
</div>
|
|
|
- </template> -->
|
|
|
+ </template>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -78,7 +82,7 @@ import {
|
|
|
editCameraVersion,
|
|
|
CameraVersionType,
|
|
|
} from "@/store/cameraVersion";
|
|
|
-import { ElMessage } from "element-plus";
|
|
|
+import { ElMessage, UploadFile } from "element-plus";
|
|
|
|
|
|
const cameraTypes = [CameraType.SWKJ, CameraType.SWSS1, CameraType.SWSS2];
|
|
|
const props = defineProps<{
|
|
@@ -113,7 +117,7 @@ watchEffect(() => {
|
|
|
const { size, fileList, upload, removeFile, previewFile, file, accept } =
|
|
|
useUpload({
|
|
|
maxSize: maxFileSize,
|
|
|
- formats: [".jpg", ".jpeg"],
|
|
|
+ formats: [".apk"],
|
|
|
});
|
|
|
defineExpose<QuiskExpose>({
|
|
|
async submit() {
|
|
@@ -134,10 +138,10 @@ defineExpose<QuiskExpose>({
|
|
|
ElMessage.error("文件不能为空!");
|
|
|
throw "文件不能为空!";
|
|
|
}
|
|
|
- await addCameraVersion(data.value as any as CameraVersionType);
|
|
|
+ await addCameraVersion(data.value as any as CameraVersionEntity);
|
|
|
ElMessage.success("添加成功!");
|
|
|
} else {
|
|
|
- await editCameraVersion(data.value as any as CameraVersionType);
|
|
|
+ await editCameraVersion(data.value as any as CameraVersionEntity);
|
|
|
ElMessage.success("保存成功!");
|
|
|
}
|
|
|
},
|
|
@@ -149,4 +153,21 @@ defineExpose<QuiskExpose>({
|
|
|
font-size: 20px;
|
|
|
line-height: 50px;
|
|
|
}
|
|
|
+.upload-demo {
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.file {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ > div {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .name {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|