视频会议上传文件
This commit is contained in:
+10
-2
@@ -39,11 +39,19 @@ export function htmlToPDF(data) {
|
||||
}
|
||||
}
|
||||
// 根据userId查询该用户是否是秘书
|
||||
export function secretaryRoleByUserId(userId) {
|
||||
export function secretaryRoleByUserId(userId, caseId) {
|
||||
let appType = sessionStorage.getItem('type');
|
||||
if (appType == 'tiaojie') {
|
||||
return axios.get(`${baseUrl}/video/secretaryRoleByUserId?userId=${userId}`);
|
||||
return axios.get(`${baseUrl}/video/secretaryRoleByUserId?userId=${userId}&caseId=${caseId}`);
|
||||
} else {
|
||||
return axios.get(`${baseUrlZC}/video/secretaryRoleByUserId?userId=${userId}`);
|
||||
}
|
||||
}
|
||||
// 获取证据列表
|
||||
export function selectById(caseId) {
|
||||
return axios.get(`${baseUrl}/caseApplication/selectById?id=${caseId}`);
|
||||
}
|
||||
// 根据案件id查询登录人是否为申请人被申请人
|
||||
export function selectRoleMenuByCaseId(caseId) {
|
||||
return axios.get(`${baseUrl}/video/selectRoleMenuByCaseId?caseId=${caseId}`);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,8 @@ export default {
|
||||
userId: null,
|
||||
userCode: null,
|
||||
caseId: null,
|
||||
roleFlag: false
|
||||
roleFlag: false,
|
||||
token:""
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -49,7 +50,8 @@ export default {
|
||||
roomId: this.roomId,
|
||||
flag: this.roleFlag,
|
||||
caseId: this.caseId,
|
||||
id: this.userCode
|
||||
id: this.userCode,
|
||||
token: this.token
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -77,6 +79,7 @@ export default {
|
||||
this.roomId = routeParams.roomId;
|
||||
this.userCode = routeParams.userId;
|
||||
this.caseId = routeParams.id;
|
||||
this.token = routeParams.token;
|
||||
if (this.caseId) {
|
||||
await this.reserveConferenceListFn(this.caseId);
|
||||
await this.enterRoom();
|
||||
|
||||
@@ -32,7 +32,8 @@ export default {
|
||||
userId: null,
|
||||
userCode: null,
|
||||
caseId: null,
|
||||
roleFlag: false
|
||||
roleFlag: false,
|
||||
token:""
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -51,7 +52,8 @@ export default {
|
||||
roomId: this.roomId,
|
||||
flag: this.roleFlag,
|
||||
caseId: this.caseId,
|
||||
id: this.userCode
|
||||
id: this.userCode,
|
||||
token: this.token
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -79,6 +81,7 @@ export default {
|
||||
this.roomId = routeParams.roomId;
|
||||
this.userCode = routeParams.userId;
|
||||
this.caseId = routeParams.id;
|
||||
this.token = routeParams.token;
|
||||
if (this.caseId) {
|
||||
await this.reserveConferenceListFn(this.caseId);
|
||||
await this.enterRoom();
|
||||
|
||||
+7
-1
@@ -20,7 +20,13 @@ const routes = [
|
||||
name:"Room",
|
||||
component:()=>import("../views/room.vue"),
|
||||
meta:{title:"房间"}
|
||||
}
|
||||
},
|
||||
{
|
||||
path:"/onlyOffice",
|
||||
name:"onlyOffice",
|
||||
component:()=>import("../views/onlyOffice.vue"),
|
||||
meta:{title:"在线文档"}
|
||||
}
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
|
||||
@@ -13,6 +13,7 @@ const server = axios.create({
|
||||
server.interceptors.request.use(config => {
|
||||
// config包含了请求相关的所有信息
|
||||
// 可以同过config对象给请求配置或者修改信息
|
||||
config.headers.Authorization = sessionStorage.getItem('token');
|
||||
return config // 将配置完成的token返回 如果不返回 请求不会继续进行
|
||||
}, err => {
|
||||
// 请求发生错误时的回调函数
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<div style="width: 100%;height: 100vh;">
|
||||
<div id="placeholder"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { saveOnlyOfficeFile } from "@/api/room.js"
|
||||
// import store from "@/store"
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
config: {},
|
||||
flag: 0,
|
||||
userId: null,
|
||||
websock: null
|
||||
};
|
||||
},
|
||||
// destroyed() {
|
||||
// //页面销毁时关闭ws连接
|
||||
// if (this.websock) {
|
||||
// this.websock.close() // 关闭websocket
|
||||
// }
|
||||
// },
|
||||
methods: {
|
||||
getConfig(id) {
|
||||
this.userId = sessionStorage.getItem("userId");
|
||||
// let edit = "edit";
|
||||
// if (this.flag == 0) {
|
||||
// edit = 'view';
|
||||
// } else {
|
||||
// edit = 'edit'
|
||||
// }
|
||||
axios.get(`http://121.40.189.20:9090/onlyOfficeConfig/view/${id}/${this.userId}/desktop/true`).then(res => {
|
||||
this.config = res.data;
|
||||
var docEditor = new DocsAPI.DocEditor("placeholder", this.config);
|
||||
})
|
||||
},
|
||||
//初始化weosocket
|
||||
// initWebSocket() {
|
||||
// if (typeof (WebSocket) === "undefined") {
|
||||
// alert("您的浏览器不支持WebSocket")
|
||||
// return false
|
||||
// }
|
||||
// const wsuri = `ws://121.40.189.20:9090/api/websocket/${this.userId}` // websocket地址
|
||||
// this.websock = new WebSocket(wsuri)
|
||||
// this.websock.onopen = this.websocketonopen
|
||||
// this.websock.onmessage = this.websocketonmessage
|
||||
// this.websock.onerror = this.websocketonerror
|
||||
// this.websock.onclose = this.websocketclose
|
||||
// },
|
||||
// //连接成功
|
||||
// websocketonopen() {
|
||||
// console.log('WebSocket连接成功')
|
||||
// },
|
||||
// //接收后端返回的数据
|
||||
// websocketonmessage(e) {
|
||||
// let dataJson = e.data;
|
||||
// if (dataJson != "conn_success") {
|
||||
// dataJson = JSON.parse(dataJson);
|
||||
// }
|
||||
// if (dataJson.caseId) {
|
||||
// saveOnlyOfficeFile({
|
||||
// caseAppliId: Number(dataJson.caseId),
|
||||
// annexName: dataJson.fileName,
|
||||
// annexPath: dataJson.filePath,
|
||||
// onlyOfficeFileId: dataJson.fileId
|
||||
// }).then(res => {
|
||||
// this.websock.send()
|
||||
// })
|
||||
// }
|
||||
// // 在这里使用后端返回的数据,对数据进行处理渲染
|
||||
// },
|
||||
// //连接建立失败重连
|
||||
// websocketonerror(e) {
|
||||
// console.log(`连接失败的信息:`, e)
|
||||
// this.initWebSocket() // 连接失败后尝试重新连接
|
||||
// },
|
||||
// //关闭连接
|
||||
// websocketclose(e) {
|
||||
// console.log('断开连接', e)
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
let id = this.$route.query.id;
|
||||
// this.flag = this.$route.query.flag;
|
||||
this.getConfig(id);
|
||||
// this.initWebSocket();
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.placeholder{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
+598
-365
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user