Procházet zdrojové kódy

个贷口估优化

wucl před 3 měsíci
rodič
revize
6cad6a4b0b

+ 36 - 4
src/views/personal/facePrice.vue

@@ -12,8 +12,14 @@
                 </el-select>
             </el-input>
             </el-tooltip>
-           
-            <el-select v-model="queryParam.limit" placeholder="请选择">
+
+            <el-tooltip v-if="dyData.length>0" content="点击前往贝壳查询该小区成交信息(请提前登录贝壳官网)" placement="top-end" effect="light">
+            <el-input style="margin-left: 20px; width: 300px; color: red;" v-model="communityName" >
+                <template slot="prepend">楼盘名</template>
+                <el-button slot="append" icon="el-icon-search"  @click="toke()"></el-button>
+            </el-input>
+            </el-tooltip>
+            <el-select v-model="queryParam.limit" placeholder="请选择" style=" margin-left:20px; width: 100px;">
                 <el-option key="1" label="两年内" value="两年内"></el-option>
                 <el-option key="2" label="一年内" value="一年内"></el-option>
                 <el-option key="3" label="半年内" value="半年内"></el-option>
@@ -22,7 +28,7 @@
                 <el-option key="6" label="不限" value="不限"></el-option>
 
             </el-select>
-            <el-input style="margin-left: 20px; width: 300px; color: red;" :value="currentDate" disabled readonly>
+            <el-input style="margin-left: 20px; width: 230px; color: red;" :value="currentDate" disabled readonly>
                 <template slot="prepend">价值时点</template>
             </el-input>
             <el-button style="margin-left: 20px;" type="success" @click="queryFacePrice()">口估查询</el-button>
@@ -361,6 +367,9 @@
                 <el-form-item label="口估标的:" prop="facePriceTarget">
                     <el-input v-model="facePriceFrom.facePriceTarget" disabled readonly></el-input>
                 </el-form-item>
+                <el-form-item label="楼盘名称:" prop="facePriceTarget">
+                    <el-input v-model="facePriceFrom.communityName" ></el-input>
+                </el-form-item>
                 <el-form-item label="口估单价:" prop="facePrice">
                     <el-input type="number" v-model.number="facePriceFrom.facePrice">
                         <template slot="append">元</template>
@@ -417,6 +426,7 @@ export default {
                 queryTarget: null,
                 limit: '一年内'
             },
+            communityName:null,
             showQueryTarget: null,
             activateTable: 'deal',
             activeStyle: "width:50%;height:80px;background-color:#f1f4fd;",
@@ -456,7 +466,8 @@ export default {
                 queryTarget:null,
                 queryType:null,
                 dyExampleNum:null,
-                externalExampleNum:null
+                externalExampleNum:null,
+                communityName:null
             }
 
         }
@@ -499,6 +510,15 @@ export default {
             this.$api.personalFacePrice.personalPriceByLocation(query).then(res => {
                 if (res.code === 200) {
                     this.dyData = res.data;
+                    if (this.dyData.length>0){
+                        for (let i in this.dyData){
+                            if (this.dyData[i].communityName){
+                                this.communityName = this.dyData[i].communityName;
+                                break;
+                            }
+                        }
+                        
+                    }
                 }
             })
         },
@@ -521,6 +541,14 @@ export default {
             this.$api.personalFacePrice.personalPriceByCommunity(query).then(res => {
                 if (res.code === 200) {
                     this.dyData = res.data;
+                    if (this.dyData.length>0){
+                        for (let i in this.dyData){
+                            if (this.dyData[i].communityName){
+                                this.communityName = this.dyData[i].communityName;
+                                break;
+                            }
+                        }
+                    }
                 }
             })
         },
@@ -542,6 +570,7 @@ export default {
         openFacePrice() {
             this.facePriceDialog = true;
             this.facePriceFrom.facePriceTarget = this.queryParam.queryTarget;
+            this.facePriceFrom.communityName = this.communityName;
         },
         saveFacePrice(){
             this.$refs.faceFrom.validate(valid => {
@@ -566,6 +595,9 @@ export default {
                     });
                 }
             })
+        },
+        toke(){
+            window.open("https://cd.ke.com/chengjiao/rs"+this.communityName+"/",'_blank')
         }
     },
 

+ 6 - 8
src/views/personal/facePriceHistory.vue

@@ -40,11 +40,11 @@
             <span>{{ row.queryTarget}}</span>
           </template>
         </el-table-column>
-        <!-- <el-table-column label="查询方式" align="center" prop="queryType">
+        <el-table-column label="楼盘名称" align="center" prop="communityName">
           <template slot-scope="{row}">
-            <span>{{ row.queryType}}</span>
+            <span>{{ row.communityName}}</span>
           </template>
-        </el-table-column> -->
+        </el-table-column>
         <el-table-column label="口估单价(元)" align="center" prop="facePrice">
           <template slot-scope="{row}">
             <span style="color: red;">{{ row.facePrice}}</span>
@@ -210,15 +210,13 @@ export default {
       let date = row.valueTiming.split('-')
       let location = "";
       let community ="";
-      if (row.queryType==='地址'){
-        location = "【坐落】"+row.queryTarget+"\n";
-      }else{
-        community = "【小区名称】 "+row.queryTarget+"\n";
+      if (row.communityName){
+        community = "【小区名称】 "+row.communityName+"\n";
       }
       let valueTimeStr = date[0]+'年'+date[1]+'月'+date[2]+'日';
       let faceWords = "\t★★口估结果★★ \n\n"+
                   "【价值时点】"+valueTimeStr+" \n"+
-                    location+
+                   "【坐落】"+row.queryTarget+"\n"+
                     community+
                   "【建筑面积】"+row.faceAcreage+"㎡\n"+
                   "【单价】"+row.facePrice+"元/㎡\n"+