You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1189 lines
32 KiB

  1. <template>
  2. <div class="box-center">
  3. <!-- 头 -->
  4. <div class="app-top">
  5. <div class="app-titel" v-if="orgType != 3" style="margin-bottom: 10px">
  6. <div class="label">项目选择:</div>
  7. <div style="margin-left: 8px">
  8. <el-select
  9. v-model="searchForm.projectId"
  10. @change="houseChange"
  11. placeholder="请选择"
  12. filterable
  13. >
  14. <el-option
  15. v-for="item in houseList"
  16. :key="item.id"
  17. :label="item.propertyName"
  18. :value="item.id"
  19. >
  20. </el-option>
  21. </el-select>
  22. </div>
  23. </div>
  24. <div class="app-titel">
  25. <div class="label">筛选时间:</div>
  26. <div class="toptimeqhuan">
  27. <el-button
  28. class="btn"
  29. :type="searchForm.dateType == null ? 'primary' : ''"
  30. @click="tabtimetap(null)"
  31. >
  32. 全部
  33. </el-button>
  34. <el-button
  35. class="btn"
  36. :type="searchForm.dateType == 0 ? 'primary' : ''"
  37. @click="tabtimetap(0)"
  38. >
  39. 今日
  40. </el-button>
  41. <el-button
  42. class="btn"
  43. :type="searchForm.dateType == 1 ? 'primary' : ''"
  44. @click="tabtimetap(1)"
  45. >
  46. 昨日
  47. </el-button>
  48. <el-button
  49. class="btn"
  50. :type="searchForm.dateType == 2 ? 'primary' : ''"
  51. @click="tabtimetap(2)"
  52. >
  53. 近7天
  54. </el-button>
  55. </div>
  56. <div style="margin-left: 20px">
  57. <el-date-picker
  58. v-model="time"
  59. type="daterange"
  60. class="div-inp"
  61. range-separator="-"
  62. start-placeholder="开始日期"
  63. :default-time="['00:00:00', '23:59:59']"
  64. value-format="yyyy-MM-dd"
  65. end-placeholder="结束日期"
  66. @change="timeChange"
  67. >
  68. </el-date-picker>
  69. </div>
  70. </div>
  71. <div class="app-titel" style="margin-top: 15px" v-show="isOpen">
  72. <div class="div-lab">
  73. <div class="label">客户名称:</div>
  74. <el-input
  75. class="div-inp"
  76. maxlength="10"
  77. clearable
  78. placeholder="客户名称"
  79. v-model="searchForm.name"
  80. ></el-input>
  81. </div>
  82. <div class="div-lab">
  83. <div class="label">画像标签:</div>
  84. <el-select
  85. class="div-inp"
  86. multiple
  87. clearable
  88. filterable
  89. collapse-tags
  90. v-model="searchForm.keywordsId"
  91. placeholder="请选择"
  92. >
  93. <el-option
  94. v-for="item in keywordsList"
  95. :key="item.keywordsId"
  96. :label="
  97. item.isInterval == 0
  98. ? item.name + '-' + item.endName + item.unit
  99. : item.name
  100. "
  101. :value="item.keywordsId"
  102. >
  103. </el-option>
  104. </el-select>
  105. </div>
  106. <div class="div-lab">
  107. <div class="label">录音类型:</div>
  108. <el-select
  109. v-model="searchForm.recording"
  110. clearable
  111. filterable
  112. placeholder="请选择"
  113. class="div-inp"
  114. >
  115. <el-option
  116. v-for="item in recordingList"
  117. :key="item.value"
  118. :label="item.label"
  119. :value="item.value"
  120. >
  121. </el-option>
  122. </el-select>
  123. </div>
  124. <div class="div-lab">
  125. <div class="label">置业顾问:</div>
  126. <el-select
  127. v-model="searchForm.accountId"
  128. clearable
  129. filterable
  130. placeholder="请选择"
  131. class="div-inp"
  132. >
  133. <el-option
  134. v-for="item in accountList"
  135. :key="item.accountId"
  136. :label="item.name"
  137. :value="item.accountId"
  138. >
  139. </el-option>
  140. </el-select>
  141. </div>
  142. <div class="div-lab">
  143. <!-- 默认全部 -->
  144. <div class="label">标记顾问:</div>
  145. <el-select
  146. v-model="searchForm.markAdvisor"
  147. placeholder="请选择"
  148. class="div-inp"
  149. filterable
  150. clearable
  151. >
  152. <el-option
  153. v-for="item in options5"
  154. :key="item.value"
  155. :label="item.label"
  156. :value="item.value"
  157. >
  158. </el-option>
  159. </el-select>
  160. </div>
  161. <div class="div-lab" v-if="false">
  162. <!-- 默认全部 -->
  163. <div class="label">是否违禁:</div>
  164. <el-select
  165. v-model="searchForm.taboo"
  166. placeholder="请选择"
  167. class="div-inp"
  168. filterable
  169. clearable
  170. >
  171. <el-option
  172. v-for="item in options11"
  173. :key="item.value"
  174. :label="item.label"
  175. :value="item.value"
  176. >
  177. </el-option>
  178. </el-select>
  179. </div>
  180. <div class="div-lab">
  181. <div class="label">接待时长:</div>
  182. <el-select
  183. clearable
  184. filterable
  185. v-model="searchForm.recDurationInterval"
  186. placeholder="请选择"
  187. class="div-inp"
  188. >
  189. <el-option
  190. v-for="item in options3"
  191. :key="item.value"
  192. :label="item.label"
  193. :value="item.value"
  194. >
  195. </el-option>
  196. </el-select>
  197. </div>
  198. <div class="div-lab">
  199. <div class="label">到访次数:</div>
  200. <el-select
  201. v-model="searchForm.visitRecord"
  202. clearable
  203. filterable
  204. placeholder="请选择"
  205. class="div-inp"
  206. >
  207. <el-option
  208. v-for="item in options4"
  209. :key="item.value"
  210. :label="item.label"
  211. :value="item.value"
  212. >
  213. </el-option>
  214. </el-select>
  215. </div>
  216. <div class="div-lab">
  217. <div class="label">接待标识:</div>
  218. <el-select
  219. v-model="searchForm.validInvalid"
  220. clearable
  221. filterable
  222. placeholder="请选择"
  223. class="div-inp"
  224. >
  225. <el-option
  226. v-for="item in options13"
  227. :key="item.value"
  228. :label="item.label"
  229. :value="item.value"
  230. ></el-option>
  231. </el-select>
  232. </div>
  233. <div class="div-lab">
  234. <div class="label">销讲执行:</div>
  235. <el-select
  236. v-model="searchForm.fractions"
  237. class="div-inp"
  238. clearable
  239. filterable
  240. placeholder="请选择"
  241. >
  242. <el-option label="30%及以下" :value="1"></el-option>
  243. <el-option label="31%~50%" :value="2"></el-option>
  244. <el-option label="51%~70%" :value="3"></el-option>
  245. <el-option label="71%及以上" :value="4"></el-option>
  246. </el-select>
  247. </div>
  248. <div class="div-lab">
  249. <div class="label">需求挖掘:</div>
  250. <el-select
  251. v-model="searchForm.wordFractions"
  252. class="div-inp"
  253. clearable
  254. filterable
  255. placeholder="请选择"
  256. >
  257. <el-option label="30%及以下" :value="1"></el-option>
  258. <el-option label="31%~50%" :value="2"></el-option>
  259. <el-option label="51%~70%" :value="3"></el-option>
  260. <el-option label="71%及以上" :value="4"></el-option>
  261. </el-select>
  262. </div>
  263. <div class="div-lab">
  264. <div class="label">挖掘话术:</div>
  265. <el-select
  266. v-model="searchForm.questionId"
  267. clearable
  268. filterable
  269. placeholder="请选择"
  270. class="div-inp"
  271. >
  272. <el-option
  273. v-for="item in questionList"
  274. :key="item.id"
  275. :label="item.question"
  276. :value="item.id"
  277. ></el-option>
  278. </el-select>
  279. </div>
  280. <div class="div-lab">
  281. <div class="label">无效接待原因:</div>
  282. <el-select
  283. v-model="searchForm.invalidReason"
  284. clearable
  285. filterable
  286. placeholder="请选择"
  287. class="div-inp"
  288. >
  289. <el-option
  290. v-for="item in marketingInvalidList"
  291. :key="item.id"
  292. :label="item.name"
  293. :value="item.id"
  294. ></el-option>
  295. </el-select>
  296. </div>
  297. <div class="div-lab">
  298. <div class="label">销讲业务:</div>
  299. <el-select
  300. class="div-inp"
  301. v-model="searchForm.marketingBusiness"
  302. multiple
  303. clearable
  304. filterable
  305. collapse-tags
  306. placeholder="请选择"
  307. >
  308. <el-option
  309. v-for="item in templateList"
  310. :key="item.id"
  311. :label="item.templateName"
  312. :value="item.id"
  313. >
  314. </el-option>
  315. </el-select>
  316. </div>
  317. </div>
  318. <div class="app-titel" style="margin-top: 15px">
  319. <div style="margin-left: 110px">
  320. <el-button type="primary" @click="screen">筛选</el-button>
  321. </div>
  322. <div style="margin-left: 20px">
  323. <el-button @click="clearScreen" type="text">清空筛选条件</el-button>
  324. </div>
  325. <el-button style="margin-left: 10px" @click="isSystoleForm" type="text"
  326. >{{ isOpen ? "收起" : "展开"
  327. }}<i
  328. style="margin-left: 5px"
  329. :class="isOpen ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
  330. ></i
  331. ></el-button>
  332. <div
  333. style="margin-left: auto; margin-right: 10px"
  334. v-if="rec_index_downLoad"
  335. >
  336. <el-button @click="downLoad" icon="el-icon-download"> 导出</el-button>
  337. </div>
  338. </div>
  339. </div>
  340. <!-- 表格 -->
  341. <div class="cen-tab">
  342. <avue-crud
  343. ref="crud"
  344. :page.sync="page"
  345. :data="tableData"
  346. :table-loading="tableLoading"
  347. :option="tableOption"
  348. :show-column.sync="showColumn"
  349. @size-change="handleSizeChange"
  350. @current-change="handleCurrentChange"
  351. >
  352. <template slot-scope="{ row }" slot="menu">
  353. <div style="display: flex;">
  354. <el-button
  355. type="text"
  356. v-if="rec_index_show"
  357. @click="Receivedetailsabout(row)"
  358. >查看</el-button
  359. >
  360. <el-button
  361. type="text"
  362. v-if="rec_rewrite_show && row.mergeFlag == 0"
  363. @click="reWriteagain(row)"
  364. >重新转写</el-button
  365. >
  366. <el-button
  367. type="text"
  368. v-if="rec_rewrite_show && row.mergeFlag == 1"
  369. @click="reWriteagains(row)"
  370. >重新合并</el-button
  371. >
  372. <el-button
  373. type="text"
  374. v-if="permissions.rec_index_delete"
  375. @click="deleteCS(row)"
  376. >
  377. 删除接待
  378. </el-button>
  379. </div>
  380. </template>
  381. </avue-crud>
  382. </div>
  383. <el-dialog
  384. title="重新转写"
  385. center
  386. :visible.sync="dialogVisible"
  387. width="50%"
  388. >
  389. <!-- <div style="text-align: center;font-size: 16px" v-if="mergeflag">请等待录音合并之后再重新转写!</div> -->
  390. <el-form :model="form">
  391. <el-form-item label="转写方式" :label-width="80">
  392. <el-select
  393. v-model="form.project"
  394. placeholder="请选择"
  395. @change="changeFun"
  396. >
  397. <el-option
  398. v-for="(item, index) in projectList"
  399. :label="item.name"
  400. :key="index"
  401. :value="item.code"
  402. ></el-option>
  403. </el-select>
  404. <el-select v-model="form.language" placeholder="请选择">
  405. <el-option
  406. v-for="(item, index) in languageList"
  407. :label="item.name"
  408. :key="index"
  409. :value="item.code"
  410. ></el-option>
  411. </el-select>
  412. </el-form-item>
  413. <div style="color: red; margin-left: 60px">
  414. 提示:重新转写需要10分钟左右才能完成!
  415. </div>
  416. </el-form>
  417. <span slot="footer" class="dialog-footer">
  418. <el-button @click="dialogVisible = false">取 消</el-button>
  419. <el-button type="primary" @click="checkFun">确 定</el-button>
  420. </span>
  421. </el-dialog>
  422. </div>
  423. </template>
  424. <script>
  425. import { mapGetters } from "vuex";
  426. import { exportMethodPost } from "@/util/util";
  427. import { Loading } from "element-ui";
  428. export default {
  429. data() {
  430. return {
  431. questionList: [], //挖掘话术
  432. marketingInvalidList: [], // 无效接待原因列表
  433. xiaojianglist: [], //销讲业务
  434. desc: "请等待录音合并之后再重新转写!",
  435. dialogVisible: false,
  436. projectList: [],
  437. languageList: [],
  438. form: {
  439. language: "",
  440. project: "",
  441. }, //重新转写
  442. tableIdName: "ReceivingRecordsIndex", // 当前页面需要的变量
  443. tableOption: this.$tableOption.ReceivingRecordsIndex, // 当前table配置项
  444. tableLoading: false, // 是否显示加载中
  445. showColumn: [], // 监听的显示列的变量
  446. page: {
  447. total: 0, // 总页数
  448. currentPage: 1, // 当前页数
  449. pageSize: 10, // 每页显示多少条
  450. },
  451. isOpen: false,
  452. TimetoAhoose: 2,
  453. time: [],
  454. houseList: [],
  455. orgType: localStorage.getItem("orgType"),
  456. options: [],
  457. keywordsList: [],
  458. accountList: [],
  459. recordingList: [
  460. {
  461. value: "0",
  462. label: "没有录音",
  463. },
  464. {
  465. value: "1",
  466. label: "部分录音",
  467. },
  468. {
  469. value: "2",
  470. label: "完整录音",
  471. },
  472. {
  473. value: "3",
  474. label: "未传完",
  475. },
  476. ],
  477. options3: [
  478. {
  479. value: "1",
  480. label: "0-15分钟",
  481. },
  482. {
  483. value: "2",
  484. label: "15-30分钟",
  485. },
  486. {
  487. value: "3",
  488. label: "30-60分钟",
  489. },
  490. {
  491. value: "4",
  492. label: "60-90分钟",
  493. },
  494. {
  495. value: "5",
  496. label: "90分钟以上",
  497. },
  498. ],
  499. options4: [
  500. {
  501. value: "1",
  502. label: "首次到访",
  503. },
  504. {
  505. value: "2",
  506. label: "2次到访",
  507. },
  508. {
  509. value: "3",
  510. label: "3次到访",
  511. },
  512. {
  513. value: "4",
  514. label: "三次以上",
  515. },
  516. ],
  517. options5: [
  518. {
  519. value: "1",
  520. label: "已标记",
  521. },
  522. {
  523. value: "0",
  524. label: "未标记",
  525. },
  526. ],
  527. options11: [
  528. {
  529. value: "0",
  530. label: "否",
  531. },
  532. {
  533. value: "1",
  534. label: "是",
  535. },
  536. ],
  537. options13: [
  538. {
  539. label: "有效接待",
  540. value: "0",
  541. },
  542. {
  543. label: "无效接待",
  544. value: "1",
  545. },
  546. ],
  547. value: "",
  548. input: "",
  549. tableData: [],
  550. tophove: "",
  551. type: "0",
  552. searchForm: {
  553. name: "",
  554. keywordsId: [],
  555. recording: "",
  556. markAdvisor: null,
  557. recDurationInterval: "",
  558. visitRecord: "",
  559. staDate: "",
  560. endDate: "",
  561. houseType: "",
  562. dateType: null,
  563. projectId: "",
  564. taboo: "",
  565. zfal: "", // 正反案例 0:正面案例 1:反面案例
  566. validInvalid: "", // 是否为有效接待 0:有效 1:无效
  567. marketingBusiness: [],
  568. invalidReason: "",
  569. question: "",
  570. wordFractions: "",
  571. fractions: "",
  572. },
  573. rec_index_show: false, // 按钮权限
  574. rec_rewrite_show: false, // 重新转写-按钮权限
  575. rec_index_text: false, // 按钮权限
  576. rec_index_voice: false, // 按钮权限
  577. rec_index_downLoad: false, // 按钮权限
  578. templateList: [], // 销讲业务列表
  579. };
  580. },
  581. computed: {
  582. ...mapGetters(["permissions"]),
  583. },
  584. activated() {
  585. if (this.$route.query.types) {
  586. if (this.$route.query.types.indexOf("&") != -1) {
  587. let arr = this.$route.query.types.split("&");
  588. arr.forEach((item) => {
  589. let as = item.split(",");
  590. this.searchForm[as[0]] = as[1];
  591. });
  592. } else {
  593. let arr = this.$route.query.types.split(",");
  594. this.searchForm[arr[0]] = arr[1];
  595. }
  596. }
  597. if (this.$route.query.date) {
  598. this.time = this.$route.query.date.split(",");
  599. this.searchForm.staDate = this.time[0];
  600. this.searchForm.endDate = this.time[1];
  601. console.log("时间");
  602. }
  603. if (this.$route.query.validInvalid) {
  604. this.searchForm.validInvalid = this.$route.query.validInvalid;
  605. }
  606. if (this.$route.query.markAdvisor) {
  607. this.searchForm.markAdvisor = this.$route.query.markAdvisor;
  608. }
  609. if (this.$route.query.dateType) {
  610. this.searchForm.dateType = this.$route.query.dateType;
  611. }
  612. if (this.$route.query.staDate) {
  613. this.searchForm.staDate = this.$route.query.staDate;
  614. }
  615. if (this.$route.query.endDate) {
  616. this.searchForm.endDate = this.$route.query.endDate;
  617. }
  618. if (this.$route.query.houseId) {
  619. this.searchForm.projectId = this.$route.query.houseId;
  620. }
  621. if (
  622. this.$route.query.endDate &&
  623. this.$route.query.staDate &&
  624. this.time.length == 0
  625. ) {
  626. this.searchForm.dateType = null;
  627. this.time = [this.$route.query.staDate, this.$route.query.endDate];
  628. }
  629. // 获取项目列表
  630. this.zkhousePage();
  631. },
  632. created() {
  633. // 添加日志
  634. this.addOperatingLog()
  635. // 获取显隐的列表
  636. this.setTableOption();
  637. if (this.$route.query.types) {
  638. if (this.$route.query.types.indexOf("&") != -1) {
  639. let arr = this.$route.query.types.split("&");
  640. arr.forEach((item) => {
  641. let as = item.split(",");
  642. this.searchForm[as[0]] = as[1];
  643. });
  644. } else {
  645. let arr = this.$route.query.types.split(",");
  646. this.searchForm[arr[0]] = arr[1];
  647. }
  648. }
  649. if (this.$route.query.date) {
  650. this.time = this.$route.query.date.split(",");
  651. this.searchForm.staDate = this.time[0];
  652. this.searchForm.endDate = this.time[1];
  653. console.log("时间");
  654. }
  655. if (this.$route.query.validInvalid) {
  656. this.searchForm.validInvalid = this.$route.query.validInvalid;
  657. }
  658. if (this.$route.query.markAdvisor) {
  659. this.searchForm.markAdvisor = this.$route.query.markAdvisor;
  660. }
  661. if (this.$route.query.dateType) {
  662. this.searchForm.dateType = this.$route.query.dateType;
  663. }
  664. if (this.$route.query.staDate) {
  665. this.searchForm.staDate = this.$route.query.staDate;
  666. }
  667. if (this.$route.query.endDate) {
  668. this.searchForm.endDate = this.$route.query.endDate;
  669. }
  670. if (this.$route.query.houseId) {
  671. this.searchForm.projectId = this.$route.query.houseId;
  672. }
  673. if (this.$route.query.marketingBusiness) {
  674. this.searchForm.marketingBusiness = [this.$route.query.marketingBusiness];
  675. }
  676. if (
  677. this.$route.query.endDate &&
  678. this.$route.query.staDate &&
  679. this.time.length == 0
  680. ) {
  681. this.searchForm.dateType = null;
  682. this.time = [this.$route.query.staDate, this.$route.query.endDate];
  683. }
  684. this.rec_index_show = this.permissions["rec_index_show"];
  685. this.rec_rewrite_show = this.permissions["rec_rewrite_show"];
  686. this.rec_index_text = this.permissions["rec_index_text"];
  687. this.rec_index_voice = this.permissions["rec_index_voice"];
  688. this.rec_index_downLoad = this.permissions["rec_index_downLoad"];
  689. },
  690. mounted() {
  691. // 获取项目列表
  692. this.zkhousePage();
  693. },
  694. methods: {
  695. // 添加日志
  696. addOperatingLog() {
  697. this.$api.http.addOperatingLog({ logType: 8 });
  698. },
  699. // 删除接待
  700. deleteCS(row) {
  701. console.log(row);
  702. this.$alert("确认删除此条记录吗?", `提示`, {
  703. confirmButtonText: "确定",
  704. cancelButtonText: "取消",
  705. showCancelButton: true,
  706. }).then(() => {
  707. this.$api.http.deleteCS({ cusId: row.id }).then((res) => {
  708. if (res.code == 10000) {
  709. this.$message.success(res.message);
  710. this.page.currentPage = 1;
  711. this.findbypage();
  712. } else {
  713. this.$message.error(res.message);
  714. }
  715. });
  716. });
  717. },
  718. // 获取话术
  719. findQuestionList() {
  720. axios({
  721. url: `/autoSR/zk/keywords/findQuestionList`,
  722. method: "get",
  723. params: {
  724. houseId: this.searchForm.projectId,
  725. },
  726. }).then((data) => {
  727. if (data.code == 0) {
  728. this.questionList = data.data;
  729. }
  730. });
  731. },
  732. // 无效接待原因列表
  733. getMarketingInvalidList() {
  734. this.$api.http
  735. .InvalidReceptionReasonList({
  736. houseId: this.searchForm.projectId,
  737. })
  738. .then((res) => {
  739. if (res.code == 10000) {
  740. this.marketingInvalidList = res.data
  741. // .filter(
  742. // (item) => item.id != 6 && item.id != 7 && item.id != 5
  743. // );
  744. }
  745. })
  746. },
  747. // 转写方式切换
  748. changeFun(value) {
  749. // console.log(value)
  750. this.form.language = "";
  751. this.projectList.forEach((item) => {
  752. if (item.code == value) {
  753. this.languageList = item.list;
  754. this.form.language = this.languageList[0].code;
  755. }
  756. });
  757. },
  758. // 转写方式数据获取
  759. findTransferMethod() {
  760. this.$api.api.findTransferMethod().then((res) => {
  761. console.log(res, " sajdklasjdklasjdklsajkdls");
  762. if (res.data) {
  763. this.projectList = res.data || [];
  764. this.languageList = (res.data && res.data[0].list) || [];
  765. }
  766. });
  767. },
  768. // 确定重新转写
  769. checkFun() {
  770. if (this.form.project === "" || this.form.language === "") {
  771. this.$message.error("请先选择转写方式");
  772. return;
  773. }
  774. this.dialogVisible = false;
  775. this.$api.api
  776. .toTransferData({
  777. id: this.currentRow.id,
  778. transferMethod: this.form.project,
  779. transferLanguage: this.form.language,
  780. })
  781. .then((res) => {
  782. console.log(res, "sadkjaskdjakl");
  783. this.houseChange();
  784. // 获取转写方式
  785. this.findTransferMethod();
  786. // 获取销讲业务
  787. this.getMarketingBusiness();
  788. this.$message.success("操作成功");
  789. });
  790. },
  791. reWriteagain(row) {
  792. this.dialogVisible = true;
  793. this.currentRow = row;
  794. // mergeFlag; //是否合并 0是 1 否
  795. this.form.project = row.transferMethod || "";
  796. if (row.transferLanguage) {
  797. this.projectList.forEach((item) => {
  798. if (item.code == row.transferLanguage) {
  799. this.languageList = item.list;
  800. this.form.language = row.transferLanguage || "";
  801. }
  802. });
  803. } else {
  804. this.form.language = "";
  805. }
  806. },
  807. reWriteagains(row) {
  808. this.$api.http.toMergeRecord({id: row.id}).then(res => {
  809. console.log(res)
  810. if (res.code == 10000) {
  811. this.$message.success(res.message)
  812. } else {
  813. this.$message.error(res.message)
  814. }
  815. })
  816. },
  817. // 获取销讲业务
  818. getMarketingBusiness() {
  819. this.$api.http
  820. .marketingBusiness({ houseId: this.searchForm.projectId })
  821. .then((res) => {
  822. console.log(res);
  823. if (res.code == 10000) {
  824. this.templateList = res.data;
  825. }
  826. });
  827. },
  828. // 获取当前页面的显隐
  829. setTableOption() {
  830. this.$db.getDataByKey(this.tableIdName).then((res) => {
  831. if (res.tableIdName == this.tableIdName) {
  832. this.showColumn = res.optionData;
  833. }
  834. });
  835. },
  836. isSystoleForm() {
  837. this.isOpen = !this.isOpen;
  838. },
  839. // 清除上次进入遗留的数据
  840. resetParams() {
  841. this.searchForm.taboo = "";
  842. this.searchForm.validInvalid = "";
  843. this.searchForm.endDate = "";
  844. this.searchForm.staDate = "";
  845. this.time = "";
  846. },
  847. downLoad() {
  848. let obj = {
  849. type: 1,
  850. ...this.searchForm,
  851. };
  852. obj.keywordIds = obj.keywordsId.join(",");
  853. obj.dateType = this.searchForm.staDate ? null : this.searchForm.dateType;
  854. exportMethodPost("autoSR/customer/pageExport", "接待记录", obj);
  855. },
  856. // 跳转接待详情
  857. Receivedetailsabout(row) {
  858. this.$api.http.findByCusIdcusId({ cusId: row.id }).then((res) => {
  859. if (res.data.length == 0) {
  860. this.$message({
  861. message: "无录音",
  862. type: "warning",
  863. });
  864. } else {
  865. this.$router.push({
  866. path: "/Receive/index",
  867. query: { flag: row.id, AudioIdx: 0 },
  868. });
  869. }
  870. });
  871. },
  872. // 删除此条接待记录
  873. deleteReceive(row) {
  874. console.log(row);
  875. },
  876. // 接待记录列表
  877. findbypage() {
  878. let obj = {
  879. current: this.page.currentPage,
  880. size: this.page.pageSize,
  881. type: 1,
  882. ...this.searchForm,
  883. };
  884. if (this.$route.query.houseId) {
  885. obj.projectId = this.$route.query.houseId;
  886. }
  887. obj.keywordIds = obj.keywordsId.join(",");
  888. obj.marketingBusiness = obj.marketingBusiness.join(",");
  889. obj.dateType = this.searchForm.staDate ? null : this.searchForm.dateType;
  890. this.$api.api.findbypage(obj).then((res) => {
  891. // console.log(res);
  892. if (res.code == 0) {
  893. this.tableData = res.data.records || [];
  894. this.page.total = res.data.total;
  895. // 表格中设置ref属性,在数据渲染之后或者updated()之后
  896. this.$nextTick(() => {
  897. this.$refs.crud.doLayout();
  898. });
  899. }
  900. });
  901. },
  902. clearScreen() {
  903. this.page.currentPage = 1;
  904. this.searchForm = {
  905. name: "",
  906. keywordsId: [],
  907. recording: "",
  908. markAdvisor: null,
  909. recDurationInterval: "",
  910. visitRecord: "",
  911. staDate: "",
  912. endDate: "",
  913. houseType: "",
  914. dateType: null,
  915. taboo: "",
  916. questionId: "",
  917. fraction: "",
  918. wordFraction: "",
  919. marketingBusiness: [],
  920. zfal: "",
  921. projectId:
  922. this.orgType == 3
  923. ? localStorage.getItem("houseId")
  924. : this.houseList[0].id,
  925. };
  926. if (this.$route.query.houseId) {
  927. this.searchForm.projectId = this.$route.query.houseId;
  928. }
  929. this.findbypage();
  930. },
  931. houseChange() {
  932. this.findbypage();
  933. this.findKeywords();
  934. this.findQuestionList();
  935. // this.getMarketingBusiness();// 销讲业务
  936. // 获取置业顾问列表
  937. this.findUserListByHouseId();
  938. },
  939. timeChange(e) {
  940. if (!e) {
  941. this.searchForm.dateType = null;
  942. this.searchForm.staDate = "";
  943. this.searchForm.endDate = "";
  944. } else {
  945. this.searchForm.dateType = null;
  946. this.searchForm.staDate = e[0];
  947. this.searchForm.endDate = e[1];
  948. }
  949. this.houseChange();
  950. },
  951. screen() {
  952. this.page.currentPage = 1;
  953. this.findbypage();
  954. },
  955. findKeywords() {
  956. this.$api.api
  957. .findKeywords({
  958. dateType: this.searchForm.staDate ? null : this.searchForm.dateType,
  959. statDateStart: this.searchForm.staDate,
  960. statDateEnd: this.searchForm.endDate,
  961. projectId: this.searchForm.projectId,
  962. type: this.type,
  963. })
  964. .then((res) => {
  965. this.keywordsList = res.data;
  966. });
  967. },
  968. zkhousePage() {
  969. this.$api.api
  970. .findHouseByUser({
  971. orgType: localStorage.getItem("orgType"),
  972. })
  973. .then((res) => {
  974. // console.log(res)
  975. this.houseList = res.data;
  976. if (localStorage.getItem("orgType") == 3) {
  977. if (this.$route.query.houseId) {
  978. this.searchForm.projectId = this.$route.query.houseId;
  979. } else {
  980. this.searchForm.projectId = localStorage.getItem("houseId");
  981. }
  982. } else {
  983. this.searchForm.projectId = res.data[0].id;
  984. }
  985. this.houseChange();
  986. // 获取转写方式
  987. this.findTransferMethod();
  988. // 获取销讲业务
  989. this.getMarketingBusiness();
  990. // 无效接待原因
  991. this.getMarketingInvalidList()
  992. });
  993. },
  994. // 置业顾问列表
  995. async findUserListByHouseId() {
  996. let result = await this.$api.api.findUserListByHouseId({
  997. orgType: localStorage.getItem("orgType"),
  998. projectId: this.searchForm.projectId,
  999. });
  1000. this.accountList = result.data;
  1001. },
  1002. handleSizeChange(val) {
  1003. this.page.pageSize = val;
  1004. this.findbypage();
  1005. },
  1006. handleCurrentChange(val) {
  1007. this.page.currentPage = val;
  1008. this.findbypage();
  1009. },
  1010. tabtimetap(idx) {
  1011. this.searchForm.staDate = "";
  1012. this.searchForm.endDate = "";
  1013. // this.$set(this, "time", null);
  1014. this.searchForm.dateType = idx;
  1015. this.time = [];
  1016. this.houseChange();
  1017. },
  1018. timestampToTime(timestamp) {
  1019. var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  1020. // var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  1021. var yyyy = date.getFullYear() + "-";
  1022. var MM =
  1023. (date.getMonth() + 1 < 10
  1024. ? "0" + (date.getMonth() + 1)
  1025. : date.getMonth() + 1) + "-";
  1026. // var dd = date.getDate() + ' ';
  1027. var dd =
  1028. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  1029. return yyyy + MM + dd;
  1030. },
  1031. },
  1032. watch: {
  1033. $route(to, from) {
  1034. this.resetParams();
  1035. //监听路由是否变化
  1036. if (to.query.types != from.query.types && to.query.types != null) {
  1037. let arr = this.$route.query.types.split(",");
  1038. this.searchForm[arr[0]] = arr[1];
  1039. }
  1040. if (to.query.date != from.query.date && to.query.date != null) {
  1041. this.time = this.$route.query.date.split(",");
  1042. this.searchForm.staDate = this.time[0];
  1043. this.searchForm.endDate = this.time[1];
  1044. }
  1045. },
  1046. showColumn(nowV) {
  1047. let params = {
  1048. tableIdName: this.tableIdName,
  1049. optionData: nowV,
  1050. };
  1051. this.$db.upDate(params);
  1052. },
  1053. },
  1054. };
  1055. </script>
  1056. <style scoped="scoped" lang="scss">
  1057. .box-center {
  1058. width: 100%;
  1059. padding: 5px 15px 40px;
  1060. min-width: 1000px;
  1061. }
  1062. .cen-tab {
  1063. width: 100%;
  1064. padding: 15px;
  1065. background: #ffffff;
  1066. margin-top: 15px;
  1067. }
  1068. .tophove {
  1069. color: #ffffff;
  1070. background: #2671e2;
  1071. }
  1072. .app-top {
  1073. width: 100%;
  1074. background: #ffffff;
  1075. box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
  1076. border-radius: 4px;
  1077. padding-top: 15px;
  1078. padding-bottom: 15px;
  1079. .app-titel {
  1080. width: 100%;
  1081. display: flex;
  1082. align-items: center;
  1083. flex-wrap: wrap;
  1084. .label {
  1085. font-size: 16px;
  1086. font-weight: 400;
  1087. color: #32363d;
  1088. line-height: 32px;
  1089. min-width: 120px;
  1090. text-align: right;
  1091. }
  1092. .toptimeqhuan {
  1093. height: 30px;
  1094. background: #ffffff;
  1095. display: flex;
  1096. align-items: center;
  1097. margin-left: 9px;
  1098. }
  1099. .toptimeqhuan div {
  1100. padding-left: 20px;
  1101. padding-right: 20px;
  1102. text-align: center;
  1103. line-height: 30px;
  1104. font-size: 14px;
  1105. margin-right: 15px;
  1106. border-radius: 4px;
  1107. border: 1px solid #e0e0e0;
  1108. }
  1109. .toptimeqhuan .btn {
  1110. padding-left: 20px;
  1111. padding-right: 20px;
  1112. text-align: center;
  1113. font-size: 14px;
  1114. border-radius: 4px;
  1115. border: 1px solid #e0e0e0;
  1116. }
  1117. }
  1118. }
  1119. .div-lab {
  1120. display: flex;
  1121. margin: 5px;
  1122. }
  1123. .div-inp {
  1124. width: 250px;
  1125. }
  1126. /deep/ .el-table__header-wrapper {
  1127. thead {
  1128. tr {
  1129. th {
  1130. background: #f5f7fa;
  1131. color: #333333;
  1132. }
  1133. }
  1134. }
  1135. }
  1136. /deep/ .el-button--primary {
  1137. background: #2671e2 !important;
  1138. border: 1px solid #2671e2 !important;
  1139. }
  1140. /deep/ .el-button--text {
  1141. color: #2671e2;
  1142. }
  1143. </style>