环境:vue+webpack+cornerstone

ide:vs code

需求:窗格设置+拼图设置

代码:

主体:printPage.vue

   <div class="div middle">
<div class="header">
<div class="box_f">
<div class="title">窗格设置</div>
<div class="box_f_s" @click="selectWindow(1)"></div>
<div class="box_f_s" @click="selectWindow(2)">
<div style="width:100%;height:49px;border-bottom:2px solid #9d9e9f"></div>
</div>
<div class="box_f_s" @click="selectWindow(3)">
<div style="width:50%;height:100px;border-right:2px solid #9d9e9f"></div>
</div>
<div class="box_f_s" style="position:relative" @click="selectWindow(4)">
<div style="border-bottom:2px solid #9d9e9f">
<div style="width:50%;height:50px;border-right:2px solid #9d9e9f;"></div>
</div>
<div class="bottom" style="height:48px;border-right:2px solid #9d9e9f;"></div>
</div>
</div>
<div class="box_f">
<div class="title">拼图设置</div>
<div class="box_f_s" @click="selectJigsaw(1)"></div>
<div class="box_f_s" @click="selectJigsaw(2)">
<div style="width:100%;height:49px;border-bottom:2px solid #9d9e9f"></div>
</div>
<div class="box_f_s" @click="selectJigsaw(3)">
<div style="width:50%;height:100px;border-right:2px solid #9d9e9f"></div>
</div>
<div class="box_f_s" style="position:relative" @click="selectJigsaw(4)">
<div style="border-bottom:2px solid #9d9e9f">
<div style="width:50%;height:50px;border-right:2px solid #9d9e9f;"></div>
</div>
<div class="bottom" style="height:48px;border-right:2px solid #9d9e9f;"></div>
</div>
</div>
</div>
<div class="blackBox">
<preview-dicom ref="xxoo" v-show="xxooshow"></preview-dicom>
<windowindex2 ref="window2" v-show="showWindowIndex2" @windowIndex="windowIndex" @jigclick="jigclick"/> <!-- 上下格式 -->
<windowindex3 ref="window3" v-show="showWindowIndex3" @windowIndex="windowIndex" @jigclick="jigclick"/> <!-- 上下格式 -->
<windowindex4 ref="window4" v-show="showWindowIndex4" @windowIndex="windowIndex" @jigclick="jigclick"/> <!-- 上下格式 -->
</div>
<div class="blackSmallBox">
<div class="son" v-for="(item,key) in dicomList" :key="key" @click="imgClcik(item.url)">
<preview-dicom :imageId="item.url"></preview-dicom>
</div>
<!-- <div class="son"></div>
<div class="son"></div>
<div class="son"></div>
<div class="son"></div>
<div class="son"></div>
<div class="son"></div>
<div class="son"></div>
<div class="son"></div>
<div class="son"></div>
<div class="son"></div>
<div class="son"></div> -->
</div>
</div>

组件引入及部分变量,多余的忽略

import windowindex2 from './../components/window/windowindex2.vue';  // 窗格1
import windowindex3 from './../components/window/windowindex3.vue'; // 窗格2
import windowindex4 from './../components/window/windowindex4.vue'; // 窗格3
import {formatDate} from "../common/js/date";
import page from './../components/table/Pagination.vue';
import previewDicom from 'Components/previewDicom' // dicom文件组件
export default {
components: {
windowindex2,
windowindex3,
windowindex4,
page,
previewDicom
},
data() {
return {
ip:this.CONSTANT.CONSTANT.WEB_URL,
patientList:[
],
searchForm:{
patientId: '',
name: '',
arrivedDatetime: '',
printStatus: '',
total:0,
currentPage:0
},
PrintDialogVisible:false,
printForm: {
name: ''
},
patientForm:{
cname:'', //相机名称
},
showWindowIndex2: false,
showWindowIndex3: false,
showWindowIndex4: false,
windowindex:'', // 左侧选择的窗口
windowClickIndex: '', // 左侧内部选择的窗口
jigsawindex: '', // 右侧选择的窗口
sizeList:[ //尺寸列表
{
name: '8INX10IN',
},
{
name: '10INX12IN',
},
{
name: '10INX14IN',
},
{
name: '11INX14IN',
},
{
name: '14INX14IN',
},
{
name: '14INX17IN',
},
{
name: '24CMX24CM',
},
{
name: '24CMX30CM',
},
],
cameraList: [],
printStatusList: [],
row:{}, //当前行的数据
currentIndex: '', // 判断当前选择的li
active:['active'],
dicomList:[
{
url:'http://127.0.0.1/testDICOM/CTStudy/3.719KB.DCM',
},
{
url:'http://127.0.0.1/testDICOM/CTStudy/3.719KB.DCM',
},
{
url:'http://127.0.0.1/testDICOM/CTStudy/test.dcm',
},
{
url:'http://127.0.0.1/testDICOM/CTStudy/1.5191KB.DCM',
},
{
url:'http://127.0.0.1/testDICOM/CTStudy/1.5191KB.DCM',
},
{
url:'http://127.0.0.1/testDICOM/CTStudy/1.5191KB.DCM',
}
],
saveurl: '',
jigclickIndex:'', // 右侧窗口内部点击的div
xxooshow: true, // 最大的div显示
xxxxChange: 'big' // big 默认右边栏第一个 small 表示显示右边栏其它的三个

部分使用到的函数

 selectWindow(index) {
console.log('[*] window is -------', index)
this.windowindex = index;
this.xxxxChange = 'big';
if(index === 2) {
this.xxooshow = false;
this.showWindowIndex3 = false;
this.showWindowIndex4 = false;
this.showWindowIndex2 = true;
} else if(index === 3){
this.xxooshow = false;
this.showWindowIndex2 = false;
this.showWindowIndex4 = false;
this.showWindowIndex3 = true;
} else if(index === 4) {
this.xxooshow = false;
this.showWindowIndex2 = false;
this.showWindowIndex3 = false;
this.showWindowIndex4 = true;
} else {
this.xxooshow = true;
this.showWindowIndex2 = false;
this.showWindowIndex3 = false;
this.showWindowIndex4 = false;
}
},
selectJigsaw(index) {
console.log('[*] jigsaw is -------', index)
// 清除所有父窗口
if(index === 1){
this.xxxxChange = 'big';
// 可以显示
if(this.windowindex === 2){
if(this.windowClickIndex === 1 ){
this.$refs.window2.p1show = true;
this.$refs.window2.xname = 'changejigsawindex'+ this.windowClickIndex +'_1';
}else if(this.windowClickIndex === 2 ){
this.$refs.window2.p2show = true;
this.$refs.window2.xname = 'changejigsawindex'+ this.windowClickIndex +'_1';
}
}else if(this.windowindex === 3){
if(this.windowClickIndex === 1 ){
this.$refs.window3.p1show = true;
this.$refs.window3.xname = 'changejigsawindex'+ this.windowClickIndex +'_1';
}else if(this.windowClickIndex === 2 ){
this.$refs.window3.p2show = true;
this.$refs.window3.xname = 'changejigsawindex'+ this.windowClickIndex +'_1';
}
}else if(this.windowindex === 4){
if(this.windowClickIndex === 1 ){
this.$refs.window4.p1show = true;
this.$refs.window4.xname = 'changejigsawindex'+ this.windowClickIndex +'_1';
}else if(this.windowClickIndex === 2 ){
this.$refs.window4.p2show = true;
this.$refs.window4.xname = 'changejigsawindex'+ this.windowClickIndex +'_1';
}else if(this.windowClickIndex === 3){
this.$refs.window4.p3show = true;
this.$refs.window4xname = 'changejigsawindex'+ this.windowClickIndex +'_1';
}else if(this.windowClickIndex === 4){
this.$refs.window4.p4show = true;
this.$refs.window4.xname = 'changejigsawindex'+ this.windowClickIndex +'_1';
}
}
}else{
this.xxxxChange = 'small';
if(this.windowindex === 2){
if(this.windowClickIndex === 1 ){
this.$refs.window2.p1show = false;
}else if(this.windowClickIndex === 2 ){
this.$refs.window2.p2show = false;
}
}else if(this.windowindex === 3){
if(this.windowClickIndex === 1 ){
this.$refs.window3.p1show = false;
}else if(this.windowClickIndex === 2 ){
this.$refs.window3.p2show = false;
}
}else if(this.windowindex === 4){
if(this.windowClickIndex === 1 ){
this.$refs.window4.p1show = false;
}else if(this.windowClickIndex === 2 ){
this.$refs.window4.p2show = false;
}else if(this.windowClickIndex === 3){
this.$refs.window4.p3show = false;
}else if(this.windowClickIndex === 4){
this.$refs.window4.p4show = false;
}
}
this.jigsawindex = index;
if(this.windowClickIndex === ''){
return false
}else{
// this.xname = 'showjigsawindex'+ this.windowClickIndex +'_' + this.jigsawindex;
if(this.windowindex ===2){
this.$refs.window2.xname = 'changejigsawindex'+ this.windowClickIndex +'_' + this.jigsawindex;
}else if(this.windowindex === 3){
this.$refs.window3.xname = 'changejigsawindex'+ this.windowClickIndex +'_' + this.jigsawindex;
} else if(this.windowindex ===4){
this.$refs.window4.xname = 'changejigsawindex'+ this.windowClickIndex +'_' + this.jigsawindex;
}
}
}
},
windowIndex(index){
console.log('[*] windowclcik is -------', index)
//点击之后给个选中状态
// if(this.windowindex ===2){
// this.$refs.window2.xname = 'changeClass'+ this.windowindex +'_' + index;
// }else if(this.windowindex === 3){
// this.$refs.window3.xname = 'changejigsawindex'+ this.windowClickIndex +'_' + this.jigsawindex;
// } else if(this.windowindex ===4){
// this.$refs.window4.xname = 'changejigsawindex'+ this.windowClickIndex +'_' + this.jigsawindex;
// }
this.windowClickIndex = index;
},
imgClcik(url){
console.log('[*] 当前点击的图片+++++', url);
// this.$refs.window2.imgurl = url;
var url = `wadouri:`+url;
console.log('[*] 当前点击的窗口', this.windowClickIndex);
if(this.windowindex == 1 || this.windowindex ==''){
this.$refs.xxoo.loadAndViewImage(url);
}
// 没有小窗口时 xxxxxx
console.log('[*] 这里应该是没有小窗口的时候-----',this.xxxxChange);
if(this.windowClickIndex && this.xxxxChange === 'big'){
if(this.windowindex == 2){
if(this.windowClickIndex == 1){
this.$refs.window2.$refs.p1.loadAndViewImage(url);
}else if(this.windowClickIndex == 2){
this.$refs.window2.$refs.p2.loadAndViewImage(url);
}
}
if(this.windowindex == 3){
if(this.windowClickIndex == 1){
this.$refs.window3.$refs.p1.loadAndViewImage(url);
}else if(this.windowClickIndex == 2){
this.$refs.window3.$refs.p2.loadAndViewImage(url);
}
}
if(this.windowindex == 4){
if(this.windowClickIndex == 1){
this.$refs.window4.$refs.p1.loadAndViewImage(url);
}else if(this.windowClickIndex == 2){
this.$refs.window4.$refs.p2.loadAndViewImage(url);
}else if(this.windowClickIndex == 3){
this.$refs.window4.$refs.p3.loadAndViewImage(url);
}else{
this.$refs.window4.$refs.p4.loadAndViewImage(url);
}
}
}else{
console.log('左侧当前选中的是哪个窗格+++', this.windowindex);
console.log('左侧内部当前选中的是哪个窗格+++', this.windowClickIndex);
console.log('右侧当前选中的是哪个窗格+++', this.jigsawindex);
console.log('内部当前选中的是哪个窗格+++', this.jigclickIndex);
if(this.windowindex == 2) { // 横格
if(this.windowClickIndex === 1){ // 第一个windowindexson
if(this.jigsawindex === 2){ // 第一个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window2.$refs.jig1_2.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window2.$refs.jig1_2.$refs.p2.loadAndViewImage(url);
}
}
// 第二个窗口
if(this.jigsawindex === 3){ // 第二个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window2.$refs.jig1_3.$refs.p1.loadAndViewImage(url);
}
if( this.jigclickIndex === 2){
this.$refs.window2.$refs.jig1_3.$refs.p2.loadAndViewImage(url);
}
}
if(this.jigsawindex === 4){ // 第三个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window2.$refs.jig1_4.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window2.$refs.jig1_4.$refs.p2.loadAndViewImage(url);
}else if(this.jigclickIndex === 3){
this.$refs.window2.$refs.jig1_4.$refs.p3.loadAndViewImage(url);
}else if(this.jigclickIndex === 4){
this.$refs.window2.$refs.jig1_4.$refs.p4.loadAndViewImage(url);
}
}
}else if(this.windowClickIndex === 2){
if(this.jigsawindex === 2){ // 第一个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window2.$refs.jig2_2.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window2.$refs.jig2_2.$refs.p2.loadAndViewImage(url);
}
}
// 第二个窗口
if(this.jigsawindex === 3){ // 第二个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window2.$refs.jig2_3.$refs.p1.loadAndViewImage(url);
}
if( this.jigclickIndex === 2){
this.$refs.window2.$refs.jig2_3.$refs.p2.loadAndViewImage(url);
}
}
if(this.jigsawindex === 4){ // 第三个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window2.$refs.jig2_4.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window2.$refs.jig2_4.$refs.p2.loadAndViewImage(url);
}else if(this.jigclickIndex === 3){
this.$refs.window2.$refs.jig2_4.$refs.p3.loadAndViewImage(url);
}else if(this.jigclickIndex === 4){
this.$refs.window2.$refs.jig2_4.$refs.p4.loadAndViewImage(url);
}
}
}
}else if(this.windowindex == 3){ // 竖格
if(this.windowClickIndex === 1){ // 第一个windowindexson
if(this.jigsawindex === 2){ // 第一个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window3.$refs.jig1_2.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window3.$refs.jig1_2.$refs.p2.loadAndViewImage(url);
}
}
// 第二个窗口
if(this.jigsawindex === 3){ // 第二个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window3.$refs.jig1_3.$refs.p1.loadAndViewImage(url);
}
if( this.jigclickIndex === 2){
this.$refs.window3.$refs.jig1_3.$refs.p2.loadAndViewImage(url);
}
}
if(this.jigsawindex === 4){ // 第三个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window3.$refs.jig1_4.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window3.$refs.jig1_4.$refs.p2.loadAndViewImage(url);
}else if(this.jigclickIndex === 3){
this.$refs.window3.$refs.jig1_4.$refs.p3.loadAndViewImage(url);
}else if(this.jigclickIndex === 4){
this.$refs.window3.$refs.jig1_4.$refs.p4.loadAndViewImage(url);
}
}
}else if(this.windowClickIndex === 2){
if(this.jigsawindex === 2){ // 第一个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window3.$refs.jig2_2.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window3.$refs.jig2_2.$refs.p2.loadAndViewImage(url);
}
}
// 第二个窗口
if(this.jigsawindex === 3){ // 第二个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window3.$refs.jig2_3.$refs.p1.loadAndViewImage(url);
}
if( this.jigclickIndex === 2){
this.$refs.window3.$refs.jig2_3.$refs.p2.loadAndViewImage(url);
}
}
if(this.jigsawindex === 4){ // 第三个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window3.$refs.jig2_4.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window3.$refs.jig2_4.$refs.p2.loadAndViewImage(url);
}else if(this.jigclickIndex === 3){
this.$refs.window3.$refs.jig2_4.$refs.p3.loadAndViewImage(url);
}else if(this.jigclickIndex === 4){
this.$refs.window3.$refs.jig2_4.$refs.p4.loadAndViewImage(url);
}
}
}
}else if(this.windowindex == 4){ // 田字格
if(this.windowClickIndex === 1){ // 第一个windowindexson
if(this.jigsawindex === 2){ // 第一个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig1_2.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig1_2.$refs.p2.loadAndViewImage(url);
}
}
// 第二个窗口
if(this.jigsawindex === 3){ // 第二个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig1_3.$refs.p1.loadAndViewImage(url);
}
if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig1_3.$refs.p2.loadAndViewImage(url);
}
}
if(this.jigsawindex === 4){ // 第三个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig1_4.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig1_4.$refs.p2.loadAndViewImage(url);
}else if(this.jigclickIndex === 3){
this.$refs.window4.$refs.jig1_4.$refs.p3.loadAndViewImage(url);
}else if(this.jigclickIndex === 4){
this.$refs.window4.$refs.jig1_4.$refs.p4.loadAndViewImage(url);
}
}
}else if(this.windowClickIndex === 2){
if(this.jigsawindex === 2){ // 第一个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig2_2.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig2_2.$refs.p2.loadAndViewImage(url);
}
}
// 第二个窗口
if(this.jigsawindex === 3){ // 第二个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig2_3.$refs.p1.loadAndViewImage(url);
}
if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig2_3.$refs.p2.loadAndViewImage(url);
}
}
if(this.jigsawindex === 4){ // 第三个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig2_4.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig2_4.$refs.p2.loadAndViewImage(url);
}else if(this.jigclickIndex === 3){
this.$refs.window4.$refs.jig2_4.$refs.p3.loadAndViewImage(url);
}else if(this.jigclickIndex === 4){
this.$refs.window4.$refs.jig2_4.$refs.p4.loadAndViewImage(url);
}
}
}else if(this.windowClickIndex === 3){
if(this.jigsawindex === 2){ // 第一个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig2_2.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig2_2.$refs.p2.loadAndViewImage(url);
}
}
// 第二个窗口
if(this.jigsawindex === 3){ // 第二个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig3_3.$refs.p1.loadAndViewImage(url);
}
if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig3_3.$refs.p2.loadAndViewImage(url);
}
}
if(this.jigsawindex === 4){ // 第三个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig3_4.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig3_4.$refs.p2.loadAndViewImage(url);
}else if(this.jigclickIndex === 3){
this.$refs.window4.$refs.jig3_4.$refs.p3.loadAndViewImage(url);
}else if(this.jigclickIndex === 4){
this.$refs.window4.$refs.jig3_4.$refs.p4.loadAndViewImage(url);
}
}
}else if(this.windowClickIndex === 4){
if(this.jigsawindex === 2){ // 第一个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig4_2.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig4_2.$refs.p2.loadAndViewImage(url);
}
}
// 第二个窗口
if(this.jigsawindex === 3){ // 第二个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig4_3.$refs.p1.loadAndViewImage(url);
}
if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig4_3.$refs.p2.loadAndViewImage(url);
}
}
if(this.jigsawindex === 4){ // 第三个jigsawindex
if( this.jigclickIndex === 1){
this.$refs.window4.$refs.jig4_4.$refs.p1.loadAndViewImage(url);
}else if( this.jigclickIndex === 2){
this.$refs.window4.$refs.jig4_4.$refs.p2.loadAndViewImage(url);
}else if(this.jigclickIndex === 3){
this.$refs.window4.$refs.jig4_4.$refs.p3.loadAndViewImage(url);
}else if(this.jigclickIndex === 4){
this.$refs.window4.$refs.jig4_4.$refs.p4.loadAndViewImage(url);
}
}
}
}
}
},
jigclick(val){
this.jigclickIndex = val;
console.log(this.jigclickIndex);
}
.middle{
width:60%;
height:400px;
// background-color:white;
.header{
height:160px;
.box_f{
width:45%;
height:140px;
border:1px solid #9d9e9f;
margin-top:10px;
margin-left:3%;
display:inline-block;
color:#606266
.title{
width:30%;
height:20px;
line-height:20px;
margin:-10px auto;
background-color:#d4d4d4;
text-align:center;
}
.box_f_s{
width:20%;
height:100px;
border:2px solid #9d9e9f;
display:inline-block;
margin-top:16px;
margin-left:3%;
.bottom{
width:50%;
}
}
}
}
.blackBox{
width:93%;
height:600px;
background-color:black;
margin:0 auto;
}
.blackSmallBox{
width:93%;
height:140px;
margin: 20px auto;
white-space:nowrap;
// min-width:1000px;
overflow-x:auto;
overflow-y:hidden;
.son{
width:16%;
height:140px;
background-color:black;
margin-right:0.2%;
display:inline-block;
}
}
}

组件windowindex2.vue

<template>
<div>
<div id="windowindex2son1" @click="showSon(1)" :class="active1">
<preview-dicom ref="p1" v-show="p1show"></preview-dicom>
<jigsawindex2 ref="jig1_2" v-show="showjigsawindex1_2" @clickjig="clickjig1_2"/>
<jigsawindex3 ref="jig1_3" v-show="showjigsawindex1_3" @clickjig="clickjig1_3"/>
<jigsawindex4 ref="jig1_4" v-show="showjigsawindex1_4" @clickjig="clickjig1_4" />
</div>
<div id="windowindex2son2" @click="showSon(2)" :class="active2">
<preview-dicom ref="p2" v-show="p2show"></preview-dicom>
<jigsawindex2 ref="jig2_2" v-show="showjigsawindex2_2" @clickjig="clickjig2_2"/>
<jigsawindex3 ref="jig2_3" v-show="showjigsawindex2_3" @clickjig="clickjig2_3"/>
<jigsawindex4 ref="jig2_4" v-show="showjigsawindex2_4" @clickjig="clickjig2_4"/>
</div>
</div>
</template> <script>
import jigsawindex2 from './../jigsaw/jigsawindex2.vue';
import jigsawindex3 from '../jigsaw/jigsawindex3.vue';
import jigsawindex4 from '../jigsaw/jigsawindex4.vue';
import previewDicom from 'Components/previewDicom';
export default {
components:{
jigsawindex2,
jigsawindex3,
jigsawindex4,
previewDicom
},
data() {
return {
ip: this.CONSTANT.CONSTANT.WEB_URL,
showjigsawindex1_2: false,
showjigsawindex1_3: false,
showjigsawindex1_4: false,
showjigsawindex2_2: false,
showjigsawindex2_3: false,
showjigsawindex2_4: false,
xname: '',
xclass: '',
active1:[],
active2:[],
imgurl:'',
p1show: true,
p2show: true
// url1_3: "http://127.0.0.1/testDICOM/CTStudy/1.5191KB.DCM"
}
},
watch:{
xname: function(){
eval('this.'+ this.xname+'()');
},
xclass: function(){
eval('this.'+ this.xclass+'()');
},
},
created: function () {
},
methods: {
showSon(index){
console.log(index)
this.$emit('windowIndex', index)
},
changejigsawindex1_1(){
this.showjigsawindex1_3 = false;
this.showjigsawindex1_4 = false;
this.showjigsawindex1_2 = false;
},
changejigsawindex1_2(){
this.showjigsawindex1_3 = false;
this.showjigsawindex1_4 = false;
this.showjigsawindex1_2 = true;
},
changejigsawindex1_3(){
this.showjigsawindex1_4 = false;
this.showjigsawindex1_2 = false;
this.showjigsawindex1_3 = true; },
changejigsawindex1_4(){
this.showjigsawindex1_3 = false;
this.showjigsawindex1_2 = false;
this.showjigsawindex1_4 = true;
},
changejigsawindex2_1(){
this.showjigsawindex2_3 = false;
this.showjigsawindex2_4 = false;
this.showjigsawindex2_2 = false;
},
changejigsawindex2_2(){
this.showjigsawindex2_4 = false;
this.showjigsawindex2_3 = false;
this.showjigsawindex2_2 = true;
},
changejigsawindex2_3(){
this.showjigsawindex2_2 = false;
this.showjigsawindex2_4 = false;
this.showjigsawindex2_3 = true;
},
changejigsawindex2_4(){
this.showjigsawindex2_2 = false;
this.showjigsawindex2_3 = false;
this.showjigsawindex2_4 = true;
},
// changeClass2_1(){
// console.log('class+++',1);
// this.active2 = [];
// this.active1.push('active');
// this.$refs.jig1_2.xclass = 'jigclass0';
// },
// changeClass2_2(){
// console.log('class+++',2);
// this.active1 = [];
// this.active2.push('active');
// this.$refs.jig1_2.xclass = 'jigclass0';
// },
clickjig1_2(val){
console.log('[*] 内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig2_2.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig1_2.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig1_3(val){
console.log('[*] 1-3内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig2_3.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig1_3.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig1_4(val){
console.log('[*] 1-3内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig2_4.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig1_4.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig2_2(val){
console.log('[*] 内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig1_2.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig2_2.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig2_3(val){
console.log('[*] 内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig1_3.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig2_3.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig2_4(val){
console.log('[*] 1-3内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig1_4.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig2_4.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clearAll(){
this.$refs.jig1_2.xclass = 'jigclass0';
this.$refs.jig1_3.xclass = 'jigclass0';
this.$refs.jig1_4.xclass = 'jigclass0';
this.$refs.jig2_2.xclass = 'jigclass0';
this.$refs.jig2_3.xclass = 'jigclass0';
this.$refs.jig2_4.xclass = 'jigclass0';
}
}
}
</script> <style scoped lang="stylus">
#windowindex2son1{
width:100%;
height:298px;
border-bottom:2px solid white;
}
#windowindex2son2{
width:100%;
height:300px;
}
.active{
background-color:#C0C0C0;
}
</style>

组件windowindex3.vue

<template>
<div style="width:100%; height:100%;">
<div id="windowindex3son1" @click="showSon(1)">
<preview-dicom ref="p1" v-show="p1show"></preview-dicom>
<jigsawindex2 ref="jig1_2" v-show="showjigsawindex1_2" @clickjig="clickjig1_2"/>
<jigsawindex3 ref="jig1_3" v-show="showjigsawindex1_3" @clickjig="clickjig1_3"/>
<jigsawindex4 ref="jig1_4" v-show="showjigsawindex1_4" @clickjig="clickjig1_4" />
</div>
<div id="windowindex3son2" @click="showSon(2)">
<preview-dicom ref="p2" v-show="p2show"></preview-dicom>
<jigsawindex2 ref="jig2_2" v-show="showjigsawindex2_2" @clickjig="clickjig2_2"/>
<jigsawindex3 ref="jig2_3" v-show="showjigsawindex2_3" @clickjig="clickjig2_3"/>
<jigsawindex4 ref="jig2_4" v-show="showjigsawindex2_4" @clickjig="clickjig2_4"/>
</div>
</div>
</template> <script>
import jigsawindex2 from './../jigsaw/jigsawindex2.vue';
import jigsawindex3 from '../jigsaw/jigsawindex3.vue';
import jigsawindex4 from '../jigsaw/jigsawindex4.vue';
import previewDicom from 'Components/previewDicom';
export default {
components:{
jigsawindex2,
jigsawindex3,
jigsawindex4,
previewDicom
},
data() {
return {
ip: this.CONSTANT.CONSTANT.WEB_URL,
showjigsawindex1_2: false,
showjigsawindex1_3: false,
showjigsawindex1_4: false,
showjigsawindex2_2: false,
showjigsawindex2_3: false,
showjigsawindex2_4: false,
xname: '',
p1show: true,
p2show: true
}
},
watch:{
xname: function(){
eval('this.'+ this.xname+'()');
}
},
created: function () { },
mounted: function () { },
methods: {
showSon(index){
console.log(index)
this.$emit('windowIndex', index)
},
changejigsawindex1_1(){
this.showjigsawindex1_3 = false;
this.showjigsawindex1_4 = false;
this.showjigsawindex1_2 = false;
},
changejigsawindex1_2(){
this.showjigsawindex1_3 = false;
this.showjigsawindex1_4 = false;
this.showjigsawindex1_2 = true;
},
changejigsawindex1_3(){
this.showjigsawindex1_4 = false;
this.showjigsawindex1_2 = false;
this.showjigsawindex1_3 = true; },
changejigsawindex1_4(){
this.showjigsawindex1_3 = false;
this.showjigsawindex1_2 = false;
this.showjigsawindex1_4 = true;
},
changejigsawindex2_1(){
this.showjigsawindex2_3 = false;
this.showjigsawindex2_4 = false;
this.showjigsawindex2_2 = false;
},
changejigsawindex2_2(){
this.showjigsawindex2_4 = false;
this.showjigsawindex2_3 = false;
this.showjigsawindex2_2 = true;
},
changejigsawindex2_3(){
this.showjigsawindex2_2 = false;
this.showjigsawindex2_2 = false;
this.showjigsawindex2_3 = true;
},
changejigsawindex2_4(){
this.showjigsawindex2_2 = false;
this.showjigsawindex2_3 = false;
this.showjigsawindex2_4 = true;
},
clickjig1_2(val){
console.log('[*] 内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig2_2.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig1_2.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig1_3(val){
console.log('[*] 1-3内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig2_3.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig1_3.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig1_4(val){
console.log('[*] 1-3内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig2_4.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig1_4.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig2_2(val){
console.log('[*] 内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig1_2.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig2_2.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig2_3(val){
console.log('[*] 内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig1_3.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig2_3.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig2_4(val){
console.log('[*] 1-3内部点击', val);
this.active1 = [];
this.active2 = [];
// this.$refs.jig1_4.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig2_4.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clearAll(){
this.$refs.jig1_2.xclass = 'jigclass0';
this.$refs.jig1_3.xclass = 'jigclass0';
this.$refs.jig1_4.xclass = 'jigclass0';
this.$refs.jig2_2.xclass = 'jigclass0';
this.$refs.jig2_3.xclass = 'jigclass0';
this.$refs.jig2_4.xclass = 'jigclass0';
}
}
}
</script> <style scoped lang="stylus">
#windowindex3son1{
width:50%;
height:600px;
border-right:2px solid white;
float:left;
}
#windowindex3son2{
width:49%;
height:600px;
display:inline-block;
}
</style>

组件windowindex4.vue

<template>
<div >
<div id="windowindex41">
<div id="windowindex4son1" @click="showSon(1)">
<preview-dicom ref="p1" v-show="p1show"></preview-dicom>
<jigsawindex2 ref="jig1_2" v-show="showjigsawindex1_2" @clickjig="clickjig1_2"/>
<jigsawindex3 ref="jig1_3" v-show="showjigsawindex1_3" @clickjig="clickjig1_3"/>
<jigsawindex4 ref="jig1_4" v-show="showjigsawindex1_4" @clickjig="clickjig1_4" />
</div>
<div id="windowindex4son2" @click="showSon(2)">
<preview-dicom ref="p2" v-show="p2show"></preview-dicom>
<jigsawindex2 ref="jig2_2" v-show="showjigsawindex2_2" @clickjig="clickjig2_2"/>
<jigsawindex3 ref="jig2_3" v-show="showjigsawindex2_3" @clickjig="clickjig2_3"/>
<jigsawindex4 ref="jig2_4" v-show="showjigsawindex2_4" @clickjig="clickjig2_4"/>
</div>
</div>
<div id="windowindex4son3" @click="showSon(3)">
<preview-dicom ref="p3" v-show="p3show"></preview-dicom>
<jigsawindex2 ref="jig3_2" v-show="showjigsawindex3_2" @clickjig="clickjig3_2"/>
<jigsawindex3 ref="jig3_3" v-show="showjigsawindex3_3" @clickjig="clickjig3_3"/>
<jigsawindex4 ref="jig3_4" v-show="showjigsawindex3_4" @clickjig="clickjig3_4" />
</div>
<div id="windowindex4son4" @click="showSon(4)">
<preview-dicom ref="p4" v-show="p4show"></preview-dicom>
<jigsawindex2 ref="jig4_2" v-show="showjigsawindex4_2" @clickjig="clickjig4_2"/>
<jigsawindex3 ref="jig4_3" v-show="showjigsawindex4_3" @clickjig="clickjig4_3"/>
<jigsawindex4 ref="jig4_4" v-show="showjigsawindex4_4" @clickjig="clickjig4_4"/>
</div>
</div>
</template> <script>
import jigsawindex2 from './../jigsaw/jigsawindex2.vue';
import jigsawindex3 from '../jigsaw/jigsawindex3.vue';
import jigsawindex4 from '../jigsaw/jigsawindex4.vue';
import previewDicom from 'Components/previewDicom';
export default {
components:{
jigsawindex2,
jigsawindex3,
jigsawindex4,
previewDicom
},
data() {
return {
ip: this.CONSTANT.CONSTANT.WEB_URL,
showjigsawindex1_2: false,
showjigsawindex1_3: false,
showjigsawindex1_4: false,
showjigsawindex2_2: false,
showjigsawindex2_3: false,
showjigsawindex2_4: false,
showjigsawindex3_2: false,
showjigsawindex3_3: false,
showjigsawindex3_4: false,
showjigsawindex4_2: false,
showjigsawindex4_3: false,
showjigsawindex4_4: false,
xname: '',
p1show: true,
p2show: true,
p3show: true,
p4show: true,
}
},
watch:{
xname: function(){
eval('this.'+ this.xname+'()');
}
},
created: function () { },
mounted: function () { },
methods: {
showSon(index){
console.log(index)
this.$emit('windowIndex', index)
},
changejigsawindex1_1(){
this.showjigsawindex1_3 = false;
this.showjigsawindex1_4 = false;
this.showjigsawindex1_2 = false;
},
changejigsawindex1_2(){
this.showjigsawindex1_3 = false;
this.showjigsawindex1_4 = false;
this.showjigsawindex1_2 = true;
},
changejigsawindex1_3(){
this.showjigsawindex1_4 = false;
this.showjigsawindex1_2 = false;
this.showjigsawindex1_3 = true; },
changejigsawindex1_4(){
this.showjigsawindex1_3 = false;
this.showjigsawindex1_2 = false;
this.showjigsawindex1_4 = true;
},
changejigsawindex2_1(){
this.showjigsawindex2_3 = false;
this.showjigsawindex2_4 = false;
this.showjigsawindex2_2 = false;
},
changejigsawindex2_2(){
this.showjigsawindex2_4 = false;
this.showjigsawindex2_3 = false;
this.showjigsawindex2_2 = true;
},
changejigsawindex2_3(){
this.showjigsawindex2_2 = false;
this.showjigsawindex2_2 = false;
this.showjigsawindex2_3 = true;
},
changejigsawindex2_4(){
this.showjigsawindex2_2 = false;
this.showjigsawindex2_3 = false;
this.showjigsawindex2_4 = true;
},
changejigsawindex3_1(){
this.showjigsawindex3_3 = false;
this.showjigsawindex3_4 = false;
this.showjigsawindex3_2 = false;
},
changejigsawindex3_2(){
this.showjigsawindex3_4 = false;
this.showjigsawindex3_3 = false;
this.showjigsawindex3_2 = true;
},
changejigsawindex3_3(){
this.showjigsawindex3_2 = false;
this.showjigsawindex3_2 = false;
this.showjigsawindex3_3 = true;
},
changejigsawindex3_4(){
this.showjigsawindex3_2 = false;
this.showjigsawindex3_3 = false;
this.showjigsawindex3_4 = true;
},
changejigsawindex4_1(){
this.showjigsawindex4_3 = false;
this.showjigsawindex4_4 = false;
this.showjigsawindex4_2 = false;
},
changejigsawindex4_2(){
this.showjigsawindex4_4 = false;
this.showjigsawindex4_3 = false;
this.showjigsawindex4_2 = true;
},
changejigsawindex4_3(){
this.showjigsawindex4_2 = false;
this.showjigsawindex4_4 = false;
this.showjigsawindex4_3 = true;
},
changejigsawindex4_4(){
this.showjigsawindex4_2 = false;
this.showjigsawindex4_3 = false;
this.showjigsawindex4_4 = true;
},
clickjig1_2(val){
console.log('[*] 内部点击', val);
// this.$refs.jig2_2.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig1_2.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig1_3(val){
console.log('[*] 1-3内部点击', val);
// this.$refs.jig2_3.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig1_3.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig1_4(val){
console.log('[*] 1-3内部点击', val);
// this.$refs.jig2_4.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig1_4.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig2_2(val){
console.log('[*] 内部点击', val);
// this.$refs.jig1_2.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig2_2.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig2_3(val){
console.log('[*] 内部点击', val);
// this.$refs.jig1_3.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig2_3.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig2_4(val){
console.log('[*] 1-3内部点击', val);
// this.$refs.jig1_4.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig2_4.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clearAll(){
this.$refs.jig1_2.xclass = 'jigclass0';
this.$refs.jig1_3.xclass = 'jigclass0';
this.$refs.jig1_4.xclass = 'jigclass0';
this.$refs.jig2_2.xclass = 'jigclass0';
this.$refs.jig2_3.xclass = 'jigclass0';
this.$refs.jig2_4.xclass = 'jigclass0';
this.$refs.jig3_2.xclass = 'jigclass0';
this.$refs.jig3_3.xclass = 'jigclass0';
this.$refs.jig3_4.xclass = 'jigclass0';
this.$refs.jig4_2.xclass = 'jigclass0';
this.$refs.jig4_3.xclass = 'jigclass0';
this.$refs.jig4_4.xclass = 'jigclass0';
},
clickjig3_2(val){
console.log('[*] 内部点击', val);
// this.$refs.jig1_2.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig3_2.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig3_3(val){
console.log('[*] 内部点击', val);
// this.$refs.jig1_3.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig3_3.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig3_4(val){
console.log('[*] 1-3内部点击', val); // this.$refs.jig1_4.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig3_4.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig4_2(val){
console.log('[*] 内部点击', val);
// this.$refs.jig1_2.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig4_2.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig4_3(val){
console.log('[*] 内部点击', val);
// this.$refs.jig1_3.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig4_3.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
clickjig4_4(val){
console.log('[*] 1-3内部点击', val);
// this.$refs.jig1_4.xclass = 'jigclass0';
this.clearAll();
this.$refs.jig4_4.xclass = 'jigclass'+val;
this.$emit('jigclick', val);
},
}
}
</script> <style scoped lang="stylus">
#windowindex41{
height:298px;
border-bottom:2px solid white;
}
#windowindex4son1{
width:calc(50% - 2px);
width:-moz-calc(50% - 2px);
width:-webkit-calc(50% - 2px);
width:-o-calc(50% - 2px);
width:-ms-calc(50% - 2px);
height:298px;
border-right:2px solid white;
display:inline-block;
}
#windowindex4son2{
width:49%;
height:298px;
display:inline-block;
}
#windowindex4son3{
width:calc(50% - 2px);
width:-moz-calc(50% - 2px);
width:-webkit-calc(50% - 2px);
width:-o-calc(50% - 2px);
width:-ms-calc(50% - 2px);
height:300px;
border-right:2px solid white;
display:inline-block;
}
#windowindex4son4{
width:49%;
height:300px;
display:inline-block;
}
</style>

拼图组件jigsawindex2.vue

<template>
<div style="height:100%;">
<div id="windowindex2son1" @click="clickjig(1)" :class="active1">
<preview-dicom ref="p1" ></preview-dicom>
</div>
<div id="windowindex2son2" @click="clickjig(2)" :class="active2">
<preview-dicom ref="p2" ></preview-dicom>
</div>
</div>
</template> <script>
import previewDicom from 'Components/previewDicom';
export default {
components:{
previewDicom
},
data() {
return {
ip: this.CONSTANT.CONSTANT.WEB_URL,
windowindex2son1:[],
active1:[],
active2:[],
xclass: ''
}
},
watch: {
xclass: function(){
eval('this.'+ this.xclass+'()');
},
}, created: function () { },
mounted: function () { },
methods: {
clickjig(index){
console.log(index);
this.$emit('clickjig', index);
},
jigclass0(){
this.active2=[];
this.active1=[];
},
jigclass1(){
this.active2=[];
this.active1.push('active');
},
jigclass2(){
this.active1=[];
this.active2.push('active');
}
}
}
</script> <style scoped lang="stylus">
#windowindex2son1{
width:100%;
height:calc(50% - 2px);
height:-moz-calc(50% - 2px);
height:-webkit-calc(50% - 2px);
height:-o-calc(50% - 2px);
height:-ms-calc(50% - 2px);
border-bottom:2px solid white;
}
#windowindex2son2{
width:100%;
width:100%;
height:calc(50%);
height:-moz-calc(50% );
height:-webkit-calc(50%);
height:-o-calc(50%);
height:-ms-calc(50%);
}
.active{
background-color:#C0C0C0;
}
</style>

拼图组件jigsawindex3.vue

<template>
<div style="height:100%;">
<div id="windowindex3son1" @click="clickjig(1)" :class="active1">
<preview-dicom ref="p1" ></preview-dicom>
</div>
<div id="windowindex3son2" @click="clickjig(2)" :class="active2">
<preview-dicom ref="p2" ></preview-dicom>
</div>
</div>
</template> <script>
import previewDicom from 'Components/previewDicom';
export default {
components:{
previewDicom
},
data() {
return {
ip: this.CONSTANT.CONSTANT.WEB_URL,
active1:[],
active2:[],
xclass: ''
}
},
watch: {
xclass: function(){
eval('this.'+ this.xclass+'()');
},
},
created: function () { },
mounted: function () { },
methods: {
clickjig(index){
console.log(index);
this.$emit('clickjig', index);
},
jigclass0(){
this.active2=[];
this.active1=[];
},
jigclass1(){
this.active2=[];
this.active1.push('active');
},
jigclass2(){
this.active1=[];
this.active2.push('active');
}
}
}
</script> <style scoped lang="stylus">
#windowindex3son1{
width:50%;
height:100%;
border-right:2px solid white;
display:inline-block;
}
#windowindex3son2{
width:48%;
height:100%;
display:inline-block;
}
.active{
background-color:#C0C0C0;
}
</style>

拼图组件jigsawindex4.vue

<template>
<div style="height:100%;width:100%;">
<div id="windowindex41">
<div id="windowindex4son1" @click="clickjig(1)" :class="active1">
<preview-dicom ref="p1" ></preview-dicom>
</div>
<div id="windowindex4son2" @click="clickjig(2)" :class="active2">
<preview-dicom ref="p2" ></preview-dicom>
</div>
</div>
<div id="windowindex4son3" @click="clickjig(3)" :class="active3">
<preview-dicom ref="p3" ></preview-dicom>
</div>
<div id="windowindex4son4" @click="clickjig(4)" :class="active4">
<preview-dicom ref="p4" ></preview-dicom>
</div>
</div>
</template> <script>
import previewDicom from 'Components/previewDicom';
export default {
components:{
previewDicom
},
data() {
return {
ip: this.CONSTANT.CONSTANT.WEB_URL,
active1:[],
active2:[],
active3:[],
active4:[],
xclass: ''
}
},
watch: {
xclass: function(){
eval('this.'+ this.xclass+'()');
},
},
created: function () { },
mounted: function () { },
methods: {
clickjig(index){
console.log(index);
this.$emit('clickjig', index);
},
jigclass0(){
this.active2=[];
this.active1=[];
this.active3=[];
this.active4=[];
},
jigclass1(){
// this.active2=[];
this.jigclass0()
this.active1.push('active');
},
jigclass2(){
// this.active1=[];
this.jigclass0()
this.active2.push('active');
},
jigclass3(){
// this.active1=[];
this.jigclass0()
this.active3.push('active');
},
jigclass4(){
// this.active1=[];
this.jigclass0()
this.active4.push('active');
}
}
}
</script> <style scoped lang="stylus">
#windowindex41{
width:100%;
height:calc(50% - 2px);
height:-moz-calc(50% - 2px);
height:-webkit-calc(50% - 2px);
height:-o-calc(50% - 2px);
height:-ms-calc(50% - 2px);
border-bottom:2px solid white;
}
#windowindex4son1{
width:calc(50% - 2px);
width:-moz-calc(50% - 2px);
width:-webkit-calc(50% - 2px);
width:-o-calc(50% - 2px);
width:-ms-calc(50% - 2px);
height:100%;
border-right:2px solid white;
float:left;
}
#windowindex4son2{
width:48%;
height:100%;
display:inline-block;
float:left;
}
#windowindex4son3{
width:calc(50% - 2px);
width:-moz-calc(50% - 2px);
width:-webkit-calc(50% - 2px);
width:-o-calc(50% - 2px);
width:-ms-calc(50% - 2px);
height:50%;
border-right:2px solid white;
display:inline-block;
float:left;
}
#windowindex4son4{
width:48%;
height:50%;
display:inline-block;
float:left;
}
.active{
background-color:#C0C0C0;
}
</style>

上述就是基本代码,还是比较简单。

部分完成截图:16个格子

vue+窗格切换+田字+dicom显示_03的更多相关文章

  1. vue+窗格切换+田字+dicom显示_01

    环境:vue+webpack+cornerstone ide:vs code 需求:窗格设置+拼图设置 1.点击左边第一个窗格或者默认显示. 2.点击第二个也同理显示,以此类推 3.选择左边的窗格之后 ...

  2. vue+窗格切换+田字+dicom显示_02

    环境:vue+webpack+cornerstone ide:vs code 需求:窗格设置+拼图设置 分析: 由于时间的原因,我也没有Baidu更好的显示窗格的方法,所以使用比较笨的方法,通过组件显 ...

  3. LNMP下wordpress无法切换主题,只显示当前主题解决方法

    最近在lnmp下发现wordpress后台无法切换主题,只能显示当前主题,开始还以为是文件没传完,又重置了一遍,还是一样.百度得知,原来军哥的LNMP安装包默认关闭了scandir函数,为了安全考虑. ...

  4. 解决微信小程序的wx-charts插件tab切换时的显示会出现位置移动问题-tab切换时,图表显示错乱-实现滑动tab

    解决Echarts在微信小程序tab切换时的显示会出现位置移动问题 tab切换时,图表显示错乱 <canvas class="kcanvas" canvas-id=" ...

  5. 【vue】chrome已安装Vue Devtools在控制台却无显示

    chrome已安装Vue Devtools在控制台却无显示的解决: 在点亮Vue Devtools图标后,控制台没有vue解读显示. 原因:脚手架配置NODE_ENV直接定义为了production版 ...

  6. vue slot插槽v-show不控制显示隐藏

    vue中想控制插槽的显示隐藏,用v-show是不起任何作用的,改用v-if 可以生效.

  7. Vue 路由切换时页面内容刷新页面并更新数据

    第二次进入页面,页面路由参数已经改变,但是页面内容不会刷新 <keep-alive>是Vue的内置组件,能在组件切换过程中将状态保留在内存中,防止重复渲染DOM <keep-aliv ...

  8. 使用jQuery 中的显示与隐藏动画效果实现折叠下拉菜单的收缩和展开,在页面的列表中有若干项,列表的每项中有一个二级列表,二级列表默认为隐藏状态。点击列表的项,切换二级列表的显示或隐藏状态

    查看本章节 查看作业目录 需求说明: 使用jQuery 中的显示与隐藏动画效果实现折叠下拉菜单的收缩和展开,在页面的列表中有若干项,列表的每项中有一个二级列表,二级列表默认为隐藏状态.点击列表的项,切 ...

  9. 解决Vue 使用vue-router切换页面时 页面显示没有在顶部的问题

    有时候我们需要页面滚动条滚动到某一固定的位置,一般使用Window scrollTo() 方法. 语法就是:scrollTo(xpos,ypos) xpos:必需.要在窗口文档显示区左上角显示的文档的 ...

随机推荐

  1. 2162112375 Week04-面向对象设计与继承

    1. 本周学习总结 1.1 写出你认为本周学习中比较重要的知识点关键词 对象.类.封装性.静态属性.静态方法.重载.继承.多态 1.2 尝试使用思维导图将这些关键词组织起来.注:思维导图一般不需要出现 ...

  2. 负载均衡----实现配置篇(Nginx)

    同类文章:负载均衡----概念认识篇 吐槽:自从那篇“探讨负载均衡”那篇文章被博客园吐槽后,心里极度不平衡,思来想去还是把名字改成“负载均衡----概念认识篇”,再加多几篇文章来诠释上篇文章的精华所在 ...

  3. mysql-8.0.12-winx64 解压版安装(转)

    1.官网下载 https://dev.mysql.com/downloads/mysql/ 2.解压到一个合适的目录 3.配置环境变量 path : bin的目录(必须配置) MYSQL_HOME:m ...

  4. oracle 链接

    <properties> <!--配置Hibernate方言 --> <property name="hibernate.dialect" value ...

  5. L332 NBA: Dwyane Wade and Dirk Nowitzki Say Emotional Goodbyes

    Two games in the NBA ended amid emotional scenes on Tuesday as legends at separate teams marked thei ...

  6. Fibonacci Heaps

    Mergeable heapsA mergeable heap is any data structure that supports the following five operations,in ...

  7. laravel 解决保存Emoji 表情问题

    ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; ALTER TABLE table ...

  8. 【EMV L2】SDA静态数据认证处理流程

    [静态数据认证] 静态数据认证处理过程中,卡片没有执行任何处理,终端执行的处理流程:1.认证中心公钥的获取终端使用卡片上的认证中心公钥索引(PKI)[TAG:8F,Certification Auth ...

  9. day05 集合

    今日进度(数据类型) 集合 内存相关 深浅拷贝 1.集合表示 1.无序 2.不重复 3.hash查找 #问题:v={}表示? set: v1=set()#空集合 v1={1,2,3,4,5} dict ...

  10. fixed 相对于父容器定位

    当一个元素设置为 fixed 或 absolute,不设置 top, left 则会在原位置,而脱离文档流,别的元素可以存在于它之后. 而当使用 fixed 后还想相对于父容器进行定位,或者说在当前位 ...