Browse Source

康复模板 功能

zhangyanfang 4 years ago
parent
commit
6d462e4bff

+ 4 - 0
api/rehabilitation-api.js

@ -46,6 +46,10 @@
		findServiceItemsByHospital:function(data){
			return httpRequest.get("doctor/specialist/hospitalServiceItem/findServiceItemsByHospital",{data:data})
		},
		//获取医生团队信息
		getDoctorTeam: function(uid){
			return httpRequest.get('doctor/admin-teams/team/'+uid+'/teams')
		},		
		createTemplate:function(data){
			return httpRequest.post('doctor/specialist/rehabilitationPlan/createTemplate',{data:data})
		},

+ 7 - 0
app/rehabilitation/css/management.css

@ -334,3 +334,10 @@ a {
	height: calc(100% - 50px);
	overflow-y: auto;
}
.setSelect .el-input__inner{
	width: 100%;
    text-align: center;
}
.setSelect .el-select{
	width: 100%;
}

+ 3 - 1
app/rehabilitation/html/management.html

@ -13,7 +13,8 @@
        <link rel="stylesheet" type="text/css" href="../../../css/cross.css"/>
        <link rel="stylesheet" type="text/css" href="../../../plugins/toastr/toastr.min.css"/>
        <link rel="stylesheet" type="text/css" href="../../../plugins/artDialog/6.0.5/css/ui-dialog.min.css"/>
        <link rel="stylesheet" type="text/css" href="../css/management.css"/>
		<link rel="stylesheet" type="text/css" href="../css/management.css"/>
		<link rel="stylesheet" href="../../../plugins/element-ui/element-ui.css" />
        <script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../../js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
	</head>
@ -33,6 +34,7 @@
			var EventBus = new Vue();
			Vue.prototype.loading = dialog({contentType:'load', skin:'bk-popup'})
		</script>
		<script type="text/javascript" src="../../../plugins/element-ui/element-ui.js"></script>
		<script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../api/http-request.js"></script>
		<script src="../../../api/home-api.js"></script>

+ 5 - 5
app/rehabilitation/js/health_control.js

@ -285,12 +285,12 @@ layui.use('element', function () {
                                }
                               
                            }
                            if (vm.isLeader == 0||vm.level != 1) {
                                $(".neironglef>button:nth-child(2)").attr('disabled', "true")
                                $(".neironglef>button:nth-child(2)").addClass("falsebutton")
                                $(".neironglef>button:nth-child(2)").css("color", "white")
                            // if (vm.isLeader == 0||vm.level != 1) {
                            //     $(".neironglef>button:nth-child(2)").attr('disabled', "true")
                            //     $(".neironglef>button:nth-child(2)").addClass("falsebutton")
                            //     $(".neironglef>button:nth-child(2)").css("color", "white")
                            }
                            // }
                        })

+ 2 - 1
component/rehabilitation/new-template-form.js

@ -37,7 +37,8 @@ var NewTemplateForm = {
				}
    			rehaAPI.createTemplate({
	    			doctor: docInfo.uid,
	    			title: vm.name
					title: vm.name,
					adminTeamCode:vm.$route.query.teamCode
	    		}).then(function(res) {
	    			if(res.status == 200) {
	    				vm.$router.push({

+ 16 - 6
component/rehabilitation/new-template.js

@ -13,16 +13,26 @@ var NewTemplate = {
    props: [],
    data: function() {
        return {
			teamCode:''
        }
    },
	},
    mounted: function() {
    	var vm = this
    },
		var vm = this
		vm.$nextTick(function(){
			EventBus.$on('getTeamCode',function(arg){
				vm.teamCode=arg.teamCode
			})	
		})
},
    methods: {
    	newTemplate: function() {
    		var vm = this
    		vm.$router.push('/new-template-form')
			var vm = this
    		vm.$router.push({
				path:'/new-template-form',
				query:{
					teamCode:vm.teamCode
				}
			})
    	}
    }
}

+ 1 - 0
component/rehabilitation/template-items-select2.js

@ -77,6 +77,7 @@ var TemplateItemsSelect2 = {
    },
    methods: {
    	goBack: function() {
			EventBus.$emit("refresh-index")
    		this.$router.replace('/');
    	},
    	addItem: function(o, k) {

+ 36 - 7
component/rehabilitation/template-items.js

@ -23,7 +23,30 @@ function showInfoMessage(msg) {
	})
}
var TemplateItems = {
    template: '<div style="height: 100%;">\
	template: '<div style="height: 100%;">\
					<el-dialog\
						title="计划时间"\
						:visible.sync="dialogVisible"\
						width="30%"\
						:before-close="handleClose">\
						<div>\
							<div>任务项目:电话/短信关怀</div>\
							<div>\
								<el-select v-model="seletc" placeholder="请选择">\
									<el-option\
										v-for="item in options"\
										:key="item.value"\
										:label="item.label"\
										:value="item.value">\
									</el-option>\
								</el-select>\
							</div>\
						</div>\
						<span slot="footer" class="dialog-footer">\
							<el-button @click="dialogVisible = false">取 消</el-button>\
							<el-button type="primary" @click="dialogVisible = false">确 定</el-button>\
						</span>\
					</el-dialog>\
    				<div class="title-name c-f16">\
	    				<span class="c-vam">{{name}}</span>\
	    			</div>\
@ -36,7 +59,7 @@ var TemplateItems = {
			    			<div class="c-row c-f14 mt5">\
						        <div class="c-50">\
						        	<span class="c-909090">医&emsp;&emsp;院:</span>\
						        	<span>待选择</span>\
						        	<span class="c-909090">待选择</span>\
						        </div>\
						        <div class="c-50">\
						        	<span class="c-909090">执行人员:</span>\
@ -46,14 +69,14 @@ var TemplateItems = {
						    <div class="c-row c-f14 mt5">\
						        <div class="c-50">\
						        	<span class="c-909090">计划时间:</span>\
						        	<span class="c-909090">待选择</span>\
						        	<span class="c-909090">待选择</span><img class="ml15" @click="dialogVisible = true" style="width:16px;height: 16px;vertical-align: middle;display:none;" src="../../../images/bianji_icon.png"></img>\
						        </div>\
						        <div class="c-50">\
						        	<span class="c-909090">费&emsp;&emsp;用:</span>\
						        	<span>0.00元</span>\
						        </div>\
						    </div>\
						    <img v-if="name!=\'系统模板\'" src="../../../images/qingchu_icon.png" class="item-delete-btn" @click.stop="deleteItem(o, i)"/>\
						    <img v-if="name!=\'系统模板\' && o.code!=\'2\' && o.code!=\'3\'" src="../../../images/qingchu_icon.png" class="item-delete-btn" @click.stop="deleteItem(o, i)"/>\
	    				</div>\
	    			</div>\
	    			<div class="foot-btns">\
@ -71,8 +94,11 @@ var TemplateItems = {
        	name: '',
        	items: [],
        	isNew: null,
        	templateId: "",
        	item: null
			templateId: "",
			dialogVisible:false,
			item: null,
			seletc:'',
			options:[{label:'0',value:'0'}]
        }
    },
    beforeRouteEnter: function (to, from, next) {
@ -107,7 +133,10 @@ var TemplateItems = {
    		o.enable = true
			vm.items.splice(i, 1)
			EventBus.$emit("delete-template-item", o, i)
    	},
		},
		handleClose:function(){
		},
    	saveTemplate: function() {
    		var vm = this
			if(this.name=='系统模板'){

+ 55 - 10
component/rehabilitation/template-list.js

@ -5,6 +5,17 @@ var TemplateList = {
	    				<span class="c-vam">模板库</span>\
	    			</div>\
					<ul>\
						<li class="setSelect mt20" v-if="doctorList.length>1">\
							<el-select v-model="teamCode" @change="changeTeam">\
								<el-option\
								v-for="item in doctorList"\
								:key="item.id"\
								:label="item.name"\
								:value="item.id"\
								>\
								</el-option>\
							</el-select>\
						</li>\
						<li v-for="(o,i) in items" class="temp-item c-nowrap c-t-center" @click="showTemplateDetail(o)">{{o.title}}</li>\
						<li class="temp-item c-nowrap c-t-center add" @click="newTemplate">添加新模板</li>\
					</ul>\
@ -12,30 +23,59 @@ var TemplateList = {
    props: [],
    data: function() {
        return {
        	items: []
			items: [],
			teamCode:'',
			doctorList:[]
        }
    },
    created: function() {
    	var vm = this
    	
    	vm.findTemplateList()
		vm.getDoctorTeam().then(function(){
			vm.findTemplateList()
			EventBus.$emit('getTeamCode',{
				teamCode:vm.teamCode
			})
		})
    	EventBus.$on("refresh-index",function() {
    		vm.findTemplateList()
    	})
		})
    },
    mounted: function() {
    	var vm = this
		
    },
    methods: {
    	findTemplateList: function() {
    		var vm = this
    		rehaAPI.findTemplateList({
	    		doctor: storage.docInfo.uid
				doctor: storage.docInfo.uid,
				adminTeamCode:vm.teamCode
	    	}).then(function(res) {
	    		vm.items = res.data
	    		vm.items = _.filter(res.data,function(item){
					return item.id!='808080eb708b19a20170995c982f0014'
				})
	    	})
    	},
		},
		getDoctorTeam:function(){
			var vm=this
			var wlyyAgent=JSON.parse(window.localStorage.getItem('wlyyAgent'));
			var uid=wlyyAgent && wlyyAgent.uid;
			return new Promise(function(resolve, reject) {
				rehaAPI.getDoctorTeam(uid).then(function(res){
					if(res.status==200){
						resolve()
						vm.doctorList=res.data;
						vm.teamCode=vm.doctorList[0].id
					}
				})
			})
		},
		changeTeam:function(){
			var vm=this
			EventBus.$emit('getTeamCode',{
				teamCode:vm.teamCode
			})
			vm.findTemplateList()
		},
    	showTemplateDetail: function(o) {
    		var vm = this
    		vm.$router.push({
@ -48,8 +88,13 @@ var TemplateList = {
    		})
    	},
    	newTemplate: function() {
    		var vm = this
    		vm.$router.push('/new-template-form')
			var vm = this
    		vm.$router.push({
				path:'/new-template-form',
				query:{
					teamCode:vm.teamCode
				}
			})
    	}
    }
}

BIN
images/bianji_icon.png