Selaa lähdekoodia

feat: 进入以下编办,在项目管理界面不允许新建(上方蓝色新建按钮)、右键不允许另存为、复制到、导入建设项目(#4861)

vian 1 vuosi sitten
vanhempi
commit
640257bb15

+ 3 - 3
web/building_saas/pm/html/project-management.html

@@ -487,10 +487,10 @@
             </div>
             <div class="modal-body">
                 <p style="margin-bottom: 0;">尊敬的用户:</p>
-                <p style="margin-bottom: 0; text-indent: 28px;">感谢您一直以来对纵横的信任和支持,为了更好坚守初心,持续为您提供高质量的产品与服务,纵横公路养护云造价已升级为<a href="https://dsk.smartcost.com.cn/">大司空云计价</a>。</p>
+                <p style="margin-bottom: 0; text-indent: 28px;">感谢您一直以来对纵横的信任和支持,为了更好坚守初心,持续为您提供高质量的产品与服务,纵横公路养护云造价已升级为<a href="https://dsk.smartcost.com.cn/">大司空云计价</a>。</p>
                 <div style="text-indent: 28px;" style="margin-bottom: 0;">
-                    <p style="margin-bottom: 0;">请使用<a href="https://dsk.smartcost.com.cn/">大司空云计价</a>编制新项目,现版本已停止新建项目。</p>
-                    <p style="margin-bottom: 0;">请联系当地客服免费升级账号</p>
+                    <!-- <p style="margin-bottom: 0;">请使用<a href="https://dsk.smartcost.com.cn/">大司空云计价</a>编制新项目,现版本已停止新建项目。</p> -->
+                    <p style="margin-bottom: 0;">请联系当地客服免费升级账号,使用<a href="https://dsk.smartcost.com.cn/">大司空云计价</a>编制新项目。</p>
                     <p style="margin-bottom: 0;">当地服务热线:<a id="stop-create-contact" href="javascript:void(0);">联系</a>当地客服</p>
                     <p style="margin-bottom: 0;">全国服务热线:0756-3850888,企业QQ:800003850</p>
                 </div>

+ 23 - 6
web/building_saas/pm/js/pm_newMain.js

@@ -50,6 +50,11 @@ const {
 } = window.commonConstants;
 const { similarEqual, isDef } = window.commonUtil;
 
+function isStopCreate() {
+  const names = ['重庆养护(2018)', '内蒙古养护(2019)', '甘肃养护(2021)', '内蒙古高速公路养护(2022)', '内蒙古高速公路养护(2022)'];
+  return !!(compilationData && names.includes(compilationData.name));
+}
+
 //操作状态
 const STATE = {
   addingTender: false,
@@ -321,9 +326,7 @@ const projTreeObj = {
         return projTreeObj.getAddBtnDisabled(projectType.project);
       },
       callback: function (key, opt) {
-        const names = ['重庆养护(2018)', '内蒙古养护(2019)', '甘肃养护(2021)', '内蒙古高速公路养护(2022)', '内蒙古高速公路养护(2022)'];
-        const stopCreate = compilationData && names.includes(compilationData.name);
-        if (stopCreate) {
+        if (isStopCreate()) {
           $('#stop-create-dialog').modal('show');
         } else {
           $('#add-project-dialog').modal('show');
@@ -385,6 +388,10 @@ const projTreeObj = {
         return !(node && node.data.projType === projectType.tender);
       },
       callback: function (key, opt) {
+        if (isStopCreate()) {
+          $('#stop-create-dialog').modal('show');
+          return;
+        }
         let selectedItem = projTreeObj.tree.selected;
         try {
           let selectedType =
@@ -410,6 +417,10 @@ const projTreeObj = {
         return !(node && node.data.projType === projectType.tender);
       },
       callback: function (key, opt) {
+        if (isStopCreate()) {
+          $('#stop-create-dialog').modal('show');
+          return;
+        }
         $("#save-as-dialog").modal("show");
       },
     },
@@ -545,6 +556,10 @@ const projTreeObj = {
         return true;
       },
       callback: function (key, opt) {
+        if (isStopCreate()) {
+          $('#stop-create-dialog').modal('show');
+          return;
+        }
         $("#confirm-import").hide();
         $("#import").modal("show");
         projTreeObj.getUploadToken();
@@ -2582,6 +2597,10 @@ $(document).ready(function () {
 
   // 新建子菜单有效性刷新
   $("#addMenuBtn").click(function () {
+    if (isStopCreate()) {
+      $('#stop-create-dialog').modal('show');
+      return false;
+    }
     const menuDisplay = !$("#addMenu").is(":visible");
     if (!menuDisplay) {
       return;
@@ -4242,9 +4261,7 @@ function AddTender() {
     //let newTab = window.open('about:blank');
     let tempProj = getNodeByName(projName, tempProjs);
     if (!tempProj) {
-      const names = ['重庆养护(2018)', '内蒙古养护(2019)', '甘肃养护(2021)', '内蒙古高速公路养护(2022)', '内蒙古高速公路养护(2022)'];
-      const stopCreate = compilationData && names.includes(compilationData.name);
-      if (stopCreate) {
+      if (isStopCreate()) {
         $('#stop-create-dialog').modal('show');
         return;
       }