Ver código fonte

修改主页,修改bug,删除右上角按钮

asd123a20 2 anos atrás
pai
commit
fa4ec4af0b

BIN
src/assets/images/welcome.png


+ 4 - 4
src/layout/components/Navbar.vue

@@ -6,7 +6,7 @@
     <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
 
     <div class="right-menu">
-      <template v-if="device!=='mobile'">
+      <!-- <template v-if="device!=='mobile'">
         <search id="header-search" class="right-menu-item" />
         
         <el-tooltip content="源码地址" effect="dark" placement="bottom">
@@ -23,7 +23,7 @@
           <size-select id="size-select" class="right-menu-item hover-effect" />
         </el-tooltip>
 
-      </template>
+      </template> -->
 
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
         <div class="avatar-wrapper">
@@ -34,9 +34,9 @@
           <router-link to="/user/profile">
             <el-dropdown-item>个人中心</el-dropdown-item>
           </router-link>
-          <el-dropdown-item @click.native="setting = true">
+          <!-- <el-dropdown-item @click.native="setting = true">
             <span>布局设置</span>
-          </el-dropdown-item>
+          </el-dropdown-item> -->
           <el-dropdown-item divided @click.native="logout">
             <span>退出登录</span>
           </el-dropdown-item>

+ 6 - 3
src/views/community/building/index.vue

@@ -91,7 +91,6 @@
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-
     <el-table v-loading="loading" :data="buildingList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <!-- <el-table-column label="楼栋Id" align="center" prop="buildingId" /> -->
@@ -213,7 +212,8 @@ export default {
           message: '请选择社区',
           trigger: 'change'
         }],
-      }
+      },
+       addr: []
     };
   },
   created() {
@@ -234,6 +234,7 @@ export default {
     /** 查询地址列表 */
     getAddrList() {
       listAddr().then(response => {
+        this.addr = response.data;
         this.addrOptions = this.handleTree(response.data, "addrId");
       });
     },
@@ -254,6 +255,7 @@ export default {
         delete node.children;
       }
       return {
+        // id: node.interId,
         id: node.addrId,
         label: node.name,
         children: node.children,
@@ -320,7 +322,9 @@ export default {
       this.reset();
       const buildingId = row.buildingId || this.ids
       getBuilding(buildingId).then(response => {
+        const data = this.addr.find(e => e.interId == response.data.estateId);
         this.form = response.data;
+        this.form.addrId = data.addrId;
         this.open = true;
         this.title = "修改楼栋管理";
       });
@@ -329,7 +333,6 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         this.form.number = this.form.number;
-        console.log(this.form);
         if (valid) {
           if (this.form.buildingId != null) {
             updateBuilding(this.form).then(response => {

+ 9 - 6
src/views/community/house/index.vue

@@ -243,7 +243,8 @@ export default {
       form: {},
       // 表单校验
       rules: {
-      }
+      },
+      defaultProps: {}
     };
   },
   watch: {
@@ -261,7 +262,6 @@ export default {
     getList() {
       this.loading = true;
       listHouse(this.queryParams).then(response => {
-        console.log(response.rows);
         this.houseList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -362,6 +362,10 @@ export default {
       const houseId = row.houseId || this.ids
       getHouse(houseId).then(response => {
         this.form = response.data;
+        this.queryBuildingParams.estateId = row.estateId;
+        listBuilding(this.queryBuildingParams).then(response => {
+          this.buildingOptions = response.rows;
+        });
         this.open = true;
         this.title = "修改住宅管理";
       });
@@ -370,10 +374,9 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          var data= this.buildingOptions.filter((item) => item.buildingId == this.form.buildingId);
-
-          this.form.estateId =  data[0].estateId;
-          this.form.deptId = data[0].deptId;
+          var data= this.buildingOptions.find((item) => item.buildingId == this.form.buildingId);
+          this.form.estateId =  data.estateId;
+          this.form.deptId = data.deptId;
 
           if (this.form.houseId != null) {
             updateHouse(this.form).then(response => {

Diferenças do arquivo suprimidas por serem muito extensas
+ 14 - 899
src/views/index.vue


+ 1 - 1
vue.config.js

@@ -37,7 +37,7 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://localhost:8080`,
+        target: `http://192.168.0.71:8080`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''