Blame view

src/views/room/listPropertyRightRegistrationDetailList.vue 8.63 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
f92fd6ac   wuxw   开发我的小区下的功能
2
3
    <div class="property-right-detail-container">
      <el-card class="box-card">
20ddb876   wuxw   优化房屋产权
4
        <div slot="header" class="flex justify-between">
f92fd6ac   wuxw   开发我的小区下的功能
5
6
7
8
9
10
11
12
13
14
15
16
            <div>
              <span>{{ listPropertyRightRegistrationDetailInfo.conditions.floorNum }}-{{
                listPropertyRightRegistrationDetailInfo.conditions.unitNum }}-{{
                  listPropertyRightRegistrationDetailInfo.conditions.roomNum }}</span>
              <span>{{ $t('propertyRightDetail.title') }}</span>
            </div>
            <div class="card-tools">
              <el-button type="primary" size="small" @click="_goBack">
                <i class="el-icon-close"></i>
                <span>{{ $t('common.back') }}</span>
              </el-button>
            </div>
20ddb876   wuxw   优化房屋产权
17
       
f92fd6ac   wuxw   开发我的小区下的功能
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
        </div>
  
        <el-table :data="listPropertyRightRegistrationDetailInfo.propertyRightRegistrationDetails" border
          style="width: 100%" v-loading="loading">
          <el-table-column prop="prrdId" :label="$t('propertyRightDetail.table.id')" align="center" />
          <el-table-column prop="securitiesName" :label="$t('propertyRightDetail.table.materialType')" align="center" />
          <el-table-column :label="$t('propertyRightDetail.table.isPayment')" align="center">
            <template slot-scope="scope">
              {{ scope.row.isTrue === '-1' ? '--' : scope.row.isTrue === 'true' ? $t('common.yes') : $t('common.no') }}
            </template>
          </el-table-column>
          <el-table-column :label="$t('propertyRightDetail.table.image')" align="center">
            <template slot-scope="scope">
              <div v-if="scope.row.securities === '001'">
                <div v-for="(item, index) in scope.row.idCardUrlShow" :key="index" class="image-container"
b6a90698   wuxw   优化图片方大问题
33
                  >
f92fd6ac   wuxw   开发我的小区下的功能
34
35
36
37
38
39
40
41
42
43
44
                  <el-image :src="item" :preview-src-list="scope.row.idCardUrlShow" fit="cover"
                    style="width: 50px; height: 50px">
                    <div slot="error" class="image-slot">
                      <img src="/img/noPhoto.jpg" style="width: 50px; height: 50px">
                    </div>
                  </el-image>
                  <img src="/img/icon-bigimg.png" class="preview-icon">
                </div>
              </div>
              <div v-else-if="scope.row.securities === '002'">
                <div v-for="(item, index) in scope.row.housePurchaseUrlShow" :key="index" class="image-container"
b6a90698   wuxw   优化图片方大问题
45
                 >
f92fd6ac   wuxw   开发我的小区下的功能
46
                  <el-image :src="item" :preview-src-list="scope.row.housePurchaseUrlShow" fit="cover"
b6a90698   wuxw   优化图片方大问题
47
                    style="width: 50px; height: 50px" >
f92fd6ac   wuxw   开发我的小区下的功能
48
49
50
51
52
53
54
55
56
                    <div slot="error" class="image-slot">
                      <img src="/img/noPhoto.jpg" style="width: 50px; height: 50px">
                    </div>
                  </el-image>
                  <img src="/img/icon-bigimg.png" class="preview-icon">
                </div>
              </div>
              <div v-else-if="scope.row.securities === '003'">
                <div v-for="(item, index) in scope.row.repairUrlShow" :key="index" class="image-container"
b6a90698   wuxw   优化图片方大问题
57
                  >
f92fd6ac   wuxw   开发我的小区下的功能
58
                  <el-image :src="item" :preview-src-list="scope.row.repairUrlShow" fit="cover"
b6a90698   wuxw   优化图片方大问题
59
                    style="width: 50px; height: 50px" >
f92fd6ac   wuxw   开发我的小区下的功能
60
61
62
63
64
65
66
67
68
                    <div slot="error" class="image-slot">
                      <img src="/img/noPhoto.jpg" style="width: 50px; height: 50px">
                    </div>
                  </el-image>
                  <img src="/img/icon-bigimg.png" class="preview-icon">
                </div>
              </div>
              <div v-else-if="scope.row.securities === '004'">
                <div v-for="(item, index) in scope.row.deedTaxUrlShow" :key="index" class="image-container"
b6a90698   wuxw   优化图片方大问题
69
                    >
f92fd6ac   wuxw   开发我的小区下的功能
70
                  <el-image :src="item" :preview-src-list="scope.row.deedTaxUrlShow" fit="cover"
b6a90698   wuxw   优化图片方大问题
71
                    style="width: 50px; height: 50px" >
f92fd6ac   wuxw   开发我的小区下的功能
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
                    <div slot="error" class="image-slot">
                      <img src="/img/noPhoto.jpg" style="width: 50px; height: 50px">
                    </div>
                  </el-image>
                  <img src="/img/icon-bigimg.png" class="preview-icon">
                </div>
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="createTime" :label="$t('propertyRightDetail.table.createTime')" align="center" />
          <el-table-column :label="$t('common.operation')" align="center" width="150">
            <template slot-scope="scope">
              <el-button size="mini" type="primary" @click="_openEditPropertyRightRegistrationDetailModel(scope.row)">
                {{ $t('common.edit') }}
              </el-button>
            </template>
          </el-table-column>
        </el-table>
  
        <el-pagination :current-page.sync="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size"
          :total="page.total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
          @current-change="handleCurrentChange" />
      </el-card>
  
      <edit-property-right-registration-detail ref="editPropertyRightRegistrationDetail" @success="handleSuccess" />
f92fd6ac   wuxw   开发我的小区下的功能
97
98
99
100
101
102
103
    </div>
  </template>
  
  <script>
  import { listPropertyRightRegistrationDetail } from '@/api/room/listPropertyRightRegistrationDetailApi'
  import { getCommunityId } from '@/api/community/communityApi'
  import EditPropertyRightRegistrationDetail from '@/components/room/editPropertyRightRegistrationDetail'
f92fd6ac   wuxw   开发我的小区下的功能
104
105
106
107
108
  
  export default {
    name: 'ListPropertyRightRegistrationDetail',
    components: {
      EditPropertyRightRegistrationDetail,
f92fd6ac   wuxw   开发我的小区下的功能
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
    },
    data() {
      return {
        loading: false,
        listPropertyRightRegistrationDetailInfo: {
          propertyRightRegistrationDetails: [],
          conditions: {
            prrId: '',
            securities: '',
            floorNum: '',
            unitNum: '',
            roomNum: '',
            isTrue: '',
            communityId: ''
          }
        },
        page: {
          current: 1,
          size: 10,
          total: 0
        }
      }
    },
    created() {
      this.listPropertyRightRegistrationDetailInfo.conditions.communityId = getCommunityId()
      this.listPropertyRightRegistrationDetailInfo.conditions.prrId = this.$route.query.prrId
      this.listPropertyRightRegistrationDetailInfo.conditions.floorNum = this.$route.query.floorNum
      this.listPropertyRightRegistrationDetailInfo.conditions.unitNum = this.$route.query.unitNum
      this.listPropertyRightRegistrationDetailInfo.conditions.roomNum = this.$route.query.roomNum
      this.getList()
    },
    methods: {
      async getList() {
        try {
          this.loading = true
          const params = {
            page: this.page.current,
            row: this.page.size,
            ...this.listPropertyRightRegistrationDetailInfo.conditions
          }
          const { data, total } = await listPropertyRightRegistrationDetail(params)
          this.listPropertyRightRegistrationDetailInfo.propertyRightRegistrationDetails = data.map(item => {
            if (item.securities === '001' && item.idCardUrl) {
              item.idCardUrl = item.idCardUrl.split(',')
f143e79f   wuxw   v1.9 产权登记看不到图片bug
153
              item.idCardUrlShow = item.idCardUrl
f92fd6ac   wuxw   开发我的小区下的功能
154
155
156
            }
            if (item.securities === '002' && item.housePurchaseUrl) {
              item.housePurchaseUrl = item.housePurchaseUrl.split(',')
f143e79f   wuxw   v1.9 产权登记看不到图片bug
157
              item.housePurchaseUrlShow = item.housePurchaseUrl
f92fd6ac   wuxw   开发我的小区下的功能
158
159
160
            }
            if (item.securities === '003' && item.repairUrl) {
              item.repairUrl = item.repairUrl.split(',')
f143e79f   wuxw   v1.9 产权登记看不到图片bug
161
              item.repairUrlShow = item.repairUrl
f92fd6ac   wuxw   开发我的小区下的功能
162
163
164
            }
            if (item.securities === '004' && item.deedTaxUrl) {
              item.deedTaxUrl = item.deedTaxUrl.split(',')
f143e79f   wuxw   v1.9 产权登记看不到图片bug
165
              item.deedTaxUrlShow = item.deedTaxUrl
f92fd6ac   wuxw   开发我的小区下的功能
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
            }
            return item
          })
          this.page.total = total
        } catch (error) {
          this.$message.error(this.$t('propertyRightDetail.fetchError'))
        } finally {
          this.loading = false
        }
      },
      handleSizeChange(val) {
        this.page.size = val
        this.getList()
      },
      handleCurrentChange(val) {
        this.page.current = val
        this.getList()
      },
      _openEditPropertyRightRegistrationDetailModel(row) {
        this.$refs.editPropertyRightRegistrationDetail.open(row)
      },
f92fd6ac   wuxw   开发我的小区下的功能
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
      _goBack() {
        this.$router.go(-1)
      },
      handleSuccess() {
        this.getList()
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .property-right-detail-container {
    padding: 20px;
  
    .box-card {
      margin-bottom: 20px;
  
      .card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
  
        span {
          font-size: 18px;
          font-weight: bold;
        }
      }
    }
  
    .image-container {
      position: relative;
      display: inline-block;
      margin-right: 10px;
  
      .preview-icon {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 20px;
        height: 20px;
      }
    }
  
    .el-pagination {
      margin-top: 20px;
      text-align: right;
    }
  }
  </style>