diff --git a/src/view/hospital/index.vue b/src/view/hospital/index.vue index 777b193..104a09c 100644 --- a/src/view/hospital/index.vue +++ b/src/view/hospital/index.vue @@ -182,6 +182,15 @@ async function enterDialog() { // 提交 func_name = 'editHospital' } form.value.todos = todo_list.value + // 新参数 + for (const item of note_list.value) { + for (let i = 0; i < time_options.value.length; i++) { + // eslint-disable-next-line no-empty + if (item.notes_time === time_options.value[i]) { + item.notes_time_num = i + 1 + } + } + } form.value.notes = note_list.value const res = await api[func_name](form.value) if (res.code === 0) { @@ -222,9 +231,9 @@ function del_ro_func(i, type) { } // 图片上传 const uploading_form = reactive({ - uploading:false, - progressStatus:'info', - percentage:0, // 进度条 + uploading: false, + progressStatus: 'info', + percentage: 0, // 进度条 }) function init_uploading() { uploading_form.uploading = false @@ -232,14 +241,14 @@ function init_uploading() { uploading_form.percentage = 0 } function handleAvatarSuccess(res) { - console.log("res is ====",res) + console.log('res is ====', res) note_list.value[note_list_item_index.value].content = res.data.file.url - + uploading_form.progressStatus = 'info' uploading_form.percentage = 100 setTimeout(() => { init_uploading() - },500) + }, 500) } function beforeAvatarUpload(file) { init_uploading() @@ -256,13 +265,13 @@ function beforeAvatarUpload(file) { uploading_form.progressStatus = 'warning' ElMessage.error('上传头像图片大小不能超过 2M!') } - let interval = Math.random(100)*100 - console.log("interval is ====",interval) + const interval = Math.random(100) * 100 + console.log('interval is ====', interval) setInterval(() => { - if(uploading_form.percentage < interval) { + if (uploading_form.percentage < interval) { uploading_form.percentage += 1 } - },10) + }, 10) return !isJPG && isLt05M } const note_list_item_index = ref(0) @@ -328,12 +337,12 @@ function beforeUploadImg(i) { @@ -412,8 +421,8 @@ function beforeUploadImg(i) { :before-upload="beforeAvatarUpload" @click="beforeUploadImg(i)" > -
- +
+
@@ -453,7 +462,7 @@ function beforeUploadImg(i) {
须知事项
- +