多屏阅片未配置浏览器权限时进行提示并提供权限配置教程
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
4fedec105f
commit
23cb0fab62
Binary file not shown.
|
@ -8,7 +8,9 @@ async function getPermission() {
|
|||
return true
|
||||
} else if (permission.state === "prompt") { // 询问是否授权
|
||||
// 请求授权
|
||||
navigator.permissions.request({ name: 'window-management' })
|
||||
if (navigator.permissions.request) {
|
||||
navigator.permissions.request({ name: 'window-management' })
|
||||
}
|
||||
return false
|
||||
} else if (permission.state === "denied") {
|
||||
// 权限被拒绝
|
||||
|
@ -50,7 +52,7 @@ function getScreen() {
|
|||
})
|
||||
|
||||
}
|
||||
export async function openWindow(url, name) {
|
||||
export async function openWindow(url, name, Skip = false) {
|
||||
// 判断浏览器是否兼容
|
||||
// 高版本的谷歌,edge不支持跨屏,需要降低浏览器版本86.0版
|
||||
if (!window.getScreens && !window.getScreenDetails) {
|
||||
|
@ -59,7 +61,10 @@ export async function openWindow(url, name) {
|
|||
}
|
||||
let permission = await getPermission()
|
||||
if (!permission) {
|
||||
alert('使用多屏功能请先进行授权')
|
||||
// alert('使用多屏功能请先进行授权')
|
||||
if (Skip) {
|
||||
return window.open(url, name);
|
||||
}
|
||||
return false
|
||||
}
|
||||
let multiScreen = await getScreen()
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
<template>
|
||||
<div class="trial-myinfo">
|
||||
<el-menu
|
||||
:default-active="activeIndex"
|
||||
@select="handleSelect"
|
||||
class="el-menu-demo"
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-menu :default-active="activeIndex" @select="handleSelect" class="el-menu-demo" style="width: 200px">
|
||||
<el-menu-item index="1">{{
|
||||
$t("trials:trials-myinfo:menuTitle:mine")
|
||||
}}</el-menu-item>
|
||||
|
@ -17,19 +12,10 @@
|
|||
}}</el-menu-item>
|
||||
</el-menu>
|
||||
<div class="contentBox">
|
||||
<mine
|
||||
:user="user"
|
||||
:userTypeOptions="userTypeOptions"
|
||||
v-if="activeIndex === '1'"
|
||||
@getUserInfo="getUserInfo"
|
||||
/>
|
||||
<account
|
||||
:user="user"
|
||||
@getUserInfo="getUserInfo"
|
||||
:IsCanConnectInternet="IsCanConnectInternet"
|
||||
v-if="activeIndex === '2'"
|
||||
/>
|
||||
<login-log v-if="activeIndex === '3'" :id="userId" :isMine="true" />
|
||||
<mine :user="user" :userTypeOptions="userTypeOptions" v-if="activeIndex === '1'" @getUserInfo="getUserInfo" />
|
||||
<account :user="user" @getUserInfo="getUserInfo" :IsCanConnectInternet="IsCanConnectInternet"
|
||||
v-if="activeIndex === '2'" />
|
||||
<login-log v-if="activeIndex === '3'" :id="identityUserId" :isMine="true" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -56,7 +42,7 @@ export default {
|
|||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["userId", "userName"]),
|
||||
...mapGetters(["identityUserId", "userName"]),
|
||||
},
|
||||
mounted() {
|
||||
this.getUserInfo();
|
||||
|
@ -86,7 +72,7 @@ export default {
|
|||
spinner: "el-icon-loading",
|
||||
background: "rgba(0, 0, 0, 0.07)",
|
||||
});
|
||||
getUser(this.userId)
|
||||
getUser()
|
||||
.then(async (res) => {
|
||||
this.user = res.Result;
|
||||
/* eslint-disable */
|
||||
|
@ -116,6 +102,7 @@ export default {
|
|||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
|
||||
.contentBox {
|
||||
width: calc(100% - 220px);
|
||||
background-color: #fff;
|
||||
|
@ -124,18 +111,21 @@ export default {
|
|||
overflow: auto;
|
||||
// padding-bottom: 50px;
|
||||
}
|
||||
|
||||
.trial-myinfo-head {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
left: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.trial-myinfo-left {
|
||||
overflow: auto;
|
||||
background: #fff;
|
||||
// width: calc(50% - 9px);
|
||||
// margin: 6px 0;
|
||||
height: 100%;
|
||||
|
||||
// padding-bottom: 50px;
|
||||
.trial-myinfo-left-top {
|
||||
width: 70%;
|
||||
|
@ -143,6 +133,7 @@ export default {
|
|||
position: relative;
|
||||
// margin: 0 auto;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.trial-myinfo-body {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
|
@ -152,6 +143,7 @@ export default {
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 30px;
|
||||
|
||||
div {
|
||||
color: #fff;
|
||||
font-size: 30px;
|
||||
|
@ -159,36 +151,42 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.saveBtn {
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
top: 2px;
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.trial-info-btn {
|
||||
position: absolute;
|
||||
bottom: -60px;
|
||||
left: 10px;
|
||||
min-width: 97px;
|
||||
}
|
||||
|
||||
.trial-myinfo-left-bottom {
|
||||
width: 40%;
|
||||
padding-top: 100px;
|
||||
position: relative;
|
||||
// margin: 0 auto;
|
||||
}
|
||||
|
||||
.trial-myinfo-right {
|
||||
overflow: auto;
|
||||
background: #fff;
|
||||
// width: calc(50% - 9px);
|
||||
// margin: 6px 0;
|
||||
height: 100%;
|
||||
|
||||
.sendCode {
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
top: 50%;
|
||||
transform: translate(100%, -50%);
|
||||
}
|
||||
|
||||
.trial-myinfo-right-box {
|
||||
width: 40%;
|
||||
padding-top: 100px;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item>
|
||||
<div><span>{{ $t("trials:reading:tip:MultiScreen") }}</span><a style="color:#409EFF"
|
||||
href="https://hir-oss.test.extimaging.com/hir-test/SupportDownload/ConfigurationDocumentation.pdf"
|
||||
href="/screen.pdf"
|
||||
target="blank">{{
|
||||
$t("trials:reading:tip:openFile")
|
||||
}}</a></div>
|
||||
|
|
|
@ -724,6 +724,14 @@ export default {
|
|||
}
|
||||
if (IsDoubleScreen) {
|
||||
this.openWindow = await openWindow(routeData.href)
|
||||
if (!this.openWindow) {
|
||||
let html = `<div><span>${this.$t("trials:reading:tip:MultiScreen2")}</span><a style="color:#409EFF"
|
||||
href="/screen.pdf"
|
||||
target="blank">${this.$t("trials:reading:tip:openFile")}</a></div>`
|
||||
let confirm = await this.$confirm(html, '', { dangerouslyUseHTMLString: true })
|
||||
if (!confirm) return false
|
||||
this.openWindow = await openWindow(routeData.href, '', true)
|
||||
}
|
||||
} else {
|
||||
this.openWindow = window.open(routeData.href, "_blank");
|
||||
}
|
||||
|
|
|
@ -780,6 +780,14 @@ export default {
|
|||
}
|
||||
if (IsDoubleScreen) {
|
||||
this.openWindow = await openWindow(routeData.href)
|
||||
if (!this.openWindow) {
|
||||
let html = `<div><span>${this.$t("trials:reading:tip:MultiScreen2")}</span><a style="color:#409EFF"
|
||||
href="/screen.pdf"
|
||||
target="blank">${this.$t("trials:reading:tip:openFile")}</a></div>`
|
||||
let confirm = await this.$confirm(html, '', { dangerouslyUseHTMLString: true })
|
||||
if (!confirm) return false
|
||||
this.openWindow = await openWindow(routeData.href, '', true)
|
||||
}
|
||||
} else {
|
||||
this.openWindow = window.open(routeData.href, "_blank");
|
||||
}
|
||||
|
|
|
@ -231,6 +231,14 @@ export default {
|
|||
}
|
||||
if (IsDoubleScreen) {
|
||||
this.openWindow = await openWindow(routeData.href)
|
||||
if (!this.openWindow) {
|
||||
let html = `<div><span>${this.$t("trials:reading:tip:MultiScreen2")}</span><a style="color:#409EFF"
|
||||
href="/screen.pdf"
|
||||
target="blank">${this.$t("trials:reading:tip:openFile")}</a></div>`
|
||||
let confirm = await this.$confirm(html, '', { dangerouslyUseHTMLString: true })
|
||||
if (!confirm) return false
|
||||
this.openWindow = await openWindow(routeData.href, '', true)
|
||||
}
|
||||
} else {
|
||||
this.openWindow = window.open(routeData.href, "_blank");
|
||||
}
|
||||
|
|
|
@ -193,8 +193,8 @@
|
|||
)
|
||||
" @click="handleStatus(scope.row)" />
|
||||
<!---v-if="!scope.row.UserName"-->
|
||||
<el-button v-if="!scope.row.UserName" circle :title="$t('trials:staff:action:email')" icon="el-icon-message"
|
||||
@click="handleSendEmail(scope.row)" />
|
||||
<el-button v-if="!scope.row.UserName && IsCanConnectInternet" circle :title="$t('trials:staff:action:email')"
|
||||
icon="el-icon-message" @click="handleSendEmail(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -327,6 +327,7 @@ import StaffForm from './staffForm'
|
|||
import StaffExternalForm from './staffExternalForm'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import moment from 'moment'
|
||||
import { getHospital } from "@/api/hospital.js";
|
||||
const getListQueryDefault = () => {
|
||||
return {
|
||||
UserRealName: '',
|
||||
|
@ -393,14 +394,28 @@ export default {
|
|||
title: this.$t('trials:staff:dialogTitle:role'),
|
||||
width: '800px',
|
||||
},
|
||||
|
||||
IsCanConnectInternet: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.trialId = this.$route.query.trialId
|
||||
this.getUserType()
|
||||
this.getList()
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
// 获取医院信息
|
||||
async getInfo() {
|
||||
try {
|
||||
let res = await getHospital();
|
||||
if (res.IsSuccess) {
|
||||
this.IsCanConnectInternet = res.Result.IsCanConnectInternet;
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
// 发送邮件
|
||||
async handleSendEmail(row) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue