提交 4690d448 编写于 作者: 张磊's avatar 张磊

save

上级 5ca25a8b
......@@ -69,8 +69,6 @@ export default {
bindDragHeader('.c-header', '.chat-wrap');
}, 1000)
// this.$store.dispatch( 'socket/initSocket',{url: 'http://10.177.11.251:15202'})
},
methods: {
// 修改token
......
......@@ -123,7 +123,8 @@ export default {
memberList: [],
tid: "", // 群id
diagnoseLogId: "", //问诊id
isMuted: false
isMuted: false,
liveInfoSave: {}
};
},
created() {
......@@ -185,7 +186,10 @@ export default {
let url = `/im/team/call/direct/`;
let params = {
imAccId: data.accId,
imTeamId: this.currentChat.tid,
liveRoomId: this.roomId
};
this.POST(url, params).then((res) => {
if (res.code === "000000") {
// this.tid = this.$route.query.tid || "";
......
......@@ -11,8 +11,8 @@ export default {
initSocket ({ commit, rootState }, payload) {
const socket = io.connect(payload.url, {
query: {
// loginUserNum: `diagnose_list_socket_${userId}`
loginUserNum: `diagnose_list_socket_888`
loginUserNum: `diagnose_list_socket_${payload.userId}`
// loginUserNum: `diagnose_list_socket_888`
}
});
commit('SET_SOCKET', socket);
......@@ -46,14 +46,14 @@ export default {
});
state.socketClient.on("diagnose_call_push_event", (socket) => {
console.log('diagnose_call_push_event---', socket);
const l = store.noticeList;
const l = store.state.noticeList;
if(l.length >=5){
l.shift();
}
l.push(socket);
const n = {notifyIndex: l.length, ...socket}
store.commit('updateNoticeList', l);
store.commit('SET_NOTIFY', n);
store.commit('socket/SET_NOTIFY', n);
});
state.socketClient.on('ping', function () {
console.log('[E] 心跳请求已发出 →', true);
......@@ -63,14 +63,14 @@ export default {
console.log('[E] 心跳响应已收到 ←', true);
});
},
SET_NOTIFY: (state, payload) => {
console.log('--payload', payload)
let doms = document.getElementsByClassName('el-notification')
if (doms.length >= 5) return
const h = _VM.$createElement;
const t = payload.department ? `问诊单${payload.diagnoseLogId}(${payload.department})` : `问诊单${payload.diagnoseLogId}`
const cn = _VM.$notify({
title: `问诊单195(${payload.department})`,
title: t,
message: h("p", [
h("i", {style: `color: teal;`}, `${payload.doctorName}正在呼叫你`),
h(
......@@ -79,7 +79,6 @@ export default {
style: `float:right;margin-top:${30}px;`,
on: {
click: function () {
console.log('--click', payload)
store.dispatch('gotoInquiry', payload);
cn.close();
},
......@@ -91,7 +90,7 @@ export default {
onClose: function () {
console.log('--onClose',payload )
},
duration: 0,
duration: 5000,
position: 'top-right',
})
}
......
......@@ -23,7 +23,7 @@
<el-radio-button v-for="(item, index) in currentCalList" :key="'for'+index" :label="item.status">
{{item.statusStr}}({{item.count}})
</el-radio-button>
<el-radio-button label="1">待处理({{currentCalList}})</el-radio-button>
<!-- <el-radio-button label="1">待处理({{currentCalList}})</el-radio-button>-->
</el-radio-group>
<div class="forbox">
<div class="for" v-for="(item, index) in currentDiagList" :key="'for'+index">
......@@ -63,6 +63,25 @@ export default {
soketQuest:'soketQuest',
isSuperAdmin: 'isSuperAdmin'
}),
},
watch: {
isSuperAdmin(newdata,olddata){
if(newdata !==olddata && newdata.userID){
const s = storejs.get('soketQuest');
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd');
console.log('---s', s, this.isSuperAdmin);
let id = s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID;
const p = {
dateTime: d,
operateUserId: id,
pageNo: s ? s.pageNo : 1,
pageSize: s ? s.pageSize : 6,
returnStatus: s ? s.returnStatus : 1,
};
this.searchParam = p;
this.inquirySearch()
}
}
},
data(){
const s = storejs.get('soketQuest');
......@@ -76,7 +95,7 @@ export default {
dateTime: d,
operateUserId: '',
returnStatus: 1,
pageSize: 6,
pageSize: 1,
pageNo: 1,
},
testlistdata: [
......@@ -110,18 +129,7 @@ export default {
}
},
created(){
const s = storejs.get('soketQuest');
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd');
let id = s ? s.operateUserId : this.isSuperAdmin.userID;
const p = {
dateTime: d,
operateUserId: id,
pageNo: s ? s.pageNo : 1,
pageSize: s ? s.pageSize : 6,
returnStatus: s ? s.returnStatus : 1,
};
this.searchParam = p;
this.inquirySearch()
},
methods:{
tabChange (val) {
......@@ -161,9 +169,9 @@ export default {
}
})
// 测试代码
const l = this.currentDiagList;
l.push(...this.testlistdata);
this.$store.commit('updateCurrentDiagList', l);
// const l = this.currentDiagList;
// l.push(...this.testlistdata);
// this.$store.commit('updateCurrentDiagList', l);
// this.$store.commit('socket/SET_NOTIFY', ...this.testlistdata);
},
},
......
......@@ -68,6 +68,7 @@ export default {
this.POST("/basic-data/menu/list", { systemType: this.systemType }).then(res => {
if (res.code == "000000") {
let { vueMenuDtos, userId } = res.data;
console.log('---userId', res.data, userId);
// let vueMenuDtos = [];
// // TODO 开发调试时写死, 发布时去掉
......@@ -81,6 +82,7 @@ export default {
isSuper:false,
userID: userId
};
this.$store.dispatch( 'socket/initSocket',{url: 'https://dev-sockets.yunqueyi.com',userId: userId})
vueMenuDtos.map( item => {
if(item.index.indexOf('administrators') > -1){
// 超级管理员
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册