|
|
@@ -29,9 +29,9 @@
|
|
|
<el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)"
|
|
|
>预览</el-button
|
|
|
>
|
|
|
- <!-- <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
|
|
|
+ <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
|
|
|
>下载</el-button
|
|
|
- > -->
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -89,6 +89,7 @@
|
|
|
import type { FileItem } from '@/components/UploadFiles/types';
|
|
|
import { formatAttachmentList } from '@/components/UploadFiles/utils';
|
|
|
import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
|
|
|
+ import { downloadFile } from '@/views/disaster/utils';
|
|
|
|
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
|
@@ -224,6 +225,11 @@
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if(!ruleFormData.content || ruleFormData.content == '<p><br></p>') {
|
|
|
+ ElMessage.error('请输入文档内容');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
try {
|
|
|
// 处理文件上传:先上传文件获取 URL,然后提取 fileUrl
|
|
|
// let fileUrl = '';
|
|
|
@@ -311,8 +317,8 @@
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
|
- cloneRuleFormData();
|
|
|
- beforeRouteLeave();
|
|
|
+ // cloneRuleFormData();
|
|
|
+ // beforeRouteLeave();
|
|
|
// 新增模式下,确保默认值正确设置
|
|
|
if (isCreateMode.value) {
|
|
|
ruleFormData.fileFormat = ruleFormData.fileFormat || '';
|