|
@@ -15,7 +15,8 @@ const {
|
|
ywCheckApi
|
|
ywCheckApi
|
|
} = require('./api.js');
|
|
} = require('./api.js');
|
|
let checkOk = require('./../images/checkOk.png')
|
|
let checkOk = require('./../images/checkOk.png')
|
|
-const adLogo = require("../images/adlogo.png")
|
|
|
|
|
|
+const adLogo = require("../images/adlogo.png");
|
|
|
|
+const { resolveShowConfigPath } = require("@babel/core/lib/config/files/index.js");
|
|
if (localStorage.getItem('toLogin') === '1') {
|
|
if (localStorage.getItem('toLogin') === '1') {
|
|
window.location.href = '../login.html';
|
|
window.location.href = '../login.html';
|
|
}
|
|
}
|
|
@@ -201,70 +202,90 @@ $(function () {
|
|
}
|
|
}
|
|
//发送入院记录
|
|
//发送入院记录
|
|
function sendRuleWarn(msg, i) {
|
|
function sendRuleWarn(msg, i) {
|
|
- $(".send-flaw:eq(" + i + ")").css({
|
|
|
|
- "display": "none"
|
|
|
|
- });
|
|
|
|
- $(".ysend-flaw:eq(" + i + ")").css({
|
|
|
|
- "display": "inline"
|
|
|
|
- });
|
|
|
|
- $(".ysend-flaw:eq(" + i + ")").off('click');
|
|
|
|
|
|
+
|
|
|
|
+
|
|
post(api.sendRuleWarn, {
|
|
post(api.sendRuleWarn, {
|
|
- 'behospitalCode': global_id,
|
|
|
|
- 'msg': msg
|
|
|
|
|
|
+ "behospitalCode": global_id,
|
|
|
|
+ "msg": msg.msg
|
|
}).then(function (res) {
|
|
}).then(function (res) {
|
|
- if (res.data.code !== '0') {
|
|
|
|
- console.error('发送警告失败,代码:', res.data.code);
|
|
|
|
- $(".send-flaw:eq(" + i + ")").css({
|
|
|
|
- "display": "inline"
|
|
|
|
- });
|
|
|
|
- $(".ysend-flaw:eq(" + i + ")").css({
|
|
|
|
- "display": "none"
|
|
|
|
- });
|
|
|
|
|
|
+ if (res.data.code === '0' && res.data.data === true) {
|
|
|
|
+ $(".send-flaw:eq(" + i + ")").text("已发送");
|
|
|
|
+ // $(".ysend-flaw:eq(" + i + ")").css({
|
|
|
|
+ // "display": "inline"
|
|
|
|
+ // });
|
|
|
|
+ // $(".ysend-flaw:eq(" + i + ")").off('click');
|
|
|
|
+ $("#delModal").hide();
|
|
}
|
|
}
|
|
- }).catch(function (error) {
|
|
|
|
- console.error('发送警告失败:', error);
|
|
|
|
- $(".send-flaw:eq(" + i + ")").css({
|
|
|
|
- "display": "inline"
|
|
|
|
- });
|
|
|
|
- $(".ysend-flaw:eq(" + i + ")").css({
|
|
|
|
- "display": "none"
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
|
|
+
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ console.error('发送警告失败:', err);
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // $(".send-flaw:eq(" + i + ")").css({
|
|
|
|
+ // "display": "none"
|
|
|
|
+ // });
|
|
|
|
+ // $(".ysend-flaw:eq(" + i + ")").css({
|
|
|
|
+ // "display": "inline"
|
|
|
|
+ // });
|
|
|
|
+ // $(".ysend-flaw:eq(" + i + ")").off('click');
|
|
|
|
+ // post(api.sendRuleWarn, {
|
|
|
|
+ // 'behospitalCode': global_id,
|
|
|
|
+ // 'msg': msg
|
|
|
|
+ // }).then(function (res) {
|
|
|
|
+ // if (res.data.code !== '0') {
|
|
|
|
+ // console.error('发送警告失败,代码:', res.data.code);
|
|
|
|
+ // $(".send-flaw:eq(" + i + ")").css({
|
|
|
|
+ // "display": "inline"
|
|
|
|
+ // });
|
|
|
|
+ // $(".ysend-flaw:eq(" + i + ")").css({
|
|
|
|
+ // "display": "none"
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // }).catch(function (error) {
|
|
|
|
+ // console.error('发送警告失败:', error);
|
|
|
|
+ // $(".send-flaw:eq(" + i + ")").css({
|
|
|
|
+ // "display": "inline"
|
|
|
|
+ // });
|
|
|
|
+ // $(".ysend-flaw:eq(" + i + ")").css({
|
|
|
|
+ // "display": "none"
|
|
|
|
+ // });
|
|
|
|
+ // });
|
|
}
|
|
}
|
|
//已发送持久化
|
|
//已发送持久化
|
|
- function saveStatus() {
|
|
|
|
- post(api.getRecordDetail, {
|
|
|
|
- 'behospitalCode': global_id
|
|
|
|
- }).then(function (res) {
|
|
|
|
- const data = res.data.data;
|
|
|
|
- const { msg } = data;
|
|
|
|
- console.log("11111", msg);
|
|
|
|
- for (const key in msg) {
|
|
|
|
- if (msg.hasOwnProperty(key)) {
|
|
|
|
- const records = msg[key];
|
|
|
|
-
|
|
|
|
- records.forEach(function (record, i) {
|
|
|
|
- const isSend = record.isSend;
|
|
|
|
- console.log(`isSend: ${isSend}, index: ${i}`);
|
|
|
|
-
|
|
|
|
- if (isSend === 2) {
|
|
|
|
- $(".send-flaw:eq(" + i + ")").css("display", "none");
|
|
|
|
- $(".ysend-flaw:eq(" + i + ")").css("display", "inline");
|
|
|
|
- $(".ysend-flaw:eq(" + i + ")").off('click');
|
|
|
|
- } else {
|
|
|
|
- console.error('状态为发送:', res.data.code);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }).catch(function (error) {
|
|
|
|
- console.error('状态为发送:', error);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- window.onload = function() {
|
|
|
|
- saveStatus(); // 页面加载完成后调用
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
|
|
+ // function saveStatus() {
|
|
|
|
+ // post(api.getRecordDetail, {
|
|
|
|
+ // 'behospitalCode': global_id
|
|
|
|
+ // }).then(function (res) {
|
|
|
|
+ // const data = res.data.data;
|
|
|
|
+ // const { msg } = data;
|
|
|
|
+ // console.log("11111", msg);
|
|
|
|
+ // for (const key in msg) {
|
|
|
|
+ // if (msg.hasOwnProperty(key)) {
|
|
|
|
+ // const records = msg[key];
|
|
|
|
+
|
|
|
|
+ // records.forEach(function (record, i) {
|
|
|
|
+ // const isSend = record.isSend;
|
|
|
|
+ // console.log(`isSend: ${isSend}, index: ${i}`);
|
|
|
|
+
|
|
|
|
+ // if (isSend === 2) {
|
|
|
|
+ // $(".send-flaw:eq(" + i + ")").css("display", "none");
|
|
|
|
+ // $(".ysend-flaw:eq(" + i + ")").css("display", "inline");
|
|
|
|
+ // $(".ysend-flaw:eq(" + i + ")").off('click');
|
|
|
|
+ // } else {
|
|
|
|
+ // console.error('状态为发送:', res.data.code);
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }).catch(function (error) {
|
|
|
|
+ // console.log('状态为发送:', error);
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // window.onload = function () {
|
|
|
|
+ // saveStatus(); // 页面加载完成后调用
|
|
|
|
+ // };
|
|
|
|
+
|
|
//获取病例明细
|
|
//获取病例明细
|
|
function getRecordDetail() {
|
|
function getRecordDetail() {
|
|
post(api.getRecordDetail, {
|
|
post(api.getRecordDetail, {
|
|
@@ -295,6 +316,7 @@ $(function () {
|
|
initList(msg);
|
|
initList(msg);
|
|
initScoreItem(msg);
|
|
initScoreItem(msg);
|
|
global_flawData = msg;
|
|
global_flawData = msg;
|
|
|
|
+ // console.log("global_flawData", global_flawData);
|
|
global_flawDataPay = drgs;
|
|
global_flawDataPay = drgs;
|
|
setBoxHeight();
|
|
setBoxHeight();
|
|
changePay()
|
|
changePay()
|
|
@@ -510,19 +532,21 @@ $(function () {
|
|
}
|
|
}
|
|
showFlawList();
|
|
showFlawList();
|
|
$(".flaw-item .oper a").unbind("click").click(function (e) {
|
|
$(".flaw-item .oper a").unbind("click").click(function (e) {
|
|
- // const i = $(".flaw-item[code=" + global_activeTab + "]").index($(this).parents(".flaw-item"));
|
|
|
|
- // const code = $(this).attr("code");
|
|
|
|
- // const isEdit = $(this).is(".edit-flaw");
|
|
|
|
- // const isSend = $(this).is(".send-flaw");
|
|
|
|
- const flawItem = $(this).closest(".flaw-item");
|
|
|
|
- const i = flawItem.index();
|
|
|
|
- // const code = flawItem.attr("code");
|
|
|
|
|
|
+ const i = $(".flaw-item[code=" + global_activeTab + "]").index($(this).parents(".flaw-item"));
|
|
const code = $(this).attr("code");
|
|
const code = $(this).attr("code");
|
|
const isEdit = $(this).is(".edit-flaw");
|
|
const isEdit = $(this).is(".edit-flaw");
|
|
const isSend = $(this).is(".send-flaw");
|
|
const isSend = $(this).is(".send-flaw");
|
|
- console.log("global_activeTab:", global_activeTab);
|
|
|
|
- console.log("code:", code);
|
|
|
|
- console.log("i:", i);
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // const flawItem = $(this).closest(".flaw-item");
|
|
|
|
+ // const i = flawItem.index();
|
|
|
|
+ // // const code = flawItem.attr("code");
|
|
|
|
+ // const code = $(this).attr("code");
|
|
|
|
+ // const isEdit = $(this).is(".edit-flaw");
|
|
|
|
+ // const isSend = $(this).is(".send-flaw");
|
|
|
|
+ // console.log("global_activeTab:", global_activeTab);
|
|
|
|
+ // console.log("code:", code);
|
|
|
|
+ // console.log("i:", i);
|
|
|
|
|
|
if (isEdit && hasAu) {
|
|
if (isEdit && hasAu) {
|
|
showModal('0', code, i); //编辑
|
|
showModal('0', code, i); //编辑
|
|
@@ -530,9 +554,10 @@ $(function () {
|
|
if ($(this).is(".recover-flaw")) {
|
|
if ($(this).is(".recover-flaw")) {
|
|
showModal('3', code, i); //恢复
|
|
showModal('3', code, i); //恢复
|
|
} else if (isSend) {
|
|
} else if (isSend) {
|
|
- const msg = $(".send-flaw:eq(" + i + ")").parent(".oper").parent(".opers").prev(".title").text();
|
|
|
|
- console.log($(".send-flaw:eq(" + i + ")").parent(".oper").parent(".opers").prev(".title").text());
|
|
|
|
- sendRuleWarn(msg.replace(/\s/g, ""), i)
|
|
|
|
|
|
+ // const msg = $(".send-flaw:eq(" + i + ")").parent(".oper").parent(".opers").prev(".title").text();
|
|
|
|
+ // console.log($(".send-flaw:eq(" + i + ")").parent(".oper").parent(".opers").prev(".title").text());
|
|
|
|
+ // sendRuleWarn(msg.replace(/\s/g, ""), i)
|
|
|
|
+ showModal('4', code, i); //发送
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
showModal('1', code, i); //删除
|
|
showModal('1', code, i); //删除
|
|
@@ -548,9 +573,9 @@ $(function () {
|
|
$(".send-flaw").css({
|
|
$(".send-flaw").css({
|
|
"display": hasSend ? "inline" : "none"
|
|
"display": hasSend ? "inline" : "none"
|
|
});
|
|
});
|
|
- $(".ysend-flaw").css({
|
|
|
|
- "display": "none"
|
|
|
|
- });
|
|
|
|
|
|
+ // $(".ysend-flaw").css({
|
|
|
|
+ // "display": "none"
|
|
|
|
+ // });
|
|
$(".add-flaw").css({
|
|
$(".add-flaw").css({
|
|
"display": hasAu3 && global_check_show ? "inline" : "none"
|
|
"display": hasAu3 && global_check_show ? "inline" : "none"
|
|
});
|
|
});
|
|
@@ -717,10 +742,10 @@ $(function () {
|
|
//事件解绑
|
|
//事件解绑
|
|
$("#delModal .confirm").off("click");
|
|
$("#delModal .confirm").off("click");
|
|
const flawsList = formatFlawKeys(global_flawData);
|
|
const flawsList = formatFlawKeys(global_flawData);
|
|
- console.log(flawsList);
|
|
|
|
|
|
+ // console.log(flawsList);
|
|
|
|
|
|
const info = flawsList[global_activeTab] && flawsList[global_activeTab][i];
|
|
const info = flawsList[global_activeTab] && flawsList[global_activeTab][i];
|
|
- console.log(info, flag);
|
|
|
|
|
|
+ // console.log("@@@@", info);
|
|
|
|
|
|
|
|
|
|
if (flag === '0') { //修改
|
|
if (flag === '0') { //修改
|
|
@@ -874,6 +899,19 @@ $(function () {
|
|
delScore(code, info);
|
|
delScore(code, info);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ else if (flag === '4') {
|
|
|
|
+ $("#delModal .title").text("发送提示");
|
|
|
|
+ $("#delModal .modal-body").html('<p>确定要发送吗?</p>');
|
|
|
|
+ $("#delModal .confirm").text("确定").unbind("click").click(function () {
|
|
|
|
+
|
|
|
|
+ sendRuleWarn(info, i)
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ $("#delModal .cancel").show().text("取消").unbind("click").click(function () {
|
|
|
|
+ $("#delModal").hide();
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//缺陷列表key值去掉特殊符号
|
|
//缺陷列表key值去掉特殊符号
|
|
function formatFlawKeys(data) {
|
|
function formatFlawKeys(data) {
|
|
@@ -1064,8 +1102,8 @@ $(function () {
|
|
const posClass = position === 1 ? 'text-left' : '';
|
|
const posClass = position === 1 ? 'text-left' : '';
|
|
const boldClass = bold === 1 ? 'text-bold' : '';
|
|
const boldClass = bold === 1 ? 'text-bold' : '';
|
|
const retractClass = retract === 1 ? 'text-indent' : '';
|
|
const retractClass = retract === 1 ? 'text-indent' : '';
|
|
- const lineHml = ('<p class="' + posClass + ' ' + boldClass + ' ' + retractClass + '" contenteditable="false">'+ extractVars(val) + '</p>');
|
|
|
|
- const txtHml = ('<p style="display: inline;vertical-align: middle;" class="' + posClass + ' ' + boldClass + ' ' + retractClass +'" contenteditable="false">' + extractVars(val) + '</p>');
|
|
|
|
|
|
+ const lineHml = ('<p class="' + posClass + ' ' + boldClass + ' ' + retractClass + '" contenteditable="false">' + extractVars(val) + '</p>');
|
|
|
|
+ const txtHml = ('<p style="display: inline;vertical-align: middle;" class="' + posClass + ' ' + boldClass + ' ' + retractClass + '" contenteditable="false">' + extractVars(val) + '</p>');
|
|
|
|
|
|
let hml = addLine || monoLine ? `<div class="cont ${posClass}" style="width: 100%;" id="anchor${id}">` : `<div class="cont" id="anchor${id}">`;
|
|
let hml = addLine || monoLine ? `<div class="cont ${posClass}" style="width: 100%;" id="anchor${id}">` : `<div class="cont" id="anchor${id}">`;
|
|
hml = hml + `<span class="label">${name}</span>` + (addLine ? lineHml : txtHml) + `</div>`;
|
|
hml = hml + `<span class="label">${name}</span>` + (addLine ? lineHml : txtHml) + `</div>`;
|
|
@@ -1177,5 +1215,5 @@ $(function () {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
});
|
|
});
|