张延森 4 lat temu
rodzic
commit
1edb36a998

+ 32
- 0
src/components/GSection/index.vue Wyświetl plik

@@ -0,0 +1,32 @@
1
+<template>
2
+  <div class="g-section">
3
+    <h2 class="g-section-title">{{title}}</h2>
4
+    <slot></slot>
5
+  </div>
6
+</template>
7
+
8
+<script>
9
+export default {
10
+  props: {
11
+    title: String,
12
+  },
13
+  setup() {
14
+    
15
+  }
16
+}
17
+</script>
18
+
19
+<style lang="less">
20
+.g-section {
21
+  width: 100%;
22
+
23
+  &-title {
24
+    margin: 0;
25
+    padding: 1.5em 1em 1em;
26
+    color: rgba(69, 90, 100, 0.6);
27
+    font-size: 1em;
28
+    font-weight: 500;
29
+    line-height: 1.2em;
30
+  }
31
+}
32
+</style>

+ 2
- 0
src/main.js Wyświetl plik

@@ -6,6 +6,7 @@ import store from './store'
6 6
 import 'vant/lib/index.css';
7 7
 
8 8
 import { Notify, Dialog } from 'vant'
9
+import GSection from './components/GSection'
9 10
 import Shiro from './components/Shiro'
10 11
 import XLoading from './components/XLoading'
11 12
 import XField from './components/XField'
@@ -18,6 +19,7 @@ app.use(shiro);
18 19
 
19 20
 app.component(Notify.Component.name, Notify.Component)
20 21
 app.component(Dialog.Component.name, Dialog.Component)
22
+app.component('g-section', GSection)
21 23
 app.component('x-loading', XLoading)
22 24
 app.component('x-field', XField)
23 25
 app.component('shiro', Shiro)

+ 10
- 0
src/store/models/room.js Wyświetl plik

@@ -162,6 +162,15 @@ export default () => {
162 162
     })
163 163
   }
164 164
 
165
+  // 实勘列表
166
+  const getRescList = roomId => {
167
+    return request({
168
+      url: '/room/resc/list',
169
+      params: { roomId },
170
+      loadingId: 'room.resc.list',
171
+    })
172
+  }
173
+
165 174
 
166 175
   return {
167 176
     list,
@@ -181,5 +190,6 @@ export default () => {
181 190
     getBuilding,
182 191
     closeHouse,
183 192
     houseEdit,
193
+    getRescList,
184 194
   }
185 195
 }

+ 90
- 65
src/view/resc/index.vue Wyświetl plik

@@ -1,83 +1,105 @@
1 1
 <template>
2
-  <div class="resc ">
3
-    <div class="resc-top van-hairline--bottom">
4
-      <van-row>
5
-        <van-col span="12">
6
-          <p>门牌</p>
7
-          <van-uploader
8
-            v-model="houseNumberImg"
9
-            max-count="1"
10
-            :after-read="afterRead"
11
-          />
12
-        </van-col>
13
-        <van-col span="12">
14
-          <p>户型</p>
15
-          <van-uploader
16
-            v-model="houseNumberImg"
17
-            max-count="1"
18
-            :after-read="afterRead"
19
-          />
20
-        </van-col>
21
-      </van-row>
22
-    </div>
23
-    <div class="resc-top van-hairline--bottom">
24
-      <p>客厅</p>
25
-      <van-uploader v-model="houseNumberImg" :after-read="afterRead" />
26
-    </div>
27
-    <div class="resc-top van-hairline--bottom">
28
-      <p>卧室</p>
29
-      <van-uploader v-model="houseNumberImg" :after-read="afterRead" />
30
-    </div>
31
-    <div class="resc-top van-hairline--bottom">
32
-      <p>厨房</p>
33
-      <van-uploader v-model="houseNumberImg" :after-read="afterRead" />
34
-    </div>
35
-    <div class="resc-top van-hairline--bottom">
36
-      <p>卫生间</p>
37
-      <van-uploader v-model="houseNumberImg" :after-read="afterRead" />
38
-    </div>
39
-    <div class=" resc-top van-hairline--bottom">
40
-      <p>其他</p>
41
-      <van-uploader v-model="houseNumberImg" :after-read="afterRead" />
42
-    </div>
43
-    <div class=" resc-top van-hairline--bottom">
44
-      <van-button color="rgb(215, 105, 58)" round type="primary"
45
-      style="border-radius:5px"
46
-        >保存审核并提交</van-button
47
-      >
2
+  <x-loading x-id="room.resc.list">
3
+    <div class="resc">
4
+      <div class="mgtp" v-if="initData.limitFlag === 'rescLimit' && initData.rescStatus === '9'">
5
+        <p>房源录入后4小时内仅允许房源录入人上传图片,目前尚无权限上传实勘图</p>
6
+      </div>
7
+      <div class="mgtp" v-if="initData.rescStatus === '1'">
8
+        <p>当前实勘图正在审核中</p>
9
+      </div>
10
+      <div class="mgtp" v-if="initData.rescStatus === '0'">
11
+        <x-field label="实勘人">{{initData.rescUser}}</x-field>
12
+        <x-field label="达成时间">{{initData.rescTime}}</x-field>
13
+      </div>
14
+
15
+      <g-section title="门牌">
16
+        <van-uploader
17
+          v-model="houseNumberImg"
18
+          max-count="1"
19
+          :after-read="afterRead"
20
+        />
21
+      </g-section>
22
+
23
+      <g-section title="户型">
24
+        <van-uploader
25
+          v-model="houseNumberImg"
26
+          max-count="1"
27
+          :after-read="afterRead"
28
+        />
29
+      </g-section>
30
+
31
+      <g-section title="客厅">
32
+        <van-uploader
33
+          v-model="houseNumberImg"
34
+          :after-read="afterRead"
35
+        />
36
+      </g-section>
37
+
38
+      <g-section title="卧室">
39
+        <van-uploader
40
+          v-model="houseNumberImg"
41
+          :after-read="afterRead"
42
+        />
43
+      </g-section>
44
+
45
+      <g-section title="厨房">
46
+        <van-uploader
47
+          v-model="houseNumberImg"
48
+          :after-read="afterRead"
49
+        />
50
+      </g-section>
51
+
52
+      <g-section title="卫生间">
53
+        <van-uploader
54
+          v-model="houseNumberImg"
55
+          :after-read="afterRead"
56
+        />
57
+      </g-section>
58
+
59
+      <g-section title="其他">
60
+        <van-uploader
61
+          v-model="houseNumberImg"
62
+          :after-read="afterRead"
63
+        />
64
+      </g-section>
65
+
66
+      <div style="margin-top: 2em">
67
+        <van-button block type="warning">
68
+          保存审核并提交
69
+        </van-button>
70
+      </div>
48 71
     </div>
49
-  </div>
72
+  </x-loading>
50 73
 </template>
51 74
 
52 75
 <script>
53 76
 import { ref } from "vue";
77
+import { useRoute } from 'vue-router'
78
+import { useModel } from '@zjxpcyc/vue-tiny-store'
54 79
 //
55 80
 import {
56 81
   Uploader,
57
-  Row,
58
-  Col,
59 82
   Button,
60
-
61
-  //   Dialog,
62
-} from "vant";
63
-
64
-// import { router } from "../../../router";
83
+} from "vant"
84
+import { showDanger } from '@/utils';
65 85
 
66 86
 export default {
67
-  name: "secondhanddetail",
68 87
   components: {
69
-    [Row.name]: Row,
70
-    [Col.name]: Col,
71
-
72 88
     [Uploader.name]: Uploader,
73 89
     [Button.name]: Button,
74 90
   },
75
-  data() {
76
-    return {};
77
-  },
78 91
 
79 92
   setup() {
80
-    const houseNumberImg = ref([]);
93
+    const initData = ref({})
94
+    const route = useRoute()
95
+
96
+    const { getRescList } = useModel('room')
97
+
98
+    getRescList(route.query.roomId).then(res => {
99
+      initData.value = res
100
+    }).catch(e => {
101
+      showDanger(e.message)
102
+    })
81 103
 
82 104
     const fileList = ref([
83 105
       { url: "https://img.yzcdn.cn/vant/leaf.jpg" },
@@ -92,7 +114,7 @@ export default {
92 114
     };
93 115
 
94 116
     return {
95
-      houseNumberImg,
117
+      initData,
96 118
       fileList,
97 119
       afterRead,
98 120
     };
@@ -103,8 +125,11 @@ export default {
103 125
 <!-- Add "scoped" attribute to limit CSS to this component only -->
104 126
 <style lang="less" scoped>
105 127
 .resc {
106
-  &-top {
107
-    padding: 20px;
128
+  background: #fff;
129
+  padding: 1em;
130
+
131
+  .mgtp {
132
+    margin-top: 1em;
108 133
   }
109 134
 }
110 135
 </style>

+ 1
- 1
src/view/secondhand/detail/components/Main.vue Wyświetl plik

@@ -5,7 +5,7 @@
5 5
     </x-field>
6 6
     
7 7
     <x-field label="所属楼盘">
8
-      {{roomInfo.buildingName}}
8
+      {{otherData.building.buildingName}}
9 9
     </x-field>
10 10
     
11 11
     <x-field label="所属区县">

+ 7
- 0
src/view/secondhand/detail/components/MoreActions.vue Wyświetl plik

@@ -46,6 +46,13 @@
46 46
           @click="$router.push({name: 'secondhand.edit', query: {roomId: roomInfo.id}})"
47 47
         />
48 48
 
49
+        <van-cell
50
+          v-shiro="'room:info'"
51
+          title="房源实勘"
52
+          icon="photograph"
53
+          @click="$router.push({name: 'resc', query: {roomId: roomInfo.id}})"
54
+        />
55
+        
49 56
         <van-cell
50 57
           v-shiro="'room:info:share'"
51 58
           title="分享房源"

+ 3
- 3
src/view/secondhand/detail/index.vue Wyświetl plik

@@ -168,7 +168,6 @@ export default {
168 168
     const {
169 169
       detail,
170 170
       getDetail,
171
-      updateProtection,
172 171
     } = useModel("room")
173 172
 
174 173
     onMounted(() => {
@@ -236,8 +235,9 @@ export default {
236 235
     const roomOtherData = computed(() => {
237 236
       return {
238 237
         leftSecurityNum: detail.leftSecurityNum,
239
-        roomCity: {},
240
-        roomBusi: {}
238
+        roomCity: detail.roomCity || {},
239
+        roomBusi: detail.roomBusiness || {},
240
+        building: detail.building || {},
241 241
       }
242 242
     })
243 243