提交 c74fc505 编写于 作者: lyf's avatar lyf

fix

上级 dfae20ac
...@@ -18,6 +18,7 @@ module.exports = { ...@@ -18,6 +18,7 @@ module.exports = {
//it is base on https://github.com/vuejs/eslint-config-vue //it is base on https://github.com/vuejs/eslint-config-vue
rules: { rules: {
'no-console': 0, 'no-console': 0,
'no-debugger': 0,
'comma-spacing': [2, { // 控制逗号前面没有空格,后面必须有空格 'comma-spacing': [2, { // 控制逗号前面没有空格,后面必须有空格
'before': false, 'before': false,
'after': true 'after': true
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
<script src="<%= VUE_APP_OSS_URL %>static/js/vuex-3.4.0.js"></script> <script src="<%= VUE_APP_OSS_URL %>static/js/vuex-3.4.0.js"></script>
<script src="<%= VUE_APP_OSS_URL %>static/js/vue-router-3.3.2.js"></script> <script src="<%= VUE_APP_OSS_URL %>static/js/vue-router-3.3.2.js"></script>
<script src="<%= VUE_APP_OSS_URL %>static/js/axios-0.19.0.js"></script> <script src="<%= VUE_APP_OSS_URL %>static/js/axios-0.19.0.js"></script>
<script src="<%= VUE_APP_OSS_URL %>static/js/element-ui@2.6.1.js"></script>
<script src="<%= VUE_APP_OSS_URL %>static/js/jsencrypt.min-3.0.0.js"></script> <script src="<%= VUE_APP_OSS_URL %>static/js/jsencrypt.min-3.0.0.js"></script>
<script src="<%= VUE_APP_OSS_URL %>static/js/crypto.min-4.0.0.js"></script> <script src="<%= VUE_APP_OSS_URL %>static/js/crypto.min-4.0.0.js"></script>
<script src="<%= VUE_APP_OSS_URL %>static/js/vconsole-3.3.4.js"></script> <script src="<%= VUE_APP_OSS_URL %>static/js/vconsole-3.3.4.js"></script>
......
import request from 'mn-template/plugins/http'; import request from 'mn-template/plugins/http';
// diagnosis-editor // diagnosis-editor
export const getAdminDiagnose = async(data) => { export const getAdminDiagnose = async (data) => {
return request({ return request({
url: `/diagnose/admin/diagnose/${data.id}`, url: `/diagnose/admin/diagnose/${data.id}`,
method: 'get', method: 'get',
}); });
}; };
export const getDoctorList = async(data) => { export const getDoctorList = async (data) => {
return request({ return request({
url: '/diagnose/doctorService/doctorList', url: '/diagnose/doctorService/doctorList',
params: data, params: data,
method: 'get', method: 'get',
}); });
}; };
export const getDiagnoseLog = async(data) => { export const getDiagnoseLog = async (data) => {
return request({ return request({
url: `/diagnose/admin/diagnose/log/${data.id}`, url: `/diagnose/admin/diagnose/log/${data.id}`,
method: 'get', method: 'get',
}); });
}; };
export const diagnoseUpdate = async(data) => { export const diagnoseUpdate = async (data) => {
return request({ return request({
url: '/diagnose/admin/diagnose/update', url: '/diagnose/admin/diagnose/update',
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
// diagnosis-im // diagnosis-im
export const getQueryTemplate = async() => { export const getQueryTemplate = async () => {
return request({ return request({
url: '/contents/admin/template/queryTemplate?publishFlag=5&pageNo=1&pageSize=99999', url: '/contents/admin/template/queryTemplate?publishFlag=5&pageNo=1&pageSize=99999',
method: 'get', method: 'get',
}); });
}; };
export const getMemberList = async(data) => { export const getMemberList = async (data) => {
return request({ return request({
url: '/im/team/member/list', url: '/im/team/member/list',
params: data, params: data,
method: 'get', method: 'get',
}); });
}; };
export const messageForward = async(data) => { export const messageForward = async (data) => {
return request({ return request({
url: '/im/team/message/forward', url: '/im/team/message/forward',
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
export const messageHistory = async(data) => { export const messageHistory = async (data) => {
return request({ return request({
url: '/im/team/message/history', url: '/im/team/message/history',
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
export const messageSend = async(data) => { export const messageSend = async (data) => {
return request({ return request({
url: '/im/team/op/message/send', url: '/im/team/op/message/send',
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
// diagnosis-list-new // diagnosis-list-new
export const getCountQuery = async() => { export const getCountQuery = async () => {
return request({ return request({
url: '/diagnose/admin/diagnose/countQuery', url: '/diagnose/admin/diagnose/countQuery',
method: 'get', method: 'get',
}); });
}; };
export const getDepartments = async() => { export const getDepartments = async () => {
return request({ return request({
url: '/hospital/departments/0', url: '/hospital/departments/0',
method: 'get', method: 'get',
}); });
}; };
export const diagnoseExport = async(data) => { export const diagnoseExport = async (data) => {
return request({ return request({
url: '/diagnose/admin/diagnose/export', url: '/diagnose/admin/diagnose/export',
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
export const diagnoseList = async(data) => { export const diagnoseList = async (data) => {
return request({ return request({
url: '/diagnose/admin/diagnose/list', url: '/diagnose/admin/diagnose/list',
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
// diagnosis-list // diagnosis-list
export const diagnoseAppointTime = async(data) => { export const diagnoseAppointTime = async (data) => {
return request({ return request({
url: '/diagnose/admin/diagnose/appointTime', url: '/diagnose/admin/diagnose/appointTime',
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
export const diagnoseEnd = async(data) => { export const diagnoseEnd = async (data) => {
return request({ return request({
url: `/diagnose/admin/diagnose/end/${data.diagnoseLogId}`, url: `/diagnose/admin/diagnose/end/${data.diagnoseLogId}`,
method: 'post', method: 'post',
}); });
}; };
export const diagnoseCall = async(data) => { export const diagnoseCall = async (data) => {
return request({ return request({
url: `/diagnose/admin/diagnose/call/${data.diagnoseLogId}`, url: `/diagnose/admin/diagnose/call/${data.diagnoseLogId}`,
method: 'post', method: 'post',
}); });
}; };
export const diagnoseChoose = async(data) => { export const diagnoseChoose = async (data) => {
return request({ return request({
url: `/diagnose/admin/diagnose/choose/${data.diagnoseLogId}`, url: `/diagnose/admin/diagnose/choose/${data.diagnoseLogId}`,
method: 'post', method: 'post',
}); });
}; };
export const diagnoseCancel = async(data) => { export const diagnoseCancel = async (data) => {
return request({ return request({
url: `/diagnose/admin/diagnose/cancel/${data.diagnoseLogId}`, url: `/diagnose/admin/diagnose/cancel/${data.diagnoseLogId}`,
method: 'post', method: 'post',
}); });
}; };
// diagnosis-live // diagnosis-live
export const teamDetail = async(data) => { export const teamDetail = async (data) => {
return request({ return request({
url: '/im/team/detail', url: '/im/team/detail',
params: data, params: data,
method: 'get', method: 'get',
}); });
}; };
export const getSdkappid = async() => { export const getSdkappid = async () => {
return request({ return request({
url: '/coupler/app/trtc/sdkappid', url: '/coupler/app/trtc/sdkappid',
method: 'get', method: 'get',
}); });
}; };
export const streamParams = async() => { export const streamParams = async () => {
return request({ return request({
url: '/coupler/app/config/push/stream/params', url: '/coupler/app/config/push/stream/params',
method: 'get', method: 'get',
}); });
}; };
export const callDirect = async(data) => { export const callDirect = async (data) => {
return request({ return request({
url: '/im/team/call/direct/', url: '/im/team/call/direct/',
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
export const usersigTrtc = async(data) => { export const usersigTrtc = async (data) => {
return request({ return request({
url: '/coupler/usersig/trtc', url: '/coupler/usersig/trtc',
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
export const diagnoseEndCall = async(data) => { export const diagnoseEndCall = async (data) => {
return request({ return request({
url: `/diagnose/admin/diagnose/endCall/${data.diagnoseLogId}`, url: `/diagnose/admin/diagnose/endCall/${data.diagnoseLogId}`,
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
export const doctorAdviceCreate = async(data) => { export const doctorAdviceCreate = async (data) => {
return request({ return request({
url: '/diagnose/admin/diagnose/doctorAdvice/create', url: '/diagnose/admin/diagnose/doctorAdvice/create',
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
export const doctorAdviceList = async(data) => { export const doctorAdviceList = async (data) => {
return request({ return request({
url: `/diagnose/admin/diagnose/doctorAdvice/list/${data.diagnoseLogId}`, url: `/diagnose/admin/diagnose/doctorAdvice/list/${data.diagnoseLogId}`,
method: 'get', method: 'get',
}); });
}; };
export const operatorQuery = async() => { export const operatorQuery = async () => {
return request({ return request({
url: '/diagnose/admin/diagnose/operator/query', url: '/diagnose/admin/diagnose/operator/query',
method: 'get', method: 'get',
}); });
}; };
export const teamDetailV2 = async(data) => { export const teamDetailV2 = async (data) => {
return request({ return request({
url: '/im/team/detail/v2', url: '/im/team/detail/v2',
params: data, params: data,
method: 'get', method: 'get',
}); });
}; };
export const stickerSave = async(data) => { export const stickerSave = async (data) => {
return request({ return request({
url: '/im/sticker/save', url: '/im/sticker/save',
post: data, post: data,
method: 'post', method: 'post',
}); });
}; };
export const getStickerList = async() => { export const getStickerList = async () => {
return request({ return request({
url: '/im/sticker/list', url: '/im/sticker/list',
method: 'get', method: 'get',
}); });
}; };
export const stickerInfo = async(data) => { export const stickerInfo = async (data) => {
return request({ return request({
url: '/im/sticker/info', url: '/im/sticker/info',
params: data, params: data,
method: 'get', method: 'get',
}); });
}; };
export const searchContent = async(data) => { export const searchContent = async (data) => {
return request({ return request({
url: 'contents/searchKeyword/searchContent', url: 'contents/searchKeyword/searchContent',
params: data, params: data,
method: 'get', method: 'get',
}); });
}; };
export const opAck = async(data) => { export const opAck = async (data) => {
return request({ return request({
url: '/im/team/call/op/ack/', url: '/im/team/call/op/ack/',
params: data, data: data,
method: 'post', method: 'post',
}); });
}; };
\ No newline at end of file
...@@ -13,13 +13,10 @@ ...@@ -13,13 +13,10 @@
v-loadmore="getOldMSGHistory" v-loadmore="getOldMSGHistory"
class="center BSListWraper" class="center BSListWraper"
> >
<section <section class="c-header">
class="c-header"
>
<div class="header-line"> <div class="header-line">
<div class="c-header-l"> <div class="c-header-l">
<span class="num">{{ <span class="num">{{ currentChat.diagnoseLogId }}</span>
currentChat.diagnoseLogId }}</span>
<span class="dep">&nbsp;{{ currentChat.department }}</span> <span class="dep">&nbsp;{{ currentChat.department }}</span>
</div> </div>
<div class="c-header-edit"> <div class="c-header-edit">
...@@ -175,7 +172,7 @@ ...@@ -175,7 +172,7 @@
<div class="dia-text"> <div class="dia-text">
<span class="label">患者:</span> <span class="label">患者:</span>
<span>{{ item.text.patientName }} <span>{{ item.text.patientName }}
{{ item.text.sex == 1 ? "男" : "女" }} {{ item.text.sex == 1 ? '男' : '女' }}
{{ item.text.age }}</span> {{ item.text.age }}</span>
</div> </div>
<div class="dia-text"> <div class="dia-text">
...@@ -387,7 +384,8 @@ ...@@ -387,7 +384,8 @@
diagnoseEndCall, diagnoseEndCall,
} from '@/api/diagnosis'; } from '@/api/diagnosis';
import { mapState } from 'vuex'; import { createNamespacedHelpers } from 'vuex';
const { mapState } = createNamespacedHelpers('main');
const CONTAINER_HEIGHT = 700; const CONTAINER_HEIGHT = 700;
let forwardMsgIntervalId = null, let forwardMsgIntervalId = null,
continueIntervalId = null, continueIntervalId = null,
...@@ -417,7 +415,7 @@ ...@@ -417,7 +415,7 @@
waitingTaskCount: 0, waitingTaskCount: 0,
}, },
currentContinueTimes: 0, currentContinueTimes: 0,
currentSessionIndex: 0, currentSessionIndex: 0,
currentSession: {}, currentSession: {},
currentTaskLogId: '', currentTaskLogId: '',
picakfAccId: '', picakfAccId: '',
...@@ -453,7 +451,7 @@ ...@@ -453,7 +451,7 @@
}, },
computed: { computed: {
...mapState({ ...mapState({
currentChat: (state) => state.assign.main.currentChat, currentChat: (state) => state.currentChat,
}), }),
canSend() { canSend() {
return !!this.sendText; return !!this.sendText;
...@@ -980,6 +978,7 @@ ...@@ -980,6 +978,7 @@
// 发送文本消息 // 发送文本消息
sendTextMsg() { sendTextMsg() {
if (!this.canSend) return; if (!this.canSend) return;
debugger;
this.sendCommonMsg({ info: this.sendText }); this.sendCommonMsg({ info: this.sendText });
this.sendText = ''; this.sendText = '';
}, },
...@@ -1050,8 +1049,10 @@ ...@@ -1050,8 +1049,10 @@
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId); forwardMsgIntervalId && clearInterval(forwardMsgIntervalId);
const sendId = new Date().getTime(); const sendId = new Date().getTime();
this.handleSendMsg(params, sendId); this.handleSendMsg(params, sendId);
console.log('params---', params);
await messageSend(params) await messageSend(params)
.then((res) => { .then((res) => {
console.log('res------------', res);
if (res.code === '000000') { if (res.code === '000000') {
// 校验结果:1校验通过 2校验不通过 // 校验结果:1校验通过 2校验不通过
let msg = this.messageList[this.messageList.length - 1]; let msg = this.messageList[this.messageList.length - 1];
...@@ -1082,7 +1083,7 @@ ...@@ -1082,7 +1083,7 @@
} }
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log('error-----------------', error);
let msg = this.messageList[this.messageList.length - 1]; let msg = this.messageList[this.messageList.length - 1];
if (msg.sendId !== sendId) { if (msg.sendId !== sendId) {
msg = this.getMsgBySendId(sendId); msg = this.getMsgBySendId(sendId);
...@@ -1122,8 +1123,8 @@ ...@@ -1122,8 +1123,8 @@
window.rtc.leave(); window.rtc.leave();
} }
this.clearSession(); this.clearSession();
this.$store.commit('updateShowChat', false); this.$store.commit('main/updateShowChat', false);
this.$store.commit('updateCurrentChat', {}); this.$store.commit('main/updateCurrentChat', {});
}, },
clearSession() { clearSession() {
...@@ -1193,5 +1194,5 @@ ...@@ -1193,5 +1194,5 @@
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./chat.scss"; @import './chat.scss';
</style> </style>
<template> <template>
<div class="livebox"> <div class="livebox">
<div class="top"> <div class="top">
<div <div class="top-left">
class="top-left"
>
<div class="time-message"> <div class="time-message">
<p class="msg-img"> <p class="msg-img">
<img :src="currentChat.diagnoseType == 2 ? im_text : im_video"> <img :src="currentChat.diagnoseType == 2 ? im_text : im_video">
...@@ -116,7 +114,8 @@ ...@@ -116,7 +114,8 @@
import { closeLoading } from '@/utils/utils'; import { closeLoading } from '@/utils/utils';
import alert from '@/components/common/alert.vue'; import alert from '@/components/common/alert.vue';
import { mapState } from 'vuex'; import { createNamespacedHelpers } from 'vuex';
const { mapState } = createNamespacedHelpers('main');
import { import {
teamDetailV2, teamDetailV2,
getSdkappid, getSdkappid,
...@@ -179,7 +178,7 @@ ...@@ -179,7 +178,7 @@
}, },
computed: { computed: {
...mapState({ ...mapState({
currentChat: (state) => state.assign.main.currentChat, currentChat: (state) => state.currentChat,
}), }),
diagnoseType() { diagnoseType() {
switch (this.currentChat.diagnoseType) { switch (this.currentChat.diagnoseType) {
...@@ -204,8 +203,7 @@ ...@@ -204,8 +203,7 @@
} }
}, },
}, },
created() { created() {},
},
beforeDestroy() { beforeDestroy() {
this.clearTime(); this.clearTime();
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
> >
<div class="list"> <div class="list">
<div class="name"> <div class="name">
{{ operatorsItem.name || "" }} {{ operatorsItem.name || '' }}
</div> </div>
<div class="details"> <div class="details">
<!-- <div class="handle">待处理: <span> 暂无</span></div> --> <!-- <div class="handle">待处理: <span> 暂无</span></div> -->
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
props: { props: {
operatorsItem: { operatorsItem: {
type: Object, type: Object,
default: {}, default: () => {
return {};
},
}, },
workbenchAdminDate: { workbenchAdminDate: {
type: String, type: String,
...@@ -48,10 +50,10 @@ ...@@ -48,10 +50,10 @@
pageSize: 6, pageSize: 6,
returnStatus: 1, returnStatus: 1,
}; };
this.$store.commit('clearRawCurrentCalList'); this.$store.commit('main/clearRawCurrentCalList');
conditionUpdate(p).then((res) => { conditionUpdate(p).then((res) => {
if (res.code == '000000') { if (res.code == '000000') {
this.$store.commit('updateSoketQuest', p); this.$store.commit('main/updateSoketQuest', p);
this.$router.push({ path: '/workbench' }); this.$router.push({ path: '/workbench' });
} else { } else {
this.$message({ this.$message({
......
...@@ -65,9 +65,7 @@ ...@@ -65,9 +65,7 @@
:href="itemvod.url" :href="itemvod.url"
target="_blank" target="_blank"
> >
{{ {{ itemvod.name }}
itemvod.name
}}
</el-link> </el-link>
</div> </div>
</div> </div>
...@@ -99,14 +97,50 @@ ...@@ -99,14 +97,50 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex';
import uploadMusic from '@/components/editor/upload-music'; import uploadMusic from '@/components/editor/upload-music';
import { doctorAdviceCreate } from '@/api/diagnosis'; import { doctorAdviceCreate } from '@/api/diagnosis';
import { createNamespacedHelpers } from 'vuex';
const { mapState } = createNamespacedHelpers('main');
export default { export default {
components: { components: {
uploadMusic, uploadMusic,
}, },
directives: {
drag: {
// 指令的定义
bind: function (el) {
const odiv = el; // 获取当前元素
el.onmousedown = (e) => {
// 算出鼠标相对元素的位置
const disX = e.clientX - odiv.offsetLeft;
const 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 = () => {
document.onmousemove = null;
document.onmouseup = null;
};
};
},
},
stopdrag: {
inserted: function (el) {
const element = el;
element.onmousedown = function (e) {
e.stopPropagation();
};
},
},
},
props: { props: {
showAdvice: { showAdvice: {
type: Boolean, type: Boolean,
...@@ -116,9 +150,27 @@ ...@@ -116,9 +150,27 @@
data() { data() {
return { return {
diagnoseAdvice: '', diagnoseAdvice: '',
}; };
}, },
computed: {
...mapState({
currentAdvice: (state) => state.currentAdvice,
}),
musicList() {
const i =
this.currentAdvice && this.currentAdvice.illnessAudioUrls
? this.currentAdvice.illnessAudioUrls
: [];
const ni = [];
i.map((item) => {
if (item) {
const n = { url: item };
ni.push(n);
}
});
return ni;
},
},
watch: { watch: {
showAdvice(newVal, oldVal) { showAdvice(newVal, oldVal) {
if (newVal !== oldVal && newVal) { if (newVal !== oldVal && newVal) {
...@@ -134,22 +186,6 @@ ...@@ -134,22 +186,6 @@
}, },
created() {}, created() {},
mounted() {}, mounted() {},
computed: {
...mapState({
currentAdvice: (state) => state.assign.main.currentAdvice,
}),
musicList() {
const i = this.currentAdvice && this.currentAdvice.illnessAudioUrls ? this.currentAdvice.illnessAudioUrls : [];
const ni = [];
i.map((item) => {
if(item) {
const n = {url: item};
ni.push(n);
}
});
return ni;
}
},
methods: { methods: {
SaveAdvice() { SaveAdvice() {
if (String(this.diagnoseAdvice).trim() === '') { if (String(this.diagnoseAdvice).trim() === '') {
...@@ -184,43 +220,7 @@ ...@@ -184,43 +220,7 @@
}, },
closeadvice() { closeadvice() {
this.diagnoseAdvice = ''; this.diagnoseAdvice = '';
this.$store.commit('updateShowAdvice', false); this.$store.commit('main/updateShowAdvice', false);
},
},
directives: {
drag: {
// 指令的定义
bind: function (el) {
const odiv = el; // 获取当前元素
el.onmousedown = (e) => {
// 算出鼠标相对元素的位置
const disX = e.clientX - odiv.offsetLeft;
const 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) {
const element = el;
element.onmousedown = function (e) {
e.stopPropagation();
};
},
}, },
}, },
}; };
......
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
<i <i
class="talk-icon" class="talk-icon"
:class="diagnoseTypeIcon" :class="diagnoseTypeIcon"
/><span>{{ diagnoseType }}</span> /><span>{{
diagnoseType
}}</span>
</div> </div>
<div class="time"> <div class="time">
<i class="appointment" /><span>{{ appointBeginTime }}</span>-<span>{{ appointEndTime }}</span> <i class="appointment" /><span>{{ appointBeginTime }}</span>-<span>{{ appointEndTime }}</span>
...@@ -34,7 +36,7 @@ ...@@ -34,7 +36,7 @@
<div class="inquiry-user-img"> <div class="inquiry-user-img">
<div <div
v-if=" v-if="
(diagnoseTypeIcon== 'voice') && diagnoseTypeIcon == 'voice' &&
(item.returnStatus == 1 || item.returnStatus == 3) && (item.returnStatus == 1 || item.returnStatus == 3) &&
doctorTrtcEntryStatus != 1 doctorTrtcEntryStatus != 1
" "
...@@ -80,10 +82,7 @@ ...@@ -80,10 +82,7 @@
</div> </div>
<div <div
v-if=" v-if="diagnoseTypeIcon == 'voice' && doctorTrtcEntryStatus == 2"
diagnoseTypeIcon== 'voice' &&
doctorTrtcEntryStatus == 2
"
class="call-status" class="call-status"
> >
<img <img
...@@ -98,7 +97,9 @@ ...@@ -98,7 +97,9 @@
class="line-btn" class="line-btn"
@click="openChat" @click="openChat"
> >
<span v-if="userCallKfStatus == 1||doctorCallKfStatus==1">正在呼叫医助,进入诊室</span> <span
v-if="userCallKfStatus == 1 || doctorCallKfStatus == 1"
>正在呼叫医助,进入诊室</span>
<span v-else>进入诊室</span> <span v-else>进入诊室</span>
</div> </div>
</div> </div>
...@@ -108,9 +109,10 @@ ...@@ -108,9 +109,10 @@
<div class="inquiry-user-img"> <div class="inquiry-user-img">
<div <div
v-if=" v-if="
diagnoseTypeIcon== 'voice' && diagnoseTypeIcon == 'voice' &&
(item.returnStatus == 1 || item.returnStatus == 3) && (item.returnStatus == 1 || item.returnStatus == 3) &&
userTrtcEntryStatus != 1" userTrtcEntryStatus != 1
"
class="offline" class="offline"
> >
<img <img
...@@ -153,7 +155,7 @@ ...@@ -153,7 +155,7 @@
</div> </div>
<div <div
v-if="diagnoseTypeIcon== 'voice' && userTrtcEntryStatus == 2" v-if="diagnoseTypeIcon == 'voice' && userTrtcEntryStatus == 2"
class="call-status" class="call-status"
> >
<img <img
...@@ -183,14 +185,16 @@ ...@@ -183,14 +185,16 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex';
import { teamDetail, callDirect, doctorAdviceList } from '@/api/diagnosis'; import { teamDetail, callDirect, doctorAdviceList } from '@/api/diagnosis';
import { createNamespacedHelpers } from 'vuex';
const { mapState } = createNamespacedHelpers('main');
export default { export default {
props: { props: {
item: { item: {
type: Object, type: Object,
default: {}, default: () => {
return {};
},
}, },
}, },
data() { data() {
...@@ -207,37 +211,10 @@ ...@@ -207,37 +211,10 @@
accId: '', accId: '',
}; };
}, },
watch: {
item(newVal, oldVal) {
if(newVal !== oldVal) {
if(newVal.doctorTrtcEntryStatus == 2) {
this.isDoctorChat = false;
}
if(newVal.userTrtcEntryStatus == 2) {
this.isUserChat = false;
}
}
}
},
created() {},
mounted() {
console.log('this.item', this.item);
if (this.item.returnStatus == 1 || this.item.returnStatus == 3) {
const nowData = new Date().getTime();
const timeleft = this.item.appointBeginTime - nowData;
if (timeleft < 120000 && nowData < this.item.appointEndTime) {
clearInterval(this.timer);
this.down();
} else {
this.isCall = true;
}
}
},
computed: { computed: {
...mapState({ ...mapState({
showChat: (state) => state.assign.main.showChat, showChat: (state) => state.showChat,
showAdvice: (state) => state.assign.main.showAdvice, showAdvice: (state) => state.showAdvice,
}), }),
diagnoseType() { diagnoseType() {
switch (this.item.diagnoseType) { switch (this.item.diagnoseType) {
...@@ -325,6 +302,34 @@ ...@@ -325,6 +302,34 @@
return new Date().getTime() - this.item.appointBeginTime; return new Date().getTime() - this.item.appointBeginTime;
}, },
}, },
watch: {
item(newVal, oldVal) {
if (newVal !== oldVal) {
if (newVal.doctorTrtcEntryStatus == 2) {
this.isDoctorChat = false;
}
if (newVal.userTrtcEntryStatus == 2) {
this.isUserChat = false;
}
}
},
},
created() {},
mounted() {
console.log('this.item', this.item);
if (this.item.returnStatus == 1 || this.item.returnStatus == 3) {
const nowData = new Date().getTime();
const timeleft = this.item.appointBeginTime - nowData;
if (timeleft < 120000 && nowData < this.item.appointEndTime) {
clearInterval(this.timer);
this.down();
} else {
this.isCall = true;
}
}
},
methods: { methods: {
formatDateData(time) { formatDateData(time) {
const now_data = new Date().getTime(); const now_data = new Date().getTime();
...@@ -362,7 +367,7 @@ ...@@ -362,7 +367,7 @@
}, },
getInfo(id) { getInfo(id) {
return teamDetail({ return teamDetail({
tid:this.item.imTeamId tid: this.item.imTeamId,
}) })
.then((res) => { .then((res) => {
if (res.code == '000000') { if (res.code == '000000') {
...@@ -418,8 +423,7 @@ ...@@ -418,8 +423,7 @@
return false; return false;
} }
const i = this.item; const i = this.item;
// this.$store.commit("updateCurrentChat", i); this.$store.dispatch('main/gotoInquiry', i);
this.$store.dispatch('gotoInquiry', i);
}, },
openAdvice() { openAdvice() {
if (this.showAdvice) { if (this.showAdvice) {
...@@ -432,13 +436,13 @@ ...@@ -432,13 +436,13 @@
} }
// const i = 11; // const i = 11;
doctorAdviceList({ doctorAdviceList({
diagnoseLogId: this.item.diagnoseLogId diagnoseLogId: this.item.diagnoseLogId,
}) })
.then((res) => { .then((res) => {
if (res.code == '000000') { if (res.code == '000000') {
console.log(res.data); console.log(res.data);
this.$store.commit('updateShowAdvice', true); this.$store.commit('main/updateShowAdvice', true);
this.$store.commit('updateCurrentAdvice', res.data); this.$store.commit('main/updateCurrentAdvice', res.data);
} else { } else {
this.$message({ this.$message({
message: res.message, message: res.message,
...@@ -588,7 +592,7 @@ ...@@ -588,7 +592,7 @@
width: 45px; width: 45px;
height: 46px; height: 46px;
img { img {
cursor: pointer; cursor: pointer;
width: 45px; width: 45px;
height: 46px; height: 46px;
} }
...@@ -669,7 +673,7 @@ ...@@ -669,7 +673,7 @@
width: 12px; width: 12px;
height: 12px; height: 12px;
display: inline-block; display: inline-block;
background: url("../../assets/image/workbench/appointment.png") no-repeat; background: url('../../assets/image/workbench/appointment.png') no-repeat;
background-size: cover; background-size: cover;
margin-right: 5px; margin-right: 5px;
} }
...@@ -677,21 +681,21 @@ ...@@ -677,21 +681,21 @@
width: 12px; width: 12px;
height: 12px; height: 12px;
display: inline-block; display: inline-block;
background: url("../../assets/image/workbench/video.png") no-repeat; background: url('../../assets/image/workbench/video.png') no-repeat;
background-size: cover; background-size: cover;
} }
.photo { .photo {
width: 12px; width: 12px;
height: 12px; height: 12px;
display: inline-block; display: inline-block;
background: url("../../assets/image/workbench/photo.png") no-repeat; background: url('../../assets/image/workbench/photo.png') no-repeat;
background-size: cover; background-size: cover;
} }
.voice { .voice {
width: 12px; width: 12px;
height: 12px; height: 12px;
display: inline-block; display: inline-block;
background: url("../../assets/image/workbench/voice.png") no-repeat; background: url('../../assets/image/workbench/voice.png') no-repeat;
background-size: cover; background-size: cover;
} }
} }
......
...@@ -2,15 +2,13 @@ import $http from 'mn-template/plugins/http'; ...@@ -2,15 +2,13 @@ import $http from 'mn-template/plugins/http';
// 设置axios默认属性 // 设置axios默认属性
$http.setDefaults({ $http.setDefaults({
headers: {} headers: {},
}); });
// 设置http配置信息 loading、error、clear、encrypt、mockUserInfo // 设置http配置信息 loading、error、clear、encrypt、mockUserInfo
// $http.setOptions({ $http.setOptions({
// loading () { loading() {},
// console.log('我重写了默认的loading'); });
// }
// });
// 新增前置钩子 // 新增前置钩子
// $http.addBeforeHook(config => console.log('我是新增的前置钩子', config), 0); // $http.addBeforeHook(config => console.log('我是新增的前置钩子', config), 0);
......
const common = {
namespaced: true,
state: {
_token: '',
isFromAssignTask: false,
time: null,
},
getters: {
_token: (state) => state.common._token,
isFromAssignTask: (state) => state.common.isFromAssignTask,
time: (state) => state.common.time,
},
mutations: {
CHANGE_TOKEN: (state, data) => {
state._token = data;
},
SET_IS_FROM_ASSIGN_TASK: (state, status) => {
state.isFromAssignTask = status;
},
SET_TIME(state, data) {
state.time = data;
},
},
actions: {
changeToken({ commit }, tokenData) {
commit('CHANGE_TOKEN', tokenData);
},
changeTime({ commit }, tokenData) {
commit('SET_TIME', tokenData);
},
},
};
export default common;
const common = {
namespaced:true,
state: {
_token: '',
isFromAssignTask: false,
time:null,
},
getters: {
_token: state => state.common._token,
isFromAssignTask: state => state.common.isFromAssignTask,
time:state => state.common.time,
},
mutations: {
CHANGE_TOKEN: (state, data) => {
state._token = data;
},
SET_IS_FROM_ASSIGN_TASK: (state, status) => {
state.isFromAssignTask = status;
},
SET_TIME(state, data) {
state.time = data;
}
},
actions: {
changeToken({ commit }, tokenData) {
commit('CHANGE_TOKEN', tokenData);
},
changeTime({ commit }, tokenData) {
commit('SET_TIME', tokenData);
},
}
};
export default common;
import common from './common';
import main from './main';
import socket from './socket';
export default {
common,
main,
socket
};
\ No newline at end of file
...@@ -27,12 +27,12 @@ const socket = { ...@@ -27,12 +27,12 @@ const socket = {
}); });
socketClient.on('diagnose_push_event', (socket) => { socketClient.on('diagnose_push_event', (socket) => {
const { list, allSize, countRespList } = socket; const { list, allSize, countRespList } = socket;
console.log('sdjfhsdjkfhsajkdfhasjkdfhasjk------------') console.log('sdjfhsdjkfhsajkdfhasjkdfhasjk------------');
context.commit('main/updateCurrentCalList', countRespList,{root:true}); context.commit('main/updateCurrentCalList', countRespList, {
context.commit('updateCurrentDiagList', list); root: true,
context.commit('updateAllSize', allSize); });
context.commit('main/updateCurrentDiagList', list, { root: true });
// context.commit('updateCurrentCalList', countRespList); context.commit('main/updateAllSize', allSize, { root: true });
}); });
socketClient.on('diagnose_call_push_event', (socket) => { socketClient.on('diagnose_call_push_event', (socket) => {
console.log('diagnose_call_push_event---', socket); console.log('diagnose_call_push_event---', socket);
...@@ -42,7 +42,7 @@ const socket = { ...@@ -42,7 +42,7 @@ const socket = {
} }
l.push(socket); l.push(socket);
const n = { notifyIndex: l.length, ...socket }; const n = { notifyIndex: l.length, ...socket };
context.commit('updateNoticeList', l); context.commit('main/updateNoticeList', l, { root: true });
console.log('n--------', n); console.log('n--------', n);
const { path } = window._VM.$route; const { path } = window._VM.$route;
const operateUserId = context.state.soketQuest.operateUserId const operateUserId = context.state.soketQuest.operateUserId
...@@ -53,7 +53,7 @@ const socket = { ...@@ -53,7 +53,7 @@ const socket = {
String(path).indexOf('workbench') > -1 && String(path).indexOf('workbench') > -1 &&
n.operateUserId == operateUserId n.operateUserId == operateUserId
) { ) {
context.commit('socket/SET_NOTIFY', context, n); context.commit('socket/SET_NOTIFY', context, n, { root: true });
} }
}); });
socketClient.on('ping', function () { socketClient.on('ping', function () {
......
...@@ -84,7 +84,8 @@ ...@@ -84,7 +84,8 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex'; import { createNamespacedHelpers } from 'vuex';
const { mapState } = createNamespacedHelpers('main');
import storejs from 'storejs'; import storejs from 'storejs';
import InquiryListComponent from '../../../components/common/inquirylist.vue'; import InquiryListComponent from '../../../components/common/inquirylist.vue';
import { conditionUpdate } from '@/api/workbench'; import { conditionUpdate } from '@/api/workbench';
...@@ -93,15 +94,20 @@ ...@@ -93,15 +94,20 @@
InquiryListComponent, InquiryListComponent,
}, },
data() { data() {
const s = storejs.get('soketQuest');
const t = s ? s.returnStatus : 1;
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd');
const id =
s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID;
return { return {
tabPosition: '', tabPosition: t,
showChat: true, showChat: true,
totalRows: 0, totalRows: 0,
loading: false, loading: false,
searchParam: { searchParam: {
dateTime: '', dateTime: d,
checkvalue: '', // 模拟值后去 checkvalue: '', // 模拟值后去
operateUserId: '', operateUserId: id,
returnStatus: 1, returnStatus: 1,
pageSize: 6, pageSize: 6,
pageNo: 1, pageNo: 1,
...@@ -138,11 +144,11 @@ ...@@ -138,11 +144,11 @@
}, },
computed: { computed: {
...mapState({ ...mapState({
allSize: (state) => state.assign.main.allSize, allSize: (state) => state.allSize,
currentDiagList: (state) => state.assign.main.currentDiagList, currentDiagList: (state) => state.currentDiagList,
currentCalList: (state) => state.assign.main.currentCalList, currentCalList: (state) => state.currentCalList,
soketQuest:(state) => state.assign.main.soketQuest, soketQuest: (state) => state.soketQuest,
isSuperAdmin:(state) => state.assign.main.isSuperAdmin, isSuperAdmin: (state) => state.isSuperAdmin,
}), }),
}, },
watch: { watch: {
...@@ -175,9 +181,9 @@ ...@@ -175,9 +181,9 @@
this.tabPosition = t; this.tabPosition = t;
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd'); const d = s ? s.dateTime : new Date().format('yyyy-MM-dd');
this.searchParam.dateTime = d; this.searchParam.dateTime = d;
const id = s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID; const id =
this.operateUserId = id; s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID;
this.operateUserId = id;
}, },
methods: { methods: {
tabChange(val) { tabChange(val) {
...@@ -207,13 +213,14 @@ ...@@ -207,13 +213,14 @@
this.inquirySearch(); this.inquirySearch();
}, },
inquirySearch(type) { inquirySearch(type) {
console.log(type);
const p = this.searchParam; const p = this.searchParam;
if (type == 'clear') { if (type == 'clear') {
this.$store.commit('clearRawCurrentCalList'); this.$store.commit('main/clearRawCurrentCalList');
} }
conditionUpdate(p).then((res) => { conditionUpdate(p).then((res) => {
if (res.code == '000000') { if (res.code == '000000') {
this.$store.commit('updateSoketQuest', p); this.$store.commit('main/updateSoketQuest', p);
if (type == 'tab') { if (type == 'tab') {
const returnStatus = p.returnStatus; const returnStatus = p.returnStatus;
const RespList = res.data.list[0].recordResp.countRespList.filter( const RespList = res.data.list[0].recordResp.countRespList.filter(
...@@ -221,7 +228,7 @@ ...@@ -221,7 +228,7 @@
return val.status == returnStatus; return val.status == returnStatus;
} }
); );
this.$store.commit('changeRawCurrentCalList', RespList[0]); this.$store.commit('main/changeRawCurrentCalList', RespList[0]);
} }
} else { } else {
this.$message({ this.$message({
...@@ -231,22 +238,17 @@ ...@@ -231,22 +238,17 @@
}); });
} }
}); });
// 测试代码
// const l = this.currentDiagList;
// l.push(...this.testlistdata);
// this.$store.commit('updateCurrentDiagList', l);
// this.$store.commit('socket/SET_NOTIFY', ...this.testlistdata);
}, },
}, },
}; };
</script> </script>
<style lang='scss'> <style lang="scss">
.workbench-tab { .workbench-tab {
.el-radio-button__inner { .el-radio-button__inner {
border: none; border: none;
position: relative; position: relative;
&::after { &::after {
content: ""; content: '';
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 50%; left: 50%;
......
...@@ -44,15 +44,16 @@ ...@@ -44,15 +44,16 @@
import VFooter from './components/footer.vue'; import VFooter from './components/footer.vue';
import chat from '@/components/IM/chat'; import chat from '@/components/IM/chat';
import DiagnoseAdvice from '@/components/common/diagnoseAdvice.vue'; import DiagnoseAdvice from '@/components/common/diagnoseAdvice.vue';
import { createNamespacedHelpers } from 'vuex';
const { mapState, mapActions, mapGetters } = createNamespacedHelpers('main');
import { import {
base64decode, base64decode,
isNotEmptyUtils, isNotEmptyUtils,
getUrlParamsMap, getUrlParamsMap,
ssoLogin, ssoLogin,
bindDragHeader bindDragHeader,
} from '@/utils/utils.js'; } from '@/utils/utils.js';
import { loginHeader } from '@/api/layout'; import { loginHeader } from '@/api/layout';
import { mapActions, mapGetters, mapState } from 'vuex';
import { getInnerLoginUrl } from '@/utils/index'; import { getInnerLoginUrl } from '@/utils/index';
let vm = null; let vm = null;
export default { export default {
...@@ -61,7 +62,7 @@ ...@@ -61,7 +62,7 @@
VSlidebar, VSlidebar,
VFooter, VFooter,
chat, chat,
DiagnoseAdvice DiagnoseAdvice,
}, },
data() { data() {
return { return {
...@@ -73,19 +74,20 @@ ...@@ -73,19 +74,20 @@
}, },
computed: { computed: {
...mapState({ ...mapState({
showChat: (state) => state.assign.main.showChat, showChat: (state) => state.showChat,
currentChat: (state) => state.assign.main.currentChat, currentChat: (state) => state.currentChat,
showAdvice:(state) => state.assign.main.showAdvice, showAdvice: (state) => state.showAdvice,
}), }),
...mapGetters('common', ['_token']) ...mapGetters(['_token']),
}, },
created() { created() {
console.log('this.$store.state', this.showChat);
vm = this; vm = this;
vm.getToken(); vm.getToken();
window._VM = vm; window._VM = vm;
}, },
mounted() { mounted() {
setTimeout( function () { setTimeout(function () {
bindDragHeader('.c-header', '.chat-wrap'); bindDragHeader('.c-header', '.chat-wrap');
}, 1000); }, 1000);
}, },
...@@ -128,16 +130,16 @@ ...@@ -128,16 +130,16 @@
getUserAuth() { getUserAuth() {
let req = null; let req = null;
req = { req = {
system_type: '26' system_type: '26',
}; };
loginHeader(req).then(res => { loginHeader(req).then((res) => {
if (res.code == '000000') { if (res.code == '000000') {
let systemType = 0; let systemType = 0;
const authList = res.data.systemInfoList; const authList = res.data.systemInfoList;
const s = authList.find( item => { const s = authList.find((item) => {
return item.systemNameAbbreviation == 'diagnose'; return item.systemNameAbbreviation == 'diagnose';
}); });
if(s) { if (s) {
systemType = s.id; systemType = s.id;
} }
this.systemType = systemType; this.systemType = systemType;
...@@ -147,13 +149,13 @@ ...@@ -147,13 +149,13 @@
} }
}); });
}, },
closeGlobalMsgNotice () {} closeGlobalMsgNotice() {},
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import "@/styles/global.scss"; @import '@/styles/global.scss';
@import "@/styles/mixin.scss"; @import '@/styles/mixin.scss';
.router-fade-enter-active, .router-fade-enter-active,
.router-fade-leave-active { .router-fade-leave-active {
transition: opacity 0.1s; transition: opacity 0.1s;
......
...@@ -1153,10 +1153,10 @@ ...@@ -1153,10 +1153,10 @@
jsencrypt "^3.0.0-rc.1" jsencrypt "^3.0.0-rc.1"
vue "^2.6.11" vue "^2.6.11"
"@pica-cli/vue-cli-plugin-pica-cli-plugin@~1.1.0": "@pica-cli/vue-cli-plugin-pica-cli-plugin@~1.1.2":
version "1.1.0" version "1.1.2"
resolved "http://192.168.110.93:4873/@pica-cli%2fvue-cli-plugin-pica-cli-plugin/-/vue-cli-plugin-pica-cli-plugin-1.1.0.tgz#1e951bd406cb739141f4bbfcc17be0d1129fb876" resolved "http://192.168.110.93:4873/@pica-cli%2fvue-cli-plugin-pica-cli-plugin/-/vue-cli-plugin-pica-cli-plugin-1.1.2.tgz#3c3fdaacdeaf48d56ec844484ecd9a06df06ded4"
integrity sha512-zkolSuI6/lwkvvd5dMknU/Saojv1/IuUYbwfDETrUZuKfcIdpsK748ivBfn6sQdaq6Y8RiywDkTx0MghX6wcVQ== integrity sha512-NlOeF1jrACEKOa9SmTJjgGkuV8lngbIlME7bk9bsa7QBmsrZobdDMkn5pzco19fhx4MG3q5AYQ94wveVzYSdlA==
dependencies: dependencies:
"@asmartbear/diff-merge" "^1.0.7" "@asmartbear/diff-merge" "^1.0.7"
"@pica-cli/pica-cli-framework" "^1.0.10" "@pica-cli/pica-cli-framework" "^1.0.10"
...@@ -13043,10 +13043,10 @@ validate-npm-package-name@^3.0.0: ...@@ -13043,10 +13043,10 @@ validate-npm-package-name@^3.0.0:
dependencies: dependencies:
builtins "^1.0.3" builtins "^1.0.3"
vant@^2.8.4: vant@^2.12.27:
version "2.12.26" version "2.12.27"
resolved "http://192.168.110.93:4873/vant/-/vant-2.12.26.tgz#bd5b233e0464a2f94ef29c349b4b982bd814eea2" resolved "http://192.168.110.93:4873/vant/-/vant-2.12.27.tgz#2e250d05639acaa5a579394200417720ab57e7f6"
integrity sha1-vVsjPgRkovlO8pw0m0uYK9gU7qI= integrity sha1-LiUNBWOayqWleTlCAEF3IKtX5/Y=
dependencies: dependencies:
"@babel/runtime" "7.x" "@babel/runtime" "7.x"
"@vant/icons" "^1.5.3" "@vant/icons" "^1.5.3"
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册