浏览代码

reactor:修复宜宾通话记录错误;

zhangchong 13 小时之前
父节点
当前提交
b9a5900dc7

+ 4 - 1
src/views/snapshot/info/sspConfig/components/Config-add.vue

@@ -211,6 +211,7 @@ const state = reactive<any>({
 		safetyTypeId: [], // 志愿者类型
 		shape: 0, // 公告形式
 		videoCoverImgUrl: null, // 视频封面
+		videoName:null, // 视频名称
 	},
 });
 let loading = ref<boolean>(false); // 加载状态
@@ -249,6 +250,7 @@ const selectType = () => {
 		careCellImgUrl.value = '';
 		state.ruleForm.videoCoverImgUrl = null;
 		fileList.value = [];
+		state.ruleForm.videoName = null;
 	} else {
 		state.ruleForm.content = null;
 	}
@@ -304,11 +306,11 @@ const handleExceed = (files: any, uploadFiles: UploadUserFile[]) => {
 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;
@@ -374,6 +376,7 @@ const close = () => {
 	ruleFormRef.value?.clearValidate();
 	ruleFormRef.value?.resetFields();
 	state.ruleForm.bulletinTypeId = null;
+	careCellImgUrl.value = '';
 };
 // 暴露变量
 defineExpose({

+ 5 - 2
src/views/snapshot/info/sspConfig/components/Config-edit.vue

@@ -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({