facePrice.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. <template>
  2. <div class="app-container">
  3. <div class="title-container">
  4. <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
  5. </div>
  6. <div class="query-class">
  7. <el-tooltip :content="queryType==='location'?'标准地址格式:成都市xx区xx(路/街/段/巷)xx号(楼盘名)x栋x楼x号':'楼盘名去掉开发商名字可提高查询命中率(例:德商华府天骄->华府天骄)'" placement="top-end" effect="light">
  8. <el-input placeholder="请输入内容" v-model.trim="queryParam.queryTarget" class="input-with-select" clearable>
  9. <el-select v-model="queryType" slot="prepend" placeholder="请选择" style="width: 130px;">
  10. <el-option label="口估地址" value="location"></el-option>
  11. <el-option label="口估楼盘名" value="communityName"></el-option>
  12. </el-select>
  13. </el-input>
  14. </el-tooltip>
  15. <el-tooltip v-if="dyData.length>0" content="点击放大镜前往贝壳查询该小区成交信息(请提前登录贝壳官网)" placement="top-end" effect="light">
  16. <el-input id="community" style="margin-left: 20px; width: 300px;" v-model="communityName" >
  17. <template slot="prepend">贝壳查询</template>
  18. <el-button slot="append" icon="el-icon-search" @click="toke()"></el-button>
  19. </el-input>
  20. </el-tooltip>
  21. <el-select v-model="queryParam.limit" placeholder="请选择" style=" margin-left:20px; width: 100px;">
  22. <el-option key="1" label="两年内" value="两年内"></el-option>
  23. <el-option key="2" label="一年内" value="一年内"></el-option>
  24. <el-option key="3" label="半年内" value="半年内"></el-option>
  25. <el-option key="4" label="三月内" value="三月内"></el-option>
  26. <el-option key="5" label="一月内" value="一月内"></el-option>
  27. <el-option key="6" label="不限" value="不限"></el-option>
  28. </el-select>
  29. <el-input style="margin-left: 20px; width: 230px; color: red;" :value="currentDate" disabled readonly>
  30. <template slot="prepend">价值时点</template>
  31. </el-input>
  32. <el-button style="margin-left: 20px;" type="success" @click="queryFacePrice()">口估查询</el-button>
  33. <el-button style="margin-left: 20px;" type="danger" @click="openFacePrice()" :disabled="dyData.length==0 && queryParam.queryTarget==null || queryParam.queryTarget==''">执行口估</el-button>
  34. </div>
  35. <el-card class="data-class" shadow="never">
  36. <span style="font-weight: bold;">大友个贷数据</span>
  37. <el-tag style="margin: 5px ;" type="danger" effect="plain" size="mini">{{ queryParam.limit }}</el-tag>
  38. <el-tag style="margin: 5px ;" type="danger" effect="plain" size="mini">{{ dyData.length }} 个</el-tag>
  39. <el-divider></el-divider>
  40. <div v-if="dyData.length > 0" style="height: auto; width: 100%; overflow: scroll;max-height: 300px;">
  41. <el-table ref="table" slot="table" size="medium" :data="dyData" border
  42. :header-row-style="{ color: '#333333' }" style="
  43. border-left: 1px solid #ebeced;
  44. border-right: 1px solid #ebeced;
  45. color: #333333;
  46. ">
  47. <el-table-column label="坐落" align="center" prop="location" width="300" show-overflow-tooltip>
  48. <template slot-scope="{row}">
  49. <span>{{ row.location?row.location:'-' }}</span>
  50. </template>
  51. </el-table-column>
  52. <el-table-column label="小区名称" align="center" prop="communityName">
  53. <template slot-scope="{row}">
  54. <span>{{ row.communityName?row.communityName:'-' }}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="评估单价(元)" align="center" prop="price">
  58. <template slot-scope="{row}">
  59. <span style="color: red;">{{ row.price }}</span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column label="评估面积(m²)" align="center" prop="acreage">
  63. <template slot-scope="{row}">
  64. <span style="color: red;">{{ row.acreage }}</span>
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="评估总价(万)" align="center" prop="amount">
  68. <template slot-scope="{row}">
  69. <span style="color: red;">{{ row.amount ? (row.amount / 10000).toFixed(2) + '万' : '-'
  70. }}</span>
  71. </template>
  72. </el-table-column>
  73. <el-table-column label="装修情况" align="center" prop="decoration">
  74. <template slot-scope="{row}">
  75. <span>{{ row.decoration?row.decoration:'-' }}</span>
  76. </template>
  77. </el-table-column>
  78. <el-table-column label="楼层" align="center" prop="atFloor">
  79. <template slot-scope="{row}">
  80. <span>{{ row.atFloor?row.atFloor:'-' }}</span>
  81. </template>
  82. </el-table-column>
  83. <el-table-column label="房屋类型" align="center" prop="buildingType">
  84. <template slot-scope="{row}">
  85. <span>{{ row.buildingType?row.buildingType:'-' }}</span>
  86. </template>
  87. </el-table-column>
  88. <el-table-column label="户型" align="center" prop="houseType">
  89. <template slot-scope="{row}">
  90. <span>{{ row.houseType?row.houseType:'-' }}</span>
  91. </template>
  92. </el-table-column>
  93. <el-table-column label="价值时点" align="center" prop="valueTiming">
  94. <template slot-scope="{row}">
  95. <span>{{ row.valueTiming }}</span>
  96. </template>
  97. </el-table-column>
  98. <el-table-column label="匹配方式" align="center" prop="matching">
  99. <template slot-scope="{row}">
  100. <span>{{ row.matching }}</span>
  101. </template>
  102. </el-table-column>
  103. </el-table>
  104. </div>
  105. <div v-else style="height: 200px; width: 100%;">
  106. <el-empty v-if="msg == null" :image-size=100 description="请查询"></el-empty>
  107. <el-empty v-else :image-size=100 :description="msg"></el-empty>
  108. </div>
  109. </el-card>
  110. <el-card class="data-class" shadow="never">
  111. <span style="font-weight: bold;">系统数据 </span>
  112. <el-tag type="danger" effect="plain" size="mini">{{ queryParam.limit }}</el-tag>
  113. <el-tag style="margin: 5px ;" type="danger" effect="plain" size="mini">{{ enternalData.deals.length +
  114. enternalData.ups.length }} 个</el-tag>
  115. <el-divider></el-divider>
  116. <div style="width: 100%; display: flex;">
  117. <el-card v-if="enternalData.deals.length > 0" class="tab"
  118. :style="activateTable == 'deal' ? activeStyle : disActiveStyle" shadow="hover"
  119. @click.native="activateTable = 'deal'">
  120. <div style="padding: 3px;font-size: 20px;">
  121. <div>
  122. <span style="font-weight: bold; color: red;">成交价:{{ enternalData.dealPrice }} ¥</span> =
  123. <span style="margin-left: 20px; margin-right: 20px; font-weight: bold;">{{
  124. enternalData.dealAvgPrice
  125. }}</span> *
  126. <span style="margin-left: 20px; margin-right: 20px; font-weight: bold;">{{
  127. enternalData.timeParam
  128. }}</span> *
  129. <span style="margin-left: 20px; margin-right: 20px; font-weight: bold;">{{
  130. enternalData.acreageParam
  131. }}</span> *
  132. <span style="margin-left: 20px; margin-right: 20px; font-weight: bold;">{{
  133. enternalData.overAllParam
  134. }}</span>
  135. <span style="margin-left: 50px;">{{ enternalData.deals.length }} 个</span>
  136. </div>
  137. <div>
  138. <el-tag style="margin-left: 200px; font-size: 13px; ">成交均价</el-tag>
  139. <el-tag style="margin-left: 28px; font-size: 13px; ">时间修正</el-tag>
  140. <el-tag style="margin-left: 3px; font-size: 13px; ">面价修正</el-tag>
  141. <el-tag style="margin-left: 3px; font-size: 13px; ">综合修正</el-tag>
  142. </div>
  143. </div>
  144. </el-card>
  145. <el-card v-if="enternalData.ups.length > 0" class="tab"
  146. :style="activateTable == 'up' ? activeStyle : disActiveStyle" shadow="hover"
  147. @click.native="activateTable = 'up'">
  148. <div style="padding: 3px;font-size: 20px;">
  149. <div>
  150. <span style="font-weight: bold; color: red;">挂牌价:{{ enternalData.upPrice }} ¥</span> =
  151. <span style="margin-left: 20px; margin-right: 20px; font-weight: bold;">{{
  152. enternalData.upAvgPrice
  153. }}</span> *
  154. <span style="margin-left: 20px; margin-right: 20px; font-weight: bold;">{{
  155. enternalData.timeParam
  156. }}</span> *
  157. <span style="margin-left: 20px; margin-right: 20px; font-weight: bold;">{{
  158. enternalData.acreageParam
  159. }}</span> *
  160. <span style="margin-left: 20px; margin-right: 20px; font-weight: bold;">{{
  161. enternalData.overAllParam
  162. }}</span>
  163. <span style="margin-left: 50px;">{{ enternalData.ups.length }} 个</span>
  164. </div>
  165. <div>
  166. <el-tag style="margin-left: 200px; font-size: 13px; ">挂牌 均价</el-tag>
  167. <el-tag style="margin-left: 28px; font-size: 13px; ">时间修正</el-tag>
  168. <el-tag style="margin-left: 3px; font-size: 13px; ">面价修正</el-tag>
  169. <el-tag style="margin-left: 3px; font-size: 13px; ">综合修正</el-tag>
  170. </div>
  171. </div>
  172. </el-card>
  173. </div>
  174. <div v-if="enternalData.deals.length > 0" style="width: 100%; overflow: auto;" v-show="activateTable == 'deal'">
  175. <el-table ref="dealTable" slot="table" size="medium" :data="enternalData.deals" border
  176. :header-row-style="{ color: '#333333' }" style="
  177. border-left: 1px solid #ebeced;
  178. border-right: 1px solid #ebeced;
  179. color: #333333;
  180. ">
  181. <el-table-column label="数据源" align="center" prop="dataResource">
  182. <template slot-scope="{row}">
  183. <span style="color: red;">{{ row.dataResource }}</span>
  184. </template>
  185. </el-table-column>
  186. <el-table-column label="小区名称" align="center" prop="communityName">
  187. <template slot-scope="{row}">
  188. <span style="color: red;">{{ row.communityName }}</span>
  189. </template>
  190. </el-table-column>
  191. <el-table-column label="成交单价(元)" align="center" prop="price">
  192. <template slot-scope="{row}">
  193. <span style="color: red;">{{ row.price }}</span>
  194. </template>
  195. </el-table-column>
  196. <el-table-column label="面积(m²)" align="center" prop="acreage">
  197. <template slot-scope="{row}">
  198. <span style="color: red;">{{ row.acreage }}</span>
  199. </template>
  200. </el-table-column>
  201. <el-table-column label="成交总价(万)" align="center" prop="amount">
  202. <template slot-scope="{row}">
  203. <span style="color: red;">{{ row.amount ? (row.amount ) + '万' : '-'
  204. }}</span>
  205. </template>
  206. </el-table-column>
  207. <el-table-column label="挂牌价" align="center" prop="structure">
  208. <template slot-scope="{row}">
  209. <span style="color: red;">{{ row.upPrice?(row.upPrice+'万'):'-' }}</span>
  210. </template>
  211. </el-table-column>
  212. <el-table-column label="成交日期" align="center" prop="dealDate">
  213. <template slot-scope="{row}">
  214. <span style="color: red;">{{ row.dealDate }}</span>
  215. </template>
  216. </el-table-column>
  217. <el-table-column label="区域" align="center" prop="areaName">
  218. <template slot-scope="{row}">
  219. <span>{{ row.areaName }}</span>
  220. </template>
  221. </el-table-column>
  222. <!-- <el-table-column label="板块" align="center" prop="businessName">
  223. <template slot-scope="{row}">
  224. <span>{{ row.businessName }}</span>
  225. </template>
  226. </el-table-column>
  227. <el-table-column label="用途" align="center" prop="useType">
  228. <template slot-scope="{row}">
  229. <span>{{ row.useType }}</span>
  230. </template>
  231. </el-table-column>
  232. <el-table-column label="房屋类型" align="center" prop="buildingType">
  233. <template slot-scope="{row}">
  234. <span>{{ row.buildingType }}</span>
  235. </template>
  236. </el-table-column> -->
  237. <el-table-column label="装修" align="center" prop="decoration">
  238. <template slot-scope="{row}">
  239. <span>{{ row.decoration }}</span>
  240. </template>
  241. </el-table-column>
  242. <el-table-column label="楼层" align="center" prop="floor">
  243. <template slot-scope="{row}">
  244. <span>{{ row.floor }}</span>
  245. </template>
  246. </el-table-column>
  247. <el-table-column label="户型" align="center" prop="houseType">
  248. <template slot-scope="{row}">
  249. <span>{{ row.houseType }}</span>
  250. </template>
  251. </el-table-column>
  252. <el-table-column label="朝向" align="center" prop="orientation">
  253. <template slot-scope="{row}">
  254. <span>{{ row.orientation }}</span>
  255. </template>
  256. </el-table-column>
  257. <el-table-column label="链家数据网址" align="center" prop="structure" show-overflow-tooltip>
  258. <template slot-scope="{row}">
  259. <a :href="row.url" target="_blank">{{ row.url }}</a>
  260. </template>
  261. </el-table-column>
  262. </el-table>
  263. </div>
  264. <div v-if="enternalData.ups.length > 0" style="width: 100%; overflow: auto;" v-show="activateTable == 'up'">
  265. <el-table ref="upTable" slot="table" size="medium" :data="enternalData.ups" border
  266. :header-row-style="{ color: '#333333' }" style="
  267. border-left: 1px solid #ebeced;
  268. border-right: 1px solid #ebeced;
  269. color: #333333;
  270. ">
  271. <el-table-column label="数据源" align="center" prop="dataResource">
  272. <template slot-scope="{row}">
  273. <span style="color: red;">{{ row.dataResource }}</span>
  274. </template>
  275. </el-table-column>
  276. <el-table-column label="小区名称" align="center" prop="communityName">
  277. <template slot-scope="{row}">
  278. <span style="color: red;">{{ row.communityName }}</span>
  279. </template>
  280. </el-table-column>
  281. <el-table-column label="挂牌单价(元)" align="center" prop="price">
  282. <template slot-scope="{row}">
  283. <span style="color: red;">{{ row.price }}</span>
  284. </template>
  285. </el-table-column>
  286. <el-table-column label="面积(m²)" align="center" prop="acreage">
  287. <template slot-scope="{row}">
  288. <span style="color: red;">{{ row.acreage }}</span>
  289. </template>
  290. </el-table-column>
  291. <el-table-column label="挂牌总价(万)" align="center" prop="amount">
  292. <template slot-scope="{row}">
  293. <span style="color: red;">{{ row.amount ? (row.amount / 10000).toFixed(2) + '万' : '-'
  294. }}</span>
  295. </template>
  296. </el-table-column>
  297. <el-table-column label="区域" align="center" prop="areaName">
  298. <template slot-scope="{row}">
  299. <span>{{ row.areaName }}</span>
  300. </template>
  301. </el-table-column>
  302. <el-table-column label="板块" align="center" prop="businessName">
  303. <template slot-scope="{row}">
  304. <span>{{ row.businessName }}</span>
  305. </template>
  306. </el-table-column>
  307. <el-table-column label="用途" align="center" prop="useType">
  308. <template slot-scope="{row}">
  309. <span>{{ row.useType }}</span>
  310. </template>
  311. </el-table-column>
  312. <el-table-column label="房屋类型" align="center" prop="buildingType">
  313. <template slot-scope="{row}">
  314. <span>{{ row.buildingType }}</span>
  315. </template>
  316. </el-table-column>
  317. <el-table-column label="装修" align="center" prop="decoration">
  318. <template slot-scope="{row}">
  319. <span>{{ row.decoration }}</span>
  320. </template>
  321. </el-table-column>
  322. <el-table-column label="楼层" align="center" prop="floor">
  323. <template slot-scope="{row}">
  324. <span>{{ row.floor }}</span>
  325. </template>
  326. </el-table-column>
  327. <el-table-column label="户型" align="center" prop="houseType">
  328. <template slot-scope="{row}">
  329. <span>{{ row.houseType }}</span>
  330. </template>
  331. </el-table-column>
  332. <el-table-column label="朝向" align="center" prop="orientation">
  333. <template slot-scope="{row}">
  334. <span>{{ row.orientation }}</span>
  335. </template>
  336. </el-table-column>
  337. <el-table-column label="结构" align="center" prop="structure">
  338. <template slot-scope="{row}">
  339. <span>{{ row.structure }}</span>
  340. </template>
  341. </el-table-column>
  342. <el-table-column label="挂牌日期" align="center" prop="upDate">
  343. <template slot-scope="{row}">
  344. <span>{{ row.upDate }}</span>
  345. </template>
  346. </el-table-column>
  347. </el-table>
  348. </div>
  349. <div v-else style="height: 200px; width: 100%;">
  350. <el-empty v-if="msg == null" :image-size=100 description="请查询"></el-empty>
  351. <el-empty v-else :image-size=100 :description="msg"></el-empty>
  352. </div>
  353. </el-card>
  354. <el-dialog title="请填入的您的口估价格" :visible.sync="facePriceDialog" width="30%" center top="30vh">
  355. <el-form :model="facePriceFrom" :rules="rules" ref="faceFrom" label-width="100px" class="demo-ruleForm">
  356. <el-form-item label="口估标的:" prop="facePriceTarget">
  357. <el-input v-model="facePriceFrom.facePriceTarget" disabled readonly></el-input>
  358. </el-form-item>
  359. <el-form-item label="楼盘名称:" prop="facePriceTarget">
  360. <el-input v-model="facePriceFrom.communityName" ></el-input>
  361. </el-form-item>
  362. <el-form-item label="口估单价:" prop="facePrice">
  363. <el-input type="number" v-model.number="facePriceFrom.facePrice">
  364. <template slot="append">元</template>
  365. </el-input>
  366. </el-form-item>
  367. <el-form-item label="口估面积:" prop="faceAcreage">
  368. <el-input type="number" v-model.number="facePriceFrom.faceAcreage">
  369. <template slot="append">㎡</template>
  370. </el-input>
  371. </el-form-item>
  372. <el-form-item>
  373. <el-button type="primary" @click="saveFacePrice('ruleForm')">保存口估</el-button>
  374. <el-button @click="facePriceDialog = false">取消</el-button>
  375. </el-form-item>
  376. </el-form>
  377. <!-- <span slot="footer" class="dialog-footer">
  378. <el-button @click="facePriceDialog = false">取 消</el-button>
  379. <el-button type="primary" @click="facePriceDialog = false">确 定</el-button>
  380. </span> -->
  381. </el-dialog>
  382. </div>
  383. </template>
  384. <script>
  385. import YPageListLayout from '@/components/YPageListLayout'
  386. import Breadcrumb from '@/components/Breadcrumb'
  387. export default {
  388. name: 'personalFacePrice',
  389. components: {
  390. Breadcrumb,
  391. YPageListLayout,
  392. },
  393. watch: {
  394. },
  395. computed: {
  396. currentDate() {
  397. let currentDate = new Date();
  398. let year = currentDate.getFullYear();
  399. let month = currentDate.getMonth() + 1; // 注意月份从0开始,需要加1
  400. let day = currentDate.getDate();
  401. return year + "年" + month + "月" + day + "日";
  402. }
  403. },
  404. data() {
  405. return {
  406. dyData: [],
  407. queryType: 'location',
  408. queryParam: {
  409. queryTarget: null,
  410. limit: '一年内'
  411. },
  412. communityName:null,
  413. showQueryTarget: null,
  414. activateTable: 'deal',
  415. activeStyle: "width:50%;height:80px;background-color:#f1f4fd;",
  416. disActiveStyle: "width:50%;height:80px;",
  417. enternalData: {
  418. dealPrice: null,
  419. dealAvgPrice: null,
  420. upPrice: null,
  421. upAvgPrice: null,
  422. timeParam: null,
  423. acreageParam: null,
  424. overAllParam: null,
  425. limit: null,
  426. queryTarget: null,
  427. acreage: null,
  428. deals: [],
  429. ups: []
  430. },
  431. msg: null,
  432. facePriceDialog:false,
  433. rules: {
  434. facePrice: [
  435. { required: true, message: '请输入口估价格', trigger: 'blur' },
  436. ],
  437. faceAcreage: [
  438. { required: true, message: '请输入口估面积', trigger: 'blur' },
  439. ]
  440. },
  441. facePriceFrom:{
  442. facePriceTarget:null,
  443. facePrice:null,
  444. faceAcreage:null,
  445. dealPrice:null,
  446. upPrice:null,
  447. dyAvgPrice:null,
  448. limitDate:null,
  449. queryTarget:null,
  450. queryType:null,
  451. dyExampleNum:null,
  452. externalExampleNum:null,
  453. communityName:null
  454. }
  455. }
  456. },
  457. created() {
  458. },
  459. methods: {
  460. clickCard(val) {
  461. this.activateTable = val;
  462. },
  463. queryFacePrice() {
  464. let query = this.queryParam;
  465. this.communityName = null;
  466. if (this.queryType === 'location') {
  467. if (query.queryTarget!=null && query.queryTarget!='') {
  468. this.personalPriceByLocation(query);
  469. this.externalPriceByLocation(query);
  470. this.showQueryTarget = this.queryParam.queryTarget;
  471. this.msg = '【' + this.showQueryTarget + '】未查询到数据。';
  472. } else {
  473. this.$message.error("口估地址或小区名字不能为空")
  474. }
  475. } else {
  476. if (query.queryTarget!=null && query.queryTarget!='') {
  477. this.personalPriceByCommunity(query);
  478. this.externalPersonalPriceByCommunity(query);
  479. this.showQueryTarget = this.queryParam.queryTarget;
  480. this.msg = '【' + this.showQueryTarget + '】未查询到数据。';
  481. } else {
  482. this.$message.error("口估地址或小区名字不能为空")
  483. }
  484. }
  485. },
  486. personalPriceByLocation(query) {
  487. this.$api.personalFacePrice.personalPriceByLocation(query).then(res => {
  488. if (res.code === 200) {
  489. this.dyData = res.data;
  490. if (this.dyData.length>0){
  491. for (let i in this.dyData){
  492. if (this.dyData[i].communityName){
  493. this.communityName = this.dyData[i].communityName;
  494. break;
  495. }
  496. }
  497. }
  498. }
  499. })
  500. },
  501. externalPriceByLocation(query) {
  502. this.$api.personalFacePrice.externalPriceByLocation(query).then(res => {
  503. if (res.code === 200) {
  504. if (res.data != null) {
  505. this.enternalData = res.data;
  506. if (!this.communityName && this.enternalData.deals.length>0){
  507. for (let i in this.enternalData.deals){
  508. if (this.enternalData.deals[i].communityName){
  509. this.communityName = this.enternalData.deals[i].communityName;
  510. break;
  511. }
  512. }
  513. }
  514. } else {
  515. let emptyObject = new Object();
  516. emptyObject.deals = [];
  517. emptyObject.ups = [];
  518. this.enternalData = emptyObject;
  519. }
  520. }
  521. })
  522. },
  523. personalPriceByCommunity(query) {
  524. this.$api.personalFacePrice.personalPriceByCommunity(query).then(res => {
  525. if (res.code === 200) {
  526. this.dyData = res.data;
  527. if (this.dyData.length>0){
  528. for (let i in this.dyData){
  529. if (this.dyData[i].communityName){
  530. this.communityName = this.dyData[i].communityName;
  531. break;
  532. }
  533. }
  534. }
  535. }
  536. })
  537. },
  538. externalPersonalPriceByCommunity(query) {
  539. this.$api.personalFacePrice.externalPersonalPriceByCommunity(query).then(res => {
  540. if (res.code === 200) {
  541. if (res.data != null) {
  542. this.enternalData = res.data;
  543. if (!this.communityName && this.enternalData.deals.length>0){
  544. for (let i in this.enternalData.deals){
  545. if (this.enternalData.deals[i].communityName){
  546. this.communityName = this.enternalData.deals[i].communityName;
  547. break;
  548. }
  549. }
  550. }
  551. } else {
  552. let emptyObject = new Object();
  553. emptyObject.deals = [];
  554. emptyObject.ups = [];
  555. this.enternalData = emptyObject;
  556. }
  557. }
  558. })
  559. },
  560. openFacePrice() {
  561. this.facePriceDialog = true;
  562. this.facePriceFrom.facePriceTarget = this.queryParam.queryTarget;
  563. this.facePriceFrom.communityName = this.communityName;
  564. },
  565. saveFacePrice(){
  566. this.$refs.faceFrom.validate(valid => {
  567. if (valid){
  568. this.facePriceFrom.dealPrice = this.enternalData.dealPrice;
  569. this.facePriceFrom.upPrice = this.enternalData.upPrice;
  570. this.facePriceFrom.limitDate = this.queryParam.limit;
  571. let total = this.dyData.map(item=>item.price).reduce((accumulator, currentValue) => accumulator + currentValue, 0);
  572. this.facePriceFrom.dyAvgPrice = Math.round(total/this.dyData.length);
  573. this.facePriceFrom.dyExampleNum = this.dyData.length;
  574. this.facePriceFrom.externalExampleNum = this.enternalData.deals.length + this.enternalData.ups.length;
  575. this.facePriceFrom.queryTarget = this.queryParam.queryTarget;
  576. this.facePriceFrom.queryType = this.queryType=='location'?'地址':'楼盘名';
  577. this.$api.personalFacePrice.saveFacePrice(this.facePriceFrom).then(res=>{
  578. if (res.code===200 && res.data){
  579. this.$message.success("执行口估成功")
  580. this.facePriceDialog = false;
  581. }else{
  582. this.$message.error("执行口估失败")
  583. }
  584. });
  585. }
  586. })
  587. },
  588. toke(){
  589. window.open("https://cd.ke.com/chengjiao/rs"+this.communityName+"/",'_blank')
  590. }
  591. },
  592. }
  593. </script>
  594. <style lang="scss" scoped>
  595. .query-class {
  596. margin-top: 20px;
  597. }
  598. .input-with-select {
  599. width: 30%;
  600. height: 30px;
  601. }
  602. .el-select .el-input {
  603. width: 130px;
  604. }
  605. .input-with-select .el-input-group__prepend {
  606. background-color: #fff;
  607. }
  608. /deep/.el-input.is-disabled .el-input__inner {
  609. color: red;
  610. font-weight: bold;
  611. }
  612. // /deep/.el-input__inner{
  613. // color: red;
  614. // font-weight: bold;
  615. // }
  616. /deep/#community{
  617. color: red;
  618. font-weight: bold;
  619. }
  620. .data-class {
  621. margin-top: 20px;
  622. }
  623. .actiateCard {
  624. background-color: #f1f4fd;
  625. }
  626. .tab :hover {
  627. cursor: pointer;
  628. }
  629. </style>