提交 73d817df 编写于 作者: 张磊's avatar 张磊

Merge branch 'feat/zl' into 'develop'

Feat/zl

See merge request com.pica.cloud.education.frontend/pica-admin-consultation!55
<template> <template>
<div class="diagnoseAdvice" v-drag v-if="showAdvice"> <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="header"> <span class="headernum"> 问诊单{{currentAdvice.diagnoseId}} 诊断建议</span> <el-button @click="closeadvice">退出</el-button></div>
<div class="center" v-stopdrag> <div class="center" v-stopdrag>
<span>诊断建议</span> <el-input rows="10" type="textarea" v-model="diagnoseAdvice" placeholder="请输入内容"></el-input> <span>诊断建议</span> <el-input rows="10" type="textarea" v-model="diagnoseAdvice" placeholder="请输入内容"></el-input>
</div> </div>
<div class="record"> <div class="record">
<span>录音/录像</span> <span>录音/录像:</span>
<div v-if="currentAdvice.adviceAudioUrls!=undefined &&currentAdvice.adviceAudioUrls.length > 0"> <div v-if="currentAdvice.adviceAudioUrls!=undefined &&currentAdvice.adviceAudioUrls.length > 0">
<div v-for="itemAudio in currentAdvice.adviceAudioUrls" :key="itemAudio.diagnoseId"> <div v-for="itemAudio in currentAdvice.adviceAudioUrls" :key="itemAudio.diagnoseId">
<el-link :href="itemAudio" target="_blank">{{itemAudio}}</el-link> <el-link :href="itemAudio" target="_blank">{{itemAudio}}</el-link>
</div> </div>
</div> </div>
<span style="color:#0D9078" v-else>无音频</span> <span style="color:#0D9078" v-else>无音频</span>
</div> </div>
<div class="footer"> <div class="record flex">
<el-button type="primary" style="height:35px" @click="SaveAdvice()">提交保存</el-button> <span>诊断建议:</span>
</div> <div class="record-music">
</div> <upload-music :musicList="illnessAudioUrls" ref="musicComponent"></upload-music>
</template> </div>
</div>
<script> <div class="footer">
import {mapState} from "vuex"; <el-button type="primary" style="height:35px" @click="SaveAdvice">提交保存</el-button>
export default { </div>
data() { </div>
return{ </template>
} <script>
}, import {mapState} from "vuex";
props:{ import uploadMusic from '@/components/editor/upload-music'
showAdvice:{ export default {
type:Boolean, components: {
default:false uploadMusic
}, },
}, data() {
created() { return{
diagnoseAdvice:'',
}, illnessAudioUrls:[]
mounted() { }
},
}, props:{
computed:{ showAdvice:{
...mapState({ type:Boolean,
currentAdvice: 'currentAdvice', default:false
}), },
diagnoseAdvice:{ },
get: function () { created() {
return this.currentAdvice.content
}, },
set(val){ mounted() {
this.currentAdvice.content = val
} },
} computed:{
}, ...mapState({
methods:{ currentAdvice: 'currentAdvice',
SaveAdvice() { }),
let params = { },
adviceAudioUrls: this.currentAdvice.adviceAudioUrls, methods:{
content: this.diagnoseAdvice, SaveAdvice() {
diagnoseId: 11,//id需要获取 if(this.diagnoseAdvice.trim() === ''){
illnessAudioUrls: this.currentAdvice.illnessAudioUrls this.$message({
} message: "请填写诊断建议",
// if(!this.formData.advice) return type: "success",
this.POST('/diagnose/admin/diagnose/doctorAdvice/create',params).then(res=>{ });
if(res.code == "000000"){ return false;
this.$message({ }
message: "保存成功", const url = this.$refs.musicComponent ? [...this.$refs.musicComponent.setNewArr()] : [];
type: "success", let params = {
}); adviceAudioUrls: this.currentAdvice.adviceAudioUrls,
this.closeadvice() content: this.diagnoseAdvice,
} diagnoseId: this.currentAdvice.diagnoseId,//id需要获取
}).catch(err=>{ illnessAudioUrls: url
console.log(err); }
}) this.POST('/diagnose/admin/diagnose/doctorAdvice/create',params).then(res=>{
}, if(res.code == "000000"){
closeadvice() { this.$message({
this.$store.commit('updateShowAdvice', false); message: "保存成功",
} type: "success",
}, });
directives: { this.closeadvice()
drag: { }
// 指令的定义 }).catch(err=>{
bind: function (el) { console.log(err);
let odiv = el; //获取当前元素 })
el.onmousedown = (e) => { },
//算出鼠标相对元素的位置 closeadvice() {
let disX = e.clientX - odiv.offsetLeft; this.diagnoseAdvice = '';
let disY = e.clientY - odiv.offsetTop; this.$store.commit('updateShowAdvice', false);
let left = ''; }
let top = ''; },
document.onmousemove = (e)=>{ directives: {
//用鼠标的位置减去鼠标相对元素的位置,得到元素的位置 drag: {
left = e.clientX - disX; // 指令的定义
top = e.clientY - disY; bind: function (el) {
//绑定元素位置到positionX和positionY上面 let odiv = el; //获取当前元素
//移动当前元素 el.onmousedown = (e) => {
odiv.style.left = left + 'px'; //算出鼠标相对元素的位置
odiv.style.top = top + 'px'; let disX = e.clientX - odiv.offsetLeft;
}; let disY = e.clientY - odiv.offsetTop;
document.onmouseup = (e) => { let left = '';
document.onmousemove = null; let top = '';
document.onmouseup = null; document.onmousemove = (e)=>{
}; //用鼠标的位置减去鼠标相对元素的位置,得到元素的位置
}; left = e.clientX - disX;
} top = e.clientY - disY;
}, //绑定元素位置到positionX和positionY上面
stopdrag: { //移动当前元素
inserted:function(el, binding, vnode) { odiv.style.left = left + 'px';
let element = el; odiv.style.top = top + 'px';
element.onmousedown =function(e) { };
e.stopPropagation() document.onmouseup = (e) => {
} document.onmousemove = null;
} document.onmouseup = null;
} };
} };
} }
</script> },
stopdrag: {
<style lang="scss" scoped> inserted:function(el, binding, vnode) {
.diagnoseAdvice{ let element = el;
position: absolute; element.onmousedown =function(e) {
top: 125px; e.stopPropagation()
right: 20px; }
z-index: 1000; }
width: 500px; }
height: 600px; }
padding: 5px 5px 5px 6px; }
background: #ffffff; </script>
box-shadow: 10px 10px 50px 0px #d9d9d9;
overflow: hidden; <style lang="scss" scoped>
border-radius: 18px; .diagnoseAdvice-wrap{
.header{ position: absolute;
height: 60px; top: 125px;
border-bottom: 1px rgb(231, 228, 228) solid; right: 20px;
display: flex; z-index: 1000;
justify-content: space-between; width: 500px;
padding-left: 15px; //height: 600px;
margin-bottom: 30px; padding: 5px 5px 5px 6px;
.headernum{ background: #ffffff;
font-weight: 700; box-shadow: 10px 10px 50px 0px #d9d9d9;
line-height: 60px; overflow: hidden;
} border-radius: 18px;
.el-button{ .header{
width: 85px; height: 60px;
height: 25px; border-bottom: 1px rgb(231, 228, 228) solid;
margin-top: 17px; display: flex;
margin-right: 17px; justify-content: space-between;
line-height: 0; padding-left: 15px;
border-color: #9fba81; margin-bottom: 30px;
color: #9fba81; .headernum{
>span{ font-weight: 700;
font-weight: 700; line-height: 60px;
} }
} .el-button{
} width: 85px;
.center{ height: 25px;
display: flex; margin-top: 17px;
margin-right: 28px; margin-right: 17px;
margin-bottom: 30px; line-height: 0;
height: 210px; border-color: #9fba81;
>span{ color: #9fba81;
display: inline-block; >span{
margin-top: 5px; font-weight: 700;
width: 110px; }
} }
.el-textarea{ }
height: 110px; .center{
.el-textarea__inner{ display: flex;
height: 110px; margin-right: 28px;
} margin-bottom: 30px;
} height: 210px;
} >span{
.record{ display: inline-block;
padding-left: 28px; margin-top: 5px;
margin-top: 45px; width: 110px;
} }
.footer{ .el-textarea{
position: absolute; height: 110px;
width: 500px; .el-textarea__inner{
height: 50px; height: 110px;
bottom: 0; }
left: 0; }
text-align: center; }
margin-top: 5px; .record{
display: flex; padding-left: 28px;
align-items:center; margin-top: 45px;
justify-content:center; }
box-shadow: 0px 0px 5px #888888; .flex{
} display: flex;
} .record-music{
</style> flex: 1;
\ No newline at end of file }
}
.footer{
bottom: 0;
left: 0;
text-align: center;
margin-top: 5px;
}
}
</style>
...@@ -189,15 +189,24 @@ export default { ...@@ -189,15 +189,24 @@ export default {
}); });
return false; return false;
} }
this.GET(`/diagnose/admin/diagnose/doctorAdvice/list/11`).then(res=>{ const i = this.item.diagnoseLogId;
// const i = 11;
this.GET(`/diagnose/admin/diagnose/doctorAdvice/list/${i}`).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('updateCurrentAdvice', res.data); this.$store.commit('updateCurrentAdvice', res.data);
}else {
this.$message({
message: res.message,
type: "warning",
duration:1000
});
} }
}).catch(err=>{ }).catch(err=>{
console.log(err); console.log(err);
}) })
this.$store.commit('updateShowAdvice', true);
} }
} }
} }
......
...@@ -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()
......
...@@ -20,12 +20,10 @@ ...@@ -20,12 +20,10 @@
</el-row> </el-row>
<!-- tab栏 --> <!-- tab栏 -->
<el-radio-group @change="tabChange" 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 v-for="(item, index) in currentCalList" :key="'for'+index" :label="item.status">
{{item.statusStr}}({{item.count}})
</el-radio-button>
<el-radio-button label="1">待处理({{currentCalList}})</el-radio-button> <el-radio-button label="1">待处理({{currentCalList}})</el-radio-button>
<el-radio-button label="2">问诊中({{currentCalList}})</el-radio-button>
<el-radio-button label="3">未开始({{currentCalList}})</el-radio-button>
<el-radio-button label="4">已结束({{currentCalList}})</el-radio-button>
<el-radio-button label="5">已取消({{currentCalList}})</el-radio-button>
</el-radio-group> </el-radio-group>
<div class="forbox"> <div class="forbox">
<div class="for" v-for="(item, index) in currentDiagList" :key="'for'+index"> <div class="for" v-for="(item, index) in currentDiagList" :key="'for'+index">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册