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

save

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