提交 c49c4404 编写于 作者: lyf's avatar lyf

添加医助管理

上级 de007cb5
<template>
<div>
<div>
<el-badge is-dot class="item">
{{ item.label }}
</el-badge>
</div>
</div>
</template>
<script>
export default {
name: "timeLeft",
data() {
return {
timer: null,
time:60
};
},
props:['item'],
mounted() {
},
methods: {
down() {
console.log("111")
this.timer = setInterval(() => {
this.time--;
if (this.time === 0) {
this.$emit('setItem')
clearInterval(this.timer);
}
}, 1000);
},
},
};
</script>
<style lang="less" scoped>
</style>
<template>
<div>
{{ time }}秒后可重新呼叫
</div>
</template>
<script>
export default {
name: "timeLeft",
data() {
return {
timer: null,
time:60
};
},
props:['timeleft'],
mounted() {
clearInterval(this.timer);
if (this.timeleft > 0) {
this.time=this.timeleft
this.down();
}
},
methods: {
down() {
console.log("111")
this.timer = setInterval(() => {
this.time--;
if (this.time === 0) {
this.$emit('setItem')
clearInterval(this.timer);
}
}, 1000);
},
},
};
</script>
<style lang="less" scoped>
</style>
......@@ -9,7 +9,7 @@ const assistList = r => require.ensure([], () => r(require('../views/IM/diagnosi
const diagnosisEditor = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/diagnosis-editor.vue')), 'diagnosisEditor')
const diagnosisListNew = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/diagnosis-list-new.vue')), 'diagnosisListNew')
const downList = r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/down-list.vue')), 'downList')
const operation= r => require.ensure([], () => r(require('../views/IM/diagnosis-admin/operation.vue')), 'downList')
export default [{
path: '/',
component: App,
......@@ -45,6 +45,9 @@ export default [{
}, {
path: '/down-list',
component: downList
},{
path: '/operation',
component: operation
}
]
}]
......@@ -2,6 +2,7 @@ const common = {
state: {
_token: '',
isFromAssignTask: false,
time:null,
},
mutations: {
CHANGE_TOKEN: (state, data) => {
......@@ -9,13 +10,20 @@ const common = {
},
SET_IS_FROM_ASSIGN_TASK: (state, status) => {
state.isFromAssignTask = status;
},
SET_TIME(state,data){
state.time = data
}
},
actions: {
changeToken({ commit }, tokenData) {
commit('CHANGE_TOKEN', tokenData)
},
changeTime({ commit }, time) {
commit('SET_TIME', tokenData)
},
}
}
export default common
\ No newline at end of file
export default common
......@@ -2,6 +2,7 @@
const getters = {
_token: state => state.common._token,
isFromAssignTask: state => state.common.isFromAssignTask,
time:state => state.common.time,
}
export default getters
......@@ -19,13 +19,13 @@ service.interceptors.request.use(config => {
if (config.fileHeader) {
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
}
// if (config.data && config.data.setEntry) {
// config.headers['sysCode'] = config.data.sysCode || 10
// if(config.data.token){
// config.headers['token'] = config.data.token || '63C3FA92AF8A45A48B31EB7FD97B95EB'
// }
// config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
// }
......@@ -38,10 +38,10 @@ service.interceptors.request.use(config => {
service.interceptors.response.use(
response => {
const res = response.data
/*
/*
baseUrl时,返回000000为成功
apiUrl时,返回200为成功
*/
*/
// if (res.code !== '000000') {
// return Promise.reject(response.data)
// } else {
......
......@@ -19,7 +19,7 @@ class RtcClient {
this.viewslist = [];
this.isPushing = 0;
try {
this.client_ = TRTC.createClient({
mode: 'live',
......@@ -299,11 +299,11 @@ class RtcClient {
}
}
let isMask = false
// this.viewslist.push({ id: id, userId: uid, nick: uid, mask: isMask, vioce: true })
this.add(id, uid, isMask)
this.vueInstance.addNewMember(uid)
setTimeout(() => {
// 避免其他乱入视频
let index = this.viewslist.findIndex((item => {
......@@ -312,7 +312,7 @@ class RtcClient {
} else {
return -1
}
}))
if (index < 0) {
return
......@@ -385,7 +385,7 @@ class RtcClient {
if (this.members_.get(evt.userId)) {
this.changeView(evt.userId, 'mask', false);
}
});
}
......@@ -415,7 +415,7 @@ class RtcClient {
}
}
}
add(id, uid, isMask) {
this.vueInstance.memberList.forEach((ele,index) => {
if (ele.liveUserId == uid) {
......@@ -426,4 +426,4 @@ class RtcClient {
}
export default RtcClient
\ No newline at end of file
export default RtcClient
<template>
<div class="diagnosis-list-content">
<div class="component-content screenSet" id="screenSet">
<div class="select-content screenSet">
<div class="title">咨询订单管理后台</div>
<el-form
......@@ -10,186 +10,212 @@
label-width="80px"
ref="searchParam"
>
<el-row :gutter="10" type="flex" justify="center">
<el-col :span="8" class="t-c">
<el-form-item label="订单搜索" class="t-b">
<el-input
v-model.trim="searchParam.id"
clearable
placeholder="请输入ID"
style="width: 220px"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="运营人员" class="t-b">
<el-input
v-model.trim="searchParam.operateName"
clearable
placeholder="请输入运营/分诊运营/接诊运营姓名查询"
style="width: 220px"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="助诊医生" class="t-b">
<el-input
v-model.trim="searchParam.assistantVal"
clearable
placeholder="请输入姓名或电话"
style="width: 220px"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="接诊医生" class="t-b">
<el-input
v-model.trim="searchParam.receptionVal"
clearable
placeholder="请输入姓名或电话"
style="width: 220px"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" type="flex" justify="center">
<el-col :span="8" class="t-c">
<el-form-item label="分诊科室" class="t-b">
<el-select
v-model="searchParam.triageDepartmentId"
placeholder="请选择科室"
style="width: 220px"
filterable
>
<el-option
v-for="item of depList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="预约类型" class="t-b">
<el-select
v-model="searchParam.diagnoseType"
placeholder="请选择预约类型"
style="width: 220px"
>
<el-option
v-for="item of tyleList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="预约来源" class="t-b">
<el-select
v-model="searchParam.appointSource"
placeholder="请选择预约来源"
style="width: 220px"
>
<el-option
v-for="item of sourceList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="创建日期" class="t-b">
<el-date-picker
v-model="createRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" type="flex" justify="center">
<el-col :span="8" class="t-c">
<el-form-item label="退款日期" class="t-b">
<el-date-picker
v-model="cancelRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="预约日期" class="t-b">
<el-date-picker
v-model="orderRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="完成时间" class="t-b">
<el-date-picker
v-model="completeRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" class="btn-wrap">
<el-button type="primary" class="submit-btn" @click="getsearch"
>搜索</el-button
>
<el-button type="warning" class="submit-btn" @click="reset"
>重置</el-button
>
</el-col>
</el-row>
<el-row :gutter="5" type="flex" justify="center" align="center">
<el-col :span="24" class="btn-wrap">
<el-button type="success" class="submit-btn big-btn" @click="batchSetOperator" v-if="searchParam.menuType == 1"
>批量设置运营</el-button>
<el-button type="info" class="submit-btn" @click="download"
>全部导出</el-button
>
</el-col>
</el-row>
<el-collapse-transition>
<div v-show="isUp" class="form-container">
<div class="form-li">
<div>
<el-form-item label="订单搜索" class="t-b">
<el-input
v-model.trim="searchParam.id"
clearable
placeholder="请输入ID"
style="width: 220px"
></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="分诊科室" class="t-b">
<el-select
v-model="searchParam.triageDepartmentId"
placeholder="请选择科室"
style="width: 220px"
filterable
>
<el-option
v-for="item of depList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="创建日期" class="t-b">
<el-date-picker
v-model="createRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</div>
</div>
<div class="form-li">
<div>
<el-form-item label="运营人员" class="t-b">
<el-input
v-model.trim="searchParam.operateName"
clearable
placeholder="请输入运营/分诊运营/接诊运营姓名查询"
style="width: 220px"
></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="预约类型" class="t-b">
<el-select
v-model="searchParam.diagnoseType"
placeholder="请选择预约类型"
style="width: 220px"
>
<el-option
v-for="item of tyleList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="退款日期" class="t-b">
<el-date-picker
v-model="cancelRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</div>
</div>
<div class="form-li">
<div>
<el-form-item label="助诊医生" class="t-b">
<el-input
v-model.trim="searchParam.assistantVal"
clearable
placeholder="请输入姓名或电话"
style="width: 220px"
></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="预约来源" class="t-b">
<el-select
v-model="searchParam.appointSource"
placeholder="请选择预约来源"
style="width: 220px"
>
<el-option
v-for="item of sourceList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="预约日期" class="t-b">
<el-date-picker
v-model="orderRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
>
</el-date-picker>
</el-form-item>
</div>
</div>
<div class="form-li">
<div>
<el-form-item label="接诊医生" class="t-b">
<el-input
v-model.trim="searchParam.receptionVal"
clearable
placeholder="请输入姓名或电话"
style="width: 220px"
></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="完成时间" class="t-b">
<el-date-picker
v-model="completeRangeTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 220px"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</div>
</div>
<div class="form-btn">
<div class="form-btn-li">
<el-button type="primary" class="submit-btn" @click="getsearch"
>搜索</el-button
>
<el-button type="warning" class="submit-btn" @click="reset"
>重置</el-button
>
</div>
<div class="form-btn-li">
<el-button
type="success"
class="submit-btn big-btn"
@click="batchSetOperator"
v-if="searchParam.menuType == 1"
>批量设置运营</el-button
>
<el-button type="info" class="submit-btn" @click="download"
>全部导出</el-button
>
</div>
</div>
</div>
</el-collapse-transition>
</el-form>
<el-tabs v-model="activeName" @tab-click="handleClick">
<div class="select-bottom" @click="selectToggle">
<span v-if="!isUp">展开筛选<i class="el-icon-arrow-down"></i></span>
<span v-else>收起筛选<i class="el-icon-arrow-up"></i></span>
</div>
</div>
<div class="component-content screenSet" id="screenSet">
<el-tabs v-if="tabrefresh" v-model="activeName" @tab-click="handleClick">
<el-tab-pane
:label="item.label"
:name="item.active"
v-for="item in tabpaneList"
:key="item.active"
>
<div slot="label">
<span class="span-box">
<el-badge :is-dot="item.isdot" class="item">
{{ item.label }}({{ item.dgCount }})
</el-badge>
</span>
</div>
<table-component
:menuType="searchParam.menuType"
:tData="tableData"
......@@ -220,27 +246,81 @@
></table-component>
</el-tab-pane>
</el-tabs>
<match-component @search="search" :matchVisible.sync="matchVisible" :diagnoseLogId="diagnoseLogId" :batchFlag="batchFlag" :multipleSelection="multipleSelection" :operateUserID="operateUserID"></match-component>
<refund-component @search="search" :refundVisible.sync="refundVisible" :diagnoseLogId="diagnoseLogId"></refund-component>
<match-component
@search="search"
:matchVisible.sync="matchVisible"
:diagnoseLogId="diagnoseLogId"
:batchFlag="batchFlag"
:multipleSelection="multipleSelection"
:operateUserID="operateUserID"
></match-component>
<refund-component
@search="search"
:refundVisible.sync="refundVisible"
:diagnoseLogId="diagnoseLogId"
></refund-component>
<!-- 跟进原因弹出窗 -->
<followup-component @search="search" :followupVisible.sync="followupVisible" :toFollowReason="toFollowReason" :diagnoseLogId="diagnoseLogId"></followup-component>
<matching-doctor @search="search" :doctorVisible.sync="doctorVisible" :diagnoseLogId="diagnoseLogId" :triageDepartmentId="triageDepartmentId" :bizType="bizType"></matching-doctor>
<diagnosis-component @search="search" :diagnosisVisible.sync="diagnosisVisible" :diagnoseLogId="diagnoseLogId"></diagnosis-component>
<coordinating-doctor @search="search" :coordinatingVisible.sync="coordinatingVisible" :diagnoseLogId="diagnoseLogId" :bizType="bizType"></coordinating-doctor>
<diagnosis-doctor @search="search" :diagnosisDoctorVisible.sync="diagnosisDoctorVisible" :diagnoseLogId="diagnoseLogId" :diagnoseType="diagnoseType" :doctorId="doctorId"></diagnosis-doctor>
<appointment-time @search="search" :appointmentTimeVisible.sync="appointmentTimeVisible" :diagnoseLogId="diagnoseLogId" :bizType="bizType"></appointment-time>
<diagnosis-time @search="search" :diagnosisTimeVisible.sync="diagnosisTimeVisible" :diagnoseLogId="diagnoseLogId" :bizType="bizType"></diagnosis-time>
<rematching-doctor @search="search" :rematchingVisible.sync="rematchingVisible" :diagnoseLogId="diagnoseLogId" :bizType="bizType"></rematching-doctor>
<followup-component
@search="search"
:followupVisible.sync="followupVisible"
:toFollowReason="toFollowReason"
:diagnoseLogId="diagnoseLogId"
></followup-component>
<matching-doctor
@search="search"
:doctorVisible.sync="doctorVisible"
:diagnoseLogId="diagnoseLogId"
:triageDepartmentId="triageDepartmentId"
:bizType="bizType"
></matching-doctor>
<diagnosis-component
@search="search"
:diagnosisVisible.sync="diagnosisVisible"
:diagnoseLogId="diagnoseLogId"
></diagnosis-component>
<coordinating-doctor
@search="search"
:coordinatingVisible.sync="coordinatingVisible"
:diagnoseLogId="diagnoseLogId"
:bizType="bizType"
></coordinating-doctor>
<diagnosis-doctor
@search="search"
:diagnosisDoctorVisible.sync="diagnosisDoctorVisible"
:diagnoseLogId="diagnoseLogId"
:diagnoseType="diagnoseType"
:doctorId="doctorId"
></diagnosis-doctor>
<appointment-time
@search="search"
:appointmentTimeVisible.sync="appointmentTimeVisible"
:diagnoseLogId="diagnoseLogId"
:bizType="bizType"
></appointment-time>
<diagnosis-time
@search="search"
:diagnosisTimeVisible.sync="diagnosisTimeVisible"
:diagnoseLogId="diagnoseLogId"
:bizType="bizType"
></diagnosis-time>
<rematching-doctor
@search="search"
:rematchingVisible.sync="rematchingVisible"
:diagnoseLogId="diagnoseLogId"
:bizType="bizType"
></rematching-doctor>
</div>
<a class="target" href="" target="_blank" ref="target"></a>
</div>
</template>
<script>
let vm = null;
import {updateDiagnosis} from "../../../utils/diagnosis";
const DOWN_URL= '/diagnose/admin/diagnose/export';
const LIST_URL= '/diagnose/admin/diagnose/list';
const DEP_URL= '/hospital/departments/0'
import { updateDiagnosis } from "../../../utils/diagnosis";
const DOWN_URL = "/diagnose/admin/diagnose/export";
const LIST_URL = "/diagnose/admin/diagnose/list";
const COUNT_QUERY = "/diagnose/admin/diagnose/countQuery";
const DEP_URL = "/hospital/departments/0";
import TableComponent from "@/components/list/table-c";
import {
TYPE_LIST,
......@@ -250,18 +330,18 @@ import {
TRIAGE_TAB_LIST,
RECEPTION_TAB_LIST,
RUN_TAB_LIST,
MATCH_TAB_LIST
MATCH_TAB_LIST,
} from "@/utils/constants";
import MatchComponent from '@/components/common/match'
import RefundComponent from '@/components/common/refund'
import MatchComponent from "@/components/common/match";
import RefundComponent from "@/components/common/refund";
import FollowupComponent from "../../../components/common/followup";
import MatchingDoctor from "../../../components/common/matching-doctor"
import DiagnosisComponent from "../../../components/common/diagnosis"
import CoordinatingDoctor from "../../../components/common/coordinating-doctor"
import DiagnosisDoctor from "../../../components/common/diagnosis-doctor"
import AppointmentTime from "../../../components/common/appointment-time"
import DiagnosisTime from "../../../components/common/diagnosis-time"
import RematchingDoctor from "../../../components/common/rematching-doctor"
import MatchingDoctor from "../../../components/common/matching-doctor";
import DiagnosisComponent from "../../../components/common/diagnosis";
import CoordinatingDoctor from "../../../components/common/coordinating-doctor";
import DiagnosisDoctor from "../../../components/common/diagnosis-doctor";
import AppointmentTime from "../../../components/common/appointment-time";
import DiagnosisTime from "../../../components/common/diagnosis-time";
import RematchingDoctor from "../../../components/common/rematching-doctor";
export default {
components: {
TableComponent,
......@@ -274,19 +354,21 @@ export default {
DiagnosisDoctor,
AppointmentTime,
DiagnosisTime,
RematchingDoctor
RematchingDoctor,
},
data() {
return {
isUp: true,
endFlag: false,
beginFlag: false,
loading: false,
activeName: "99",
createRangeTime: '',
cancelRangeTime: '',
orderRangeTime: '',
completeRangeTime: '',
createRangeTime: "",
cancelRangeTime: "",
orderRangeTime: "",
completeRangeTime: "",
depList: [],
tabrefresh:true,
searchParam: {
id: "",
operateName: "",
......@@ -305,35 +387,37 @@ export default {
pageSize: 15,
pageNo: 1,
menuType: 1, // 菜单类型:1、all 2、运营 3、待分诊 4、待接诊 5、外呼
status: ''
status: "",
},
alltabslist: [],
tyleList: TYPE_LIST,
fllowList: IS_FLLOW,
sourceList: SOURCE_LIST,
tabpaneList: [],
Raw_tabpaneList: [],
tableData: [],
totalRows: 0,
timeClickFlag: true,
tableHeight: 500,
diagnoseLogId: 0,
toFollowReason:'',
matchVisible:false,
refundVisible:false,
followupVisible:false,
doctorVisible:false,
diagnosisVisible:false,
coordinatingVisible:false,
diagnosisDoctorVisible:false,
appointmentTimeVisible:false,
diagnosisTimeVisible:false,
rematchingVisible:false,
multipleSelection:[],
batchFlag:false,
bizType:0,
diagnoseType:0,
doctorId:0,
operateUserID:"",
triageDepartmentId:0,
toFollowReason: "",
matchVisible: false,
refundVisible: false,
followupVisible: false,
doctorVisible: false,
diagnosisVisible: false,
coordinatingVisible: false,
diagnosisDoctorVisible: false,
appointmentTimeVisible: false,
diagnosisTimeVisible: false,
rematchingVisible: false,
multipleSelection: [],
batchFlag: false,
bizType: 0,
diagnoseType: 0,
doctorId: 0,
operateUserID: "",
triageDepartmentId: 0,
pickerOptions1: {
disabledDate: (time) => {
return time.getTime() > new Date().getTime(); //减去一天的时间代表可以选择同一天;
......@@ -344,38 +428,71 @@ export default {
return time.getTime() < new Date().getTime(); //减去一天的时间代表可以选择同一天;
},
},
timer: null,
fromType: 0, //1或不传为为预约单列表 2为运营预约单列表 3为分诊台 4为接诊台
};
},
watch: {
'$route': {
$route: {
handler(newVal, oldVal) {
if (newVal) {
this.init()
this.reset()
}
if (newVal) {
this.init();
this.reset();
}
},
deep: true,
immediate: true,
}
},
},
created() {
vm = this;
this.getDep()
this.getDep();
},
mounted() {
this.setTableHeight();
},
methods: {
init(){
selectToggle() {
this.isUp = !this.isUp;
},
// 每隔10分钟对比数据
contrastData() {
clearInterval(this.timer);
this.timer = setInterval(() => {
this.getTabs();
}, 600000);
},
// 获取tabs数据
getTabs() {
let url = COUNT_QUERY;
this.GET(url).then((res) => {
if (res.code == "000000") {
this.setTable(res.data);
this.tabrefresh=false
this.$nextTick(()=>{
this.tabrefresh=true
})
}
});
},
init() {
this.fromType = +(this.$route.query.fromType || 1);
this.activeName = "99";
this.searchParam.status = '';
this.setTable();
this.activeName = "99";
this.searchParam.status = "";
this.Raw_tabpaneList=[]
this.getTabs();
this.contrastData();
},
// 不同也main切换不同的tab
setTable() {
setTable(data) {
let tabs = ALL_TAB_LIST;
switch (this.fromType) {
case 1:
tabs = ALL_TAB_LIST;
......@@ -402,8 +519,32 @@ export default {
this.searchParam.menuType = 1;
break;
}
let count = 0;
for (let i = 0; i < tabs.length; i++) {
let index = data.findIndex((val) => {
return val.status == tabs[i].active;
});
if (index > 0) {
count = count + data[index].dgCount;
let isdot = false;
if (this.Raw_tabpaneList.length > 0) {
isdot = data[index].dgCount == this.Raw_tabpaneList[i].dgCount ? false : true;
}
tabs[i] = {
...tabs[i],
dgCount: data[index].dgCount,
isdot:isdot
};
}
}
tabs[0].dgCount = count;
this.tabpaneList = tabs;
if(this.Raw_tabpaneList.length==0){
this.Raw_tabpaneList = tabs;
}
},
resetPage() {
this.searchParam.pageSize = 15;
this.searchParam.pageNo = 1;
......@@ -432,55 +573,62 @@ export default {
},
// tab切换
handleClick(val) {
console.log(val.paneName)
this.searchParam.status = val.paneName == 99 ? '' :val.paneName == 27 ? '21': val.paneName;
if(this.fromType==5&&this.searchParam.status){
if(val.paneName==27){
this.searchParam.hasToFollowReason=1
}
else{
this.searchParam.hasToFollowReason=2
console.log("this.tabpaneList", this.tabpaneList);
for (let i = 0; i < this.tabpaneList.length; i++) {
if (this.tabpaneList[i].active == val.paneName) {
this.tabpaneList[i].isdot = false;
this.Raw_tabpaneList[i]=this.tabpaneList[i]
}
}
else{
if(this.searchParam.hasOwnProperty("hasToFollowReason")){
delete this.searchParam.hasToFollowReason
console.log(val.paneName);
this.searchParam.status =
val.paneName == 99 ? "" : val.paneName == 27 ? "21" : val.paneName;
if (this.fromType == 5 && this.searchParam.status) {
if (val.paneName == 27) {
this.searchParam.hasToFollowReason = 1;
} else {
this.searchParam.hasToFollowReason = 2;
}
} else {
if (this.searchParam.hasOwnProperty("hasToFollowReason")) {
delete this.searchParam.hasToFollowReason;
}
}
this.getsearch();
},
// 初始化时间
initTime() {
const {createRangeTime, cancelRangeTime, orderRangeTime, completeRangeTime} = this;
this.setTime('createdTimeBegin','createdTimeEnd', createRangeTime);
this.setTime('cancelTimeBegin','cancelTimeEnd', cancelRangeTime);
this.setTime('appointBeginTime','appointEndTime', orderRangeTime);
this.setTime('doneTimeBegin','doneTimeEnd', completeRangeTime);
const {
createRangeTime,
cancelRangeTime,
orderRangeTime,
completeRangeTime,
} = this;
this.setTime("createdTimeBegin", "createdTimeEnd", createRangeTime);
this.setTime("cancelTimeBegin", "cancelTimeEnd", cancelRangeTime);
this.setTime("appointBeginTime", "appointEndTime", orderRangeTime);
this.setTime("doneTimeBegin", "doneTimeEnd", completeRangeTime);
},
/**
* btime开始时间
* etime结束时间
* arrtime 时间数组
*/
setTime(btime,etime, arrtime) {
arrtime = arrtime || ['',''];
setTime(btime, etime, arrtime) {
arrtime = arrtime || ["", ""];
this.searchParam[btime] = arrtime[0];
this.searchParam[etime] = arrtime[1];
},
// 重置页面后搜索
getsearch() {
this.resetPage();
this.search()
this.search();
},
search() {
this.loading = true;
this.initTime()
this.initTime();
let url = LIST_URL;
this.POST(url, this.searchParam).then((res) => {
this.loading = false;
......@@ -494,11 +642,14 @@ export default {
getDep() {
let url = DEP_URL;
this.GET(url).then((res) => {
if (res.code === '000000') {
this.depList = [{
id: '',
name: '全部'
},...res.data];
if (res.code === "000000") {
this.depList = [
{
id: "",
name: "全部",
},
...res.data,
];
}
});
},
......@@ -508,7 +659,7 @@ export default {
this.cancelRangeTime = "";
this.orderRangeTime = "";
this.completeRangeTime = "";
this.searchParam = Object.assign(this.searchParam,{
this.searchParam = Object.assign(this.searchParam, {
id: "",
operateName: "",
assistantVal: "",
......@@ -522,29 +673,31 @@ export default {
appointBeginTime: "",
appointEndTime: "",
doneTimeBegin: "",
doneTimeEnd: ""
})
doneTimeEnd: "",
});
this.getsearch();
},
// 导出
download() {
let url = DOWN_URL
this.initTime()
let params = this.searchParam
this.POST(url, params).then(res => {
this.loading = false;
if (res.code == "000000") {
this.$confirm('将于24小时内导出成功,是否跳转下载列表页?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
let url = DOWN_URL;
this.initTime();
let params = this.searchParam;
this.POST(url, params)
.then((res) => {
this.loading = false;
if (res.code == "000000") {
this.$confirm("将于24小时内导出成功,是否跳转下载列表页?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.$router.push('/down-list')
})
}
}).catch(err => {
console.log('网络出现点儿问题,稍后重试')
})
this.$router.push("/down-list");
});
}
})
.catch((err) => {
console.log("网络出现点儿问题,稍后重试");
});
},
//设为待问诊
witeDiagnose(row) {
......@@ -560,17 +713,17 @@ export default {
this.operateUserID = row.operateUserId;
},
//查看详情/编辑详情
goDetail(row,flag) {
goDetail(row, flag) {
// this.$router.push({
// path: "/diagnosis-editor",
// query: { id: row.diagnoseLogId, editorType: flag },
// });
let target = this.$refs.target
const { origin, pathname } = window.location
let editorType = flag ? 1 : 2
let u = `${origin}${pathname}#/diagnosis-editor?id=${row.diagnoseLogId}&editorType=${editorType}`
target.setAttribute('href', u)
target.click()
let target = this.$refs.target;
const { origin, pathname } = window.location;
let editorType = flag ? 1 : 2;
let u = `${origin}${pathname}#/diagnosis-editor?id=${row.diagnoseLogId}&editorType=${editorType}`;
target.setAttribute("href", u);
target.click();
},
//取消/退款
cancelRefund(row) {
......@@ -580,9 +733,8 @@ export default {
//设为稍后跟进
witeGo(row) {
this.followupVisible = true;
this.toFollowReason=row.toFollowReason;
this.toFollowReason = row.toFollowReason;
this.diagnoseLogId = row.diagnoseLogId;
},
//设为待匹配医生
waitMatchDot(row) {
......@@ -594,48 +746,62 @@ export default {
// this.triageDepartmentId = row.triageDepartmentId;
// }
// else {
this.diagnosisTimeVisible = true;
this.bizType = 5;
this.diagnosisTimeVisible = true;
this.bizType = 5;
// }
},
//发送消息
sendMessage(row) {
this.$router.push({path: '/diagnosis-im', query: {tid: row.imTeamId}})
this.$router.push({
path: "/diagnosis-im",
query: { tid: row.imTeamId },
});
},
//加入问诊
joinDiagnose(row) {
this.$confirm('确定加入问诊吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
this.$confirm("确定加入问诊吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.clearSession()
this.$router.push({path: '/diagnosis-live', query: {tid: row.imTeamId, diagnoseLogId: row.diagnoseLogId}})
})
this.clearSession();
// this.$router.push({
// path: "/diagnosis-live",
// query: { tid: row.imTeamId, diagnoseLogId: row.diagnoseLogId },
// })
let newpage = this.$router.resolve({
path: "/diagnosis-live",
query: { tid: row.imTeamId, diagnoseLogId: row.diagnoseLogId },
});
window.open(newpage.href, "_blank");
});
},
//匹配运营
matchRun(row) {
this.$confirm('确定匹配并跟进该预约单?', '确定匹配?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
this.$confirm("确定匹配并跟进该预约单?", "确定匹配?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let req = {
id: row.diagnoseLogId,
bizType: 3
}
updateDiagnosis(req).then(function (res) {
if (res.code == "000000") {
// this.cancel();
vm.search();
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.$message.error(error);
});
})
bizType: 3,
};
updateDiagnosis(req)
.then(function (res) {
if (res.code == "000000") {
// this.cancel();
vm.search();
} else {
vm.$message.error(res.message);
}
})
.catch(function (error) {
vm.$message.error(error);
});
});
},
//设为待分诊
waitDiagnose(row) {
......@@ -654,13 +820,11 @@ export default {
this.diagnosisDoctorVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
this.diagnoseType = row.diagnoseType;
if(row.doctorId == 0){
if (row.doctorId == 0) {
this.doctorId = "";
}
else {
} else {
this.doctorId = row.doctorId;
}
},
//重新匹配医生
reMatchDot(row) {
......@@ -687,27 +851,32 @@ export default {
// },
//设为已完成
doneHandle(row) {
this.$confirm('请先确定问诊已结束?再将问诊设为已完成,确定继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$confirm(
"请先确定问诊已结束?再将问诊设为已完成,确定继续?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(() => {
let req = {
id: row.diagnoseLogId,
bizType: 13
}
updateDiagnosis(req).then(function (res) {
if (res.code == "000000") {
// this.cancel();
vm.search();
} else {
vm.$message.error(res.message);
}
}).catch(function (error) {
vm.$message.error(error);
});
})
bizType: 13,
};
updateDiagnosis(req)
.then(function (res) {
if (res.code == "000000") {
// this.cancel();
vm.search();
} else {
vm.$message.error(res.message);
}
})
.catch(function (error) {
vm.$message.error(error);
});
});
},
// 设置科室
setOffice(row) {
......@@ -734,46 +903,82 @@ export default {
// 取消预约
// cancelBtn(row) {},
// 批量设置运营
batchSetOperator(){
if(this.multipleSelection.length == 0){
batchSetOperator() {
if (this.multipleSelection.length == 0) {
this.$message({
message: '请先选择要操作的数据',
type: "warning"
message: "请先选择要操作的数据",
type: "warning",
});
return;
}
this.matchVisible = true;
this.batchFlag = true;
}
},
},
};
</script>
<style lang="scss" scoped>
.diagnosis-list-content {
.component-content {
.select-content {
margin-bottom: 10px;
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
margin-bottom: 20px;
height: 50px;
display: flex;
justify-content: flex-start;
align-items: center;
}
.t-c {
//text-align: center;
.form-container {
display: flex;
justify-content: space-between;
.form-li {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.form-btn {
display: flex;
flex-direction: column;
justify-content: flex-start;
.form-btn-li {
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
.submit-btn {
// width: 150px;
}
}
}
}
.select-bottom {
height: 50px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
color: #0d9078;
}
.btn-wrap {
text-align: right;
}
.submit-btn {
margin-right: 50px;
margin-top: 10px;
&.big-btn {
margin-right: 20px;
}
}
.t-b {
margin-bottom: 10px;
}
}
.component-content {
padding: 10px;
background: #fff;
overflow: hidden !important;
}
}
</style>
<style lang="scss">
.diagnosis-list-content .el-badge__content.is-fixed.is-dot {
right: 5px;
top: 10px;
}
</style>
<template>
<div class="livebox">
<div class="top">
<div class="top-left">
<h1 class="title">{{title}}</h1>
<div class="time-message">
<p>设定时长: {{time}}分钟</p>
<p v-if="startTime && endTime">总时长: {{useTime}}</p>
<p v-if="startTime && endTime">剩余时长: {{loseTime}}</p>
</div>
</div>
<div class="top-right">
<img :src="isMicOn ? voiceSmallImg : voiceCloseImg" alt="" srcset="" class="icon" @click="taggleM">
<div class="out" @click="leave">退出</div>
</div>
<div class="livebox">
<div class="top">
<div class="top-left">
<h1 class="title">{{ title }}</h1>
<div class="time-message">
<p>设定时长: {{ time }}分钟</p>
<p v-if="startTime && endTime">总时长: {{ useTime }}</p>
<p v-if="startTime && endTime">剩余时长: {{ loseTime }}</p>
</div>
<div class="main">
<div class="viedo-wrapper" v-for="(item,index) of memberList" :key="index">
<div class="text">
<p>{{item.name}}</p>
<p>{{item.role == 1 ? '问诊医生' : '接诊医生'}}:</p>
</div>
<div class="viedo">
<div :id="rtc.viewslist[index].id" v-if="rtc && rtc.viewslist[index]">
</div>
<!-- 用户声音icon -->
<img :src="rtc && rtc.viewslist[index] && rtc.viewslist[index].vioce ? voiceSmallImg : voiceCloseImg" alt="" srcset="" class="user-icon" v-if="item.status == 2">
</div>
<div class="top-right">
<img
:src="isMicOn ? voiceSmallImg : voiceCloseImg"
alt=""
srcset=""
class="icon"
@click="taggleM"
/>
<div class="out" @click="leave">退出</div>
</div>
</div>
<div class="main">
<div
class="viedo-wrapper"
v-for="(item, index) of memberList"
:key="index"
>
<div class="text">
<p>{{ item.name }}</p>
<p>{{ item.role == 1 ? "问诊医生" : "接诊医生" }}:</p>
</div>
<div class="viedo">
<div
:id="rtc.viewslist[index].id"
v-if="rtc && rtc.viewslist[index]"
></div>
<!-- 用户声音icon -->
<img
:src="
rtc && rtc.viewslist[index] && rtc.viewslist[index].vioce
? voiceSmallImg
: voiceCloseImg
"
alt=""
srcset=""
class="user-icon"
v-if="item.status == 2"
/>
<img :src="setImg(item.status)" alt="" srcset="" class="video-icon" v-else>
<div class="mask" v-if="rtc && rtc.viewslist[index] && rtc.viewslist[index].mask">
<img :src="type == 1 ? voiceImg : noCameraImg" alt="" :class="{'vocie': type == 1}">
</div>
</div>
<div class="time">
{{
showText(item.status, item.role)
}}
</div>
</div>
<img
:src="setImg(item.status)"
alt=""
srcset=""
class="video-icon"
v-else
/>
<div
class="mask"
v-if="rtc && rtc.viewslist[index] && rtc.viewslist[index].mask"
>
<img
:src="type == 1 ? voiceImg : noCameraImg"
alt=""
:class="{ vocie: type == 1 }"
/>
</div>
</div>
<div class="close" @click="overFn">
结束会话
<div class="time">
<!-- //等待连接还是已经下麦 1为等待 2为进行中 3为下麦 -->
<div class="time-content">
<el-button
class="call-btn"
size="mini"
:disabled="item.status != 1&&item.timeleft == 0"
type="primary"
:loading="item.timeleft>0"
@click="drivingCall(item)"
>
<span v-if="item.timeleft == 0">呼叫{{ item.role == 1 ? "问诊医生" : "接诊医生" }}</span>
<time-left @setItem='setItem($event,item)' v-else :timeleft="item.timeleft"></time-left>
</el-button>
<span>
{{ showText(item.status, item.role) }}
</span>
</div>
</div>
<alert ref='alert'></alert>
</div>
</div>
<div class="close" @click="overFn">结束会话</div>
<alert ref="alert"></alert>
</div>
</template>
<script>
import RtcClient from '@/utils/live/rtc-client.js'
import { getLiveTimeText, countDown, getBroswer, laseTime, lastm } from '@/utils/live'
import RtcClient from "@/utils/live/rtc-client.js";
import {
getLiveTimeText,
countDown,
getBroswer,
laseTime,
lastm,
} from "@/utils/live";
import { openLoading, closeLoading } from "@/utils/utils";
import alert from '@/components/common/alert.vue'
import alert from "@/components/common/alert.vue";
import timeLeft from "@/components/timeLeft";
export default {
components: {
alert
components: {
alert,
timeLeft
},
data() {
return {
closeCallImg: require("../../../assets/image/live/close-call.png"),
voiceCloseImg: require("../../../assets/image/live/voice-close.png"),
voiceSmallImg: require("../../../assets/image/live/voice-small.png"),
voiceImg: require("../../../assets/image/live/voice.png"),
waitingCallImg: require("../../../assets/image/live/waiting-call.png"),
noCameraImg: require("../../../assets/image/live/no-camera.png"),
roleAnchor: "anchor", // 主播
rtc: null,
roomId: "",
sdkAppId: "",
userSig: "",
userId: "",
viedoParams: null,
isMicOn: false,
askTime: 0, // 问诊医生接入时长
answerTime: 0, // 接诊医生接入时长
useTime: 0, // 问诊时长
loseTime: 0, // 问诊剩余时长
askTimeFn: null,
answerTimeFn: null,
useTimeFn: null,
loseTimeFn: null,
type: 2, // 1: 语音 2: 视频
startTime: 0,
endTime: 0,
time: 30, //总时长
memberList: [],
tid: "", // 群id
diagnoseLogId: "", //问诊id
};
},
created() {
this.tid = this.$route.query.tid || "";
this.diagnoseLogId = this.$route.query.diagnoseLogId || "";
openLoading(this);
this.init();
},
computed: {
title() {
return this.type == 1 ? "音频问诊" : "视频问诊";
},
data() {
return {
closeCallImg: require('../../../assets/image/live/close-call.png'),
voiceCloseImg: require('../../../assets/image/live/voice-close.png'),
voiceSmallImg: require('../../../assets/image/live/voice-small.png'),
voiceImg: require('../../../assets/image/live/voice.png'),
waitingCallImg: require('../../../assets/image/live/waiting-call.png'),
noCameraImg: require('../../../assets/image/live/no-camera.png'),
roleAnchor: 'anchor', // 主播
rtc: null,
roomId: '',
sdkAppId: '',
userSig: "",
userId: "",
viedoParams: null,
isMicOn: false,
askTime: 0, // 问诊医生接入时长
answerTime: 0, // 接诊医生接入时长
useTime: 0, // 问诊时长
loseTime: 0, // 问诊剩余时长
askTimeFn:null,
answerTimeFn:null,
useTimeFn:null,
loseTimeFn:null,
type: 2, // 1: 语音 2: 视频
startTime: 0,
endTime: 0,
time: 30, //总时长
memberList: [],
tid: '', // 群id
diagnoseLogId: '' //问诊id
}
},
methods: {
init() {
if (this.checkChrome()) {
this.getViedoParams();
this.getInfo();
} else {
this.$nextTick(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `请下载新版Chrome浏览器`,
})
.then(() => {
closeLoading(this);
this.$router.go(-1);
})
.catch((err) => {
closeLoading(this);
this.$router.go(-1);
});
});
}
},
created() {
this.tid = this.$route.query.tid || '';
this.diagnoseLogId = this.$route.query.diagnoseLogId || '';
openLoading(this)
this.init()
// 设置item
setItem(data,item){
item.timeleft=0
},
computed: {
title(){
return this.type == 1 ? '音频问诊' : '视频问诊'
// 主动呼叫
drivingCall(data) {
// /team/call/direct/{imAccId}呼叫
let url = `/im/team/call/direct/${data.accId}`;
this.POST(url).then((res) => {
if (res.code === "000000") {
data.timeleft=60
} else {
this.$message({
message: res.message,
type: "warning",
});
}
});
},
methods:{
init() {
if(this.checkChrome()) {
this.getViedoParams()
this.getInfo()
} else {
this.$nextTick(() => {
this.$refs.alert.init({
confirmTxt: '我知道了',
title: `请下载新版Chrome浏览器`
})
.then(() => {
closeLoading(this)
this.$router.go(-1)
})
.catch((err) => {
closeLoading(this)
this.$router.go(-1)
})
})
// 获取相关信息
getInfo() {
let url = `/im/team/detail?tid=${this.tid}`;
this.GET(url)
.then((res) => {
if (res.code == "000000") {
let { liveInfo, memberList } = res.data;
if (liveInfo) {
this.startTime = liveInfo.startTimestamp;
this.endTime = liveInfo.endTimestamp;
this.time = lastm(this.startTime, this.endTime);
this.roomId = Number(liveInfo.roomId);
this.type = liveInfo.liveType;
}
},
// 获取相关信息
getInfo() {
let url = `/im/team/detail?tid=${this.tid}`;
this.GET(url).then(res => {
if (res.code == "000000") {
let { liveInfo, memberList } = res.data
if (liveInfo) {
this.startTime = liveInfo.startTimestamp
this.endTime = liveInfo.endTimestamp
this.time = lastm(this.startTime,this.endTime)
this.roomId = Number(liveInfo.roomId)
this.type = liveInfo.liveType
}
if (memberList && memberList.length) {
memberList.forEach((item) => {
//在当前群组中的角色 1: 问诊医生 2: 接诊医生 3: 居民 4: 其他
if (item.role == 1) {
//等待连接还是已经下麦 1为等待 2为进行中 3为下麦
this.memberList[0] = Object.assign(item,{status: 1})
}
if (item.role == 2) {
this.memberList[1] = Object.assign(item,{status: 1})
}
if (item.role == 4) {
this.userId = item.liveUserId
}
})
}
this.getAppId()
} else {
this.getErr()
if (memberList && memberList.length) {
memberList.forEach((item) => {
//在当前群组中的角色 1: 问诊医生 2: 接诊医生 3: 居民 4: 其他
if (item.role == 1) {
//等待连接还是已经下麦 1为等待 2为进行中 3为下麦
this.memberList[0] = Object.assign(item, { status: 1,timeleft:0 });
}
}).catch(() => {
this.getErr()
})
},
// 获取AppId
getAppId() {
let req = {
}
this.GET("/coupler/app/trtc/sdkappid", req)
.then(res => {
if (res.code == "000000") {
this.sdkAppId = res.data.sdkAppId
this.getSing()
}else if (res.code == '200006' || res.code == '200000') {
if(this.rtc) {
this.leave()
}
this.getErr()
}
})
.catch((err) => {
this.getErr()
})
},
// 获取签名
getSing() {
let req = {
sdkAppId: this.sdkAppId,
userId: this.userId
}
this.POST("/coupler/usersig/trtc", req).then(res => {
if (res.code == "000000") {
this.userSig = res.data.userSig
this.clientLogin()
} else if (res.code == '200006' || res.code == '200000') {
if(this.rtc) {
this.leave()
}
this.getErr()
if (item.role == 2) {
this.memberList[1] = Object.assign(item, { status: 1,timeleft:0});
}
})
.catch((err) => {
this.getErr()
})
},
// 创建trtcClient
clientLogin() {
let obj = {
roomId: this.roomId,
role: this.roleAnchor,
sdkAppId: this.sdkAppId,
userId: this.userId,
userSig: this.userSig,
vueInstance: this
}
this.rtc = new RtcClient(obj)
this.$nextTick(() => {
this.$refs.alert.init({
confirmTxt: '我知道了',
title: `为了更好的体验,请保证您输出设备的正常使用`
})
.then(() => {
this.rtc.join()
this.ispending()
let t = setTimeout(() => {
closeLoading(this);
clearTimeout(t)
},1000)
})
.catch((err) => {
this.rtc.join()
this.ispending()
let t = setTimeout(() => {
closeLoading(this);
clearTimeout(t)
},1000)
})
})
},
// 获取视频参数
getViedoParams() {
this.GET('/coupler/app/config/push/stream/params').then((res) => {
if (res.code == '000000') {
this.viedoParams = res.data
} else if (res.code == '200006' || res.code == '200000') {
closeLoading(this)
if (this.rtc) {
this.leave()
}
if (item.role == 4) {
this.userId = item.liveUserId;
}
}).catch((err) => {
console.log('获取视频参数数据失败')
})
},
// 切换话筒
taggleM() {
if (this.isMicOn) {
this.muteLocalAudio()
} else {
this.unmuteLocalAudio()
}
this.isMicOn = !this.isMicOn
},
// 关闭mc
muteLocalAudio() {
this.rtc.muteLocalAudio()
},
// 打开mc
unmuteLocalAudio() {
this.rtc.unmuteLocalAudio()
},
// 显示文案
showText(status,role) {
let text = ''
switch (status) {
case 1:
text = '呼叫中'
break
case 3:
text = '已离线'
break;
default:
text = `已接入: ${ role == 1 ? this.askTime : this.answerTime}`
break
});
}
return text
},
//设置图像 1为等待 2为进行中 3为下麦
setImg(status) {
let img = null
switch (status) {
case 1:
img = this.waitingCallImg
break
case 3:
img = this.closeCallImg
break;
default:
img = this.closeCallImg
break
this.getAppId();
} else {
this.getErr();
}
})
.catch(() => {
this.getErr();
});
},
// 获取AppId
getAppId() {
let req = {};
this.GET("/coupler/app/trtc/sdkappid", req)
.then((res) => {
if (res.code == "000000") {
this.sdkAppId = res.data.sdkAppId;
this.getSing();
} else if (res.code == "200006" || res.code == "200000") {
if (this.rtc) {
this.leave();
}
return img
},
// 用户上线
addNewMember(id) {
this.memberList.forEach(item => {
if (item.liveUserId == id) {
item.status = 2
this.setTime(item.role)
}
})
},
// 用户下线
removeMember(id) {
this.memberList.forEach(item => {
if (item.liveUserId == id) {
item.status = 3
}
})
},
//设置进行时长 1表示为问诊 2为接诊 3为问诊开始 4为问诊结束
setTime(flag) {
let text = ''
switch (flag) {
case 1:
text = 'askTime'
break
case 2:
text = 'answerTime'
break
case 3:
text = 'useTime'
break
case 4:
text = 'loseTime'
break
default:
break
this.getErr();
}
})
.catch((err) => {
this.getErr();
});
},
// 获取签名
getSing() {
let req = {
sdkAppId: this.sdkAppId,
userId: this.userId,
};
this.POST("/coupler/usersig/trtc", req)
.then((res) => {
if (res.code == "000000") {
this.userSig = res.data.userSig;
this.clientLogin();
} else if (res.code == "200006" || res.code == "200000") {
if (this.rtc) {
this.leave();
}
let t = 0
let liveTime = Number(sessionStorage.getItem(`TIME_${text}`) || t)
this[`${text}Fn`] = setInterval(() => {
liveTime += 1000
this[text] = getLiveTimeText(liveTime,text)
this.getErr();
}
})
.catch((err) => {
this.getErr();
});
},
// 创建trtcClient
clientLogin() {
let obj = {
roomId: this.roomId,
role: this.roleAnchor,
sdkAppId: this.sdkAppId,
userId: this.userId,
userSig: this.userSig,
vueInstance: this,
};
this.rtc = new RtcClient(obj);
this.$nextTick(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `为了更好的体验,请保证您输出设备的正常使用`,
})
.then(() => {
this.rtc.join();
this.ispending();
let t = setTimeout(() => {
this.muteLocalAudio();
closeLoading(this);
clearTimeout(t);
}, 1000);
})
.catch((err) => {
this.rtc.join();
this.ispending();
let t = setTimeout(() => {
closeLoading(this);
clearTimeout(t);
}, 1000);
},
// 问诊是否进行中
ispending() {
if (this.startTime < new Date() < this.endTime) {
this.setTime(3)
this.loseTimeFn = setInterval(() => {
this.loseTime = countDown(this.endTime)
let timeObj = laseTime(this.endTime)
if ((timeObj.leftm == 5 || timeObj.leftm == 3 || timeObj.leftm == 1) && timeObj.lefts == 0 && timeObj.lefth == 0) {
this.$nextTick(() => {
this.$refs.alert.init({
confirmTxt: '我知道了',
title: `距离会诊结束还剩不足${timeObj.leftm}分钟`
})
.then(() => {
})
.catch((err) => {
})
})
}
}, 1000);
} else if (new Date() < this.startTime){
let t = setInterval(() => {
if (new Date() > this.startTime) {
clearInterval(t)
this.ispending()
}
}, 1000);
});
});
},
// 获取视频参数
getViedoParams() {
this.GET("/coupler/app/config/push/stream/params")
.then((res) => {
if (res.code == "000000") {
this.viedoParams = res.data;
} else if (res.code == "200006" || res.code == "200000") {
closeLoading(this);
if (this.rtc) {
this.leave();
}
},
// 检查是否为chrome
checkChrome() {
return getBroswer().broswer=='Chrome'
},
// client离开房间
leave() {
this.rtc.leave()
this.clearSession()
this.$router.go(-1)
},
// 结束会话
overFn() {
this.$refs.alert.init({
cancleTxt: '取消',
confirmTxt: '我知道了',
title: `确定要结束会话么?`
})
.then(() => {
this.out()
})
.catch((err) => {
})
},
out() {
let url = `/diagnose/admin/diagnose/endCall/${this.diagnoseLogId}`;
let params = {
};
this.POST(url,params).then(res => {
if (res.code == "000000") {
this.leave()
} else {
this.$refs.alert.init({
confirmTxt: '我知道了',
title: `操作失败,请稍后重试`
})
.then(() => {
})
.catch((err) => {
})
}
}).catch(() => {
this.$refs.alert.init({
confirmTxt: '我知道了',
title: `操作失败,请稍后重试`
})
.then(() => {
})
.catch((err) => {
})
});
},
// 获取信息失败
getErr() {
closeLoading(this)
this.$nextTick(() => {
this.$refs.alert.init({
confirmTxt: '我知道了',
title: `获取信息失败,请稍后重试`
})
.then(() => {
this.$router.go(-1)
})
.catch((err) => {
this.$router.go(-1)
})
})
},
reloadfn(msg) {
}
})
.catch((err) => {
console.log("获取视频参数数据失败");
});
},
// 切换话筒
taggleM() {
if (this.isMicOn) {
this.muteLocalAudio();
} else {
this.unmuteLocalAudio();
}
},
// 关闭mc
muteLocalAudio() {
this.isMicOn = false;
this.rtc.muteLocalAudio();
},
// 打开mc
unmuteLocalAudio() {
this.isMicOn = true;
this.rtc.unmuteLocalAudio();
},
// 显示文案
showText(status, role) {
let text = "";
switch (status) {
case 1:
text = "呼叫中";
break;
case 3:
text = "已离线";
break;
default:
text = `已接入: ${role == 1 ? this.askTime : this.answerTime}`;
break;
}
return text;
},
//设置图像 1为等待 2为进行中 3为下麦
setImg(status) {
let img = null;
switch (status) {
case 1:
img = this.waitingCallImg;
break;
case 3:
img = this.closeCallImg;
break;
default:
img = this.closeCallImg;
break;
}
return img;
},
// 用户上线
addNewMember(id) {
this.memberList.forEach((item) => {
if (item.liveUserId == id) {
item.status = 2;
this.setTime(item.role);
}
});
},
// 用户下线
removeMember(id) {
this.memberList.forEach((item) => {
if (item.liveUserId == id) {
item.status = 3;
}
});
},
//设置进行时长 1表示为问诊 2为接诊 3为问诊开始 4为问诊结束
setTime(flag) {
let text = "";
switch (flag) {
case 1:
text = "askTime";
break;
case 2:
text = "answerTime";
break;
case 3:
text = "useTime";
break;
case 4:
text = "loseTime";
break;
default:
break;
}
let t = 0;
let liveTime = Number(sessionStorage.getItem(`TIME_${text}`) || t);
this[`${text}Fn`] = setInterval(() => {
liveTime += 1000;
this[text] = getLiveTimeText(liveTime, text);
}, 1000);
},
// 问诊是否进行中
ispending() {
if (this.startTime < new Date() < this.endTime) {
this.setTime(3);
this.loseTimeFn = setInterval(() => {
this.loseTime = countDown(this.endTime);
let timeObj = laseTime(this.endTime);
if (
(timeObj.leftm == 5 || timeObj.leftm == 3 || timeObj.leftm == 1) &&
timeObj.lefts == 0 &&
timeObj.lefth == 0
) {
this.$nextTick(() => {
this.$refs.alert.init({
confirmTxt: '我知道了',
title: `加入房间失败,重新加入`
})
.then(() => {
location.reload();
})
.catch((err) => {
location.reload();
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `距离会诊结束还剩不足${timeObj.leftm}分钟`,
})
.then(() => {})
.catch((err) => {});
});
}
}, 1000);
} else if (new Date() < this.startTime) {
let t = setInterval(() => {
if (new Date() > this.startTime) {
clearInterval(t);
this.ispending();
}
}, 1000);
}
},
// 检查是否为chrome
checkChrome() {
return getBroswer().broswer == "Chrome";
},
// client离开房间
leave() {
this.rtc.leave();
this.clearSession();
window.location.href = "about:blank";
window.close();
},
// 结束会话
overFn() {
this.$refs.alert
.init({
cancleTxt: "取消",
confirmTxt: "我知道了",
title: `确定要结束会话么?`,
})
.then(() => {
this.out();
})
.catch((err) => {});
},
out() {
let url = `/diagnose/admin/diagnose/endCall/${this.diagnoseLogId}`;
let params = {};
this.POST(url, params)
.then((res) => {
if (res.code == "000000") {
this.leave();
} else {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `操作失败,请稍后重试`,
})
.then(() => {})
.catch((err) => {});
}
})
.catch(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `操作失败,请稍后重试`,
})
},
clearTime() {
clearInterval(this.askTimeFn)
clearInterval(this.answerTimeFn)
clearInterval(this.useTimeFn)
clearInterval(this.loseTimeFn)
},
// 清除直播时间相关的seession
clearSession() {
sessionStorage.removeItem('TIME_askTime')
sessionStorage.removeItem('TIME_answerTime')
sessionStorage.removeItem('TIME_useTime')
sessionStorage.removeItem('TIME_loseTime')
}
.then(() => {})
.catch((err) => {});
});
},
beforeDestroy() {
this.clearTime()
}
}
// 获取信息失败
getErr() {
closeLoading(this);
this.$nextTick(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `获取信息失败,请稍后重试`,
})
.then(() => {
this.$router.go(-1);
})
.catch((err) => {
this.$router.go(-1);
});
});
},
reloadfn(msg) {
this.$nextTick(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `加入房间失败,重新加入`,
})
.then(() => {
location.reload();
})
.catch((err) => {
location.reload();
});
});
},
clearTime() {
clearInterval(this.askTimeFn);
clearInterval(this.answerTimeFn);
clearInterval(this.useTimeFn);
clearInterval(this.loseTimeFn);
},
// 清除直播时间相关的seession
clearSession() {
sessionStorage.removeItem("TIME_askTime");
sessionStorage.removeItem("TIME_answerTime");
sessionStorage.removeItem("TIME_useTime");
sessionStorage.removeItem("TIME_loseTime");
},
},
beforeDestroy() {
this.clearTime();
},
};
</script>
<style lang="less" scoped>
.livebox {
.livebox {
display: flex;
flex-direction: column;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #000000;
.top {
display: flex;
margin-top: 5%;
justify-content: space-between;
.top-left {
margin-left: 24px;
.title {
width: 72px;
height: 22px;
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 700;
color: #ffffff;
line-height: 22px;
}
.time-message {
margin-top: 20px;
display: flex;
flex-direction: column;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #000000;
.top {
display: flex;
margin-top: 5%;
justify-content: space-between;
.top-left {
margin-left: 24px;
.title {
width: 72px;
height: 22px;
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 700;
color: #FFFFFF;
line-height: 22px;
}
.time-message {
margin-top: 20px;
display: flex;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 20px;
p {
margin-right: 20px;
}
}
}
.top-right {
margin: 15px 25px 0 0;
display: flex;
.icon {
width: 32px;
height: 32px;
border-radius: 50%;
cursor: pointer;
}
.out {
width: 102px;
height: 32px;
border-radius: 2px;
border: 1px solid #FFFFFF;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
text-align: center;
line-height: 32px;
margin-left: 20px;
cursor: pointer;
}
}
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 20px;
p {
margin-right: 20px;
}
.main {
margin-top: 24px;
}
}
.top-right {
margin: 15px 25px 0 0;
display: flex;
.icon {
width: 32px;
height: 32px;
border-radius: 50%;
cursor: pointer;
}
.out {
width: 102px;
height: 32px;
border-radius: 2px;
border: 1px solid #ffffff;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
text-align: center;
line-height: 32px;
margin-left: 20px;
cursor: pointer;
}
}
}
.main {
margin-top: 24px;
display: flex;
flex: 1;
.viedo-wrapper {
display: flex;
width: 49%;
height: 50vh;
background: #2d2d2d;
&:first-of-type {
margin-right: 2%;
}
.text {
display: flex;
flex-direction: column-reverse;
width: 112px;
margin-left: 24px;
color: #fff;
padding-bottom: 20px;
}
.time {
display: flex;
flex-direction: column-reverse;
padding-bottom: 20px;
width: 100px;
margin-right: 24px;
margin-left: 5px;
color: #fff;
.time-content {
.call-btn {
display: flex;
flex: 1;
.viedo-wrapper {
display: flex;
width: 49%;
height: 50vh;
background: #2D2D2D;
&:first-of-type {
margin-right: 2%;
}
.text {
display: flex;
flex-direction: column-reverse;
width: 112px;
margin-left: 24px;
color: #fff;
padding-bottom: 20px;
}
.time {
display: flex;
flex-direction: column-reverse;
padding-bottom: 20px;
width: 100px;
margin-right: 24px;
margin-left: 5px;
color: #fff;
}
.viedo {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
position: relative;
.user-icon {
position: absolute;
right: 0;
bottom: 20px;
display: block;
width: 32px;
height: 32px;
z-index: 100;
}
&> div {
height: 100%;
width: 100%;
video {
width: 100%;
height: 100%;
}
}
.video-icon {
width: 96px;
height: 96px;
}
.mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #2D2D2D;
display: flex;
justify-content: center;
align-items: center;
img {
display: block;
width: 93px;
height: 125px;
}
.vocie {
width: 93px;
height: 93px;
}
}
}
}
justify-content: center;
align-items: center;
min-width: 100px;
margin-bottom: 5px;
}
font-size: 12px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-end;
}
}
.viedo {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
position: relative;
.user-icon {
position: absolute;
right: 0;
bottom: 20px;
display: block;
width: 32px;
height: 32px;
z-index: 100;
}
.close {
width: 102px;
height: 32px;
background: #FF4D4F;
border-radius: 2px;
font-size: 14px;
color: #FFFFFF;
line-height: 32px;
text-align: center;
margin: 15px auto 6%;
cursor: pointer;
& > div {
height: 100%;
width: 100%;
video {
width: 100%;
height: 100%;
}
}
.video-icon {
width: 96px;
height: 96px;
}
.mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #2d2d2d;
display: flex;
justify-content: center;
align-items: center;
img {
display: block;
width: 93px;
height: 125px;
}
.vocie {
width: 93px;
height: 93px;
}
}
}
}
</style>
\ No newline at end of file
}
.close {
width: 102px;
height: 32px;
background: #ff4d4f;
border-radius: 2px;
font-size: 14px;
color: #ffffff;
line-height: 32px;
text-align: center;
margin: 15px auto 6%;
cursor: pointer;
}
}
</style>
<template>
<div class="operation">
<el-alert
:closable="false"
title="注:去掉勾选后,系统将自动不分配给该人员,请谨慎操作"
type="info"
>
</el-alert>
<div class="checkbox-container">
<el-checkbox-group v-model="checklist" @change="changefuc" size="medium">
<div class="checkbox-content">
<div class="checkbox-item" v-for="(item, index) in adminList" :key="index">
<el-checkbox :label="item.id">{{ item.name }}</el-checkbox>
</div>
</div>
</el-checkbox-group>
</div>
<div class="bottom-button">
<el-button @click="cancel">取消</el-button>
<el-button @click="sumbitmatch" type="primary">确定</el-button>
</div>
</div>
</template>
<script>
const GET_MATCH_URL = "/diagnose/match/1/";
const SET_MATCH_URL = "/diagnose/match/";
export default {
data() {
return {
checklist: [],
adminList: [],
};
},
mounted() {
this.getCheckList();
this.getAdminList()
},
methods: {
cancel(){
this.$confirm('取消后将不保存本次操作内容', '确认取消吗?',{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.getCheckList()
})
},
changefuc(){
// console.log("checklist",this.checklist)
},
sumbitmatch(){
let url= SET_MATCH_URL
let params={
bizType:1,
userIds:this.checklist
}
this.POST(url,params)
.then((res) => {
if (res.code == "000000") {
this.$message.success('保存成功');
}
})
.catch((err) => {
console.log("网络出现点儿问题,稍后重试");
});
},
// 设置选中
getCheckList() {
let url = GET_MATCH_URL;
this.GET(url)
.then((res) => {
if (res.code == "000000") {
this.checklist=res.data
}
})
.catch((err) => {
console.log("网络出现点儿问题,稍后重试");
});
},
getAdminList() {
let url = `/diagnose/admin/diagnose/operator/query`;
let params = {
token: localStorage.getItem("token"),
};
this.GET(url, null).then((res) => {
if (res.code == "000000") {
this.adminList = res.data;
}
});
},
},
};
</script>
<style lang="less" scoped>
.operation {
min-height: 80%;
padding: 20px;
background: #ffff;
.checkbox-container {
margin-top: 20px;
.checkbox-content{
display: flex;
flex-direction: row;
justify-content: flex-start;
flex-wrap: wrap;
.checkbox-item{
width: 200px;
margin-bottom: 10px;
}
}
}
.bottom-button{
display: flex;
justify-content: center;
align-items: center;
}
}
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册