提交 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 ...@@ -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 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 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 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 [{ export default [{
path: '/', path: '/',
component: App, component: App,
...@@ -45,6 +45,9 @@ export default [{ ...@@ -45,6 +45,9 @@ export default [{
}, { }, {
path: '/down-list', path: '/down-list',
component: downList component: downList
},{
path: '/operation',
component: operation
} }
] ]
}] }]
...@@ -2,6 +2,7 @@ const common = { ...@@ -2,6 +2,7 @@ const common = {
state: { state: {
_token: '', _token: '',
isFromAssignTask: false, isFromAssignTask: false,
time:null,
}, },
mutations: { mutations: {
CHANGE_TOKEN: (state, data) => { CHANGE_TOKEN: (state, data) => {
...@@ -9,12 +10,19 @@ const common = { ...@@ -9,12 +10,19 @@ const common = {
}, },
SET_IS_FROM_ASSIGN_TASK: (state, status) => { SET_IS_FROM_ASSIGN_TASK: (state, status) => {
state.isFromAssignTask = status; state.isFromAssignTask = status;
},
SET_TIME(state,data){
state.time = data
} }
}, },
actions: { actions: {
changeToken({ commit }, tokenData) { changeToken({ commit }, tokenData) {
commit('CHANGE_TOKEN', tokenData) commit('CHANGE_TOKEN', tokenData)
}, },
changeTime({ commit }, time) {
commit('SET_TIME', tokenData)
},
} }
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
const getters = { const getters = {
_token: state => state.common._token, _token: state => state.common._token,
isFromAssignTask: state => state.common.isFromAssignTask, isFromAssignTask: state => state.common.isFromAssignTask,
time:state => state.common.time,
} }
export default getters export default getters
<template> <template>
<div class="diagnosis-list-content"> <div class="diagnosis-list-content">
<div class="component-content screenSet" id="screenSet"> <div class="select-content screenSet">
<div class="title">咨询订单管理后台</div> <div class="title">咨询订单管理后台</div>
<el-form <el-form
...@@ -10,8 +10,10 @@ ...@@ -10,8 +10,10 @@
label-width="80px" label-width="80px"
ref="searchParam" ref="searchParam"
> >
<el-row :gutter="10" type="flex" justify="center"> <el-collapse-transition>
<el-col :span="8" class="t-c"> <div v-show="isUp" class="form-container">
<div class="form-li">
<div>
<el-form-item label="订单搜索" class="t-b"> <el-form-item label="订单搜索" class="t-b">
<el-input <el-input
v-model.trim="searchParam.id" v-model.trim="searchParam.id"
...@@ -20,40 +22,8 @@ ...@@ -20,40 +22,8 @@
style="width: 220px" style="width: 220px"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </div>
<el-col :span="8" class="t-c"> <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>
</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-form-item label="分诊科室" class="t-b">
<el-select <el-select
v-model="searchParam.triageDepartmentId" v-model="searchParam.triageDepartmentId"
...@@ -69,8 +39,35 @@ ...@@ -69,8 +39,35 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </div>
<el-col :span="8" class="t-c"> <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-form-item label="预约类型" class="t-b">
<el-select <el-select
v-model="searchParam.diagnoseType" v-model="searchParam.diagnoseType"
...@@ -85,27 +82,11 @@ ...@@ -85,27 +82,11 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </div>
<el-col :span="8" class="t-c"> <div>
<el-form-item label="预约来源" class="t-b"> <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 <el-date-picker
v-model="createRangeTime" v-model="cancelRangeTime"
type="daterange" type="daterange"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="-" range-separator="-"
...@@ -116,25 +97,36 @@ ...@@ -116,25 +97,36 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </div>
</el-row> </div>
<el-row :gutter="10" type="flex" justify="center"> <div class="form-li">
<el-col :span="8" class="t-c"> <div>
<el-form-item label="退款日期" class="t-b"> <el-form-item label="助诊医生" class="t-b">
<el-date-picker <el-input
v-model="cancelRangeTime" v-model.trim="searchParam.assistantVal"
type="daterange" clearable
value-format="yyyy-MM-dd" placeholder="请输入姓名或电话"
range-separator="-" style="width: 220px"
start-placeholder="开始日期" ></el-input>
end-placeholder="结束日期" </el-form-item>
</div>
<div>
<el-form-item label="预约来源" class="t-b">
<el-select
v-model="searchParam.appointSource"
placeholder="请选择预约来源"
style="width: 220px" style="width: 220px"
:picker-options="pickerOptions1"
> >
</el-date-picker> <el-option
v-for="item of sourceList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </div>
<el-col :span="8" class="t-c"> <div>
<el-form-item label="预约日期" class="t-b"> <el-form-item label="预约日期" class="t-b">
<el-date-picker <el-date-picker
v-model="orderRangeTime" v-model="orderRangeTime"
...@@ -147,8 +139,20 @@ ...@@ -147,8 +139,20 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </div>
<el-col :span="8" class="t-c"> </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-form-item label="完成时间" class="t-b">
<el-date-picker <el-date-picker
v-model="completeRangeTime" v-model="completeRangeTime"
...@@ -162,34 +166,56 @@ ...@@ -162,34 +166,56 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </div>
<el-col :span="8" class="btn-wrap"> </div>
<div class="form-btn">
<div class="form-btn-li">
<el-button type="primary" class="submit-btn" @click="getsearch" <el-button type="primary" class="submit-btn" @click="getsearch"
>搜索</el-button >搜索</el-button
> >
<el-button type="warning" class="submit-btn" @click="reset" <el-button type="warning" class="submit-btn" @click="reset"
>重置</el-button >重置</el-button
> >
</el-col> </div>
</el-row> <div class="form-btn-li">
<el-row :gutter="5" type="flex" justify="center" align="center"> <el-button
<el-col :span="24" class="btn-wrap"> type="success"
<el-button type="success" class="submit-btn big-btn" @click="batchSetOperator" v-if="searchParam.menuType == 1" class="submit-btn big-btn"
>批量设置运营</el-button> @click="batchSetOperator"
v-if="searchParam.menuType == 1"
>批量设置运营</el-button
>
<el-button type="info" class="submit-btn" @click="download" <el-button type="info" class="submit-btn" @click="download"
>全部导出</el-button >全部导出</el-button
> >
</el-col> </div>
</el-row> </div>
</div>
</el-collapse-transition>
</el-form> </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 <el-tab-pane
:label="item.label" :label="item.label"
:name="item.active" :name="item.active"
v-for="item in tabpaneList" v-for="item in tabpaneList"
:key="item.active" :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 <table-component
:menuType="searchParam.menuType" :menuType="searchParam.menuType"
:tData="tableData" :tData="tableData"
...@@ -220,27 +246,81 @@ ...@@ -220,27 +246,81 @@
></table-component> ></table-component>
</el-tab-pane> </el-tab-pane>
</el-tabs> </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> <followup-component
<matching-doctor @search="search" :doctorVisible.sync="doctorVisible" :diagnoseLogId="diagnoseLogId" :triageDepartmentId="triageDepartmentId" :bizType="bizType"></matching-doctor> @search="search"
<diagnosis-component @search="search" :diagnosisVisible.sync="diagnosisVisible" :diagnoseLogId="diagnoseLogId"></diagnosis-component> :followupVisible.sync="followupVisible"
<coordinating-doctor @search="search" :coordinatingVisible.sync="coordinatingVisible" :diagnoseLogId="diagnoseLogId" :bizType="bizType"></coordinating-doctor> :toFollowReason="toFollowReason"
<diagnosis-doctor @search="search" :diagnosisDoctorVisible.sync="diagnosisDoctorVisible" :diagnoseLogId="diagnoseLogId" :diagnoseType="diagnoseType" :doctorId="doctorId"></diagnosis-doctor> :diagnoseLogId="diagnoseLogId"
<appointment-time @search="search" :appointmentTimeVisible.sync="appointmentTimeVisible" :diagnoseLogId="diagnoseLogId" :bizType="bizType"></appointment-time> ></followup-component>
<diagnosis-time @search="search" :diagnosisTimeVisible.sync="diagnosisTimeVisible" :diagnoseLogId="diagnoseLogId" :bizType="bizType"></diagnosis-time> <matching-doctor
<rematching-doctor @search="search" :rematchingVisible.sync="rematchingVisible" :diagnoseLogId="diagnoseLogId" :bizType="bizType"></rematching-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> </div>
<a class="target" href="" target="_blank" ref="target"></a> <a class="target" href="" target="_blank" ref="target"></a>
</div> </div>
</template> </template>
<script> <script>
let vm = null; let vm = null;
import {updateDiagnosis} from "../../../utils/diagnosis"; import { updateDiagnosis } from "../../../utils/diagnosis";
const DOWN_URL= '/diagnose/admin/diagnose/export'; const DOWN_URL = "/diagnose/admin/diagnose/export";
const LIST_URL= '/diagnose/admin/diagnose/list'; const LIST_URL = "/diagnose/admin/diagnose/list";
const DEP_URL= '/hospital/departments/0' const COUNT_QUERY = "/diagnose/admin/diagnose/countQuery";
const DEP_URL = "/hospital/departments/0";
import TableComponent from "@/components/list/table-c"; import TableComponent from "@/components/list/table-c";
import { import {
TYPE_LIST, TYPE_LIST,
...@@ -250,18 +330,18 @@ import { ...@@ -250,18 +330,18 @@ import {
TRIAGE_TAB_LIST, TRIAGE_TAB_LIST,
RECEPTION_TAB_LIST, RECEPTION_TAB_LIST,
RUN_TAB_LIST, RUN_TAB_LIST,
MATCH_TAB_LIST MATCH_TAB_LIST,
} from "@/utils/constants"; } from "@/utils/constants";
import MatchComponent from '@/components/common/match' import MatchComponent from "@/components/common/match";
import RefundComponent from '@/components/common/refund' import RefundComponent from "@/components/common/refund";
import FollowupComponent from "../../../components/common/followup"; import FollowupComponent from "../../../components/common/followup";
import MatchingDoctor from "../../../components/common/matching-doctor" import MatchingDoctor from "../../../components/common/matching-doctor";
import DiagnosisComponent from "../../../components/common/diagnosis" import DiagnosisComponent from "../../../components/common/diagnosis";
import CoordinatingDoctor from "../../../components/common/coordinating-doctor" import CoordinatingDoctor from "../../../components/common/coordinating-doctor";
import DiagnosisDoctor from "../../../components/common/diagnosis-doctor" import DiagnosisDoctor from "../../../components/common/diagnosis-doctor";
import AppointmentTime from "../../../components/common/appointment-time" import AppointmentTime from "../../../components/common/appointment-time";
import DiagnosisTime from "../../../components/common/diagnosis-time" import DiagnosisTime from "../../../components/common/diagnosis-time";
import RematchingDoctor from "../../../components/common/rematching-doctor" import RematchingDoctor from "../../../components/common/rematching-doctor";
export default { export default {
components: { components: {
TableComponent, TableComponent,
...@@ -274,19 +354,21 @@ export default { ...@@ -274,19 +354,21 @@ export default {
DiagnosisDoctor, DiagnosisDoctor,
AppointmentTime, AppointmentTime,
DiagnosisTime, DiagnosisTime,
RematchingDoctor RematchingDoctor,
}, },
data() { data() {
return { return {
isUp: true,
endFlag: false, endFlag: false,
beginFlag: false, beginFlag: false,
loading: false, loading: false,
activeName: "99", activeName: "99",
createRangeTime: '', createRangeTime: "",
cancelRangeTime: '', cancelRangeTime: "",
orderRangeTime: '', orderRangeTime: "",
completeRangeTime: '', completeRangeTime: "",
depList: [], depList: [],
tabrefresh:true,
searchParam: { searchParam: {
id: "", id: "",
operateName: "", operateName: "",
...@@ -305,35 +387,37 @@ export default { ...@@ -305,35 +387,37 @@ export default {
pageSize: 15, pageSize: 15,
pageNo: 1, pageNo: 1,
menuType: 1, // 菜单类型:1、all 2、运营 3、待分诊 4、待接诊 5、外呼 menuType: 1, // 菜单类型:1、all 2、运营 3、待分诊 4、待接诊 5、外呼
status: '' status: "",
}, },
alltabslist: [],
tyleList: TYPE_LIST, tyleList: TYPE_LIST,
fllowList: IS_FLLOW, fllowList: IS_FLLOW,
sourceList: SOURCE_LIST, sourceList: SOURCE_LIST,
tabpaneList: [], tabpaneList: [],
Raw_tabpaneList: [],
tableData: [], tableData: [],
totalRows: 0, totalRows: 0,
timeClickFlag: true, timeClickFlag: true,
tableHeight: 500, tableHeight: 500,
diagnoseLogId: 0, diagnoseLogId: 0,
toFollowReason:'', toFollowReason: "",
matchVisible:false, matchVisible: false,
refundVisible:false, refundVisible: false,
followupVisible:false, followupVisible: false,
doctorVisible:false, doctorVisible: false,
diagnosisVisible:false, diagnosisVisible: false,
coordinatingVisible:false, coordinatingVisible: false,
diagnosisDoctorVisible:false, diagnosisDoctorVisible: false,
appointmentTimeVisible:false, appointmentTimeVisible: false,
diagnosisTimeVisible:false, diagnosisTimeVisible: false,
rematchingVisible:false, rematchingVisible: false,
multipleSelection:[], multipleSelection: [],
batchFlag:false, batchFlag: false,
bizType:0, bizType: 0,
diagnoseType:0, diagnoseType: 0,
doctorId:0, doctorId: 0,
operateUserID:"", operateUserID: "",
triageDepartmentId:0, triageDepartmentId: 0,
pickerOptions1: { pickerOptions1: {
disabledDate: (time) => { disabledDate: (time) => {
return time.getTime() > new Date().getTime(); //减去一天的时间代表可以选择同一天; return time.getTime() > new Date().getTime(); //减去一天的时间代表可以选择同一天;
...@@ -344,38 +428,71 @@ export default { ...@@ -344,38 +428,71 @@ export default {
return time.getTime() < new Date().getTime(); //减去一天的时间代表可以选择同一天; return time.getTime() < new Date().getTime(); //减去一天的时间代表可以选择同一天;
}, },
}, },
timer: null,
fromType: 0, //1或不传为为预约单列表 2为运营预约单列表 3为分诊台 4为接诊台 fromType: 0, //1或不传为为预约单列表 2为运营预约单列表 3为分诊台 4为接诊台
}; };
}, },
watch: { watch: {
'$route': { $route: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
if (newVal) { if (newVal) {
this.init() this.init();
this.reset() this.reset();
} }
}, },
deep: true, deep: true,
immediate: true, immediate: true,
} },
}, },
created() { created() {
vm = this; vm = this;
this.getDep() this.getDep();
}, },
mounted() { mounted() {
this.setTableHeight(); this.setTableHeight();
}, },
methods: { 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.fromType = +(this.$route.query.fromType || 1);
this.activeName = "99"; this.activeName = "99";
this.searchParam.status = ''; this.searchParam.status = "";
this.setTable(); this.Raw_tabpaneList=[]
this.getTabs();
this.contrastData();
}, },
// 不同也main切换不同的tab // 不同也main切换不同的tab
setTable() { setTable(data) {
let tabs = ALL_TAB_LIST; let tabs = ALL_TAB_LIST;
switch (this.fromType) { switch (this.fromType) {
case 1: case 1:
tabs = ALL_TAB_LIST; tabs = ALL_TAB_LIST;
...@@ -402,8 +519,32 @@ export default { ...@@ -402,8 +519,32 @@ export default {
this.searchParam.menuType = 1; this.searchParam.menuType = 1;
break; 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; this.tabpaneList = tabs;
if(this.Raw_tabpaneList.length==0){
this.Raw_tabpaneList = tabs;
}
}, },
resetPage() { resetPage() {
this.searchParam.pageSize = 15; this.searchParam.pageSize = 15;
this.searchParam.pageNo = 1; this.searchParam.pageNo = 1;
...@@ -432,55 +573,62 @@ export default { ...@@ -432,55 +573,62 @@ export default {
}, },
// tab切换 // tab切换
handleClick(val) { handleClick(val) {
console.log(val.paneName) console.log("this.tabpaneList", this.tabpaneList);
this.searchParam.status = val.paneName == 99 ? '' :val.paneName == 27 ? '21': val.paneName; for (let i = 0; i < this.tabpaneList.length; i++) {
if(this.fromType==5&&this.searchParam.status){ if (this.tabpaneList[i].active == val.paneName) {
if(val.paneName==27){ this.tabpaneList[i].isdot = false;
this.searchParam.hasToFollowReason=1 this.Raw_tabpaneList[i]=this.tabpaneList[i]
} }
else{
this.searchParam.hasToFollowReason=2
} }
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{ } else {
if(this.searchParam.hasOwnProperty("hasToFollowReason")){ if (this.searchParam.hasOwnProperty("hasToFollowReason")) {
delete this.searchParam.hasToFollowReason delete this.searchParam.hasToFollowReason;
} }
} }
this.getsearch(); this.getsearch();
}, },
// 初始化时间 // 初始化时间
initTime() { initTime() {
const {createRangeTime, cancelRangeTime, orderRangeTime, completeRangeTime} = this; const {
this.setTime('createdTimeBegin','createdTimeEnd', createRangeTime); createRangeTime,
this.setTime('cancelTimeBegin','cancelTimeEnd', cancelRangeTime); cancelRangeTime,
this.setTime('appointBeginTime','appointEndTime', orderRangeTime); orderRangeTime,
this.setTime('doneTimeBegin','doneTimeEnd', completeRangeTime); completeRangeTime,
} = this;
this.setTime("createdTimeBegin", "createdTimeEnd", createRangeTime);
this.setTime("cancelTimeBegin", "cancelTimeEnd", cancelRangeTime);
this.setTime("appointBeginTime", "appointEndTime", orderRangeTime);
this.setTime("doneTimeBegin", "doneTimeEnd", completeRangeTime);
}, },
/** /**
* btime开始时间 * btime开始时间
* etime结束时间 * etime结束时间
* arrtime 时间数组 * arrtime 时间数组
*/ */
setTime(btime,etime, arrtime) { setTime(btime, etime, arrtime) {
arrtime = arrtime || ['','']; arrtime = arrtime || ["", ""];
this.searchParam[btime] = arrtime[0]; this.searchParam[btime] = arrtime[0];
this.searchParam[etime] = arrtime[1]; this.searchParam[etime] = arrtime[1];
}, },
// 重置页面后搜索 // 重置页面后搜索
getsearch() { getsearch() {
this.resetPage(); this.resetPage();
this.search() this.search();
}, },
search() { search() {
this.loading = true; this.loading = true;
this.initTime() this.initTime();
let url = LIST_URL; let url = LIST_URL;
this.POST(url, this.searchParam).then((res) => { this.POST(url, this.searchParam).then((res) => {
this.loading = false; this.loading = false;
...@@ -494,11 +642,14 @@ export default { ...@@ -494,11 +642,14 @@ export default {
getDep() { getDep() {
let url = DEP_URL; let url = DEP_URL;
this.GET(url).then((res) => { this.GET(url).then((res) => {
if (res.code === '000000') { if (res.code === "000000") {
this.depList = [{ this.depList = [
id: '', {
name: '全部' id: "",
},...res.data]; name: "全部",
},
...res.data,
];
} }
}); });
}, },
...@@ -508,7 +659,7 @@ export default { ...@@ -508,7 +659,7 @@ export default {
this.cancelRangeTime = ""; this.cancelRangeTime = "";
this.orderRangeTime = ""; this.orderRangeTime = "";
this.completeRangeTime = ""; this.completeRangeTime = "";
this.searchParam = Object.assign(this.searchParam,{ this.searchParam = Object.assign(this.searchParam, {
id: "", id: "",
operateName: "", operateName: "",
assistantVal: "", assistantVal: "",
...@@ -522,29 +673,31 @@ export default { ...@@ -522,29 +673,31 @@ export default {
appointBeginTime: "", appointBeginTime: "",
appointEndTime: "", appointEndTime: "",
doneTimeBegin: "", doneTimeBegin: "",
doneTimeEnd: "" doneTimeEnd: "",
}) });
this.getsearch(); this.getsearch();
}, },
// 导出 // 导出
download() { download() {
let url = DOWN_URL let url = DOWN_URL;
this.initTime() this.initTime();
let params = this.searchParam let params = this.searchParam;
this.POST(url, params).then(res => { this.POST(url, params)
.then((res) => {
this.loading = false; this.loading = false;
if (res.code == "000000") { if (res.code == "000000") {
this.$confirm('将于24小时内导出成功,是否跳转下载列表页?', '提示', { this.$confirm("将于24小时内导出成功,是否跳转下载列表页?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
this.$router.push('/down-list') this.$router.push("/down-list");
}) });
} }
}).catch(err => {
console.log('网络出现点儿问题,稍后重试')
}) })
.catch((err) => {
console.log("网络出现点儿问题,稍后重试");
});
}, },
//设为待问诊 //设为待问诊
witeDiagnose(row) { witeDiagnose(row) {
...@@ -560,17 +713,17 @@ export default { ...@@ -560,17 +713,17 @@ export default {
this.operateUserID = row.operateUserId; this.operateUserID = row.operateUserId;
}, },
//查看详情/编辑详情 //查看详情/编辑详情
goDetail(row,flag) { goDetail(row, flag) {
// this.$router.push({ // this.$router.push({
// path: "/diagnosis-editor", // path: "/diagnosis-editor",
// query: { id: row.diagnoseLogId, editorType: flag }, // query: { id: row.diagnoseLogId, editorType: flag },
// }); // });
let target = this.$refs.target let target = this.$refs.target;
const { origin, pathname } = window.location const { origin, pathname } = window.location;
let editorType = flag ? 1 : 2 let editorType = flag ? 1 : 2;
let u = `${origin}${pathname}#/diagnosis-editor?id=${row.diagnoseLogId}&editorType=${editorType}` let u = `${origin}${pathname}#/diagnosis-editor?id=${row.diagnoseLogId}&editorType=${editorType}`;
target.setAttribute('href', u) target.setAttribute("href", u);
target.click() target.click();
}, },
//取消/退款 //取消/退款
cancelRefund(row) { cancelRefund(row) {
...@@ -580,9 +733,8 @@ export default { ...@@ -580,9 +733,8 @@ export default {
//设为稍后跟进 //设为稍后跟进
witeGo(row) { witeGo(row) {
this.followupVisible = true; this.followupVisible = true;
this.toFollowReason=row.toFollowReason; this.toFollowReason = row.toFollowReason;
this.diagnoseLogId = row.diagnoseLogId; this.diagnoseLogId = row.diagnoseLogId;
}, },
//设为待匹配医生 //设为待匹配医生
waitMatchDot(row) { waitMatchDot(row) {
...@@ -600,42 +752,56 @@ export default { ...@@ -600,42 +752,56 @@ export default {
}, },
//发送消息 //发送消息
sendMessage(row) { sendMessage(row) {
this.$router.push({path: '/diagnosis-im', query: {tid: row.imTeamId}}) this.$router.push({
path: "/diagnosis-im",
query: { tid: row.imTeamId },
});
}, },
//加入问诊 //加入问诊
joinDiagnose(row) { joinDiagnose(row) {
this.$confirm('确定加入问诊吗?', '提示', { this.$confirm("确定加入问诊吗?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
this.clearSession() this.clearSession();
this.$router.push({path: '/diagnosis-live', query: {tid: row.imTeamId, diagnoseLogId: row.diagnoseLogId}})
}) // 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) { matchRun(row) {
this.$confirm('确定匹配并跟进该预约单?', '确定匹配?', { this.$confirm("确定匹配并跟进该预约单?", "确定匹配?", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
let req = { let req = {
id: row.diagnoseLogId, id: row.diagnoseLogId,
bizType: 3 bizType: 3,
} };
updateDiagnosis(req).then(function (res) { updateDiagnosis(req)
.then(function (res) {
if (res.code == "000000") { if (res.code == "000000") {
// this.cancel(); // this.cancel();
vm.search(); vm.search();
} else { } else {
vm.$message.error(res.message); vm.$message.error(res.message);
} }
}).catch(function (error) { })
.catch(function (error) {
vm.$message.error(error); vm.$message.error(error);
}); });
});
})
}, },
//设为待分诊 //设为待分诊
waitDiagnose(row) { waitDiagnose(row) {
...@@ -654,13 +820,11 @@ export default { ...@@ -654,13 +820,11 @@ export default {
this.diagnosisDoctorVisible = true; this.diagnosisDoctorVisible = true;
this.diagnoseLogId = row.diagnoseLogId; this.diagnoseLogId = row.diagnoseLogId;
this.diagnoseType = row.diagnoseType; this.diagnoseType = row.diagnoseType;
if(row.doctorId == 0){ if (row.doctorId == 0) {
this.doctorId = ""; this.doctorId = "";
} } else {
else {
this.doctorId = row.doctorId; this.doctorId = row.doctorId;
} }
}, },
//重新匹配医生 //重新匹配医生
reMatchDot(row) { reMatchDot(row) {
...@@ -687,27 +851,32 @@ export default { ...@@ -687,27 +851,32 @@ export default {
// }, // },
//设为已完成 //设为已完成
doneHandle(row) { doneHandle(row) {
this.$confirm('请先确定问诊已结束?再将问诊设为已完成,确定继续?', '提示', { this.$confirm(
confirmButtonText: '确定', "请先确定问诊已结束?再将问诊设为已完成,确定继续?",
cancelButtonText: '取消', "提示",
type: 'warning' {
}).then(() => { confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(() => {
let req = { let req = {
id: row.diagnoseLogId, id: row.diagnoseLogId,
bizType: 13 bizType: 13,
} };
updateDiagnosis(req).then(function (res) { updateDiagnosis(req)
.then(function (res) {
if (res.code == "000000") { if (res.code == "000000") {
// this.cancel(); // this.cancel();
vm.search(); vm.search();
} else { } else {
vm.$message.error(res.message); vm.$message.error(res.message);
} }
}).catch(function (error) { })
.catch(function (error) {
vm.$message.error(error); vm.$message.error(error);
}); });
});
})
}, },
// 设置科室 // 设置科室
setOffice(row) { setOffice(row) {
...@@ -734,46 +903,82 @@ export default { ...@@ -734,46 +903,82 @@ export default {
// 取消预约 // 取消预约
// cancelBtn(row) {}, // cancelBtn(row) {},
// 批量设置运营 // 批量设置运营
batchSetOperator(){ batchSetOperator() {
if(this.multipleSelection.length == 0){ if (this.multipleSelection.length == 0) {
this.$message({ this.$message({
message: '请先选择要操作的数据', message: "请先选择要操作的数据",
type: "warning" type: "warning",
}); });
return; return;
} }
this.matchVisible = true; this.matchVisible = true;
this.batchFlag = true; this.batchFlag = true;
} },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.diagnosis-list-content { .diagnosis-list-content {
.component-content { .select-content {
margin-bottom: 10px;
padding: 10px; padding: 10px;
background: #fff; background: #fff;
overflow: hidden !important; overflow: hidden !important;
.title { .title {
height: 50px;
display: flex;
justify-content: flex-start;
align-items: 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; margin-bottom: 20px;
.submit-btn {
// width: 150px;
} }
.t-c {
//text-align: center;
} }
.btn-wrap {
text-align: right;
} }
.submit-btn {
margin-right: 50px;
margin-top: 10px;
&.big-btn {
margin-right: 20px;
} }
.select-bottom {
height: 50px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
color: #0d9078;
} }
.btn-wrap {
text-align: right;
}
.t-b { .t-b {
margin-bottom: 10px; 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> </style>
...@@ -2,69 +2,124 @@ ...@@ -2,69 +2,124 @@
<div class="livebox"> <div class="livebox">
<div class="top"> <div class="top">
<div class="top-left"> <div class="top-left">
<h1 class="title">{{title}}</h1> <h1 class="title">{{ title }}</h1>
<div class="time-message"> <div class="time-message">
<p>设定时长: {{time}}分钟</p> <p>设定时长: {{ time }}分钟</p>
<p v-if="startTime && endTime">总时长: {{useTime}}</p> <p v-if="startTime && endTime">总时长: {{ useTime }}</p>
<p v-if="startTime && endTime">剩余时长: {{loseTime}}</p> <p v-if="startTime && endTime">剩余时长: {{ loseTime }}</p>
</div> </div>
</div> </div>
<div class="top-right"> <div class="top-right">
<img :src="isMicOn ? voiceSmallImg : voiceCloseImg" alt="" srcset="" class="icon" @click="taggleM"> <img
:src="isMicOn ? voiceSmallImg : voiceCloseImg"
alt=""
srcset=""
class="icon"
@click="taggleM"
/>
<div class="out" @click="leave">退出</div> <div class="out" @click="leave">退出</div>
</div> </div>
</div> </div>
<div class="main"> <div class="main">
<div class="viedo-wrapper" v-for="(item,index) of memberList" :key="index"> <div
class="viedo-wrapper"
v-for="(item, index) of memberList"
:key="index"
>
<div class="text"> <div class="text">
<p>{{item.name}}</p> <p>{{ item.name }}</p>
<p>{{item.role == 1 ? '问诊医生' : '接诊医生'}}:</p> <p>{{ item.role == 1 ? "问诊医生" : "接诊医生" }}:</p>
</div> </div>
<div class="viedo"> <div class="viedo">
<div :id="rtc.viewslist[index].id" v-if="rtc && rtc.viewslist[index]"> <div
</div> :id="rtc.viewslist[index].id"
v-if="rtc && rtc.viewslist[index]"
></div>
<!-- 用户声音icon --> <!-- 用户声音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="
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> <img
<div class="mask" v-if="rtc && rtc.viewslist[index] && rtc.viewslist[index].mask"> :src="setImg(item.status)"
<img :src="type == 1 ? voiceImg : noCameraImg" alt="" :class="{'vocie': type == 1}"> 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> </div>
<div class="time"> <div class="time">
{{ <!-- //等待连接还是已经下麦 1为等待 2为进行中 3为下麦 -->
showText(item.status, item.role) <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>
</div> </div>
</div> </div>
<div class="close" @click="overFn">
结束会话
</div> </div>
<alert ref='alert'></alert> <div class="close" @click="overFn">结束会话</div>
<alert ref="alert"></alert>
</div> </div>
</template> </template>
<script> <script>
import RtcClient from '@/utils/live/rtc-client.js' import RtcClient from "@/utils/live/rtc-client.js";
import { getLiveTimeText, countDown, getBroswer, laseTime, lastm } from '@/utils/live' import {
getLiveTimeText,
countDown,
getBroswer,
laseTime,
lastm,
} from "@/utils/live";
import { openLoading, closeLoading } from "@/utils/utils"; 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 { export default {
components: { components: {
alert alert,
timeLeft
}, },
data() { data() {
return { return {
closeCallImg: require('../../../assets/image/live/close-call.png'), closeCallImg: require("../../../assets/image/live/close-call.png"),
voiceCloseImg: require('../../../assets/image/live/voice-close.png'), voiceCloseImg: require("../../../assets/image/live/voice-close.png"),
voiceSmallImg: require('../../../assets/image/live/voice-small.png'), voiceSmallImg: require("../../../assets/image/live/voice-small.png"),
voiceImg: require('../../../assets/image/live/voice.png'), voiceImg: require("../../../assets/image/live/voice.png"),
waitingCallImg: require('../../../assets/image/live/waiting-call.png'), waitingCallImg: require("../../../assets/image/live/waiting-call.png"),
noCameraImg: require('../../../assets/image/live/no-camera.png'), noCameraImg: require("../../../assets/image/live/no-camera.png"),
roleAnchor: 'anchor', // 主播 roleAnchor: "anchor", // 主播
rtc: null, rtc: null,
roomId: '', roomId: "",
sdkAppId: '', sdkAppId: "",
userSig: "", userSig: "",
userId: "", userId: "",
viedoParams: null, viedoParams: null,
...@@ -73,128 +128,150 @@ export default { ...@@ -73,128 +128,150 @@ export default {
answerTime: 0, // 接诊医生接入时长 answerTime: 0, // 接诊医生接入时长
useTime: 0, // 问诊时长 useTime: 0, // 问诊时长
loseTime: 0, // 问诊剩余时长 loseTime: 0, // 问诊剩余时长
askTimeFn:null, askTimeFn: null,
answerTimeFn:null, answerTimeFn: null,
useTimeFn:null, useTimeFn: null,
loseTimeFn:null, loseTimeFn: null,
type: 2, // 1: 语音 2: 视频 type: 2, // 1: 语音 2: 视频
startTime: 0, startTime: 0,
endTime: 0, endTime: 0,
time: 30, //总时长 time: 30, //总时长
memberList: [], memberList: [],
tid: '', // 群id tid: "", // 群id
diagnoseLogId: '' //问诊id diagnoseLogId: "", //问诊id
} };
}, },
created() { created() {
this.tid = this.$route.query.tid || ''; this.tid = this.$route.query.tid || "";
this.diagnoseLogId = this.$route.query.diagnoseLogId || ''; this.diagnoseLogId = this.$route.query.diagnoseLogId || "";
openLoading(this) openLoading(this);
this.init() this.init();
}, },
computed: { computed: {
title(){ title() {
return this.type == 1 ? '音频问诊' : '视频问诊' return this.type == 1 ? "音频问诊" : "视频问诊";
} },
}, },
methods:{ methods: {
init() { init() {
if(this.checkChrome()) { if (this.checkChrome()) {
this.getViedoParams() this.getViedoParams();
this.getInfo() this.getInfo();
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.alert.init({ this.$refs.alert
confirmTxt: '我知道了', .init({
title: `请下载新版Chrome浏览器` confirmTxt: "我知道了",
title: `请下载新版Chrome浏览器`,
}) })
.then(() => { .then(() => {
closeLoading(this) closeLoading(this);
this.$router.go(-1) this.$router.go(-1);
}) })
.catch((err) => { .catch((err) => {
closeLoading(this) closeLoading(this);
this.$router.go(-1) this.$router.go(-1);
}) });
}) });
}
},
// 设置item
setItem(data,item){
item.timeleft=0
},
// 主动呼叫
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",
});
} }
});
}, },
// 获取相关信息 // 获取相关信息
getInfo() { getInfo() {
let url = `/im/team/detail?tid=${this.tid}`; let url = `/im/team/detail?tid=${this.tid}`;
this.GET(url).then(res => { this.GET(url)
.then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
let { liveInfo, memberList } = res.data let { liveInfo, memberList } = res.data;
if (liveInfo) { if (liveInfo) {
this.startTime = liveInfo.startTimestamp this.startTime = liveInfo.startTimestamp;
this.endTime = liveInfo.endTimestamp this.endTime = liveInfo.endTimestamp;
this.time = lastm(this.startTime,this.endTime) this.time = lastm(this.startTime, this.endTime);
this.roomId = Number(liveInfo.roomId) this.roomId = Number(liveInfo.roomId);
this.type = liveInfo.liveType this.type = liveInfo.liveType;
} }
if (memberList && memberList.length) { if (memberList && memberList.length) {
memberList.forEach((item) => { memberList.forEach((item) => {
//在当前群组中的角色 1: 问诊医生 2: 接诊医生 3: 居民 4: 其他 //在当前群组中的角色 1: 问诊医生 2: 接诊医生 3: 居民 4: 其他
if (item.role == 1) { if (item.role == 1) {
//等待连接还是已经下麦 1为等待 2为进行中 3为下麦 //等待连接还是已经下麦 1为等待 2为进行中 3为下麦
this.memberList[0] = Object.assign(item,{status: 1}) this.memberList[0] = Object.assign(item, { status: 1,timeleft:0 });
} }
if (item.role == 2) { if (item.role == 2) {
this.memberList[1] = Object.assign(item,{status: 1}) this.memberList[1] = Object.assign(item, { status: 1,timeleft:0});
} }
if (item.role == 4) { if (item.role == 4) {
this.userId = item.liveUserId this.userId = item.liveUserId;
} }
}) });
} }
this.getAppId() this.getAppId();
} else { } else {
this.getErr() this.getErr();
} }
}).catch(() => {
this.getErr()
}) })
.catch(() => {
this.getErr();
});
}, },
// 获取AppId // 获取AppId
getAppId() { getAppId() {
let req = { let req = {};
}
this.GET("/coupler/app/trtc/sdkappid", req) this.GET("/coupler/app/trtc/sdkappid", req)
.then(res => { .then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.sdkAppId = res.data.sdkAppId this.sdkAppId = res.data.sdkAppId;
this.getSing() this.getSing();
}else if (res.code == '200006' || res.code == '200000') { } else if (res.code == "200006" || res.code == "200000") {
if(this.rtc) { if (this.rtc) {
this.leave() this.leave();
} }
this.getErr() this.getErr();
} }
}) })
.catch((err) => { .catch((err) => {
this.getErr() this.getErr();
}) });
}, },
// 获取签名 // 获取签名
getSing() { getSing() {
let req = { let req = {
sdkAppId: this.sdkAppId, sdkAppId: this.sdkAppId,
userId: this.userId userId: this.userId,
} };
this.POST("/coupler/usersig/trtc", req).then(res => { this.POST("/coupler/usersig/trtc", req)
.then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.userSig = res.data.userSig this.userSig = res.data.userSig;
this.clientLogin() this.clientLogin();
} else if (res.code == '200006' || res.code == '200000') { } else if (res.code == "200006" || res.code == "200000") {
if(this.rtc) { if (this.rtc) {
this.leave() this.leave();
} }
this.getErr() this.getErr();
} }
}) })
.catch((err) => { .catch((err) => {
this.getErr() this.getErr();
}) });
}, },
// 创建trtcClient // 创建trtcClient
clientLogin() { clientLogin() {
...@@ -204,271 +281,281 @@ export default { ...@@ -204,271 +281,281 @@ export default {
sdkAppId: this.sdkAppId, sdkAppId: this.sdkAppId,
userId: this.userId, userId: this.userId,
userSig: this.userSig, userSig: this.userSig,
vueInstance: this vueInstance: this,
} };
this.rtc = new RtcClient(obj) this.rtc = new RtcClient(obj);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.alert.init({ this.$refs.alert
confirmTxt: '我知道了', .init({
title: `为了更好的体验,请保证您输出设备的正常使用` confirmTxt: "我知道了",
title: `为了更好的体验,请保证您输出设备的正常使用`,
}) })
.then(() => { .then(() => {
this.rtc.join() this.rtc.join();
this.ispending() this.ispending();
let t = setTimeout(() => { let t = setTimeout(() => {
this.muteLocalAudio();
closeLoading(this); closeLoading(this);
clearTimeout(t) clearTimeout(t);
},1000) }, 1000);
}) })
.catch((err) => { .catch((err) => {
this.rtc.join() this.rtc.join();
this.ispending() this.ispending();
let t = setTimeout(() => { let t = setTimeout(() => {
closeLoading(this); closeLoading(this);
clearTimeout(t) clearTimeout(t);
},1000) }, 1000);
}) });
}) });
}, },
// 获取视频参数 // 获取视频参数
getViedoParams() { getViedoParams() {
this.GET('/coupler/app/config/push/stream/params').then((res) => { this.GET("/coupler/app/config/push/stream/params")
if (res.code == '000000') { .then((res) => {
this.viedoParams = res.data if (res.code == "000000") {
} else if (res.code == '200006' || res.code == '200000') { this.viedoParams = res.data;
closeLoading(this) } else if (res.code == "200006" || res.code == "200000") {
closeLoading(this);
if (this.rtc) { if (this.rtc) {
this.leave() this.leave();
} }
} }
}).catch((err) => {
console.log('获取视频参数数据失败')
}) })
.catch((err) => {
console.log("获取视频参数数据失败");
});
}, },
// 切换话筒 // 切换话筒
taggleM() { taggleM() {
if (this.isMicOn) { if (this.isMicOn) {
this.muteLocalAudio() this.muteLocalAudio();
} else { } else {
this.unmuteLocalAudio() this.unmuteLocalAudio();
} }
this.isMicOn = !this.isMicOn
}, },
// 关闭mc // 关闭mc
muteLocalAudio() { muteLocalAudio() {
this.rtc.muteLocalAudio() this.isMicOn = false;
this.rtc.muteLocalAudio();
}, },
// 打开mc // 打开mc
unmuteLocalAudio() { unmuteLocalAudio() {
this.rtc.unmuteLocalAudio() this.isMicOn = true;
this.rtc.unmuteLocalAudio();
}, },
// 显示文案 // 显示文案
showText(status,role) { showText(status, role) {
let text = '' let text = "";
switch (status) { switch (status) {
case 1: case 1:
text = '呼叫中' text = "呼叫中";
break break;
case 3: case 3:
text = '已离线' text = "已离线";
break; break;
default: default:
text = `已接入: ${ role == 1 ? this.askTime : this.answerTime}` text = `已接入: ${role == 1 ? this.askTime : this.answerTime}`;
break break;
} }
return text return text;
}, },
//设置图像 1为等待 2为进行中 3为下麦 //设置图像 1为等待 2为进行中 3为下麦
setImg(status) { setImg(status) {
let img = null let img = null;
switch (status) { switch (status) {
case 1: case 1:
img = this.waitingCallImg img = this.waitingCallImg;
break break;
case 3: case 3:
img = this.closeCallImg img = this.closeCallImg;
break; break;
default: default:
img = this.closeCallImg img = this.closeCallImg;
break break;
} }
return img return img;
}, },
// 用户上线 // 用户上线
addNewMember(id) { addNewMember(id) {
this.memberList.forEach(item => { this.memberList.forEach((item) => {
if (item.liveUserId == id) { if (item.liveUserId == id) {
item.status = 2 item.status = 2;
this.setTime(item.role) this.setTime(item.role);
} }
}) });
}, },
// 用户下线 // 用户下线
removeMember(id) { removeMember(id) {
this.memberList.forEach(item => { this.memberList.forEach((item) => {
if (item.liveUserId == id) { if (item.liveUserId == id) {
item.status = 3 item.status = 3;
} }
}) });
}, },
//设置进行时长 1表示为问诊 2为接诊 3为问诊开始 4为问诊结束 //设置进行时长 1表示为问诊 2为接诊 3为问诊开始 4为问诊结束
setTime(flag) { setTime(flag) {
let text = '' let text = "";
switch (flag) { switch (flag) {
case 1: case 1:
text = 'askTime' text = "askTime";
break break;
case 2: case 2:
text = 'answerTime' text = "answerTime";
break break;
case 3: case 3:
text = 'useTime' text = "useTime";
break break;
case 4: case 4:
text = 'loseTime' text = "loseTime";
break break;
default: default:
break break;
} }
let t = 0 let t = 0;
let liveTime = Number(sessionStorage.getItem(`TIME_${text}`) || t) let liveTime = Number(sessionStorage.getItem(`TIME_${text}`) || t);
this[`${text}Fn`] = setInterval(() => { this[`${text}Fn`] = setInterval(() => {
liveTime += 1000 liveTime += 1000;
this[text] = getLiveTimeText(liveTime,text) this[text] = getLiveTimeText(liveTime, text);
}, 1000); }, 1000);
}, },
// 问诊是否进行中 // 问诊是否进行中
ispending() { ispending() {
if (this.startTime < new Date() < this.endTime) { if (this.startTime < new Date() < this.endTime) {
this.setTime(3) this.setTime(3);
this.loseTimeFn = setInterval(() => { this.loseTimeFn = setInterval(() => {
this.loseTime = countDown(this.endTime) this.loseTime = countDown(this.endTime);
let timeObj = laseTime(this.endTime) let timeObj = laseTime(this.endTime);
if ((timeObj.leftm == 5 || timeObj.leftm == 3 || timeObj.leftm == 1) && timeObj.lefts == 0 && timeObj.lefth == 0) { if (
(timeObj.leftm == 5 || timeObj.leftm == 3 || timeObj.leftm == 1) &&
timeObj.lefts == 0 &&
timeObj.lefth == 0
) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.alert.init({ this.$refs.alert
confirmTxt: '我知道了', .init({
title: `距离会诊结束还剩不足${timeObj.leftm}分钟` confirmTxt: "我知道了",
}) title: `距离会诊结束还剩不足${timeObj.leftm}分钟`,
.then(() => {
})
.catch((err) => {
})
}) })
.then(() => {})
.catch((err) => {});
});
} }
}, 1000); }, 1000);
} else if (new Date() < this.startTime){ } else if (new Date() < this.startTime) {
let t = setInterval(() => { let t = setInterval(() => {
if (new Date() > this.startTime) { if (new Date() > this.startTime) {
clearInterval(t) clearInterval(t);
this.ispending() this.ispending();
} }
}, 1000); }, 1000);
} }
}, },
// 检查是否为chrome // 检查是否为chrome
checkChrome() { checkChrome() {
return getBroswer().broswer=='Chrome' return getBroswer().broswer == "Chrome";
}, },
// client离开房间 // client离开房间
leave() { leave() {
this.rtc.leave() this.rtc.leave();
this.clearSession() this.clearSession();
this.$router.go(-1) window.location.href = "about:blank";
window.close();
}, },
// 结束会话 // 结束会话
overFn() { overFn() {
this.$refs.alert.init({ this.$refs.alert
cancleTxt: '取消', .init({
confirmTxt: '我知道了', cancleTxt: "取消",
title: `确定要结束会话么?` confirmTxt: "我知道了",
title: `确定要结束会话么?`,
}) })
.then(() => { .then(() => {
this.out() this.out();
})
.catch((err) => {
}) })
.catch((err) => {});
}, },
out() { out() {
let url = `/diagnose/admin/diagnose/endCall/${this.diagnoseLogId}`; let url = `/diagnose/admin/diagnose/endCall/${this.diagnoseLogId}`;
let params = { let params = {};
}; this.POST(url, params)
this.POST(url,params).then(res => { .then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.leave() this.leave();
} else { } else {
this.$refs.alert.init({ this.$refs.alert
confirmTxt: '我知道了', .init({
title: `操作失败,请稍后重试` confirmTxt: "我知道了",
}) title: `操作失败,请稍后重试`,
.then(() => {
})
.catch((err) => {
}) })
.then(() => {})
.catch((err) => {});
} }
}).catch(() => {
this.$refs.alert.init({
confirmTxt: '我知道了',
title: `操作失败,请稍后重试`
}) })
.then(() => { .catch(() => {
}) this.$refs.alert
.catch((err) => { .init({
confirmTxt: "我知道了",
title: `操作失败,请稍后重试`,
}) })
.then(() => {})
.catch((err) => {});
}); });
}, },
// 获取信息失败 // 获取信息失败
getErr() { getErr() {
closeLoading(this) closeLoading(this);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.alert.init({ this.$refs.alert
confirmTxt: '我知道了', .init({
title: `获取信息失败,请稍后重试` confirmTxt: "我知道了",
title: `获取信息失败,请稍后重试`,
}) })
.then(() => { .then(() => {
this.$router.go(-1) this.$router.go(-1);
}) })
.catch((err) => { .catch((err) => {
this.$router.go(-1) this.$router.go(-1);
}) });
}) });
}, },
reloadfn(msg) { reloadfn(msg) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.alert.init({ this.$refs.alert
confirmTxt: '我知道了', .init({
title: `加入房间失败,重新加入` confirmTxt: "我知道了",
title: `加入房间失败,重新加入`,
}) })
.then(() => { .then(() => {
location.reload(); location.reload();
}) })
.catch((err) => { .catch((err) => {
location.reload(); location.reload();
}) });
}) });
}, },
clearTime() { clearTime() {
clearInterval(this.askTimeFn) clearInterval(this.askTimeFn);
clearInterval(this.answerTimeFn) clearInterval(this.answerTimeFn);
clearInterval(this.useTimeFn) clearInterval(this.useTimeFn);
clearInterval(this.loseTimeFn) clearInterval(this.loseTimeFn);
}, },
// 清除直播时间相关的seession // 清除直播时间相关的seession
clearSession() { clearSession() {
sessionStorage.removeItem('TIME_askTime') sessionStorage.removeItem("TIME_askTime");
sessionStorage.removeItem('TIME_answerTime') sessionStorage.removeItem("TIME_answerTime");
sessionStorage.removeItem('TIME_useTime') sessionStorage.removeItem("TIME_useTime");
sessionStorage.removeItem('TIME_loseTime') sessionStorage.removeItem("TIME_loseTime");
} },
}, },
beforeDestroy() { beforeDestroy() {
this.clearTime() this.clearTime();
} },
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.livebox { .livebox {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: absolute; position: absolute;
...@@ -489,7 +576,7 @@ export default { ...@@ -489,7 +576,7 @@ export default {
font-size: 18px; font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC; font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 700; font-weight: 700;
color: #FFFFFF; color: #ffffff;
line-height: 22px; line-height: 22px;
} }
.time-message { .time-message {
...@@ -499,7 +586,7 @@ export default { ...@@ -499,7 +586,7 @@ export default {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #ffffff;
line-height: 20px; line-height: 20px;
p { p {
margin-right: 20px; margin-right: 20px;
...@@ -519,11 +606,11 @@ export default { ...@@ -519,11 +606,11 @@ export default {
width: 102px; width: 102px;
height: 32px; height: 32px;
border-radius: 2px; border-radius: 2px;
border: 1px solid #FFFFFF; border: 1px solid #ffffff;
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #ffffff;
text-align: center; text-align: center;
line-height: 32px; line-height: 32px;
margin-left: 20px; margin-left: 20px;
...@@ -539,7 +626,7 @@ export default { ...@@ -539,7 +626,7 @@ export default {
display: flex; display: flex;
width: 49%; width: 49%;
height: 50vh; height: 50vh;
background: #2D2D2D; background: #2d2d2d;
&:first-of-type { &:first-of-type {
margin-right: 2%; margin-right: 2%;
} }
...@@ -559,6 +646,20 @@ export default { ...@@ -559,6 +646,20 @@ export default {
margin-right: 24px; margin-right: 24px;
margin-left: 5px; margin-left: 5px;
color: #fff; color: #fff;
.time-content {
.call-btn {
display: flex;
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 { .viedo {
flex: 1; flex: 1;
...@@ -575,14 +676,13 @@ export default { ...@@ -575,14 +676,13 @@ export default {
height: 32px; height: 32px;
z-index: 100; z-index: 100;
} }
&> div { & > div {
height: 100%; height: 100%;
width: 100%; width: 100%;
video { video {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.video-icon { .video-icon {
width: 96px; width: 96px;
...@@ -594,7 +694,7 @@ export default { ...@@ -594,7 +694,7 @@ export default {
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
background: #2D2D2D; background: #2d2d2d;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -614,14 +714,14 @@ export default { ...@@ -614,14 +714,14 @@ export default {
.close { .close {
width: 102px; width: 102px;
height: 32px; height: 32px;
background: #FF4D4F; background: #ff4d4f;
border-radius: 2px; border-radius: 2px;
font-size: 14px; font-size: 14px;
color: #FFFFFF; color: #ffffff;
line-height: 32px; line-height: 32px;
text-align: center; text-align: center;
margin: 15px auto 6%; margin: 15px auto 6%;
cursor: pointer; cursor: pointer;
} }
} }
</style> </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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册