Bläddra i källkod

更换标题为纵横建筑云计价
更改清单精灵按钮名
更改显示至-分项 to 分项(清单)
slideResize.js拖动公共接口

zhongzewei 6 år sedan
förälder
incheckning
4da66b8b86

+ 1 - 1
modules/complementary_glj_lib/controllers/gljController.js

@@ -40,7 +40,7 @@ class GljController extends BaseController{
             gljLibId: gljLibId,
             compilationId: sessionCompilation._id,
             compilationName: sessionCompilation.name,
-            versionName: `纵横云计价(${req.session.compilationVersion})`,
+            versionName: `纵横建筑云计价(${req.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV),
             overWriteUrl: overWriteUrl,
         });

+ 4 - 4
modules/complementary_ration_lib/controllers/compleViewController.js

@@ -48,7 +48,7 @@ class CompleViewController extends BaseController{
             redirectInstallation: redirectInstallation,
             gljLibId: gljLibId,
             compilationName: req.session.sessionCompilation.name,
-            versionName: `纵横云计价(${req.session.compilationVersion})`,
+            versionName: `纵横建筑云计价(${req.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV)
         });
     }
@@ -65,7 +65,7 @@ class CompleViewController extends BaseController{
             redirectInstallation: redirectInstallation,
             gljLibId: gljLibId,
             compilationName: req.session.sessionCompilation.name,
-            versionName: `纵横云计价(${req.session.compilationVersion})`,
+            versionName: `纵横建筑云计价(${req.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV)
         });
     }
@@ -82,7 +82,7 @@ class CompleViewController extends BaseController{
             redirectInstallation: redirectInstallation,
             gljLibId: gljLibId,
             compilationName: req.session.sessionCompilation.name,
-            versionName: `纵横云计价(${req.session.compilationVersion})`,
+            versionName: `纵横建筑云计价(${req.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV)
         });
     }
@@ -98,7 +98,7 @@ class CompleViewController extends BaseController{
             redirectGlj: redirectGlj,
             redirectCoe: redirectCoe,
             compilationName: req.session.sessionCompilation.name,
-            versionName: `纵横云计价(${req.session.compilationVersion})`,
+            versionName: `纵横建筑云计价(${req.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV)
         });
     }

+ 1 - 1
modules/main/routes/main_route.js

@@ -28,7 +28,7 @@ module.exports =function (app) {
                         userID: req.session.sessionUser.id,
                         projectData: projectData,
                         compilationName: req.session.sessionCompilation.name,
-                        versionName: `纵横云计价(${req.session.compilationVersion})`,
+                        versionName: `纵横建筑云计价(${req.session.compilationVersion})`,
                         projectReadOnly: projectReadOnly,
                         LicenseKey:config.getLicenseKey(process.env.NODE_ENV),
                         overWriteUrl:req.session.sessionCompilation.overWriteUrl

+ 1 - 1
modules/pm/controllers/pm_controller.js

@@ -289,7 +289,7 @@ module.exports = {
             rationValuation: JSON.stringify(rationValuation),
             engineeringList: JSON.stringify(engineering.List),
             compilationName: sessionCompilation.name,
-            versionName: `纵横云计价(${request.session.compilationVersion})`,
+            versionName: `纵横建筑云计价(${request.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV)
         };
 

+ 1 - 1
modules/users/controllers/boot_controller.js

@@ -49,7 +49,7 @@ class BootController extends BaseController {
             companyScaleList: userModel.companyScale,
             compilation: request.params.compilation,
             compilationName: request.session.sessionCompilation.name,
-            versionName: `纵横云计价(${request.session.compilationVersion})`,
+            versionName: `纵横建筑云计价(${request.session.compilationVersion})`,
         };
         response.render('users/html/login-infoinput', renderData);
     }

+ 4 - 4
modules/users/controllers/user_controller.js

@@ -39,7 +39,7 @@ class UserController extends BaseController {
             companyTypeList: userModel.companyType,
             companyScaleList: userModel.companyScale,
             compilationName: request.session.sessionCompilation.name,
-            versionName: `纵横云计价(${request.session.compilationVersion})`,
+            versionName: `纵横建筑云计价(${request.session.compilationVersion})`,
         };
         response.render('users/html/user-info', renderData);
     }
@@ -121,7 +121,7 @@ class UserController extends BaseController {
             logList: logList,
             pages: pageData,
             compilationName: request.session.sessionCompilation.name,
-            versionName: `纵横云计价(${request.session.compilationVersion})`,
+            versionName: `纵横建筑云计价(${request.session.compilationVersion})`,
         };
         response.render('users/html/user-safe', renderData);
     }
@@ -164,7 +164,7 @@ class UserController extends BaseController {
             userData: userData,
             compilationList: compilationList,
             compilationName: request.session.sessionCompilation.name,
-            versionName: `纵横云计价(${request.session.compilationVersion})`,
+            versionName: `纵横建筑云计价(${request.session.compilationVersion})`,
         };
         response.render('users/html/user-buy', renderData);
     }
@@ -197,7 +197,7 @@ class UserController extends BaseController {
             preferenceSetting: preferenceSetting,
             compilationList: compilationList,
             compilationName: request.session.sessionCompilation.name,
-            versionName: `纵横云计价(${request.session.compilationVersion})`,
+            versionName: `纵横建筑云计价(${request.session.compilationVersion})`,
         };
         response.render('users/html/user-set', renderData);
     }

+ 115 - 2
public/web/slideResize.js

@@ -16,6 +16,24 @@
  * */
 
 const SlideResize = (function() {
+    //设置水平拖动条的宽度
+    //@param {Object dom}resize滚动条
+    function setResizeWidth (resize) {
+        const fixedWidth = 10;
+        //滚动条节点 及 同层非滚动条节点的索引
+        let bros = resize.parent().children();
+        let index = bros.index(resize),
+            otherIndex = index ? 0 : 1;
+        const other = resize.parent().children(`:eq(${otherIndex})`);
+        let resizeParentWidth = resize.parent().width();
+        let resizeDecimalWidth = fixedWidth / resizeParentWidth,
+            otherDecimalWidth = 1 - resizeDecimalWidth;
+        let resizePercentWidth = resizeDecimalWidth * 100 + '%',
+            otherPercentWidth = otherDecimalWidth * 100 + '%';
+        resize.css('width', resizePercentWidth);
+        other.css('width', otherPercentWidth);
+    }
+
     let mouseMoveCount = 0;
     function horizontalSlide(module, eleObj, limit, callback) {
         const triggerCBSize = 5;
@@ -47,6 +65,7 @@ const SlideResize = (function() {
                     rightPercentWidth = rightChange / eleObj.parent.width() * 100 + '%';
                 eleObj.left.css('width', leftPercentWidth);
                 eleObj.right.css('width', rightPercentWidth);
+                setResizeWidth(eleObj.resize);
                 mouseMoveCount += Math.abs(moveSize);
                 if (mouseMoveCount > triggerCBSize && callback) {
                     callback();
@@ -67,20 +86,114 @@ const SlideResize = (function() {
         });
     }
 
-    function loadHorizonWidth(module, eles, callback) {
+    function loadHorizonWidth(module, resizes, eles, callback) {
         for (let ele of eles) {
             let cache = getLocalCache(`${module}${ele.attr('id')}Width`);
             if (cache) {
                 ele.css('width', cache);
             }
         }
+        for (let resize of resizes) {
+            setResizeWidth(resize);
+        }
         if (callback) {
             callback();
         }
     }
 
 
+    /*
+     * div上下拖动
+     * module: 所属模块,防止不同页面相同id导致localstorage数据被覆盖
+     * eleObj: resize, top, topSpread, bottom, bottomSpread
+     * limit: min, max, notTopSpread(上部分非spread部分的高度) notBottomSpread(下部分非spread部分的高度)
+     * */
+    function verticalSlide(module, eleObj, limit, callback) {
+        const triggerCBSize = 5;
+        let drag = false,
+            startPoint = 0,
+            topHeight = 0,
+            bottomHeight = 0,
+            topChange = 0,
+            bottomChange = 0,
+            limitMax = 0;
+
+        eleObj.resize.mousedown(function (e) {
+            drag = true;
+            startPoint = e.clientY;
+            topHeight = eleObj.top.height();
+            bottomHeight = eleObj.bottom.height();
+            limitMax = eval(limit.max);
+        });
+        $('body').mousemove(function (e) {
+            if (drag) {
+                let moveSize = e.clientY - startPoint;
+                topChange = topHeight + moveSize;
+                topChange = topChange < limit.min ? limit.min : topChange;
+                topChange = topChange > limitMax ? limitMax - 3 : topChange;
+                bottomChange = bottomHeight - moveSize;
+                bottomChange = bottomChange < limit.min ? limit.min : bottomChange;
+                bottomChange = bottomChange > limitMax ? limitMax - 3 : bottomChange;
 
+                //设置上部分div高度
+                eleObj.top.height(topChange);
+                //设置上部分div内spread高度
+                eleObj.topSpread.height(topChange - limit.notTopSpread);
+                //设置下部分div高度
+                eleObj.bottom.height(bottomChange);
+                //设置下部分div内spread高度
+                eleObj.bottomSpread.height(bottomChange - limit.notBottomSpread);
+                mouseMoveCount += Math.abs(moveSize);
+                if (mouseMoveCount > triggerCBSize && callback) {
+                    callback();
+                    mouseMoveCount = 0;
+                }
+            }
+        });
+        $('body').mouseup(function (e) {
+            if (drag) {
+                drag = false;
+                mouseMoveCount = 0;
+                //将高度信息存储到localstorage
+                let topHeightInfo = eleObj.top.height();
+                setLocalCache(`${module}${eleObj.top.attr('id')}Height`, topHeightInfo);
+                let bottomHeightInfo = eleObj.bottom.height();
+                setLocalCache(`${module}${eleObj.bottom.attr('id')}Height`, bottomHeightInfo);
+            }
+        });
+    }
+
+    /*
+     * 加载上下高度
+     * module: 所属模块,防止不同页面相同id导致localstorage数据被覆盖
+     * eleObj: top, topSpread, bottom, bottomSpread
+     * limit: totalHeight(实时的上下部分总高度) notTopSpread(上部分非spread部分的高度) notBottomSpread(下部分非spread部分的高度)
+     * */
+
+    function loadVerticalHeight(module, eleObj, limit, callback) {
+        let topHeight = getLocalCache(`${module}${eleObj.top.attr('id')}Height`),
+            bottomHeight = getLocalCache(`${module}${eleObj.bottom.attr('id')}Height`);
+        //默认上下比例
+        const topProp = 5;
+        const bottomProp = 2;
+        let topProportion = topProp / (topProp + bottomProp);
+        if (topHeight !== null && bottomHeight !== null) {
+            topHeight = parseFloat(topHeight);
+            bottomHeight = parseFloat(bottomHeight);
+            topProportion = topHeight / (topHeight + bottomHeight);
+        }
+        //设置当前窗口下的的上下部分高度
+        let totalHeight = eval(limit.totalHeight);
+        let curTopHeight = totalHeight * topProportion,
+            curBottomHeight = totalHeight - curTopHeight;
+        eleObj.top.height(curTopHeight);
+        eleObj.topSpread.height(curTopHeight - limit.notTopSpread);
+        eleObj.bottom.height(curBottomHeight);
+        eleObj.bottomSpread.height(curBottomHeight - limit.notBottomSpread);
+        if (callback) {
+            callback();
+        }
+    }
 
-    return {horizontalSlide, loadHorizonWidth}
+    return {horizontalSlide, loadHorizonWidth, verticalSlide, loadVerticalHeight}
 })();

+ 1 - 1
web/building_saas/complementary_glj_lib/html/tools-gongliaoji.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>人材机库编辑-纵横云计价</title>
+    <title>人材机库编辑-纵横建筑云计价</title>
     <!--inject:css-->
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css" type="text/css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css" type="text/css">

+ 1 - 1
web/building_saas/complementary_glj_lib/js/glj.js

@@ -15,7 +15,7 @@ $(document).ready(function () {
             gljComponentOprObj.workBook.refresh();
         }
     }
-    SlideResize.loadHorizonWidth(moduleName, [$('#leftContent'), $('#midContent'), $('#rightContent')], function () {
+    SlideResize.loadHorizonWidth(moduleName, [$('#rightResize'), $('#leftResize')], [$('#leftContent'), $('#midContent'), $('#rightContent')], function () {
         refreshALlWorkBook();
     });
     //章节树与人材机表

+ 1 - 1
web/building_saas/complementary_ration_lib/html/anzhuang.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>定额库编辑器-纵横云计价</title>
+    <title>定额库编辑器-纵横建筑云计价</title>
     <!--inject:css-->
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/lib/spreadjs/sheets/css/gc.spread.sheets.sc.css" type="text/css">

+ 1 - 1
web/building_saas/complementary_ration_lib/html/dinge.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>定额库编辑器-纵横云计价</title>
+    <title>定额库编辑器-纵横建筑云计价</title>
     <!--inject:css-->
     <link rel="stylesheet" href="/lib/jquery-ui/jquery-ui.css" type="text/css">
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">

+ 1 - 1
web/building_saas/complementary_ration_lib/html/fuzhu.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>定额库编辑器-纵横云计价</title>
+    <title>定额库编辑器-纵横建筑云计价</title>
     <!--inject:css-->
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">

+ 1 - 1
web/building_saas/complementary_ration_lib/html/gongliao.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>定额库编辑器-纵横云计价</title>
+    <title>定额库编辑器-纵横建筑云计价</title>
     <!--inject:css-->
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">

+ 1 - 1
web/building_saas/complementary_ration_lib/html/main.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>定额库编辑器-纵横云计价</title>
+    <title>定额库编辑器-纵横建筑云计价</title>
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
    <!-- <link rel="stylesheet" href="css/bootstrap/themes.css">-->
     <link rel="stylesheet" href="/web/building_saas/css/main.css">

+ 1 - 1
web/building_saas/css/custom.css

@@ -10,7 +10,7 @@ label.title{
 
 
 div.resize{
-    height: 6px;
+    height: 10px;
     background: #f7f7f9;
     width: 100%;
     cursor: s-resize;

+ 4 - 4
web/building_saas/main/html/main.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title><%= projectData.name !== undefined ? projectData.name : '造价书' %>-纵横云计价</title>
+    <title><%= projectData.name !== undefined ? projectData.name : '造价书' %>-纵横建筑云计价</title>
 
     <!-- inject:css -->
     <link rel="stylesheet" href="/lib/jquery-ui/jquery-ui.css" type="text/css">
@@ -108,7 +108,7 @@
                                   <a class="dropdown-item btn-sm" href="javascript:void(0);" id="displayFB2">二级分部</a>
                                   <a class="dropdown-item btn-sm" href="javascript:void(0);" id="displayFB3">三级分部</a>
                                   <a class="dropdown-item btn-sm" href="javascript:void(0);"  id="displayFB4">四级分部</a>
-                                  <a class="dropdown-item btn-sm" href="javascript:void(0);"  id="displayFX">分项</a>
+                                  <a class="dropdown-item btn-sm" href="javascript:void(0);"  id="displayFX">分项(清单)</a>
                                   <a class="dropdown-item btn-sm" href="javascript:void(0);" id="displayZM">子目</a>
                                   <a class="dropdown-item btn-sm" href="javascript:void(0);"  id="displayZD">最底层</a>
                               </div>
@@ -385,8 +385,8 @@
                                                   </div>
                                               </div>
                                               <div class="col-2 p-1">
-                                                  <p class="mt-3"><a id="elfInsertRation" href="javascript:void(0);" class="btn btn-sm btn-primary">插入定额</a></p>
-                                                  <p><a id="elfInsertSingle" href="javascript:void(0)" class="btn btn-sm btn-primary">插入单条</a></p>
+                                                  <p class="mt-3"><a id="elfInsertRation" href="javascript:void(0);" class="btn btn-sm btn-primary">应用选项</a></p>
+                                                  <p><a id="elfInsertSingle" href="javascript:void(0)" class="btn btn-sm btn-primary">应用单条</a></p>
                                               </div>
                                           </div>
                                       </div>

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

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>项目管理-纵横云计价</title>
+    <title>项目管理-纵横建筑云计价</title>
     <!-- inject:css -->
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">

+ 1 - 1
web/users/html/login-infoinput.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>用户信息填写-纵横云计价</title>
+    <title>用户信息填写-纵横建筑云计价</title>
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">

+ 2 - 2
web/users/html/login.html

@@ -4,7 +4,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>用户登录-纵横云计价</title>
+    <title>用户登录-纵横建筑云计价</title>
     <!-- inject:css -->
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
@@ -16,7 +16,7 @@
 <body>
     <div class="container">
         <form class="form-signin" method="post" onsubmit="return false">
-            <h1 class="d-flex justify-content-center">纵横云计价</h1>
+            <h1 class="d-flex justify-content-center">纵横建筑云计价</h1>
             <h4 class="d-flex justify-content-center mb-2">用户登录</h4>
             <div class="form-group">
                 <input id="inputEmail" class="form-control " name="inputEmail" placeholder="通行账号 邮箱/手机" autofocus="" />

+ 1 - 1
web/users/html/user-buy.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>产品激活-纵横云计价</title>
+    <title>产品激活-纵横建筑云计价</title>
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">

+ 1 - 1
web/users/html/user-info.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>账号资料-纵横云计价</title>
+    <title>账号资料-纵横建筑云计价</title>
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">

+ 1 - 1
web/users/html/user-safe.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>账号安全-纵横云计价</title>
+    <title>账号安全-纵横建筑云计价</title>
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">

+ 1 - 1
web/users/html/user-set.html

@@ -5,7 +5,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>登录设置-纵横云计价</title>
+    <title>登录设置-纵横建筑云计价</title>
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">