提交 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="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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册