Browse Source

一些功能

Kirin 4 years ago
parent
commit
e9dfb412e0
2 changed files with 3 additions and 3 deletions
  1. 3 3
      app/api/controller/PublicController.php
  2. 0 0
      public/static/plug/form-create/1.js

+ 3 - 3
app/api/controller/PublicController.php

@@ -46,19 +46,19 @@ class PublicController
                     if (count($dictres)) {
                     if (count($dictres)) {
                         $childs = ', "children": [';
                         $childs = ', "children": [';
                         foreach ($dictres as $kkk => $vvv) {
                         foreach ($dictres as $kkk => $vvv) {
-                            $ress = $kkk == 0 ? ('{"value": ' . ($kkk + 1) . ', "label": "' . $vvv['name'] . '"}') : (',{"value": ' . ($kkk + 1) . ', "label": "' . $vvv['name'] . '"}');
+                            $ress = $kkk == 0 ? ('{"value": "' . $vvv['name'] . '", "label": "' . $vvv['name'] . '"}') : (',{"value": "' . $vvv['name'] . '", "label": "' . $vvv['name'] . '"}');
                             $childs .= $ress;
                             $childs .= $ress;
                         }
                         }
                         $childs .= "]";
                         $childs .= "]";
                     }
                     }
-                    $ress = $kk == 0 ? ('{"value": ' . ($kk + 1) . ', "label": "' . $vv['name'] . '"}') : (',{"value": ' . ($kk + 1) . ', "label": "' . $vv['name'] . '"}');
+                    $ress = $kk == 0 ? ('{"value":  "' . $vv['name'] . '", "label": "' . $vv['name'] . '"}') : (',{"value": "' . $vv['name'] . '", "label": "' . $vv['name'] . '"}');
                     if ($childs) $ress .= $childs;
                     if ($childs) $ress .= $childs;
                     $ress .= '}';
                     $ress .= '}';
                     $child .= $ress;
                     $child .= $ress;
                 }
                 }
                 $child .= "]";
                 $child .= "]";
             }
             }
-            $ress = $k == 0 ? ('{"value": ' . ($k + 1) . ', "label": "' . $v['name'] . '"}') : (',{"value": ' . ($k + 1) . ', "label": "' . $v['name'] . '"}');
+            $ress = $k == 0 ? ('{"value":  "' . $v['name'] . '", "label": "' . $v['name'] . '"}') : (',{"value": "' . $v['name'] . '", "label": "' . $v['name'] . '"}');
             if ($child) $ress .= $child;
             if ($child) $ress .= $child;
             $ress .= '}';
             $ress .= '}';
             $res .= $ress;
             $res .= $ress;

File diff suppressed because it is too large
+ 0 - 0
public/static/plug/form-create/1.js


Some files were not shown because too many files changed in this diff