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