|
@@ -264,7 +264,8 @@ $(function () {
|
|
|
|
|
|
global_diagList = diagList;
|
|
global_diagList = diagList;
|
|
global_operaList = operaList;
|
|
global_operaList = operaList;
|
|
-
|
|
|
|
|
|
+ console.log("global_diagList:", global_diagList)
|
|
|
|
+ console.log("global_operaList:", global_operaList);
|
|
initContent(result.pageData);
|
|
initContent(result.pageData);
|
|
|
|
|
|
initList(msg);
|
|
initList(msg);
|
|
@@ -1168,18 +1169,43 @@ $(function () {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
/**编辑状态*/
|
|
/**编辑状态*/
|
|
|
|
+
|
|
var isEditing = {
|
|
var isEditing = {
|
|
"病案首页": false,
|
|
"病案首页": false,
|
|
"入院记录": false,
|
|
"入院记录": false,
|
|
"首次病程录": false,
|
|
"首次病程录": false,
|
|
- "查房记录": false,
|
|
|
|
|
|
+ "查房记录": [],
|
|
"会诊申请单": false,
|
|
"会诊申请单": false,
|
|
"会诊结果单": false,
|
|
"会诊结果单": false,
|
|
"出院小结": false
|
|
"出院小结": false
|
|
}
|
|
}
|
|
|
|
+
|
|
$("body").on("click", ".save", function () {
|
|
$("body").on("click", ".save", function () {
|
|
- if (!isEditing[global_activeTab]) {
|
|
|
|
- isEditing[global_activeTab] = true//改变为编辑状态
|
|
|
|
|
|
+ let editStatus = false
|
|
|
|
+ let index = -1
|
|
|
|
+
|
|
|
|
+ if (global_activeTab === "查房记录") {
|
|
|
|
+ index = $(".content-item[code='查房记录']").index($(this).parents('.content-item'))
|
|
|
|
+ if (isEditing[global_activeTab].length === 0) {
|
|
|
|
+ const inspectionRecordsCount = $(".content-item[code='查房记录']").size()
|
|
|
|
+ isEditing[global_activeTab] = new Array(inspectionRecordsCount).fill(false)
|
|
|
|
+ editStatus = false
|
|
|
|
+ } else {
|
|
|
|
+ editStatus = isEditing[global_activeTab][index]
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ editStatus = isEditing[global_activeTab]
|
|
|
|
+ }
|
|
|
|
+ if (!editStatus) {
|
|
|
|
+
|
|
|
|
+ if (global_activeTab === "查房记录") {
|
|
|
|
+ isEditing[global_activeTab][index] = true
|
|
|
|
+ editStatus = true
|
|
|
|
+ } else {
|
|
|
|
+ isEditing[global_activeTab] = true
|
|
|
|
+ editStatus = true
|
|
|
|
+ }
|
|
console.log("编辑中");
|
|
console.log("编辑中");
|
|
$(this).text('保存');
|
|
$(this).text('保存');
|
|
} else {
|
|
} else {
|
|
@@ -1193,6 +1219,7 @@ $(function () {
|
|
hideLoading()
|
|
hideLoading()
|
|
$.alerModal({ "message": "保存成功", type: "tip", time: '1000', win: true });
|
|
$.alerModal({ "message": "保存成功", type: "tip", time: '1000', win: true });
|
|
isEditing[global_activeTab] = false
|
|
isEditing[global_activeTab] = false
|
|
|
|
+ editStatus = false
|
|
$(this).text('编辑');
|
|
$(this).text('编辑');
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
hideLoading()
|
|
hideLoading()
|
|
@@ -1206,8 +1233,17 @@ $(function () {
|
|
admissionRecordUpdate().then(res => {
|
|
admissionRecordUpdate().then(res => {
|
|
hideLoading()
|
|
hideLoading()
|
|
$(this).text('编辑');
|
|
$(this).text('编辑');
|
|
|
|
+ isEditing[global_activeTab] = false
|
|
|
|
+ editStatus = false
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+ break
|
|
|
|
+ case "查房记录":
|
|
|
|
+ console.log("index:", index);
|
|
|
|
+ hideLoading()
|
|
|
|
+ isEditing[global_activeTab][index] = false
|
|
|
|
+ editStatus = false
|
|
|
|
+ $(this).text('编辑');
|
|
break
|
|
break
|
|
case "首次病程录":
|
|
case "首次病程录":
|
|
firstRecordUpdate().then(res => {
|
|
firstRecordUpdate().then(res => {
|
|
@@ -1215,6 +1251,7 @@ $(function () {
|
|
hideLoading()
|
|
hideLoading()
|
|
$.alerModal({ "message": "保存成功", type: "tip", time: '1000', win: true });
|
|
$.alerModal({ "message": "保存成功", type: "tip", time: '1000', win: true });
|
|
isEditing[global_activeTab] = false
|
|
isEditing[global_activeTab] = false
|
|
|
|
+ editStatus = false
|
|
$(this).text('编辑');
|
|
$(this).text('编辑');
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
hideLoading()
|
|
hideLoading()
|
|
@@ -1227,10 +1264,11 @@ $(function () {
|
|
default:
|
|
default:
|
|
hideLoading()
|
|
hideLoading()
|
|
isEditing[global_activeTab] = false
|
|
isEditing[global_activeTab] = false
|
|
|
|
+ editStatus = false
|
|
$(this).text('编辑');
|
|
$(this).text('编辑');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- $(this).parents(".content-item").find('p, .embed-table .table-1 td, .opera-table td,.embed-table .table-2 td,.inner-table td').attr('contenteditable', isEditing[global_activeTab]);
|
|
|
|
|
|
+ $(this).parents(".content-item").find('p, .embed-table .table-1 td, .opera-table td,.embed-table .table-2 td,.inner-table td').attr('contenteditable', editStatus);
|
|
});
|
|
});
|
|
|
|
|
|
/**验证首次病程录更新*/
|
|
/**验证首次病程录更新*/
|
|
@@ -1430,11 +1468,11 @@ $(function () {
|
|
/**国籍*/
|
|
/**国籍*/
|
|
const nationality = $('#anchor22324 p').text()
|
|
const nationality = $('#anchor22324 p').text()
|
|
|
|
|
|
- let split_anchor2243 = $('#anchor2243 p').text().split(/[天月]/)
|
|
|
|
|
|
+ let matches_anchor2243 = $('#anchor2243 p').text().match(/\d+\.?d+/)
|
|
/**新生儿出生月数*/
|
|
/**新生儿出生月数*/
|
|
- const newbornMonth = split_anchor2243 ? split_anchor2243[0].trim() : ""
|
|
|
|
|
|
+ const newbornMonth = matches_anchor2243 ? matches_anchor2243[0].trim() : ""
|
|
/**新生儿出生天数*/
|
|
/**新生儿出生天数*/
|
|
- const newbornDay = split_anchor2243 ? split_anchor2243[1].trim() : ""
|
|
|
|
|
|
+ const newbornDay = matches_anchor2243 ? matches_anchor2243[1].trim() : ""
|
|
/**新生儿出生体重*/
|
|
/**新生儿出生体重*/
|
|
const newbornWeight = $('#anchor2244 p').text().replace("克", "") || "-"
|
|
const newbornWeight = $('#anchor2244 p').text().replace("克", "") || "-"
|
|
/**新生儿入院体重*/
|
|
/**新生儿入院体重*/
|