lizhi 3 mesiacov pred
rodič
commit
b30b6e16ca

+ 4 - 1
protected/controllers/UseradminController.php

@@ -139,6 +139,7 @@ class UseradminController extends Controller
             'username' => $username,
             'phone' => $phone,
             'sex' => $sex,
+            'role_id' => $role_id,
         ];
         if (!$id) {
             // 新增用户
@@ -149,7 +150,6 @@ class UseradminController extends Controller
                 Helper::error('请选择角色');
             }
             $info['password'] = md5($password);
-            $info['role_id'] = $role_id;
             DB::addData('useradmin', $info);
         } else {
             DB::updateById('useradmin', $info, $id);
@@ -173,6 +173,9 @@ class UseradminController extends Controller
         if ($id < 1) {
             Helper::error('参数错误');
         }
+        if (DB::getScalerWithCriteria('useradmin', DbCriteria::simpleCompare(['role_id' => $id]))->setselect('id')) {
+            Helper::error('该角色下有用户,请先删除用户');
+        }
         DB::deleteById('role', $id);
         Helper::ok();
     }

+ 49 - 18
protected/include/LewaimaiAdminPingtaiAuth.php

@@ -91,29 +91,60 @@ class LewaimaiAdminPingtaiAuth
             'school/updateattr' => 120102,
             'school/delete' => 120103,
 
+            // ===================   学校关系  =======================
+            'schoolrelation/list' => 120200,
+            'schoolrelation/getselectlist' => 120200,
+            'schoolrelation/info' => 120200,
+            'schoolrelation/add' => 120201,
+            'schoolrelation/edit' => 120202,
+            'schoolrelation/updateattr' => 120202,
+            'schoolrelation/delete' => 120203,
+
+            // ===================   学校跟进 =======================
+            'follow/schoollist' => 120300,
+            'follow/schoolall' => 120300,
+            'follow/schoolinfo' => 120300,
+            'follow/schooladd' => 120301,
+
+            // ===================   食堂  =======================
+            'canteen/list' => 130100,
+            'canteen/getselectlist' => 130100,
+            'canteen/info' => 130100,
+            'canteen/add' => 130101,
+            'canteen/edit' => 130102,
+            'canteen/updateattr' => 130102,
+            'canteen/delete' => 130103,
+
+            // ===================   食堂跟进 =======================
+            'follow/canteenlist' => 130300,
+            'follow/canteenall' => 130300,
+            'follow/canteeninfo' => 130300,
+            'follow/canteenadd' => 130301,
+
+
             // ===================   餐饮公司  =======================
-            'company/list' => 120100,
-            'company/getselectlist' => 120100,
-            'company/info' => 120100,
-            'company/add' => 120101,
-            'company/edit' => 120102,
-            'company/updateattr' => 120102,
-            'company/delete' => 120103,
+            'company/list' => 140100,
+            'company/getselectlist' => 140100,
+            'company/info' => 140100,
+            'company/add' => 140101,
+            'company/edit' => 140102,
+            'company/updateattr' => 140102,
+            'company/delete' => 140103,
 
             // ===================   餐饮公司关系  =======================
-            'companyrelation/list' => 120200,
-            'companyrelation/getselectlist' => 120200,
-            'companyrelation/info' => 120200,
-            'companyrelation/add' => 120201,
-            'companyrelation/edit' => 120202,
-            'companyrelation/updateattr' => 120202,
-            'companyrelation/delete' => 120203,
+            'companyrelation/list' => 140200,
+            'companyrelation/getselectlist' => 140200,
+            'companyrelation/info' => 140200,
+            'companyrelation/add' => 140201,
+            'companyrelation/edit' => 140202,
+            'companyrelation/updateattr' => 140202,
+            'companyrelation/delete' => 140203,
 
             // ===================   餐饮公司跟进 =======================
-            'follow/companylist' => 120300,
-            'follow/companyall' => 120300,
-            'follow/companyinfo' => 120300,
-            'follow/companyadd' => 120301,
+            'follow/companylist' => 140300,
+            'follow/companyall' => 140300,
+            'follow/companyinfo' => 140300,
+            'follow/companyadd' => 140301,
 
 
         ];

+ 4 - 4
web/src/components/core/layouts/art-header-bar/index.vue

@@ -62,19 +62,19 @@
           </div>
         </div>
         <!-- 通知 -->
-        <div class="btn-box notice-btn" v-if="shouldShowNotification" @click="visibleNotice">
+<!--        <div class="btn-box notice-btn" v-if="shouldShowNotification" @click="visibleNotice">
           <div class="btn notice-button">
             <i class="iconfont-sys notice-btn">&#xe6c2;</i>
             <span class="count notice-btn"></span>
           </div>
-        </div>
+        </div>-->
         <!-- 聊天 -->
-        <div class="btn-box chat-btn" v-if="shouldShowChat" @click="openChat">
+<!--        <div class="btn-box chat-btn" v-if="shouldShowChat" @click="openChat">
           <div class="btn chat-button">
             <i class="iconfont-sys">&#xe89a;</i>
             <span class="dot"></span>
           </div>
-        </div>
+        </div>-->
         <!-- 语言 -->
         <div class="btn-box" v-if="shouldShowLanguage">
           <ElDropdown @command="changeLanguage" popper-class="langDropDownStyle">

+ 2 - 2
web/src/router/routes/asyncRoutes.ts

@@ -128,7 +128,7 @@ export const asyncRoutes: AppRouteRecord[] = [
                             title: '列表',
                         },
                         {
-                            id: 120302,
+                            id: 120301,
                             title: '编辑',
                         }
                     ]
@@ -334,7 +334,7 @@ export const asyncRoutes: AppRouteRecord[] = [
                             title: '列表',
                         },
                         {
-                            id: 140302,
+                            id: 140301,
                             title: '编辑',
                         }
                     ]

+ 1 - 1
web/src/views/dashboard/console/index.vue

@@ -4,7 +4,7 @@
       <el-col v-for="(item, index) in dataList" :key="index" :sm="13" :md="7">
         <div class="card art-custom-card">
           <span class="des subtitle">{{ item.des }}</span>
-          <ArtCountTo class="number box-title" :target="item.num" :duration="1300" />
+          <ArtCountTo class="number box-title" :target="item.num" :duration="200" />
           <ElButton type="primary" class="iconfont-sys" @click="go(item.detail_path)">详情</ElButton>
         </div>
       </el-col>