Browse Source

Merge branch 'master' of http://39.106.8.246:3003/web/ibms

chuwu 5 years ago
parent
commit
ccf36eff5b

+ 11 - 1
src/api/scan/fetch.js

@@ -1,6 +1,7 @@
 import Vue from 'vue'
 import axios from 'axios'
 import vueAxios from 'vue-axios'
+import { Message } from 'element-ui';
 
 Vue.use(vueAxios, axios)
     //创建实例
@@ -20,7 +21,16 @@ service.interceptors.request.use(config => {
 
 //response拦截器
 service.interceptors.response.use(
-    response => response,
+    response => {
+        let resp = response.data;
+        let result = resp.result || resp.Result
+        if (result == 'success' || result == 'Success') {
+            return response
+        } else {
+            let msg = resp.message ? resp.message : resp.ResultMsg;
+            Message.error({ message: msg });
+        }        
+    },
     error => {
         console.log('err' + error)
         return Promise.reject(error)

+ 232 - 176
src/data/menus.js

@@ -1,23 +1,4 @@
-export default [
-    {
-        path: '/system',
-        name: '系统管理',
-        icon: 'el-icon-fa-bank',
-        children: [
-            {
-                path: '/system/users',
-                name: '用户管理',
-                icon: 'el-icon-fa-user',
-                opts: [
-                    {
-                        name: '查看',
-                        basic: true,
-                        permission: 'system:user:query'
-                    }
-                ]
-            }
-        ]
-    },
+export default [    
         //报警设置
         // {
         //     path: '/alarmconfig',
@@ -94,10 +75,134 @@ export default [
         //         }
         //     ]
         // },
-        // 点位配置
+    //数字化交付相关
+    {
+        path: '/projgroup',
+        name: '数字化交付相关',
+        disabled: true,
+    },
+    // 项目化配置
+    {
+        path: '/proj',
+        name: '项目基础设置',
+        icon: 'el-icon-fa-bank',
+        children: [           
+            {
+                path: '/proj/collectsetting',
+                name: '项目需采集的信息点',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }, {
+                path: '/proj/custominfo',
+                name: '自定义信息点',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }, {
+                path: '/proj/floorinfo',
+                name: '楼层信息管理',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            },
+            {
+                path: '/floor/appuser',
+                name: '扫楼App用户管理',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }
+        ]
+    },
+    // 模型管理
+    {
+        path: '/model',
+        name: '模型管理',
+        icon: 'el-icon-fa-bank',
+        children: [
+            {
+                path: '/model/file',
+                name: '模型文件管理',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }, {
+                path: '/model/noentity',
+                name: '未实体化模型清单',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }, {
+                path: '/model/beforemodel',
+                name: '待建模清单',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }, {
+                path: '/model/modelrule',
+                name: '拓扑检查',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }, {
+                path: '/model/beacon',
+                name: '信标清单',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }
+        ]
+    },
+        // 系统集成
         {
             path: '/point',
-            name: '点位表管理',
+            name: '系统集成',
             icon: 'el-icon-fa-bank',
             children: [
                 {
@@ -111,18 +216,85 @@ export default [
                             permission: 'system:role:query'
                         }
                     ]
+                }, {
+                    path: '/point/dynamicdata',
+                    name: '动态数据关联',
+                    icon: 'el-icon-fa-user',
+                    opts: [
+                        {
+                            name: '查看',
+                            basic: true,
+                            permission: 'system:role:query'
+                        }
+                    ]
                 }
             ]
         },
-        // 项目化配置
+    //扫楼作业
+    {
+        path: '/floor',
+        name: '扫楼作业',
+        icon: 'el-icon-fa-bank',
+        children: [
+            {
+                path: '/floor/data',
+                name: '扫楼数据管理',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            },
+            {
+                path: '/floor/plan',
+                name: '楼层平面图管理',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            },
+            {
+                path: '/floor/abnormalprop',
+                name: '异常资产清单',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            },
+            {
+                path: '/floor/log',
+                name: '扫楼日志查看',
+                icon: 'el-icon-fa-user',
+                opts: [
+                    {
+                        name: '查看',
+                        basic: true,
+                        permission: 'system:role:query'
+                    }
+                ]
+            }
+        ]
+    },
+        //台账管理
         {
-            path: '/proj',
-            name: '项目化配置',
+            path: '/ledger',
+            name: '台账管理',
             icon: 'el-icon-fa-bank',
             children: [
                 {
-                    path: '/proj/custominfo',
-                    name: '自定义信息点',
+                    path: '/ledger/facility',
+                    name: '设备清单',
                     icon: 'el-icon-fa-user',
                     opts: [
                         {
@@ -133,8 +305,8 @@ export default [
                     ]
                 },
                 {
-                    path: '/proj/collectsetting',
-                    name: '配置项目需采集的信息',
+                    path: '/ledger/property',
+                    name: '资产清单',
                     icon: 'el-icon-fa-user',
                     opts: [
                         {
@@ -143,18 +315,10 @@ export default [
                             permission: 'system:role:query'
                         }
                     ]
-                }
-            ]
-        },
-        //台账管理
-        {
-            path: '/ledger',
-            name: '台账管理',
-            icon: 'el-icon-fa-bank',
-            children: [
+                },
                 {
-                    path: '/ledger/facility',
-                    name: '设备管理',
+                    path: '/ledger/cenotelist',
+                    name: '竖井清单',
                     icon: 'el-icon-fa-user',
                     opts: [
                         {
@@ -165,8 +329,8 @@ export default [
                     ]
                 },
                 {
-                    path: '/ledger/system',
-                    name: '系统管理',
+                    path: '/ledger/dimension',
+                    name: '元空间管理',
                     icon: 'el-icon-fa-user',
                     opts: [
                         {
@@ -175,10 +339,10 @@ export default [
                             permission: 'system:role:query'
                         }
                     ]
-                },
+                }, 
                 {
-                    path: '/ledger/property',
-                    name: '资产管理',
+                    path: '/ledger/rubbish',
+                    name: '垃圾数据检查',
                     icon: 'el-icon-fa-user',
                     opts: [
                         {
@@ -187,18 +351,10 @@ export default [
                             permission: 'system:role:query'
                         }
                     ]
-                }
-            ]
-        },
-        //业务空间管理
-        {
-            path: '/business',
-            name: '业务空间管理',
-            icon: 'el-icon-fa-bank',
-            children: [
+                }, 
                 {
-                    path: '/business/spacelist',
-                    name: '业务空间清单',
+                    path: '/ledger/updowncheck',
+                    name: '上下级关系检查',
                     icon: 'el-icon-fa-user',
                     opts: [
                         {
@@ -207,18 +363,25 @@ export default [
                             permission: 'system:role:query'
                         }
                     ]
-                }
+                }                
+                
             ]
         },
-        //竖井管理
+    //业务相关
+    {
+        path: '/busgroup',
+        name: '业务相关',
+        disabled: true,
+    },
+        //业务空间管理
         {
-            path: '/cenote',
-            name: '竖井管理',
+            path: '/business',
+            name: '业务空间管理',
             icon: 'el-icon-fa-bank',
             children: [
                 {
-                    path: '/cenote/cenotelist',
-                    name: '竖井清单',
+                    path: '/business/spacelist',
+                    name: '业务空间清单',
                     icon: 'el-icon-fa-user',
                     opts: [
                         {
@@ -227,7 +390,7 @@ export default [
                             permission: 'system:role:query'
                         }
                     ]
-                }
+                },
             ]
         },
         //租户管理
@@ -250,39 +413,15 @@ export default [
                 }
             ]
         },
-        //扫楼数据管理
+        //系统管理
         {
-            path: '/floor',
-            name: '扫楼数据管理',
+            path: '/system',
+            name: '系统管理',
             icon: 'el-icon-fa-bank',
             children: [
                 {
-                    path: '/floor/data',
-                    name: '扫楼数据管理',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                },
-                {
-                    path: '/floor/plan',
-                    name: '楼层平面图管理',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                },
-                {
-                    path: '/floor/abnormalprop',
-                    name: '异常资产清单',
+                    path: '/system/list',
+                    name: '系统清单',
                     icon: 'el-icon-fa-user',
                     opts: [
                         {
@@ -292,90 +431,7 @@ export default [
                         }
                     ]
                 },
-                {
-                    path: '/floor/log',
-                    name: '扫楼日志查看',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                },
-                {
-                    path: '/floor/appuser',
-                    name: '扫楼App用户管理',
-                    icon: 'el-icon-fa-user',
-                    opts: [
-                        {
-                            name: '查看',
-                            basic: true,
-                            permission: 'system:role:query'
-                        }
-                    ]
-                }
             ]
         },
-        //环境调节
-        // {
-        //     path: '/environment',
-        //     name: '环境调节',
-        //     icon: 'el-icon-fa-bank',
-        //     children: [
-        //         {
-        //             path: '/environment/envlist',
-        //             name: '环境服务定制设置',
-        //             icon: 'el-icon-fa-user',
-        //             opts: [
-        //                 {
-        //                     name: '查看',
-        //                     basic: true,
-        //                     permission: 'system:role:query'
-        //                 }
-        //             ]
-        //         }
-        //     ]
-        // },
-        //市场及商务
-        // {
-        //     path: '/market',
-        //     name: '市场及商务',
-        //     icon: 'el-icon-fa-bank',
-        //     children: [
-        //         {
-        //             path: '/market/own',
-        //             name: '业主管理',
-        //             icon: 'el-icon-fa-user',
-        //             opts: [
-        //                 {
-        //                     name: '查看',
-        //                     basic: true,
-        //                     permission: 'system:role:query'
-        //                 }
-        //             ]
-        //         }
-        //     ]
-        // },
-        //revit服务器端化的web功能
-        // {
-        //     path: '/revitservice',
-        //     name: 'revit服务器端化',
-        //     icon: 'el-icon-fa-bank',
-        //     children: [
-        //         {
-        //             path: '/revitservice/revit',
-        //             name: '设计中',
-        //             icon: 'el-icon-fa-user',
-        //             opts: [
-        //                 {
-        //                     name: '查看',
-        //                     basic: true,
-        //                     permission: 'system:role:query'
-        //                 }
-        //             ]
-        //         }
-        //     ]
-        // },
+   
 ]

+ 1 - 1
src/framework/layout/PageSidebar.vue

@@ -26,7 +26,7 @@
                         </el-menu-item>
                     </template>
                 </el-submenu>
-                <el-menu-item v-else :index='menu.path' :key='menu.path' class='sidebar-menu-item'>
+                <el-menu-item v-else :index='menu.path' :key='menu.path' class='sidebar-menu-item' disabled>
                     <i v-if='menu.icon' :class='"el-icon-fa "+ menu.icon'></i>
                     <span slot='title'>{{menu.name}}</span>
                 </el-menu-item>

+ 1 - 1
src/framework/style/layout.scss

@@ -45,7 +45,7 @@ body {
 
         .page-sidebar-wrapper {
             width: $pageSidebarWidth;
-            overflow-y: auto;
+            overflow-y: hidden;
             flex-grow: 0;
             flex-shrink: 0;
         }

+ 48 - 48
src/router/system.js

@@ -45,39 +45,30 @@ import propertyLedger from '@/views/ledger/property'
 export default [
     { path: '/', name: '', component: LayoutMain },
     { path: '/login', name: 'Login', component: Login },
-    {
-        path: '/system',
-        name: 'LayoutMain',
-        component: LayoutMain,
-        children: [
-            { path: 'users', name: 'UserList', component: UserList },
-            { path: 'roles', name: 'RoleList', component: RoleList },
-            { path: 'changepwd', name: 'ChangePwd', component: ChangePwd }
-        ]
-    },
+    
     // 报警设置
-    {
-        path: '/alarmconfig',
-        name: 'LayoutMain',
-        component: LayoutMain,
-        children: [
-            { path: '', name: 'Dasboard', component: Dasboard },
-            { path: 'projsetting', name: 'Dasboard', component: ProjAlarm },
-            { path: 'projnotice', name: 'Dasboard', component: ProjNotice },
-            { path: 'staffsetting', name: 'Dasboard', component: StaffSetting }
-        ]
-    },
+    // {
+    //     path: '/alarmconfig',
+    //     name: 'LayoutMain',
+    //     component: LayoutMain,
+    //     children: [
+    //         { path: '', name: 'Dasboard', component: Dasboard },
+    //         { path: 'projsetting', name: 'Dasboard', component: ProjAlarm },
+    //         { path: 'projnotice', name: 'Dasboard', component: ProjNotice },
+    //         { path: 'staffsetting', name: 'Dasboard', component: StaffSetting }
+    //     ]
+    // },
     // 与FM相关设置
-    {
-        path: '/fm',
-        name: 'LayoutMain',
-        component: LayoutMain,
-        children: [
-            { path: '', name: 'Dasboard', component: Dasboard },
-            { path: 'sopsetting', name: 'Dasboard', component: ProjSop },
-            { path: 'rulesetting', name: 'Dasboard', component: ProjRules }
-        ]
-    },
+    // {
+    //     path: '/fm',
+    //     name: 'LayoutMain',
+    //     component: LayoutMain,
+    //     children: [
+    //         { path: '', name: 'Dasboard', component: Dasboard },
+    //         { path: 'sopsetting', name: 'Dasboard', component: ProjSop },
+    //         { path: 'rulesetting', name: 'Dasboard', component: ProjRules }
+    //     ]
+    // },
     // 点位表管理
     {
         path: '/point',
@@ -87,7 +78,8 @@ export default [
             { path: '', name: 'pointConfig', component: pointConfig },
             { path: 'pointsetting', name: 'Dasboard', component: pointConfig },
             { path: 'editDataSouce', name: 'editDataSouce', component: editDataSouce },
-            { path: 'pointSteps', name: 'pointSteps', component: pointSteps }
+            { path: 'pointSteps', name: 'pointSteps', component: pointSteps },
+            { path: 'dynamicdata', name: 'dynamicdata', component: Dasboard }
         ]
     },
     //项目化配置
@@ -98,39 +90,47 @@ export default [
         children: [
             { path: '', name: 'Dasboard', component: Dasboard },
             { path: 'custominfo', name: 'Dasboard', component: Dasboard },
-            { path: 'collectsetting', name: 'collectsetting', component: collectsetting }
+            { path: 'collectsetting', name: 'collectsetting', component: collectsetting },
+            { path: 'floorinfo', name: 'Dasboard', component: Dasboard },
         ]
     },
-    //台账管理
+    //模型管理
     {
-        path: '/ledger',
+        path: '/model',
         name: 'LayoutMain',
         component: LayoutMain,
         children: [
             { path: '', name: 'Dasboard', component: Dasboard },
-            { path: 'facility', name: 'facilityLedger', component: facilityLedger },
-            { path: 'system', name: 'systemLedger', component: systemLedger },
-            { path: 'property', name: 'propertyLedger', component: propertyLedger }
+            { path: 'file', name: 'Dasboard', component: Dasboard },
+            { path: 'noentity', name: 'collectsetting', component: Dasboard },
+            { path: 'beforemodel', name: 'Dasboard', component: Dasboard },
+            { path: 'modelrule', name: 'Dasboard', component: Dasboard },
+            { path: 'beacon', name: 'Dasboard', component: Dasboard },
         ]
     },
-    //业务空间管理    
+    //台账管理
     {
-        path: '/business',
+        path: '/ledger',
         name: 'LayoutMain',
         component: LayoutMain,
         children: [
             { path: '', name: 'Dasboard', component: Dasboard },
-            { path: 'spacelist', name: 'spacelist', component: spacelist }
+            { path: 'facility', name: 'facilityLedger', component: facilityLedger },
+            { path: 'property', name: 'propertyLedger', component: propertyLedger },
+            { path: 'cenotelist', name: 'Dasboard', component: Dasboard },
+            { path: 'dimension', name: 'Dasboard', component: Dasboard },
+            { path: 'rubbish', name: 'Dasboard', component: Dasboard },
+            { path: 'updowncheck', name: 'Dasboard', component: Dasboard },
         ]
     },
-    //竖井管理
+    //业务空间管理    
     {
-        path: '/cenote',
+        path: '/business',
         name: 'LayoutMain',
         component: LayoutMain,
         children: [
             { path: '', name: 'Dasboard', component: Dasboard },
-            { path: 'cenotelist', name: 'Dasboard', component: Dasboard }
+            { path: 'spacelist', name: 'spacelist', component: spacelist }
         ]
     },
     //租户管理
@@ -177,14 +177,14 @@ export default [
             { path: 'own', name: 'Dasboard', component: OwnerManage }
         ]
     },
-    //revit服务器端化的web功能
+    //系统管理
     {
-        path: '/revitservice',
+        path: '/system',
         name: 'LayoutMain',
         component: LayoutMain,
         children: [
-            { path: '', name: 'Dasboard', component: Dasboard },
-            { path: 'revit', name: 'Dasboard', component: Dasboard }
+            { path: 'list', name: 'systemlist', component: systemLedger },
+
         ]
     },
 ]

+ 1 - 0
src/views/business_space/business_list/index.vue

@@ -299,6 +299,7 @@
 
 <style lang="less">
     #businessSpace {
+        position: relative;
         .el-dialog__body {
             max-height: 600px;
             overflow-y: auto;

+ 2 - 2
src/views/dasboard/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
-        <h4>index</h4>
-        <button v-if="hasPermission('system:role:query')">测试权限 </button>
+        <h4>开发中...</h4>
+        <!-- <button v-if="hasPermission('system:role:query')">测试权限 </button> -->
     </div>
 </template>
 <script>

+ 1 - 0
src/views/data_admin/buildAssets/index.vue

@@ -864,6 +864,7 @@
         height: 100%;
         width: 100%;
         overflow: hidden;
+        position: relative;
         #assets0,
         #assets1,
         #assets2 {

+ 1 - 0
src/views/data_admin/buildGraphy/index.vue

@@ -125,6 +125,7 @@ export default {
 
 <style lang="less" scoped>
 #graphy {
+    position: relative;
   .graphy-left {
     width: 200px;
     height: 100%;

+ 98 - 6
src/views/data_admin/buildUser/Edit.vue

@@ -1,50 +1,142 @@
 <template>
-    <el-dialog title='添加用户' :visible.sync='dialogVisible' width='500px'>
+    <el-dialog :title='isEdit?"编辑用户":"添加用户"' :visible.sync='dialogVisible' width='500px'>
         <div class='edit-box'>
-            <el-form ref='form' :model='form' label-width='80px'>
+            <el-form ref='form' :model='form' :rules='rules' label-width='80px'>
                 <el-form-item label='姓名' prop='UserName'>
                     <el-input v-model.trim='form.UserName'></el-input>
                 </el-form-item>
                 <el-form-item label='联系电话' prop='Phone'>
                     <el-input v-model.trim='form.Phone'></el-input>
                 </el-form-item>
-                <el-form-item label='备注' prop='Note'>
+                <el-form-item label='备注'>
                     <el-input v-model.trim='form.Note'></el-input>
                 </el-form-item>
             </el-form>
         </div>
         <span slot='footer' class='dialog-footer'>
             <el-button @click='dialogVisible = false'>取 消</el-button>
-            <el-button type='primary' @click='dialogVisible = false'>保 存</el-button>
+            <el-button type='primary' @click='save'>保 存</el-button>
         </span>
     </el-dialog>
 </template>
 
 <script>
+import {
+    loadUser, //修改
+    addUser //添加
+} from '@/api/scan/request'
+import { mapGetters, mapActions } from 'vuex'
 export default {
     data() {
+        var validatePhone = (rule, value, callback) => {
+            let reg = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/
+            if (reg.test(value)) {
+                callback()
+            } else {
+                callback(new Error('手机格式不正确'))
+            }
+        }
         return {
             dialogVisible: false,
+            isEdit: false,
             form: {
                 UserName: '',
                 Phone: '',
                 Note: ''
             },
             rules: {
-
+                UserName: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
+                Phone: [
+                    { required: true, message: '请输入联系电话', trigger: 'blur' },
+                    { validator: validatePhone, trigger: 'blur' }
+                ]
             }
         }
     },
+    computed: {
+        ...mapGetters('peojMess', ['projectId', 'userId'])
+    },
     methods: {
-        show() {
+        show(row) {
+            this.restForm()
             this.dialogVisible = true
+            this.isEdit = false
+            if (row) {
+                this.isEdit = true
+                this.form = {
+                    Note: row.Note,
+                    Phone: row.Phone,
+                    UserName: row.UserName,
+                    UserId: row.UserId,
+                    ProjId: row.ProjId
+                }
+            }
+        },
+        save() {
+            this.$refs['form'].validate(valid => {
+                if (valid) {
+                    if (this.isEdit) {
+                        this.editSave()
+                    } else {
+                        this.addSave()
+                    }
+                } else {
+                    console.log('error submit!!')
+                    return false
+                }
+            })
+        },
+        addSave() {
+            let param = {}
+            param.ProjId = this.projectId
+            param.UserId = this.userId
+            param.User = this.form
+            addUser(param).then(result => {
+                if (result.data.Result == 'success') {
+                    this.$message({
+                        message: '保存成功',
+                        type: 'success'
+                    })
+                    this.dialogVisible = false
+                    this.$emit('refresh')
+                }
+            })
+        },
+        editSave() {
+            let param = {
+                ProjId: this.projectId,
+                UserId: this.userId,
+                UserList: [this.form]
+            }
+            loadUser(param).then(result => {
+                if (result.data.Result == 'success') {
+                    this.$message({
+                        message: '保存成功',
+                        type: 'success'
+                    })
+                    this.dialogVisible = false
+                    this.$emit('refresh')
+                }
+            })
+        },
+        restForm() {
+            this.form = {
+                UserName: '',
+                Phone: '',
+                Note: ''
+            }
         }
     }
 }
 </script>
 
 <style scoped lang='less'>
+.input-length {
+    width: 300px;
+}
 .edit-box {
     height: 300px;
+    width: 380px;
+    margin: 0 auto;
 }
 </style>

+ 66 - 13
src/views/data_admin/buildUser/index.vue

@@ -10,7 +10,8 @@
                     @change='searchChange'
                 ></el-input>
                 <el-button type='primary' @click='refresh'>刷新</el-button>
-                <el-button type='primary' @click='addUser'>添加扫楼人员</el-button>
+                <el-button type='primary' @click='addUser'>添加人员</el-button>
+                <el-button type='danger' @click='someDel'>批量删除</el-button>
             </div>
             <el-table
                 slot='table'
@@ -19,27 +20,30 @@
                 tooltip-effect='dark'
                 style='width: 100%; margin-top:10px;'
                 v-loading='loading'
+                @selection-change='handleSelectionChange'
             >
-                <el-table-column prop='UserName' label='姓名' width='150' header-align='center'></el-table-column>
+                <el-table-column type='selection' width='55' align='center'></el-table-column>
+                <el-table-column prop='UserName' label='姓名' width='100' header-align='center'></el-table-column>
                 <el-table-column prop='Phone' label='联系电话/登录名' width='120' header-align='center'></el-table-column>
                 <el-table-column prop='Note' label='备注' header-align='center'></el-table-column>
                 <el-table-column label='操作' width='150' header-align='center'>
                     <template slot-scope='scope'>
-                         <el-button type='primary' size='mini' @click='delUser(scope.row)'>编辑</el-button>
-                        <el-button type='danger' size='mini' @click='delUser(scope.row)'>删除</el-button>
+                        <el-button type='primary' size='mini' @click='editUser(scope.row)'>编辑</el-button>
+                        <el-button type='danger' size='mini' @click='del(scope.row)'>删除</el-button>
                     </template>
                 </el-table-column>
             </el-table>
             <base-pagination :currentPages='pageNum' :total='total' @pageChanged='pageChanged' slot='pagination'></base-pagination>
         </table-page-template>
-        <saga-edit ref='edit'></saga-edit>
+        <saga-edit ref='edit' @refresh='refresh'></saga-edit>
     </div>
 </template>
 
 <script>
 import { mapGetters, mapActions } from 'vuex'
 import {
-    getUser //获取扫楼用户
+    getUser, //获取扫楼用户
+    delUser //删除用户
 } from '@/api/scan/request'
 //component
 import SagaEdit from './Edit'
@@ -50,34 +54,84 @@ export default {
             searchValue: '',
             loading: false,
             tableData: [],
+            checkedArr: [],
             pageNum: 1,
             pageSize: 10,
             total: 0
         }
     },
     components: {
-        SagaEdit,
+        SagaEdit
     },
     computed: {
         ...mapGetters('peojMess', ['projectId', 'userId'])
     },
     methods: {
         pageChanged(page, size) {
-            this.pageNum = page;
-            this.pageSize = size;
-            this.getUserList();
+            this.pageNum = page
+            this.pageSize = size
+            this.getUserList()
         },
         refresh() {
             this.getUserList()
         },
         searchChange() {
-            this.pageNum = 1;
+            this.pageNum = 1
             this.getUserList()
         },
         addUser() {
             this.$refs['edit'].show()
         },
-        delUser() {},
+        editUser(row) {
+            this.$refs['edit'].show(row)
+        },
+        del(row) {
+            var UserList = [row.UserId]
+            this.delUser(UserList)
+        },
+        handleSelectionChange(arr) {
+            this.checkedArr = arr.map(ele => ele.UserId)
+        },
+        someDel() {
+            if (this.checkedArr.length < 1) {
+                this.$message({
+                    message: '请至少选择一条用户',
+                    type: 'warning'
+                })
+            } else {
+                this.delUser(this.checkedArr)
+            }
+        },
+        delUser(UserList) {
+            this.$confirm('此操作将永久删除用户, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            })
+                .then(() => {
+                    let param = {
+                        ProjId: this.projectId,
+                        UserId: this.userId,
+                        UserList: UserList
+                    }
+                    delUser(param).then(result => {
+                        if (result.data.Result == 'success') {
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                            this.refresh()
+                        }
+                    })
+                })
+                .catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消'
+                    })
+                })
+        },
+
         getUserList() {
             this.loading = true
             let param = {
@@ -87,7 +141,6 @@ export default {
                 ProjId: this.projectId,
                 UserId: this.userId
             }
-            console.log(param)
             getUser(param).then(result => {
                 this.loading = false
                 this.tableData = result.data.UserList

+ 1 - 0
src/views/ledger/facility/index.vue

@@ -178,6 +178,7 @@ export default {
   overflow: hidden;
   height: 100%;
   background-color: #f6f6f6;
+  position: relative;
   .table-main {
     position: absolute;
     top: 140px;

+ 1 - 0
src/views/ledger/property/index.vue

@@ -159,6 +159,7 @@ export default {
   overflow: hidden;
   height: 100%;
   background-color: #f6f6f6;
+  position: relative;
   .table-main {
     position: absolute;
     top: 140px;

+ 1 - 0
src/views/ledger/system/index.vue

@@ -165,6 +165,7 @@ export default {
   overflow: hidden;
   height: 100%;
   background-color: #f6f6f6;
+  position: relative;
   .table-main {
     position: absolute;
     top: 140px;