No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

1001 líneas
26 KiB

  1. <template>
  2. <div class="box-center">
  3. <!-- 头 -->
  4. <div class="app-top">
  5. <div class="app-titel" v-if="orgType != 3">
  6. <div
  7. class="label"
  8. >
  9. 项目选择:
  10. </div>
  11. <div style="margin-left: 8px">
  12. <el-select
  13. v-model="searchForm.projectId"
  14. @change="houseChange"
  15. placeholder="请选择"
  16. filterable
  17. >
  18. <el-option
  19. v-for="item in houseList"
  20. :key="item.id"
  21. :label="item.propertyName"
  22. :value="item.id"
  23. >
  24. </el-option>
  25. </el-select>
  26. </div>
  27. </div>
  28. <div class="app-titel">
  29. <div
  30. class="label"
  31. >
  32. 筛选时间:
  33. </div>
  34. <div class="toptimeqhuan">
  35. <el-button
  36. class="btn"
  37. :type="searchForm.dateType == null ? 'primary' : ''"
  38. @click="tabtimetap(null)"
  39. >
  40. 全部
  41. </el-button>
  42. <el-button
  43. class="btn"
  44. :type="searchForm.dateType == 0 ? 'primary' : ''"
  45. @click="tabtimetap(0)"
  46. >
  47. 今日
  48. </el-button>
  49. <el-button
  50. class="btn"
  51. :type="searchForm.dateType == 1 ? 'primary' : ''"
  52. @click="tabtimetap(1)"
  53. >
  54. 昨日
  55. </el-button>
  56. <el-button
  57. class="btn"
  58. :type="searchForm.dateType == 2 ? 'primary' : ''"
  59. @click="tabtimetap(2)"
  60. >
  61. 近7天
  62. </el-button>
  63. </div>
  64. <div style="margin-left: 20px">
  65. <el-date-picker
  66. v-model="time"
  67. type="daterange"
  68. class="div-inp"
  69. range-separator="-"
  70. start-placeholder="开始日期"
  71. :default-time="['00:00:00', '23:59:59']"
  72. value-format="yyyy-MM-dd"
  73. end-placeholder="结束日期"
  74. @change="timeChange"
  75. >
  76. </el-date-picker>
  77. </div>
  78. </div>
  79. <div class="app-titel" style="margin-top: 15px" v-show="isOpen">
  80. <div class="div-lab">
  81. <div class="label">客户名称:</div>
  82. <el-input
  83. class="div-inp"
  84. maxlength="10"
  85. clearable
  86. placeholder="客户名称"
  87. v-model="searchForm.name"
  88. ></el-input>
  89. </div>
  90. <div class="div-lab">
  91. <div class="label">画像标签:</div>
  92. <el-select
  93. class="div-inp"
  94. multiple
  95. clearable
  96. filterable
  97. collapse-tags
  98. v-model="searchForm.keywordsId"
  99. placeholder="请选择"
  100. >
  101. <el-option
  102. v-for="item in keywordsList"
  103. :key="item.keywordsId"
  104. :label="
  105. item.isInterval == 0
  106. ? item.name + '-' + item.endName + item.unit
  107. : item.name
  108. "
  109. :value="item.keywordsId"
  110. >
  111. </el-option>
  112. </el-select>
  113. </div>
  114. <div class="div-lab">
  115. <div class="label">录音类型:</div>
  116. <el-select
  117. v-model="searchForm.recording"
  118. clearable
  119. filterable
  120. placeholder="请选择"
  121. class="div-inp"
  122. >
  123. <el-option
  124. v-for="item in recordingList"
  125. :key="item.value"
  126. :label="item.label"
  127. :value="item.value"
  128. >
  129. </el-option>
  130. </el-select>
  131. </div>
  132. <div class="div-lab">
  133. <div class="label">置业顾问:</div>
  134. <el-select
  135. v-model="searchForm.accountId"
  136. clearable
  137. filterable
  138. placeholder="请选择"
  139. class="div-inp"
  140. >
  141. <el-option
  142. v-for="item in accountList"
  143. :key="item.accountId"
  144. :label="item.name"
  145. :value="item.accountId"
  146. >
  147. </el-option>
  148. </el-select>
  149. </div>
  150. <div class="div-lab">
  151. <!-- 默认全部 -->
  152. <div class="label">标记顾问:</div>
  153. <el-select
  154. v-model="searchForm.markAdvisor"
  155. placeholder="请选择"
  156. class="div-inp"
  157. filterable
  158. clearable
  159. >
  160. <el-option
  161. v-for="item in options5"
  162. :key="item.value"
  163. :label="item.label"
  164. :value="item.value"
  165. >
  166. </el-option>
  167. </el-select>
  168. </div>
  169. <div class="div-lab" v-if="false">
  170. <!-- 默认全部 -->
  171. <div class="label">是否违禁:</div>
  172. <el-select
  173. v-model="searchForm.taboo"
  174. placeholder="请选择"
  175. class="div-inp"
  176. filterable
  177. clearable
  178. >
  179. <el-option
  180. v-for="item in options11"
  181. :key="item.value"
  182. :label="item.label"
  183. :value="item.value"
  184. >
  185. </el-option>
  186. </el-select>
  187. </div>
  188. <!-- <div class="div-lab">
  189. <div class="label">是否加精:</div>
  190. <el-select
  191. v-model="searchForm.zfal"
  192. placeholder="请选择"
  193. class="div-inp"
  194. filterable
  195. clearable
  196. >
  197. <el-option
  198. v-for="item in options12"
  199. :key="item.value"
  200. :label="item.label"
  201. :value="item.value"
  202. >
  203. </el-option>
  204. </el-select>
  205. </div> -->
  206. <div class="div-lab">
  207. <div class="label">接待时长:</div>
  208. <el-select
  209. clearable
  210. filterable
  211. v-model="searchForm.recDurationInterval"
  212. placeholder="请选择"
  213. class="div-inp"
  214. >
  215. <el-option
  216. v-for="item in options3"
  217. :key="item.value"
  218. :label="item.label"
  219. :value="item.value"
  220. >
  221. </el-option>
  222. </el-select>
  223. </div>
  224. <div class="div-lab">
  225. <div class="label">到访次数:</div>
  226. <el-select
  227. v-model="searchForm.visitRecord"
  228. clearable
  229. filterable
  230. placeholder="请选择"
  231. class="div-inp"
  232. >
  233. <el-option
  234. v-for="item in options4"
  235. :key="item.value"
  236. :label="item.label"
  237. :value="item.value"
  238. >
  239. </el-option>
  240. </el-select>
  241. </div>
  242. <!-- <div class="div-lab">
  243. <div class="label">推荐案例:</div>
  244. <el-select
  245. v-model="searchForm.zfal"
  246. clearable
  247. filterable
  248. placeholder="请选择"
  249. class="div-inp"
  250. >
  251. <el-option
  252. v-for="item in options14"
  253. :key="item.value"
  254. :label="item.label"
  255. :value="item.value"
  256. ></el-option>
  257. </el-select>
  258. </div> -->
  259. <div class="div-lab">
  260. <div class="label">接待标识:</div>
  261. <el-select
  262. v-model="searchForm.validInvalid"
  263. clearable
  264. filterable
  265. placeholder="请选择"
  266. class="div-inp"
  267. >
  268. <el-option
  269. v-for="item in options13"
  270. :key="item.value"
  271. :label="item.label"
  272. :value="item.value"
  273. ></el-option>
  274. </el-select>
  275. </div>
  276. </div>
  277. <div class="app-titel" style="margin-top: 15px">
  278. <div style="margin-left: 110px">
  279. <el-button type="primary" @click="screen">筛选</el-button>
  280. </div>
  281. <div style="margin-left: 20px">
  282. <el-button @click="clearScreen" type="text">清空筛选条件</el-button>
  283. </div>
  284. <el-button style="margin-left: 10px" @click="isSystoleForm" type="text"
  285. >{{ isOpen ? "收起" : "展开"
  286. }}<i
  287. style="margin-left: 5px"
  288. :class="isOpen ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
  289. ></i
  290. ></el-button>
  291. <div
  292. style="margin-left: auto; margin-right: 10px"
  293. v-if="rec_index_downLoad"
  294. >
  295. <el-button @click="downLoad" icon="el-icon-download">
  296. 导出</el-button>
  297. </div>
  298. </div>
  299. </div>
  300. <!-- 表格 -->
  301. <div class="cen-tab">
  302. <el-table
  303. :header-cell-style="{ background: '#F5F7FA', color: '#333333' }"
  304. :data="tableData"
  305. stripe
  306. style="width: 100%"
  307. >
  308. <el-table-column
  309. prop="staTime"
  310. label="接待开始时间"
  311. align="center"
  312. width="200"
  313. sortable
  314. height="390"
  315. >
  316. </el-table-column>
  317. <el-table-column prop="agentName" label="顾问" align="center">
  318. </el-table-column>
  319. <el-table-column prop="name" label="客户" align="center">
  320. </el-table-column>
  321. <!-- <el-table-column prop="visitRecordName" label="到访次数" align="center">
  322. </el-table-column> -->
  323. <el-table-column
  324. prop="mm"
  325. label="录音时长"
  326. align="center"
  327. width="100"
  328. sortable
  329. >
  330. </el-table-column>
  331. <el-table-column prop="recording" label="录音类型" align="center">
  332. <template slot-scope="{ row }">
  333. {{
  334. row.recording == 0
  335. ? "没有录音"
  336. : row.recording == 1
  337. ? "部分录音"
  338. : "完整录音"
  339. }}
  340. </template>
  341. </el-table-column>
  342. <el-table-column prop="markAdvisor" label="标记顾问" align="center">
  343. <template slot-scope="{ row }">
  344. {{ row.markAdvisor == 0 ? "未标记" : "已标记" }}
  345. </template>
  346. </el-table-column>
  347. <el-table-column
  348. prop="total"
  349. label="画像标签触达次数"
  350. align="center"
  351. width="150"
  352. sortable
  353. >
  354. </el-table-column>
  355. <el-table-column prop="fraction" label="执行率" align="center" sortable>
  356. <template slot-scope="{ row }"> {{ row.fraction || "0" }}% </template>
  357. </el-table-column>
  358. <!-- <el-table-column prop="address" label="禁忌执行率" align="center">
  359. </el-table-column> -->
  360. <!-- scope -->
  361. <!-- <el-table-column prop="taboo" label="是否违禁" align="center">
  362. <template slot-scope="{ row }">
  363. {{ row.taboo == 0 ? "否" : "是" }}
  364. </template>
  365. </el-table-column> -->
  366. <!-- <el-table-column prop="zfal" label="是否加精" align="center">
  367. <template slot-scope="{ row }">
  368. {{ row.zfal == 0 ? "已加精" : "未加精" }}
  369. </template>
  370. </el-table-column> -->
  371. <el-table-column
  372. prop="validInvalidName"
  373. label="接待标识"
  374. align="center"
  375. ></el-table-column>
  376. <!-- <el-table-column
  377. prop="zfalName"
  378. label="推荐案例"
  379. align="center"
  380. ></el-table-column> -->
  381. <el-table-column label="操作" align="center" width="80" fixed="right">
  382. <template slot-scope="{ row }">
  383. <el-button
  384. type="text"
  385. v-if="rec_index_show"
  386. @click="Receivedetailsabout(row)"
  387. >查看</el-button
  388. >
  389. <!-- To Doing?按钮未添加权限判断 下一版本开发(删除) -->
  390. <!-- <el-button type="text" @click="deleteReceive(row)">删除</el-button> -->
  391. <!-- <el-button type="text" v-if="rec_index_text">下载文本</el-button>
  392. <el-button type="text" v-if="rec_index_voice">下载录音</el-button> -->
  393. </template>
  394. </el-table-column>
  395. </el-table>
  396. <div style="display: flex; justify-content: flex-end; margin-top: 10px">
  397. <el-pagination
  398. @size-change="handleSizeChange"
  399. @current-change="handleCurrentChange"
  400. :current-page="currentPage"
  401. :page-sizes="[10, 20,30,40, 50,100]"
  402. :page-size="size"
  403. layout="total, sizes, prev, pager, next, jumper"
  404. :total="total"
  405. >
  406. </el-pagination>
  407. </div>
  408. </div>
  409. </div>
  410. </template>
  411. <script>
  412. import { mapGetters } from "vuex";
  413. import { exportMethodPost } from "@/util/util";
  414. export default {
  415. data() {
  416. return {
  417. isOpen: false,
  418. TimetoAhoose: 2,
  419. time: [],
  420. houseList: [],
  421. orgType: localStorage.getItem("orgType"),
  422. options: [],
  423. keywordsList: [],
  424. accountList: [],
  425. recordingList: [
  426. {
  427. value: "0",
  428. label: "没有录音",
  429. },
  430. {
  431. value: "1",
  432. label: "部分录音",
  433. },
  434. {
  435. value: "2",
  436. label: "完整录音",
  437. },
  438. {
  439. value: "3",
  440. label: "未传完",
  441. },
  442. ],
  443. options3: [
  444. {
  445. value: "1",
  446. label: "0-15分钟",
  447. },
  448. {
  449. value: "2",
  450. label: "15-30分钟",
  451. },
  452. {
  453. value: "3",
  454. label: "30-60分钟",
  455. },
  456. {
  457. value: "4",
  458. label: "60-90分钟",
  459. },
  460. {
  461. value: "5",
  462. label: "90分钟以上",
  463. },
  464. ],
  465. options4: [
  466. {
  467. value: "1",
  468. label: "首次到访",
  469. },
  470. {
  471. value: "2",
  472. label: "2次到访",
  473. },
  474. {
  475. value: "3",
  476. label: "3次到访",
  477. },
  478. {
  479. value: "4",
  480. label: "三次以上",
  481. },
  482. ],
  483. options5: [
  484. {
  485. value: "1",
  486. label: "已标记",
  487. },
  488. {
  489. value: "0",
  490. label: "未标记",
  491. },
  492. ],
  493. options11: [
  494. {
  495. value: "0",
  496. label: "否",
  497. },
  498. {
  499. value: "1",
  500. label: "是",
  501. },
  502. ],
  503. options12: [
  504. {
  505. value: "0",
  506. label: "已加精",
  507. },
  508. {
  509. value: "1",
  510. label: "未加精",
  511. },
  512. ],
  513. options13: [
  514. {
  515. label: "全部",
  516. value: "",
  517. },
  518. {
  519. label: "有效接待",
  520. value: "0",
  521. },
  522. {
  523. label: "无效接待",
  524. value: "1",
  525. },
  526. ],
  527. options14: [
  528. // 正反案例
  529. {
  530. label: "全部",
  531. value: "",
  532. },
  533. {
  534. label: "正面案例",
  535. value: "0",
  536. },
  537. {
  538. label: "反面案例",
  539. value: "1",
  540. },
  541. ],
  542. currentPage: 1,
  543. size: 10,
  544. total: 10,
  545. value: "",
  546. input: "",
  547. tableData: [],
  548. tophove: "",
  549. type: "0",
  550. searchForm: {
  551. name: "",
  552. keywordsId: [],
  553. recording: "",
  554. markAdvisor: null,
  555. recDurationInterval: "",
  556. visitRecord: "",
  557. staDate: "",
  558. endDate: "",
  559. houseType: "",
  560. dateType: null,
  561. projectId: "",
  562. taboo: "",
  563. zfal: "", // 正反案例 0:正面案例 1:反面案例
  564. validInvalid: "", // 是否为有效接待 0:有效 1:无效
  565. },
  566. rec_index_show: false, // 按钮权限
  567. rec_index_text: false, // 按钮权限
  568. rec_index_voice: false, // 按钮权限
  569. rec_index_downLoad: false, // 按钮权限
  570. };
  571. },
  572. computed: {
  573. ...mapGetters(["permissions"]),
  574. },
  575. activated() {
  576. if (this.$route.query.types) {
  577. if (this.$route.query.types.indexOf("&") != -1) {
  578. let arr = this.$route.query.types.split("&");
  579. arr.forEach((item) => {
  580. let as = item.split(",");
  581. this.searchForm[as[0]] = as[1];
  582. });
  583. } else {
  584. let arr = this.$route.query.types.split(",");
  585. this.searchForm[arr[0]] = arr[1];
  586. }
  587. }
  588. if (this.$route.query.date) {
  589. this.time = this.$route.query.date.split(",");
  590. this.searchForm.staDate = this.time[0];
  591. this.searchForm.endDate = this.time[1];
  592. console.log("时间");
  593. }
  594. if (this.$route.query.validInvalid) {
  595. this.searchForm.validInvalid = this.$route.query.validInvalid;
  596. }
  597. if (this.$route.query.markAdvisor) {
  598. this.searchForm.markAdvisor = this.$route.query.markAdvisor;
  599. }
  600. if (this.$route.query.dateType) {
  601. this.searchForm.dateType = this.$route.query.dateType;
  602. }
  603. if (this.$route.query.staDate) {
  604. // this.searchForm.dateType = this.$route.query.dateType;
  605. this.searchForm.staDate = this.$route.query.staDate;
  606. }
  607. if (this.$route.query.endDate) {
  608. // this.searchForm.dateType = this.$route.query.dateType;
  609. this.searchForm.endDate = this.$route.query.endDate;
  610. }
  611. if (this.$route.query.houseId) {
  612. this.searchForm.projectId = this.$route.query.houseId;
  613. }
  614. // 获取项目列表
  615. this.zkhousePage();
  616. },
  617. created() {
  618. if (this.$route.query.types) {
  619. if (this.$route.query.types.indexOf("&") != -1) {
  620. let arr = this.$route.query.types.split("&");
  621. arr.forEach((item) => {
  622. let as = item.split(",");
  623. this.searchForm[as[0]] = as[1];
  624. });
  625. } else {
  626. let arr = this.$route.query.types.split(",");
  627. this.searchForm[arr[0]] = arr[1];
  628. }
  629. }
  630. if (this.$route.query.date) {
  631. this.time = this.$route.query.date.split(",");
  632. this.searchForm.staDate = this.time[0];
  633. this.searchForm.endDate = this.time[1];
  634. console.log("时间");
  635. }
  636. if (this.$route.query.validInvalid) {
  637. this.searchForm.validInvalid = this.$route.query.validInvalid;
  638. }
  639. if (this.$route.query.markAdvisor) {
  640. this.searchForm.markAdvisor = this.$route.query.markAdvisor;
  641. }
  642. if (this.$route.query.dateType) {
  643. this.searchForm.dateType = this.$route.query.dateType;
  644. }
  645. if (this.$route.query.staDate) {
  646. // this.searchForm.dateType = this.$route.query.dateType;
  647. this.searchForm.staDate = this.$route.query.staDate;
  648. }
  649. if (this.$route.query.endDate) {
  650. // this.searchForm.dateType = this.$route.query.dateType;
  651. this.searchForm.endDate = this.$route.query.endDate;
  652. }
  653. if (this.$route.query.houseId) {
  654. this.searchForm.projectId = this.$route.query.houseId;
  655. }
  656. this.rec_index_show = this.permissions["rec_index_show"];
  657. this.rec_index_text = this.permissions["rec_index_text"];
  658. this.rec_index_voice = this.permissions["rec_index_voice"];
  659. this.rec_index_downLoad = this.permissions["rec_index_downLoad"];
  660. },
  661. mounted() {
  662. // 获取项目列表
  663. this.zkhousePage();
  664. },
  665. methods: {
  666. isSystoleForm() {
  667. this.isOpen = !this.isOpen;
  668. },
  669. // 清除上次进入遗留的数据
  670. resetParams() {
  671. this.searchForm.taboo = "";
  672. this.searchForm.validInvalid = "";
  673. this.searchForm.endDate = "";
  674. this.searchForm.staDate = "";
  675. this.time = "";
  676. },
  677. downLoad() {
  678. let obj = {
  679. type: 1,
  680. ...this.searchForm,
  681. };
  682. obj.keywordIds = obj.keywordsId.join(",");
  683. obj.dateType = this.searchForm.staDate ? null : this.searchForm.dateType;
  684. exportMethodPost("autoSR/customer/pageExport", "接待记录", obj);
  685. },
  686. // 跳转接待详情
  687. Receivedetailsabout(row) {
  688. this.$api.http.findByCusIdcusId({ cusId: row.id }).then((res) => {
  689. if (res.data.length == 0) {
  690. this.$message({
  691. message: "无录音",
  692. type: "warning",
  693. });
  694. } else {
  695. this.$router.push({
  696. path: "/Receive/index",
  697. query: { flag: row.id, AudioIdx: 0 },
  698. });
  699. }
  700. });
  701. },
  702. // 删除此条接待记录
  703. deleteReceive(row) {
  704. console.log(row);
  705. },
  706. // 接待记录列表
  707. findbypage() {
  708. let obj = {
  709. current: this.currentPage,
  710. size: this.size,
  711. type: 1,
  712. ...this.searchForm,
  713. };
  714. if (this.$route.query.houseId) {
  715. obj.projectId = this.$route.query.houseId;
  716. }
  717. obj.keywordIds = obj.keywordsId.join(",");
  718. obj.dateType = this.searchForm.staDate ? null : this.searchForm.dateType;
  719. this.$api.api.findbypage(obj).then((res) => {
  720. // console.log(res)
  721. this.tableData = res.data.records;
  722. this.total = res.data.total;
  723. });
  724. },
  725. clearScreen() {
  726. this.currentPage = 1;
  727. this.searchForm = {
  728. name: "",
  729. keywordsId: [],
  730. recording: "",
  731. markAdvisor: null,
  732. recDurationInterval: "",
  733. visitRecord: "",
  734. staDate: "",
  735. endDate: "",
  736. houseType: "",
  737. dateType: null,
  738. taboo: "",
  739. zfal: "",
  740. // projectId: this.houseList[0].id,
  741. projectId:
  742. this.orgType == 3
  743. ? localStorage.getItem("houseId")
  744. : this.houseList[0].id,
  745. };
  746. if (this.$route.query.houseId) {
  747. this.searchForm.projectId = this.$route.query.houseId;
  748. }
  749. this.findbypage();
  750. },
  751. houseChange() {
  752. this.findbypage();
  753. this.findKeywords();
  754. // 获取置业顾问列表
  755. this.findUserListByHouseId();
  756. },
  757. timeChange(e) {
  758. if (!e) {
  759. this.searchForm.dateType = null;
  760. this.searchForm.staDate = "";
  761. this.searchForm.endDate = "";
  762. } else {
  763. console.log(e, "asdkasljdlksajl");
  764. this.searchForm.dateType = null;
  765. this.searchForm.staDate = e[0];
  766. this.searchForm.endDate = e[1];
  767. }
  768. this.houseChange();
  769. },
  770. screen() {
  771. this.currentPage = 1;
  772. console.log(this.searchForm);
  773. this.findbypage();
  774. },
  775. findKeywords() {
  776. this.$api.api
  777. .findKeywords({
  778. dateType: this.searchForm.staDate ? null : this.searchForm.dateType,
  779. statDateStart: this.searchForm.staDate,
  780. statDateEnd: this.searchForm.endDate,
  781. projectId: this.searchForm.projectId,
  782. type: this.type,
  783. })
  784. .then((res) => {
  785. console.log(res);
  786. this.keywordsList = res.data;
  787. });
  788. },
  789. zkhousePage() {
  790. this.$api.api
  791. .findHouseByUser({
  792. orgType: localStorage.getItem("orgType"),
  793. })
  794. .then((res) => {
  795. // console.log(res)
  796. this.houseList = res.data;
  797. if (localStorage.getItem("orgType") == 3) {
  798. if (this.$route.query.houseId) {
  799. this.searchForm.projectId = this.$route.query.houseId;
  800. } else {
  801. this.searchForm.projectId = localStorage.getItem("houseId");
  802. }
  803. } else {
  804. this.searchForm.projectId = res.data[0].id;
  805. }
  806. this.houseChange();
  807. });
  808. },
  809. // 置业顾问列表
  810. async findUserListByHouseId() {
  811. let result = await this.$api.api.findUserListByHouseId({
  812. orgType: localStorage.getItem("orgType"),
  813. projectId: this.searchForm.projectId,
  814. });
  815. console.log(result);
  816. this.accountList = result.data;
  817. },
  818. handleSizeChange(val) {
  819. console.log(`每页 ${val} 条`);
  820. this.size = val;
  821. this.findbypage();
  822. },
  823. handleCurrentChange(val) {
  824. console.log(`当前页: ${val}`);
  825. this.currentPage = val;
  826. this.findbypage();
  827. },
  828. tabtimetap(idx) {
  829. this.searchForm.staDate = "";
  830. this.searchForm.endDate = "";
  831. // this.$set(this, "time", null);
  832. this.searchForm.dateType = idx;
  833. this.time = [];
  834. this.houseChange();
  835. },
  836. timestampToTime(timestamp) {
  837. var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  838. // var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  839. var yyyy = date.getFullYear() + "-";
  840. var MM =
  841. (date.getMonth() + 1 < 10
  842. ? "0" + (date.getMonth() + 1)
  843. : date.getMonth() + 1) + "-";
  844. // var dd = date.getDate() + ' ';
  845. var dd =
  846. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  847. return yyyy + MM + dd;
  848. },
  849. },
  850. watch: {
  851. $route(to, from) {
  852. this.resetParams();
  853. //监听路由是否变化
  854. if (to.query.types != from.query.types && to.query.types != null) {
  855. let arr = this.$route.query.types.split(",");
  856. this.searchForm[arr[0]] = arr[1];
  857. }
  858. if (to.query.date != from.query.date && to.query.date != null) {
  859. this.time = this.$route.query.date.split(",");
  860. this.searchForm.staDate = this.time[0];
  861. this.searchForm.endDate = this.time[1];
  862. }
  863. },
  864. },
  865. };
  866. </script>
  867. <style scoped="scoped" lang="scss" >
  868. .box-center {
  869. width: 100%;
  870. padding: 5px 15px 40px;
  871. min-width: 1000px;
  872. }
  873. .cen-tab {
  874. width: 100%;
  875. padding: 15px;
  876. background: #ffffff;
  877. margin-top: 15px;
  878. }
  879. .tophove {
  880. color: #ffffff;
  881. background: #2671e2;
  882. }
  883. .app-top {
  884. width: 100%;
  885. background: #ffffff;
  886. box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
  887. border-radius: 4px;
  888. padding-top: 15px;
  889. padding-bottom: 15px;
  890. .app-titel {
  891. width: 100%;
  892. display: flex;
  893. align-items: center;
  894. flex-wrap: wrap;
  895. .label {
  896. font-size: 16px;
  897. font-weight: 400;
  898. color: #32363d;
  899. line-height: 32px;
  900. min-width: 100px;
  901. text-align: right;
  902. }
  903. .toptimeqhuan {
  904. height: 30px;
  905. background: #ffffff;
  906. display: flex;
  907. align-items: center;
  908. margin-left: 9px;
  909. }
  910. .toptimeqhuan div {
  911. padding-left: 20px;
  912. padding-right: 20px;
  913. text-align: center;
  914. line-height: 30px;
  915. font-size: 14px;
  916. margin-right: 15px;
  917. border-radius: 4px;
  918. border: 1px solid #e0e0e0;
  919. }
  920. .toptimeqhuan .btn {
  921. padding-left: 20px;
  922. padding-right: 20px;
  923. text-align: center;
  924. font-size: 14px;
  925. border-radius: 4px;
  926. border: 1px solid #e0e0e0;
  927. }
  928. }
  929. }
  930. .div-lab {
  931. display: flex;
  932. margin: 5px;
  933. }
  934. .div-inp {
  935. width: 250px;
  936. }
  937. /deep/ .el-table__header-wrapper {
  938. thead {
  939. tr {
  940. th {
  941. background: #f5f7fa;
  942. color: #333333;
  943. }
  944. }
  945. }
  946. }
  947. /deep/ .el-button--primary {
  948. background: #2671e2 !important;
  949. border: 1px solid #2671e2 !important;
  950. }
  951. /deep/ .el-button--text {
  952. color: #2671e2;
  953. }
  954. </style>