|
|
|
@ -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) {
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="left" label="医院地址" min-width="150">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<div class="show-content text-ellipsis-1">{{scope.row.addr }}</div>
|
|
|
|
|
<div class="show-content text-ellipsis-1">{{ scope.row.addr }}</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="注意事项" min-width="150">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<div>{{scope.row.notes.length}}项</div>
|
|
|
|
|
<div>{{ scope.row.notes.length }}项</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="须知事项" min-width="150">
|
|
|
|
@ -412,8 +421,8 @@ function beforeUploadImg(i) {
|
|
|
|
|
:before-upload="beforeAvatarUpload"
|
|
|
|
|
@click="beforeUploadImg(i)"
|
|
|
|
|
>
|
|
|
|
|
<div class="progress-box" v-if="uploading_form.uploading">
|
|
|
|
|
<el-progress class="progress-item" :percentage="uploading_form.percentage" :status="uploading_form.progressStatus" />
|
|
|
|
|
<div v-if="uploading_form.uploading" class="progress-box">
|
|
|
|
|
<el-progress class="progress-item" :percentage="uploading_form.percentage" :status="uploading_form.progressStatus" />
|
|
|
|
|
</div>
|
|
|
|
|
<img v-if="item.content" :src="item.content" class="img-container">
|
|
|
|
|
<el-icon v-else class="avatar-uploader-icon">
|
|
|
|
@ -453,7 +462,7 @@ function beforeUploadImg(i) {
|
|
|
|
|
<div class="ic-right-row">
|
|
|
|
|
<div class="icr-left">须知事项</div>
|
|
|
|
|
<div class="icr-right">
|
|
|
|
|
<el-input autosize type="textarea" v-model="item.content" />
|
|
|
|
|
<el-input v-model="item.content" autosize type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|