Compare commits

..

3 Commits

Author SHA1 Message Date
SWX\10484 61d152a6e8 Merge branch 'main' of http://42.192.7.176:3000/suojin/HIYL-localization-web 5 days ago
SWX\10484 65ce40b5dd 接口 5 days ago
SWX\10484 620ef2fce9 会议开发 5 days ago
  1. 24
      src/api/videoCommunication.js
  2. 277
      src/views/videoCommunication/components/ConsultationCaseStatsDialog.vue
  3. 635
      src/views/videoCommunication/realTimeConsultation.vue
  4. 1
      vue.config.js

@ -35,6 +35,14 @@ export const meetingModes = () => {
},
]
}
// 视讯-创建房间
export function postConsultationCreate(data) {
return request({
url: '/consultation/create',
method: 'post',
data
})
}
// 视讯-加入会议
export function postConsultationInfo(data) {
return request({
@ -43,6 +51,22 @@ export function postConsultationInfo(data) {
data
})
}
// 视讯-结束会议
export function postConsultationStop(data) {
return request({
url: '/consultation/stop',
method: 'post',
data
})
}
// 视讯-会议结果提交
export function postConsultationPatients(data) {
return request({
url: '/consultation/patients',
method: 'post',
data
})
}
// 在线质控-创建质控{"avatar":"","init_users":[],"invite_code":"1234","name":"","room_id":"6688110"}
export function postQualityCreate(data) {
return request({

@ -0,0 +1,277 @@
<template>
<el-dialog
:visible.sync="visible"
title="会诊病例数统计"
width="420px"
:show-close="false"
:close-on-click-modal="false"
append-to-body
custom-class="stats-case-dialog"
>
<div class="stats-form">
<div class="stats-row">
<div class="stats-label">总病例数</div>
<el-input
v-model.number="form.total_patients"
type="number"
min="0"
class="stats-input"
/>
<span class="stats-unit"></span>
</div>
<div class="stats-row">
<div class="stats-label">阳性病例数</div>
<el-input
v-model.number="form.positive_patients"
type="number"
min="0"
class="stats-input"
/>
<span class="stats-unit"></span>
</div>
<div class="stats-row">
<div class="stats-label">转诊病例数</div>
<el-input
v-model.number="form.transfer_patients"
type="number"
min="0"
class="stats-input"
/>
<span class="stats-unit"></span>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button
:class="isFormValid ? 'btn-confirm-valid' : 'btn-confirm-disabled'"
:disabled="!isFormValid"
@click="handleConfirm"
>确定</el-button>
<el-button class="btn-close" @click="handleClose">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
import Vue from 'vue';
import { postConsultationPatients } from '@/api/videoCommunication';
const ConsultationCaseStatsDialog = {
name: 'ConsultationCaseStatsDialog',
data() {
return {
visible: false,
consultation_id: null,
submitting: false, //
form: {
total_patients: 0,
positive_patients: 0,
transfer_patients: 0,
},
};
},
computed: {
// >= +
isFormValid() {
const { total_patients, positive_patients, transfer_patients } = this.form;
return total_patients >= positive_patients + transfer_patients;
},
},
methods: {
show(consultationId) {
this.consultation_id = consultationId;
this.form = {
total_patients: 0,
positive_patients: 0,
transfer_patients: 0,
};
this.visible = true;
},
async handleConfirm() {
if (!this.isFormValid || this.submitting) return;
this.submitting = true;
try {
await postConsultationPatients({
consultation_id: this.consultation_id,
total_patients: this.form.total_patients,
positive_patients: this.form.positive_patients,
transfer_patients: this.form.transfer_patients,
});
this.$message?.success('提交成功');
this.$emit('confirm', { ...this.form });
this.visible = false;
} catch (e) {
this.$message?.error('提交失败');
} finally {
this.submitting = false;
}
},
handleClose() {
this.visible = false;
this.$emit('close');
},
},
};
//
ConsultationCaseStatsDialog.open = function (consultationId) {
const DialogCtor = Vue.extend(ConsultationCaseStatsDialog);
const instance = new DialogCtor().$mount();
document.body.appendChild(instance.$el);
instance.$nextTick(() => {
instance.show(consultationId);
});
const cleanup = () => {
setTimeout(() => {
if (instance.$el && instance.$el.parentNode) {
instance.$el.parentNode.removeChild(instance.$el);
}
instance.$destroy();
}, 500);
};
// DOM
const origConfirm = instance.handleConfirm;
const origClose = instance.handleClose;
instance.handleConfirm = function () {
origConfirm.call(this);
cleanup();
};
instance.handleClose = function () {
origClose.call(this);
cleanup();
};
return instance;
};
export default ConsultationCaseStatsDialog;
</script>
<style lang="scss">
.stats-case-dialog {
.el-dialog__header {
padding: 20px 20px 10px;
border-bottom: none;
}
.el-dialog__title {
display: flex;
align-items: center;
font-size: 16px;
font-weight: 500;
color: #333;
line-height: 1;
&::before {
content: '';
display: inline-block;
width: 3px;
height: 16px;
background-color: #009688;
border-radius: 2px;
margin-right: 8px;
}
}
.el-dialog__body {
padding: 10px 30px 20px;
}
.el-dialog__footer {
padding: 10px 20px 20px;
border-top: none;
text-align: center;
}
.stats-form {
display: flex;
flex-direction: column;
gap: 16px;
}
.stats-row {
display: flex;
align-items: center;
gap: 10px;
}
.stats-label {
width: 84px;
height: 36px;
line-height: 36px;
text-align: center;
background-color: #009688;
color: #fff;
font-size: 14px;
border-radius: 4px;
flex-shrink: 0;
}
.stats-input {
flex: 1;
.el-input__inner {
height: 36px;
line-height: 36px;
border-radius: 4px;
border-color: #009688;
text-align: left;
padding-left: 12px;
&:focus {
border-color: #009688;
}
}
}
.stats-unit {
width: 20px;
font-size: 14px;
color: #333;
flex-shrink: 0;
}
.dialog-footer {
display: flex;
justify-content: center;
gap: 20px;
.btn-confirm-disabled {
width: 90px;
height: 36px;
background-color: #ccc;
border-color: #ccc;
color: #fff;
cursor: not-allowed;
}
.btn-confirm-valid {
width: 90px;
height: 36px;
background-color: #009688;
border-color: #009688;
color: #fff;
&:hover {
background-color: #00897b;
border-color: #00897b;
}
}
.btn-close {
width: 90px;
height: 36px;
background-color: #009688;
border-color: #009688;
color: #fff;
&:hover {
background-color: #00897b;
border-color: #00897b;
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

@ -10,6 +10,7 @@ const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '信联' // 网页标题
const baseUrl = 'http://www.haiteriot.com:13005' // 后端接口
// const baseUrl = 'http://120.221.95.4:8203' // 后端接口
// const baseUrl = 'http://47.92.6.51:8005' // 后端接口
// const baseUrl = 'http://47.92.6.51:8001' // 后端接口

Loading…
Cancel
Save