Xiao_yanpeng 7 years ago
parent
commit
89f5df5c94

+ 3 - 0
api/record-api.js

@ -33,6 +33,9 @@
		guidanceList: function(data) {
			return httpRequest.post("doctor/health/guidance/list_by_team", {data: data})
		},
		guidanceDetail: function(data) {
			return httpRequest.post("doctor/health/guidance/id", {data: data})
		},
	//教育列表
		educationList:function(data){
			return httpRequest.post("doctor/jkEdu/article/PC/fetchPatientArticlePushedList", {data: data})

+ 6 - 3
app/record/css/article_detail.css

@ -1,7 +1,7 @@
.article_container{position: relative;}
.article-title{font-weight: 700;font-size: 18px;margin-bottom: 0;line-height: 2;}
.app-container{padding: 10px 35px;}
.pc-container{padding: 10px 320px 10px 20px;}
.pc-container{padding: 15px 320px 15px 20px;overflow: hidden;}
.article-info{margin-bottom: 20px;margin-top: 10px;}
.article-info p{margin-bottom: 0;line-height: 1.5;}
/*手机大小*/
@ -16,7 +16,8 @@
/*手机顶部状态*/
.mobile-top{position: absolute;top: 53px;left: 13px;right: 12px;color: #fff;z-index: 2;background-color: #2e2d31;}
/*手机内容载体*/
.mobile-container{zoom:0.8;position: absolute;left: 15px;right: 15px;padding: 0 5px;top: 120px;bottom: 65px;overflow-y: scroll;}
.mobile-container{zoom:0.8;position: absolute;left: 15px;right: 12px;padding: 0 5px;top: 120px;bottom: 65px;overflow: hidden;}
.mobile-text{overflow: hidden;}
.time-look{color: #888;font-size: 12px;margin-bottom: 0;}
/*颜色渐变*/
.black-grey-black {
@ -32,4 +33,6 @@
.scroll-style::-webkit-scrollbar-track {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);border-radius: 10px;}
/* 滚动条滑块 */
.scroll-style::-webkit-scrollbar-thumb {border-radius: 10px;background: rgba(0,0,0,0.1);-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);}
.scroll-style::-webkit-scrollbar-thumb:window-inactive {background: rgba(0,0,0,0.3);}
.scroll-style::-webkit-scrollbar-thumb:window-inactive {background: rgba(0,0,0,0.3);}
.set-img{width: 100%;max-width: 400px;}
.img-contain{text-align: center;}

+ 4 - 3
app/record/html/guidance.html

@ -12,16 +12,17 @@
	</head>
	<body>
		<div id="app">
			<consultation-list :guidance-data="list" @init-data="msgListView"></consultation-list>
			<guidance-list :guidance-data="list"></guidance-list>
			<navigation :pages="total" :current="currentPage" @navpage="msgListView"></navigation>
		</div>
		<script type="text/javascript" src="../../../js/vue.js"></script>
		<script type="text/javascript" src="../../../js/jquery-2.2.4.js" ></script>
		<script src="../../../plugins/slimscroll/jquery.slimscroll.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../js/es6-promise.js"></script>
		<script src="../../../component/record/guidance-list.js"></script>
		<script type="text/javascript" src="../../../component/common/pagination.js" ></script>
		<script src="../../../api/http-request.js"></script>
		<script src="../../../api/record-api.js"></script>
		<script type="text/javascript" src="../../../component/common/pagination.js" ></script>
		<script src="../../../component/record/guidance-list.js"></script>
		<script src="../js/guidance.js"></script>
	</body>
</html>

File diff suppressed because it is too large
+ 19 - 18
app/record/html/lay_gui_article_detail.html


+ 39 - 0
app/record/js/guidance-detail.js

@ -0,0 +1,39 @@
new Vue({
  	el: '#app',
	data:{
	  	guidanceData:""
	},
  	methods:{
  		
  	},
	mounted(){
		var vm = this
	  	var Request = GetRequest();
	  	var id = Request["id"];
	  	recordAPI.guidanceDetail({id:id}).then(function(res){
	  		if(res.status == 200){
	  			var data = res.data;
                var regN = /\n/g;
                var regRN = /\r\n/g;
                var content = data.content.replace(/ /g, "&nbsp;");
                	content = content.replace(regN,"<br/>");
                var p = "<p class='c-f14 c-333'>"+content+"</p>",
                    images = "",
                    imagesList = []; 
                if(data.images && data.images.length > 0){
                    imagesList = data.images.split(",");
                }
                for(i=0; i<imagesList.length; i++){
                    var src = httpRequest.getImgUrl(imagesList[i]);
                    images += "<div class='img-contain'><img class='set-img' src='"+src+"'></div>";
                }
	  			vm.guidanceData = p+images
	  		}else{
	  			top.toastr.error(res.msg)
	  		}
	    })
	  	var divH = $(".layui-layer-content",parent.document).height();
		$(".pc-container").slimScroll({ height: divH,color: '#666'});
		$(".mobile-text").slimScroll({ height: '421px',color: '#666'});
	},
})

+ 18 - 9
app/record/js/guidance.js

@ -3,31 +3,40 @@ new Vue({
  data: {
  	total:1,//总页数
  	currentPage:1,//当前页数
  	list:[]//列表集合
  	list:[],//列表集合
  	patient:null,
  	teamCode:null
  },
  methods:{
  	msgListView: function(page){
  		var vm=this;
  		if(page){
  			vm.currentPage=page;
  			var data = {
//				patientCode:'ec7572875d27446cb4f067b13a85d72a',
					patient:'ec7572875d27446cb4f067b13a85d72a',
					teamCode:646,
  			var data={
  				patient:vm.patient,
					teamCode:vm.teamCode,
					page:page,
					pagesize:10}
					pagesize:10
				}
  			recordAPI.guidanceList(data).then(function(res){
  				if(res.status==200){
  					if(res.data.length){  						
  						vm.list=res.data;
  						$(".consultation-list").animate({scrollTop:0},0);//滚回顶部
  						$(".slimScrollBar").css('top',0);
  					}else{
  							top.toastr.info("啊喔!没有更多内容了");
  						top.toastr.info("没有更多内容了");
  					}
  				}else{
  					top.toastr.error(res.msg||("服务器返回状态码"+res.status));
  					top.toastr.error(res.msg);
  				}
  			})
  		}
  	}
  }
  },
  mounted(){
  	this.patient = localStorage.getItem("severPatientCode");
  	this.teamCode = JSON.parse(localStorage.getItem("severPatientTeam")).id;
  	this.msgListView(this.currentPage);
  },
})

+ 10 - 8
app/record/js/record.js

@ -10,8 +10,8 @@ new Vue({
			{title:'统计',href:'../html/census.html'}
    ],
    teamName:null,
//  patientCode:"ec7572875d27446cb4f067b13a85d72a",
    patientCode:"d2e1e4334485476391300f43ab69f8f7",
    patientCode:"ec7572875d27446cb4f067b13a85d72a",
//  patientCode:"d2e1e4334485476391300f43ab69f8f7",
    activeidx: ""
  },
  mounted: function() {
@ -33,13 +33,15 @@ new Vue({
						team.isLeader = data.jtTeam.isLeader; // 是否是团队长
						teams.push(team)
					})();
					//保存患者的团队信息
					vm.teamName = teams[0].name;
					window.localStorage.setItem("severPatientTeam",JSON.stringify(teams[0]))
					//缓存结束后才触发事件
					var query = GetRequest();
	  			vm.activeidx = query.tabIdex || "0"
				}else if(data.hasSign=="0"){
					toastr.warning("与居民无签约关系,无法查看")
				}
				//保存患者的团队信息
				vm.teamName = teams[0].name;
				window.localStorage.setItem("severPatientTeam",JSON.stringify(teams[0]))
				//缓存结束后才触发事件
				var query = GetRequest();
  			vm.activeidx = query.tabIdex || "0"
  		}else{
  			toastr.error(res.msg)
  		}

+ 9 - 15
component/record/guidance-list.js

@ -1,8 +1,7 @@
Vue.component('consultation-list', {
Vue.component('guidance-list', {
	template: `<ul class="consultation-list">
				<li class="consultation-list-item" @click="viewDetail(1)" v-for="(list,index) in guidanceList">
				<li  v-for="(list,index) in guidanceList" class="consultation-list-item" @click="viewDetail(list.id)">
					<div class="con-user-info">
						<span class="guidance-status" :data-status="list.status?list.status:1" desc="1未读2已读"></span>
						<p class="article-title">{{list.content}}</p>
						<p class="user-problem">发送时间:{{list.createTime}}</p>
					</div>
@ -19,18 +18,12 @@ Vue.component('consultation-list', {
		viewDetail: function(id) {
			top.layer.open({
		      type: 2,
		      title: '健康指导文章详情',
		      title: '指导详情',
		      maxmin: true,
		      area: ['1000px', '650px'],
		      shadeClose: true,
		      moveOut:true,
		      btn:'返回',
		      success: function(layero){
			  	layero.find('.layui-layer-btn').css({'text-align': 'center','border-top': '1px solid #ececec','padding-top': '7.5px'});
			  	layero.find('.layui-layer-btn').find('a').addClass("layui-btn").css({background: '#f96565',color: '#fff',width: '100px',border: 'none', height: '34px','line-height':'22px',padding: '6px 12px','font-size': '14px'});
			  },
		      content: '../html/lay_gui_article_detail.html'
		    });
		      area: ['1000px', '600px'],
		      shadeClose: false,
		      content: '../html/lay_gui_article_detail.html?id='+id
		    })
		}
	},
	watch:{
@ -39,6 +32,7 @@ Vue.component('consultation-list', {
		}
	},
	mounted: function() {
		this.$emit('init-data', this.curPage);
		var divH = $("#tab-iframe",parent.document).height() - 75;
		$(".consultation-list").slimScroll({ height: divH,color: '#666'});
	}
})

+ 3 - 3
login/common_http.js

@ -1,7 +1,7 @@
//切换发布版本 true:正式版,连接生产环境;false:测试版,连接测试环境。
var isInner = false; //发布线上后有内外网的配置
var publish_version = false;
// var publish_version = false;
//var publish_version = true;
   var publish_version = false;
//接口服务器
var server;
@ -10,7 +10,7 @@ var agentName = 'wlyyAgent';
if(publish_version == true) {
	//接口服务器
	server = "http://www.xmtyw.cn/wlyy/";
	server = "http://www.xmtyw.cn/wlyytest/";
	//图片文件的服务器路径
    var imgUrlDomain = "http://www.xmtyw.cn/";