提交 7ee8beb6 编写于 作者: fusheng.liu's avatar fusheng.liu

save

上级 7f89b608
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
</div> </div>
</el-container> </el-container>
<chat :showChat="showChat" :currentChat="currentChat"></chat> <chat :showChat="showChat" :currentChat="currentChat"></chat>
<diagnoseAdvice :showAdvice="showAdvice"></diagnoseAdvice>
</div> </div>
</template> </template>
<script> <script>
...@@ -23,6 +24,7 @@ import VHeader from "./views/layout/header.vue"; ...@@ -23,6 +24,7 @@ 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 chat from './components/IM/chat'
import DiagnoseAdvice from '@/components/common/diagnoseAdvice.vue'
import { import {
base64decode, base64decode,
isNotEmptyUtils, isNotEmptyUtils,
...@@ -38,7 +40,8 @@ export default { ...@@ -38,7 +40,8 @@ export default {
VHeader, VHeader,
VSlidebar, VSlidebar,
VFooter, VFooter,
chat chat,
DiagnoseAdvice
}, },
data() { data() {
return { return {
...@@ -52,6 +55,7 @@ export default { ...@@ -52,6 +55,7 @@ export default {
...mapState({ ...mapState({
showChat: 'showChat', showChat: 'showChat',
currentChat: 'currentChat', currentChat: 'currentChat',
showAdvice:'showAdvice'
}), }),
...mapGetters(["_token"]) ...mapGetters(["_token"])
}, },
......
<template> <template>
<div class="diagnoseAdvice" > <div class="diagnoseAdvice" v-drag v-if="showAdvice">
<div class="header"> <span class="headernum"> 问诊单1233 诊断建议</span> <el-button @click="$emit('update:showAdvices', false);">退出</el-button></div> <div class="header"> <span class="headernum"> 问诊单{{currentAdvice.diagnoseId}} 诊断建议</span> <el-button @click="closeadvice">退出</el-button></div>
<!-- <el-form-item label="音频" >
<upload-music :isDisable="editorType== 2" :musicList="formData.illnessAudioUrls" ref="musicComponent"></upload-music>
</el-form-item> -->
<div class="center"> <div class="center">
<span>诊断建议</span> <el-input rows="10" type="textarea" v-model="formData.advice" placeholder="请输入内容"></el-input> <span>诊断建议</span> <el-input rows="10" type="textarea" v-model="formData.advice" placeholder="请输入内容"></el-input>
</div> </div>
<div class="record"> <div class="record">
<span>录音/录像</span> <span>录音/录像</span>
<div v-for="adlist in Adviceslist.adviceAudioUrls" :key="adlist.diagnoseId"> <div v-if="currentAdvice.adviceAudioUrls!=undefined &&currentAdvice.adviceAudioUrls.length > 0">
<el-link :href="adlist" target="_blank">{{adlist}}</el-link> <div v-for="adlist in currentAdvice.adviceAudioUrls" :key="adlist.diagnoseId">
<el-link :href="adlist" target="_blank">{{adlist}}</el-link>
</div>
</div> </div>
<span style="color:#0D9078" v-else>无音频</span>
</div> </div>
<div class="footer"> <div class="footer">
<el-button type="primary" style="height:35px" @click="Submit()">提交保存</el-button> <el-button type="primary" style="height:35px" @click="SaveAdvice()">提交保存</el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import uploadMusic from '@/components/editor/upload-music' import {mapState} from "vuex";
export default { export default {
components: { uploadMusic},
data() { data() {
return{ return{
formData:{ formData:{
diagnoseAdvice:'', diagnoseAdvice:'',
advice:"", advice:"",
vodList:[{url:'upload-music'},{url:'upload-music'},{url:'upload-music'}]
}, },
} }
}, },
props:{ props:{
showAdvices:{ showAdvice:{
type:Boolean, type:Boolean,
default:false default:false
}, },
diagnoseId:{
type:Number,
default:0
},
Adviceslist:{
type:Object,
default:{}
}
}, },
created() { created() {
},
computed:{
...mapState({
currentAdvice: 'currentAdvice',
})
}, },
methods:{ methods:{
Submit() { SaveAdvice() {
let params = { let params = {
adviceAudioUrls: this.Adviceslist.adviceAudioUrls, // adviceAudioUrls: this.Adviceslist.adviceAudioUrls,
content: this.formData.advice, // content: this.formData.advice,
diagnoseId: 11, // diagnoseId: 11,
illnessAudioUrls: this.Adviceslist.illnessAudioUrls // illnessAudioUrls: this.Adviceslist.illnessAudioUrls
} }
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.success(res.data.message)
this.$emit('update:showAdvices', false);
this.showAdvices = false
this.$message({ this.$message({
message: "保存成功", message: "保存成功",
type: "success", type: "success",
}); });
this.closeadvice()
} }
}).catch(err=>{ }).catch(err=>{
console.log(err); console.log(err);
}) })
},
closeadvice() {
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;
};
};
}
} }
} }
} }
......
...@@ -43,22 +43,17 @@ ...@@ -43,22 +43,17 @@
</div> </div>
<div class="inquiryroom"> <div class="inquiryroom">
<div class="goroom"><span v-if="nomor" @click="openChat">进入诊室</span><span v-else>正在呼叫医助,进入诊室</span> </div> <div class="goroom"><span v-if="nomor" @click="openChat">进入诊室</span><span v-else>正在呼叫医助,进入诊室</span> </div>
<div class="suggest" @click="showAdvice()">诊断建议 <div class="writesuggest" v-if="inquiry.write">未写</div></div> <div class="suggest" @click="openAdvice">诊断建议 <div class="writesuggest" v-if="inquiry.write">未写</div></div>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<diagnoseAdvice v-if="showAdvicesflag" :Adviceslist="Adviceslist" :.sync= showAdvices></diagnoseAdvice>
</div> </div>
</template> </template>
<script> <script>
import DiagnoseAdvice from '@/components/common/diagnoseAdvice.vue'
import { mapState } from "vuex"; import { mapState } from "vuex";
export default { export default {
components:{
DiagnoseAdvice
},
data() { data() {
return { return {
inquiry:{ inquiry:{
...@@ -71,12 +66,9 @@ export default { ...@@ -71,12 +66,9 @@ export default {
write:false, write:false,
doctorline:[true ,false] doctorline:[true ,false]
}, },
calldoctor:true,
timer:null, timer:null,
flag:true, flag:true,
nomor:true, nomor:true,
showAdvices:false,
showAdvicesflag:false,
Adviceslist:{} Adviceslist:{}
}; };
}, },
...@@ -91,6 +83,7 @@ export default { ...@@ -91,6 +83,7 @@ export default {
computed:{ computed:{
...mapState({ ...mapState({
showChat: 'showChat', showChat: 'showChat',
showAdvice:'showAdvice'
}), }),
diagnoseType() { diagnoseType() {
switch(this.item.diagnoseType) { switch(this.item.diagnoseType) {
...@@ -151,20 +144,6 @@ export default { ...@@ -151,20 +144,6 @@ export default {
} }
}, 1000); }, 1000);
} }
},
showAdvice() {
this.showAdvicesflag = true;
this.showAdvices = true;
this.GET(`/diagnose/admin/diagnose/doctorAdvice/list/11`).then(res=>{
if(res.code == '000000'){
console.log(res);
// this.Adviceslist= res.data ;
}
}).catch(err=>{
console.log(err);
})
}, },
openChat () { openChat () {
if(this.showChat){ if(this.showChat){
...@@ -180,6 +159,24 @@ export default { ...@@ -180,6 +159,24 @@ export default {
this.$store.commit('updateShowChat', true); this.$store.commit('updateShowChat', true);
this.$store.commit('updateCurrentChat', i); this.$store.commit('updateCurrentChat', i);
} }
},
openAdvice() {
if(this.showAdvice){
this.$message({
message: '不可同时打开多个诊断建议,请先退出已打开的诊断建议,再试。',
type: "warning",
duration:1000
});
return false;
}
this.GET(`/diagnose/admin/diagnose/doctorAdvice/list/${this.item.diagnoseLogId}`).then(res=>{
if(res.code == '000000'){
this.$store.commit('updateCurrentAdvice', res.data);
}
}).catch(err=>{
console.log(err);
})
this.$store.commit('updateShowAdvice', true);
} }
} }
} }
......
...@@ -8,9 +8,15 @@ export default { ...@@ -8,9 +8,15 @@ export default {
updateCurrentChat(state, obj) { updateCurrentChat(state, obj) {
state.currentChat = obj; state.currentChat = obj;
}, },
updateCurrentAdvice(state, obj) {
state.currentAdvice = obj;
},
updateShowChat(state, obj) { updateShowChat(state, obj) {
state.showChat = obj; state.showChat = obj;
}, },
updateShowAdvice(state, obj) {
state.showAdvice = obj;
},
updateNoticeList(state, obj) { updateNoticeList(state, obj) {
state.noticeList = obj; state.noticeList = obj;
}, },
......
...@@ -4,6 +4,8 @@ export default { ...@@ -4,6 +4,8 @@ export default {
currentDiagList:[], currentDiagList:[],
currentCalList:{}, currentCalList:{},
currentChat: {}, currentChat: {},
currentAdvice: {},
noticeList: [], noticeList: [],
showChat:false showChat:false,
showAdvice:false
}; };
...@@ -19,22 +19,20 @@ ...@@ -19,22 +19,20 @@
</div> </div>
</el-row> </el-row>
<!-- tab栏 --> <!-- tab栏 -->
<div id="radio"></div> <el-radio-group @change="changestatus" v-model="tabPosition" style="margin-bottom: 30px;">
<el-radio-group v-model="tabPosition" style="margin-bottom: 30px;" > <el-radio-button label="99">全部({{currentCalList}})</el-radio-button>
<el-radio-button label="99">全部({{currentCalList}})</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="2">问诊中({{currentCalList}})</el-radio-button> <el-radio-button label="3">未开始({{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="4">已结束({{currentCalList}})</el-radio-button> <el-radio-button label="5">已取消({{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 list" :key="'for'+index"> <div class="for" v-for="(item, index) in list" :key="'for'+index">
<inquiryList-component :item="item"></inquiryList-component> <inquiryList-component :item="item"></inquiryList-component>
</div> </div>
</div> </div>
</div> <el-row type="flex" justify="end">
<el-row type="flex" justify="end" >
<el-pagination <el-pagination
background background
@size-change="handleSizeChange" @size-change="handleSizeChange"
...@@ -47,8 +45,7 @@ ...@@ -47,8 +45,7 @@
</el-pagination> </el-pagination>
</el-row> </el-row>
</div> </div>
</div>
</div>
</template> </template>
<script> <script>
...@@ -85,7 +82,7 @@ export default { ...@@ -85,7 +82,7 @@ export default {
"appointEndTime": "2021-07-29T05:28:57.396Z", "appointEndTime": "2021-07-29T05:28:57.396Z",
"department": "内科", "department": "内科",
"departmentId": 3876, "departmentId": 3876,
"diagnoseLogId": 3876, "diagnoseLogId": 11,
"diagnoseType": 1, "diagnoseType": 1,
"doctorCallKfStatus": 1, "doctorCallKfStatus": 1,
"doctorCallTime": "", "doctorCallTime": "",
...@@ -120,7 +117,7 @@ export default { ...@@ -120,7 +117,7 @@ export default {
this.searchParam.pageNo = val this.searchParam.pageNo = val
this.search() this.search()
}, },
changeStatus(val){ changestatus(val){
this.searchParam.returnStatus = val this.searchParam.returnStatus = val
this.searchParam.pageNo = 1 this.searchParam.pageNo = 1
this.search() this.search()
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册