1 line
7.0 KiB
JSON
1 line
7.0 KiB
JSON
{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nimport { reserveConferenceList } from '@/api/home.js';\nimport TRTC from 'trtc-sdk-v5';\nlet trtc = null;\nexport default {\n name: 'App',\n data() {\n return {\n formLabelAlign: {},\n enterRoomFrom: {},\n trtc: null,\n userId: null,\n userCode: null,\n caseId: null,\n roleFlag: false\n };\n },\n methods: {\n async enterRoom() {\n if (this.roomId != this.enterRoomFrom.roomId) {\n this.$message({\n message: \"房间号不是对应案件的房间号\",\n type: 'error'\n });\n return;\n }\n this.$router.push({\n name: 'Room',\n query: {\n userId: this.userId,\n roomId: this.enterRoomFrom.roomId,\n flag: this.roleFlag,\n caseId: this.caseId,\n id: this.userCode\n }\n });\n },\n submitRoom() {\n this.$refs[\"formLabelAlign\"].validate(valid => {});\n },\n // 根据案件id查询主持人信息\n async reserveConferenceListFn(data) {\n await reserveConferenceList(data).then(res => {\n if (this.userCode == res.data[0].userId) {\n this.roleFlag = true;\n } else {\n this.roleFlag = false;\n }\n });\n }\n },\n async mounted() {\n let routeParams = this.$route.query;\n this.userId = routeParams.name;\n this.roomId = routeParams.roomId;\n this.userCode = routeParams.userId;\n this.caseId = routeParams.id;\n if (this.caseId) {\n await this.reserveConferenceListFn(this.caseId);\n }\n await this.enterRoom();\n trtc = TRTC.create();\n const config = {\n view: document.getElementById('video'),\n publish: false\n };\n await trtc.startLocalVideo(config);\n }\n};","map":{"version":3,"names":["reserveConferenceList","TRTC","trtc","name","data","formLabelAlign","enterRoomFrom","userId","userCode","caseId","roleFlag","methods","enterRoom","roomId","$message","message","type","$router","push","query","flag","id","submitRoom","$refs","validate","valid","reserveConferenceListFn","then","res","mounted","routeParams","$route","create","config","view","document","getElementById","publish","startLocalVideo"],"sources":["src/components/homepc.vue"],"sourcesContent":["<template>\n <div class=\"homepage\">\n <div id=\"video\">\n\n </div>\n <div class=\"enterRoom\">\n <div class=\"title\">\n 仲裁会议室\n </div>\n <div class=\"enterForm\">\n <el-form :model=\"enterRoomFrom\" ref=\"enterRoomFrom\">\n <el-form-item>\n <el-input placeholder=\"请输入房间号\" v-model=\"enterRoomFrom.roomId\">\n <template slot=\"append\"><el-button type=\"primary\" @click=\"enterRoom\"\n icon=\"el-icon-right\">进入</el-button></template></el-input>\n </el-form-item>\n </el-form>\n </div>\n </div>\n </div>\n</template>\n \n<script>\nimport {reserveConferenceList} from '@/api/home.js'\nimport TRTC from 'trtc-sdk-v5';\nlet trtc = null;\nexport default {\n name: 'App',\n data() {\n return {\n formLabelAlign: {},\n enterRoomFrom: {},\n trtc: null,\n userId: null,\n userCode:null,\n caseId:null,\n roleFlag:false\n };\n },\n methods: {\n async enterRoom() {\n if (this.roomId != this.enterRoomFrom.roomId) {\n this.$message({\n message: \"房间号不是对应案件的房间号\",\n type: 'error'\n });\n return\n }\n this.$router.push({\n name: 'Room',\n query: {\n userId: this.userId,\n roomId: this.enterRoomFrom.roomId,\n flag:this.roleFlag,\n c
|