|
@ -20,24 +20,24 @@ layui.use('element', function () {
|
|
|
layer.confirm('您确定要执行该操作吗?', { btn: ['确定', '取消'], title: "提示" }, function (index) {
|
|
|
if (num == 2) {
|
|
|
showInfoMessage("计划已完成")
|
|
|
$("#stopBtn_"+planid).attr('disabled', true).addClass("falsebutton")
|
|
|
$("#stopBtn_" + planid).attr('disabled', true).addClass("falsebutton")
|
|
|
|
|
|
} else {
|
|
|
isStop = num == 0 ? 1 : 0
|
|
|
}
|
|
|
if (isStop == 0) {
|
|
|
$("#progress_"+planid).css({
|
|
|
"background-color": "gray"
|
|
|
})
|
|
|
$("#stopBtn_"+planid).html("激活计划")
|
|
|
} else {
|
|
|
$("#progress_"+planid).css({
|
|
|
"background-color": "#ff9526"
|
|
|
})
|
|
|
$("#stopBtn_"+planid).html("终止计划")
|
|
|
|
|
|
}
|
|
|
console.log(isStop)
|
|
|
$("#progress_" + planid).css({
|
|
|
"background-color": "gray"
|
|
|
})
|
|
|
$("#stopBtn_" + planid).html("激活计划")
|
|
|
} else {
|
|
|
$("#progress_" + planid).css({
|
|
|
"background-color": "#ff9526"
|
|
|
})
|
|
|
$("#stopBtn_" + planid).html("终止计划")
|
|
|
|
|
|
}
|
|
|
console.log(isStop)
|
|
|
|
|
|
var params = {
|
|
|
status: isStop,
|
|
@ -81,10 +81,10 @@ layui.use('element', function () {
|
|
|
planid: "",
|
|
|
isStop: 1, //
|
|
|
isActive: true,
|
|
|
doctorType:"",
|
|
|
docInfo:[],
|
|
|
isLeader:0,
|
|
|
|
|
|
doctorType: "",
|
|
|
docInfo: [],
|
|
|
isLeader: 0,
|
|
|
planCreateUser: ""
|
|
|
|
|
|
|
|
|
},
|
|
@ -97,50 +97,56 @@ layui.use('element', function () {
|
|
|
var allFinishCount = val[i].allFinishCount
|
|
|
var allCount = val[i].allCount
|
|
|
var isStop = val[i].status
|
|
|
var ishospitalName=val[i].hospitalName
|
|
|
if(ishospitalName==null){
|
|
|
$("#hospitalName_"+val[i].id).html("暂无社区信息")
|
|
|
var ishospitalName = val[i].hospitalName
|
|
|
vm.planCreateUser = val[i].planCreateUser
|
|
|
if (vm.planCreateUser[i]!== vm.docInfo.code) {
|
|
|
$("#stopBtn_" + val[i].id).attr('disabled', "true")
|
|
|
$("#stopBtn_" + val[i].id).addClass("falsebutton")
|
|
|
}
|
|
|
|
|
|
if (ishospitalName == null) {
|
|
|
$("#hospitalName_" + val[i].id).html("暂无社区信息")
|
|
|
}
|
|
|
if(allCount==0){
|
|
|
if (allCount == 0) {
|
|
|
Progress(val[i].id, 0 + "%")
|
|
|
|
|
|
}else{
|
|
|
} else {
|
|
|
var progressNum = Math.ceil((allFinishCount / allCount) * 100)
|
|
|
Progress(val[i].id, progressNum + "%")
|
|
|
}
|
|
|
if (isStop == 0) {
|
|
|
$("#progress_"+val[i].id).css({
|
|
|
"background-color": "gray"
|
|
|
})
|
|
|
$("#stopBtn_"+val[i].id).html("激活计划")
|
|
|
} else {
|
|
|
$("#progress_"+val[i].id).css({
|
|
|
"background-color": "#ff9526"
|
|
|
})
|
|
|
$("#stopBtn_"+val[i].id).html("终止计划")
|
|
|
|
|
|
}
|
|
|
$("#progress_" + val[i].id).css({
|
|
|
"background-color": "gray"
|
|
|
})
|
|
|
$("#stopBtn_" + val[i].id).html("激活计划")
|
|
|
} else {
|
|
|
$("#progress_" + val[i].id).css({
|
|
|
"background-color": "#ff9526"
|
|
|
})
|
|
|
$("#stopBtn_" + val[i].id).html("终止计划")
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
var lastColor = 'red';
|
|
|
for (var i = 0; i < val.length; i++) {
|
|
|
if (i == 0) {
|
|
|
$($(".quote")[i]).css("background-color","#12b7f5")
|
|
|
$($(".quote")[i]).css("background-color", "#12b7f5")
|
|
|
continue
|
|
|
}
|
|
|
if (val[i].patientName == val[i - 1].patientName) {
|
|
|
$($(".quote")[i]).css("background-color","#02cfb9")
|
|
|
$($(".quote")[i]).css("background-color", "#02cfb9")
|
|
|
|
|
|
if (lastColor === 'red') {
|
|
|
$($(".quote")[i]).css("background-color","#12b7f5")
|
|
|
$($(".quote")[i]).css("background-color", "#12b7f5")
|
|
|
}
|
|
|
} else {
|
|
|
if (lastColor !== 'red') {
|
|
|
$($(".quote")[i]).css("background-color","#12b7f5")
|
|
|
$($(".quote")[i]).css("background-color", "#12b7f5")
|
|
|
lastColor = 'red'
|
|
|
} else {
|
|
|
lastColor = 'white'
|
|
|
$($(".quote")[i]).css("background-color","#02cfb9")
|
|
|
$($(".quote")[i]).css("background-color", "#02cfb9")
|
|
|
|
|
|
}
|
|
|
|
|
@ -159,11 +165,11 @@ layui.use('element', function () {
|
|
|
// vm.getModal()
|
|
|
vm.getDatas()
|
|
|
vm.gettypes()
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
setImgSrc: function(src) {
|
|
|
setImgSrc: function (src) {
|
|
|
var str = httpRequest.getImgUrl(src)
|
|
|
return str
|
|
|
},
|
|
@ -191,15 +197,15 @@ layui.use('element', function () {
|
|
|
}
|
|
|
vm.docInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'))
|
|
|
|
|
|
vm.doctorType= vm.docInfo.doctorType
|
|
|
if(vm.doctorType!==1){
|
|
|
$(".neironglef>button").attr('disabled',"true")
|
|
|
vm.doctorType = vm.docInfo.doctorType
|
|
|
if (vm.doctorType !== 1) {
|
|
|
$(".neironglef>button").attr('disabled', "true")
|
|
|
$(".neironglef>button").addClass("falsebutton")
|
|
|
$(".neironglef>button").css("color","white")
|
|
|
$(".stopBtn").attr('disabled',"true")
|
|
|
$(".stopBtn").addClass("falsebutton")
|
|
|
}
|
|
|
|
|
|
$(".neironglef>button").css("color", "white")
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
@ -209,10 +215,10 @@ layui.use('element', function () {
|
|
|
})
|
|
|
healthAPI.doctorBaseinfo().then(function (res) {
|
|
|
console.log(res.data)
|
|
|
vm.isLeader=res.data.isLeader
|
|
|
console.log( vm.isLeader)
|
|
|
if( vm.isLeader==0){
|
|
|
|
|
|
vm.isLeader = res.data.isLeader
|
|
|
console.log(vm.isLeader)
|
|
|
if (vm.isLeader == 0) {
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
@ -295,18 +301,19 @@ layui.use('element', function () {
|
|
|
morePlan: function (data) {
|
|
|
location.href = "moreplan.html?patientCode=" + data.patientCode
|
|
|
},
|
|
|
|
|
|
|
|
|
stop: function (data) {
|
|
|
var vm = this
|
|
|
vm.planid = data.id
|
|
|
conFirm("确定终止该计划吗", data.status, vm.isStop, vm.planid, vm.getDatas)
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
newRecover:function(){
|
|
|
location.href="../../recover/html/new_recover.html"
|
|
|
newRecover: function () {
|
|
|
location.href = "../../recover/html/new_recover.html"
|
|
|
},
|
|
|
checkPlan:function(data){
|
|
|
checkPlan: function (data) {
|
|
|
var vm=this
|
|
|
location.href = "../../rehabilitation/html/rehabilitation_management.html?planId=" + data.id
|
|
|
|
|
|
|