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.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 await this.enterRoom();\n }\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","$router","push","query","roomId","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.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 })\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 await this.enterRoom()\n }\n trtc = TRTC.create()\n const config = {\n view: document.getElementById('video'),\n publish: false\n }\n await trtc.startLocalVideo(config);\n },\n};\n</script>\n \n<style scoped>\n.homepage {\n width: 100%;\n height: 100vh;\n background-color: #302e2e;\n display: flex;\n align-items: center;\n justify-content: space-around;\n}\n\n#video {\n width: 40%;\n height: 50%;\n}\n\n.enterRoom {\n width: 20%;\n height: 50%;\n background-color: #1c1b1b;\n}\n\n.reservation {\n width: 20%;\n height: 50%;\n background-color: #1c1b1b;\n}\n\n.title {\n width: 100%;\n text-align: center;\n color: #3f1ab7;\n line-height: 30px;\n font-size: 18px;\n margin-bottom: 20px;\n}\n\n.enterForm {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n</style>\n \n \n "],"mappings":";AAuBA,SAAAA,qBAAA;AACA,OAAAC,IAAA;AACA,IAAAC,IAAA;AACA;EACAC,IAAA;EACAC,KAAA;IACA;MACAC,cAAA;MACAC,aAAA;MACAJ,IAAA;MACAK,MAAA;MACAC,QAAA;MACAC,MAAA;MACAC,QAAA;IACA;EACA;EACAC,OAAA;IACA,MAAAC,UAAA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA,KAAAC,OAAA,CAAAC,IAAA;QACAX,IAAA;QACAY,KAAA;UACAR,MAAA,OAAAA,MAAA;UACAS,MAAA,OAAAA,MAAA;UACAC,IAAA,OAAAP,QAAA;UACAD,MAAA,OAAAA,MAAA;UACAS,EAAA,OAAAV;QACA;MACA;IACA;IACAW,WAAA;MACA,KAAAC,KAAA,mBAAAC,QAAA,CAAAC,KAAA,KAEA;IACA;IACA;IACA,MAAAC,wBAAAnB,IAAA;MACA,MAAAJ,qBAAA,CAAAI,IAAA,EAAAoB,IAAA,CAAAC,GAAA;QACA,SAAAjB,QAAA,IAAAiB,GAAA,CAAArB,IAAA,IAAAG,MAAA;UACA,KAAAG,QAAA;QACA;UACA,KAAAA,QAAA;QACA;MACA;IACA;EACA;EACA,MAAAgB,QAAA;IACA,IAAAC,WAAA,QAAAC,MAAA,CAAAb,KAAA;IACA,KAAAR,MAAA,GAAAoB,WAAA,CAAAxB,IAAA;IACA,KAAAa,MAAA,GAAAW,WAAA,CAAAX,MAAA;IACA,KAAAR,QAAA,GAAAmB,WAAA,CAAApB,MAAA;IACA,KAAAE,MAAA,GAAAkB,WAAA,CAAAT,EAAA;IACA,SAAAT,MAAA;MACA,WAAAc,uBAAA,MAAAd,MAAA;MACA,WAAAG,SAAA;IACA;IACAV,IAAA,GAAAD,IAAA,CAAA4B,MAAA;IACA,MAAAC,MAAA;MACAC,IAAA,EAAAC,QAAA,CAAAC,cAAA;MACAC,OAAA;IACA;IACA,MAAAhC,IAAA,CAAAiC,eAAA,CAAAL,MAAA;EACA;AACA"},"metadata":{},"sourceType":"module","externalDependencies":[]} |