|
@@ -1,112 +1,225 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div>
|
3
|
|
- <x-field label="户型">
|
4
|
|
- {{roomType}}
|
|
3
|
+ <x-field label="楼层">
|
|
4
|
+ {{ floor }}
|
|
5
|
+ </x-field>
|
|
6
|
+
|
|
7
|
+ <x-field label="居住现状">
|
|
8
|
+ {{ getDictLabel(roomInfo.liveStatus, "liveStatus") }}
|
5
|
9
|
</x-field>
|
6
|
10
|
|
7
|
11
|
<x-field label="朝向">
|
8
|
|
- {{getDictLabel(roomInfo.aspect, 'aspect')}}
|
|
12
|
+ {{ getDictLabel(roomInfo.aspect, "aspect") }}
|
9
|
13
|
</x-field>
|
10
|
14
|
|
11
|
|
- <x-field label="装修">
|
12
|
|
- {{getDictLabel(roomInfo.decoration, 'decoration')}}
|
|
15
|
+ <x-field label="卧室">
|
|
16
|
+ {{ getDictLabel(roomInfo.livingRoom, "liveRoom") }}
|
13
|
17
|
</x-field>
|
14
|
18
|
|
15
|
|
- <x-field label="房屋用途">
|
16
|
|
- {{getDictLabel(roomInfo.purpose, 'purpose')}}
|
|
19
|
+ <x-field label="性别限制">
|
|
20
|
+ {{ getDictLabel(roomInfo.limitSex, "limitSex") }}
|
|
21
|
+ </x-field>
|
|
22
|
+
|
|
23
|
+ <x-field label="房屋特色">
|
|
24
|
+ {{ getDictLabel(roomInfo.roomSpecial, "roomSpecial") }}
|
|
25
|
+ </x-field>
|
|
26
|
+
|
|
27
|
+ <x-field label="梯户比例">
|
|
28
|
+ {{ proportion }}
|
17
|
29
|
</x-field>
|
18
|
30
|
|
19
|
31
|
<x-field label="建筑类型">
|
20
|
|
- {{getDictLabel(roomInfo.buildType, 'build_type')}}
|
|
32
|
+ {{ getDictLabel(roomInfo.buildType, "build_type") }}
|
21
|
33
|
</x-field>
|
22
|
34
|
|
23
|
|
- <x-field label="配备电梯">
|
24
|
|
- {{getDictLabel(roomInfo.elevator, 'elevator')}}
|
|
35
|
+ <x-field label="房屋用途">
|
|
36
|
+ {{ getDictLabel(roomInfo.purpose, "purpose") }}
|
25
|
37
|
</x-field>
|
26
|
38
|
|
27
|
39
|
<x-field label="抵押信息">
|
28
|
|
- {{getDictLabel(roomInfo.isMortgage, 'mortgage') || '无'}}
|
|
40
|
+ {{ getDictLabel(roomInfo.isMortgage, "mortgage") || "无" }}
|
|
41
|
+ </x-field>
|
|
42
|
+
|
|
43
|
+ <x-field label="建成年代">
|
|
44
|
+ {{ roomInfo.buildYear }}
|
|
45
|
+ </x-field>
|
|
46
|
+
|
|
47
|
+ <x-field label="配备电梯">
|
|
48
|
+ {{ getDictLabel(roomInfo.elevator, "elevator") }}
|
|
49
|
+ </x-field>
|
|
50
|
+
|
|
51
|
+ <x-field label="车位">
|
|
52
|
+ {{ getDictLabel(roomInfo.parking, "parking") }}
|
|
53
|
+ </x-field>
|
|
54
|
+
|
|
55
|
+ <x-field label="地下室">
|
|
56
|
+ {{ getDictLabel(roomInfo.buildTime, "build_time") }}
|
|
57
|
+ </x-field>
|
|
58
|
+
|
|
59
|
+ <x-field label="物业费">
|
|
60
|
+ {{building.propertyPrice}} 元/m²/月
|
29
|
61
|
</x-field>
|
30
|
62
|
|
31
|
|
- <x-field label="税费">
|
32
|
|
- {{getDictLabel(roomInfo.buildTime, 'build_time') || '未知'}}
|
|
63
|
+
|
|
64
|
+<x-field label="燃气管道">
|
|
65
|
+ {{ getDictLabel(roomInfo.gas, "gas") }}
|
33
|
66
|
</x-field>
|
34
|
67
|
|
|
68
|
+ <x-field label="家电">
|
|
69
|
+ {{ getDictLabel(roomInfo.electricEquipment, "electricEquipment") }}
|
|
70
|
+ </x-field>
|
|
71
|
+
|
|
72
|
+ <x-field label="隔断">
|
|
73
|
+ {{ getDictLabel(roomInfo.separate, "separate") }}
|
|
74
|
+ </x-field>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
35
|
78
|
<x-field label="来源">
|
36
|
|
- {{getDictLabel(roomInfo.sourceFrom, 'sourceFrom')}}
|
|
79
|
+ {{ getDictLabel(roomInfo.sourceFrom, "sourceFrom") }}
|
37
|
80
|
</x-field>
|
38
|
81
|
|
|
82
|
+ <x-field label="优势推荐">
|
|
83
|
+ {{ roomInfo.specialDesc }}
|
|
84
|
+ </x-field>
|
|
85
|
+
|
39
|
86
|
</div>
|
40
|
87
|
</template>
|
41
|
88
|
|
42
|
89
|
<script>
|
43
|
|
-import { computed } from 'vue'
|
44
|
|
-import { useModel } from '@zjxpcyc/vue-tiny-store'
|
|
90
|
+import { computed } from "vue";
|
|
91
|
+import { useModel } from "@zjxpcyc/vue-tiny-store";
|
45
|
92
|
|
46
|
93
|
export default {
|
47
|
94
|
props: {
|
48
|
95
|
roomInfo: {
|
49
|
96
|
type: Object,
|
50
|
|
- default: () => ({})
|
51
|
|
- }
|
|
97
|
+ default: () => ({}),
|
|
98
|
+ },
|
|
99
|
+ building: {
|
|
100
|
+ type: Object,
|
|
101
|
+ default: () => ({}),
|
|
102
|
+ },
|
52
|
103
|
},
|
53
|
104
|
setup(props) {
|
54
|
|
- const { dicts, getDict } = useModel('dicts')
|
|
105
|
+ const { dicts, getDict } = useModel("dicts");
|
55
|
106
|
|
56
|
107
|
// 朝向
|
57
|
108
|
if (!dicts.aspect || !dicts.aspect.length) {
|
58
|
|
- getDict('aspect')
|
|
109
|
+ getDict("aspect");
|
59
|
110
|
}
|
60
|
111
|
|
61
|
112
|
// 装修
|
62
|
113
|
if (!dicts.decoration || !dicts.decoration.length) {
|
63
|
|
- getDict('decoration')
|
|
114
|
+ getDict("decoration");
|
64
|
115
|
}
|
65
|
116
|
|
66
|
117
|
// 房屋用途
|
67
|
118
|
if (!dicts.purpose || !dicts.purpose.length) {
|
68
|
|
- getDict('purpose')
|
|
119
|
+ getDict("purpose");
|
69
|
120
|
}
|
70
|
121
|
|
71
|
122
|
// 建筑类型
|
72
|
|
- if (!dicts['build_type'] || !dicts['build_type'].length) {
|
73
|
|
- getDict('build_type')
|
|
123
|
+ if (!dicts["build_type"] || !dicts["build_type"].length) {
|
|
124
|
+ getDict("build_type");
|
74
|
125
|
}
|
75
|
126
|
|
76
|
127
|
// 电梯
|
77
|
128
|
if (!dicts.elevator || !dicts.elevator.length) {
|
78
|
|
- getDict('elevator')
|
|
129
|
+ getDict("elevator");
|
79
|
130
|
}
|
80
|
131
|
|
81
|
132
|
// 抵押信息
|
82
|
133
|
if (!dicts.mortgage || !dicts.mortgage.length) {
|
83
|
|
- getDict('mortgage')
|
|
134
|
+ getDict("mortgage");
|
84
|
135
|
}
|
85
|
136
|
|
86
|
137
|
// 税费
|
87
|
|
- if (!dicts['build_time'] || !dicts['build_time'].length) {
|
88
|
|
- getDict('build_time')
|
|
138
|
+ if (!dicts["build_time"] || !dicts["build_time"].length) {
|
|
139
|
+ getDict("build_time");
|
89
|
140
|
}
|
90
|
141
|
|
91
|
142
|
// 来源
|
92
|
143
|
if (!dicts.sourceFrom || !dicts.sourceFrom.length) {
|
93
|
|
- getDict('sourceFrom')
|
|
144
|
+ getDict("sourceFrom");
|
|
145
|
+ }
|
|
146
|
+
|
|
147
|
+ //居住现状
|
|
148
|
+ if (!dicts.liveStatus || !dicts.liveStatus.length) {
|
|
149
|
+ getDict("liveStatus");
|
94
|
150
|
}
|
95
|
151
|
|
|
152
|
+ // 性别限制
|
|
153
|
+ if (!dicts.limitSex || !dicts.limitSex.length) {
|
|
154
|
+ getDict("limitSex");
|
|
155
|
+ }
|
|
156
|
+
|
|
157
|
+ //卧室
|
|
158
|
+ if (!dicts.liveRoom || !dicts.liveRoom.length) {
|
|
159
|
+ getDict("liveRoom");
|
|
160
|
+ }
|
|
161
|
+ // 房屋特色
|
|
162
|
+ if (!dicts.roomSpecial || !dicts.roomSpecial.length) {
|
|
163
|
+ getDict("roomSpecial");
|
|
164
|
+ }
|
|
165
|
+
|
|
166
|
+ //车位
|
|
167
|
+ if (!dicts.parking || !dicts.parking.length) {
|
|
168
|
+ getDict("parking");
|
|
169
|
+ }
|
|
170
|
+
|
|
171
|
+// 地下室
|
|
172
|
+ if (!dicts.build_time || !dicts.build_time.length) {
|
|
173
|
+ getDict("build_time");
|
|
174
|
+ }
|
|
175
|
+// 物业费
|
|
176
|
+ if (!dicts.basement || !dicts.basement.length) {
|
|
177
|
+ getDict("basement");
|
|
178
|
+ }
|
|
179
|
+
|
|
180
|
+ // 燃气管道
|
|
181
|
+ if (!dicts.gas || !dicts.gas.length) {
|
|
182
|
+ getDict("gas");
|
|
183
|
+ }
|
|
184
|
+
|
|
185
|
+// 家电
|
|
186
|
+ if (!dicts.electricEquipment || !dicts.electricEquipment.length) {
|
|
187
|
+ getDict("electricEquipment");
|
|
188
|
+ }
|
|
189
|
+
|
|
190
|
+// 隔断
|
|
191
|
+ if (!dicts.separate || !dicts.separate.length) {
|
|
192
|
+ getDict("separate");
|
|
193
|
+ }
|
|
194
|
+
|
|
195
|
+
|
96
|
196
|
const roomType = computed(() => {
|
97
|
|
- const [a, b, c, d] = (props.roomInfo.roomType || '').split(',')
|
98
|
|
- return `${a || ''}室 ${b || '0'}厅 ${c || '0'}厨 ${d || '0'}卫`
|
99
|
|
- })
|
|
197
|
+ const [a, b, c, d] = (props.roomInfo.roomType || "").split(",");
|
|
198
|
+ return `${a || ""}室 ${b || "0"}厅 ${c || "0"}厨 ${d || "0"}卫`;
|
|
199
|
+ });
|
|
200
|
+
|
|
201
|
+ const floor = computed(() => {
|
|
202
|
+ const [a, b, c] = (props.roomInfo.roomFloor || "").split(",");
|
|
203
|
+ return `${a || ""}/${b || ""}(${c || ""})`;
|
|
204
|
+ });
|
|
205
|
+
|
|
206
|
+ // 梯户比例
|
|
207
|
+ const proportion = computed(() => {
|
|
208
|
+ const [a, b] = (props.roomInfo.proportion || "").split(",");
|
|
209
|
+ return `${a || ""}梯${b || ""}户`;
|
|
210
|
+ });
|
100
|
211
|
|
101
|
212
|
// 获取字典对应名称
|
102
|
213
|
const getDictLabel = (val, key) => {
|
103
|
|
- return dicts[key]?.filter(x => x.code === val)[0]?.name
|
104
|
|
- }
|
|
214
|
+ return dicts[key]?.filter((x) => x.value === val)[0]?.text;
|
|
215
|
+ };
|
105
|
216
|
|
106
|
217
|
return {
|
|
218
|
+ floor,
|
107
|
219
|
roomType,
|
|
220
|
+ proportion,
|
108
|
221
|
getDictLabel,
|
109
|
|
- }
|
110
|
|
- }
|
111
|
|
-}
|
|
222
|
+ };
|
|
223
|
+ },
|
|
224
|
+};
|
112
|
225
|
</script>
|