Authored by chenchao

fix

@@ -20,18 +20,13 @@ @@ -20,18 +20,13 @@
20 </div> 20 </div>
21 </div> 21 </div>
22 22
23 -<script type="text/template" id="edit-template">  
24 -  
25 - 23 +<script type="text/template" id="edit-template">
26 <input type="hidden" name="" value="[[id]]" id="id" class="form-control" value="" required="required" pattern="" title=""> 24 <input type="hidden" name="" value="[[id]]" id="id" class="form-control" value="" required="required" pattern="" title="">
27 <div class="form-group"> 25 <div class="form-group">
28 <label for="parameterValue" class="col-sm-3 control-label">参数值</label> 26 <label for="parameterValue" class="col-sm-3 control-label">参数值</label>
29 <div class="col-md-6"> 27 <div class="col-md-6">
30 <input type="text" name="" value="[[parameterValue]]" id="parameterValue" class="form-control" value="" required="required" pattern="" title="" maxlength="20"> 28 <input type="text" name="" value="[[parameterValue]]" id="parameterValue" class="form-control" value="" required="required" pattern="" title="" maxlength="20">
31 </div> 29 </div>
32 - </div>  
33 -  
34 -  
35 - 30 + </div>
36 </script> 31 </script>
37 <%include '../../../common/views/__ui/footer'%> 32 <%include '../../../common/views/__ui/footer'%>
@@ -2,10 +2,31 @@ @@ -2,10 +2,31 @@
2 var $ = require('jquery'), 2 var $ = require('jquery'),
3 common = require('../../../common/common'); 3 common = require('../../../common/common');
4 4
  5 +var GetRequestParams = function() {
  6 + var url = location.search; //获取url中"?"符后的字串
  7 + var theRequest = {};
  8 + if (url.indexOf("?") != -1) {
  9 + var str = url.substr(1);
  10 + strs = str.split("&");
  11 + for(var i = 0; i < strs.length; i ++) {
  12 + var paramNameVal = strs[i].split("=");
  13 + theRequest[paramNameVal[0]] = decodeURIComponent(paramNameVal[1]);
  14 + }
  15 + }
  16 + return theRequest;
  17 +};
  18 +
  19 +var getSortsJson = function(reqJson){
  20 + var sortArry = [];
  21 + sortArry.push({id: reqJson.maxSortId , sortName: reqJson.maxSortName});
  22 + sortArry.push({id: reqJson.middleSortId, sortName: reqJson.middleSortName});
  23 + sortArry.push({id: reqJson.smallSortId, sortName: reqJson.smallSortName});
  24 + return sortArry;
  25 +};
5 26
6 27
7 var tabTree = new common.tabTree("#sortTree"); 28 var tabTree = new common.tabTree("#sortTree");
8 -tabTree.init(); 29 +tabTree.init(getSortsJson(GetRequestParams()));
9 30
10 new common.dropDown({ 31 new common.dropDown({
11 el: '#stortTypeId', 32 el: '#stortTypeId',