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