function resultConsultation(index, layero) {
let body = layer.getChildFrame("body", index);
let data = {};
var resultConsultation;
var _objs = [];
var code;
var url;
body.find("#changefileform").serializeArray().forEach(function(item, index) {
if (item.name == "resultConsultation") {
resultConsultation = item.value;
}
if (item.name == "code") {
code = item.value;
}
if (item.name == "url") {
url = item.value;
}
if (item.name == "img") {
_objs.push({
code: code,
name: item.value,
url: url
});
}
});
if (resultConsultation == "") {
layer.msg('请输入会诊结果', {
zIndex: layer.zIndex + 100
});
return;
}
var isCheck = false;
$(_objs).each(function(i, element) {
if (element.name == "") {
isCheck = true;
}
})
if (isCheck) {
layer.msg('请输入图片名称!', {
zIndex: layer.zIndex + 100
});
return;
}
var parameter = {
resultConsultation: resultConsultation,
img: _objs
};
var acceptConsultation = [];
var applyConsultation = [];
if (apply == "request") {
applyConsultation = parameter;
} else {
acceptConsultation = parameter;
}
console.log(acceptConsultation);
console.log(applyConsultation);
}
$(document).on("click", "#reuslt", function() {
layer.open({
title: '会诊结果',
type: 2,
shade: false,
area: ['700px', '550px'],
btn: ['确定', '关闭'],
yes: function(index, layero) {
resultConsultation(index, layero);
},
maxmin: false,
content: 'consultationResults.html?',
zIndex: layer.zIndex, //重点1
success: function(layero) {
layer.setTop(layero); //重点2
}
});
})