Selaa lähdekoodia

移动端页面

hanchaobo 2 vuotta sitten
vanhempi
commit
8a75a4358b
2 muutettua tiedostoa jossa 105 lisäystä ja 131 poistoa
  1. 45
    9
      src/views/components/footerPhone.vue
  2. 60
    122
      src/views/room.vue

+ 45
- 9
src/views/components/footerPhone.vue Näytä tiedosto

1
 <template>
1
 <template>
2
     <div class="roomFooter">
2
     <div class="roomFooter">
3
-            <el-button type="danger" @click="exitRoom" v-if="!roleFlag">退出房间</el-button>
4
-            <el-button type="danger" @click="exitRoom" v-if="roleFlag">解散房间</el-button>
3
+        <!-- <el-button type="danger" @click="exitRoom" v-if="!roleFlag">退出房间</el-button>
4
+            <el-button type="danger" @click="exitRoom" v-if="roleFlag">解散房间</el-button> -->
5
+        <div class="mic">
6
+            <img class="micImg" src="@/assets/mic_on.png" alt="" v-if="micFlag" @click="micClickOn" />
7
+            <img class="micImg" src="@/assets/mic_off.png" alt="" v-else @click="micClickOff" />
8
+        </div>
9
+        <div class="video">
10
+            <img class="videoImg" src="@/assets/video_on.png" alt="" v-if="videoFlag" @click="videoClickOn" />
11
+            <img class="videoImg" src="@/assets/video_off.png" alt="" v-else @click="videoClickOff" />
12
+        </div>
13
+        <div class="sharing">
14
+            <img class="sharImg" src="@/assets/screenShare_on.png" alt="" v-if="sharFlag" @click="sharClickOn" />
15
+            <img class="sharImg" src="@/assets/screenShare_off.png" alt="" v-else @click="sharClickOff" />
16
+
17
+        </div>
18
+        <div class="mediationPop">
19
+            <el-button type="warning" @click="mediationPop">调解</el-button>
20
+        </div>
21
+        <div class="outRoom">
22
+            <el-button type="danger" @click="exitRoom" v-if="!roleFlag">退出</el-button>
23
+            <el-button type="danger" @click="exitRoom" v-if="roleFlag">解散</el-button>
24
+        </div>
5
     </div>
25
     </div>
6
 </template>
26
 </template>
7
-  
27
+
8
 <script>
28
 <script>
9
 import { startVideo, stopVideo, destructionRoom } from '@/api/room.js'
29
 import { startVideo, stopVideo, destructionRoom } from '@/api/room.js'
10
 export default {
30
 export default {
60
     },
80
     },
61
 };
81
 };
62
 </script>
82
 </script>
63
-  
83
+
64
 <style scoped>
84
 <style scoped>
65
 .roomFooter {
85
 .roomFooter {
66
     width: 100%;
86
     width: 100%;
67
     height: 100%;
87
     height: 100%;
68
     display: flex;
88
     display: flex;
89
+    justify-content: space-between;
90
+    align-items: center;
91
+}
92
+
93
+.mic,
94
+.video,
95
+.sharing
96
+ {
97
+    cursor: pointer;
98
+    width: 10%;
99
+    height: 100%;
100
+    display: flex;
69
     align-items: center;
101
     align-items: center;
70
-    flex-direction: row-reverse;
102
+    justify-content: center;
103
+}
104
+
105
+.micImg,
106
+.videoImg,
107
+.sharImg {
108
+    width: 40px;
109
+    height: 40px;
71
 }
110
 }
72
-</style>
73
-  
74
-  
75
-  
111
+</style>

+ 60
- 122
src/views/room.vue Näytä tiedosto

1
 <template>
1
 <template>
2
   <div class="page">
2
   <div class="page">
3
+    <div class="iconImg">
4
+      <i class="el-icon-d-arrow-left"></i>
5
+      <!-- <i class="el-icon-d-arrow-right"></i> -->
6
+    </div>
3
     <div class="roompage" @mouseover="mouseHover" v-if="modileFlag">
7
     <div class="roompage" @mouseover="mouseHover" v-if="modileFlag">
4
       <div class="txtContent">
8
       <div class="txtContent">
5
         <el-tag type="danger" @click="txtContent" v-if="modileFlag">会议内容</el-tag>
9
         <el-tag type="danger" @click="txtContent" v-if="modileFlag">会议内容</el-tag>
24
       </div>
28
       </div>
25
     </div>
29
     </div>
26
     <div class="roomPhone" v-if="!modileFlag">
30
     <div class="roomPhone" v-if="!modileFlag">
27
-      <div class="header">
31
+      <div class="bodyPhone">
32
+        <div :class="userClassPhone" id="localStream">
33
+          <div class="userNamePhone">{{ userId }}</div>
34
+        </div>
35
+        <div :class="userClassPhone" v-for="(item, index) in userList" :key="index" :id="item">
36
+          <div class="userNamePhone">{{ item }}</div>
37
+        </div>
38
+      </div>
39
+      <div class="footerPhone">
40
+        <roomFooterPhone @exitRoom="exitRoom"></roomFooterPhone>
41
+      </div>
42
+      <!-- <div class="header">
28
         <roomFooterPhone @exitRoom="exitRoom"></roomFooterPhone>
43
         <roomFooterPhone @exitRoom="exitRoom"></roomFooterPhone>
29
       </div>
44
       </div>
30
       <div class="bodyVideo">
45
       <div class="bodyVideo">
34
         <div :class="userClassPhone" v-for="(item, index) in userList" :key="index" :id="item">
49
         <div :class="userClassPhone" v-for="(item, index) in userList" :key="index" :id="item">
35
           <div class="userNamePhone">{{ item }}</div>
50
           <div class="userNamePhone">{{ item }}</div>
36
         </div>
51
         </div>
37
-      </div>
52
+      </div> -->
38
     </div>
53
     </div>
39
     <!-- 语音转文字弹窗 -->
54
     <!-- 语音转文字弹窗 -->
40
     <el-drawer title="会议内容" :visible.sync="textVisible" :modal="false">
55
     <el-drawer title="会议内容" :visible.sync="textVisible" :modal="false">
41
-      <!-- <div style="margin-left: 20px; margin-bottom: 10px">
42
-        <div
43
-          style="
44
-            width: 100%;
45
-            display: flex;
46
-            justify-content: space-around;
47
-            margin-bottom: 10px;
48
-          "
49
-        >
50
-          <el-upload
51
-            ref="upload"
52
-            :limit="1"
53
-            :action="UploadUrl()"
54
-            :headers="headers"
55
-            :data="filedata"
56
-            :on-change="beforeUpload"
57
-            :on-success="handlSuccess"
58
-            :file-list="fileList"
59
-            v-if="appFlag"
60
-          >
61
-            <el-button slot="trigger" size="small" type="primary"
62
-              >申请人上传证据</el-button
63
-            >
64
-          </el-upload>
65
-          <el-upload
66
-            v-if="resFlag"
67
-            ref="upload1"
68
-            :limit="1"
69
-            :action="UploadUrl()"
70
-            :headers="headers1"
71
-            :data="filedata1"
72
-            :on-change="beforeUpload1"
73
-            :on-success="handlSuccess1"
74
-            :file-list="fileList1"
75
-          >
76
-            <el-button slot="trigger" size="small" type="primary"
77
-              >被申请人上传证据</el-button
78
-            >
79
-          </el-upload>
80
-          <el-upload
81
-            v-if="updataFlag"
82
-            ref="upload3"
83
-            :limit="1"
84
-            :action="UploadUrl()"
85
-            :headers="headers3"
86
-            :data="filedata3"
87
-            :on-change="beforeUpload3"
88
-            :on-success="handlSuccess3"
89
-            :file-list="fileList3"
90
-            accept=".doc,.docx"
91
-          >
92
-            <el-button slot="trigger" size="small" type="primary"
93
-              >上传调解书</el-button
94
-            >
95
-          </el-upload>
96
-        </div>
97
-        <div class="list">
98
-          <div class="applicant" v-if="applicantFile.length > 0">
99
-            <div>申请人证据</div>
100
-            <div
101
-              style="color: #104fad; cursor: pointer"
102
-              v-for="(item, index) in applicantFile"
103
-              :key="index"
104
-              @click="preview(item, 0)"
105
-            >
106
-              {{ item.annexName }}
107
-            </div>
108
-          </div>
109
-          <div class="res" v-if="resFile.length > 0">
110
-            <div>被申请人证据</div>
111
-            <div
112
-              style="color: #104fad; cursor: pointer"
113
-              v-for="(item, index) in resFile"
114
-              :key="index"
115
-              @click="preview(item, 0)"
116
-            >
117
-              {{ item.annexName }}
118
-            </div>
119
-          </div>
120
-          <div class="mediate" v-if="mediateFile.length > 0">
121
-            <div>调解书</div>
122
-            <div
123
-              style="color: #104fad; cursor: pointer"
124
-              v-for="(item, index) in mediateFile"
125
-              :key="index"
126
-              @click="preview(item, 1)"
127
-            >
128
-              {{ item.annexName }}
129
-            </div>
130
-          </div>
131
-        </div>
132
-      </div> -->
133
       <quill-editor ref="myQuillEditor" v-model="contentValue" :options="editorOption" @blur="onEditorBlur($event)"
56
       <quill-editor ref="myQuillEditor" v-model="contentValue" :options="editorOption" @blur="onEditorBlur($event)"
134
         @focus="onEditorFocus($event)" @ready="onEditorReady($event)"></quill-editor>
57
         @focus="onEditorFocus($event)" @ready="onEditorReady($event)"></quill-editor>
135
       <el-button class="updataBtn" @click="updataClick" type="primary" :disabled="!updataFlag">确认修改内容</el-button>
58
       <el-button class="updataBtn" @click="updataClick" type="primary" :disabled="!updataFlag">确认修改内容</el-button>
244
       resFlag: null,
167
       resFlag: null,
245
       appFlag: null,
168
       appFlag: null,
246
       userClassPhone: "userVideoPhone",
169
       userClassPhone: "userVideoPhone",
247
-      userList: [],
170
+      userList: [1,2,3,4,5],
248
       userHeight: "100%",
171
       userHeight: "100%",
249
       userPhoneHeight: "92%",
172
       userPhoneHeight: "92%",
250
       userSign: "",
173
       userSign: "",
299
       filedata3: {
222
       filedata3: {
300
         annexType: 7,
223
         annexType: 7,
301
         officeFlag: 0,
224
         officeFlag: 0,
302
-        isMediaBook:1,
225
+        isMediaBook: 1,
303
         caseId: null,
226
         caseId: null,
304
       },
227
       },
305
       fileList3: [],
228
       fileList3: [],
311
   },
234
   },
312
   methods: {
235
   methods: {
313
     UploadUrl() {
236
     UploadUrl() {
314
-      return window.location.origin + "/tiaojie/video/upload";
237
+      return window.location.origin + "/tjformal/video/upload";
315
     },
238
     },
316
     /**点击开启麦克风图标,关闭麦克风 */
239
     /**点击开启麦克风图标,关闭麦克风 */
317
     micClickOn() {
240
     micClickOn() {
621
         const streamType = event.streamType;
544
         const streamType = event.streamType;
622
         const userId = event.userId;
545
         const userId = event.userId;
623
         if (streamType == "main") {
546
         if (streamType == "main") {
624
-          // if (this.hostId == userId) {
625
-          //   alert("主持人已经解散会议");
626
-          //   this.$router.push({
627
-          //     name: "Home",
628
-          //   });
629
-          //   this.userList = [];
630
-          //   return;
631
-          // }
632
           let deleteIndex = this.userList.indexOf(userId);
547
           let deleteIndex = this.userList.indexOf(userId);
633
           this.userList = this.userList.filter((item) => item !== userId);
548
           this.userList = this.userList.filter((item) => item !== userId);
634
           if (deleteIndex !== -1) {
549
           if (deleteIndex !== -1) {
635
             this.userList.splice(deleteIndex, 1);
550
             this.userList.splice(deleteIndex, 1);
636
           }
551
           }
637
-          // if (this.modileFlag) {
638
-          //   // this.userHeight = getHeight(this.userList);
639
-          // } else {
640
-          //   this.userClassPhone = getWidthPhone(this.userList);
641
-          // }
642
           Object.keys(this.asrList).forEach((key) => {
552
           Object.keys(this.asrList).forEach((key) => {
643
             this.asrList[userId].stop();
553
             this.asrList[userId].stop();
644
           });
554
           });
733
   async mounted() {
643
   async mounted() {
734
     if (this.userList.length == 1) {
644
     if (this.userList.length == 1) {
735
       this.videoClass = "videoItem3";
645
       this.videoClass = "videoItem3";
646
+      this.userClassPhone = "userVideoPhone1";
736
     } else if (this.userList.length > 1) {
647
     } else if (this.userList.length > 1) {
737
       this.videoClass = "videoItem1";
648
       this.videoClass = "videoItem1";
649
+      this.userClassPhone = "userVideoPhone2";
738
     } else if (this.userList.length < 1) {
650
     } else if (this.userList.length < 1) {
739
       this.videoClass = "videoItem";
651
       this.videoClass = "videoItem";
652
+      this.userClassPhone = "userVideoPhone";
740
     }
653
     }
741
     // 判断设备类型
654
     // 判断设备类型
742
     this.modileFlag = getModile();
655
     this.modileFlag = getModile();
827
 </script>
740
 </script>
828
 
741
 
829
 <style scoped>
742
 <style scoped>
743
+.iconImg{
744
+  position: fixed;
745
+  top: 50%;
746
+  height: 40px;
747
+  width: 40px;
748
+  /* right: 10px; */
749
+}
830
 .roompage {
750
 .roompage {
831
   width: 100%;
751
   width: 100%;
832
   height: 100vh;
752
   height: 100vh;
952
   color: #ffffff;
872
   color: #ffffff;
953
 }
873
 }
954
 
874
 
955
-.header {
875
+/* .header {
956
   width: 100%;
876
   width: 100%;
957
   height: 8%;
877
   height: 8%;
958
   background-color: #716c6c;
878
   background-color: #716c6c;
959
   display: flex;
879
   display: flex;
960
   flex-direction: row-reverse;
880
   flex-direction: row-reverse;
961
   align-items: center;
881
   align-items: center;
962
-}
963
-
882
+} */
883
+/* 移动端样式 */
964
 .roomPhone {
884
 .roomPhone {
965
   width: 100%;
885
   width: 100%;
966
   height: 100vh;
886
   height: 100vh;
887
+  background-color: yellow;
888
+}
889
+.footerPhone{
890
+  width: 100%;
891
+  height: 8%;
892
+  background-color: greenyellow;
967
 }
893
 }
894
+.bodyPhone{
895
+  width: 100%;
896
+  height: 92%;
897
+  display: flex;
898
+  justify-content: space-around;
899
+  flex-wrap: wrap;
900
+  align-items: center;
901
+  overflow-y: scroll;
902
+  background-color: rebeccapurple;
903
+}
904
+/* 移动端样式 */
968
 
905
 
969
 .bodyVideo {
906
 .bodyVideo {
970
   width: 100%;
907
   width: 100%;
980
   background-color: yellow;
917
   background-color: yellow;
981
   position: relative;
918
   position: relative;
982
 }
919
 }
983
-
984
-.userVideoPhone1 {
985
-  width: 50%;
986
-  flex-basis: calc(33.333% - 3px);
987
-  max-width: calc(33.333% - 3px);
988
-  height: 200px;
989
-  /* height: 0; */
990
-  /* padding-bottom: calc(33.333% - 3px); */
991
-  margin-bottom: 3px;
920
+.userVideoPhone1{
921
+  width: 100%;
922
+  height: 49%;
923
+  background-color: rgb(43, 0, 255);
924
+  position: relative;
925
+}
926
+.userVideoPhone2{
927
+  width: 150px;
928
+  height: 150px;
929
+  background-color: rgb(43, 0, 255);
992
   position: relative;
930
   position: relative;
993
 }
931
 }
994
 
932