|
@@ -3,7 +3,7 @@
|
3
|
3
|
<!-- xId='room.view' -->
|
4
|
4
|
<x-loading x-id="room.view" tip="正在加载详情">
|
5
|
5
|
<div>
|
6
|
|
- <Swiper></Swiper>
|
|
6
|
+ <Swiper :images="imageList"></Swiper>
|
7
|
7
|
</div>
|
8
|
8
|
|
9
|
9
|
<div class="title">
|
|
@@ -92,7 +92,7 @@
|
92
|
92
|
<script>
|
93
|
93
|
import { ref, onMounted, computed } from "vue";
|
94
|
94
|
import { useRouter } from "vue-router";
|
95
|
|
-import { Swiper } from "../../../components/detailCompents";
|
|
95
|
+import { Swiper } from "@/components/detailCompents";
|
96
|
96
|
import {
|
97
|
97
|
Icon,
|
98
|
98
|
Popover,
|
|
@@ -170,55 +170,14 @@ export default {
|
170
|
170
|
getDetail,
|
171
|
171
|
} = useModel("room")
|
172
|
172
|
|
|
173
|
+ const imageList = computed(() => {
|
|
174
|
+ return (detail.RoomResc || []).filter(x => x.imgType !== '0').map(x => ({image: x.url, text: ''}))
|
|
175
|
+ })
|
|
176
|
+
|
173
|
177
|
onMounted(() => {
|
174
|
178
|
getDetail(roomId);
|
175
|
179
|
});
|
176
|
180
|
|
177
|
|
- // 通过 actions 属性来定义菜单选项
|
178
|
|
- const actions = [
|
179
|
|
- { text: "设置房源保护", value: "1" },
|
180
|
|
- { text: "新增业主电话", value: "2" },
|
181
|
|
- { text: "下架房源", value: "3" },
|
182
|
|
- { text: "修改房源", value: "4" },
|
183
|
|
- { text: "分享房源", value: "5" },
|
184
|
|
- { text: "房源实勘", value: "6" },
|
185
|
|
- ];
|
186
|
|
- // 设为房源保护后,只有录入人、同部门的上级以及上级部门的上级可以看到房源敏感信息。
|
187
|
|
- const onSelect = (action) => {
|
188
|
|
- console.log(action);
|
189
|
|
- if (action.value == 1) {
|
190
|
|
- // 设置房源保护
|
191
|
|
- Dialog.confirm({
|
192
|
|
- title: "提示",
|
193
|
|
- message:
|
194
|
|
- "设为房源保护后,只有录入人、同部门的上级以及上级部门的上级可以看到房源敏感信息。",
|
195
|
|
- theme: "round-button",
|
196
|
|
- })
|
197
|
|
- .then(() => {
|
198
|
|
- // on close
|
199
|
|
- })
|
200
|
|
- .catch(() => {
|
201
|
|
- // on cancel
|
202
|
|
- });
|
203
|
|
- } else if (action.value == 2) {
|
204
|
|
- // 新增业主电话
|
205
|
|
- phoneShow.value = true;
|
206
|
|
- } else if (action.value == 3) {
|
207
|
|
- // 下架房源
|
208
|
|
-
|
209
|
|
- router.push("/closehouse");
|
210
|
|
- } else if (action.value == 4) {
|
211
|
|
- // 修改房源
|
212
|
|
- router.push("/editsecondhandhouse");
|
213
|
|
- } else if (action.value == 5) {
|
214
|
|
- // 分享房源
|
215
|
|
- showShare.value = true;
|
216
|
|
- } else if (action.value == 6) {
|
217
|
|
- // 房源实勘
|
218
|
|
- router.push("/resc");
|
219
|
|
- }
|
220
|
|
- };
|
221
|
|
-
|
222
|
181
|
const shareOptions = [
|
223
|
182
|
{ name: "微信", icon: "wechat" },
|
224
|
183
|
{ name: "微博", icon: "weibo" },
|
|
@@ -243,8 +202,7 @@ export default {
|
243
|
202
|
|
244
|
203
|
return {
|
245
|
204
|
phone,
|
246
|
|
- actions,
|
247
|
|
- onSelect,
|
|
205
|
+ imageList,
|
248
|
206
|
showPopover,
|
249
|
207
|
showShare,
|
250
|
208
|
phoneShow,
|