Ver código fonte

修改一些界面

sandm 2 anos atrás
pai
commit
0a0174ae45
2 arquivos alterados com 7 adições e 23 exclusões
  1. 3 21
      app/index/controller/Auth.php
  2. 4 2
      app/index/view/auth/policy.html

+ 3 - 21
app/index/controller/Auth.php

@@ -138,32 +138,14 @@ class Auth extends BaseController {
         return json($result);
     }
 
-    public function policy_condition($condition_json = null){
-        if($condition_json){
-            $condition = json_decode($condition_json);
-        }else{
-            $condition = [];
-            $obj = new \StdClass();
-            $obj->label = "工业和信息化局";
-            $obj->value = "gxj";
-            $obj->children = [];
-
-
-
-
-        }
-    }
-
     public function policy_update(){
         $res = $this->request->post();
         foreach ($res as $k => $v){
-            dd($v);
+
             $update = [];
-            if(count($v['checks']) > 0){
-                $update['checks'] = implode(',',$v['checks']);
-            }
+
             if(count($v['condition']) > 0){
-                $update['condition'] = implode(',',$v['condition']);
+                $update['condition'] = json_encode($v['condition']);
             }
             if(count($update) > 0){
                 Db::table('new_policy')->where('id',$v['id'])->save($update);

+ 4 - 2
app/index/view/auth/policy.html

@@ -30,11 +30,13 @@
             <el-table-column label="人才认定标准" prop="policy">
 
             </el-table-column>
-            <el-table-column label="标签" prop="tag">
+            <el-table-column label="标签" prop="tag" width="150">
 
             </el-table-column>
             <el-table-column label="审核部门与条件">
-                <el-cascader :options="options" :props="props" clearable @change="change"></el-cascader>
+                <template slot-scope="scope">
+                    <el-cascader :options="options" :props="props" clearable @change="change" style="width:600px" v-model="scope.row.condition"></el-cascader>
+                </template>
             </el-table-column>
         </el-table>
         <el-row style="margin-top: 20px;text-align: center">