仲裁视频会议H5

7663966e923ea52c5c63b197b9f73ebb8f16d92d0ab8cdc4bc9bdbee64fdbb1b.json 12KB

1
  1. {"ast":null,"code":"import TRTC from 'trtc-sdk-v5';\nconst trtc = TRTC.create();\nexport default {\n name: 'App',\n data() {\n return {\n formLabelAlign: {},\n rules: {\n startTime: [{\n required: true,\n message: \"请选择开始时间\",\n trigger: \"blur\"\n }],\n endTime: [{\n required: true,\n message: \"请选择结束时间\",\n trigger: \"blur\"\n }]\n }\n };\n },\n methods: {\n async enterRoom() {\n // const userSig = \"eJyrVgrxCdYrSy1SslIy0jNQ0gHzM1NS80oy0zLBwhnJSVDh4pTsxIKCzBQlK0MzAwMDQ0NDM3OITGpFQWZRKlDc1NTUCCgFES3JzAWJmYPUWhibm0JNyUwHmhqWHVUcmmjk7GVSmOwbYpZcFRHp4e5sVGKZbeGd6FhalO3ka55UGuaTFaOfbatUCwDIijC-\";\n // const userId = \"hcb\";\n // const sdkAppId = 1600011167;\n // try {\n // await trtc.enterRoom({ roomId: 888888, scene: 'rtc', sdkAppId, userId, userSig });\n // await trtc.startLocalVideo({\n // view: document.getElementById('video'), // 在 DOM 中的 elementId 为 localVideo 的标签上预览视频。\n // });\n // console.log('进房成功');\n // } catch (error) {\n // console.error('进房失败 ' + error);\n // }\n },\n submitRoom() {\n this.$refs[\"formLabelAlign\"].validate(valid => {\n if (valid) {\n console.log(1);\n this.formLabelAlign.startTime = moment(this.formLabelAlign.startTime).format(\"YYYY-MM-DD HH:mm:ss\");\n this.formLabelAlign.endTime = moment(this.formLabelAlign.endTime).format(\"YYYY-MM-DD HH:mm:ss\");\n axios({\n method: \"post\",\n url: `https://api.xayunmei.com/zhongcaiapi/caseApplication/reservedConference`,\n data: {\n caseId: this.$route.query.id,\n ownerId: this.userId,\n ownerId: 'hcb',\n roomId: '123450',\n scheduleStartTime: this.formLabelAlign.startTime,\n scheduleEndTime: this.formLabelAlign.endTime\n }\n }).then(res => {\n if (res.data.code == 200) {\n this.$message({\n message: '预约成功',\n type: 'success'\n });\n // axios({\n // method: \"post\",\n // url: \"https://api.xayunmei.com/zhongcaiapi/caseApplication/sendRoomNoMessage\",\n // data: {\n // id: this.caseId,\n // roomNo: this.roomidForm2.roomId2,\n // scheduleStartTime: this.roomidForm2.timer[0],\n // scheduleEndTime: this.roomidForm2.timer[1]\n // }\n // }).then(res => {\n // console.log(res);\n // // this.data = res.data /* 将拿到的值,赋值给data */\n // })\n // axios({\n // method: \"get\",\n // url: `https://api.xayunmei.com/zhongcaiapi/caseApplication/reserveConferenceList?caseId=${this.$route.query.id}`,\n // }).then(res => {\n // // this.userName = res.data.data.userName;\n // console.log(res, \"tabletabletabletabletabletabletabletabletabletabletabletabletabletable\");\n // this.tableData = res.data.data;\n // })\n } else {\n this.$message({\n message: res.msg,\n type: 'error'\n });\n }\n });\n }\n });\n }\n },\n async mounted() {\n const config = {\n view: document.getElementById('video'),\n publish: false\n };\n await trtc.startLocalVideo(config);\n }\n};","map":{"version":3,"names":["TRTC","trtc","create","name","data","formLabelAlign","rules","startTime","required","message","trigger","endTime","methods","enterRoom","submitRoom","$refs","validate","valid","console","log","moment","format","axios","method","url","caseId","$route","query","id","ownerId","userId","roomId","scheduleStartTime","scheduleEndTime","then","res","code","$message","type","msg","mounted","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=\"reservation\">\n <div class=\"title\">\n 预约会议\n </div>\n <div class=\"enterForm\">\n <el-form :model=\"formLabelAlign\" :rules=\"rules\" ref=\"formLabelAlign\">\n <el-form-item prop=\"startTime\">\n <el-date-picker v-model=\"formLabelAlign.startTime\" type=\"datetime\" placeholder=\"选择开始时间\">\n </el-date-picker>\n </el-form-item>\n <el-form-item prop=\"endTime\">\n <el-date-picker v-model=\"formLabelAlign.endTime\" type=\"datetime\" placeholder=\"选择结束时间\">\n </el-date-picker>\n </el-form-item>\n <el-button type=\"primary\" style=\"width: 100%;\" @click=\"submitRoom\">确认预约</el-button>\n </el-form>\n </div>\n </div>\n <div class=\"enterRoom\">\n <div class=\"title\">\n 仲裁会议室\n </div>\n <div class=\"enterForm\">\n <el-form :model=\"formLabelAlign\">\n <el-form-item>\n <el-input placeholder=\"请输入房间号\" v-model=\"formLabelAlign.name\">\n <template slot=\"append\"><el-button type=\"primary\"\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 TRTC from 'trtc-sdk-v5';\nconst trtc = TRTC.create();\nexport default {\n name: 'App',\n data() {\n return {\n formLabelAlign: {},\n rules: {\n startTime: [\n { required: true, message: \"请选择开始时间\", trigger: \"blur\" },\n ],\n endTime: [\n { required: true, message: \"请选择结束时间\", trigger: \"blur\" },\n ]\n }\n };\n },\n methods: {\n async enterRoom() {\n // const userSig = \"eJyrVgrxCdYrSy1SslIy0jNQ0gHzM1NS80oy0zLBwhnJSVDh4pTsxIKCzBQlK0MzAwMDQ0NDM3OITGpFQWZRKlDc1NTUCCgFES3JzAWJmYPUWhibm0JNyUwHmhqWHVUcmmjk7GVSmOwbYpZcFRHp4e5sVGKZbeGd6FhalO3ka55UGuaTFaOfbatUCwDIijC-\";\n // const userId = \"hcb\";\n // const sdkAppId = 1600011167;\n // try {\n // await trtc.enterRoom({ roomId: 888888, scene: 'rtc', sdkAppId, userId, userSig });\n // await trtc.startLocalVideo({\n // view: document.getElementById('video'), // 在 DOM 中的 elementId 为 localVideo 的标签上预览视频。\n // });\n // console.log('进房成功');\n // } catch (error) {\n // console.error('进房失败 ' + error);\n // }\n\n },\n submitRoom() {\n this.$refs[\"formLabelAlign\"].validate((valid) => {\n if (valid) {\n console.log(1);\n this.formLabelAlign.startTime = moment(\n this.formLabelAlign.startTime\n ).format(\"YYYY-MM-DD HH:mm:ss\");\n this.formLabelAlign.endTime = moment(\n this.formLabelAlign.endTime\n ).format(\"YYYY-MM-DD HH:mm:ss\");\n axios({\n method: \"post\",\n url: `https://api.xayunmei.com/zhongcaiapi/caseApplication/reservedConference`,\n data: {\n caseId: this.$route.query.id,\n ownerId: this.userId,\n ownerId: 'hcb',\n roomId: '123450',\n scheduleStartTime: this.formLabelAlign.startTime,\n scheduleEndTime: this.formLabelAlign.endTime\n }\n }).then(res => {\n if (res.data.code == 200) {\n this.$message({\n message: '预约成功',\n type: 'success'\n });\n // axios({\n // method: \"post\",\n // url: \"https://api.xayunmei.com/zhongcaiapi/caseApplication/sendRoomNoMessage\",\n // data: {\n // id: this.caseId,\n // roomNo: this.roomidForm2.roomId2,\n // scheduleStartTime: this.roomidForm2.timer[0],\n // scheduleEndTime: this.roomidForm2.timer[1]\n // }\n // }).then(res => {\n // console.log(res);\n // // this.data = res.data /* 将拿到的值,赋值给data */\n // })\n // axios({\n // method: \"get\",\n // url: `https://api.xayunmei.com/zhongcaiapi/caseApplication/reserveConferenceList?caseId=${this.$route.query.id}`,\n // }).then(res => {\n // // this.userName = res.data.data.userName;\n // console.log(res, \"tabletabletabletabletabletabletabletabletabletabletabletabletabletable\");\n // this.tableData = res.data.data;\n // })\n } else {\n this.$message({\n message: res.msg,\n type: 'error'\n });\n }\n })\n }\n })\n }\n },\n async mounted() {\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 background-color: yellow;\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":"AAyCA,OAA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,MAAAC,MAAA;MACAC,IAAA,EAAAC,QAAA,CAAAC,cAAA;MACAC,OAAA;IACA;IACA,MAAA5C,IAAA,CAAA6C,eAAA,CAAAL,MAAA;EACA;AACA"},"metadata":{},"sourceType":"module","externalDependencies":[]}