Commit 8874513c authored by 盖献康's avatar 盖献康

Merge remote-tracking branch 'origin/master'

parents 22da2838 f79b4c17
......@@ -44,6 +44,8 @@ export default {
closeOnClickModal: false
}).then(() => {
this.clickAction()
}).finally(() => {
Array.prototype.forEach.call(document.getElementsByClassName('el-button'), element => element.blur())
})
} else {
this.clickAction()
......
......@@ -22,6 +22,8 @@ import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import { getToken } from '@/utils/auth'
import { MessageBox } from 'element-ui'
import store from '@/store'
export default {
name: 'Editor',
......@@ -186,12 +188,34 @@ export default {
const quill = this.Quill
// 如果上传成功
if (res) {
if (res.code === 401) {
if (!sessionStorage.getItem('isRelogin')) {
sessionStorage.setItem('isRelogin', 'true')
MessageBox.confirm(
'登录状态已过期,您可以继续留在该页面,或者重新登录',
'系统提示',
{
confirmButtonText: '重新登录',
cancelButtonText: '取消',
closeOnClickModal: false,
cancelButtonClass: 'resetBtn',
confirmButtonClass: 'queryBtn', type: 'warning' }).then(() => {
sessionStorage.setItem('isRelogin', '')
store.dispatch('LogOut').then(() => {
location.href = '/index'
})
}).catch(() => {
sessionStorage.setItem('isRelogin', '')
})
}
} else {
// 获取光标所在位置
const length = quill.getSelection().index
// 插入图片 res.url为服务器返回的图片地址
quill.insertEmbed(length, 'image', process.env.VUE_APP_TEST_API + res)
// 调整光标到最后
quill.setSelection(length + 1)
}
} else {
this.$message.error('图片插入失败')
}
......
......@@ -2424,6 +2424,7 @@ export default {
delHospital(row.id).then(res => {
if (res.code === 200) {
this.getInHospitalList(this.$route.params.id)
this.getPaymentList()
}
})
}).catch(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment