Просмотр исходного кода

PropertySearch + Search logs

master
George Williams 5 лет назад
Родитель
Сommit
a52227872b

+ 13
- 0
package-lock.json Просмотреть файл

@@ -2413,6 +2413,11 @@
2413 2413
       "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
2414 2414
       "dev": true
2415 2415
     },
2416
+    "browser-downloads": {
2417
+      "version": "0.2.0",
2418
+      "resolved": "https://registry.npmjs.org/browser-downloads/-/browser-downloads-0.2.0.tgz",
2419
+      "integrity": "sha512-0tQntpixIPo8ZuOufMjPbZIp2jZMvCUz00rCiaf/T3LzLxcbt6j0r6Ef8Ao3lNP3bYh/ibLoWVoLCJ7SCvxrSA=="
2420
+    },
2416 2421
     "browserify-aes": {
2417 2422
       "version": "1.2.0",
2418 2423
       "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
@@ -11821,6 +11826,14 @@
11821 11826
         "vue": "^2.5.17"
11822 11827
       }
11823 11828
     },
11829
+    "vue-excel-export": {
11830
+      "version": "0.1.3",
11831
+      "resolved": "https://registry.npmjs.org/vue-excel-export/-/vue-excel-export-0.1.3.tgz",
11832
+      "integrity": "sha512-vjCKrVocZ9Q4Y1BJsuDiLR9E9x97vHY+ew7oSigxg7WDh6AsTbH5v4TFpCD65WwYy2jt1tQU6fsAIpKjVOXibw==",
11833
+      "requires": {
11834
+        "browser-downloads": "^0.2.0"
11835
+      }
11836
+    },
11824 11837
     "vue-hot-reload-api": {
11825 11838
       "version": "2.3.3",
11826 11839
       "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.3.tgz",

+ 1
- 0
package.json Просмотреть файл

@@ -25,6 +25,7 @@
25 25
     "v-file-upload": "^3.1.7",
26 26
     "vue": "^2.6.10",
27 27
     "vue-eva-icons": "^1.1.1",
28
+    "vue-excel-export": "^0.1.3",
28 29
     "vue-router": "^3.0.7",
29 30
     "vue-trix": "^1.0.0",
30 31
     "vuetify": "^1.5.5",

Двоичные данные
public/img/Commercial-Property.jpg Просмотреть файл


+ 62
- 23
src/components/admin/logs/SearchLogs.vue Просмотреть файл

@@ -2,7 +2,6 @@
2 2
   <!-- eslint-disable max-len -->
3 3
   <div>
4 4
     <div class="container">
5
-      <!-- <section class="intro-single"> -->
6 5
       <div class="container">
7 6
         <br />
8 7
         <br />
@@ -16,7 +15,45 @@
16 15
           </div>
17 16
         </div>
18 17
       </div>
19
-      <!-- </section> -->
18
+    </div>
19
+    <div class="container">
20
+      <div class="form-group row">
21
+        <div class="col-md-1">
22
+          <label>Filter</label>
23
+        </div>
24
+        <div class="col-md-3">
25
+          <select class="form-control" name="fields" id="fields" v-model="filter.by">
26
+            <option v-for="(item, i) in fields" :key="i">{{item}}</option>
27
+          </select>
28
+        </div>
29
+        <div class="col-md-8 text-left">
30
+          <div class="input-group mb-8">
31
+            <input class="form-control" type="text" @change="filter()" v-model="filter.value" />
32
+            <div class="input-group-append" @click="clearFilter()">
33
+              <span class="input-group-text cursor-pointer" style="color: #60CBEB">
34
+                <b>X</b>
35
+              </span>
36
+            </div>
37
+          </div>
38
+        </div>
39
+      </div>
40
+    </div>
41
+    <div class="container">
42
+      <div class="form-group row">
43
+        <div class="col-md-12" align="right">
44
+          <export-excel
45
+            class="btn btn-b-n"
46
+            :data="list"
47
+            :fields="exportFields"
48
+            type="csv"
49
+            worksheet="My Worksheet"
50
+            name="SearchLog.csv"
51
+          >
52
+            Download
53
+            <eva-icon name="download"></eva-icon>
54
+          </export-excel>
55
+        </div>
56
+      </div>
20 57
     </div>
21 58
     <div class="container">
22 59
       <table class="table table-bordered">
@@ -25,28 +62,19 @@
25 62
             <th>Date</th>
26 63
             <th>Time</th>
27 64
             <th>User</th>
28
-            <th>Keyword</th>
29
-            <th>Sales Type</th>
30
-            <th>Property Usage Type</th>
31
-            <th>Property Type</th>
32
-            <th>Province</th>
33
-            <th>City</th>
34
-            <th>Suburb</th>
65
+            <th>Type</th>
66
+            <th>Field</th>
67
+            <th>Value</th>
35 68
           </tr>
36 69
         </thead>
37 70
         <tbody>
38
-          <tr v-for="(item, i) in propertySearch" :key="i">
71
+          <tr v-for="(item, i) in list" :key="i">
39 72
             <td>{{ formatDate(item.date) }}</td>
40 73
             <td>{{ formatTime(item.date) }}</td>
41
-            <td v-if="item.user">{{ item.user }}</td>
42
-            <td v-else>No User</td>
43
-            <td>{{ item.keyword === 'All' ? '' : item.keyword }}</td>
44
-            <td>{{ item.salesType === 'All' ? '' : item.salesType }}</td>
45
-            <td>{{ item.propertyUsageType === 'All' ? '' : item.propertyUsageType }}</td>
46
-            <td>{{ item.propertyType === 'All' ? '' : item.propertyType }}</td>
47
-            <td>{{ item.province === 'All' ? '' : item.province }}</td>
48
-            <td>{{ item.city === 'All' ? '' : item.city }}</td>
49
-            <td>{{ item.suburb === 'All' ? '' : item.suburb }}</td>
74
+            <td>{{ item.userName }}</td>
75
+            <td>{{ item.type }}</td>
76
+            <td>{{ item.property }}</td>
77
+            <td>{{ item.value }}</td>
50 78
           </tr>
51 79
         </tbody>
52 80
       </table>
@@ -56,7 +84,7 @@
56 84
 </template>
57 85
 
58 86
 <script>
59
-import { mapState, mapActions } from 'vuex';
87
+import { mapState, mapActions, mapGetters } from 'vuex';
60 88
 import moment from 'moment';
61 89
 import Vue from 'vue';
62 90
 import excel from 'vue-excel-export';
@@ -66,10 +94,18 @@ Vue.use(excel);
66 94
 export default {
67 95
   name: 'searchLog',
68 96
   data() {
69
-    return {};
97
+    return {
98
+      exportFields: {
99
+        Date: 'date',
100
+        User: 'userName',
101
+        Type: 'type',
102
+        Field: 'property',
103
+        Value: 'value',
104
+      },
105
+    };
70 106
   },
71 107
   methods: {
72
-    ...mapActions('searchLog', ['getPropertySearchLogs']),
108
+    ...mapActions('searchLog', ['getPropertySearchLogs', 'clearFilter']),
73 109
     formatDate(value) {
74 110
       return moment(String(value)).format('YYYY/MM/DD');
75 111
     },
@@ -81,7 +117,10 @@ export default {
81 117
     this.getPropertySearchLogs();
82 118
   },
83 119
   computed: {
84
-    ...mapState('searchLog', ['propertySearch']),
120
+    ...mapState('searchLog', ['list', 'fields', 'filter']),
121
+    ...mapGetters({
122
+      list: 'searchLog/filterList',
123
+    }),
85 124
   },
86 125
 };
87 126
 </script>

+ 59
- 8
src/components/property/propertySearchFields.vue Просмотреть файл

@@ -10,7 +10,7 @@
10 10
             </span>
11 11
           </div>
12 12
           <select
13
-            class="form-control form-control-lg form-control-a"
13
+            class="form-control"
14 14
             id="forSelector"
15 15
             v-model="propertySearch.salesType"
16 16
             @change="salesTypeSelected"
@@ -29,7 +29,7 @@
29 29
             </span>
30 30
           </div>
31 31
           <select
32
-            class="form-control form-control-lg form-control-a"
32
+            class="form-control"
33 33
             id="forSelector"
34 34
             v-model="resType"
35 35
             @change="PropertyTypeSelected"
@@ -56,7 +56,7 @@
56 56
             </span>
57 57
           </div>
58 58
           <select
59
-            class="form-control form-control-lg form-control-a"
59
+            class="form-control"
60 60
             id="forSelector"
61 61
             v-model="comType"
62 62
             @change="PropertyTypeSelected"
@@ -83,7 +83,7 @@
83 83
             </span>
84 84
           </div>
85 85
           <select
86
-            class="form-control form-control-lg form-control-a"
86
+            class="form-control"
87 87
             id="provinceselector"
88 88
             @change="ProvinceSelected"
89 89
             v-model="propertySearch.province"
@@ -109,7 +109,7 @@
109 109
             </span>
110 110
           </div>
111 111
           <select
112
-            class="form-control form-control-lg form-control-a"
112
+            class="form-control"
113 113
             id="cityselector"
114 114
             @change="CitySelected"
115 115
             v-model="propertySearch.city"
@@ -135,7 +135,7 @@
135 135
             </span>
136 136
           </div>
137 137
           <select
138
-            class="form-control form-control-lg form-control-a"
138
+            class="form-control"
139 139
             id="suburbselector"
140 140
             v-model="propertySearch.suburb"
141 141
             @change="SuburbSeleted"
@@ -151,6 +151,58 @@
151 151
         </div>
152 152
       </div>
153 153
     </div>
154
+    <div class="container text-left">
155
+      <div class="form-group">
156
+        <div class="row">
157
+          <div class="col-md-6 text-left">
158
+            <label>Minimum Price</label>
159
+            <div class="input-group mb-3">
160
+              <div class="input-group-prepend">
161
+                <span class="input-group-text" style="color: #60CBEB">
162
+                  <b>R</b>
163
+                </span>
164
+              </div>
165
+              <input
166
+                class="form-control"
167
+                type="number"
168
+                step="any"
169
+                id="minPrice"
170
+                name="minPrice"
171
+                v-model="propertySearch.minPrice"
172
+              />
173
+              <div class="input-group-append" @click="clearFilter('minPrice')">
174
+                <span class="input-group-text cursor-pointer" style="color: #60CBEB">
175
+                  <b>X</b>
176
+                </span>
177
+              </div>
178
+            </div>
179
+          </div>
180
+          <div class="col-md-6 text-left">
181
+            <label>Maximum Price</label>
182
+            <div class="input-group mb-3">
183
+              <div class="input-group-prepend">
184
+                <span class="input-group-text" style="color: #60CBEB">
185
+                  <b>R</b>
186
+                </span>
187
+              </div>
188
+              <input
189
+                class="form-control"
190
+                type="number"
191
+                step="any"
192
+                id="maxPrice"
193
+                name="maxPrice"
194
+                v-model="propertySearch.maxPrice"
195
+              />
196
+              <div class="input-group-append" @click="clearFilter('maxPrice')">
197
+                <span class="input-group-text cursor-pointer" style="color: #60CBEB">
198
+                  <b>X</b>
199
+                </span>
200
+              </div>
201
+            </div>
202
+          </div>
203
+        </div>
204
+      </div>
205
+    </div>
154 206
   </div>
155 207
 </template>
156 208
 
@@ -171,7 +223,6 @@ export default {
171 223
     this.getProvince();
172 224
     this.getPropertyTypesRes();
173 225
     this.getPropertyTypesCom();
174
-    this.getPropertySearchObject();
175 226
     setTimeout(() => {
176 227
       this.propertySearch.propertyUsageType = this.propertyType;
177 228
     }, 100);
@@ -184,7 +235,7 @@ export default {
184 235
   methods: {
185 236
     ...mapActions('searchTab', ['getProvince', 'getCities', 'getSuburbs']),
186 237
     ...mapActions('property', ['getPropertyTypesRes', 'getPropertyTypesCom']),
187
-    ...mapActions('propertySearch', ['getPropertySearchObject', 'clearFilter']),
238
+    ...mapActions('propertySearch', ['clearFilter']),
188 239
     clearResType() {
189 240
       this.clearFilter('propertyType');
190 241
       this.resType = 'All';

+ 7
- 22
src/components/property/propertySearchPage.vue Просмотреть файл

@@ -145,23 +145,16 @@ export default {
145 145
   },
146 146
   data() {
147 147
     return {
148
-      type: '',
149
-      propertyType: '',
150
-      propertyTypeparam: '',
151
-      province: '',
152
-      city: '',
153
-      suburb: '',
154
-      proptype: '',
155
-      keyword: '',
156 148
       propertySearch: {
157
-        userID: 0,
158
-        keyword: '',
149
+        userName: '',
159 150
         salesType: 'All',
160 151
         propertyUsageType: 'All',
161 152
         propertyType: 'All',
162 153
         province: 'All',
163 154
         city: 'All',
164 155
         suburb: 'All',
156
+        minPrice: 0,
157
+        maxPrice: 0,
165 158
       },
166 159
     };
167 160
   },
@@ -171,22 +164,14 @@ export default {
171 164
   computed: {
172 165
     ...mapState('propertySearch', ['properties']),
173 166
     ParamsChanged() {
174
-      // eslint-disable-next-line vue/no-side-effects-in-computed-properties
175
-      this.propertySearch = {
176
-        userID: 0,
177
-        keyword: '',
178
-        salesType: 'All',
179
-        propertyUsageType: 'All',
180
-        propertyType: 'All',
181
-        province: 'All',
182
-        city: 'All',
183
-        suburb: 'All',
184
-      };
185
-
186 167
       if (Object.keys(this.$route.params).length > 0) {
187 168
         if (this.$route.params.propertyUsageType) {
188 169
           // eslint-disable-next-line vue/no-side-effects-in-computed-properties
189 170
           this.propertySearch.propertyUsageType = this.$route.params.propertyUsageType;
171
+          // eslint-disable-next-line vue/no-side-effects-in-computed-properties
172
+          this.propertySearch.keyword = 'All';
173
+          // eslint-disable-next-line vue/no-side-effects-in-computed-properties
174
+          this.propertySearch.salesType = 'All';
190 175
         }
191 176
       }
192 177
       if (Object.keys(this.$route.query).length > 0) {

+ 14
- 6
src/components/property/propertyeditPage.vue Просмотреть файл

@@ -5,6 +5,14 @@
5 5
       <div class="col-sm-12">
6 6
         <div class="tobuy-img-box">
7 7
           <img
8
+            v-if="propertyType === 'Commercial'"
9
+            src="img/Commercial-Property.jpg"
10
+            alt="Timeshare To Buy"
11
+            class="img-fluid"
12
+            style="width:800px;height:400px; border-radius:10px"
13
+          />
14
+          <img
15
+            v-else
8 16
             src="img/Listing3.2.jpg"
9 17
             alt="Timeshare To Buy"
10 18
             class="img-fluid"
@@ -355,12 +363,12 @@ export default {
355 363
 
356 364
       setTimeout(
357 365
         () => this.$router.push({
358
-          path: '/property/search',
359
-          query: {
360
-            salesType: this.salesType,
361
-            propertyUsageType: this.propertyType,
362
-          },
363
-        }),
366
+            path: '/property/search',
367
+            query: {
368
+              salesType: this.salesType,
369
+              propertyUsageType: this.propertyType,
370
+            },
371
+          }),
364 372
         3000,
365 373
       );
366 374
     },

+ 6
- 12
src/components/shared/searchTab.vue Просмотреть файл

@@ -11,12 +11,7 @@
11 11
           <div class="col-md-12">
12 12
             <div class="form-group" style="text-align:left">
13 13
               <label for="Type">Keyword</label>
14
-              <input
15
-                type="text"
16
-                class="form-control form-control-a"
17
-                placeholder="Keyword"
18
-                v-model="keyword"
19
-              />
14
+              <input type="text" class="form-control" placeholder="Keyword" v-model="keyword" />
20 15
             </div>
21 16
           </div>
22 17
           <div class="col-md-12">
@@ -81,7 +76,7 @@
81 76
                 role="tabpanel"
82 77
                 aria-labelledby="pills-map-tab"
83 78
               >
84
-                <propertySearch propertyType="Commercial" />
79
+                <propertySearch propertyType="Commercial" @updateSearch="updateSearch" />
85 80
               </div>
86 81
             </div>
87 82
           </div>
@@ -95,7 +90,6 @@
95 90
 </template>
96 91
 
97 92
 <script>
98
-import { mapState, mapActions } from 'vuex';
99 93
 import propertySearch from '../property/propertySearchFields.vue';
100 94
 import timeshareSearch from '../timeshare/searchTimeshare.vue';
101 95
 
@@ -109,18 +103,18 @@ export default {
109 103
       selectedPropertyType: 'timeshare',
110 104
       keyword: '',
111 105
       propertySearch: {
112
-        userID: 0,
113
-        keyword: '',
106
+        userName: '',
114 107
         salesType: 'Sale',
115 108
         propertyUsageType: 'All',
116 109
         propertyType: 'All',
117 110
         province: 'All',
118 111
         city: 'All',
119 112
         suburb: 'All',
113
+        minPrice: 0,
114
+        maxPrice: 0,
120 115
       },
121 116
     };
122 117
   },
123
-  computed: {},
124 118
   methods: {
125 119
     updateType(item) {
126 120
       this.selectedPropertyType = item;
@@ -134,11 +128,11 @@ export default {
134 128
       if (this.selectedPropertyType === 'timeshare') {
135 129
         this.$router.push('/timeshare/search/');
136 130
       } else {
131
+        // this.$router.push('/property/search');
137 132
         this.$router.push({
138 133
           path: '/property/search',
139 134
           query: this.propertySearch,
140 135
         });
141
-        // this.$router.push('/property/search');
142 136
       }
143 137
     },
144 138
   },

+ 46
- 6
src/store/modules/logs/searchLog.js Просмотреть файл

@@ -1,24 +1,64 @@
1
-// api/searchLog/property
2 1
 import axios from 'axios';
2
+import _ from 'lodash';
3 3
 
4 4
 export default {
5 5
   namespaced: true,
6 6
   state: {
7
-    propertySearch: {},
7
+    list: [],
8
+    fields: [],
9
+    filter: {
10
+      by: undefined,
11
+      value: undefined,
12
+    },
8 13
   },
9 14
   mutations: {
10 15
     updateSearch(state, data) {
11
-      state.propertySearch = [];
12
-      state.propertySearch = data;
16
+      state.list = [];
17
+      state.fields = [];
18
+      state.list = data;
19
+      data.forEach((item) => {
20
+        state.fields.push(item.property);
21
+      });
22
+      state.fields = state.fields.filter((x, i, a) => a.indexOf(x) === i);
23
+    },
24
+    onClearFilter(state) {
25
+      state.filter = {
26
+        by: undefined,
27
+        value: undefined,
28
+      };
29
+    },
30
+  },
31
+  getters: {
32
+    filterList: (state) => {
33
+      let lst = state.list;
34
+      const { filter } = state;
35
+      if (filter) {
36
+        if (filter.by) {
37
+          lst = _.filter(lst, x => x.property === filter.by);
38
+          if (filter.value) {
39
+            lst = _.filter(lst, x => x.value.toUpperCase().includes(filter.value.toUpperCase()));
40
+          }
41
+        } else if (filter.value) {
42
+          lst = _.filter(
43
+            lst,
44
+            x => x.value.toUpperCase().includes(filter.value.toUpperCase())
45
+              || x.userName.toUpperCase().includes(filter.value.toUpperCase())
46
+              || x.type.toUpperCase().includes(filter.value.toUpperCase()),
47
+          );
48
+        }
49
+      }
50
+      return lst;
13 51
     },
14 52
   },
15
-  getters: {},
16 53
   actions: {
17 54
     getPropertySearchLogs({ commit }) {
18 55
       axios
19
-        .get('/api/searchLog/property')
56
+        .get('/api/searchLog')
20 57
         .then(result => commit('updateSearch', result.data))
21 58
         .catch(console.error);
22 59
     },
60
+    clearFilter({ commit }) {
61
+      commit('onClearFilter');
62
+    },
23 63
   },
24 64
 };

+ 69
- 6
src/store/modules/property/propertySearch.js Просмотреть файл

@@ -1,17 +1,21 @@
1
+/* eslint-disable max-len */
2
+/* eslint-disable indent */
1 3
 import axios from 'axios';
4
+import _ from 'lodash';
2 5
 
3 6
 export default {
4 7
   namespaced: true,
5 8
   state: {
6 9
     propertySearch: {
7
-      userID: 0,
8
-      keyword: '',
10
+      userName: '',
9 11
       salesType: 'Sale',
10 12
       propertyUsageType: 'All',
11 13
       propertyType: 'All',
12 14
       province: 'All',
13 15
       city: 'All',
14 16
       suburb: 'All',
17
+      minPrice: 0,
18
+      maxPrice: 0,
15 19
     },
16 20
     properties: [],
17 21
     latestProperties: [],
@@ -31,21 +35,77 @@ export default {
31 35
       state.propertySearch[filter] = 'All';
32 36
     },
33 37
   },
34
-  getters: {},
38
+  // getters: {
39
+  //   filterProperties: (state) => {
40
+  //     let list = state.properties;
41
+  //     const { propertySearch } = state;
42
+  //     if (propertySearch) {
43
+  //       if (propertySearch.salesType === 'Sale') {
44
+  //         list = _.filter(list, x => x.isSale);
45
+  //       } else {
46
+  //         list = _.filter(list, x => !x.isSale);
47
+  //       }
48
+  //       if (propertySearch.propertyUsageType && propertySearch.propertyUsageType !== 'All') {
49
+  //         list = _.filter(list, x => x.propertyUsageType
50
+  //             .toUpperCase()
51
+  //             // eslint-disable-next-line comma-dangle
52
+  //             .includes(propertySearch.propertyUsageType.toUpperCase()));
53
+  //       }
54
+  //       if (propertySearch.propertyType && propertySearch.propertyType !== 'All') {
55
+  //         list = _.filter(list, x => x.propertyType
56
+  //             .toUpperCase()
57
+  //             // eslint-disable-next-line comma-dangle
58
+  //             .includes(propertySearch.propertyType.toUpperCase()));
59
+  //       }
60
+  //       if (propertySearch.province && propertySearch.province !== 'All') {
61
+  //         list = _.filter(list, x => x.province
62
+  //             .toUpperCase()
63
+  //             // eslint-disable-next-line comma-dangle
64
+  //             .includes(propertySearch.province.toUpperCase()));
65
+  //       }
66
+  //       if (propertySearch.city && propertySearch.city !== 'All') {
67
+  //         list = _.filter(list, x => x.city
68
+  //             .toUpperCase()
69
+  //             // eslint-disable-next-line comma-dangle
70
+  //             .includes(propertySearch.city.toUpperCase()));
71
+  //       }
72
+  //       if (propertySearch.suburb && propertySearch.suburb !== 'All') {
73
+  //         list = _.filter(list, x => x.suburb
74
+  //             .toUpperCase()
75
+  //             // eslint-disable-next-line comma-dangle
76
+  //             .includes(propertySearch.suburb.toUpperCase()));
77
+  //       }
78
+  //       if (propertySearch.suburb && propertySearch.suburb !== 'All') {
79
+  //         list = _.filter(list, x => x.suburb
80
+  //             .toUpperCase()
81
+  //             // eslint-disable-next-line comma-dangle
82
+  //             .includes(propertySearch.suburb.toUpperCase()));
83
+  //       }
84
+  //       if (propertySearch.minPrice) {
85
+  //         list = _.filter(list, x => x.price >= propertySearch.minPrice);
86
+  //       }
87
+  //       if (propertySearch.maxPrice) {
88
+  //         list = _.filter(list, x => x.price <= propertySearch.maxPrice);
89
+  //       }
90
+  //     }
91
+  //     return list;
92
+  //   },
93
+  // },
35 94
   actions: {
36 95
     clearFilter({ commit }, filter) {
37 96
       commit('onClearFilter', filter);
38 97
     },
39 98
     getPropertySearchObject({ commit }) {
40 99
       const search = {
41
-        userID: 0,
42
-        keyword: 'All',
100
+        userName: '',
43 101
         salesType: 'Sale',
44 102
         propertyUsageType: 'All',
45 103
         propertyType: 'All',
46 104
         province: 'All',
47 105
         city: 'All',
48 106
         suburb: 'All',
107
+        minPrice: 0,
108
+        maxPrice: 0,
49 109
       };
50 110
       commit('setPropertySearch', search);
51 111
     },
@@ -53,9 +113,12 @@ export default {
53 113
       if (item.keyword === '') {
54 114
         item.keyword = 'All';
55 115
       }
116
+      if (item.userName === '') {
117
+        item.userName = 'Unknown';
118
+      }
56 119
       axios
57 120
         .get(
58
-          `/api/Property/Search/${item.userID}/${item.keyword}/${item.salesType}/${item.propertyUsageType}/${item.propertyType}/${item.province}/${item.city}/${item.suburb}`,
121
+          `/api/Property/Search/${item.userName}/${item.keyword}/${item.salesType}/${item.propertyUsageType}/${item.propertyType}/${item.province}/${item.city}/${item.suburb}/${item.minPrice}/${item.maxPrice}`,
59 122
         )
60 123
         .then(result => commit('updateSearch', result.data))
61 124
         .catch(console.error);

Загрузка…
Отмена
Сохранить