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.
 
 
 

1161 lines
31 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. <el-button
  354. type="text"
  355. v-if="rec_index_show"
  356. @click="Receivedetailsabout(row)"
  357. >查看</el-button
  358. >
  359. <el-button
  360. type="text"
  361. v-if="rec_rewrite_show && row.mergeFlag == 0"
  362. @click="reWriteagain(row)"
  363. >重新转写</el-button
  364. >
  365. <el-button
  366. type="text"
  367. v-if="permissions.rec_index_delete"
  368. @click="deleteCS(row)"
  369. >
  370. 删除接待
  371. </el-button>
  372. </template>
  373. </avue-crud>
  374. </div>
  375. <el-dialog
  376. title="重新转写"
  377. center
  378. :visible.sync="dialogVisible"
  379. width="50%"
  380. >
  381. <!-- <div style="text-align: center;font-size: 16px" v-if="mergeflag">请等待录音合并之后再重新转写!</div> -->
  382. <el-form :model="form">
  383. <el-form-item label="转写方式" :label-width="80">
  384. <el-select
  385. v-model="form.project"
  386. placeholder="请选择"
  387. @change="changeFun"
  388. >
  389. <el-option
  390. v-for="(item, index) in projectList"
  391. :label="item.name"
  392. :key="index"
  393. :value="item.code"
  394. ></el-option>
  395. </el-select>
  396. <el-select v-model="form.language" placeholder="请选择">
  397. <el-option
  398. v-for="(item, index) in languageList"
  399. :label="item.name"
  400. :key="index"
  401. :value="item.code"
  402. ></el-option>
  403. </el-select>
  404. </el-form-item>
  405. <div style="color: red; margin-left: 60px">
  406. 提示:重新转写需要10分钟左右才能完成!
  407. </div>
  408. </el-form>
  409. <span slot="footer" class="dialog-footer">
  410. <el-button @click="dialogVisible = false">取 消</el-button>
  411. <el-button type="primary" @click="checkFun">确 定</el-button>
  412. </span>
  413. </el-dialog>
  414. </div>
  415. </template>
  416. <script>
  417. import { mapGetters } from "vuex";
  418. import { exportMethodPost } from "@/util/util";
  419. import { Loading } from "element-ui";
  420. export default {
  421. data() {
  422. return {
  423. questionList: [], //挖掘话术
  424. marketingInvalidList: [], // 无效接待原因列表
  425. xiaojianglist: [], //销讲业务
  426. desc: "请等待录音合并之后再重新转写!",
  427. dialogVisible: false,
  428. projectList: [],
  429. languageList: [],
  430. form: {
  431. language: "",
  432. project: "",
  433. }, //重新转写
  434. tableIdName: "ReceivingRecordsIndex", // 当前页面需要的变量
  435. tableOption: this.$tableOption.ReceivingRecordsIndex, // 当前table配置项
  436. tableLoading: false, // 是否显示加载中
  437. showColumn: [], // 监听的显示列的变量
  438. page: {
  439. total: 0, // 总页数
  440. currentPage: 1, // 当前页数
  441. pageSize: 10, // 每页显示多少条
  442. },
  443. isOpen: false,
  444. TimetoAhoose: 2,
  445. time: [],
  446. houseList: [],
  447. orgType: localStorage.getItem("orgType"),
  448. options: [],
  449. keywordsList: [],
  450. accountList: [],
  451. recordingList: [
  452. {
  453. value: "0",
  454. label: "没有录音",
  455. },
  456. {
  457. value: "1",
  458. label: "部分录音",
  459. },
  460. {
  461. value: "2",
  462. label: "完整录音",
  463. },
  464. {
  465. value: "3",
  466. label: "未传完",
  467. },
  468. ],
  469. options3: [
  470. {
  471. value: "1",
  472. label: "0-15分钟",
  473. },
  474. {
  475. value: "2",
  476. label: "15-30分钟",
  477. },
  478. {
  479. value: "3",
  480. label: "30-60分钟",
  481. },
  482. {
  483. value: "4",
  484. label: "60-90分钟",
  485. },
  486. {
  487. value: "5",
  488. label: "90分钟以上",
  489. },
  490. ],
  491. options4: [
  492. {
  493. value: "1",
  494. label: "首次到访",
  495. },
  496. {
  497. value: "2",
  498. label: "2次到访",
  499. },
  500. {
  501. value: "3",
  502. label: "3次到访",
  503. },
  504. {
  505. value: "4",
  506. label: "三次以上",
  507. },
  508. ],
  509. options5: [
  510. {
  511. value: "1",
  512. label: "已标记",
  513. },
  514. {
  515. value: "0",
  516. label: "未标记",
  517. },
  518. ],
  519. options11: [
  520. {
  521. value: "0",
  522. label: "否",
  523. },
  524. {
  525. value: "1",
  526. label: "是",
  527. },
  528. ],
  529. options13: [
  530. {
  531. label: "有效接待",
  532. value: "0",
  533. },
  534. {
  535. label: "无效接待",
  536. value: "1",
  537. },
  538. ],
  539. value: "",
  540. input: "",
  541. tableData: [],
  542. tophove: "",
  543. type: "0",
  544. searchForm: {
  545. name: "",
  546. keywordsId: [],
  547. recording: "",
  548. markAdvisor: null,
  549. recDurationInterval: "",
  550. visitRecord: "",
  551. staDate: "",
  552. endDate: "",
  553. houseType: "",
  554. dateType: null,
  555. projectId: "",
  556. taboo: "",
  557. zfal: "", // 正反案例 0:正面案例 1:反面案例
  558. validInvalid: "", // 是否为有效接待 0:有效 1:无效
  559. marketingBusiness: [],
  560. invalidReason: "",
  561. question: "",
  562. wordFractions: "",
  563. fractions: "",
  564. },
  565. rec_index_show: false, // 按钮权限
  566. rec_rewrite_show: false, // 重新转写-按钮权限
  567. rec_index_text: false, // 按钮权限
  568. rec_index_voice: false, // 按钮权限
  569. rec_index_downLoad: false, // 按钮权限
  570. templateList: [], // 销讲业务列表
  571. };
  572. },
  573. computed: {
  574. ...mapGetters(["permissions"]),
  575. },
  576. activated() {
  577. if (this.$route.query.types) {
  578. if (this.$route.query.types.indexOf("&") != -1) {
  579. let arr = this.$route.query.types.split("&");
  580. arr.forEach((item) => {
  581. let as = item.split(",");
  582. this.searchForm[as[0]] = as[1];
  583. });
  584. } else {
  585. let arr = this.$route.query.types.split(",");
  586. this.searchForm[arr[0]] = arr[1];
  587. }
  588. }
  589. if (this.$route.query.date) {
  590. this.time = this.$route.query.date.split(",");
  591. this.searchForm.staDate = this.time[0];
  592. this.searchForm.endDate = this.time[1];
  593. console.log("时间");
  594. }
  595. if (this.$route.query.validInvalid) {
  596. this.searchForm.validInvalid = this.$route.query.validInvalid;
  597. }
  598. if (this.$route.query.markAdvisor) {
  599. this.searchForm.markAdvisor = this.$route.query.markAdvisor;
  600. }
  601. if (this.$route.query.dateType) {
  602. this.searchForm.dateType = this.$route.query.dateType;
  603. }
  604. if (this.$route.query.staDate) {
  605. this.searchForm.staDate = this.$route.query.staDate;
  606. }
  607. if (this.$route.query.endDate) {
  608. this.searchForm.endDate = this.$route.query.endDate;
  609. }
  610. if (this.$route.query.houseId) {
  611. this.searchForm.projectId = this.$route.query.houseId;
  612. }
  613. if (
  614. this.$route.query.endDate &&
  615. this.$route.query.staDate &&
  616. this.time.length == 0
  617. ) {
  618. this.searchForm.dateType = null;
  619. this.time = [this.$route.query.staDate, this.$route.query.endDate];
  620. }
  621. // 获取项目列表
  622. this.zkhousePage();
  623. },
  624. created() {
  625. // 获取显隐的列表
  626. this.setTableOption();
  627. if (this.$route.query.types) {
  628. if (this.$route.query.types.indexOf("&") != -1) {
  629. let arr = this.$route.query.types.split("&");
  630. arr.forEach((item) => {
  631. let as = item.split(",");
  632. this.searchForm[as[0]] = as[1];
  633. });
  634. } else {
  635. let arr = this.$route.query.types.split(",");
  636. this.searchForm[arr[0]] = arr[1];
  637. }
  638. }
  639. if (this.$route.query.date) {
  640. this.time = this.$route.query.date.split(",");
  641. this.searchForm.staDate = this.time[0];
  642. this.searchForm.endDate = this.time[1];
  643. console.log("时间");
  644. }
  645. if (this.$route.query.validInvalid) {
  646. this.searchForm.validInvalid = this.$route.query.validInvalid;
  647. }
  648. if (this.$route.query.markAdvisor) {
  649. this.searchForm.markAdvisor = this.$route.query.markAdvisor;
  650. }
  651. if (this.$route.query.dateType) {
  652. this.searchForm.dateType = this.$route.query.dateType;
  653. }
  654. if (this.$route.query.staDate) {
  655. this.searchForm.staDate = this.$route.query.staDate;
  656. }
  657. if (this.$route.query.endDate) {
  658. this.searchForm.endDate = this.$route.query.endDate;
  659. }
  660. if (this.$route.query.houseId) {
  661. this.searchForm.projectId = this.$route.query.houseId;
  662. }
  663. if (this.$route.query.marketingBusiness) {
  664. this.searchForm.marketingBusiness = [this.$route.query.marketingBusiness];
  665. }
  666. if (
  667. this.$route.query.endDate &&
  668. this.$route.query.staDate &&
  669. this.time.length == 0
  670. ) {
  671. this.searchForm.dateType = null;
  672. this.time = [this.$route.query.staDate, this.$route.query.endDate];
  673. }
  674. this.rec_index_show = this.permissions["rec_index_show"];
  675. this.rec_rewrite_show = this.permissions["rec_rewrite_show"];
  676. this.rec_index_text = this.permissions["rec_index_text"];
  677. this.rec_index_voice = this.permissions["rec_index_voice"];
  678. this.rec_index_downLoad = this.permissions["rec_index_downLoad"];
  679. },
  680. mounted() {
  681. // 获取项目列表
  682. this.zkhousePage();
  683. },
  684. methods: {
  685. // 删除接待
  686. deleteCS(row) {
  687. console.log(row);
  688. this.$alert("确认删除此条记录吗?", `提示`, {
  689. confirmButtonText: "确定",
  690. cancelButtonText: "取消",
  691. showCancelButton: true,
  692. }).then(() => {
  693. this.$api.http.deleteCS({ cusId: row.id }).then((res) => {
  694. if (res.code == 10000) {
  695. this.$message.success(res.message);
  696. this.page.currentPage = 1;
  697. this.findbypage();
  698. } else {
  699. this.$message.error(res.message);
  700. }
  701. });
  702. });
  703. },
  704. // 获取话术
  705. findQuestionList() {
  706. axios({
  707. url: `/autoSR/zk/keywords/findQuestionList`,
  708. method: "get",
  709. params: {
  710. houseId: this.searchForm.projectId,
  711. },
  712. }).then((data) => {
  713. if (data.code == 0) {
  714. this.questionList = data.data;
  715. }
  716. });
  717. },
  718. // 无效接待原因列表
  719. getMarketingInvalidList() {
  720. this.$api.api.invalidList({ houseId: this.houseId }).then((res) => {
  721. if (res.data && res.data.obj) {
  722. this.marketingInvalidList = res.data.obj;
  723. } else {
  724. this.marketingInvalidList = [];
  725. }
  726. });
  727. },
  728. // 转写方式切换
  729. changeFun(value) {
  730. // console.log(value)
  731. this.form.language = "";
  732. this.projectList.forEach((item) => {
  733. if (item.code == value) {
  734. this.languageList = item.list;
  735. this.form.language = this.languageList[0].code;
  736. }
  737. });
  738. },
  739. // 转写方式数据获取
  740. findTransferMethod() {
  741. this.$api.api.findTransferMethod().then((res) => {
  742. console.log(res, " sajdklasjdklasjdklsajkdls");
  743. if (res.data) {
  744. this.projectList = res.data || [];
  745. this.languageList = (res.data && res.data[0].list) || [];
  746. }
  747. });
  748. },
  749. // 确定重新转写
  750. checkFun() {
  751. if (this.form.project === "" || this.form.language === "") {
  752. this.$message.error("请先选择转写方式");
  753. return;
  754. }
  755. Loading.service({
  756. lock: true,
  757. text: "Loading",
  758. spinner: "el-icon-loading",
  759. background: "rgba(0, 0, 0, 0.7)",
  760. });
  761. this.$api.api
  762. .toTransferData({
  763. id: this.currentRow.id,
  764. transferMethod: this.form.project,
  765. transferLanguage: this.form.language,
  766. })
  767. .then((res) => {
  768. this.dialogVisible = false;
  769. this.getorgCode();
  770. this.$message.success("操作成功");
  771. Loading.close();
  772. })
  773. .catch(() => {
  774. Loading.close();
  775. });
  776. },
  777. reWriteagain(row) {
  778. this.dialogVisible = true;
  779. this.currentRow = row;
  780. // mergeFlag; //是否合并 0是 1 否
  781. this.form.project = row.transferMethod || "";
  782. if (row.transferLanguage) {
  783. this.projectList.forEach((item) => {
  784. if (item.code == row.transferLanguage) {
  785. this.languageList = item.list;
  786. this.form.language = row.transferLanguage || "";
  787. }
  788. });
  789. } else {
  790. this.form.language = "";
  791. }
  792. },
  793. // 获取销讲业务
  794. getMarketingBusiness() {
  795. this.$api.http
  796. .marketingBusiness({ houseId: this.searchForm.projectId })
  797. .then((res) => {
  798. console.log(res);
  799. if (res.code == 10000) {
  800. this.templateList = res.data;
  801. }
  802. });
  803. },
  804. // 获取当前页面的显隐
  805. setTableOption() {
  806. this.$db.getDataByKey(this.tableIdName).then((res) => {
  807. if (res.tableIdName == this.tableIdName) {
  808. this.showColumn = res.optionData;
  809. }
  810. });
  811. },
  812. isSystoleForm() {
  813. this.isOpen = !this.isOpen;
  814. },
  815. // 清除上次进入遗留的数据
  816. resetParams() {
  817. this.searchForm.taboo = "";
  818. this.searchForm.validInvalid = "";
  819. this.searchForm.endDate = "";
  820. this.searchForm.staDate = "";
  821. this.time = "";
  822. },
  823. downLoad() {
  824. let obj = {
  825. type: 1,
  826. ...this.searchForm,
  827. };
  828. obj.keywordIds = obj.keywordsId.join(",");
  829. obj.dateType = this.searchForm.staDate ? null : this.searchForm.dateType;
  830. exportMethodPost("autoSR/customer/pageExport", "接待记录", obj);
  831. },
  832. // 跳转接待详情
  833. Receivedetailsabout(row) {
  834. this.$api.http.findByCusIdcusId({ cusId: row.id }).then((res) => {
  835. if (res.data.length == 0) {
  836. this.$message({
  837. message: "无录音",
  838. type: "warning",
  839. });
  840. } else {
  841. this.$router.push({
  842. path: "/Receive/index",
  843. query: { flag: row.id, AudioIdx: 0 },
  844. });
  845. }
  846. });
  847. },
  848. // 删除此条接待记录
  849. deleteReceive(row) {
  850. console.log(row);
  851. },
  852. // 接待记录列表
  853. findbypage() {
  854. let obj = {
  855. current: this.page.currentPage,
  856. size: this.page.pageSize,
  857. type: 1,
  858. ...this.searchForm,
  859. };
  860. if (this.$route.query.houseId) {
  861. obj.projectId = this.$route.query.houseId;
  862. }
  863. obj.keywordIds = obj.keywordsId.join(",");
  864. obj.marketingBusiness = obj.marketingBusiness.join(",");
  865. obj.dateType = this.searchForm.staDate ? null : this.searchForm.dateType;
  866. this.$api.api.findbypage(obj).then((res) => {
  867. // console.log(res);
  868. if (res.code == 0) {
  869. this.tableData = res.data.records || [];
  870. this.page.total = res.data.total;
  871. // 表格中设置ref属性,在数据渲染之后或者updated()之后
  872. this.$nextTick(() => {
  873. this.$refs.crud.doLayout();
  874. });
  875. }
  876. });
  877. },
  878. clearScreen() {
  879. this.page.currentPage = 1;
  880. this.searchForm = {
  881. name: "",
  882. keywordsId: [],
  883. recording: "",
  884. markAdvisor: null,
  885. recDurationInterval: "",
  886. visitRecord: "",
  887. staDate: "",
  888. endDate: "",
  889. houseType: "",
  890. dateType: null,
  891. taboo: "",
  892. questionId: "",
  893. fraction: "",
  894. wordFraction: "",
  895. marketingBusiness: [],
  896. zfal: "",
  897. projectId:
  898. this.orgType == 3
  899. ? localStorage.getItem("houseId")
  900. : this.houseList[0].id,
  901. };
  902. if (this.$route.query.houseId) {
  903. this.searchForm.projectId = this.$route.query.houseId;
  904. }
  905. this.findbypage();
  906. },
  907. houseChange() {
  908. this.findbypage();
  909. this.findKeywords();
  910. this.findQuestionList();
  911. // this.getMarketingBusiness();// 销讲业务
  912. // 获取置业顾问列表
  913. this.findUserListByHouseId();
  914. },
  915. timeChange(e) {
  916. if (!e) {
  917. this.searchForm.dateType = null;
  918. this.searchForm.staDate = "";
  919. this.searchForm.endDate = "";
  920. } else {
  921. this.searchForm.dateType = null;
  922. this.searchForm.staDate = e[0];
  923. this.searchForm.endDate = e[1];
  924. }
  925. this.houseChange();
  926. },
  927. screen() {
  928. this.page.currentPage = 1;
  929. this.findbypage();
  930. },
  931. findKeywords() {
  932. this.$api.api
  933. .findKeywords({
  934. dateType: this.searchForm.staDate ? null : this.searchForm.dateType,
  935. statDateStart: this.searchForm.staDate,
  936. statDateEnd: this.searchForm.endDate,
  937. projectId: this.searchForm.projectId,
  938. type: this.type,
  939. })
  940. .then((res) => {
  941. this.keywordsList = res.data;
  942. });
  943. },
  944. zkhousePage() {
  945. this.$api.api
  946. .findHouseByUser({
  947. orgType: localStorage.getItem("orgType"),
  948. })
  949. .then((res) => {
  950. // console.log(res)
  951. this.houseList = res.data;
  952. if (localStorage.getItem("orgType") == 3) {
  953. if (this.$route.query.houseId) {
  954. this.searchForm.projectId = this.$route.query.houseId;
  955. } else {
  956. this.searchForm.projectId = localStorage.getItem("houseId");
  957. }
  958. } else {
  959. this.searchForm.projectId = res.data[0].id;
  960. }
  961. this.houseChange();
  962. // 获取转写方式
  963. this.findTransferMethod();
  964. // 获取销讲业务
  965. this.getMarketingBusiness();
  966. });
  967. },
  968. // 置业顾问列表
  969. async findUserListByHouseId() {
  970. let result = await this.$api.api.findUserListByHouseId({
  971. orgType: localStorage.getItem("orgType"),
  972. projectId: this.searchForm.projectId,
  973. });
  974. this.accountList = result.data;
  975. },
  976. handleSizeChange(val) {
  977. this.page.pageSize = val;
  978. this.findbypage();
  979. },
  980. handleCurrentChange(val) {
  981. this.page.currentPage = val;
  982. this.findbypage();
  983. },
  984. tabtimetap(idx) {
  985. this.searchForm.staDate = "";
  986. this.searchForm.endDate = "";
  987. // this.$set(this, "time", null);
  988. this.searchForm.dateType = idx;
  989. this.time = [];
  990. this.houseChange();
  991. },
  992. timestampToTime(timestamp) {
  993. var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  994. // var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  995. var yyyy = date.getFullYear() + "-";
  996. var MM =
  997. (date.getMonth() + 1 < 10
  998. ? "0" + (date.getMonth() + 1)
  999. : date.getMonth() + 1) + "-";
  1000. // var dd = date.getDate() + ' ';
  1001. var dd =
  1002. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  1003. return yyyy + MM + dd;
  1004. },
  1005. },
  1006. watch: {
  1007. $route(to, from) {
  1008. this.resetParams();
  1009. //监听路由是否变化
  1010. if (to.query.types != from.query.types && to.query.types != null) {
  1011. let arr = this.$route.query.types.split(",");
  1012. this.searchForm[arr[0]] = arr[1];
  1013. }
  1014. if (to.query.date != from.query.date && to.query.date != null) {
  1015. this.time = this.$route.query.date.split(",");
  1016. this.searchForm.staDate = this.time[0];
  1017. this.searchForm.endDate = this.time[1];
  1018. }
  1019. },
  1020. showColumn(nowV) {
  1021. let params = {
  1022. tableIdName: this.tableIdName,
  1023. optionData: nowV,
  1024. };
  1025. this.$db.upDate(params);
  1026. },
  1027. },
  1028. };
  1029. </script>
  1030. <style scoped="scoped" lang="scss">
  1031. .box-center {
  1032. width: 100%;
  1033. padding: 5px 15px 40px;
  1034. min-width: 1000px;
  1035. }
  1036. .cen-tab {
  1037. width: 100%;
  1038. padding: 15px;
  1039. background: #ffffff;
  1040. margin-top: 15px;
  1041. }
  1042. .tophove {
  1043. color: #ffffff;
  1044. background: #2671e2;
  1045. }
  1046. .app-top {
  1047. width: 100%;
  1048. background: #ffffff;
  1049. box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
  1050. border-radius: 4px;
  1051. padding-top: 15px;
  1052. padding-bottom: 15px;
  1053. .app-titel {
  1054. width: 100%;
  1055. display: flex;
  1056. align-items: center;
  1057. flex-wrap: wrap;
  1058. .label {
  1059. font-size: 16px;
  1060. font-weight: 400;
  1061. color: #32363d;
  1062. line-height: 32px;
  1063. min-width: 120px;
  1064. text-align: right;
  1065. }
  1066. .toptimeqhuan {
  1067. height: 30px;
  1068. background: #ffffff;
  1069. display: flex;
  1070. align-items: center;
  1071. margin-left: 9px;
  1072. }
  1073. .toptimeqhuan div {
  1074. padding-left: 20px;
  1075. padding-right: 20px;
  1076. text-align: center;
  1077. line-height: 30px;
  1078. font-size: 14px;
  1079. margin-right: 15px;
  1080. border-radius: 4px;
  1081. border: 1px solid #e0e0e0;
  1082. }
  1083. .toptimeqhuan .btn {
  1084. padding-left: 20px;
  1085. padding-right: 20px;
  1086. text-align: center;
  1087. font-size: 14px;
  1088. border-radius: 4px;
  1089. border: 1px solid #e0e0e0;
  1090. }
  1091. }
  1092. }
  1093. .div-lab {
  1094. display: flex;
  1095. margin: 5px;
  1096. }
  1097. .div-inp {
  1098. width: 250px;
  1099. }
  1100. /deep/ .el-table__header-wrapper {
  1101. thead {
  1102. tr {
  1103. th {
  1104. background: #f5f7fa;
  1105. color: #333333;
  1106. }
  1107. }
  1108. }
  1109. }
  1110. /deep/ .el-button--primary {
  1111. background: #2671e2 !important;
  1112. border: 1px solid #2671e2 !important;
  1113. }
  1114. /deep/ .el-button--text {
  1115. color: #2671e2;
  1116. }
  1117. </style>