소스 검색

Merge remote-tracking branch 'origin/new_web' into new_web

wangfen 3 년 전
부모
커밋
462aa5f0be
34개의 변경된 파일811개의 추가작업 그리고 399개의 파일을 삭제
  1. 1 1
      operationSupport/public/index.html
  2. 17 5
      operationSupport/src/assets/css/main.scss
  3. 16 3
      operationSupport/src/assets/css/public-style.scss
  4. BIN
      operationSupport/src/assets/img/icon_zhuxiao.png
  5. BIN
      operationSupport/src/assets/img/icon_zhuxiao_d.png
  6. 12 1
      operationSupport/src/components/common/organTree.vue
  7. 65 25
      operationSupport/src/main.js
  8. 136 1
      operationSupport/src/router/index.js
  9. 5 3
      operationSupport/src/views/alarmManagement/details.vue
  10. 8 7
      operationSupport/src/views/alarmManagement/popups/addoreditalarm.vue
  11. 7 7
      operationSupport/src/views/deviceManagement/index.vue
  12. 12 11
      operationSupport/src/views/deviceManagement/indexFacilities.vue
  13. 4 6
      operationSupport/src/views/deviceManagement/indexType.vue
  14. 74 23
      operationSupport/src/views/ownerManagement/details.vue
  15. 42 19
      operationSupport/src/views/ownerManagement/index.vue
  16. 21 6
      operationSupport/src/views/ownerManagement/ownerReview/index.vue
  17. 32 22
      operationSupport/src/views/ownerManagement/stepPage/add.vue
  18. 15 1
      operationSupport/src/views/ownerManagement/stepPage/householdTable.vue
  19. 0 2
      operationSupport/src/views/ownerManagement/stepPage/poptreeSelect.vue
  20. 25 2
      userCenter/src/assets/css/main.scss
  21. BIN
      userCenter/src/assets/img/403.png
  22. BIN
      userCenter/src/assets/img/404.png
  23. 113 111
      userCenter/src/components/common/Header.vue
  24. 6 20
      userCenter/src/components/common/Sidebar.vue
  25. 41 11
      userCenter/src/main.js
  26. 5 1
      userCenter/src/router/index.js
  27. 9 0
      userCenter/src/store/store.js
  28. 26 0
      userCenter/src/views/system/403/index.vue
  29. 14 23
      userCenter/src/views/system/404/index.vue
  30. 60 51
      userCenter/src/views/system/dictionarys/popups/AddOrEdit.vue
  31. 1 0
      userCenter/src/views/system/organs/index.vue
  32. 17 20
      userCenter/src/views/system/organs/popups/EditForm.vue
  33. 12 5
      userCenter/src/views/system/users/popups/AddOrEditUserInfo.vue
  34. 15 12
      userCenter/src/views/system/users/popups/edituser.vue

+ 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>

+ 25 - 2
userCenter/src/assets/css/main.scss

@@ -29,6 +29,10 @@ body {
     -moz-osx-font-smoothing: grayscale;
     margin: 0;
 }
+textarea::-webkit-input-placeholder {
+    font-family: "PingFang SC", "Microsoft YaHei", "微软雅黑", Microsoft YaHei, "Helvetica Neue", Helvetica,
+        "Hiragino Sans GB", Arial, sans-serif;
+}
 .dmp-app {
     height: 100%;
     width: 100%;
@@ -685,7 +689,7 @@ a {
 }
 
 @mixin searchTextBotton {
-    color: $mainTextColor; 
+    color: $mainTextColor;
     font-size: 30px;
 }
 // table 操作字体颜色
@@ -697,7 +701,7 @@ a {
     }
 }
 .search .search-icon i.iconfont {
-    @include searchTextBotton
+    @include searchTextBotton;
 }
 .handle-box,
 .search,
@@ -706,3 +710,22 @@ a {
         @include searchTextBotton;
     }
 }
+// 异常页面
+div.box-40 {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    .title {
+        text-align: center;
+        margin-top: 40px;
+        h2 {
+            color: #424656;
+            font-size: 24px;
+        }
+        .text-title {
+            color: #aaadba;
+            margin: 10px 0 20px 0;
+        }
+    }
+}

BIN
userCenter/src/assets/img/403.png


BIN
userCenter/src/assets/img/404.png


+ 113 - 111
userCenter/src/components/common/Header.vue

@@ -7,7 +7,7 @@
  * @FilePath: \UMIS\src\components\others\Header.vue
 -->
 <template>
-    <div class="header" :class="[collapse? 'collapse':'expand']">
+    <div class="header" :class="[collapse ? 'collapse' : 'expand']">
         <div class="el-fl-left"><v-tags></v-tags></div>
         <div class="header-right">
             <div class="header-user-con">
@@ -15,29 +15,25 @@
                 <!-- 用户头像 -->
                 <div class="user-avator" @click="editUserInfo">
                     <i class="iconfont" v-show="!cruUserInfo.photo" v-bottom-txt-tip data-txt="编辑用户信息">&#xe6e8;</i>
-                    
                     <div
                         class="imgs"
                         v-show="cruUserInfo.photo"
                         :style="'backgroundImage:' + 'url(' + envConfig.baseImgApi + cruUserInfo.photo + ');'"
                     ></div>
-                    <!-- <img v-show="cruUserInfo.photo" :src="envConfig.baseImgApi + cruUserInfo.photo" /> -->
                 </div>
-                <!-- <span style="width: 1px; height: 16px; background: #FFFFFF; opacity: 0.5"></span> -->
                 <div class="message">
                     <span class="main" @click="goMessage('unread')">
-                        <!-- <i class="iconfont btn">&#xe6ea;</i> -->
-                        <img :src='"@assets/img/btn_news.png"' alt="">
+                        <img src="@/assets/img/btn_news.png" alt="" />
                         <span class="iconfont point" v-if="messageNumber"></span>
                     </span>
-                    <div class="msg-content" v-if="messageList&&messageList.length">
+                    <div class="msg-content" v-if="messageList && messageList.length">
                         <p>消息通知</p>
                         <ul>
-                            <li v-for="(items, index) in messageList" :key="index" @click="toUrl(items.typeId)"  style="cursor: pointer;">
-                                <img :src='"@/assets/img/icon_msg"+(items.typeId)+".png"' style="width: 30px; height: 30px" />
+                            <li v-for="(items, index) in messageList" :key="index" @click="toUrl(items.typeId)" style="cursor: pointer">
+                                <img :src="'@/assets/img/icon_msg' + items.typeId + '.png'" style="width: 30px; height: 30px" />
                                 <div>
-                                    <span class="cont">【{{items.shortName}}】{{items.messageContent}}</span>
-                                    <span class="time">{{items.dateCreate}}</span>
+                                    <span class="cont">【{{ items.shortName }}】{{ items.messageContent }}</span>
+                                    <span class="time">{{ items.dateCreate }}</span>
                                 </div>
                             </li>
                         </ul>
@@ -46,20 +42,16 @@
                     <div class="msg-content" v-else>
                         <p>消息通知</p>
                         <ul>
-                            <li style="text-align: center;display: block;padding: 0 20px;line-height: 60px;">
-                                暂无消息
-                            </li>
+                            <li style="text-align: center; display: block; padding: 0 20px; line-height: 60px">暂无消息</li>
                         </ul>
-                       <el-button type="text" class="more" disabled>查看更多</el-button>
+                        <el-button type="text" class="more" disabled>查看更多</el-button>
                     </div>
                 </div>
-                <!-- <span style="width: 1px; height: 16px; background: #FFFFFF; opacity: 0.5"></span> -->
                 <span class="border"></span>
-                <div class="logout" @click="logOut">      
-                    <el-tooltip placement="bottom" content="退出">      
-                      <img src="@/assets/img/btn_quit.png" class="tab_head-right" @click="logOut" />
+                <div class="logout">
+                    <el-tooltip placement="bottom" content="退出">
+                        <img src="@/assets/img/btn_quit.png" class="tab_head-right" @click="logOut" />
                     </el-tooltip>
-                    <!-- <i class="iconfont" v-bottom-txt-tip data-txt="退出">&#xe6e9;</i> -->
                 </div>
             </div>
         </div>
@@ -75,16 +67,16 @@ export default {
         return {
             name: '',
             envConfig: envConfig,
-            imgList:[
-                require("@/assets/img/icon_msg1.png"),
-                require("@/assets/img/icon_msg2.png"),
-                require("@/assets/img/icon_msg3.png"),
-                require("@/assets/img/icon_msg4.png"),
-                require("@/assets/img/icon_msg5.png"),
-                require("@/assets/img/icon_msg6.png"),
-                require("@/assets/img/icon_msg7.png"),
-                require("@/assets/img/icon_msg8.png"),
-                require("@/assets/img/icon_msg9.png")
+            imgList: [
+                require('@/assets/img/icon_msg1.png'),
+                require('@/assets/img/icon_msg2.png'),
+                require('@/assets/img/icon_msg3.png'),
+                require('@/assets/img/icon_msg4.png'),
+                require('@/assets/img/icon_msg5.png'),
+                require('@/assets/img/icon_msg6.png'),
+                require('@/assets/img/icon_msg7.png'),
+                require('@/assets/img/icon_msg8.png'),
+                require('@/assets/img/icon_msg9.png')
             ]
         };
     },
@@ -102,35 +94,37 @@ export default {
         ...mapState(['messageList'])
     },
     methods: {
-        toUrl(type){
-            let url,appId;
-            if(type==1||type==2){
-                url=this.envConfig.warnDetailUrl;
-                appId="1002";
-            }else if(type==4){
-                url=this.envConfig.taskManagementUrl;
-                appId="1003";
-            }else if(type==3||type==7){
-                url=this.envConfig.eventHiddenDangerUrl;
-                appId="1003";
-            }else if(type==9){
+        toUrl(type) {
+            let url, appId;
+            if (type == 1 || type == 2) {
+                url = this.envConfig.warnDetailUrl;
+                appId = '1002';
+            } else if (type == 4) {
+                url = this.envConfig.taskManagementUrl;
+                appId = '1003';
+            } else if (type == 3 || type == 7) {
+                url = this.envConfig.eventHiddenDangerUrl;
+                appId = '1003';
+            } else if (type == 9) {
                 // url=this.envConfig.eventHiddenDangerUrl;
-                appId="1012";
+                appId = '1012';
                 this.$router.push({
-                path: '/msg',
-             });
-             return;
+                    path: '/msg'
+                });
+                return;
             }
-            this.$http.postForm('/sc-message/message/judgingTheMessageJumpPermission',{
-                url:url.split('/')[url.split('/').length - 1],
-                appId:appId
-            }).then(({ status, data, msg })=>{
-                if(status==0&&data==0){
-                    window.open(url);
-                }else{
-                    this.$message.error("您没有该系统权限")
-                }
-            })
+            this.$http
+                .postForm('/sc-message/message/judgingTheMessageJumpPermission', {
+                    url: url.split('/')[url.split('/').length - 1],
+                    appId: appId
+                })
+                .then(({ status, data, msg }) => {
+                    if (status == 0 && data == 0) {
+                        window.open(url);
+                    } else {
+                        this.$message.error('您没有该系统权限');
+                    }
+                });
         },
         // 退出登录
         logOut() {
@@ -143,8 +137,8 @@ export default {
                     });
                     localStorage.removeItem('SC_token');
                     this.$store.commit('setloginInfo', '');
-                    this.$store.dispatch("tags", []);
-                    sessionStorage.removeItem("tabs");
+                    this.$store.dispatch('tags', []);
+                    sessionStorage.removeItem('tabs');
                     location.href = this.envConfig.loginUrl;
                 } else {
                     this.$message.error(msg);
@@ -178,32 +172,32 @@ export default {
             });
         },
         goMessage(msg) {
-            let messageStatus = 2;//全部
+            let messageStatus = 2; //全部
             if (msg == 'unread') {
-                messageStatus = 0;//未读
+                messageStatus = 0; //未读
             }
-            this.$store.commit('setmessageStatus',messageStatus);
+            this.$store.commit('setmessageStatus', messageStatus);
             this.$router.push({
-                path: '/msg',
+                path: '/msg'
             });
         },
         //获取最新消息列表
-        getMessageList(){
-            this.$http.postForm('/sc-message/message/queryLastMessage',{num:'5'}).then(({ status, data, msg }) => {
+        getMessageList() {
+            this.$http.postForm('/sc-message/message/queryLastMessage', { num: '5' }).then(({ status, data, msg }) => {
                 if (status === 0) {
                     this.$store.commit('setmessageList', data);
                 }
             });
         },
         //查询未读消息数量
-        getUnreadNumber(){
+        getUnreadNumber() {
             this.$http.postForm('/sc-message/message/queryUnreadMessageStatic').then(({ status, data, msg }) => {
                 if (status === 0) {
-                    data.map((item,index)=>{
-                       if(item.cn){
-                           this.$store.commit('setmessageNumber', true);
+                    data.map((item, index) => {
+                        if (item.cn) {
+                            this.$store.commit('setmessageNumber', true);
                         }
-                    })
+                    });
                 }
             });
         },
@@ -212,7 +206,7 @@ export default {
             if ('WebSocket' in window) {
                 var serviceIp = this.envConfig.websoketUrl;
                 this.websocket = new WebSocket('ws://' + serviceIp + '/sc-message/webSocket/' + id);
-            }else {
+            } else {
                 console.log('当前浏览器 Not support websocket');
             }
             let that = this;
@@ -236,16 +230,24 @@ export default {
 
             //接收到消息的回调方法
             this.websocket.onmessage = function (event) {
-                let msg=JSON.parse(event.data);
-                let i=msg.typeId-1;
-                if(msg.userId){
+                let msg = JSON.parse(event.data);
+                let i = msg.typeId - 1;
+                if (msg.userId) {
                     that.$notify({
                         dangerouslyUseHTMLString: true,
                         showClose: true,
-                        customClass:'notice_icon',
+                        customClass: 'notice_icon',
                         offset: 60,
-                        duration:3000,
-                        message: "<div class='notice'><img src="+that.imgList[i]+" class='img'/><div class='notice-content'><span class='title'>新消息通知</span><span class='nowrap'>"+"【"+msg.type+"】"+msg.content+"</span></div></div>"
+                        duration: 3000,
+                        message:
+                            "<div class='notice'><img src=" +
+                            that.imgList[i] +
+                            " class='img'/><div class='notice-content'><span class='title'>新消息通知</span><span class='nowrap'>" +
+                            '【' +
+                            msg.type +
+                            '】' +
+                            msg.content +
+                            '</span></div></div>'
                     });
                     that.getMessageList();
                     that.getUnreadNumber();
@@ -296,11 +298,11 @@ export default {
 };
 </script>
 <style lang='scss' scoped>
-.border{
-     width:1px;
-     height: 10px;
-     background: #FFFFFF;
-     opacity: 0.3
+.border {
+    width: 1px;
+    height: 10px;
+    background: #ffffff;
+    opacity: 0.3;
 }
 .header {
     height: 46px;
@@ -310,33 +312,33 @@ export default {
     display: flex;
     align-items: center;
     justify-content: space-between;
-    &.expand::before{
-        content: "";
+    &.expand::before {
+        content: '';
         display: inline-block;
-        width:230px;
-        height:46px;
+        width: 230px;
+        height: 46px;
         background: #2c354a;
         position: absolute;
-        left:0;
+        left: 0;
     }
-    &.collapse::before{
-        content: "";
+    &.collapse::before {
+        content: '';
         display: inline-block;
-        width:95px;
-        height:46px;
+        width: 95px;
+        height: 46px;
         background: #2c354a;
         position: absolute;
-        left:0;
+        left: 0;
     }
 }
-.header-right {   
+.header-right {
     padding-right: 20px;
-    color:rgba(255, 255, 255, 0.6);
-    .name-txt{
+    color: rgba(255, 255, 255, 0.6);
+    .name-txt {
         font-size: 12px;
         font-family: PingFangSC-Regular, PingFang SC;
         font-weight: 400;
-        color: #FFFFFF;
+        color: #ffffff;
     }
 }
 .header-user-con {
@@ -346,16 +348,16 @@ export default {
 }
 .logout {
     margin-left: 20px;
-    img{
-        width:20px;
+    img {
+        width: 20px;
         height: 20px;
     }
 }
-.iconfont{
+.iconfont {
     font-size: 20px;
-    color:rgba(255, 255, 255, 0.6);
-    &:hover{
-        color:rgba(255, 255, 255, 1);;
+    color: rgba(255, 255, 255, 0.6);
+    &:hover {
+        color: rgba(255, 255, 255, 1);
     }
 }
 .user-avator {
@@ -376,18 +378,18 @@ export default {
     &:hover {
         .msg-content {
             display: block;
-            background: #FFFFFF;
+            background: #ffffff;
             box-shadow: 0px 5px 20px 0px rgba(144, 144, 144, 0.4);
             border-radius: 6px;
-            z-index:200;
+            z-index: 200;
         }
     }
     .main {
         height: 60px;
         line-height: 60px;
         position: relative;
-        img{
-            width:20px;
+        img {
+            width: 20px;
             height: 20px;
         }
         .point {
@@ -396,7 +398,7 @@ export default {
             right: -1px;
             width: 4px;
             height: 4px;
-            background: #FE7271;
+            background: #fe7271;
             border-radius: 50%;
             display: block;
         }
@@ -404,7 +406,7 @@ export default {
 
     .msg-content {
         position: absolute;
-        width: 380px;     
+        width: 380px;
         background: #ffffff;
         z-index: 20;
         right: 20px;
@@ -422,7 +424,7 @@ export default {
             align-items: center;
             height: 60px;
             padding-left: 20px;
-            border-top: 1px solid #F6F6F6;
+            border-top: 1px solid #f6f6f6;
             font-size: 12px;
             cursor: auto;
             span {
@@ -436,14 +438,14 @@ export default {
             }
             .cont {
                 color: #424656;
-                text-indent: -0.4em
+                text-indent: -0.4em;
             }
             .time {
-                color: #7D7F87;
+                color: #7d7f87;
             }
         }
         .more {
-            width:100%;
+            width: 100%;
         }
     }
 }

+ 6 - 20
userCenter/src/components/common/Sidebar.vue

@@ -18,7 +18,7 @@
                 router
                 :style="collapse ? 'width:84px' : 'width:220px'"
             >
-                <template v-for="item in siderMenuList">
+                <template v-for="item in thisMenuList">
                     <template v-if="item.children">
                         <el-submenu :index="item.linkPath" :key="item.linkPath">
                             <template slot="title">
@@ -90,7 +90,9 @@ export default {
         };
     },
     computed: {
-        ...mapState(['menuList']),
+        thisMenuList() {
+            return this.$store.getters['getThisMenuList'];
+        },
         onRoutes() {
             if (this.$route.path) {
                 let theme = darkTheme.has(this.$route.path) ? 'dark' : 'light';
@@ -107,30 +109,14 @@ export default {
             return this.$store.getters.getTheme;
         }
     },
-    watch: {
-        menuList(newVal) {
-            this.getMenuList();
-        }
-    },
+
     methods: {
         // 侧边栏折叠
         collapseChage() {
             this.$store.dispatch('collapse', !this.collapse);
-        },
-        getMenuList(resolve) {
-            this.$http.get('/user/findUserMenu', { appId: '1001' }).then(({ status, data, msg }) => {
-                if (0 === status) {
-                    this.siderMenuList = data[0].children;
-                    resolve && resolve(true);
-                }
-            });
         }
     },
-    created() {
-        new Promise((resolve) => {
-            this.getMenuList(resolve);
-        }).then((_) => {});
-    }
+    created() {}
 };
 </script>
 

+ 41 - 11
userCenter/src/main.js

@@ -38,34 +38,64 @@ Vue.use(ElementUI, {
 Vue.prototype.$http = http;
 Vue.prototype.$api = apiService(http);
 
-let defaultPath='';
+let defaultPath = '';
 Vue.prototype.routerLoad = {
-    findOne(arr){
-        return arr.map(v=>{
-            if(v.children){
+    findOne(arr) {
+        return arr.map(v => {
+            if (v.children) {
                 return this.findOne(v.children)
-            }else{
+            } else {
                 return {
-                    path:"/"+v.linkPath,
-                    name:v.name
+                    path: "/" + v.linkPath,
+                    name: v.name
                 }
             }
         })
     },
+    findMen(arr, indexPath) {
+        let status = false;
+        arr.map(v => {
+            if (v.children) {
+                this.findMen(v.children)
+            } else {
+                if (('/' + v.linkPath) === indexPath) {
+                    status = true
+                }
+            }
+        })
+        return status
+    },
+    close() {
+        let activeRout = localStorage.getItem('path');
+        let tagsList = store.getters['getTagsList'];
+        tagsList.forEach((item, index) => {
+            if (item.path == activeRout) {
+                tagsList.splice(index, 1);
+                return true;
+            }
+        });
+    },
     // 获取菜单
     loadMenus() {
         http.get('/user/findUserMenu', { appId: '1001' }).then(({ status, data, msg }) => {
             if (0 === status) {
                 let routerArr = this.findOne(data[0].children);
-                if(routerArr[0].length){
+                store.commit('setThisMenuList', data[0].children);
+                if (routerArr[0].length) {
                     defaultPath = routerArr[0][0].path;
-                }else{
+                } else {
                     defaultPath = routerArr[0].path;
-                }              
+                }
                 if (localStorage.getItem('path') == '/') {
                     localStorage.setItem('path', defaultPath)
                 }
-                router.push({ path: localStorage.getItem('path') })
+                if (this.findMen(data[0].children, localStorage.getItem('path'))) {
+                    router.push({ path: localStorage.getItem('path') })
+                } else {
+                    this.close();
+                    router.replace({ path: '403' })
+                }
+
             }
         });
     }

+ 5 - 1
userCenter/src/router/index.js

@@ -93,7 +93,11 @@ export default new Router({
                     component: () => import(/* webpackChunkName: "appVersionManage" */ '@views/sysManage/appVersionManage'),
                     meta: { title: 'APP版本管理' }
                 },
-
+                {
+                    path: '/403',
+                    component: () => import(/* webpackChunkName: "404" */ '@views/system/403'),
+                    meta: { title: '403' }
+                },
                 {
                     path: '/404',
                     component: () => import(/* webpackChunkName: "404" */ '@views/system/404'),

+ 9 - 0
userCenter/src/store/store.js

@@ -22,6 +22,7 @@ const store = new Vuex.Store({
     permissionList: [],
     //菜单列表
     menuList:[],
+    thisMenuList:[],
     // 当前登录用户信息
     cruUserInfo:{},
     //查询是否有未读消息
@@ -70,6 +71,10 @@ const store = new Vuex.Store({
     getMenuList(state){
       return state.menuList;
     },
+    getThisMenuList(state){
+      return state.thisMenuList;
+    },
+    
     // 获取当前登录用户信息
     getCruUserInfo(state){
       return state.cruUserInfo;
@@ -100,6 +105,10 @@ const store = new Vuex.Store({
     setMenuList(state,data){
       state.menuList = data;
     },
+    setThisMenuList(state,data){
+      state.thisMenuList = data;
+    },
+    
     setcCruUserInfo(state,data){
       state.cruUserInfo = data;
     },

+ 26 - 0
userCenter/src/views/system/403/index.vue

@@ -0,0 +1,26 @@
+<!--
+ * @Description: 
+ * @Date: 2020-11-13 13:30:36
+ * @LastEditTime: 2021-06-01 08:36:34
+ * @FilePath: \WEB\userCenter\src\views\system\404\index.vue
+-->
+<template>
+    <div class="box-40">
+        <img src="@/assets/img/403.png" alt="" />
+        <div class="title">
+            <h2>403</h2>
+            <div class="text-title">抱歉,您无权访问此页面</div>
+            <el-button type="primary" @click="goback()">返回</el-button>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    methods: {
+        goback() {
+            history.go(-1)
+        }
+    }
+};
+</script>

+ 14 - 23
userCenter/src/views/system/404/index.vue

@@ -1,29 +1,20 @@
-<!--
- * @Description: 
- * @Date: 2020-11-13 13:30:36
- * @LastEditTime: 2021-06-01 08:36:34
- * @FilePath: \WEB\userCenter\src\views\system\404\index.vue
--->
 <template>
-    <div class="box-404">
-        <img src="@/assets/img/404.png" alt="">
+    <div class="box-40">
+        <img src="@/assets/img/404.png" alt="" />
+        <div class="title">
+            <h2>404</h2>
+            <div class="text-title">抱歉,您访问的页面不存在</div>
+            <el-button type="primary" @click="goback()">返回</el-button>
+        </div>
     </div>
 </template>
 
-<style lang="scss" scope>
-    div.box-404{
-        width: 100%;
-        height: 100%;
-        img{
-            display: block;
-            width: 500px;
-            height: 156px;
-            position: absolute;
-            left: 0;
-            top: 0;
-            right: 0;
-            bottom: 0;
-            margin: auto;
+<script>
+export default {
+    methods: {
+        goback() {
+            history.go(-1)
         }
     }
-</style>
+};
+</script>

+ 60 - 51
userCenter/src/views/system/dictionarys/popups/AddOrEdit.vue

@@ -18,12 +18,13 @@
         </template>
         <template v-if="tabView == 'keyValue'">
             <div class="main">
-                <div class="search" style="padding:0;height:30px;">
+                <div class="search" style="padding: 0; height: 30px">
                     <el-input placeholder="请输入键值或标签" class="search-input" v-model="mixins_query.keyWords"></el-input>
-                    <el-button type="primary" @click="mixins_search" class="search-btn" icon="el-icon-search">查询
+                    <el-button type="primary" @click="mixins_search" class="search-btn" icon="el-icon-search"
+                        >查询
                         <!-- <i class="iconfont">&#xe6fc;</i>查询 -->
                     </el-button>
-                     <div class="search-icon">
+                    <div class="search-icon">
                         <!-- 删除 新增 -->
                         <i class="iconfont" @click="deleteRow" v-txt-tip data-txt="删除">&#xe63b;</i>
                         <i class="iconfont" @click="addOrEdit('add')" v-txt-tip data-txt="新增">&#xe641;</i>
@@ -40,14 +41,18 @@
                         @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="deleteOne(scope.row.id)"  class="iconfont" style="color:#FF7272" v-txt-tip data-txt="删除">&#xe63a;</i>
+                            <i @click="addOrEdit('edit', scope.row)" class="iconfont" style="margin-right: 30px" v-txt-tip data-txt="编辑"
+                                >&#xe645;</i
+                            >
+                            <i @click="deleteOne(scope.row.id)" class="iconfont" style="color: #ff7272" v-txt-tip data-txt="删除"
+                                >&#xe63a;</i
+                            >
                         </template>
                     </zz-table>
                 </div>
             </div>
         </template>
-        <el-dialog :title="addkeytitle" :visible.sync="dialogFormVisible" :append-to-body="true" width="450px">
+        <el-dialog :title="addkeytitle" :visible.sync="dialogFormVisible" append-to-body width="450px" :close-on-click-modal="false">
             <zz-form
                 :cols="formaddkeyCols"
                 :data="formaddkeyData"
@@ -83,7 +88,7 @@ export default {
                 dictCode: '', //资料代码
                 dictName: '', //资料名称
                 remark: '', //备注,
-                id: '',
+                id: ''
                 // disabled:
             },
             formCols: [
@@ -91,7 +96,7 @@ export default {
                     {
                         label: '资料代码',
                         prop: 'dictCode',
-                        input: this.params.todo==='edit'?false:true
+                        input: this.params.todo === 'edit' ? false : true
                     },
                     {
                         label: '资料名称',
@@ -106,15 +111,21 @@ export default {
                 ]
             ],
             formRules: {
-                dictCode: [this.$valid.inputRequired('资料代码'), this.$valid.pattern(/^[A-Za-z0-9_]{1,30}$/,"限30位,英文字母、数字或下划线")],
-                dictName: [this.$valid.inputRequired('资料名称'), this.$valid.pattern(/^[\u4e00-\u9fa5A-Za-z0-9_]{1,20}$/,"限20位,中文、字母、数字或下划线")],
-                remark: [this.$valid.lengthRange(0,50,false)]
+                dictCode: [
+                    this.$valid.inputRequired('资料代码'),
+                    this.$valid.pattern(/^[A-Za-z0-9_]{1,30}$/, '限30位,英文字母、数字或下划线')
+                ],
+                dictName: [
+                    this.$valid.inputRequired('资料名称'),
+                    this.$valid.pattern(/^[\u4e00-\u9fa5A-Za-z0-9_]{1,20}$/, '限20位,中文、字母、数字或下划线')
+                ],
+                remark: [this.$valid.lengthRange(0, 50, false)]
             },
             formErrors: {},
             cols: [
                 {
                     label: '键值',
-                    prop: 'dictCode',
+                    prop: 'dictCode'
                 },
                 {
                     label: '内容',
@@ -138,8 +149,7 @@ export default {
                 delivery: false,
                 type: [],
                 resource: '',
-                desc: '',
-
+                desc: ''
             },
             formLabelWidth: '120px',
             formaddkeyData: {
@@ -175,7 +185,7 @@ export default {
     methods: {
         tabChange(tab, index) {
             if (!this.formaddkeyData.parentDictId) {
-                this.$message.error("请先保存基本信息");
+                this.$message.error('请先保存基本信息');
                 return;
             }
             this.iscur = index;
@@ -183,7 +193,7 @@ export default {
             if (this.tabView == 'keyValue' && this.formaddkeyData.parentDictId) {
                 this.mixins_query.parentDictId = this.formaddkeyData.parentDictId;
                 this.mixins_search();
-            }else{
+            } else {
                 this.formData.id = this.formaddkeyData.parentDictId;
             }
         },
@@ -198,44 +208,44 @@ export default {
                 this.formaddkeyData.parentDictId = this.params.data.id;
                 this.formaddkeyData.dictCode = '';
                 this.formaddkeyData.dictValue = '';
-                this.formaddkeyCols= [
-                [
-                    {
-                        label: '键值输入',
-                        prop: 'dictCode',
-                        input: true,
-                        maxlength: 20
-                    },
-                    {
-                        label: '内容输入',
-                        prop: 'dictValue',
-                        input: true,
-                        placeholder: '请简单描述'
-                    }
-                ]
-            ]
+                this.formaddkeyCols = [
+                    [
+                        {
+                            label: '键值输入',
+                            prop: 'dictCode',
+                            input: true,
+                            maxlength: 20
+                        },
+                        {
+                            label: '内容输入',
+                            prop: 'dictValue',
+                            input: true,
+                            placeholder: '请简单描述'
+                        }
+                    ]
+                ];
             } else {
                 this.addkeytitle = '编辑键值';
                 this.formaddkeyData.id = index.id;
                 this.formaddkeyData.parentDictId = index.parentDictId;
                 this.formaddkeyData.dictCode = index.dictCode;
                 this.formaddkeyData.dictValue = index.dictValue;
-                this.formaddkeyCols= [
-                [
-                    {
-                        label: '键值输入',
-                        prop: 'dictCode',
-                        input: false,
-                        maxlength: 20
-                    },
-                    {
-                        label: '内容输入',
-                        prop: 'dictValue',
-                        input: true,
-                        placeholder: '请简单描述'
-                    }
-                ]
-            ]
+                this.formaddkeyCols = [
+                    [
+                        {
+                            label: '键值输入',
+                            prop: 'dictCode',
+                            input: false,
+                            maxlength: 20
+                        },
+                        {
+                            label: '内容输入',
+                            prop: 'dictValue',
+                            input: true,
+                            placeholder: '请简单描述'
+                        }
+                    ]
+                ];
             }
         },
         // 新增/编辑键值保存
@@ -273,7 +283,7 @@ export default {
             this.selectRow.forEach((v) => {
                 ids.push(v.id);
             });
-           this.$msgBox(`刪除字典`, '删除后将无法恢复,请问是否继续?')
+            this.$msgBox(`刪除字典`, '删除后将无法恢复,请问是否继续?')
                 .then(() => {
                     this.$http.post('/dict/delete', ids).then(({ status, data, msg }) => {
                         if (0 === status) {
@@ -332,8 +342,7 @@ export default {
                             this.$message.error(msg);
                         }
                     })
-                    .catch((err) => {
-                    });
+                    .catch((err) => {});
             });
             if (this.tabView == 'keyValue') {
                 this.$emit('close');

+ 1 - 0
userCenter/src/views/system/organs/index.vue

@@ -211,6 +211,7 @@ export default {
                 .catch(() => {});
         },
         fun(params) {
+            this.$refs['form'].$children[0].resetFields();
             const {
                 id = '',
                 orgType = '', //机构类型

+ 17 - 20
userCenter/src/views/system/organs/popups/EditForm.vue

@@ -20,26 +20,27 @@
                 >
                     <el-option v-for="item in organTypeList" :key="item.value" :value="item.value" :label="item.label"></el-option>
                 </el-select>
-                <select-tree
-                    v-if="organList.length"
+
+                <el-input
+                    v-if="isEdit !== 'edit' && isEdit !== 'add' && formData.parentOrgId == ''"
                     slot="parentOrgId"
-                    class="new-select-tree"
-                    selectTreeTitle="所属机构"
-                    :disabled="isEdit == 'edit'"
-                    :options="organList"
-                    :props="defaultProps"
-                    v-model="formData.parentOrgId"
-                />
+                    type="text"
+                    placeholder="请选择上级机构"
+                >
+                </el-input>
+
                 <select-tree
-                    v-if="!organList.length && this.formData.todo == 'add'"
+                    v-else
                     slot="parentOrgId"
                     class="new-select-tree"
-                    :disabled="isEdit == 'edit'"
+                    empty-text="请选择上级机构"
+                    placeholder="请选择上级机构"
+                    :disabled="isEdit !== 'edit' && isEdit !== 'add'"
                     :options="organList"
-                    selectTreeTitle="所属机构"
                     :props="defaultProps"
                     v-model="formData.parentOrgId"
                 />
+
                 <el-cascader
                     slot="orgAreaId"
                     v-model="formData.orgAreaId"
@@ -60,7 +61,7 @@
                     <span style="position: absolute; bottom: 0; right: 10px" v-if="formData.remark">{{ formData.remark.length }}/50</span>
                 </div>
             </zz-form>
-            <zz-form :cols="formTwoCols" :data="formData" :errors="formErrors" labelWidth="100" ref="form" :disabled="!isEdit">
+            <zz-form :cols="formTwoCols" :data="formData" :errors="formErrors" ref="form1" labelWidth="100" :disabled="!isEdit">
                 <el-select slot="orgLeaderSex" v-model="formData.orgLeaderSex" placeholder="请选择性别">
                     <el-option value="0" label="女"></el-option>
                     <el-option value="1" label="男"></el-option>
@@ -201,9 +202,9 @@ export default {
                 ]
             ],
             formRules: {
-                orgType: [this.$valid.selectRequired('机构类型')],
-                parentOrgId: [this.$valid.selectRequired('上级机构')],
-                orgAreaId: [this.$valid.inputRequired('所属区域')],
+                orgType: [this.$valid.selectRequired('请选择机构类型')],
+                parentOrgId: [this.$valid.selectRequired('请选择上级机构')],
+                orgAreaId: [this.$valid.inputRequired('请选择所属区域')],
                 orgName: [this.$valid.inputRequired('机构名称'), this.$valid.pattern(/^[\u4e00-\u9fa5A-Za-z0-9_]{1,20}$/)],
                 orgState: [this.$valid.inputRequired('状态')],
                 orgLeaderName: [this.$valid.pattern(/^[\u4e00-\u9fa5A-Za-z0-9_]{0,20}$/)],
@@ -288,10 +289,6 @@ export default {
             new Promise((resolve) => {
                 this.$refs.form.validate(resolve);
             }).then(() => {
-                // if (this.formData.parentOrgId == '') {
-                //     this.formData.parentOrgId = 0;
-                // }
-                debugger;
                 let data = JSON.parse(JSON.stringify(newData)),
                     method = 'post',
                     url = '/org/insert';

+ 12 - 5
userCenter/src/views/system/users/popups/AddOrEditUserInfo.vue

@@ -318,16 +318,18 @@ export default {
             }).then(() => {
                 var loading = this.$loading();
                 var posturl = '';
+                let frData = JSON.parse(JSON.stringify(this.formData));
                 if (this.params.todo === 'edit') {
                     posturl = '/user/updateUserById';
-                    // if (this.formData.deptOrgId == '') {
-                    //     this.formData.deptOrgName = '';
-                    // }
+                    if (frData.password === '**********' || frData.passwordOK === '**********') {
+                        delete frData.password;
+                        delete frData.passwordOK;
+                    }
                 } else {
                     posturl = '/user/addUser';
                 }
                 this.$http
-                    .post(posturl, this.formData)
+                    .post(posturl, frData)
                     .then(({ status, data, msg }) => {
                         loading.close();
                         if (0 == status) {
@@ -368,8 +370,13 @@ export default {
     },
     created() {
         this.getselectAll();
-        // this.getcompanyTree();
         this.formData = JSON.stringify(this.params.data) !== '{}' ? this.params.data : this.formData;
+
+        if (this.params.todo === 'edit') {
+            this.$set(this.formData, 'password', '**********');
+            this.$set(this.formData, 'passwordOK', '**********');
+        }
+
         this.organList = this.params.organList ? this.params.organList : this.organList;
         this.organListCompany = this.params.organListCompany ? this.params.organListCompany : this.organListCompany;
         this.organListdepartment = this.params.organListdepartment ? this.params.organListdepartment : this.organListdepartment;

+ 15 - 12
userCenter/src/views/system/users/popups/edituser.vue

@@ -9,8 +9,8 @@
 <template>
     <div class="alert-body__main_content">
         <zz-form :cols="formCols" :data="formData" :rules="formRules" :errors="formErrors" labelWidth="110" ref="form">
-            <el-input slot="password" type="password" v-model="formData.password"></el-input>
-            <el-input slot="passwordOK" type="password" v-model="formData.passwordOK"></el-input>
+            <el-input slot="password" type="password" clearable v-model="formData.password"></el-input>
+            <el-input slot="passwordOK" type="password" clearable v-model="formData.passwordOK"></el-input>
             <el-select slot="status" v-model="formData.enableState">
                 <el-option v-for="(item, index) in allStatus" :key="index" :label="item.label" :value="item.id">{{ item.label }}</el-option>
             </el-select>
@@ -49,7 +49,7 @@
             />
             <div class="imgdis-div" slot="companylogo" v-show="formData.photo">
                 <i class="el-icon-delete" @click="delformphoto"></i>
-                <img :src="envConfig.baseImgApi + formData.photo" alt="" width="60" height="60" />
+                <img :src="envConfig.baseImgApi + formData.photo" alt="" width="60" height="60" style="object-fit: cover" />
                 <!-- <div class="tips"><img  style="width:12px;height:12px;vertical-align: middle;" src="@assets/img/icon-warning.png"/><span>支持jpg,jpeg,gif,png,bmp格式的图片</span></div> -->
             </div>
             <el-upload
@@ -69,12 +69,6 @@
                 <div slot="file" slot-scope="{ file }">
                     <img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
                     <span class="el-upload-list__item-actions">
-                        <!-- <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
-                            <i class="el-icon-zoom-in"></i>
-                        </span> -->
-                        <!-- <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
-                            <i class="el-icon-download"></i>
-                        </span> -->
                         <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
                             <i class="el-icon-delete"></i>
                         </span>
@@ -167,7 +161,9 @@ export default {
                 userGroupId: '',
                 userTags: '',
                 userType: '',
-                username: ''
+                username: '',
+                password: '**********',
+                passwordOK: '**********'
             },
             dialogImageUrl: '',
             dialogVisible: false,
@@ -247,12 +243,18 @@ export default {
             }).then(() => {
                 var loading = this.$loading();
                 var posturl = '/sc-user-center/user/updateUserById';
+                if (this.formData.password === '**********' || this.formData.passwordOK === '**********') {
+                    delete this.formData.password;
+                    delete this.formData.passwordOK;
+                }
                 this.$http
                     .post(posturl, this.formData)
                     .then(({ status, data, msg }) => {
+                        debugger;
                         loading.close();
                         if (0 == status) {
                             this.$message.success(msg);
+
                             if (this.phoneNumber !== this.formData.phone) {
                                 this.$alert('你的手机号已变更,需重新登录', '提示', {
                                     confirmButtonText: '确定',
@@ -290,9 +292,10 @@ export default {
     },
     created() {
         this.getselectAll();
-        // this.getcompanyTree();
         this.phoneNumber = this.params.data.phone;
-        this.formData = this.params.data ? this.params.data : this.formData;
+        let val = Object.assign(this.formData, this.params.data);
+        this.formData = val;
+        this.$set(this.formData, 'password', '**********');
         this.organList = this.params.organList ? this.params.organList : this.organList;
         this.organListCompany = this.params.organListCompany ? this.params.organListCompany : this.organListCompany;
         this.organListdepartment = this.params.organListdepartment ? this.params.organListdepartment : this.organListdepartment;