mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-24 04:54:58 +08:00
This commit is contained in:
parent
ad8a1bcc0b
commit
d3e1d702ef
|
@ -1,8 +1,10 @@
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
|
import type { RemoteItem } from '@/utils/public-interface'
|
||||||
|
|
||||||
export const useRemoteStore = defineStore('remote', {
|
export const useRemoteStore = defineStore('remote', {
|
||||||
state: () => {
|
state: () => {
|
||||||
return {
|
return {
|
||||||
|
remoteTasks: [] as Array<RemoteItem>,
|
||||||
currentRemote: {
|
currentRemote: {
|
||||||
|
|
||||||
} as any
|
} as any
|
||||||
|
@ -11,6 +13,12 @@ export const useRemoteStore = defineStore('remote', {
|
||||||
// 也可以这样定义
|
// 也可以这样定义
|
||||||
// state: () => ({ count: 0 })
|
// state: () => ({ count: 0 })
|
||||||
actions: {
|
actions: {
|
||||||
|
getRemoteTasks() {
|
||||||
|
return this.remoteTasks
|
||||||
|
},
|
||||||
|
setRemoteTasks(e: Array<RemoteItem>) {
|
||||||
|
this.remoteTasks = e
|
||||||
|
},
|
||||||
getCurrentRemote() {
|
getCurrentRemote() {
|
||||||
return this.currentRemote
|
return this.currentRemote
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang='ts' setup>
|
||||||
|
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -1,6 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="remote-manage-page">
|
<div class="remote-manage-page">
|
||||||
<div class="header-box">
|
<div class="header-box">
|
||||||
|
<div class="thumbnail" @click="viewThumbnail">
|
||||||
|
<el-icon><Menu /></el-icon>
|
||||||
|
<span>缩略图</span>
|
||||||
|
</div>
|
||||||
<div class="task-btn-item" v-for="(item, index) in remoteTask" :key="'task-' + index"
|
<div class="task-btn-item" v-for="(item, index) in remoteTask" :key="'task-' + index"
|
||||||
:class="{ 'connecting': item.patientName || item.patientCode, 'alarm': item.dataAlarm }"
|
:class="{ 'connecting': item.patientName || item.patientCode, 'alarm': item.dataAlarm }"
|
||||||
@click="editTask(item, index)" @dblclick="toRemoteControl(item, index)">
|
@click="editTask(item, index)" @dblclick="toRemoteControl(item, index)">
|
||||||
|
@ -21,7 +25,7 @@
|
||||||
|
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
|
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { setRemoteTasks, useRouter } from 'vue-router'
|
||||||
import { useRemoteStore } from '@/stores/remote-info-store'
|
import { useRemoteStore } from '@/stores/remote-info-store'
|
||||||
import type { RemoteItem } from '@/utils/public-interface'
|
import type { RemoteItem } from '@/utils/public-interface'
|
||||||
import RemoteDialog from './part/remote-dialog.vue'
|
import RemoteDialog from './part/remote-dialog.vue'
|
||||||
|
@ -71,6 +75,11 @@ function initRemoteTask() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const viewThumbnail = () => {
|
||||||
|
router.push({
|
||||||
|
path: '/remote-manage/remote-thumbnail'
|
||||||
|
})
|
||||||
|
}
|
||||||
// 打开任务连接弹窗
|
// 打开任务连接弹窗
|
||||||
const editTask = (item: RemoteItem, index: number) => {
|
const editTask = (item: RemoteItem, index: number) => {
|
||||||
item.index = index
|
item.index = index
|
||||||
|
@ -129,13 +138,47 @@ const breakRemote = (e: RemoteItem) => {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
.header-box {
|
.header-box {
|
||||||
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 180px;
|
min-height: 180px;
|
||||||
background: white;
|
background: white;
|
||||||
padding: 0 30px;
|
padding: 0 30px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
.thumbnail {
|
||||||
|
cursor: pointer;
|
||||||
|
position: absolute;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background: #f8b300;
|
||||||
|
border-top-left-radius: 25px;
|
||||||
|
border-bottom-left-radius: 25px;
|
||||||
|
box-shadow: -3px 3px 5px 0 rgba(black, .2);
|
||||||
|
font-size: 16px;
|
||||||
|
color: white;
|
||||||
|
transition: all .1s;
|
||||||
|
.el-icon {
|
||||||
|
font-size: 1.4em;
|
||||||
|
}
|
||||||
|
&>span {
|
||||||
|
display: none;
|
||||||
|
margin-left: 5px;
|
||||||
|
line-height: 1;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
width: 100px;
|
||||||
|
transition: all .3s;
|
||||||
|
&>span {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.task-btn-item {
|
.task-btn-item {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
|
@ -49,13 +49,20 @@
|
||||||
|
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
|
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { useRemoteStore } from '@/stores/remote-info-store'
|
import { useRemoteStore } from '@/stores/remote-info-store'
|
||||||
import RemoteItem from './part/remote-item.vue'
|
import RemoteItem from './part/remote-item.vue'
|
||||||
import MessageItem from './part/message-item.vue'
|
import MessageItem from './part/message-item.vue'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
|
// 路由初始化后执行
|
||||||
|
router.isReady().then(() => {
|
||||||
|
console.log(route)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
const openRemote = (num: number) => {
|
const openRemote = (num: number) => {
|
||||||
console.log(num)
|
console.log(num)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user