|
@@ -207,6 +207,7 @@ const state = reactive<any>({
|
|
|
safetyTypeId: [], // 志愿者类型
|
|
|
shape: 0, // 公告形式
|
|
|
videoCoverImgUrl: null, // 视频封面
|
|
|
+ videoName: null, // 视频名称
|
|
|
},
|
|
|
});
|
|
|
let loading = ref<boolean>(false); // 加载状态
|
|
@@ -236,7 +237,7 @@ const openDialog = async (id: string) => {
|
|
|
//视频地址
|
|
|
fileList.value = [
|
|
|
{
|
|
|
- name: '视频',
|
|
|
+ name: state.ruleForm.videoName,
|
|
|
url: import.meta.env.VITE_API_UPLOAD_URL + result.result?.videoPath,
|
|
|
},
|
|
|
];
|
|
@@ -260,6 +261,7 @@ const selectType = () => {
|
|
|
careCellImgUrl.value = '';
|
|
|
state.ruleForm.videoCoverImgUrl = null;
|
|
|
fileList.value = [];
|
|
|
+ state.ruleForm.videoName = null;
|
|
|
} else {
|
|
|
state.ruleForm.content = null;
|
|
|
}
|
|
@@ -308,11 +310,11 @@ const uploadingDisabled = ref(false);
|
|
|
const updateSuccessVideoPath = (response: any, uploadFile: UploadFile) => {
|
|
|
if (response.result.path) {
|
|
|
state.ruleForm.videoPath = response.result.path;
|
|
|
+ state.ruleForm.videoName = uploadFile.name;
|
|
|
} else {
|
|
|
uploadVideoRef.value.handleRemove(uploadFile);
|
|
|
ElMessage.error('上传失败');
|
|
|
}
|
|
|
- console.log(fileList.value, state.ruleForm.videoPath, '111');
|
|
|
setTimeout(() => {
|
|
|
uploadLoading.value = false; // 模拟上传过程
|
|
|
uploadingDisabled.value = false;
|
|
@@ -365,6 +367,7 @@ const close = () => {
|
|
|
ruleFormRef.value?.clearValidate();
|
|
|
ruleFormRef.value?.resetFields();
|
|
|
state.ruleForm.bulletinTypeId = null;
|
|
|
+ careCellImgUrl.value = '';
|
|
|
};
|
|
|
// 暴露变量
|
|
|
defineExpose({
|