提交 28fe8727 编写于 作者: fusheng.liu's avatar fusheng.liu

save

上级 ecad6297
......@@ -56,8 +56,8 @@ export default {
methods: {
skip() {
this.searchParam.dateTime = this.valuenow
this.searchParam.operateUserId = '123'
this.POST('/diagnose/admin/diagnose/operator/list',this.searchParam).then(res=>{
this.searchParam.operateUserId = '11'
this.POST('/diagnose/socket/condition/update',this.searchParam).then(res=>{
if(res.code == '000000'){
console.log(res);
localStorage.setItem('administrator',JSON.stringify(this.searchParam))
......
......@@ -2,7 +2,7 @@
<div class="diagnoseAdvice" v-drag v-if="showAdvice">
<div class="header"> <span class="headernum"> 问诊单{{currentAdvice.diagnoseId}} 诊断建议</span> <el-button @click="closeadvice">退出</el-button></div>
<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="diagnoseAdvice" placeholder="请输入内容"></el-input>
</div>
<div class="record">
<span>录音/录像</span>
......@@ -25,7 +25,7 @@ export default {
data() {
return{
formData:{
diagnoseAdvice:'',
// diagnoseAdvice:'',
advice:"",
},
}
......@@ -42,17 +42,26 @@ export default {
computed:{
...mapState({
currentAdvice: 'currentAdvice',
})
}),
diagnoseAdvice:{
get: function () {
return this.currentAdvice.content
},
set(val){
this.currentAdvice.content = val
}
}
},
methods:{
SaveAdvice() {
console.log(this.currentAdvice.content);
let params = {
// adviceAudioUrls: this.Adviceslist.adviceAudioUrls,
// content: this.formData.advice,
// diagnoseId: 11,
// illnessAudioUrls: this.Adviceslist.illnessAudioUrls
adviceAudioUrls: this.currentAdvice.adviceAudioUrls,
content: this.diagnoseAdvice,
diagnoseId: 11,//id需要获取
illnessAudioUrls: this.currentAdvice.illnessAudioUrls
}
if(!this.formData.advice) return
// if(!this.formData.advice) return
this.POST('/diagnose/admin/diagnose/doctorAdvice/create',params).then(res=>{
if(res.code == "000000"){
this.$message({
......
......@@ -79,11 +79,13 @@ export default {
}
},
created() {
console.log(this.currentuserId);
},
computed:{
...mapState({
showChat: 'showChat',
showAdvice:'showAdvice'
showAdvice:'showAdvice',
currentuserId:'currentuserId'
}),
diagnoseType() {
switch(this.item.diagnoseType) {
......@@ -169,8 +171,9 @@ export default {
});
return false;
}
this.GET(`/diagnose/admin/diagnose/doctorAdvice/list/${this.item.diagnoseLogId}`).then(res=>{
this.GET(`/diagnose/admin/diagnose/doctorAdvice/list/11`).then(res=>{
if(res.code == '000000'){
console.log(res.data);
this.$store.commit('updateCurrentAdvice', res.data);
}
}).catch(err=>{
......
......@@ -20,6 +20,9 @@ export default {
updateShowAdvice(state, obj) {
state.showAdvice = obj;
},
updateCurrentuserId(state, obj) {
state.currentuserId = obj;
},
updateNoticeList(state, obj) {
state.noticeList = obj;
},
......
......@@ -8,6 +8,7 @@ export default {
websoketList: {},
soketQuest: {},
noticeList: [],
currentuserId:null,
showChat:false,
showAdvice:false
};
......@@ -66,7 +66,7 @@ export default {
data(){
return {
tabPosition:"1",
Datevalue: new Date(JSON.parse(localStorage.getItem( "administrator")).dateTime),
Datevalue: new Date(JSON.parse(localStorage.getItem( "administrator")).dateTime) || new Date(),
currentPage4:0,
showChat: true,
totalRows:40,
......@@ -110,10 +110,7 @@ export default {
},
created(){
// console.log(this.$route.query.id);
// this.search()
let a = JSON.parse( localStorage.getItem( "administrator"))
console.log(a,a.dateTime);
this.search()
},
watch: {
$route: {
......@@ -126,16 +123,29 @@ export default {
},
methods:{
handleSizeChange(val){
if(JSON.stringify(this.soketQuest)=="{}"){
this.soketQuest.pageSize = val
}else{
this.searchParam.pageSize = val
}
this.search()
},
handleCurrentChange(val){
if(JSON.stringify(this.soketQuest)=="{}"){
this.soketQuest.pageNo = val
}else{
this.searchParam.pageNo = val
}
this.search()
},
changestatus(val){
if(JSON.stringify(this.soketQuest)=="{}"){
this.soketQuest.returnStatus = val
this.soketQuest.pageNo = 1
}else{
this.searchParam.returnStatus = val
this.searchParam.pageNo = 1
}
this.search()
// 测试代码
......@@ -146,20 +156,38 @@ export default {
this.$store.commit('updateCurrentDiagList', l);
},
changeDatetime(val) {
if(JSON.stringify(this.soketQuest)=="{}"){
this.soketQuest.dateTime = val.toLocaleDateString().split('/').join('-')
this.soketQuest.pageNo = 1
}else{
this.searchParam.dateTime = val.toLocaleDateString().split('/').join('-')
this.searchParam.pageNo = 1
}
this.search()
},
search() {
if(JSON.stringify(this.soketQuest)=="{}"){
let params = this.searchParam
this.loading = true
this.POST('/diagnose/socket/condition/update',params).then(res=>{
if(res.code == '000000'){
this.loading = false
console.log(res);
}
})
}else{
let params = this.soketQuest
this.loading = true
this.POST('/diagnose/admin/diagnose/operator/list',this.soketQuest).then(res=>{
this.POST('/diagnose/socket/condition/update',params).then(res=>{
if(res.code == '000000'){
this.loading = false
console.log(res);
}
})
}
// let params = this.soketQuest || this.searchParam
}
},
}
</script>
......@@ -176,7 +204,7 @@ export default {
.forbox{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
// justify-content: space-between;
.for{
display: flex;
}
......
......@@ -68,6 +68,7 @@ export default {
this.POST("/basic-data/menu/list", { systemType: this.systemType }).then(res => {
if (res.code == "000000") {
let { vueMenuDtos } = res.data;
this.$store.commit('CurrentuserId',res.data.userId)
localStorage.setItem('userID', res.data.userId)
// let vueMenuDtos = [];
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册