12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- $(function() {
- $(".c-lab-mor li").click(function() {
- $(".c-lab-mor li").removeClass("hit");
- $(this).addClass("hit");
- });
- });
- mui.plusReady(function() {
- queryList();
- });
- function queryList() {
- plus.nativeUI.showWaiting();
- var params = {};
- params.page = 1;
- params.pageSize = 10;
- sendPost("patient/followup/record", params, "json", "post", queryListFailed, queryListSuccess)
- }
- function queryListFailed(res) {
- if (res && res.msg) {
- plus.nativeUI.toast(res.msg);
- } else {
- plus.nativeUI.toast("随访数据加载失败");
- }
- }
- function queryListSuccess(res) {
- if (res.status == 200) {
- //成功
- showList(res.list);
- } else {
- //非200则为失败
- queryListFailed(res);
- }
- plus.nativeUI.closeWaiting();
- }
- /**
- * 显示查询结果
- * @param {Object} list
- */
- function showList(list) {
- for (var i = 0; i < list.length; i++) {
- var data = list[i];
- if (!data) {
- continue;
- }
- addRow(data.doctor, data.hospital, data.dept, data.type, data.name, data.czrq, data.status);
- }
- }
- function addRow(doctor, hospital, dept, type, name, czrq, status) {
- var ul = document.querySelector("#item");
- var li = document.createElement("li");
- li.onclick = function(){
- openWebview('image-followup.html');
- };
- var html = '<div class="fpart1">';
- if (status == 0) {
- html += '<span class="fr c-f12 ced5050 pr20">未完成</span>';
- } else {
- html += '<span class="fr c-f12 c4dcd70 pr20">完成</span>';
- }
- if (type == 1) {
- //问卷随访
- html += '<span class="iconhold fatb2 border-radius-circle"><i class="iconfont icon-wenjuan"></i></span> 问卷随访';
- } else if (type == 2) {
- //图文随访
- html += '<span class="iconhold fatb3 border-radius-circle"><i class="iconfont icon-suifangtuwen"></i></span> 图文随访';
- } else {
- //电话随访
- html += '<span class="iconhold fatb1 border-radius-circle"><i class="iconfont icon-suifangdianhua"></i></span> 电话随访';
- }
- html += '<span class="list-icon arrow-right"></span>';
- html += '</div>';
- html += '<div class="fpart2">';
- html += '<span class="faname">' + name + '</span> 随访时间:' + czrq;
- html += '</div>';
- html += '<div class="fpart3 c-nowrap">签约医生:' + doctor + ' (' + hospital + ' ' + dept + ')';
- html += '</div>';
- li.innerHTML = html;
- ul.appendChild(li);
- }
|