Bläddra i källkod

修复菜单 住户

Shannon_mu 3 år sedan
förälder
incheckning
ce333941ea

+ 1 - 1
operationSupport/public/index.html

@@ -14,7 +14,7 @@
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
   <link rel="icon" href="<%= BASE_URL %>favicon.ico" type="image/x-icon" />
-  <link rel="stylesheet" href="//at.alicdn.com/t/font_2251662_kng95z296f.css">
+  <link rel="stylesheet" href="//at.alicdn.com/t/font_2251662_qd6epht669f.css">
   <title>智慧社区管理平台</title>
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">

+ 17 - 5
operationSupport/src/assets/css/main.scss

@@ -674,10 +674,17 @@ a {
         url("//at.alicdn.com/t/font_2167017_wrd31fts4a.woff?t=1623035434172") format("woff"),
         url("//at.alicdn.com/t/font_2167017_wrd31fts4a.ttf?t=1623035434172") format("truetype");
 }
+/*@font-face {
+    font-family: 'iconfont';  /* Project id 2251662 
+    src: url('//at.alicdn.com/t/font_2251662_qd6epht669f.woff2?t=1639643719416') format('woff2'),
+         url('//at.alicdn.com/t/font_2251662_qd6epht669f.woff?t=1639643719416') format('woff'),
+         url('//at.alicdn.com/t/font_2251662_qd6epht669f.ttf?t=1639643719416') format('truetype');
+  }*/
 .zoniot_font {
     font-family: "zoniot_font" !important;
-    color: #409eff;
+    color: $mainTextColor;
     font-size: 16px;
+    line-height: 15px;
     font-style: normal;
     -webkit-font-smoothing: antialiased;
     -webkit-text-stroke-width: 0.2px;
@@ -714,7 +721,12 @@ a {
         margin-right: 20px;
         @include searchTextBotton;
     }
-    span.iconfont{
+    i.zoniot_font {
+        margin-right: 20px;
+        line-height: inherit;
+        @include searchTextBotton;
+    }
+    span.iconfont {
         margin-right: 20px;
         @include searchTextBotton;
     }
@@ -746,8 +758,8 @@ div.box-40 {
         }
     }
 }
-.re-uplod-style .avatar-uploader .el-upload--text,.upload_div .el-upload--text
-{
+.re-uplod-style .avatar-uploader .el-upload--text,
+.upload_div .el-upload--text {
     display: block;
     border: none;
     width: inherit;
@@ -755,4 +767,4 @@ div.box-40 {
     background-color: transparent;
     color: unset;
     font-size: unset;
-}
+}

+ 16 - 3
operationSupport/src/assets/css/public-style.scss

@@ -1,4 +1,17 @@
 /*主色调*/
-$mainTextColor: #0EAEFF;
-$mainBgColor: #0EAEFF;
-$white:white;
+$mainTextColor: #0eaeff;
+$mainBgColor: #0eaeff;
+$white: white;
+$greenColor: #44d7b6;
+$redColor: #ff7171;
+$ashColor: #dcdcdc;
+
+.greenText {
+  color: $greenColor!important;
+}
+.redText {
+  color: $redColor!important;
+}
+.ashText {
+  color: $ashColor!important;
+}

BIN
operationSupport/src/assets/img/icon_zhuxiao.png


BIN
operationSupport/src/assets/img/icon_zhuxiao_d.png


+ 12 - 1
operationSupport/src/components/common/organTree.vue

@@ -54,8 +54,19 @@ export default {
             return data.orgName.indexOf(value) !== -1;
         },
         treeClick(e) {
+            let unitPa = {};
             if (e.value == 0) return;
-            this.$emit('organId', e.value);
+            if (e.type == 'unit') {
+                let parentV = this.$refs.tree.getNode(e).parent.data;
+                unitPa = {
+                    parentValue: parentV.value,
+                    type: e.type,
+                    value: e.value
+                };
+                this.$emit('organId', unitPa);
+            } else {
+                this.$emit('organId', e);
+            }
         }
     },
     created() {

+ 65 - 25
operationSupport/src/main.js

@@ -53,39 +53,79 @@ Vue.use(ElementUI, {
 //     v: '1.4.4'
 // });
 
-//使用钩子函数对路由进行权限跳转
-router.beforeEach((to, from, next) => {
-    if (localStorage.getItem("SC_token")) {
-        let menuList = window.sessionStorage.getItem("operationMuen")
-        let newAr = [];
-        if (menuList === null || menuList === undefined) {
-            http.get('/sc-user-center/user/findUserMenu', { appId: '1002' }).then(({ status, data, msg }) => {
-                if (0 == status) {
-                    let datas = data[0].children
-                    window.sessionStorage.setItem('operationMuen', JSON.stringify(datas))
-                    funcRouter(newAr, datas, router)
-                    next({ ...to, replace: true })
-                } else {
-                    this.$message.error(msg);
+Vue.prototype.routerLoad = {
+    findOne(arr){
+        return arr.map(v=>{
+            if(v.children){
+                return this.findOne(v.children)
+            }else{
+                return {
+                    path:"/"+v.linkPath,
+                    name:v.name
                 }
-            })
-        } else {
-            if (router.options.routes[0].children.length === 0) {
-                funcRouter(newAr, JSON.parse(menuList), router)
-                next({ ...to, replace: true })
-            } else {
-                next()
             }
+        })
+    },
+    // 获取菜单
+    loadMenus() {
+        http.get('/sc-user-center/user/findUserMenu', { appId: '1002' }).then(({ status, data, msg }) => {
+            if (0 === status) {
 
-        }
-    } else {
-        next();
+                let routerArr = this.findOne(data[0].children);
+                store.commit('setMenuList', data[0].children)
+                if (routerArr[0].length) {
+                    defaultPath = routerArr[0][0].path;
+                } else {
+                    defaultPath = routerArr[0].path;
+                }
+                if (localStorage.getItem('path') == '/') {
+                    localStorage.setItem('path', defaultPath)
+                }
+                router.push({ path: localStorage.getItem('path') })
+            }
+        });
     }
-});
+};
+//使用钩子函数对路由进行权限跳转
+// router.beforeEach((to, from, next) => {
+//     debugger;
+//     if (localStorage.getItem("SC_token")) {
+//         let menuList = window.sessionStorage.getItem("operationMuen")
+//         let newAr = [];
+//         if (menuList === null || menuList === undefined) {
+//             http.get('/sc-user-center/user/findUserMenu', { appId: '1002' }).then(({ status, data, msg }) => {
+//                 if (0 == status) {
+//                     let datas = data[0].children
+//                     window.sessionStorage.setItem('operationMuen', JSON.stringify(datas))
+
+//                     // funcRouter(newAr, datas, router)
+//                     // next({ ...to, replace: true })
+//                 } else {
+//                     this.$message.error(msg);
+//                 }
+//             })
+//         } else {
+//             if (router.options.routes[0].children.length === 0) {
+//                 // funcRouter(newAr, JSON.parse(menuList), router)
+//                 next({ ...to, replace: true })
+//             } else {
+//                 next()
+//             }
+
+//         }
+//     } else {
+//         next();
+//     }
+// });
 new Vue({
     router,
     store,
     render: h => h(App),
+    created() {
+        if (localStorage.getItem('SC_token')) {
+            this.routerLoad.loadMenus();
+        }
+    }
 }).$mount('#app');
 Vue.prototype.$http = http;
 Vue.prototype.$api = apiService(http);

+ 136 - 1
operationSupport/src/router/index.js

@@ -7,14 +7,149 @@ Router.prototype.push = function push(location) {
 }
 Vue.use(Router);
 
+const zRoute = [
+    {
+        path: "/workbench/index",
+        meta: { title: '工作台' },
+        component: () =>
+            import("@views/workbench/index.vue"
+            )
+    },
+    {
+        path: "/ownerManagement/index",
+        meta: { title: '住户管理' },
+        component: () =>
+            import("@views/ownerManagement/index.vue"
+            )
+    },
+    {
+        path: "/ownerManagement/ownerReview/index",
+        meta: { title: '业主审核' },
+        component: () =>
+            import("@views/ownerManagement/ownerReview/index.vue"
+            )
+    },
+    {
+        path: "/alarmManagement/index",
+        meta: { title: '告警管理' },
+        component: () =>
+            import("@views/alarmManagement/index.vue"
+            )
+    },
+    {
+        path: "/alarmManagement/details",
+        meta: { title: '告警详情' },
+        component: () =>
+            import("@views/alarmManagement/details.vue"
+            )
+    },
+    {
+        path: "/deviceManagement/index",
+        meta: { title: '设备管理' },
+        component: () =>
+            import("@views/deviceManagement/index.vue"
+            )
+    },
+    {
+        path: "/deviceManagement/indexFacilities",
+        meta: { title: '设施管理' },
+        component: () =>
+            import("@views/deviceManagement/indexFacilities.vue"
+            )
+    },
+    {
+        path: "/deviceManagement/indexType",
+        meta: { title: '设施类型' },
+        component: () =>
+            import("@views/deviceManagement/indexType.vue"
+            )
+    },
+    {
+        path: '/ownerManagement/add',
+        component: () => import(/* webpackChunkName: "404" */ '@views/ownerManagement/stepPage/add.vue'),
+        meta: { title: '编辑住户' }
+    },
+    {
+        path: '/ownerManagement/details',
+        component: () => import(/* webpackChunkName: "404" */ '@views/ownerManagement/details.vue'),
+        meta: { title: '住户详情' }
+    },
+]
+
 const quietRoute = [
     {
         path: '/',
         component: () => import(/* webpackChunkName: "home" */ '@/components/common/Home.vue'),
         children: [
+            {
+                path: '/msg',
+                component: () => import(/* webpackChunkName: "messages" */ '@views/messages'),
+                meta: { title: '消息中心' }
+            },
+            {
+                path: '/403',
+                component: () => import(/* webpackChunkName: "404" */ '@views/403'),
+                meta: { title: '403' }
+            },
+            {
+                path: '/404',
+                component: () => import(/* webpackChunkName: "404" */ '@views/404'),
+                meta: { title: '404' }
+            },
+            {
+                path: '/communityManagement',
+                component: () => import(/* webpackChunkName: "404" */ '@views/communityManagement'),
+                meta: { title: '社区管理' },
 
+            },
+            {
+                path: '/communityManagement/pageJump/AddOrEdit',
+                meta: { title: '添加社区' },
+                component: () => import(/* webpackChunkName: "404" */ '@views/communityManagement/pageJump/AddOrEdit.vue'),
+            },
+            {
+                path: '/buildingManagement',
+                component: () => import(/* webpackChunkName: "404" */ '@views/buildingManagement'),
+                meta: { title: '楼栋管理' }
+            },
+            {
+                path: '/buildingManagement/pageJump/addoredit',
+                component: () => import(/* webpackChunkName: "404" */ '@views/buildingManagement/pageJump/addoredit.vue'),
+                meta: { title: '添加编辑楼栋管理' }
+            },
+            {
+                path: '/housingManagement',
+                component: () => import(/* webpackChunkName: "404" */ '@views/housingManagement'),
+                meta: { title: '房屋管理' }
+            },
+            {
+                path: '/housingManagement/pageJump/saveEdits',
+                component: () => import(/* webpackChunkName: "404" */ '@views/housingManagement/pageJump/saveEdits.vue'),
+                meta: { title: '房屋编辑' }
+            },
+            {
+                path: '/shopManagement',
+                component: () => import(/* webpackChunkName: "404" */ '@views/shopManagement'),
+                meta: { title: '商铺管理' }
+            },
+            {
+                path: '/shopManagement/pageJump/saveEdits',
+                component: () => import(/* webpackChunkName: "404" */ '@views/shopManagement/pageJump/saveEdits.vue'),
+                meta: { title: '商铺编辑' }
+            },
+            {
+                path: '/parkingLotAdministration',
+                component: () => import(/* webpackChunkName: "404" */ '@views/parkingLotAdministration'),
+                meta: { title: '车位管理' }
+            }
+            , {
+                path: '/parkingLotAdministration/pageJump/partitionManagement',
+                component: () => import(/* webpackChunkName: "404" */ '@views/parkingLotAdministration/pageJump/partitionManagement.vue'),
+                meta: { title: '车库分区管理' }
+            },
+            ...zRoute
         ],
-        // redirect: '/workbench/index'
+        redirect: '/workbench/index'
     },
     {
         path: '*',

+ 5 - 3
operationSupport/src/views/alarmManagement/details.vue

@@ -1,7 +1,7 @@
 
 <template>
-    <div>
-        <div class="handle-box">
+    <div class="main">
+        <div class="handle-box search">
             <el-input class="servertype-serch" v-model="mixins_query.condition" placeholder="告警名称"></el-input>
             <el-select clearable class="servertype-serch" v-model="mixins_query.alarmType" placeholder="告警类型">
                 <el-option v-for="(item, index) in alarmTypeList" :key="index" :label="item.label" :value="item.value">{{
@@ -21,7 +21,9 @@
                 :editable="false"
             ></el-date-picker>
             <el-button class="servertype-serch-btn search-btn" icon="el-icon-search" type="primary" @click="getPage">查询</el-button>
-            <i class="fr fr-fs-fc fr-add iconfont" @click="exportExcel" v-txt-tip data-txt="导出">&#xe662;</i>
+            <div class="search-icon" slot="right-opt">
+                <i class="zoniot_font zoniot-icon-daochu2" @click="exportExcel" v-txt-tip data-txt="导出"></i>
+            </div>
         </div>
         <!-- 表格 -->
         <div class="device-manage-table">

+ 8 - 7
operationSupport/src/views/alarmManagement/popups/addoreditalarm.vue

@@ -34,7 +34,7 @@
                     clearable
                     placeholder=""
                     ref="pcascader"
-                    @change="productChange($event)"
+                    @change="productChange"
                 >
                 </el-cascader>
             </template>
@@ -45,7 +45,7 @@
                 </el-select>
             </template>
             <template slot="deviceId">
-                <el-select v-model="data.deviceId" placeholder="请选择设备" clearable @change="deviceSelect($event)">
+                <el-select v-model="data.deviceId" placeholder="请选择设备" clearable @change="deviceSelect">
                     <el-option v-for="item in deviceOptions" :key="item.id" :value="item.id" :label="item.deviceName"></el-option>
                 </el-select>
             </template>
@@ -587,13 +587,14 @@ export default {
                 }
             });
         },
-        productChange(value) {
+        productChange(e) {
+            let  lat = _.last(e)
             this.measuringOptions = [];
-            this.data.productId = value;
+            this.data.productId = e;
             this.data.deviceId = '';
-            this.getDeviceOptions(_.last(value));
-            this.getMeasurePointOptions(_.last(value));
-            let rec = this.getCascaderObj(this.data.productId, this.productOptions);
+            this.getDeviceOptions(lat);
+            this.getMeasurePointOptions(lat);
+            let rec = this.getCascaderObj(lat, this.productOptions);
             this.data.iotProductId = rec.iotId || '';
         },
         delRule(index) {

+ 7 - 7
operationSupport/src/views/deviceManagement/index.vue

@@ -25,15 +25,15 @@
             >
                 <template slot-scope="scope" slot="opt">
                     <div class="opt">
-                        <el-tooltip class="item" effect="light" placement="bottom" content="编辑">
-                            <img class="optImg" @click="addOrEdit('edit', scope.row)" src="@/assets/img/btn_bianji.png" />
+                        <el-tooltip effect="light" placement="bottom" content="编辑">
+                            <i class="zoniot_font zoniot-icon-bianji" @click="addOrEdit('edit', scope.row)"></i>
                         </el-tooltip>
-                        <el-tooltip class="item" effect="light" placement="bottom" content="删除">
-                            <img class="optImg" @click="deluserbyidFn(scope.row.id)" src="@/assets/img/btn_shanchu.png" />
+                        <el-tooltip effect="light" placement="bottom" content="删除">
+                            <i class="zoniot_font zoniot-icon-shanchu redText" @click="deluserbyidFn(scope.row.id)"></i>
                         </el-tooltip>
-                        <el-tooltip class="item" effect="light" placement="bottom" content="报废">
-                            <img v-if="scope.row.deviceStatus === 5" src="@/assets/img/btn_baofei_d.png" alt="">
-                            <img v-else class="optImg" @click="Scrap(scope.row.id)" src="@/assets/img/btn_baofei.png" />
+                        <el-tooltip effect="light" placement="bottom" :content="scope.row.deviceStatus === 5 ? '已报废' : '报废'">
+                            <i v-if="scope.row.deviceStatus === 5" class="zoniot_font zoniot-icon-baofei ashText"></i>
+                            <i v-else class="zoniot_font zoniot-icon-baofei redText" @click="Scrap(scope.row.id)"></i>
                         </el-tooltip>
                     </div>
                 </template>

+ 12 - 11
operationSupport/src/views/deviceManagement/indexFacilities.vue

@@ -27,20 +27,21 @@
                 @selection-change="selectionChange"
             >
                 <template slot-scope="scope" slot="opt">
-                    <!-- <i @click="addOrEdit('edit', scope.row)" class="iconfont" style="margin-right: 30px" v-txt-tip data-txt="编辑"
-                        >&#xe645;</i
-                    >
-                    <i @click="deluserbyidFn(scope.row.id)" class="iconfont" style="color: #ff7272" v-txt-tip data-txt="删除">&#xe63a;</i> -->
+                 
                     <div class="opt">
-                        <el-tooltip class="item" effect="light" placement="bottom" content="编辑">
-                            <img class="optImg" @click="addOrEdit('edit', scope.row)" src="@/assets/img/btn_bianji.png" />
+                        <el-tooltip effect="light" placement="bottom" content="编辑">
+                            <i class="zoniot_font zoniot-icon-bianji" @click="addOrEdit('edit', scope.row)"></i>
+                            <!-- <img class="optImg" @click="addOrEdit('edit', scope.row)" src="@/assets/img/btn_bianji.png" /> -->
                         </el-tooltip>
-                        <el-tooltip class="item" effect="light" placement="bottom" content="删除">
-                            <img class="optImg" @click="deluserbyidFn(scope.row.id)" src="@/assets/img/btn_shanchu.png" />
+                        <el-tooltip effect="light" placement="bottom" content="删除">
+                            <i class="zoniot_font zoniot-icon-shanchu redText" @click="deluserbyidFn(scope.row.id)"></i>
+                            <!-- <img class="optImg" @click="deluserbyidFn(scope.row.id)" src="@/assets/img/btn_shanchu.png" /> -->
                         </el-tooltip>
-                        <el-tooltip class="item" effect="light" placement="bottom" content="报废">
-                            <img v-if="scope.row.facilityStatus === 0" src="@/assets/img/btn_baofei_d.png" alt="" />
-                            <img v-else class="optImg" @click="Scrap(scope.row.id)" src="@/assets/img/btn_baofei.png" />
+                        <el-tooltip effect="light" placement="bottom" :content="scope.row.facilityStatus === 0 ? '已报废' : '报废'">
+                            <!-- <img v-if="scope.row.facilityStatus === 0" src="@/assets/img/btn_baofei_d.png" alt="" />
+                            <img v-else class="optImg" @click="Scrap(scope.row.id)" src="@/assets/img/btn_baofei.png" /> -->
+                            <i v-if="scope.row.facilityStatus === 0" class="zoniot_font zoniot-icon-baofei ashText"></i>
+                            <i v-else class="zoniot_font zoniot-icon-baofei redText" @click="Scrap(scope.row.id)"></i>
                         </el-tooltip>
                     </div>
                 </template>

+ 4 - 6
operationSupport/src/views/deviceManagement/indexType.vue

@@ -18,16 +18,14 @@
                 @selection-change="selectionChange"
             >
                 <template slot-scope="scope" slot="opt">
-                    <!-- <i @click="addOrEdit('edit', scope.row)" class="iconfont" style="margin-right: 30px" v-txt-tip data-txt="编辑"
-                        >&#xe645;</i
-                    >
-                    <i @click="deluserbyidFn(scope.row.id)" class="iconfont" style="color: #ff7272" v-txt-tip data-txt="删除">&#xe63a;</i> -->
                     <div class="opt">
                         <el-tooltip class="item" effect="light" placement="bottom" content="编辑">
-                            <img class="optImg" @click="addOrEdit('edit', scope.row)" src="@/assets/img/btn_bianji.png" />
+                            <i class="zoniot_font zoniot-icon-bianji" @click="addOrEdit('edit', scope.row)"></i>
+                            <!-- <img class="optImg" @click="addOrEdit('edit', scope.row)" src="@/assets/img/btn_bianji.png" /> -->
                         </el-tooltip>
                         <el-tooltip class="item" effect="light" placement="bottom" content="删除">
-                            <img class="optImg" @click="deluserbyidFn(scope.row.id)" src="@/assets/img/btn_shanchu.png" />
+                            <i class="zoniot_font zoniot-icon-shanchu redText" @click="deluserbyidFn(scope.row.id)"></i>
+                            <!-- <img class="optImg" @click="deluserbyidFn(scope.row.id)" src="@/assets/img/btn_shanchu.png" /> -->
                         </el-tooltip>
                     </div>
                 </template>

+ 74 - 23
operationSupport/src/views/ownerManagement/details.vue

@@ -31,18 +31,18 @@
                 </div>
             </div>
             <div class="content-item" v-show="tabsIndex === 1">
-                <div class="widthFlex" v-for="item in 2" :key="item">
-                    <household-table :tableName="houseTable.left" :tabData="detailsData"></household-table>
-                    <household-table :tableName="houseTable.right" :tabData="detailsData"></household-table>
+                <div class="widthFlex" v-for="item in houseData" :key="item">
+                    <household-table :tableName="houseTable.left" :tabData="item"></household-table>
+                    <household-table :tableName="houseTable.right" :tabData="item"></household-table>
                 </div>
             </div>
             <div class="content-item" v-show="tabsIndex === 2">
                 <div class="formContent-item_title">车辆信息</div>
             </div>
             <div class="content-item" v-show="tabsIndex === 3">
-                <div class="widthFlex" v-for="item in 3" :key="item">
-                    <household-table :tableName="parkingLotTable.left" :tabData="detailsData"></household-table>
-                    <household-table :tableName="parkingLotTable.right" :tabData="detailsData"></household-table>
+                <div class="widthFlex" v-for="item in parkingData" :key="item">
+                    <household-table :tableName="parkingLotTable.left" :tabData="item"></household-table>
+                    <household-table :tableName="parkingLotTable.right" :tabData="item"></household-table>
                 </div>
             </div>
             <div class="content-item" v-show="tabsIndex === 4">
@@ -63,6 +63,8 @@ export default {
             tabsIndex: 0,
             id: null,
             detailsData: {},
+            parkingData: [],
+            houseData: [],
             tabs: [
                 {
                     lable: '住户信息'
@@ -141,7 +143,7 @@ export default {
                 left: [
                     {
                         lable: '所属小区',
-                        prop: 'houseId'
+                        prop: 'communityName'
                     },
                     {
                         lable: '单元',
@@ -153,45 +155,64 @@ export default {
                     },
                     {
                         lable: '建筑面积',
-                        prop: 'name'
+                        prop: 'buildingArea'
                     },
                     {
                         lable: '公摊面积',
-                        prop: 'name'
+                        prop: 'publicArea'
                     },
                     {
                         lable: '装修性质',
-                        prop: 'name'
+                        prop: 'decorateProperties'
                     },
                     {
                         lable: '房屋编号',
-                        prop: 'id'
+                        prop: 'assetNumber'
                     }
                 ],
                 right: [
                     {
                         lable: '楼宇名称',
-                        prop: 'name'
+                        prop: 'buildingName'
                     },
                     {
                         lable: '楼层',
-                        prop: 'name'
+                        prop: 'floorNumber'
                     },
                     {
                         lable: '房屋类型',
-                        prop: 'name'
+                        prop: 'buildingType',
+                        typeArray: [
+                            { type: 1, lable: '住宅' },
+                            { type: 2, lable: '商用' }
+                        ]
                     },
                     {
                         lable: '使用面积 ',
-                        prop: 'name'
+                        prop: 'useArea'
                     },
                     {
                         lable: '房屋户型',
-                        prop: 'name'
+                        prop: 'housingType',
+                        typeArray: [
+                            { type: 1, lable: '室' },
+                            { type: 2, lable: '厅' },
+                            { type: 3, lable: '卫' }
+                        ]
                     },
                     {
                         lable: '房屋朝向',
-                        prop: 'name'
+                        prop: 'orientationOfRoom',
+                        typeArray: [
+                            { type: 1, lable: '东' },
+                            { type: 2, lable: '南' },
+                            { type: 3, lable: '西' },
+                            { type: 4, lable: '北' },
+                            { type: 5, lable: '东南' },
+                            { type: 6, lable: '西南' },
+                            { type: 7, lable: '西北' },
+                            { type: 8, lable: '东北' }
+                        ]
                     },
                     {
                         lable: '',
@@ -203,29 +224,33 @@ export default {
                 left: [
                     {
                         lable: '所属小区',
-                        prop: 'name'
+                        prop: 'communityName'
                     },
                     {
                         lable: '车库区域',
-                        prop: 'name'
+                        prop: 'garageAreaName'
                     },
                     {
                         lable: '车位类型',
-                        prop: 'name'
+                        prop: 'parkingType',
+                        typeArray: [
+                            { type: 1, lable: '公共车位' },
+                            { type: 2, lable: '私人车位' }
+                        ]
                     }
                 ],
                 right: [
                     {
                         lable: '车库名称',
-                        prop: 'name'
+                        prop: 'garageName'
                     },
                     {
                         lable: '车位编号',
-                        prop: 'name'
+                        prop: 'parkingNumber'
                     },
                     {
                         lable: '车位面积',
-                        prop: 'name'
+                        prop: 'parkingArea'
                     }
                 ]
             }
@@ -234,6 +259,8 @@ export default {
     created() {
         this.id = this.$route.query.id;
         this.getDetails();
+        this.getParking();
+        this.getHouse();
     },
     methods: {
         toggleTab(index) {
@@ -261,6 +288,30 @@ export default {
                     }
                 })
                 .catch(() => {});
+        },
+        getParking() {
+            this.$http
+                .get('/assets/garage/parking/list/resident/parking', { residentId: this.id })
+                .then(({ data, status, msg }) => {
+                    if (0 === status) {
+                        this.parkingData = data;
+                    } else {
+                        this.$message.error(msg);
+                    }
+                })
+                .catch(() => {});
+        },
+        getHouse() {
+            this.$http
+                .get('/scResident/list/house', { residentId: this.id })
+                .then(({ data, status, msg }) => {
+                    if (0 === status) {
+                        this.houseData = data;
+                    } else {
+                        this.$message.error(msg);
+                    }
+                })
+                .catch(() => {});
         }
     }
 };

+ 42 - 19
operationSupport/src/views/ownerManagement/index.vue

@@ -8,7 +8,7 @@
                     placeholder="输入姓名或身份证号"
                     class="search-input"
                     v-trim
-                    v-model.trim="mixins_query.idNumber"
+                    v-model.trim="mixins_query.name"
                 ></el-input>
                 <el-select v-model="mixins_query.householdType" clearable placeholder="住户类型">
                     <el-option v-for="(item, index) in householdType" :key="index" :label="item.label" :value="item.status">{{
@@ -50,14 +50,9 @@
                         <i class="iconfont" @click="deluserbyidsFn">&#xe63b;</i>
                     </el-tooltip>
                     <el-tooltip class="item" effect="light" placement="bottom" content="导出">
-                        <i class="iconfont" @click="exportExcel">&#xe662;</i>
+                        <i class="zoniot_font zoniot-icon-daochu2" @click="exportExcel"></i>
                     </el-tooltip>
                 </div>
-                <!-- <div class="search-icon">
-                    <i class="iconfont" @click="deluserbyidsFn" v-txt-tip data-txt="删除">&#xe63b;</i>
-                    <i class="iconfont" @click="addOrEdit('add')" v-left-txt-tip data-txt="新增">&#xe641;</i>
-                    <i class="iconfont" @click="exportExcel" v-txt-tip data-txt="导出">&#xe662;</i>
-                </div> -->
             </div>
             <zz-table
                 :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
@@ -76,17 +71,26 @@
                 </template>
                 <template slot-scope="scope" slot="opt">
                     <div class="opt">
-                        <el-tooltip class="item" effect="light" placement="bottom" content="编辑" style="margin-right: 20px">
-                            <img class="optImg" @click="addOrEdit('edit', scope.row)" src="@/assets/img/btn_bianji.png" />
+                        <el-tooltip class="item" effect="light" placement="bottom" content="编辑">
+                            <i class="zoniot_font zoniot-icon-bianji" @click="addOrEdit('edit', scope.row)"></i>
                         </el-tooltip>
-                        <el-tooltip class="item" effect="light" placement="bottom" content="注销" style="margin-right: 20px">
-                            <img class="optImg" @click="cancellation(scope.row)" src="@/assets/img/btn_baofei.png" />
+                        <el-tooltip
+                            class="item"
+                            effect="light"
+                            placement="bottom"
+                            :content="scope.row.residentStatus === 1 ? '注销' : '启用'"
+                        >
+                            <i
+                                class="zoniot_font zoniot-icon-zhuxiao"
+                                @click="cancellation(scope.row)"
+                                :class="scope.row.residentStatus === 1 ? 'redText' : 'greenText'"
+                            ></i>
                         </el-tooltip>
                         <el-tooltip class="item" effect="light" placement="bottom" content="删除">
-                            <img class="optImg" @click="deleteRow(scope.row)" src="@/assets/img/btn_shanchu.png" />
+                            <i class="zoniot_font zoniot-icon-shanchu redText" @click="deleteRow(scope.row)"></i>
                         </el-tooltip>
                         <el-tooltip class="item" effect="light" placement="bottom" content="查看">
-                            <img class="optImg" @click="lookPage(scope.row)" src="@/assets/img/look_de.png" />
+                            <i class="zoniot_font zoniot-icon-xiangqing" @click="lookPage(scope.row)"></i>
                         </el-tooltip>
                     </div>
                 </template>
@@ -251,11 +255,15 @@ export default {
         },
         cancellation(row) {
             const { name } = row;
-            let title = `您确定要注销住户“${name}”`;
-            this.$msgBox(title)
+            let status = 0;
+            if (row.residentStatus === 0) {
+                status = 1;
+            }
+            let title = `您确定要修改状态住户“${name}”`;
+            this.$msgBox('确认提示', title)
                 .then(() => {
                     this.$http
-                        .postForm('/scResident/operationResident', { type: 0, id: row.id })
+                        .postForm('/scResident/operationResident', { type: status, id: row.id })
                         .then(({ status, msg }) => {
                             if (0 === status) {
                                 this.$message.success(msg);
@@ -301,7 +309,23 @@ export default {
     },
     watch: {
         currentId(newValue, oldValue) {
-            this.mixins_query.companyId = newValue;
+            this.mixins_query.communityId = '';
+            this.mixins_query.buildingId = '';
+            this.mixins_query.unitName = '';
+            this.mixins_query.roomNumber = '';
+            if (newValue.type) {
+                if (newValue.type === 'community') {
+                    this.mixins_query.communityId = newValue.value;
+                } else if (newValue.type === 'building') {
+                    this.mixins_query.buildingId = newValue.value;
+                } else if (newValue.type === 'unit') {
+                    this.mixins_query.buildingId = newValue.parentValue;
+                    this.mixins_query.unitName = newValue.value;
+                } else if (newValue.type === 'room') {
+                    this.mixins_query.roomNumber = newValue.value;
+                }
+            }
+
             this.mixins_search();
         }
     },
@@ -309,8 +333,7 @@ export default {
         this.mix_path = ''; // 权限
         this.mixins_dataUrl = '/scResident/page'; // 分页查询接口
         this.mixins_query = {
-            questParams: '',
-            companyId: ''
+            questParams: ''
         };
         this.mixins_search('search');
     }

+ 21 - 6
operationSupport/src/views/ownerManagement/ownerReview/index.vue

@@ -28,8 +28,12 @@
         >
             <template slot-scope="scope" slot="opt">
                 <div class="opt">
-                    <el-tooltip class="item" effect="light" placement="bottom" content="审核">
-                        <span class="zoniot_font" @click="Review(scope.row)">&#xe689;</span>
+                    <el-tooltip effect="light" placement="bottom" content="审核">
+                        <i
+                            class="zoniot_font zoniot-icon-yanshou1"
+                            :class="scope.row.auditStatus == 0 ? '' : 'ashText'"
+                            @click="Review(scope.row)"
+                        ></i>
                     </el-tooltip>
                 </div>
             </template>
@@ -56,11 +60,11 @@ export default {
                 },
                 {
                     label: '房产名称',
-                    prop: 'defaultHouseId'
+                    prop: 'roomNumber'
                 },
                 {
                     label: '车位',
-                    prop: 'communityName'
+                    prop: 'parkingNumber'
                 },
                 {
                     label: '手机号',
@@ -72,7 +76,18 @@ export default {
                 },
                 {
                     label: '类型',
-                    prop: 'idType'
+                    prop: 'householdType',
+                    format(val) {
+                        let va = '';
+                        if (val === 1) {
+                            va = '业主';
+                        } else if (val === 2) {
+                            va = '亲属';
+                        } else if (val === 3) {
+                            va = '租客';
+                        }
+                        return va;
+                    }
                 },
                 {
                     label: '状态',
@@ -89,7 +104,7 @@ export default {
                 },
                 {
                     label: '入住时间',
-                    prop: 'createDate'
+                    prop: 'checkInDate'
                 },
                 {
                     label: '操作',

+ 32 - 22
operationSupport/src/views/ownerManagement/stepPage/add.vue

@@ -137,8 +137,10 @@
                 <div class="formContent-item_title">绑定房产</div>
                 <div class="formContent-formList" v-for="(item, index) in formData.houseList" :key="index">
                     <div class="block-title">
-                        <div class="floor list-title" v-if="!isAdd">{{ `${item.buildingName} ${item.unitName}${item.roomNumber}` }}</div>
-                        <div class="floor list-title" v-else>{{ item.name }}</div>
+                        <div class="floor list-title" v-if="!isAdd && !!item.id">
+                            {{ `${item.buildingName} ${item.unitName}${item.roomNumber}` }}
+                        </div>
+                        <div class="floor list-title" v-else>{{ item.name || item.unitName }}</div>
                         <span class="remove list-title" v-if="!islooks" @click="removeHouse(index, 'houseList')">移除</span>
                         <img class="bg-img" src="@/assets/img/ownerManagement/bg_card@2x.png" alt="" />
                         <img class="bg-imgIoc" src="@/assets/img/ownerManagement/icon_building@2x.png" alt="" />
@@ -182,10 +184,9 @@
                 <div class="formContent-item_title">绑定车位</div>
                 <div class="addCat">
                     <div class="block-title" v-for="(item, index) in formData.parkingList" :key="index">
-                        <div class="floor list-title">{{ item.parkingId }}</div>
-                        <span class="remove list-title" v-show="formData.parkingList.length > 1" @click="removeHouse(index, 'parkingList')"
-                            >移除</span
-                        >
+                        <div class="floor list-title" v-if="!isAdd && !!item.id">{{ item.parkingId }}</div>
+                        <div class="floor list-title" v-else>{{ item.name || item.parkingNumber }}</div>
+                        <span class="remove list-title" v-if="!islooks" @click="removeHouse(index, 'parkingList')">移除</span>
                         <img class="bg-img" src="@/assets/img/ownerManagement/bg_card@2x.png" alt="" />
                         <img class="bg-imgIoc" src="@/assets/img/ownerManagement/icon_car@2x.png" alt="" />
                     </div>
@@ -442,8 +443,12 @@ export default {
     },
     methods: {
         getDetails(id) {
+            let url = '/scResident/find/' + id;
+            if (this.islooks) {
+                url = '/scResident/audit/find/' + id;
+            }
             this.$http
-                .get('/scResident/find/' + id)
+                .get(url)
                 .then(({ data, status, msg }) => {
                     if (0 === status) {
                         const { effectiveDateStart, effectiveDateEnd } = data;
@@ -508,7 +513,6 @@ export default {
                 if (num === 1) {
                     tenantsTree = this.communityArr;
                 } else {
-                    debugger;
                     tenantsTree = this.garageArr;
                 }
 
@@ -526,21 +530,23 @@ export default {
             }).then((res) => {
                 if (res.length > 0) {
                     res.forEach((item, index) => {
-                        let newObj = {};
-                        if (num === 1) {
-                            newObj = {
-                                checkInDate: '',
-                                householdType: 1,
-                                name: item.name,
-                                houseId: item.value
-                            };
-                        } else {
-                            newObj = {
-                                parkingId: '',
-                                id: ''
-                            };
+                        if (item.children === null || item.children === undefined) {
+                            let newObj = {};
+                            if (num === 1) {
+                                newObj = {
+                                    checkInDate: '',
+                                    householdType: 1,
+                                    name: item.name,
+                                    houseId: item.value
+                                };
+                            } else {
+                                newObj = {
+                                    parkingId: item.value,
+                                    name: item.name
+                                };
+                            }
+                            this.formData[arr].push(newObj);
                         }
-                        this.formData[arr].push(newObj);
                     });
                 }
             });
@@ -564,6 +570,10 @@ export default {
         },
         addEdit() {
             let _this = this;
+            if (this.formData.houseList.length === 0) {
+                this.$message.error('房产必须绑定');
+                return;
+            }
             new Promise((resolve) => {
                 this.$refs.form.validate();
                 let vali = false;

+ 15 - 1
operationSupport/src/views/ownerManagement/stepPage/householdTable.vue

@@ -2,7 +2,8 @@
     <div class="item-table">
         <div class="table-list" v-for="item in tableNames" :key="item">
             <div class="lable">{{ item.lable }}</div>
-            <div class="text">{{ tabDatas[item.prop] }}</div>
+            <div class="text" v-if="!!item.typeArray">{{ tabDatas[item.prop] | matchingVal(item.typeArray) }}</div>
+            <div class="text" v-else>{{ tabDatas[item.prop] || ' --' }}</div>
         </div>
     </div>
 </template>
@@ -17,6 +18,19 @@ export default {
             type: Object
         }
     },
+    filters: {
+        matchingVal(val, arr) {
+            let v = '暂无';
+            if (!!val) {
+                arr.forEach((item) => {
+                    if (item.type === val) {
+                        v = item.lable;
+                    }
+                });
+            }
+            return v;
+        }
+    },
     computed: {
         tableNames() {
             return this.tableName;

+ 0 - 2
operationSupport/src/views/ownerManagement/stepPage/poptreeSelect.vue

@@ -43,8 +43,6 @@ export default {
     },
     created() {
         this.tenantsTree = this.params.tenantsTree;
-        console.log();
-        // this.getAreaList();
     }
 };
 </script>