facePrice.vue 34 KB

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