瀏覽代碼

no message

USER-20230908AJ\Administrator 1 年之前
父節點
當前提交
434d19702c
共有 2 個文件被更改,包括 29 次插入13 次删除
  1. 28 12
      page_task/property/components/house.vue
  2. 1 1
      page_task/property/property.vue

+ 28 - 12
page_task/property/components/house.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="">
 		<view class="data-from" v-for="(item,index) in houseList">
-			<view class="p-t30">
-				<view class="sys-from-background-color p-20 r-20">
+			<view class="p-t30" v-if="editIndex!==index">
+				<view  class="sys-from-background-color p-20 r-20">
 					<view class="row-justify-sb center">
 						<text class="size-28 sys-weight-600">房产信息({{index+1}})</text>
 						<view class="row-c sys-background-fff r-100 p-lr40 p-tb10">
@@ -18,40 +18,39 @@
 					</view>
 					<view class="row p-t30">
 						<view class="text-color-666"><text></text>产权人:</view>
-						<text class="flex">产权人</text>
+						<text class="flex">{{item.data.property_owner}}</text>
 					</view>
 					<view class="row p-t30">
 						<view class="text-color-666"><text></text>房产证号:</view>
-						<text class="flex">产权人</text>
+						<text class="flex">{{item.data.deed_num}}</text>
 					</view>
 					<view class="row p-t30">
 						<view class="text-color-666"><text></text>房产地址:</view>
-						<text class="flex">重庆市 渝中区 大坪龙湖时代天街5栋3-1</text>
+						<text class="flex">{{item.data.house_city}}{{item.data.house_address}}</text>
 					</view>
 					<view class="row p-t30">
 						<view class="text-color-666"><text></text>房屋用途:</view>
-						<text class="flex">产权人</text>
+						<text class="flex">{{item.data.house_city}}</text>
 					</view>
 					<view class="row p-t30">
 						<view class="text-color-666"><text></text>建成年份:</view>
-						<text class="flex">产权人</text>
+						<text class="flex">{{item.data.covered_area}}</text>
 					</view>
 					<view class="row p-t30">
 						<view class="text-color-666"><text></text>建筑面积:</view>
-						<text class="flex">产权人</text>
+						<text class="flex">{{item.data.covered_area}}</text>
 					</view>
 					<view class="row p-t30">
 						<view class="text-color-666"><text></text>房产证件:</view>
-						<image class="wh-110" src="/static/img/index/top-nav.png" mode=""></image>
-						<EnImage></EnImage>
+						<EnImage :img="item.data.certificate_img"></EnImage>
 					</view>
 					<view class="row p-t30">
 						<view class="text-color-666"><text></text>备注:</view>
-						<text class="flex">产权人</text>
+						<text class="flex">{{item.data.remark}}</text>
 					</view>
 				</view>
 			</view>
-			<view class="p-t30">
+			<view class="p-t30" v-else>
 				<view class="row-justify-sb center p-b10">
 					<text class="size-28 sys-weight-600">房产信息({{index+1}})</text>
 					<view class="row-c sys-background-fff r-100">
@@ -134,6 +133,7 @@
 		},
 		data() {
 			return {
+        editIndex: 0,
 				payData: [{
 					'id': 1,
 					'name': '已支付'
@@ -179,6 +179,21 @@
 			this.setValue()
 		},
 		methods: {
+      onDeleteInfo(itemKey) {
+        uni.showModal({
+          title: '是否删除当前资产信息',
+          content: '确定删除?',
+          success: (res) => {
+            if (res.confirm) {
+              this.houseList.splice(itemKey, 1)
+            }
+          }
+        })
+
+      },
+      onEditInfo(index){
+        this.editIndex = index
+      },
 			addHouse() {
 				tools.showLoading()
 				getSn().then((res) => {
@@ -188,6 +203,7 @@
 							'property_sn': res.data,
 							'data': JSON.parse(JSON.stringify(this.houseItem))
 						})
+            this.editIndex=this.houseList.length-1
 						this.$emit('onResize')
 					} else {
 						tools.error('编号生成失败')

+ 1 - 1
page_task/property/property.vue

@@ -17,7 +17,7 @@
 					</view>
 				</view> -->
 				<uni-collapse ref="collapse" accordion class="sys-from-background-color">
-					<uni-collapse-item titleBorder="none" :border="true" :rightLength="2"
+					<uni-collapse-item titleBorder="none" :border="true" :rightLength="houseList.length"
 						v-show="propertyKey.indexOf('house_item')>=0"
 						class="collapse-item-house page-box-bg-fff p-30 r-30">
 						<template v-slot:title>