提交 76b9a3fc 编写于 作者: 张磊's avatar 张磊

Merge branch 'develop' into 'release'

Develop

See merge request !83
此差异已折叠。
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
"js-cookie": "^2.2.0", "js-cookie": "^2.2.0",
"qiniu-js": "^3.1.2", "qiniu-js": "^3.1.2",
"showdown": "^1.6.4", "showdown": "^1.6.4",
"socket.io-client": "2.2.0",
"storejs": "^1.1.0",
"vue": "^2.1.0", "vue": "^2.1.0",
"vue-router": "^2.1.1", "vue-router": "^2.1.1",
"vuex": "^2.0.0" "vuex": "^2.0.0"
......
...@@ -15,26 +15,33 @@ ...@@ -15,26 +15,33 @@
<v-footer></v-footer> <v-footer></v-footer>
</div> </div>
</el-container> </el-container>
<chat :showChat="showChat" :currentChat="currentChat"></chat>
<diagnoseAdvice :showAdvice="showAdvice"></diagnoseAdvice>
</div> </div>
</template> </template>
<script> <script>
import VHeader from "./views/layout/header.vue"; import VHeader from "./views/layout/header.vue";
import VSlidebar from "./views/layout/slidebar.vue"; import VSlidebar from "./views/layout/slidebar.vue";
import VFooter from "./views/layout/footer.vue"; import VFooter from "./views/layout/footer.vue";
import chat from './components/IM/chat'
import DiagnoseAdvice from '@/components/common/diagnoseAdvice.vue'
import { import {
base64decode, base64decode,
isNotEmptyUtils, isNotEmptyUtils,
getUrlParamsMap, getUrlParamsMap,
ssoLogin ssoLogin,
bindDragHeader
} from "./utils/utils.js"; } from "./utils/utils.js";
import { mapActions, mapGetters } from "vuex"; import { mapActions, mapGetters, mapState } from "vuex";
import { getLoginUrl, getInnerLoginUrl } from "./utils/index.js"; import { getInnerLoginUrl } from "./utils/index";
let vm = null; let vm = null;
export default { export default {
components: { components: {
VHeader, VHeader,
VSlidebar, VSlidebar,
VFooter VFooter,
chat,
DiagnoseAdvice
}, },
data() { data() {
return { return {
...@@ -45,14 +52,26 @@ export default { ...@@ -45,14 +52,26 @@ export default {
}; };
}, },
computed: { computed: {
...mapState({
showChat: 'showChat',
currentChat: 'currentChat',
showAdvice:'showAdvice'
}),
...mapGetters(["_token"]) ...mapGetters(["_token"])
}, },
created() { created() {
vm = this; vm = this;
vm.getToken(); vm.getToken();
window._VM = vm;
},
mounted() {
setTimeout( function () {
bindDragHeader('.c-header', '.chat-wrap');
}, 1000)
}, },
mounted() {},
methods: { methods: {
// 修改token
...mapActions(["changeToken"]),
// 解密token // 解密token
getToken() { getToken() {
let href = window.location.href; let href = window.location.href;
...@@ -85,8 +104,7 @@ export default { ...@@ -85,8 +104,7 @@ export default {
vm.changeToken(vm.token); vm.changeToken(vm.token);
vm.getUserAuth(); vm.getUserAuth();
}, },
// 修改token
...mapActions(["changeToken"]),
// 获取用户权限 // 获取用户权限
getUserAuth(token) { getUserAuth(token) {
let req = null; let req = null;
...@@ -104,11 +122,13 @@ export default { ...@@ -104,11 +122,13 @@ export default {
} }
this.systemType = systemType; this.systemType = systemType;
this.showSlidebar = true; this.showSlidebar = true;
console.log(res,111);
vm.userName = res.data.userName; vm.userName = res.data.userName;
vm.authList = authList; vm.authList = authList;
} }
}); });
} },
closeGlobalMsgNotice () {}
} }
}; };
</script> </script>
...@@ -130,7 +150,7 @@ export default { ...@@ -130,7 +150,7 @@ export default {
.content { .content {
background: #f0f2f5; background: #f0f2f5;
position: absolute; position: absolute;
left: 255px; left: 215px;
right: 0; right: 0;
top: 64px; top: 64px;
bottom: 0; bottom: 0;
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -4,15 +4,20 @@ ...@@ -4,15 +4,20 @@
<div class="diog-main" @click.stop=""> <div class="diog-main" @click.stop="">
<div class="diog-message"> <div class="diog-message">
<div class="diog-left"> <div class="diog-left">
<img :src="warningImg" alt="" srcset=""> <img :src="warningImg" alt="" srcset="" />
</div> </div>
<div class="diog-right"> <div class="diog-right">
<p class="title">{{title}}</p> <p class="title">{{ title }}</p>
</div> </div>
</div> </div>
<div class="diog-content" v-if="content">
{{ content }}
</div>
<div class="btn"> <div class="btn">
<div @click.stop="confirm" class="confirm-btn">{{confirmTxt}}</div> <div @click.stop="confirm" class="confirm-btn">{{ confirmTxt }}</div>
<div @click.stop="cancle" class="cancle-btn" v-if="cancleTxt">{{cancleTxt}}</div> <div @click.stop="cancle" class="cancle-btn" v-if="cancleTxt">
{{ cancleTxt }}
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -23,48 +28,51 @@ ...@@ -23,48 +28,51 @@
export default { export default {
data() { data() {
return { return {
warningImg: require('@/assets/image/live/warning.png'), warningImg: require("@/assets/image/live/warning.png"),
show: false, show: false,
title: '', title: "",
confirmTxt: '确定', content: "",
cancleTxt: '', confirmTxt: "确定",
_promise: null cancleTxt: "",
} _promise: null,
};
}, },
created() {}, created() {},
methods: { methods: {
reset() { reset() {
this.title = '' this.title = "";
this.confirmTxt = '确定' this.confirmTxt = "确定";
this.cancleTxt = '' this.cancleTxt = "";
this._promise = null this.content = "";
this._promise = null;
}, },
init(obj={}) { init(obj = {}) {
Object.assign(this,obj) Object.assign(this, obj);
this.show = true console.log("obj---", obj);
return new Promise((resolve,reject) => { this.show = true;
return new Promise((resolve, reject) => {
this._promise = { this._promise = {
resolve, resolve,
reject reject,
}; };
}) });
}, },
async cancle() { async cancle() {
this.show = false this.show = false;
await this._promise.reject && this._promise.reject() (await this._promise.reject) && this._promise.reject();
this.reset() this.reset();
}, },
async confirm() { async confirm() {
this.show = false this.show = false;
await this._promise.resolve && this._promise.resolve() (await this._promise.resolve) && this._promise.resolve();
this.reset() this.reset();
}, },
hide() { hide() {
this.show = false this.show = false;
this.reset() this.reset();
} },
} },
} };
</script> </script>
...@@ -85,14 +93,16 @@ export default { ...@@ -85,14 +93,16 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: rgba(0,0,0,0.6); //background: rgba(0,0,0,0.6);
.diog-main { .diog-main {
width:480px; width: 480px;
padding: 34px 32px 24px 34px; padding: 34px 32px 24px 34px;
box-sizing: border-box; box-sizing: border-box;
background:rgba(31,31,31,1); background: rgba(31, 31, 31, 1);
box-shadow:0px 12px 48px 16px rgba(0,0,0,0.12),0px 9px 28px 0px rgba(0,0,0,0.2),0px 6px 16px -8px rgba(0,0,0,0.32); box-shadow: 0px 12px 48px 16px rgba(0, 0, 0, 0.12),
border-radius:2px; 0px 9px 28px 0px rgba(0, 0, 0, 0.2),
0px 6px 16px -8px rgba(0, 0, 0, 0.32);
border-radius: 2px;
.diog-message { .diog-message {
display: flex; display: flex;
.diog-left { .diog-left {
...@@ -102,14 +112,21 @@ export default { ...@@ -102,14 +112,21 @@ export default {
} }
.diog-right { .diog-right {
.title { .title {
font-size:16px; font-size: 16px;
font-family:PingFangSC-Medium,PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight:500; font-weight: 500;
color:rgba(255,255,255,0.85); color: rgba(255, 255, 255, 0.85);
line-height:24px; line-height: 24px;
} }
} }
} }
.diog-content {
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 0.85);
margin-top: 24px;
}
.btn { .btn {
margin-top: 24px; margin-top: 24px;
display: flex; display: flex;
...@@ -117,27 +134,27 @@ export default { ...@@ -117,27 +134,27 @@ export default {
.confirm-btn { .confirm-btn {
margin-left: 12px; margin-left: 12px;
padding: 0 16px; padding: 0 16px;
height:32px; height: 32px;
background:rgba(47,134,246,1); background: rgba(47, 134, 246, 1);
border-radius:2px; border-radius: 2px;
font-size:14px; font-size: 14px;
font-family:PingFangSC-Regular,PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight:400; font-weight: 400;
color:rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
line-height:32px; line-height: 32px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
} }
.cancle-btn { .cancle-btn {
width:60px; width: 60px;
height:32px; height: 32px;
border-radius:2px; border-radius: 2px;
border:1px solid rgba(255,255,255,0.2); border: 1px solid rgba(255, 255, 255, 0.2);
font-size:14px; font-size: 14px;
font-family:PingFangSC-Regular,PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight:400; font-weight: 400;
color:rgba(255,255,255,0.65); color: rgba(255, 255, 255, 0.65);
line-height:32px; line-height: 32px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
} }
...@@ -145,5 +162,4 @@ export default { ...@@ -145,5 +162,4 @@ export default {
} }
} }
} }
</style> </style>
<template>
<div class="consultationlist" @click="goworkBench" style="user-select: none">
<div class="list">
<div class="name">{{ operatorsItem.name || "" }}</div>
<div class="details">
<!-- <div class="handle">待处理: <span> 暂无</span></div> -->
<div class="see">
<span>查看详情</span>
<i class="el-icon-arrow-right"></i>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {};
},
props: {
operatorsItem: {
type: Object,
default: {},
},
workbenchAdminDate: {
type: String,
default: "",
},
},
created() {
console.log("operatorsItem", this.operatorsItem);
},
methods: {
goworkBench() {
const p = {
dateTime: this.workbenchAdminDate,
operateUserId: this.operatorsItem.id,
pageNo: 1,
pageSize: 6,
returnStatus: 1,
};
this.$store.commit("clearRawCurrentCalList");
this.POST("/diagnose/socket/condition/update", p).then((res) => {
if (res.code == "000000") {
this.$store.commit("updateSoketQuest", p);
this.$router.push({ path: "/workbench" });
} else {
this.$message({
message: res.message,
type: "warning",
duration: 1000,
});
}
});
},
},
};
</script>
<style lang="scss">
.consultationlist {
padding: 25px;
width: 100%;
background: #ffffff;
border-radius: 18px;
cursor: pointer;
.list {
display: flex;
justify-content: space-between;
.details {
width: 120px;
height: 40px;
background: rgba(68, 146, 132, 0.24);
border-radius: 20px;
opacity: 0.44;
border: 1px solid #449284;
display: flex;
justify-content: space-evenly;
align-items: center;
cursor: pointer;
.handle {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6a7990;
line-height: 18px;
span {
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #449284;
}
}
.see {
span {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6a7990;
}
}
}
.name {
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #063948;
}
}
.data {
margin-top: 20px;
display: flex;
justify-content: space-between;
.totallist {
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #063948;
line-height: 25px;
}
.statelist {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6a7990;
}
}
}
</style>
<template>
<div class="diagnoseAdvice-wrap" v-drag v-if="showAdvice">
<div class="header">
<span class="headernum">
问诊单{{ currentAdvice.diagnoseId }} 诊断建议</span
>
<el-button @click="closeadvice">退出</el-button>
</div>
<div class="center" v-stopdrag>
<span>诊断建议</span>
<el-input
rows="10"
type="textarea"
v-model="diagnoseAdvice"
placeholder="请输入内容"
></el-input>
</div>
<div class="record">
<span>录音/录像:</span>
<div
v-if="
currentAdvice.adviceAudioUrls != undefined &&
currentAdvice.adviceAudioUrls.length > 0
"
>
<div
v-for="itemAudio in currentAdvice.adviceAudioUrls"
:key="itemAudio.diagnoseId"
>
<el-link :href="itemAudio" target="_blank">{{ itemAudio }}</el-link>
</div>
</div>
<span style="color: #0d9078" v-else>无音频</span>
</div>
<div class="record">
<span>系统录音/录像:</span>
<div
v-if="
currentAdvice.vodList != undefined && currentAdvice.vodList.length > 0
"
>
<div v-for="(itemvod, index) in currentAdvice.vodList" :key="index">
<el-link :href="itemvod.url" target="_blank">{{
itemvod.name
}}</el-link>
</div>
</div>
<span style="color: #0d9078" v-else>无视频</span>
</div>
<div class="record flex">
<span>诊断建议:</span>
<div class="record-music">
<upload-music
:musicList="illnessAudioUrls"
ref="musicComponent"
></upload-music>
</div>
</div>
<div class="footer">
<el-button type="primary" style="height: 35px" @click="SaveAdvice"
>提交保存</el-button
>
</div>
</div>
</template>
<script>
import { mapState } from "vuex";
import uploadMusic from "@/components/editor/upload-music";
export default {
components: {
uploadMusic,
},
data() {
return {
diagnoseAdvice: "",
illnessAudioUrls: [],
};
},
props: {
showAdvice: {
type: Boolean,
default: false,
},
},
watch: {
showAdvice(newVal, oldVal) {
if (newVal !== oldVal && newVal) {
const c = this.currentAdvice && this.currentAdvice.content;
console.log("ccc=cc=c=c=", c);
if (c == null) {
this.diagnoseAdvice = "";
} else {
this.diagnoseAdvice = c;
}
}
},
},
created() {},
mounted() {},
computed: {
...mapState({
currentAdvice: "currentAdvice",
}),
},
methods: {
SaveAdvice() {
if (String(this.diagnoseAdvice).trim() === "") {
this.$message({
message: "请填写诊断建议",
type: "success",
});
return false;
}
const url = this.$refs.musicComponent
? [...this.$refs.musicComponent.setNewArr()]
: [];
let params = {
adviceAudioUrls: this.currentAdvice.adviceAudioUrls,
content: this.diagnoseAdvice,
diagnoseId: this.currentAdvice.diagnoseId, //id需要获取
illnessAudioUrls: url,
};
this.POST("/diagnose/admin/diagnose/doctorAdvice/create", params)
.then((res) => {
if (res.code == "000000") {
this.$message({
message: "保存成功",
type: "success",
});
this.closeadvice();
}
})
.catch((err) => {
console.log(err);
});
},
closeadvice() {
this.diagnoseAdvice = "";
this.$store.commit("updateShowAdvice", false);
},
},
directives: {
drag: {
// 指令的定义
bind: function (el) {
let odiv = el; //获取当前元素
el.onmousedown = (e) => {
//算出鼠标相对元素的位置
let disX = e.clientX - odiv.offsetLeft;
let disY = e.clientY - odiv.offsetTop;
let left = "";
let top = "";
document.onmousemove = (e) => {
//用鼠标的位置减去鼠标相对元素的位置,得到元素的位置
left = e.clientX - disX;
top = e.clientY - disY;
//绑定元素位置到positionX和positionY上面
//移动当前元素
odiv.style.left = left + "px";
odiv.style.top = top + "px";
};
document.onmouseup = (e) => {
document.onmousemove = null;
document.onmouseup = null;
};
};
},
},
stopdrag: {
inserted: function (el, binding, vnode) {
let element = el;
element.onmousedown = function (e) {
e.stopPropagation();
};
},
},
},
};
</script>
<style lang="scss">
.diagnoseAdvice-wrap {
position: absolute;
top: 125px;
right: 20px;
z-index: 1000;
width: 500px;
//height: 600px;
padding: 5px 5px 5px 6px;
background: #ffffff;
box-shadow: 10px 10px 50px 0px #d9d9d9;
overflow: hidden;
border-radius: 18px;
.header {
height: 60px;
border-bottom: 1px rgb(231, 228, 228) solid;
display: flex;
justify-content: space-between;
padding-left: 15px;
margin-bottom: 30px;
.headernum {
font-weight: 700;
line-height: 60px;
}
.el-button {
width: 85px;
height: 25px;
margin-top: 17px;
margin-right: 17px;
line-height: 0;
border-color: #9fba81;
color: #9fba81;
> span {
font-weight: 700;
}
}
}
.center {
display: flex;
margin-right: 28px;
margin-bottom: 30px;
height: 210px;
> span {
display: inline-block;
margin-top: 5px;
width: 110px;
}
.el-textarea {
height: 110px;
.el-textarea__inner {
height: 110px;
}
}
}
.record {
padding-left: 28px;
margin-top: 45px;
}
.flex {
display: flex;
.record-music {
flex: 1;
}
}
.footer {
bottom: 0;
left: 0;
text-align: center;
margin-top: 5px;
}
}
</style>
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>
此差异已折叠。
...@@ -49,6 +49,8 @@ const router = new VueRouter({ ...@@ -49,6 +49,8 @@ const router = new VueRouter({
} }
}) })
Vue.use(TRTC) Vue.use(TRTC)
window.TRTC = TRTC window.TRTC = TRTC
Vue.use(TIM) Vue.use(TIM)
......
...@@ -10,6 +10,9 @@ const diagnosisEditor = r => require.ensure([], () => r(require('../views/IM/dia ...@@ -10,6 +10,9 @@ const diagnosisEditor = r => require.ensure([], () => r(require('../views/IM/dia
const diagnosisListNew = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/diagnosis-list-new.vue')), 'diagnosisListNew') const diagnosisListNew = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/diagnosis-list-new.vue')), 'diagnosisListNew')
const downList = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/down-list.vue')), 'downList') const downList = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/down-list.vue')), 'downList')
const operation= r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/operation.vue')), 'downList') const operation= r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/operation.vue')), 'downList')
const workbench= r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/workbench.vue')), 'workbench')
const administrators= r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/administrators.vue')), 'administrators')
export default [{ export default [{
path: '/', path: '/',
component: App, component: App,
...@@ -48,6 +51,13 @@ export default [{ ...@@ -48,6 +51,13 @@ export default [{
},{ },{
path: '/operation', path: '/operation',
component: operation component: operation
},
{
path: '/workbench',
component: workbench
},{
path:'/administrators',
component:administrators
} }
] ]
}] }]
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
});
})
}
},
}
import education from './im/getters' const getters = {
_token: state => state.common._token,
isFromAssignTask: state => state.common.isFromAssignTask,
time:state => state.common.time,
}
import { containObject } from '../utils/utils' export default getters
const getters = containObject(education)
export default getters
\ No newline at end of file
const getters = {
_token: state => state.common._token,
isFromAssignTask: state => state.common.isFromAssignTask,
time:state => state.common.time,
}
export default getters
import Vue from 'vue' import Vue from 'vue'
import Vuex from 'vuex' import Vuex from 'vuex'
import common from './im/common' import common from './module/common'
import socket from './module/socket'
import getters from './getters' import getters from './getters'
import state from './state';
import mutations from './mutations/index';
import actions from './actions/index';
Vue.use(Vuex) Vue.use(Vuex)
export default new Vuex.Store({ export default new Vuex.Store({
state,
getters,
mutations,
actions,
modules: { modules: {
common common,
socket
}, },
getters
}) })
// ES6 import
import store from '../';
import storejs from 'storejs';
import io from 'socket.io-client';
let socketTimer = null;
export default {
namespaced: true,
state: {
socketClient: null,
},
actions: {
initSocket ({ commit, rootState }, payload) {
console.log('-=-=-initSocket次数',)
const socket = io.connect(payload.url, {
query: {
loginUserNum: `diagnose_list_socket_${payload.userId}`,
reconnection: false
}
});
commit('SET_SOCKET', socket);
commit('SET_IOLISTION');
},
},
mutations: {
SET_SOCKET: (state, payload) => {
window.socketClient = payload;
state.socketClient = payload;
},
SET_IOLISTION: (state, payload) => {
if(!state.socketClient){
return false;
}
state.socketClient.on("connect", (socket) => {
console.log ('socket 链接成功',socket);
console.log ('socketTimer---',socketTimer);
if(socketTimer){
clearInterval(socketTimer);
}
});
state.socketClient.on("connect_error", (err) => {
console.log ('socket connect_error',err);
});
state.socketClient.on("disconnect", (socket) => {
console.log ('socket disconnect----',socket);
store.commit('socket/RECONNECT_SOCKET');
});
state.socketClient.on("diagnose_push_event", (socket) => {
console.log('diagnose_push_event---', socket);
const {list,allSize,countRespList} = socket;
console.log('--_VM', _VM.$route)
store.commit('updateCurrentDiagList', list);
store.commit('updateAllSize', allSize);
store.commit('updateCurrentCalList', countRespList);
});
state.socketClient.on("diagnose_call_push_event", (socket) => {
console.log('diagnose_call_push_event---', socket);
const l = store.state.noticeList;
if(l.length >=5){
l.shift();
}
l.push(socket);
const n = {notifyIndex: l.length, ...socket}
store.commit('updateNoticeList', l);
console.log('--_VM', _VM)
const {path} =_VM.$route;
console.log("n--------",n)
const operateUserId=store.state.soketQuest.operateUserId?store.state.soketQuest.operateUserId:''
if(path && String(path).indexOf('workbench') > -1&&n.operateUserId==operateUserId){
store.commit('socket/SET_NOTIFY', n);
}
});
state.socketClient.on('ping', function () {
console.log('[E] 心跳请求已发出 →', true, socketTimer);
if(socketTimer){
clearInterval(socketTimer);
}
});
//收到
state.socketClient.on('pong', function () {
console.log('[E] 心跳响应已收到 ←', true);
});
state.socketClient.io.on("reconnect_attempt", (socket) => {
console.log('--reconnect_attempt', socket);
// ...
});
state.socketClient.on("reconnect", (socket) => {
console.log('--reconnect', socket);
// ...
});
},
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}`
// userCallKfStatus 医助呼叫
// doctorCallKfStatus 医生呼叫
let name= payload.userCallKfStatus==1 ? payload.userName:payload.doctorName
const cn = _VM.$notify({
title: t,
message: h("p", [
h("i", {style: `color: teal;`}, `${name}正在呼叫你`),
h(
"el-button",
{
style: `float:right;margin-top:${30}px;`,
on: {
click: function () {
console.log('----state', state)
if(state.showChat){
_VM.$message({
message: '不可同时进入多个诊室,请先退出已进入的诊室,再试。',
type: "warning",
duration:1000
});
return false;
}
store.dispatch('gotoInquiry', payload);
cn.close();
},
},
},
"进入诊室"
),
]),
onClose: function () {
console.log('--onClose',payload )
},
duration: 5000,
position: 'top-right',
})
},
RECONNECT_SOCKET: (state, payload) => {
if(socketTimer){
console.log('RECONNECT_SOCKET--已经存在');
}else{
const i = storejs.get('initSocketInfo');
console.log('RECONNECT_SOCKET-- 重新链接', i);
socketTimer = setInterval(function (){
console.log('----initSocketInfo', i);
store.dispatch( 'socket/initSocket', i)
}, 2000);
}
}
},
};
import storejs from 'storejs';
export default {
updateCurrentDiagList(state, obj) {
state.currentDiagList = obj;
},
updateAllSize(state,allSize){
state.allSize = allSize;
},
// 改变原数据
changeRawCurrentCalList(state,obj){
// console.log("obj",obj)
let index = state.RawCurrentCalList.findIndex(val=>{
return val.status==obj.status
})
if(index>-1){
state.RawCurrentCalList[index]=obj
state.currentCalList[index].is_dot=false
}
},
clearRawCurrentCalList(state){
state.RawCurrentCalList=[]
},
updateCurrentCalList(state, obj) {
let NewData=obj
if(state.RawCurrentCalList.length==0){
state.RawCurrentCalList=obj
}
let RawData=state.RawCurrentCalList
for (let i = 0; i < NewData.length; i++) {
let is_dot = false;
if (RawData.length > 0) {
is_dot = NewData[i].count > RawData[i].count ? true: false;
}
NewData[i] = {
...NewData[i],
is_dot: is_dot,
};
}
state.currentCalList = NewData;
},
updateCurrentChat(state, obj) {
state.currentChat = obj;
},
updateCurrentAdvice(state, obj) {
state.currentAdvice = obj;
},
updateSoketQuest(state, obj) {
storejs.set('soketQuest',obj);
state.soketQuest = obj;
},
updateShowChat(state, obj) {
state.showChat = obj;
},
updateShowAdvice(state, obj) {
state.showAdvice = obj;
},
updateNoticeList(state, obj) {
state.noticeList = obj;
},
updateIsSuperAdmin(state, obj) {
state.isSuperAdmin = obj;
},
};
/* 内存数据状态 */
export default {
currentDiagList:[],
allSize:0,
currentCalList:{},
RawCurrentCalList:[],
currentChat: {},
currentAdvice: {},
soketQuest: {},
noticeList: [],
showChat:false,
showAdvice:false,
isSuperAdmin: {
isSuper:false,
userID: ''
}
};
...@@ -28,35 +28,35 @@ body, div, span, header, footer, nav, section, aside, article, ul, dl, dt, dd, l ...@@ -28,35 +28,35 @@ body, div, span, header, footer, nav, section, aside, article, ul, dl, dt, dd, l
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/ /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
// ::-webkit-scrollbar // ::-webkit-scrollbar
// { // {
// width: 0px; // width: 0px;
// height: 0px; // height: 0px;
// background-color: #fff;
// }
/*定义滚动条轨道 内阴影+圆角*/
// ::-webkit-scrollbar-track
// {
// -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
// border-radius: 10px;
// background-color: #fff; // background-color: #fff;
// } // }
/*定义滑块 内阴影+圆角*/ /*定义滚动条轨道 内阴影+圆角*/
// ::-webkit-scrollbar-thumb // ::-webkit-scrollbar-track
// { // {
// border-radius: 10px; // -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
// -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); // border-radius: 10px;
// background-color: #555; // background-color: #fff;
// } // }
/*定义滑块 内阴影+圆角*/
// ::-webkit-scrollbar-thumb
// {
// border-radius: 10px;
// -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
// background-color: #555;
// }
input[type="button"], input[type="submit"], input[type="search"], input[type="reset"] { input[type="button"], input[type="submit"], input[type="search"], input[type="reset"] {
-webkit-appearance: none; -webkit-appearance: none;
} }
textarea { -webkit-appearance: none;} textarea { -webkit-appearance: none;}
html,body{ html,body{
height: 100%; height: 100%;
...@@ -128,7 +128,7 @@ html,body{ ...@@ -128,7 +128,7 @@ html,body{
// width: 163vh !important; // width: 163vh !important;
// height: 66vh !important; // height: 66vh !important;
// height: 430px !important; // height: 430px !important;
margin: 20px 30px 0px; margin: 10px 10px 0px;
overflow: auto; overflow: auto;
} }
} }
...@@ -138,7 +138,7 @@ html,body{ ...@@ -138,7 +138,7 @@ html,body{
// height: 78vh !important; // height: 78vh !important;
// height: 800px !important; // height: 800px !important;
overflow: auto; overflow: auto;
margin: 20px 30px 0px; margin: 10px 10px 0px;
} }
} }
...@@ -167,14 +167,14 @@ html,body{ ...@@ -167,14 +167,14 @@ html,body{
background: #fafafa; background: #fafafa;
} }
//下拉框 //下拉框
.el-dropdown-menu .el-popper { .el-dropdown-menu .el-popper {
top: 48px; top: 48px;
} }
// 消息推送 // 消息推送
.el-notification.right { .el-notification.right {
top: 130px !important; //top: 130px !important;
} }
// 弹框按钮样式 // 弹框按钮样式
...@@ -266,4 +266,4 @@ html,body{ ...@@ -266,4 +266,4 @@ html,body{
.viewer-button.viewer-close { .viewer-button.viewer-close {
display: none; display: none;
} }
\ No newline at end of file
此差异已折叠。
...@@ -86,7 +86,7 @@ const vueFilter = { ...@@ -86,7 +86,7 @@ const vueFilter = {
}, },
dateFilter: (value) => { dateFilter: (value) => {
if (!value) return ''; if (!value) return '';
return new Date(value).format("yyyy-MM-dd hh:mm"); return new Date(value).format("yyyy-MM-dd");
}, },
moduleTypeFilter: (value, data) => { // 模块类型 moduleTypeFilter: (value, data) => { // 模块类型
for (let key in data) { for (let key in data) {
......
...@@ -54,7 +54,7 @@ class RtcClient { ...@@ -54,7 +54,7 @@ class RtcClient {
userId: this.userId_, userId: this.userId_,
mirror: true mirror: true
}); });
this.startRTC() // this.startRTC()
} catch (e) { } catch (e) {
console.error('加入房间失败 ' + e); console.error('加入房间失败 ' + e);
this.vueInstance.reloadfn() this.vueInstance.reloadfn()
...@@ -425,5 +425,4 @@ class RtcClient { ...@@ -425,5 +425,4 @@ class RtcClient {
} }
} }
export default RtcClient export default RtcClient
...@@ -5,7 +5,7 @@ export const containObject = function(...obj1) { ...@@ -5,7 +5,7 @@ export const containObject = function(...obj1) {
return obj return obj
} }
// 获取页面自适应高度 // 获取页面自适应高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'slidebar-container', export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'slidebar-container',
containerHeightId = 'screenSet'){ containerHeightId = 'screenSet'){
// let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15; // let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15;
let containerHeight = document.body.clientHeight - 80; let containerHeight = document.body.clientHeight - 80;
...@@ -800,7 +800,7 @@ export const betaHandle = (limit) => { ...@@ -800,7 +800,7 @@ export const betaHandle = (limit) => {
} }
//转换年月日方法 //转换年月日方法
export const timeHandle = (str) => { export const timeHandle = (str) => {
let date = new Date(str * 1); let date = new Date(str * 1);
let Y = date.getFullYear() + '-'; let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
...@@ -809,10 +809,48 @@ export const timeHandle = (str) => { ...@@ -809,10 +809,48 @@ export const timeHandle = (str) => {
let m = change(date.getMinutes()); let m = change(date.getMinutes());
return Y + M + D + h + m return Y + M + D + h + m
} }
//补0操作 //补0操作
const change = (num) => { const change = (num) => {
if(parseInt(num) < 10){ if(parseInt(num) < 10){
num = '0'+ num; num = '0'+ num;
} }
return num; return num;
} }
\ No newline at end of file // 拖拽
export const bindDragHeader = (classname,content) =>{
const dragDom = document.querySelector(classname);
const con = document.querySelector(content);
let translate,contranslate;
dragDom.onmousedown = (e) => {
const disX = e.clientX;
const disY = e.clientY;
translate = dragDom.style.transform.replace(/[^0-9\-,]/g,'').split(',');
contranslate = con.style.transform.replace(/[^0-9\-,]/g,'').split(',');
con.style.transition = "transform 100ms liner";
document.onmousemove = function (e) {
const l = e.clientX - disX;
const t = e.clientY - disY;
let x, y, tran;
if(contranslate.length> 1){
x= (l+ Number(contranslate[0])) + 'px';
y = (t + Number(contranslate[1])) + 'px';
}else{
x= (l) + 'px';
y = (t ) + 'px';
}
tran = `translate(${x},${y})`;
con.style.transform = tran;
};
document.onmouseup = function (e) {
document.onmousemove = null;
document.onmouseup = null;
};
}
}
<template>
<div class="administrators">
<!-- 头部 -->
<div class="header">
<!-- 面包屑 -->
<el-breadcrumb separator="/">
<el-breadcrumb-item>首页</el-breadcrumb-item>
<el-breadcrumb-item>我的工作台</el-breadcrumb-item>
</el-breadcrumb>
<el-row style="margin-top: 30px">
<el-col :span="12">
<div class="left">
<el-row type="flex" justify="space-between" :gutter="70">
<el-col :span="12">
<el-date-picker
style="margin-top: 10px"
v-model="workbenchAdminDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
>
</el-date-picker>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
</div>
<!-- 问诊列表 -->
<div class="consultation-container">
<div v-if="operatorslist" class="consultation-content">
<div
class="consultation-li"
v-for="(item, index) in operatorslist"
:key="index"
>
<consultationlist
:workbenchAdminDate="workbenchAdminDate"
:operatorsItem="item"
></consultationlist>
</div>
</div>
<div v-else class="nodata-container">
<img src="../../../assets/image/workbench/no_data_wz.png" alt="" />
<div class="nodata-title">暂无数据</div>
</div>
</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 {
workbenchAdminDate: d,
operatorslist: [],
};
},
created() {
this.init();
},
watch: {},
methods: {
init() {
this.GET("/diagnose/match/list").then(({ code, data }) => {
if (code == "000000") {
this.operatorslist = data;
}
});
},
},
};
</script>
<style lang="scss" scoped>
.administrators {
height: calc(100% - 76px);
.header {
padding: 30px;
width: 100%;
background: #ffffff;
.el-input__inner {
width: 173px;
height: 47px;
background: #ffffff;
border-radius: 7px;
border: 1px solid #d9d9d9;
}
}
.detailslist {
display: flex;
// flex-wrap: wrap;
flex-direction: column;
.details {
flex: 1;
width: 572px;
height: 164px;
background: #ffffff;
border-radius: 18px;
}
}
.total {
width: 62px;
height: 40px;
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #063948;
line-height: 40px;
margin: 0 auto;
}
.state {
width: 28px;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6a7990;
line-height: 20px;
margin: 0 auto;
}
.consultation-container {
overflow-y: scroll;
height: calc(100% - 154px);
width: 100%;
padding: 20px;
.consultation-content {
display: grid;
grid-template-columns: 33.3% 33.3% 33.3%;
grid-row-gap: 20px;
// grid-column-gap: 20px;
overflow: hidden;
.consultation-li {
width: 90%;
margin: 0 auto;
display: flex;
justify-content: center;
}
}
.nodata-container {
background-color: #fff;
padding: 0 20px;
border-radius: 18px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 470px;
.nodata {
width: 100%;
}
img {
width: 298px;
height: 140px;
}
.nodata-title {
font-size: 18px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6a7990;
margin-top: 50px;
}
}
}
.footer {
margin-top: 20px;
width: 100%;
height: 71px;
background: #ffffff;
border-radius: 18px;
padding-top: 20px;
}
}
.el-row {
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
}
.el-col {
border-radius: 4px;
}
.bg-purple-dark {
background: #99a9bf;
}
.bg-purple {
background: #d3dce6;
}
.bg-purple-light {
background: #e5e9f2;
}
.grid-content {
border-radius: 4px;
min-height: 36px;
}
.row-bg {
padding: 10px 0;
background-color: #f9fafc;
}
</style>
...@@ -271,6 +271,7 @@ export default { ...@@ -271,6 +271,7 @@ export default {
created() { created() {
_this = this; _this = this;
console.log(_this);
this.picakfAccId = getPicaKFAccid(); this.picakfAccId = getPicaKFAccid();
this.tid = this.$route.query.tid || ''; this.tid = this.$route.query.tid || '';
this.getFiveContentList(); this.getFiveContentList();
......
此差异已折叠。
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
// background-color: #242f42; // background-color: #242f42;
.logo { .logo {
float: left; float: left;
width: 255px; width: 215px;
text-align: center; text-align: center;
color: #fff; color: #fff;
background: #0b2f3f; background: #0b2f3f;
......
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册