Преглед на файлове

删除一些发送相关的注释代码

DESKTOP-QGP20P1\dev_2 преди 8 месеца
родител
ревизия
ecf8041c8c
променени са 1 файла, в които са добавени 9 реда и са изтрити 84 реда
  1. 9 84
      src/js/qcScore.js

+ 9 - 84
src/js/qcScore.js

@@ -212,85 +212,14 @@ $(function () {
       if (res.data.code === '0' && res.data.data === true) {
         this_flaw.text("已发送")
         this_flaw.off('click')
-        // $(".send-flaw:eq(" + i + ")").text("已发送");
-        // $(".send-flaw:eq(" + i + ")").off('click');
-        // $(".ysend-flaw:eq(" + i + ")").css({
-        //   "display": "inline"
-        // });
-        // $(".ysend-flaw:eq(" + i + ")").off('click');
-        $("#delModal").hide();
+          $("#delModal").hide();
       }
 
     }).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.log('状态为发送:', error);
-  //   });
-  // }
-  // window.onload = function () {
-  //   saveStatus(); // 页面加载完成后调用
-  // };
-
-  //获取病例明细
+    //获取病例明细
   function getRecordDetail() {
     post(api.getRecordDetail, {
       'behospitalCode': global_id
@@ -559,9 +488,7 @@ $(function () {
         if ($(this).is(".recover-flaw")) {
           showModal('3', code, i); //恢复
         } 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)
+
           showModal('4', $(this), i); //发送
         }
         else {
@@ -906,15 +833,13 @@ $(function () {
     }
     else if (flag === '4') {
       $("#delModal .title").text("发送提示");
-      $("#delModal .modal-body").html('<p>确定要发送吗?</p>');
-      $("#delModal .confirm").text("确定").unbind("click").click(function () {
-
-        sendRuleWarn(info, i, code)
-
-      });
-      $("#delModal .cancel").show().text("取消").unbind("click").click(function () {
+      $("#delModal .modal-body").html('<p>确定要发送该评分记录吗?</p>');
+      $("#delModal .confirm").text("取消").unbind("click").click(function () {
         $("#delModal").hide();
       });
+      $("#delModal .cancel").show().text("发送").unbind("click").click(function () {
+        sendRuleWarn(info, i, code)
+      });
 
     }
   }