张延森 il y a 4 ans
Parent
révision
0f4efba45e

+ 11
- 0
jsconfig.json Voir le fichier

1
+{
2
+  "compilerOptions": {
3
+     "target": "es2017",
4
+     "allowSyntheticDefaultImports": false,
5
+      "baseUrl": "./",
6
+      "paths": {
7
+          "@/*": ["src/*"]
8
+     }
9
+  },
10
+  "exclude": ["node_modules", "dist"]
11
+}

+ 3
- 1
package.json Voir le fichier

39
     "parserOptions": {
39
     "parserOptions": {
40
       "parser": "babel-eslint"
40
       "parser": "babel-eslint"
41
     },
41
     },
42
-    "rules": {}
42
+    "rules": {
43
+      "no-unused-vars": "warn"
44
+    }
43
   },
45
   },
44
   "browserslist": [
46
   "browserslist": [
45
     "> 1%",
47
     "> 1%",

+ 5
- 7
src/components/Shiro/index.vue Voir le fichier

1
 <template>
1
 <template>
2
-    <template v-if="!show">
3
-      <span style="display: inline-block" v-if="error">{{error}}</span>
4
-      <slot name="callback"></slot>
5
-    </template>
6
-    <slot v-else></slot>
2
+  <template v-if="!show">
3
+    <span style="display: inline-block" v-if="error">{{error}}</span>
4
+    <slot name="callback"></slot>
5
+  </template>
6
+  <slot v-else></slot>
7
 </template>
7
 </template>
8
 
8
 
9
 <script>
9
 <script>
22
     const show = computed(() => {
22
     const show = computed(() => {
23
       const permission = permissions[props.name]
23
       const permission = permissions[props.name]
24
       if (typeof permission !== 'boolean') {
24
       if (typeof permission !== 'boolean') {
25
-        // return await getPermission(props.name)
26
         getPermission(props.name)
25
         getPermission(props.name)
27
-        return false
28
       }
26
       }
29
 
27
 
30
       return permission
28
       return permission

+ 2
- 0
src/components/XLoading/index.vue Voir le fichier

55
       display: flex;
55
       display: flex;
56
       justify-content: center;
56
       justify-content: center;
57
       align-items: center;
57
       align-items: center;
58
+      height: 100%;
59
+      max-height: 100vh;
58
     }
60
     }
59
   }
61
   }
60
 }
62
 }

+ 15
- 0
src/components/contextC/Item.vue Voir le fichier

1
+<template>
2
+
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  props: {
8
+    item: Object
9
+  },
10
+
11
+  setup(props) {
12
+    
13
+  }
14
+}
15
+</script>

+ 19
- 41
src/components/contextC/index.vue Voir le fichier

1
 <template>
1
 <template>
2
-  <div class="contextc">
3
-    <van-row>
4
-      <van-col
5
-        v-for="(item, index) in options"
6
-        :key="index"
7
-        :span="item.span || 12"
8
-        class="contextc-text"
9
-      >
10
-        <div>
11
-          <van-button
12
-            v-if="item.type == 'BUTTOM'"
13
-            type="default"
14
-            color="#d75e3a"
15
-            size="mini"
16
-            @click="item.click"
17
-            style="display:flex"
18
-            >{{item.name}}</van-button
2
+  <template v-for="(item, index) in options" :key="index">
3
+    <van-field :label="item.name">
4
+      <template #input>
5
+        <van-button
6
+          v-if="item.type == 'SECURITY'"
7
+          type="default"
8
+          color="#d75e3a"
9
+          size="small"
10
+          @click="item.click"
19
           >
11
           >
20
-          <span v-else class="static" :class="{ 'contextc--required': item.required }">
21
-            {{ item.name }}: {{ item.value }}</span
22
-          >
23
-        </div>
24
-      </van-col>
25
-    </van-row>
26
-  </div>
12
+            {{`查看敏感信息 (${item.value})`}}
13
+        </van-button>
14
+        <div v-else>{{item.value}}</div>
15
+      </template>
16
+    </van-field>
17
+  </template>
27
 </template>
18
 </template>
28
 
19
 
29
 <script>
20
 <script>
30
-import { Col, Row, Button } from "vant";
21
+import { Field , Button } from "vant";
22
+
31
 export default {
23
 export default {
32
   name: "contextc",
24
   name: "contextc",
33
   components: {
25
   components: {
34
-    [Row.name]: Row,
35
-    [Col.name]: Col,
26
+    [Field .name]: Field,
36
     [Button.name]: Button,
27
     [Button.name]: Button,
37
   },
28
   },
38
   props: {
29
   props: {
50
 
41
 
51
 <!-- Add "scoped" attribute to limit CSS to this component only -->
42
 <!-- Add "scoped" attribute to limit CSS to this component only -->
52
 <style lang="less" scoped>
43
 <style lang="less" scoped>
53
-.contextc {
54
-  font-size: 13px;
55
-  color: #999;
56
-  &-text {
57
-    line-height: 24px;
58
-    display: flex;
59
-  }
60
-  &--required::before {
61
-    left: 8px;
62
-    color: #ee0a24;
63
-    font-size: 14px;
64
-    content: "*";
65
-  }
66
-}
44
+
67
 </style>
45
 </style>

+ 2
- 0
src/main.js Voir le fichier

5
 import store from './store'
5
 import store from './store'
6
 import 'vant/lib/index.css';
6
 import 'vant/lib/index.css';
7
 
7
 
8
+import { Notify } from 'vant'
8
 import Shiro from './components/Shiro'
9
 import Shiro from './components/Shiro'
9
 import XLoading from './components/XLoading'
10
 import XLoading from './components/XLoading'
10
 import shiro from './utils/plugins/shiro'
11
 import shiro from './utils/plugins/shiro'
13
 app.use(store);
14
 app.use(store);
14
 app.use(router);
15
 app.use(router);
15
 app.use(shiro);
16
 app.use(shiro);
17
+app.use(Notify);
16
 
18
 
17
 app.component('x-loading', XLoading)
19
 app.component('x-loading', XLoading)
18
 app.component('shiro', Shiro)
20
 app.component('shiro', Shiro)

+ 67
- 12
src/store/models/room.js Voir le fichier

3
   ref
3
   ref
4
 } from "vue"
4
 } from "vue"
5
 import request from '@/utils/request'
5
 import request from '@/utils/request'
6
+import { showDanger } from '@/utils'
6
 
7
 
7
 export default () => {
8
 export default () => {
8
   const loading = ref(false)
9
   const loading = ref(false)
9
   const list = ref([])
10
   const list = ref([])
10
   const page = reactive({})
11
   const page = reactive({})
11
   const detail = reactive({})
12
   const detail = reactive({})
13
+  const roomRole = reactive({})
14
+  const roomAuthBox = reactive({})
15
+  const roomKeyBox = reactive({})
12
 
16
 
13
   const getList = data => {
17
   const getList = data => {
14
     loading.value = true
18
     loading.value = true
40
     })
44
     })
41
   }
45
   }
42
 
46
 
47
+  // 房源详情--基础信息
43
   const getDetail = data => {
48
   const getDetail = data => {
44
     request({
49
     request({
45
       loadingId: 'room.view',
50
       loadingId: 'room.view',
49
         id:data,
54
         id:data,
50
       }
55
       }
51
     }).then(res => {
56
     }).then(res => {
52
-      console.log(res, 'res')
53
-
54
-    Object.assign(detail, res)
55
-   
57
+      Object.assign(detail, res)
56
     }).catch(e => {
58
     }).catch(e => {
57
       console.error(e)
59
       console.error(e)
60
+      showDanger('获取详情失败')
58
     })
61
     })
59
   }
62
   }
60
 
63
 
61
-  const getSecurity = id => {
62
-  return  request({
63
-      loadingId: 'room.security',
64
-      url: '/room/security',
64
+  // 角色人信息
65
+  const getRole = data => {
66
+    request({
67
+      loadingId: 'room.role',
68
+      url: '/room/role',
65
       params: {
69
       params: {
70
+        roomId:data,
71
+      }
72
+    }).then(res => {
73
+      Object.assign(roomRole, res)
74
+    }).catch(e => {
75
+      console.error(e)
76
+      showDanger('获取角色人失败')
77
+    })
78
+  }
66
 
79
 
67
-        roomId:id,
80
+  // 委托书信息
81
+  const getAuth = data => {
82
+    request({
83
+      loadingId: 'room.auth',
84
+      url: '/room/auth',
85
+      params: {
86
+        roomId: data,
68
       }
87
       }
69
     }).then(res => {
88
     }).then(res => {
70
-      console.log(res, 'res')
71
-   return res
89
+      Object.assign(roomAuthBox, res)
72
     }).catch(e => {
90
     }).catch(e => {
73
       console.error(e)
91
       console.error(e)
92
+      showDanger('获取委托书失败')
74
     })
93
     })
75
   }
94
   }
76
 
95
 
96
+  // 钥匙信息
97
+  const getKey = data => {
98
+    request({
99
+      loadingId: 'room.key',
100
+      url: '/room/key',
101
+      params: {
102
+        roomId: data,
103
+      }
104
+    }).then(res => {
105
+      Object.assign(roomKeyBox, res)
106
+    }).catch(e => {
107
+      console.error(e)
108
+      showDanger('获取钥匙失败')
109
+    })
110
+  }
77
 
111
 
112
+  // 敏感信息
113
+  const getSecurity = id => {
114
+    return  request({
115
+        loadingId: 'room.security',
116
+        url: '/room/security',
117
+        params: {
78
 
118
 
119
+          roomId:id,
120
+        }
121
+      }).then(res => {
122
+        console.log(res, 'res')
123
+        return res
124
+      }).catch(e => {
125
+        console.error(e)
126
+      })
127
+  }
79
 
128
 
80
   return {
129
   return {
81
     list,
130
     list,
84
     detail,
133
     detail,
85
     getDetail,
134
     getDetail,
86
     getSecurity,
135
     getSecurity,
87
-    loading
136
+    loading,
137
+    getRole,
138
+    roomRole,
139
+    roomAuthBox,
140
+    getAuth,
141
+    getKey,
142
+    roomKeyBox,
88
   }
143
   }
89
 }
144
 }

+ 6
- 0
src/utils/index.js Voir le fichier

1
 
1
 
2
+import { Notify } from 'vant'
3
+
4
+export function showDanger(message) {
5
+  return Notify({ type: 'danger', message })
6
+}
7
+
2
 export function isEmpty (o) {
8
 export function isEmpty (o) {
3
   if (o === undefined || o === null || o === '') {
9
   if (o === undefined || o === null || o === '') {
4
     return true
10
     return true

+ 1
- 1
src/view/home/index.vue Voir le fichier

39
 
39
 
40
 <!-- Add "scoped" attribute to limit CSS to this component only -->
40
 <!-- Add "scoped" attribute to limit CSS to this component only -->
41
 <style scoped>
41
 <style scoped>
42
-/deep/ .van-tab {
42
+:deep(.van-tab) {
43
   color: #000;
43
   color: #000;
44
 }
44
 }
45
 </style>
45
 </style>

+ 90
- 0
src/view/secondhand/detail/components/Auth.vue Voir le fichier

1
+<template>
2
+  <x-loading x-id="room.auth">
3
+    <p v-if="!roomAuth">暂无业主委托书</p>
4
+    <p v-else-if="roomAuth.status === '1'">当前委托书正在审核中</p>
5
+    <div v-else>
6
+      <shiro name="room:info:auth">
7
+        <template #callback>
8
+          <van-empty image="error" description="无委托书协议查看权限" />
9
+        </template>
10
+
11
+        <van-field label=" " v-if="roomAuthBox.isCreate">
12
+          <template #input>
13
+            <van-button size="small" type="danger">删除委托书</van-button>
14
+          </template>
15
+        </van-field>
16
+
17
+        <van-field label="上传人">
18
+          <template #input>
19
+            {{roomAuth.authUserName}} ({{roomAuth.authUserPhone}})
20
+          </template>
21
+        </van-field>
22
+
23
+        <van-field label="上传时间">
24
+          <template #input>
25
+            {{roomAuth.updateTime}}
26
+          </template>
27
+        </van-field>
28
+        
29
+        <van-field label="委托书编号">
30
+          <template #input>
31
+            {{roomAuth.serialNum}}
32
+          </template>
33
+        </van-field>
34
+        
35
+        <van-field label="起始时间">
36
+          <template #input>
37
+            {{roomAuth.startTime}}
38
+          </template>
39
+        </van-field>
40
+        
41
+        <van-field label="截止时间">
42
+          <template #input>
43
+            {{roomAuth.startTime || '售出为止'}}
44
+          </template>
45
+        </van-field>
46
+
47
+        <van-image width="100" height="100" :src="roomAuth.url" />
48
+      </shiro>
49
+
50
+      <div v-shiro="'room:info:addAuth'" v-if="!roomAuth">
51
+        <van-button size="small" type="warn">上传业主委托书</van-button>
52
+      </div>
53
+    </div>
54
+  </x-loading>
55
+</template>
56
+
57
+<script>
58
+import { Field, Empty, Button, Image } from 'vant'
59
+import { useModel } from "@zjxpcyc/vue-tiny-store"
60
+import { computed, onMounted } from 'vue'
61
+
62
+export default {
63
+  components: {
64
+    [Field.name]: Field,
65
+    [Empty.name]: Empty,
66
+    [Button.name]: Button,
67
+    [Image.name]: Image,
68
+  },
69
+  props: {
70
+    roomId: undefined
71
+  },
72
+  setup(props) {
73
+    const { detail, roomAuthBox, getAuth } = useModel("room")
74
+
75
+    const roomAuth = computed(() => roomAuthBox.roomAuth)
76
+
77
+    onMounted(() => {
78
+      if (!roomAuthBox.roomAuth) {
79
+        getAuth(props.roomId)
80
+      }
81
+    })
82
+
83
+    return {
84
+      detail,
85
+      roomAuthBox,
86
+      roomAuth,
87
+    }
88
+  }
89
+}
90
+</script>

+ 63
- 0
src/view/secondhand/detail/components/Follow.vue Voir le fichier

1
+<template>
2
+  <x-loading x-id="room.follow.list">
3
+    <p v-if="!list.length">暂无跟进记录</p>
4
+    <van-steps direction="vertical" :active="0" v-else>
5
+      <van-step v-for="(item, index) in list" :key="index">
6
+        <p>
7
+          {{item.followUserName}} {{item.createTime}}
8
+        </p>
9
+        <p>
10
+          {{item.followType === '0' ? '看房, ': ''}}
11
+          {{item.followDesc}}
12
+        </p>
13
+        <p v-if="item.followImg">
14
+          <van-image width="100" height="100" :src="item.followImg" />
15
+        </p>          
16
+      </van-step>
17
+    </van-steps>
18
+  </x-loading>
19
+</template>
20
+
21
+<script>
22
+import { onMounted, ref } from 'vue'
23
+import { List, Step, Steps, Image } from 'vant'
24
+import request from '@/utils/request'
25
+
26
+export default {
27
+  components: {
28
+    [List.name]: List,
29
+    [Steps.name]: Steps,
30
+    [Step.name]: Step,
31
+    [Image.name]: Image,
32
+  },
33
+  props: {
34
+    roomId: undefined,
35
+  },
36
+  setup(props) {
37
+    const list = ref([])
38
+
39
+    const handleLoad = () => {
40
+      request({
41
+        loadingId: 'room.follow.list',
42
+        url: '/room/follow/list',
43
+        params: {
44
+          roomId: props.roomId,
45
+          pageNo: 1,
46
+          pageSize: 100,
47
+        }
48
+      }).then(res => {
49
+        list.value = res.result
50
+      })
51
+    }
52
+
53
+    onMounted(() => {
54
+      handleLoad()
55
+    })
56
+
57
+    return {
58
+      list,
59
+      handleLoad,
60
+    }
61
+  }
62
+}
63
+</script>

+ 81
- 0
src/view/secondhand/detail/components/Key.vue Voir le fichier

1
+<template>
2
+  <x-loading x-id="room.key">
3
+    <p v-if="!roomKey">暂无钥匙信息</p>
4
+    <p v-else-if="roomKey.status === '1'">当前委托书正在审核中</p>
5
+    <div v-else>
6
+      <shiro name="room:info:key">
7
+        <template #callback>
8
+          <van-empty image="error" description="无钥匙协议查看权限" />
9
+        </template>
10
+
11
+        <van-field label=" " v-if="roomKeyBox.isCreate">
12
+          <template #input>
13
+            <van-button size="small" type="danger">删除钥匙</van-button>
14
+          </template>
15
+        </van-field>
16
+
17
+        <van-field label="上传人">
18
+          <template #input>
19
+            {{roomKey.keyUserName}} ({{roomKey.keyUserPhone}})
20
+          </template>
21
+        </van-field>
22
+
23
+        <van-field label="上传时间">
24
+          <template #input>
25
+            {{roomKey.updateTime}}
26
+          </template>
27
+        </van-field>
28
+
29
+        <van-field label="钥匙编号">
30
+          <template #input>
31
+            {{roomKey.keyNo}}
32
+          </template>
33
+        </van-field>
34
+
35
+        <van-field label="存储位置">
36
+          <template #input>
37
+            {{roomKey.address}}
38
+          </template>
39
+        </van-field>
40
+
41
+        <van-image width="100" height="100" :src="roomKey.url" />
42
+
43
+      </shiro>
44
+    </div>
45
+  </x-loading>
46
+</template>
47
+
48
+<script>
49
+import { Field, Empty, Button, Image } from 'vant'
50
+import { useModel } from "@zjxpcyc/vue-tiny-store"
51
+import { computed, onMounted } from 'vue'
52
+
53
+export default {
54
+  components: {
55
+    [Field.name]: Field,
56
+    [Empty.name]: Empty,
57
+    [Button.name]: Button,
58
+    [Image.name]: Image,
59
+  },
60
+  props: {
61
+    roomId: undefined
62
+  },
63
+  setup(props) {
64
+    const { detail, roomKeyBox, getKey } = useModel("room")
65
+
66
+    const roomKey = computed(() => roomKeyBox.roomKey)
67
+
68
+    onMounted(() => {
69
+      if (!roomKeyBox.roomKey) {
70
+        getKey(props.roomId)
71
+      }
72
+    })
73
+
74
+    return {
75
+      detail,
76
+      roomKeyBox,
77
+      roomKey,
78
+    }
79
+  }
80
+}
81
+</script>

+ 63
- 0
src/view/secondhand/detail/components/Look.vue Voir le fichier

1
+<template>
2
+  <x-loading x-id="room.look.list">
3
+    <p v-if="!list.length">暂无空看记录</p>
4
+    <van-steps direction="vertical" :active="0" v-else>
5
+      <van-step v-for="(item, index) in list" :key="index">
6
+        <p>
7
+          {{item.followUserName}} {{item.createTime}}
8
+        </p>
9
+        <p>
10
+          {{item.followType === '0' ? '看房, ': ''}}
11
+          {{item.followDesc}}
12
+        </p>
13
+        <p v-if="item.followImg">
14
+          <van-image width="100" height="100" :src="item.followImg" />
15
+        </p>          
16
+      </van-step>
17
+    </van-steps>
18
+  </x-loading>
19
+</template>
20
+
21
+<script>
22
+import { onMounted, ref } from 'vue'
23
+import { List, Step, Steps, Image } from 'vant'
24
+import request from '@/utils/request'
25
+
26
+export default {
27
+  components: {
28
+    [List.name]: List,
29
+    [Steps.name]: Steps,
30
+    [Step.name]: Step,
31
+    [Image.name]: Image,
32
+  },
33
+  props: {
34
+    roomId: undefined,
35
+  },
36
+  setup(props) {
37
+    const list = ref([])
38
+
39
+    const handleLoad = () => {
40
+      request({
41
+        loadingId: 'room.look.list',
42
+        url: '/room/look/list',
43
+        params: {
44
+          roomId: props.roomId,
45
+          pageNo: 1,
46
+          pageSize: 100,
47
+        }
48
+      }).then(res => {
49
+        list.value = res.result
50
+      })
51
+    }
52
+
53
+    onMounted(() => {
54
+      handleLoad()
55
+    })
56
+
57
+    return {
58
+      list,
59
+      handleLoad,
60
+    }
61
+  }
62
+}
63
+</script>

+ 150
- 122
src/view/secondhand/detail/index.vue Voir le fichier

1
 <template>
1
 <template>
2
   <div class="secondhanddetail">
2
   <div class="secondhanddetail">
3
     <!-- xId='room.view' -->
3
     <!-- xId='room.view' -->
4
-    <XLoading tip="正在加载详情">
4
+    <x-loading x-id="room.view" tip="正在加载详情">
5
       <div>
5
       <div>
6
         <Swiper></Swiper>
6
         <Swiper></Swiper>
7
       </div>
7
       </div>
8
 
8
 
9
       <div class="title">
9
       <div class="title">
10
-        <p>{{ detail.roomInfo?.title }}</p>
10
+        <p class="body">{{ detail.roomInfo?.title }}</p>
11
+        
12
+        <van-popover
13
+          v-model:show="showPopover"
14
+          :actions="actions"
15
+          @select="onSelect"
16
+          placement="bottom-end"
17
+        >
18
+          <template #reference>
19
+            <div class="action">
20
+              <van-icon name="wap-nav" />
21
+            </div>
22
+          </template>
23
+        </van-popover>
11
       </div>
24
       </div>
12
 
25
 
13
-      <div class="detailcard">
14
-        <div class="detailcard-title">
15
-          <span>房源信息</span>
16
-
17
-          <div style="float:right">
18
-            <van-popover
19
-              v-model:show="showPopover"
20
-              :actions="actions"
21
-              @select="onSelect"
22
-              placement="bottom-end"
23
-            >
24
-              <template #reference>
25
-                <van-icon name="chat-o" />
26
-              </template>
27
-            </van-popover>
28
-          </div>
29
-        </div>
26
+      <van-cell-group title="房源信息">
30
         <Contextc :options="housingInformationOptions"></Contextc>
27
         <Contextc :options="housingInformationOptions"></Contextc>
31
-      </div>
32
-      <div class="detailcard">
33
-        <div class="detailcard-title">
34
-          <span>基础信息</span>
35
-        </div>
36
-        <Contextc :options="baseInformationOptions"></Contextc>
37
-      </div>
38
-      <div class="detailcard">
39
-        <div class="detailcard-title">
40
-          <span>物业信息</span>
41
-        </div>
42
-        <Contextc :options="propertyInformationOptions"></Contextc>
43
-      </div>
44
-      <div class="detailcard">
45
-        <div class="detailcard-title">
46
-          <span>角色人</span>
47
-        </div>
48
-        <Contextc :options="roleInformationOptions"></Contextc>
49
-      </div>
50
-      <div class="detailcard">
51
-        <div class="detailcard-title">
52
-          <span>委托书</span>
53
-        </div>
54
-        <Contextc :options="entrustOptions" nodata=""></Contextc>
55
-      </div>
56
-      <div class="detailcard">
57
-        <div class="detailcard-title">
58
-          <span>钥匙</span>
59
-        </div>
60
-        <Contextc :options="keyOptions" nodata=""></Contextc>
61
-      </div>
62
-
63
-      <div class="detailcard">
64
-        <div class="detailcard-title">
65
-          <van-row>
66
-            <van-col span="12"> <span>跟进记录</span></van-col>
67
-            <van-col span="12" style="line-height:26px;display: flex;">
68
-              <van-button type="default" color="#d75e3a" size="mini"
69
-                >添加跟进</van-button
70
-              ></van-col
71
-            >
72
-          </van-row>
73
-        </div>
74
-        <div>
75
-          <Stepc></Stepc>
76
-        </div>
77
-      </div>
78
-
79
-      <div class="detailcard">
80
-        <div class="detailcard-title">
81
-          <van-row>
82
-            <van-col span="12"> <span>空看记录</span></van-col>
83
-            <van-col span="12" style="line-height:26px;display: flex;">
84
-              <van-button type="default" color="#d75e3a" size="mini"
85
-                >添加空看</van-button
86
-              ></van-col
87
-            >
88
-          </van-row>
89
-        </div>
90
-        <div>
91
-          <Stepc></Stepc>
92
-        </div>
93
-      </div>
28
+      </van-cell-group>
29
+
30
+      <van-cell-group title="其他信息">
31
+        <van-collapse v-model="collapseItem" accordion @change="handleCollapseChange">
32
+          <van-collapse-item name="1">
33
+            <template #title>
34
+              <div>基础信息</div>
35
+            </template>
36
+            <Contextc :options="baseInformationOptions"></Contextc>
37
+          </van-collapse-item>
38
+
39
+          <van-collapse-item name="2">
40
+            <template #title>
41
+              <div>物业信息</div>
42
+            </template>
43
+            <Contextc :options="propertyInformationOptions"></Contextc>
44
+          </van-collapse-item>
45
+
46
+          <van-collapse-item name="role">
47
+            <template #title>
48
+              <div>角色人</div>
49
+            </template>
50
+            <x-loading x-id="room.role" tips="请稍等...">
51
+              <Contextc :options="roleInformationOptions"></Contextc>
52
+            </x-loading>
53
+          </van-collapse-item>
54
+          
55
+          <van-collapse-item name="auth">
56
+            <template #title>
57
+              <div>委托书</div>
58
+            </template>
59
+            <RoomAuth :room-id="roomId" />
60
+          </van-collapse-item>
61
+          
62
+          <van-collapse-item name="key">
63
+            <template #title>
64
+              <div>钥匙</div>
65
+            </template>
66
+            <RoomKey :room-id="roomId" />
67
+          </van-collapse-item>
68
+
69
+          <van-collapse-item name="follow">
70
+            <template #title>
71
+              <div>跟进记录</div>
72
+            </template>
73
+            <RoomFollow :room-id="roomId" />
74
+          </van-collapse-item>
75
+
76
+          <van-collapse-item name="look">
77
+            <template #title>
78
+              <div>空看记录</div>
79
+            </template>
80
+            <RoomLook :room-id="roomId" />
81
+          </van-collapse-item>
82
+          
83
+        </van-collapse>
84
+      </van-cell-group>
94
 
85
 
95
       <van-share-sheet
86
       <van-share-sheet
96
         v-model:show="showShare"
87
         v-model:show="showShare"
107
           placeholder="请输入电话"
98
           placeholder="请输入电话"
108
         />
99
         />
109
       </van-dialog>
100
       </van-dialog>
110
-    </XLoading>
101
+    </x-loading>
111
   </div>
102
   </div>
112
 </template>
103
 </template>
113
 
104
 
127
   ShareSheet,
118
   ShareSheet,
128
   Toast,
119
   Toast,
129
   Field,
120
   Field,
121
+  Cell,
122
+  CellGroup,
123
+  Collapse,
124
+  CollapseItem,
130
 } from "vant";
125
 } from "vant";
131
 import { useModel } from "@zjxpcyc/vue-tiny-store";
126
 import { useModel } from "@zjxpcyc/vue-tiny-store";
127
+import RoomAuth from './components/Auth'
128
+import RoomKey from './components/Key'
129
+import RoomFollow from './components/Follow'
130
+import RoomLook from './components/Look'
132
 import Contextc from "../../../components/contextC";
131
 import Contextc from "../../../components/contextC";
133
 import Stepc from "../../../components/stepC";
132
 import Stepc from "../../../components/stepC";
134
 // import { router } from "../../../router";
133
 // import { router } from "../../../router";
135
 
134
 
136
-import XLoading from "../../../components/XLoading";
137
-
138
 export default {
135
 export default {
139
   name: "secondhanddetail",
136
   name: "secondhanddetail",
140
   components: {
137
   components: {
138
+    [CellGroup.name]: CellGroup,
139
+    [Cell.name]: Cell,
140
+    [Collapse.name]: Collapse,
141
+    [CollapseItem.name]: CollapseItem,
141
     [Row.name]: Row,
142
     [Row.name]: Row,
142
     [Col.name]: Col,
143
     [Col.name]: Col,
143
     [Popover.name]: Popover,
144
     [Popover.name]: Popover,
149
     [Field.name]: Field,
150
     [Field.name]: Field,
150
     [Dialog.Component.name]: Dialog.Component,
151
     [Dialog.Component.name]: Dialog.Component,
151
 
152
 
152
-    Stepc: Stepc,
153
     Contextc: Contextc,
153
     Contextc: Contextc,
154
     Swiper: Swiper,
154
     Swiper: Swiper,
155
-    XLoading: XLoading,
155
+    RoomAuth,
156
+    RoomKey,
157
+    RoomFollow,
158
+    RoomLook,
156
   },
159
   },
157
   data() {
160
   data() {
158
     return {};
161
     return {};
159
   },
162
   },
160
 
163
 
161
   setup() {
164
   setup() {
162
-    const router = useRouter();
163
-    const roomId = router.currentRoute.value.query.roomId;
164
-    const showPopover = ref(false);
165
-    const showShare = ref(false);
166
-    const phoneShow = ref(false);
167
-    const phone = ref("");
168
-    const showInfo = ref(false);
169
-    const { detail, getDetail, getSecurity } = useModel("room");
170
-    const { dicts, getDict } = useModel("dicts");
165
+    const router = useRouter()
166
+    const roomId = router.currentRoute.value.query.roomId
167
+    const showPopover = ref(false)
168
+    const showShare = ref(false)
169
+    const phoneShow = ref(false)
170
+    const collapseItem = ref()
171
+    const phone = ref("")
172
+    const showInfo = ref(false)
173
+
174
+    const { detail, roomRole, getDetail, getRole, getSecurity } = useModel("room")
175
+    const { dicts, getDict } = useModel("dicts")
171
 
176
 
172
     onMounted(() => {
177
     onMounted(() => {
173
       getDetail(roomId);
178
       getDetail(roomId);
365
           : "敏感信息",
370
           : "敏感信息",
366
       },
371
       },
367
       {
372
       {
368
-        name: `查看敏感信息(${detail.leftSecurityNum})`,
369
-        value: "123",
370
-        type: "BUTTOM",
373
+        name: ' ',
374
+        value: detail.leftSecurityNum,
375
+        type: "SECURITY",
371
         click: () => onLookClick(),
376
         click: () => onLookClick(),
372
       },
377
       },
373
     ]);
378
     ]);
461
       },
466
       },
462
     ]);
467
     ]);
463
 
468
 
464
-   const getNameFormat=(name,id)=>(name||'') + (name?`(ID:${id})`:'')
465
-   
466
     // 角色人
469
     // 角色人
467
-    const roleInformationOptions =computed(() => [
470
+    const roleInformationOptions = computed(() => [
468
       {
471
       {
469
         name: "首次录入人",
472
         name: "首次录入人",
470
-        value: getNameFormat(detail.roomRole?.createName,detail.roomRole?.createId),
473
+        value: detail.createMethod === '1' ? '外部录入' : `${roomRole.createName}(ID: ${roomRole.createId})`,
471
       },
474
       },
472
       {
475
       {
473
-        name: "时间",
474
-        value:detail.roomRole?.createTime
476
+        name: "首次录入时间",
477
+        value: roomRole.createTime
475
       },
478
       },
476
       {
479
       {
477
         name: "录入人",
480
         name: "录入人",
478
-        value: getNameFormat(detail.roomRole?.recordName,detail.roomRole?.recordId), 
481
+        value: detail.createMethod === '1' ? '外部录入' : `${roomRole.recordName}(ID: ${roomRole.recordId})`,
479
       },
482
       },
480
       {
483
       {
481
-        name: "时间",
482
-        value: detail.roomRole?.recordTime
484
+        name: "录入时间",
485
+        value: roomRole.recordTime
483
       },
486
       },
484
       {
487
       {
485
         name: "维护人",
488
         name: "维护人",
486
-        value:  getNameFormat(detail.roomRole?.belongName,detail.roomRole?.belongId), 
489
+        value: roomRole.belongName && `${roomRole.belongName}(ID: ${roomRole.belongId})`,
487
       },
490
       },
488
       {
491
       {
489
         name: "查看电话",
492
         name: "查看电话",
493
       },
496
       },
494
       {
497
       {
495
         name: "实勘人",
498
         name: "实勘人",
496
-        value:   getNameFormat(detail.roomRole?.rescName,detail.roomRole?.rescId),  
499
+        value: roomRole.rescName && `${roomRole.rescName}(ID: ${roomRole.rescId})`,
497
       },
500
       },
498
       {
501
       {
499
-        name: "时间",
500
-        value: detail.roomRole?.rescTime,
502
+        name: "达成时间",
503
+        value: roomRole.rescTime,
501
       },
504
       },
502
       {
505
       {
503
         name: "钥匙人",
506
         name: "钥匙人",
504
-        value:  getNameFormat(detail.roomRole?.keyName,detail.roomRole?.keyId),  
505
-        span: 24,
507
+        value: roomRole.keyName && `${roomRole.keyName}(ID: ${roomRole.keyId})`,
506
       },
508
       },
507
       {
509
       {
508
         name: "委托人",
510
         name: "委托人",
509
-        value: getNameFormat(detail.roomRole?.authName,detail.roomRole?.authId), 
511
+        value: roomRole.authName && `${roomRole.authName}(ID: ${roomRole.authId})`,
510
       },
512
       },
511
       {
513
       {
512
-        name: "时间",
513
-        value:  detail.roomRole?.authTime,
514
+        name: "委托时间",
515
+        value: roomRole.authTime,
514
       },
516
       },
515
       {
517
       {
516
         name: "最后修改人",
518
         name: "最后修改人",
517
-        value:  getNameFormat(detail.roomRole?.updateName,detail.roomRole?.updateId),  
519
+        value: roomRole.updateName && `${roomRole.updateName}(ID: ${roomRole.updateId})`,
518
       },
520
       },
519
       {
521
       {
520
-        name: "时间",
521
-        value: "123",
522
+        name: "最后修改时间",
523
+        value: roomRole.updateTime,
522
       },
524
       },
523
     ]);
525
     ]);
524
 
526
 
525
     // 委托书
527
     // 委托书
526
-    const entrustOptions = [
528
+    const entrustOptions = computed(() => [
527
       {
529
       {
528
         name: "委托书编号",
530
         name: "委托书编号",
529
         value: "123",
531
         value: "123",
542
         name: "截止时间",
544
         name: "截止时间",
543
         value: "123",
545
         value: "123",
544
       },
546
       },
545
-    ];
547
+    ]);
546
 
548
 
547
     // 钥匙
549
     // 钥匙
548
     const keyOptions = [
550
     const keyOptions = [
572
       showShare.value = false;
574
       showShare.value = false;
573
     };
575
     };
574
 
576
 
577
+    // 查看房源内容
578
+    const handleCollapseChange = activeName => {
579
+      if (activeName === 'role' && roomId != roomRole.roomId) {
580
+        getRole(roomId)
581
+      }
582
+    }
583
+
575
     return {
584
     return {
576
       phone,
585
       phone,
577
       housingInformationOptions,
586
       housingInformationOptions,
588
       onShareSelect,
597
       onShareSelect,
589
       shareOptions,
598
       shareOptions,
590
       detail,
599
       detail,
600
+      collapseItem,
601
+      handleCollapseChange,
602
+      roomId,
591
     };
603
     };
592
   },
604
   },
593
 };
605
 };
597
 <style lang="less">
609
 <style lang="less">
598
 .secondhanddetail {
610
 .secondhanddetail {
599
   text-align: left;
611
   text-align: left;
612
+
613
+  .title {
614
+    padding-left: 1em;
615
+    display: flex;
616
+    align-items: center;
617
+
618
+    .body {
619
+      flex: auto;
620
+    }
621
+
622
+    .action {
623
+      text-align: center;
624
+      width: 64px;
625
+      flex: none;
626
+    }
627
+  }
600
 }
628
 }
601
 .secondhand-main::-webkit-scrollbar {
629
 .secondhand-main::-webkit-scrollbar {
602
   display: none; /*隐藏滚动条*/
630
   display: none; /*隐藏滚动条*/