From 71ad46e43c9d9af33e195ddee6e0b49b71aef3d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=80=AA?= <690927457@qq.com> Date: Wed, 31 Jan 2024 22:52:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E6=84=8F=E4=BA=8B?= =?UTF-8?q?=E9=A1=B9=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/hospital/index.vue | 39 +++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 15 deletions(-) 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) { - {{scope.row.addr }} + {{ scope.row.addr }} - {{scope.row.notes.length}}项 + {{ scope.row.notes.length }}项 @@ -412,8 +421,8 @@ function beforeUploadImg(i) { :before-upload="beforeAvatarUpload" @click="beforeUploadImg(i)" > - - + + @@ -453,7 +462,7 @@ function beforeUploadImg(i) { 须知事项 - +