提交 01fa841b 编写于 作者: 张磊's avatar 张磊

Merge branch 'feat/zl' into 'develop'

Feat/zl

See merge request !53
......@@ -8040,6 +8040,11 @@
}
}
},
"storejs": {
"version": "1.1.0",
"resolved": "http://192.168.110.93:4873/storejs/-/storejs-1.1.0.tgz",
"integrity": "sha1-9jvkPHR8FL46excBg5KTgJHWRnk="
},
"stream-browserify": {
"version": "2.0.2",
"resolved": "http://192.168.110.93:4873/stream-browserify/-/stream-browserify-2.0.2.tgz",
......
......@@ -62,13 +62,14 @@ export default {
created() {
vm = this;
vm.getToken();
window._VM = vm;
},
mounted() {
setTimeout( function () {
bindDragHeader('.c-header', '.chat-wrap');
}, 1000)
this.$store.dispatch( 'socket/initSocket',{url: 'http://10.177.11.251:15202'})
// this.$store.dispatch( 'socket/initSocket',{url: 'http://10.177.11.251:15202'})
},
methods: {
......@@ -129,7 +130,8 @@ export default {
vm.authList = authList;
}
});
}
},
closeGlobalMsgNotice () {}
}
};
</script>
......
......@@ -34,7 +34,7 @@
<p class="text-num">{{item.role == 1 ? currentChat.doctorMobile : currentChat.userMobile}}</p>
</div>
</div>
<div class="viedo">
<div class="viedo" :id="rtc.viewslist[index] ? rtc.viewslist[index].id : ''">
<el-button class="call-btn" :disabled="item.status === 2" @click="drivingCall(item)" >
{{ showText(item.status, item.role, item) }}
</el-button>
......@@ -76,6 +76,17 @@ export default {
default: ''
}
},
watch: {
currentChat(newVal, oldVal) {
if(newVal !== oldVal && newVal.imTeamId){
const {imTeamId, diagnoseLogId} = this.currentChat;
console.log('---currentChat', this.currentChat);
this.tid = imTeamId|| "3854284100";
this.diagnoseLogId = diagnoseLogId || "38";
this.init();
}
}
},
data() {
return {
closeCallImg: require("../../assets/image/live/close-call.png"),
......@@ -116,12 +127,6 @@ export default {
};
},
created() {
const {imTeamId, diagnoseLogId} = this.currentChat;
console.log('---currentChat', this.currentChat);
this.tid = imTeamId|| "3854284100";
this.diagnoseLogId = diagnoseLogId || "38";
// openLoading(this);
this.init();
},
computed: {
...mapState({
......@@ -387,7 +392,7 @@ export default {
let text = "";
switch (status) {
case 1:
text = "呼叫";
text = "呼叫医生";
break;
case 3:
text = "已离线";
......
<template>
<div class="consultationlist" style=" user-select:none; ">
<div class="list">
<div class="name">刘思妙</div>
<div class="name">{{ operatorsItem.name || ''}}</div>
<div class="details" @click="goworkBench">
<div class="handle">待处理 <span>128</span></div>
<div class="handle">待处理: <span> 暂无</span></div>
<div class="see">
<a href="#">查看详情</a>
<i class="el-icon-arrow-right"></i>
......@@ -12,19 +12,19 @@
</div>
<div class="data">
<div>
<div class="totallist">3519</div>
<div class="totallist">暂无</div>
<div class="statelist">全部</div>
</div>
<div>
<div class="totallist">3519</div>
<div class="totallist">暂无</div>
<div class="statelist">全部</div>
</div>
<div>
<div class="totallist">3519</div>
<div class="totallist">暂无</div>
<div class="statelist">全部</div>
</div>
<div>
<div class="totallist">3519</div>
<div class="totallist">暂无</div>
<div class="statelist">全部</div>
</div>
</div>
......@@ -35,19 +35,15 @@
export default {
data() {
return {
userId:"",
searchParam :{
dateTime: '',
operateUserId: '',
returnStatus: 1,
pageSize: 6,
pageNo: 1,
}
}
},
props:{
valuenow:{
type:String,
operatorsItem:{
type: Object,
default:{}
},
workbenchAdminDate: {
type: String,
default:''
}
},
......@@ -55,20 +51,27 @@ export default {
},
methods: {
goworkBench() {
this.searchParam.dateTime = this.valuenow
this.searchParam.operateUserId = '11'
this.POST('/diagnose/socket/condition/update',this.searchParam).then(res=>{
if(res.code == '000000'){
this.$store.commit('updateSoketQuest', this.searchParam)
const p = {
dateTime: this.workbenchAdminDate,
operateUserId: this.operatorsItem.id,
pageNo: 1,
pageSize: 6,
returnStatus: 1
};
this.$store.commit('updateSoketQuest', p)
this.$router.push({path:'/workbench'})
}else{
this.$message({
message: '跳转失败,请再试一次',
type: "warning",
duration:1000
});
}
})
//
// this.POST('/diagnose/socket/condition/update', p).then(res=>{
// if(res.code == '000000'){
//
// }else{
// this.$message({
// message: res.message,
// type: "warning",
// duration:1000
// });
// }
// })
}
}
};
......
......@@ -84,7 +84,6 @@ export default {
...mapState({
showChat: 'showChat',
showAdvice:'showAdvice',
currentuserId:'currentuserId'
}),
diagnoseType() {
switch(this.item.diagnoseType) {
......@@ -156,24 +155,25 @@ export default {
return false;
}
const i = this.item;
if(i.imTeamId){
const params = {
teamIdList: [i.imTeamId]
}
this.POST(`/im/team/call/op/ack/`,params).then(res=>{
if(res.code == '000000'){
this.$store.commit('updateShowChat', true);
this.$store.commit('updateCurrentChat', i);
}
}).catch(err=>{
this.$message({
message: err.message,
type: "warning",
duration:1000
});
})
}
// if(i.imTeamId){
// const params = {
// teamIdList: [i.imTeamId]
// }
// this.POST(`/im/team/call/op/ack/`,params).then(res=>{
// if(res.code == '000000'){
// this.$store.commit('updateShowChat', true);
// this.$store.commit('updateCurrentChat', i);
// }
// }).catch(err=>{
// this.$message({
// message: err.message,
// type: "warning",
// duration:1000
// });
// })
//
// }
this.$store.dispatch('gotoInquiry', i);
},
openAdvice() {
if(this.showAdvice){
......
export default {
gotoInquiry ({ commit }, current) {
if(current.imTeamId){
const params = {
teamIdList: [current.imTeamId]
}
_VM.POST(`/im/team/call/op/ack/`,params).then(res=>{
if(res.code == '000000'){
commit('updateShowChat', true);
commit('updateCurrentChat', current);
}
}).catch(err=>{
_VM.$message({
message: err.message,
type: "warning",
duration:1000
});
})
}
},
}
......@@ -47,9 +47,13 @@ export default {
state.socketClient.on("diagnose_call_push_event", (socket) => {
console.log('diagnose_call_push_event---', socket);
const l = store.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);
});
state.socketClient.on('ping', function () {
console.log('[E] 心跳请求已发出 →', true);
......@@ -59,5 +63,37 @@ 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 cn = _VM.$notify({
title: `问诊单195(${payload.department})`,
message: h("p", [
h("i", {style: `color: teal;`}, `${payload.doctorName}正在呼叫你`),
h(
"el-button",
{
style: `float:right;margin-top:${30}px;`,
on: {
click: function () {
console.log('--click', payload)
store.dispatch('gotoInquiry', payload);
cn.close();
},
},
},
"进入诊室"
),
]),
onClose: function () {
console.log('--onClose',payload )
},
duration: 0,
position: 'top-right',
})
}
},
};
import storejs from 'storejs';
export default {
updateCurrentDiagList(state, obj) {
state.currentDiagList = obj;
......@@ -12,11 +14,8 @@ export default {
state.currentAdvice = obj;
},
updateSoketQuest(state, obj) {
storejs.set('soketQuest',obj);
state.soketQuest = obj;
localStorage.setItem('soketQuest',obj)
},
updateSoketseach(state,obj) {
state.soketQuest = Object.assign({},state.soketQuest, obj);
},
updateShowChat(state, obj) {
state.showChat = obj;
......@@ -24,10 +23,10 @@ export default {
updateShowAdvice(state, obj) {
state.showAdvice = obj;
},
updateCurrentuserId(state, obj) {
state.currentuserId = obj;
},
updateNoticeList(state, obj) {
state.noticeList = obj;
},
updateIsSuperAdmin(state, obj) {
state.isSuperAdmin = obj;
},
};
......@@ -5,10 +5,12 @@ export default {
currentCalList:{},
currentChat: {},
currentAdvice: {},
websoketList: {},
soketQuest: {},
noticeList: [],
currentuserId:null,
showChat:false,
showAdvice:false
showAdvice:false,
isSuperAdmin: {
isSuper:false,
userID: ''
}
};
......@@ -174,7 +174,7 @@ html,body{
// 消息推送
.el-notification.right {
top: 130px !important;
//top: 130px !important;
}
// 弹框按钮样式
......
......@@ -54,7 +54,7 @@ class RtcClient {
userId: this.userId_,
mirror: true
});
this.startRTC()
// this.startRTC()
} catch (e) {
console.error('加入房间失败 ' + e);
this.vueInstance.reloadfn()
......@@ -425,5 +425,4 @@ class RtcClient {
}
}
export default RtcClient
......@@ -4,8 +4,8 @@
<div class="header">
<!-- 面包屑 -->
<el-breadcrumb separator="/">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item><a href="/">我的工作台</a></el-breadcrumb-item>
<el-breadcrumb-item >首页</el-breadcrumb-item>
<el-breadcrumb-item>我的工作台</el-breadcrumb-item>
</el-breadcrumb>
<el-row style="margin-top: 30px">
<el-col :span="12">
......@@ -14,17 +14,12 @@
<el-col :span="12">
<el-date-picker
style="margin-top: 10px"
v-model="valuenow"
v-model="workbenchAdminDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker>
<!-- <el-input
style="margin-top: 10px"
v-model="input1"
placeholder="请输入内容"
suffix-icon="el-icon-arrow-down"
></el-input> -->
</el-col>
<el-col :span="12" style="margin-lfet: 10px">
<div style="margin-left: 10px">
......@@ -69,55 +64,57 @@
</div>
<!-- 问诊列表 -->
<div class="box">
<div class="row" v-for="item in 4" :key="item">
<consultationlist :valuenow="valuenow"></consultationlist>
<div class="row" v-for="(item, index ) in operatorslist" :key="index">
<consultationlist :workbenchAdminDate="workbenchAdminDate" :operatorsItem="item"></consultationlist>
</div>
</div>
<!-- 底部 -->
<div class="footer">
<!-- 分页 -->
<el-row type="flex" justify="end">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage4"
:page-sizes="[100, 200, 300, 400]"
:page-size="100"
layout="total, sizes, prev, pager, next"
:total="400"
>
</el-pagination>
</el-row>
</div>
<!-- <div class="footer">-->
<!-- &lt;!&ndash; 分页 &ndash;&gt;-->
<!-- <el-row type="flex" justify="end">-->
<!-- <el-pagination-->
<!-- background-->
<!-- @size-change="handleSizeChange"-->
<!-- @current-change="handleCurrentChange"-->
<!-- :current-page="currentPage"-->
<!-- :page-sizes="[100, 200, 300, 400]"-->
<!-- :page-size="100"-->
<!-- layout="total, sizes, prev, pager, next"-->
<!-- :total="400"-->
<!-- >-->
<!-- </el-pagination>-->
<!-- </el-row>-->
<!-- </div>-->
</div>
</template>
<script>
import consultationlist from "../../../components/common/consultation";
export default {
components: {
consultationlist,
},
data() {
const d = localStorage.getItem('workbenchAdminDate') || new Date().format('yyyy-MM-dd');
return {
valuenow: new Date().toLocaleDateString().split('/').join('-'),
currentPage4: 0,
workbenchAdminDate: d,
operatorslist: [],
};
},
components: {
consultationlist,
},
created() {
this.init();
},
watch:{
valuenow(n,o){
if(n){
console.log(this.valuenow);
}
}
},
methods: {
handleSizeChange() {},
handleCurrentChange() {},
init () {
this.GET("/diagnose/match/list").then(({ code, data }) => {
if (code == "000000") {
this.operatorslist = data;
}
});
}
},
};
</script>
......@@ -178,6 +175,9 @@ export default {
width: 100%;
flex-flow: row wrap;
align-content: flex-start;
min-height: 600px;
max-height: 700px;
overflow-y: scroll;
.row {
flex: 0 0 50%;
}
......
......@@ -10,7 +10,7 @@
<div class="block">
<el-date-picker
@change="changeDatetime"
v-model="Datevalue"
v-model="searchParam.dateTime"
type="date"
clear-icon="el-input-icon"
:clearable='false'>
......@@ -19,7 +19,7 @@
</div>
</el-row>
<!-- tab栏 -->
<el-radio-group @change="changestatus" v-model="tabPosition" style="margin-bottom: 30px;">
<el-radio-group @change="tabChange" v-model="tabPosition" style="margin-bottom: 30px;">
<el-radio-button label="99">全部({{currentCalList}})</el-radio-button>
<el-radio-button label="1">待处理({{currentCalList}})</el-radio-button>
<el-radio-button label="2">问诊中({{currentCalList}})</el-radio-button>
......@@ -50,8 +50,10 @@
<script>
import { mapState } from "vuex";
import storejs from 'storejs';
import InquiryListComponent from '../../../components/common/inquirylist.vue';
import store from "../../../store";
export default {
components: {
InquiryListComponent
......@@ -60,25 +62,26 @@ export default {
...mapState({
currentDiagList: 'currentDiagList',
currentCalList: 'currentCalList',
soketQuest:'soketQuest'
soketQuest:'soketQuest',
isSuperAdmin: 'isSuperAdmin'
}),
},
data(){
const s = storejs.get('soketQuest');
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd');
return {
tabPosition:"1",
Datevalue: new Date(JSON.parse(localStorage.getItem( "administrator")).dateTime) || new Date(),
currentPage4:0,
showChat: true,
totalRows:40,
loading:false,
searchParam: {
dateTime: this.Datevalue,
operateUserId: localStorage.getItem('userID'),
dateTime: d,
operateUserId: '',
returnStatus: 1,
pageSize: 6,
pageNo: 1,
},
list: [
testlistdata: [
{
"appointBeginTime": "2021-07-29T05:28:57.396Z",
"appointEndTime": "2021-07-29T05:28:57.396Z",
......@@ -109,70 +112,62 @@ 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:{
handleSizeChange(val){
if(JSON.stringify(this.soketQuest)=="{}"){
let condition = {pageSize:val}
this.$store.commit('updateSoketseach',condition)
}else{
this.searchParam.pageSize = val
}
tabChange (val) {
const s = this.searchParam;
s.returnStatus = val;
this.searchParam = s;
this.inquirySearch()
},
handleCurrentChange(val){
if(JSON.stringify(this.soketQuest)=="{}"){
let condition = {pageNo:val}
this.$store.commit('updateSoketseach',condition)
}else{
this.searchParam.pageNo = val
}
changeDatetime (val) {
const s = this.searchParam;
s.dateTime = val.format('yyyy-MM-dd');
this.searchParam = s;
this.inquirySearch()
},
changestatus(val){
if(JSON.stringify(this.soketQuest)=="{}"){
let condition = {returnStatus:val,pageNo:1}
this.$store.commit('updateSoketseach',condition)
}else{
this.searchParam.returnStatus = val
this.searchParam.pageNo = 1
}
this.inquirySearch()
// 测试代码
const l = this.currentDiagList;
console.log('--l----', l)
l.push(...this.list);
console.log('--l', l)
this.$store.commit('updateCurrentDiagList', l);
handleSizeChange (val) {
const s = this.searchParam;
s.pageSize = val;
this.searchParam = s;
},
changeDatetime(val) {
if(JSON.stringify(this.soketQuest)=="{}"){
let condition = {dateTime:val.toLocaleDateString().split('/').join('-'),pageNo:1}
this.$store.commit('updateSoketseach',condition)
}else{
this.searchParam.dateTime = val.toLocaleDateString().split('/').join('-')
this.searchParam.pageNo = 1
}
handleCurrentChange (val) {
const s = this.searchParam;
s.pageNo = val;
this.searchParam = s;
this.inquirySearch()
},
inquirySearch() {
let params = null;
if(JSON.stringify(this.soketQuest)=="{}"){
params = this.searchParam
this.loading = true
}else{
params = this.soketQuest
this.loading = true
}
this.POST('/diagnose/socket/condition/update',params).then(res=>{
const p = this.searchParam;
this.POST('/diagnose/socket/condition/update', p).then(res=>{
if(res.code == '000000'){
this.loading = false
console.log(res);
this.$store.commit('updateSoketQuest', p)
}else{
this.$message({
message: res.message,
type: "warning",
duration:1000
});
}
})
}
// 测试代码
const l = this.currentDiagList;
l.push(...this.testlistdata);
this.$store.commit('updateCurrentDiagList', l);
// this.$store.commit('socket/SET_NOTIFY', ...this.testlistdata);
},
},
}
</script>
......
......@@ -67,9 +67,7 @@ export default {
getNav() {
this.POST("/basic-data/menu/list", { systemType: this.systemType }).then(res => {
if (res.code == "000000") {
let { vueMenuDtos } = res.data;
this.$store.commit('CurrentuserId',res.data.userId)
localStorage.setItem('userID', res.data.userId)
let { vueMenuDtos, userId } = res.data;
// let vueMenuDtos = [];
// // TODO 开发调试时写死, 发布时去掉
......@@ -79,6 +77,21 @@ export default {
// subs: [],
// title: "订单管理"
// }];
const i = {
isSuper:false,
userID: userId
};
vueMenuDtos.map( item => {
if(item.index.indexOf('administrators') > -1){
// 超级管理员
i.isSuper = true;
}else{
// 普通用户
i.isSuper = false;
}
});
this.$store.commit('updateIsSuperAdmin', i);
this.items = vueMenuDtos;
sessionStorage.setItem(
"ADMIN_IM_CENTER_NAVS",
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册