提交 97a48ab4 编写于 作者: 张磊's avatar 张磊

diagnose advice

上级 d7cd3fb0
<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>
...@@ -13,18 +13,29 @@ ...@@ -13,18 +13,29 @@
</div> </div>
<span style="color:#0D9078" v-else>无音频</span> <span style="color:#0D9078" v-else>无音频</span>
</div> </div>
<div class="record flex">
<span>诊断建议:</span>
<div class="record-music">
<upload-music :musicList="illnessAudioUrls" ref="musicComponent"></upload-music>
</div>
</div>
<div class="footer"> <div class="footer">
<el-button type="primary" style="height:35px" @click="SaveAdvice()">提交保存</el-button> <el-button type="primary" style="height:35px" @click="SaveAdvice">提交保存</el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import {mapState} from "vuex"; import {mapState} from "vuex";
import uploadMusic from '@/components/editor/upload-music'
export default { export default {
components: {
uploadMusic
},
data() { data() {
return{ return{
diagnoseAdvice:'',
illnessAudioUrls:[]
} }
}, },
props:{ props:{
...@@ -43,24 +54,23 @@ export default { ...@@ -43,24 +54,23 @@ export default {
...mapState({ ...mapState({
currentAdvice: 'currentAdvice', currentAdvice: 'currentAdvice',
}), }),
diagnoseAdvice:{
get: function () {
return this.currentAdvice.content
},
set(val){
this.currentAdvice.content = val
}
}
}, },
methods:{ methods:{
SaveAdvice() { SaveAdvice() {
if(this.diagnoseAdvice.trim() === ''){
this.$message({
message: "请填写诊断建议",
type: "success",
});
return false;
}
const url = this.$refs.musicComponent ? [...this.$refs.musicComponent.setNewArr()] : [];
let params = { let params = {
adviceAudioUrls: this.currentAdvice.adviceAudioUrls, adviceAudioUrls: this.currentAdvice.adviceAudioUrls,
content: this.diagnoseAdvice, content: this.diagnoseAdvice,
diagnoseId: 11,//id需要获取 diagnoseId: this.currentAdvice.diagnoseId,//id需要获取
illnessAudioUrls: this.currentAdvice.illnessAudioUrls illnessAudioUrls: url
} }
// if(!this.formData.advice) return
this.POST('/diagnose/admin/diagnose/doctorAdvice/create',params).then(res=>{ this.POST('/diagnose/admin/diagnose/doctorAdvice/create',params).then(res=>{
if(res.code == "000000"){ if(res.code == "000000"){
this.$message({ this.$message({
...@@ -74,6 +84,7 @@ export default { ...@@ -74,6 +84,7 @@ export default {
}) })
}, },
closeadvice() { closeadvice() {
this.diagnoseAdvice = '';
this.$store.commit('updateShowAdvice', false); this.$store.commit('updateShowAdvice', false);
} }
}, },
...@@ -117,13 +128,13 @@ export default { ...@@ -117,13 +128,13 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.diagnoseAdvice{ .diagnoseAdvice-wrap{
position: absolute; position: absolute;
top: 125px; top: 125px;
right: 20px; right: 20px;
z-index: 1000; z-index: 1000;
width: 500px; width: 500px;
height: 600px; //height: 600px;
padding: 5px 5px 5px 6px; padding: 5px 5px 5px 6px;
background: #ffffff; background: #ffffff;
box-shadow: 10px 10px 50px 0px #d9d9d9; box-shadow: 10px 10px 50px 0px #d9d9d9;
...@@ -174,18 +185,17 @@ export default { ...@@ -174,18 +185,17 @@ export default {
padding-left: 28px; padding-left: 28px;
margin-top: 45px; margin-top: 45px;
} }
.flex{
display: flex;
.record-music{
flex: 1;
}
}
.footer{ .footer{
position: absolute;
width: 500px;
height: 50px;
bottom: 0; bottom: 0;
left: 0; left: 0;
text-align: center; text-align: center;
margin-top: 5px; margin-top: 5px;
display: flex;
align-items:center;
justify-content:center;
box-shadow: 0px 0px 5px #888888;
} }
} }
</style> </style>
...@@ -184,15 +184,24 @@ export default { ...@@ -184,15 +184,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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册