浏览代码

问题修改

1178232204@qq.com 3 年之前
父节点
当前提交
1ce003cd03
共有 3 个文件被更改,包括 45 次插入11 次删除
  1. 22 5
      src/js/appealUserPage.js
  2. 1 1
      src/js/index.js
  3. 22 5
      src/js/qcScore.js

+ 22 - 5
src/js/appealUserPage.js

@@ -37,6 +37,7 @@ $(function () {
   let global_flaws = [];  //缺陷条目列表缓存
   let global_selectedFlaw = {};    //新增时选中的条目信息
   let global_checkers = [];    //审核人列表
+  let menuList = [];
   getAllModules();
 
   const form = getUrlArgObject("form") || 0;
@@ -163,6 +164,15 @@ $(function () {
         global_check = checkStatus
         global_check_home = mrStatus
         global_check_show = checkShow;
+        const list = JSON.parse(result.menuData)
+        for (let i = 0; i < list.length; i++) {
+          const item = list[i];
+          menuList.push(item.name)
+          for (let j = 0; j < item.sonMode.length; j++) {
+            const it = item.sonMode[j];
+            menuList.push(it.name)
+          }
+        }
         const info = Object.assign(beHospital, result);
         initMenu(JSON.parse(result.menuData));
         // $(".sub-menu>ul>li:first-child.page,.menu-mini>ul>li:first-child.page").addClass("active");
@@ -371,16 +381,23 @@ $(function () {
     $(".page-anchor").on("click", function () {
       const code = $(this).attr("code");
       const pCode = $(this).parents("tr").attr("code").replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g, '');
+      const tCode = $(this).parents("tr").attr("code")
+      //菜单同步状态
+      if (menuList.indexOf(tCode) == -1) {
+        console.log(123);
+        $.alerModal({ "message": '模块数据缺失~', type: "tip", time: '1000', isFather: true, fatherWrapper: $(".flaw-table", parent.document) });
+        return;
+      }
       //菜单同步状态
       $(".sub-menu .page[code=" + pCode + "]").parents(".list-1").click();
       $(".sub-menu .page[code=" + pCode + "],.menu-mini .page[code=" + pCode + "").click();
       //缺陷定位
       $(".info-item .cont,.flaw-item,td").removeClass("active");
-      const flawItem = $(".flaw-item .title a[code=" + code + "]");
-      if (!flawItem.length) {
-        $.alerModal({ "message": '模块数据缺失~', type: "tip", time: '1000', isFather: true, fatherWrapper: $(".flaw-table", parent.document) });
-        return;
-      }
+      // const flawItem = $(".flaw-item .title a[code=" + code + "]");
+      // if (!flawItem.length) {
+      //   $.alerModal({ "message": '模块数据缺失~', type: "tip", time: '1000', isFather: true, fatherWrapper: $(".flaw-table", parent.document) });
+      //   return;
+      // }
       $(".flaw-item .title a[code=" + code + "]").click();
       const anch = $(".flaw-item .title a[code=" + code + "]").attr("href");
       if ($(anch)[0]) {

+ 1 - 1
src/js/index.js

@@ -100,7 +100,7 @@ $(function () {
   $(window).click(function (e) {
     $(".userAction").css("display", "none")
   })
-  $("#changeWord").css("opacity", hasData('FUNC000002') ? '1' : '0.5').hover(function () {
+  $("#changeWord").css("opacity", hasData('FUNC000002') ? '1' : '1').hover(function () {
     $(this).css("color", "#777777")
   })
   if (isPlacefile == 0) {

+ 22 - 5
src/js/qcScore.js

@@ -35,6 +35,7 @@ $(function () {
   let global_modules = {};   //模板数据缓存
   let global_flaws = [];  //缺陷条目列表缓存
   let global_selectedFlaw = {};    //新增时选中的条目信息
+  let menuList = [];
   getAllModules();
   let showCheckBtns = global_code === "YH-ZKHC-HCRWLB";
   window.document.title = (showCheckBtns ? "质控核查-" : "质控评分-") + getUrlArgObject("name");
@@ -188,6 +189,15 @@ $(function () {
         global_check = checkStatus
         global_check_home = mrStatus
         global_check_show = checkShow;//0隐藏操作按钮1显示
+        const list = JSON.parse(result.menuData)
+        for (let i = 0; i < list.length; i++) {
+          const item = list[i];
+          menuList.push(item.name)
+          for (let j = 0; j < item.sonMode.length; j++) {
+            const it = item.sonMode[j];
+            menuList.push(it.name)
+          }
+        }
         check_Operation_WithAppeal = checkOperationWithAppeal;
         const info = Object.assign(beHospital, result);
         initMenu(JSON.parse(result.menuData));
@@ -364,16 +374,23 @@ $(function () {
     $(".page-anchor").on("click", function () {
       const code = $(this).attr("code");
       const pCode = $(this).parents("tr").attr("code").replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g, '');
+      const tCode = $(this).parents("tr").attr("code")
+      //菜单同步状态
+      if (menuList.indexOf(tCode) == -1) {
+        console.log(123);
+        $.alerModal({ "message": '模块数据缺失~', type: "tip", time: '1000', isFather: true, fatherWrapper: $(".flaw-table", parent.document) });
+        return;
+      }
       //菜单同步状态
       $(".sub-menu .page[code=" + pCode + "]").parents(".list-1").click();
       $(".sub-menu .page[code=" + pCode + "],.menu-mini .page[code=" + pCode + "").click();
       //缺陷定位
       $(".info-item .cont,.flaw-item,td").removeClass("active");
-      const flawItem = $(".flaw-item .title a[code=" + code + "]");
-      if (!flawItem.length) {
-        $.alerModal({ "message": '模块数据缺失~', type: "tip", time: '1000', isFather: true, fatherWrapper: $(".flaw-table", parent.document) });
-        return;
-      }
+      // const flawItem = $(".flaw-item .title a[code=" + code + "]");
+      // if (!flawItem.length) {
+      //   $.alerModal({ "message": '模块数据缺失~', type: "tip", time: '1000', isFather: true, fatherWrapper: $(".flaw-table", parent.document) });
+      //   return;
+      // }
       $(".flaw-item .title a[code=" + code + "]").click();
       const anch = $(".flaw-item .title a[code=" + code + "]").attr("href");
       if ($(anch)[0]) {