Hwt 2 years ago
parent
commit
d972e7719d

+ 7 - 5
operationSupport/src/views/assetManagement/housingManagement/details.vue

@@ -110,7 +110,11 @@ import householdTable from '../stepPage/householdTable.vue';
 export default {
   components: { householdTable },
   mixins: [list],
-  name: 'housingManagementDetails',
+  props: {
+    params: {
+      type: Object
+    },
+  },
   data () {
     let _this = this;
     return {
@@ -361,7 +365,7 @@ export default {
     }
   },
   created () {
-    this.id = this.$route.query.id;
+    this.id = this.params;
     this.getDetails();
     this.getMember();
   },
@@ -380,9 +384,7 @@ export default {
           if (item.title == "房屋管理" || item.name == 'assetManagement/housingManagement/index') {
             // get arr = this.$store.getters['getTreeListAll'];
             this.$store.commit('setTreeListAll', [item.name]);
-            this.$router.push({
-              name: item.name,
-            })
+            this.$emit('clerOwnerStatus');
 
           }
           // if (item.title == activeRout.meta.title || item.path == activeRout.path) {

+ 29 - 17
operationSupport/src/views/assetManagement/housingManagement/index.vue

@@ -3,11 +3,11 @@
     <building-tree
       @buildingInformation="buildingInformation"
       :buildingType="1"
-      v-if="!showaddDialog"
+      v-show="!showaddDialog"
     ></building-tree>
     <div
       class="content-right"
-      v-if="!showaddDialog"
+      v-show="!showaddDialog"
     >
       <div class="search">
         <el-input
@@ -160,16 +160,24 @@
       :isAdd="isAdd"
     >
     </save-edits> -->
+
+    <save-details
+      v-if="!!showaddDialog"
+      :params="activeDataId"
+      @clerOwnerStatus="clerOwnerStatus"
+    >
+    </save-details>
   </div>
 </template>
 
 <script>
 import list from '@utils/list.js';
 import saveEdits from './saveEdits.vue';
+import saveDetails from './details.vue'
 
 export default {
   mixins: [list],
-  name: 'assetManagement/housingManagement/index',
+  components: { saveDetails },
   data () {
     return {
       statusOptions: [
@@ -235,24 +243,28 @@ export default {
       mixins_post: 'post',
       isAdd: true,
       activeData: {},
-      detailsType: 1
+      detailsType: 1,
+      activeDataId: ''
     };
   },
-  components: {
-    saveEdits
-  },
   methods: {
+    clerOwnerStatus () {
+      this.showaddDialog = '';
+      this.mixins_search();
+    },
     lookPage (row) {
-      this.$router.push({
-        path: '/housingManagement/details',
-        query: {
-          id: row.id,
-          communityId: this.mixins_query.communityId,
-          buildingId: this.mixins_query.buildingId,
-          unitId: this.mixins_query.unitName,
-          roomId: this.mixins_query.id
-        }
-      });
+      this.showaddDialog = row.id;
+      this.activeDataId = row.id;
+      // this.$router.push({
+      //   path: '/housingManagement/details',
+      //   query: {
+      //     id: row.id,
+      //     communityId: this.mixins_query.communityId,
+      //     buildingId: this.mixins_query.buildingId,
+      //     unitId: this.mixins_query.unitName,
+      //     roomId: this.mixins_query.id
+      //   }
+      // });
     },
     addCommand (command) {
       if (command === 'add') {

+ 10 - 4
operationSupport/src/views/assetManagement/shopManagement/details.vue

@@ -122,6 +122,11 @@ import householdTable from '../stepPage/householdTable.vue';
 export default {
   components: { householdTable },
   mixins: [list],
+  props: {
+    params: {
+      type: Object
+    },
+  },
   name: 'shopManagementDetails',
   data () {
     let _this = this;
@@ -423,7 +428,7 @@ export default {
     }
   },
   created () {
-    this.id = this.$route.query.id;
+    this.id = this.params;
     this.getDetails();
     this.getMember();
     this.getContract();
@@ -448,9 +453,10 @@ export default {
         tagsList.forEach((item) => {
           if (item.title == "商铺管理" || item.name == 'assetManagement/shopManagement/index') {
             this.$store.commit('setTreeListAll', item.name);
-            this.$router.push({
-              name: item.name
-            })
+            this.$emit('clerOwnerStatus');
+            // this.$router.push({
+            //   name: item.name
+            // })
           }
           // if (item.title == activeRout.meta.title || item.path == activeRout.path) {
           //   tagsList.splice(index, 1);

+ 28 - 8
operationSupport/src/views/assetManagement/shopManagement/index.vue

@@ -3,8 +3,12 @@
     <building-tree
       @buildingInformation="buildingInformation"
       :buildingType="2"
+      v-show="!showaddDialog"
     ></building-tree>
-    <div class="content-right">
+    <div
+      class="content-right"
+      v-show="!showaddDialog"
+    >
       <div class="search">
         <el-input
           clearable
@@ -149,18 +153,27 @@
       </zz-table>
     </div>
     <!-- <save-edits v-else :params="activeData" @clerOwnerStatus="clerOwnerStatus" :isAdd="isAdd"></save-edits> -->
+    <save-details
+      v-if="!!showaddDialog"
+      :params="activeDataId"
+      @clerOwnerStatus="clerOwnerStatus"
+    >
+    </save-details>
   </div>
 </template>
 
 <script>
 import list from '@utils/list.js';
 import saveEdits from './saveEdits.vue';
+import saveDetails from './details.vue'
 
 export default {
   mixins: [list],
   name: 'assetManagement/shopManagement/index',
   data () {
     return {
+      showaddDialog: '',
+      activeDataId: '',
       statusOptions: [
         { label: '空置', val: 0 },
         { label: '居住', val: 1 }
@@ -276,16 +289,23 @@ export default {
     };
   },
   components: {
-    saveEdits
+    saveEdits,
+    saveDetails
   },
   methods: {
+    clerOwnerStatus () {
+      this.showaddDialog = '';
+      this.mixins_search();
+    },
     lookPage (row) {
-      this.$router.push({
-        path: '/shopManagement/details',
-        query: {
-          id: row.id
-        }
-      });
+      this.showaddDialog = row.id;
+      this.activeDataId = row.id;
+      // this.$router.push({
+      //   path: '/shopManagement/details',
+      //   query: {
+      //     id: row.id
+      //   }
+      // });
     },
     addCommand (command) {
       if (command === 'add') {

+ 10 - 4
operationSupport/src/views/ownerManagement/details.vue

@@ -125,6 +125,11 @@ import vehicleOutToIn from './vehicleOutToIn.vue';
 export default {
   components: { householdTable, vehicle, vehicleOutToIn },
   name: 'ownerManagementDetails',
+  props: {
+    params: {
+      type: Object
+    },
+  },
   data () {
     let _this = this;
     return {
@@ -344,7 +349,7 @@ export default {
       document.querySelectorAll('.lable')[9].style.backgroundColor = '#FFFFFF';
       document.querySelectorAll('.lable')[9].style.border = '0px';
     })
-    this.id = this.$route.query.id;
+    this.id = this.params;
     this.getDetails();
     this.getParking();
     this.getHouse();
@@ -368,9 +373,10 @@ export default {
       if (tagsList.length > 1) {
         tagsList.forEach((item, index) => {
           if (item.title == "住户管理" || item.path == "/ownerManagement/index") {
-            this.$router.push({
-              path: item.path
-            })
+            this.$emit('clerStatus');
+            // this.$router.push({
+            //   path: item.path
+            // })
           }
           // if (item.title == activeRout.meta.title || item.path == activeRout.path) {
           //   tagsList.splice(index, 1);

+ 25 - 9
operationSupport/src/views/ownerManagement/index.vue

@@ -2,12 +2,12 @@
   <div class="content main">
     <organ-tree
       @organId="currentOrganId"
-      v-show="!ownerStatus"
+      v-show="!ownerStatus && !showaddDialog"
       :buildingType="1"
     ></organ-tree>
     <div
       class="content-right"
-      v-show="!ownerStatus"
+      v-show="!ownerStatus && !showaddDialog"
     >
       <div class="search">
         <el-input
@@ -239,6 +239,13 @@
       @clerOwnerStatus="clerOwnerStatus"
       :isAdd="isAdd"
     ></add-owner>
+
+    <save-details
+      v-if="!!showaddDialog"
+      :params="activeDataId"
+      @clerStatus="clerStatus"
+    >
+    </save-details>
   </div>
 </template>
 
@@ -246,16 +253,19 @@
 import list from '@/js/list.js';
 // import addOwner from './stepPage/add.vue';
 import addOwner from './stepPage/newAdd.vue';
+import saveDetails from './details.vue'
 
 export default {
   mixins: [list],
   name: 'ownerManagement',
-  components: { addOwner },
+  components: { addOwner, saveDetails },
   data () {
     return {
       ownerStatus: '',
       statusOptions: [],
       currentId: '',
+      activeDataId: '',
+      showaddDialog: '',
       cols: [
         {
           label: '姓名',
@@ -341,6 +351,10 @@ export default {
     };
   },
   methods: {
+    clerStatus () {
+      this.showaddDialog = '';
+      this.mixins_search();
+    },
     clerOwnerStatus () {
       this.ownerStatus = '';
       this.activeData = {};
@@ -377,12 +391,14 @@ export default {
         .catch(() => { });
     },
     lookPage (row) {
-      this.$router.push({
-        path: '/ownerManagement/details',
-        query: {
-          id: row.id
-        }
-      });
+      this.showaddDialog = row.id;
+      this.activeDataId = row.id;
+      // this.$router.push({
+      //   path: '/ownerManagement/details',
+      //   query: {
+      //     id: row.id
+      //   }
+      // });
     },
     cancellation (row) {
       const { buildingName, unitName, roomNumber } = row;

+ 0 - 1
operationSupport/src/views/ownerManagement/landlordManagement/index.vue

@@ -242,7 +242,6 @@ export default {
     },
     addOrEdit (todo, row) {
       if (todo == 'edit') {
-        debugger
         this.activeData = row.id;
         this.isAdd = false;
       }