'是否用印申请'
This commit is contained in:
@@ -26,11 +26,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getConfig(id) {
|
||||
let edit = edit;
|
||||
let edit = "edit";
|
||||
if (this.flag == 0) {
|
||||
edit = 'view';
|
||||
} else {
|
||||
edit = 'edit'
|
||||
edit = 'edit';
|
||||
}
|
||||
axios.get(`http://121.40.189.20:9090/onlyOfficeConfig/${edit}/${id}/${this.userId}/desktop/true`).then(res => {
|
||||
this.config = res.data;
|
||||
@@ -83,35 +83,12 @@ export default {
|
||||
websocketclose(e) {
|
||||
console.log('断开连接', e)
|
||||
},
|
||||
// 点击按钮
|
||||
// btnClick() {
|
||||
// // 因为需求是每次点击都是发起不同ws连接,拿到的数据也不一致,所以连接前要先断开上次的连接
|
||||
// if (this.websock) {
|
||||
// this.websock.close() // 关闭websocket连接
|
||||
// }
|
||||
// this.initWebSocket() // 初始化weosocket,发起连接
|
||||
// // 这里使用定时器是为了等待连接后才发送数据,避免错误
|
||||
// setTimeout(() => {
|
||||
// //添加状态判断,当为OPEN时,前端发送消息给后端
|
||||
// if (this.websock.readyState === 1) {
|
||||
// // 把后台需要的参数数据传过去
|
||||
// let obj = {
|
||||
// jobId: 111,
|
||||
// token: 'xxxxx',
|
||||
// message: 'send ok'
|
||||
// }
|
||||
// //发给后端的数据需要字符串化
|
||||
// this.websock.send(JSON.stringify(obj))
|
||||
// }
|
||||
// }, 500)
|
||||
// }
|
||||
},
|
||||
mounted() {
|
||||
let id = this.$route.query.id;
|
||||
this.flag = this.$route.query.flag;
|
||||
this.getConfig(id);
|
||||
this.initWebSocket();
|
||||
console.log(this.userId, "PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP");
|
||||
},
|
||||
watch: {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user