浏览代码

Merge branch '1.0.0_online' of http://smartcost.f3322.net:3000/SmartCost/ConstructionOperation into 1.0.0_online

zhongzewei 6 年之前
父节点
当前提交
5363ae6178

+ 1 - 0
web/maintain/project_feature_lib/html/edit.html

@@ -13,6 +13,7 @@
             <nav class="navbar sticky-top navbar-toggleable-md navbar-light bg-faded tools-bar">
                 <div class="collapse navbar-collapse" id="navbarNav">
                     <div class="tools-btn btn-group align-top">
+                        <a href="javascript:void(0)" class="btn btn-sm" id="createNormal"><i class="fa fa-list-alt" aria-hidden="true"></i> 生成默认</a>
                         <a href="javascript:void(0)" class="btn btn-sm" id="format"><i class="fa fa-list-alt" aria-hidden="true"></i> 校验格式</a>
                         <a href="javascript:void(0)" class="btn btn-sm" id="save"><i class="fa fa-floppy-o" aria-hidden="true"></i> 保存</a>
                     </div>

+ 30 - 1
web/maintain/project_feature_lib/js/project_feature_edit.js

@@ -28,9 +28,38 @@ $(document).ready(function () {
             console.log(err);
             alert("保存失败,请查看输入数据");
         }
-
     })
+    $("#createNormal").click(async function() {
+        let projectFeature = [
+            {dispName: '工程专业', key: 'engineering', value: ''},//只读,用户新建单位工程时选择的值
+            {dispName: '工程类型', key: 'projType', value: ''},
+            {dispName: '结构类型', key: 'structureType', value: ''},
+            {dispName: '基础类型', key: 'baseType', value: ''},
+            {dispName: '建筑特征', key: 'buildingFeature', value: ''},
+            {dispName: '建筑面积(m2)', key: 'buildingArea', value: ''},
+            {dispName: '其中地下室建筑面积(m2)', key: 'basementBuildingArea', value: ''},
+            {dispName: '总层数', key: 'totalFloors', value: ''},
+            {dispName: '地下室层数(+/-0.00以下)', key: 'basementFloors', value: ''},
+            {dispName: '建筑层数(+/-0.00以下)', key: 'buildingFloors', value: ''},
+            {dispName: '建筑物总高度(m)', key: 'buildingHeight', value: ''},
+            {dispName: '地下室总高度(m)', key: 'basementHeight', value: ''},
+            {dispName: '首层高度(m)', key: 'firstFloorHeight', value: ''},
+            {dispName: '裙楼高度(m)', key: 'podiumBuildingHeight', value: ''},
+            {dispName: '标准层高度(m)', key: 'standardFloorHeight', value: ''},
+            {dispName: '基础材料及装饰', key: 'baseMaterial', value: ''},
+            {dispName: '楼地面材料及装饰', key: 'flooringMaterial', value: ''},
+            {dispName: '外墙材料及装饰', key: 'exteriorWallMaterial', value: ''},
+            {dispName: '屋面材料及装饰', key: 'roofingMaterial', value: ''},
+            {dispName: '门窗材料及装饰', key: 'doorsWindowsMaterial', value: ''}
+        ];
+        try {
+            let jsonText =  JSON.stringify(projectFeature);
+            $("#featureList").val(JSON.stringify(JSON.parse(jsonText),null,4));
+        }catch (err){
+            console.log(err);
+        }
 
+    })
 
 
 });

+ 1 - 1
web/users/js/compilation.js

@@ -128,7 +128,7 @@ $(document).ready(function() {
              alert("请选择定额库");
              return;
          }
-        if($("input[data-id = "+rationLib+"]").length <= 0){
+        if($("input:hidden[name=ration_lib][data-id = "+rationLib+"]").length <= 0){
             let tem = {
                 id:rationLib,
                 name:rationLibString,