Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

801 linhas
17 KiB

  1. <template>
  2. <view class="box">
  3. <!-- 选择器 -->
  4. <view class="boxtittab">
  5. <view class="tabbox" @click="taptimeisshow">
  6. {{ timeText }}
  7. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  8. </view>
  9. <view class="tabbox" @click="selectshow = true">
  10. {{ guwenText }}
  11. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  12. </view>
  13. <view class="tabbox" @click="tapsoltishow">
  14. {{ steyStatus }}
  15. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  16. </view>
  17. <view class="tabbox" @click="showIdent = true">
  18. {{ weijinTag }}
  19. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  20. </view>
  21. </view>
  22. <view class="count" v-if="recordList.length > 0">
  23. 筛选结果:<text>{{totalRecords}} </text>条
  24. </view>
  25. <view class="content">
  26. <view v-if="recordList.length==0"
  27. style="width: 100%;height: 100%;display: flex;align-items: center;background: #FFFFFF;">
  28. <view style="width: 100%;padding-top: 200rpx;">
  29. <view style="width: 100%;text-align: center;">
  30. <image style="width: 220rpx;height: 200rpx;"
  31. src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
  32. </view>
  33. <view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view>
  34. </view>
  35. </view>
  36. <view v-if="recordList.length!=0" class="content-tips" v-for="(item,index) in recordList" :key='index'
  37. @click="tapThevisiting(item, index)">
  38. <view class="content-first">
  39. <view class="left">
  40. <view class="img">顾</view>
  41. <view class="name">{{item.agentName}}</view>
  42. <view class="status" v-if="item.replaceReception==1">代接待</view>
  43. </view>
  44. <view class="right">
  45. <view class="">
  46. {{ item.violatedStatus | ViolatedStatus }}|{{ item.disposeStatus | DisposeStatus }}
  47. </view>
  48. </view>
  49. </view>
  50. <view class="content-last">
  51. <view class="item">
  52. <image src="@/static/images/img/time.png" mode=""></image>
  53. <text>{{item.createTime}}</text>
  54. </view>
  55. <view class="item">
  56. <image src="@/static/images/img/voice.png" mode=""></image>
  57. <text>{{item.mm || '0'}}min</text>
  58. </view>
  59. <view class="item">
  60. <image src="@/static/images/img/hit.png" mode=""></image>
  61. <text>{{item.violatedFrequency || '0'}}</text>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. <!-- 选择顾问的选择框 -->
  67. <u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select>
  68. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  69. <u-popup v-model="timeshow" mode="bottom">
  70. <block v-for="(data, index) in activeList" :key="index">
  71. <view class="timeview" :style="{ color: activeTotal == data.id ? '#2B6EFF' : '#333333' }"
  72. @click="tabtimetap(data.id, data.title)">{{ data.title }}</view>
  73. </block>
  74. </u-popup>
  75. <u-select v-model="soltishow" :list="orderBylist" @confirm="selectCallback2"></u-select>
  76. <u-select v-model="showIdent" :list="identList" @confirm="selectIdent"></u-select>
  77. <!-- 加载组件 -->
  78. <loading v-model="LOADING"></loading>
  79. </view>
  80. </template>
  81. <script>
  82. import loading from "@/components/loading/index.vue"
  83. export default {
  84. components: {
  85. loading
  86. },
  87. data() {
  88. return {
  89. orderBylist: [{
  90. label: '全部',
  91. value: null
  92. }, {
  93. label: '待处理',
  94. value: 0
  95. }, {
  96. label: '已处理',
  97. value: 1
  98. }],
  99. activeTotal: 5,
  100. activeList: [ // 时间筛选数组
  101. {
  102. title: '全部',
  103. id: 5,
  104. },
  105. {
  106. title: '今天',
  107. id: 0,
  108. },
  109. {
  110. title: '昨天',
  111. id: 1,
  112. },
  113. {
  114. title: '近7天',
  115. id: 2,
  116. },
  117. {
  118. title: '近30天',
  119. id: 3,
  120. },
  121. {
  122. title: '自定义',
  123. id: 4,
  124. },
  125. ],
  126. showIdent: false, // 显示选择违禁标识列表
  127. identList: [ // 违禁标识列表
  128. {
  129. label: '全部',
  130. value: null
  131. },
  132. {
  133. label: '有效',
  134. value: 1
  135. },
  136. {
  137. label: '无效',
  138. value: 2
  139. },
  140. ],
  141. violatedStatus: null, // 违禁状态
  142. selectshow: false,
  143. totalTimeShow: false,
  144. screen: {
  145. agentId: '', //顾问id
  146. record: '0',
  147. },
  148. freeList: [], //顾问
  149. recordList: [],
  150. buildingID: '',
  151. nextPage: 1,
  152. totalRecord: "",
  153. staTime: '',
  154. endtime: '',
  155. isnorefresh: '',
  156. activeTotal2: 0,
  157. timeshow: false,
  158. soltishow: false,
  159. orderBy: null,
  160. userInfo: {},
  161. totalRecords: '', // 列表全部的条数
  162. isRefresh: false,
  163. nextPageObj: {}, // 跳转详情页面的参数
  164. // 页面文字展示内容
  165. timeText: '接待时间', //
  166. guwenText: '顾问', //
  167. steyStatus: '处理状态', //
  168. weijinTag: '违禁标识', // 违禁标识
  169. }
  170. },
  171. onLoad(options) {
  172. this.LOADING = true
  173. if (options.refresh) this.isnorefresh = options.refresh;
  174. if (options.activeTotal) {
  175. this.activeTotal = options.activeTotal
  176. }
  177. if (options.staTime) {
  178. this.staTime = options.staTime;
  179. this.endtime = options.endtime;
  180. this.timeText = `${options.staTime}-${options.endtime}`
  181. }
  182. if (options.violatedStatus) {
  183. this.violatedStatus = options.violatedStatus
  184. this.weijinTag = this.identList[options.violatedStatus].label
  185. }
  186. console.log(options)
  187. if (options.projectId) {
  188. this.buildingID = options.projectId;
  189. this.recordList = [];
  190. this.nextPage = 1;
  191. this.isRefresh = false;
  192. this.getMyCustom()
  193. this.getFreeList();
  194. this.isnorefresh = '';
  195. }
  196. },
  197. onShow() {
  198. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  199. if (this.isnorefresh == 'refresh') {
  200. this.buildingID = uni.getStorageSync('buildingID').id;
  201. this.recordList = [];
  202. this.nextPage = 1;
  203. this.isRefresh = false;
  204. this.getMyCustom()
  205. this.getFreeList();
  206. this.isnorefresh = '';
  207. }
  208. var pages = getCurrentPages();
  209. pages[0].$vm.path = '/pages/index/index'
  210. console.log(pages[0].$vm.path)
  211. },
  212. onPullDownRefresh() {
  213. this.nextPage = 1;
  214. this.isRefresh = true;
  215. this.getMyCustom()
  216. this.resetRefreshParams()
  217. setTimeout(function() {
  218. uni.stopPullDownRefresh();
  219. }, 1000);
  220. },
  221. onReachBottom() {
  222. if (this.totalRecord == this.nextPage) {
  223. uni.showToast({
  224. icon: 'none',
  225. title: '到底了',
  226. duration: 2000
  227. });
  228. return
  229. } else {
  230. this.nextPage += 1;
  231. this.isRefresh = false;
  232. this.getMyCustom();
  233. }
  234. },
  235. methods: {
  236. // 重置参数
  237. resetRefreshParams() {
  238. this.timeText = '接待时间'
  239. this.activeTotal = 5
  240. this.guwenText = '顾问'
  241. this.screen.agentId = '' // 顾问id
  242. this.steyStatus = '处理状态'
  243. this.orderBy = null
  244. this.weijinTag = '违禁标识'
  245. this.violatedStatus = null // 违禁状态
  246. },
  247. tapsoltishow() {
  248. this.soltishow = true;
  249. },
  250. taptimeisshow() {
  251. this.timeshow = true;
  252. },
  253. //选择标签
  254. selectCallback2(e) {
  255. this.orderBy = e[0].value;
  256. this.steyStatus = e[0].label;
  257. this.nextPage = 1;
  258. this.recordList = [];
  259. this.isRefresh = false;
  260. this.getMyCustom();
  261. },
  262. // 选择违禁标识
  263. selectIdent(e) {
  264. this.violatedStatus = e[0].value
  265. this.weijinTag = e[0].label
  266. this.nextPage = 1;
  267. this.recordList = [];
  268. this.isRefresh = false;
  269. this.getMyCustom();
  270. },
  271. //时间选择
  272. tabtimetap(index, title) {
  273. this.timeshow = false;
  274. if (index == 4) {
  275. this.totalTimeShow = true;
  276. } else {
  277. this.timeText = title
  278. this.activeTotal = index;
  279. this.staTime = '';
  280. this.endtime = '';
  281. this.nextPage = 1;
  282. this.recordList = [];
  283. this.isRefresh = false;
  284. this.getMyCustom();
  285. }
  286. },
  287. //自定义时间
  288. totalTimeChange(e) {
  289. this.staTime = e.startDate;
  290. this.endtime = e.endDate;
  291. this.timeText = `${e.startDate}-${e.endDate}`
  292. this.activeTotal = 4;
  293. this.nextPage = 1;
  294. this.recordList = [];
  295. this.isRefresh = false;
  296. this.getMyCustom();
  297. },
  298. // 跳转违禁详情
  299. tapThevisiting(item, index) {
  300. if (item.status == 0) {
  301. uni.showToast({
  302. icon: "none",
  303. title: "排队中"
  304. })
  305. return
  306. } else {
  307. const parames = {
  308. pageNum: 1,
  309. pageSize: 100,
  310. query: {
  311. customerId: item.id,
  312. }
  313. }
  314. this.$u.post("/customer/prohibitedMatch", {
  315. customerId: item.id
  316. }).then(res => {
  317. let newweijin = res[0];
  318. newweijin.transferContent = JSON.parse(newweijin.transferContent)
  319. var item = {
  320. bg: newweijin.transferContent.bg,
  321. customerId: newweijin.corpusId,
  322. }
  323. uni.setStorageSync("searchobj", item); //写入缓存
  324. this.$u.post("/corpus/findByPage", parames).then(res => {
  325. if (res == null) {
  326. uni.showToast({
  327. icon: "none",
  328. title: "暂无音频"
  329. })
  330. return
  331. } else {
  332. let newobj = res[0];
  333. let obj = {
  334. pageSize: index + 1,
  335. num: this.totalRecords,
  336. query: {
  337. ...this.nextPageObj
  338. }
  339. }
  340. uni.setStorageSync('nextPageObj', JSON.stringify(obj))
  341. uni.navigateTo({
  342. url: `/pages/center/prohibited/details?customerId=${newobj.customerId}&status=${newobj.status}&stateisshow=${"2"}&index=${index}&isMerge=${res[0].merge}`
  343. })
  344. // if (res[0].merge == 0) {
  345. // }
  346. // else {
  347. // uni.navigateTo({
  348. // url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&stateisshow=${"2"}`
  349. // })
  350. // }
  351. }
  352. })
  353. })
  354. }
  355. },
  356. // 获取围巾列表
  357. getMyCustom() {
  358. let dateType = 0;
  359. if (this.activeTotal == 5) {
  360. dateType = null;
  361. } else if (this.activeTotal == 4) {
  362. dateType = null;
  363. } else {
  364. dateType = this.activeTotal;
  365. }
  366. var parames = {
  367. pageNum: this.nextPage,
  368. pageSize: 10,
  369. query: {
  370. projectId: this.buildingID,
  371. time: 1,
  372. staTime: this.staTime,
  373. endtime: this.endtime,
  374. taboo: 1,
  375. dateType: dateType,
  376. disposeStatus: this.orderBy, // 处理状态
  377. violatedStatus: this.violatedStatus, // 违禁状态
  378. validInvalid: 0, // 接待有效无效
  379. }
  380. };
  381. if (this.screen.agentId) {
  382. parames.query.agentId = this.screen.agentId
  383. }
  384. this.$u.post("/customer/findbypage", parames).then(data => {
  385. this.LOADING = false
  386. var list = data.results || [];
  387. if (this.isRefresh) {
  388. this.recordList = list;
  389. } else {
  390. this.recordList = [...this.recordList, ...list];
  391. }
  392. this.totalRecord = data.totalPage;
  393. this.totalRecords = data.totalRecord;
  394. this.nextPageObj = parames.query
  395. }).catch(e => {
  396. this.LOADING = false
  397. })
  398. },
  399. //获取顾问列表
  400. getFreeList() {
  401. this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
  402. houseId: this.buildingID
  403. }).then(res => {
  404. this.freeList = res;
  405. this.freeList.forEach(item => {
  406. item.label = item.name;
  407. item.value = item.accountId
  408. })
  409. this.freeList.unshift({
  410. label: '全部',
  411. value: null,
  412. })
  413. })
  414. },
  415. //顾问确认
  416. actionSelectCallback(e) {
  417. this.screen.agentId = e[0].value;
  418. this.guwenText = e[0].label;
  419. this.recordList = [];
  420. this.nextPage = 1;
  421. this.selectshow = false;
  422. this.isRefresh = false;
  423. this.getMyCustom();
  424. },
  425. },
  426. filters: {
  427. // violatedStatus
  428. ViolatedStatus(status) {
  429. let str = '';
  430. switch (status) {
  431. case 0:
  432. str = '有效违禁'
  433. break;
  434. case 1:
  435. str = '有效违禁'
  436. break;
  437. case 2:
  438. str = '无效违禁'
  439. break;
  440. }
  441. return str
  442. },
  443. // DisposeStatus
  444. DisposeStatus(status) {
  445. let str = '';
  446. switch (status) {
  447. case 0:
  448. str = '待处理'
  449. break;
  450. case 1:
  451. str = '已处理'
  452. break;
  453. }
  454. return str
  455. },
  456. }
  457. }
  458. </script>
  459. <style lang="scss" scoped>
  460. .box {
  461. width: 100vw;
  462. min-height: calc(100vh - var(--window-top));
  463. background: #F8F8F8;
  464. }
  465. .count {
  466. width: 100%;
  467. height: 90rpx;
  468. display: flex;
  469. align-items: center;
  470. justify-content: center;
  471. background-color: #FBE4E4;
  472. text {
  473. color: #F71616;
  474. }
  475. }
  476. .timeview {
  477. height: 80rpx;
  478. line-height: 80rpx;
  479. width: 100%;
  480. text-align: center;
  481. border-bottom: 1px solid #F8F8F8;
  482. }
  483. //时间切换的样式
  484. .boxtittab {
  485. position: sticky;
  486. top: var(--window-top);
  487. z-index: 100;
  488. width: 100;
  489. height: 92rpx;
  490. background: #FFFFFF;
  491. border: 1px solid #E0E0E0;
  492. display: flex;
  493. align-items: center;
  494. .tabbox {
  495. flex: 1;
  496. height: 100%;
  497. text-align: center;
  498. line-height: 92rpx;
  499. color: #666666;
  500. font-size: 28rpx;
  501. overflow: hidden;
  502. /* 超出一行文字自动隐藏 */
  503. text-overflow: ellipsis;
  504. /*文字隐藏后添加省略号*/
  505. white-space: nowrap;
  506. /*强制不换行*/
  507. }
  508. }
  509. .search-box {
  510. width: 100%;
  511. height: 102rpx;
  512. background: #FFFFFF;
  513. display: flex;
  514. align-items: center;
  515. justify-content: center;
  516. .search {
  517. width: 94%;
  518. height: 70rpx;
  519. display: flex;
  520. align-items: center;
  521. background: #F8F8F8;
  522. border-radius: 33rpx;
  523. .search-img {
  524. width: 26rpx;
  525. height: 30rpx;
  526. margin-left: 20rpx;
  527. .search-img1 {
  528. width: 100%;
  529. height: 100%;
  530. margin-top: 2rpx;
  531. }
  532. }
  533. .search-text {
  534. font-size: 28rpx;
  535. font-weight: 400;
  536. color: #999999;
  537. margin-left: 10rpx;
  538. }
  539. }
  540. .search-screen {
  541. width: 40rpx;
  542. height: 40rpx;
  543. margin-left: 30rpx;
  544. .search-screen1 {
  545. width: 100%;
  546. height: 100%;
  547. }
  548. }
  549. }
  550. .content {
  551. .content-tips {
  552. margin: 0 0 20rpx 0;
  553. background: #fff;
  554. box-sizing: border-box;
  555. display: flex;
  556. flex-direction: column;
  557. .content-first {
  558. padding: 20rpx 30rpx;
  559. display: flex;
  560. justify-content: space-between;
  561. background-color: #EEF4FD;
  562. .left {
  563. display: flex;
  564. .img {
  565. margin-right: 10rpx;
  566. width: 52rpx;
  567. height: 52rpx;
  568. background: #FFFFFF;
  569. border: 1px solid #C9C9C9;
  570. border-radius: 50%;
  571. text-align: center;
  572. line-height: 52rpx;
  573. }
  574. .name {
  575. font-weight: 600;
  576. color: #333333;
  577. // margin-left: 20rpx;
  578. margin-top: 11rpx;
  579. }
  580. .status {
  581. width: 110rpx;
  582. height: 42rpx;
  583. background: #FFF9F5;
  584. border-radius: 4rpx;
  585. font-size: 26rpx;
  586. font-weight: 400;
  587. color: #EC8D49;
  588. line-height: 42rpx;
  589. text-align: center;
  590. margin-left: 19rpx;
  591. margin-top: 11rpx;
  592. }
  593. }
  594. .right {
  595. display: flex;
  596. margin-top: 11rpx;
  597. .point {
  598. width: 12rpx;
  599. height: 12rpx;
  600. background: #2B6EFF;
  601. border-radius: 50%;
  602. margin-right: 9rpx;
  603. margin-top: 16rpx;
  604. }
  605. }
  606. }
  607. .content-last {
  608. padding: 24rpx 30rpx;
  609. font-size: 30rpx;
  610. font-weight: 400;
  611. color: #666666;
  612. display: flex;
  613. justify-content: space-between;
  614. .item {
  615. flex-shrink: 0;
  616. display: flex;
  617. align-items: center;
  618. image {
  619. margin-right: 10rpx;
  620. width: 32rpx;
  621. height: 32rpx;
  622. }
  623. text {
  624. font-size: 28rpx;
  625. }
  626. }
  627. }
  628. }
  629. }
  630. // 这是弹出层
  631. .screen {
  632. // box-sizing: border-box;
  633. // padding: 0 30rpx;
  634. position: absolute;
  635. .screen-counselor {
  636. display: flex;
  637. height: 106rpx;
  638. // padding: 40rpx 30rpx 36rpx 30rpx;
  639. padding: 0 30rpx;
  640. box-sizing: border-box;
  641. border-bottom: 1px solid #EEEEEE;
  642. .screen-text {
  643. margin: 40rpx 0 36rpx 0;
  644. font-size: 30rpx;
  645. font-weight: 400;
  646. color: #333333;
  647. line-height: 30rpx;
  648. }
  649. .screen-sel {
  650. display: flex;
  651. justify-content: space-between;
  652. width: 500rpx;
  653. margin-left: 60rpx;
  654. .screen-sel-img {
  655. margin: 40rpx 0 36rpx 0;
  656. width: 14rpx;
  657. height: 30rpx;
  658. }
  659. .screen-inp {
  660. margin-top: 20rpx;
  661. }
  662. }
  663. }
  664. .screen-record {
  665. height: 192rpx;
  666. // width: 100%;
  667. overflow: hidden;
  668. padding: 0 30rpx;
  669. box-sizing: border-box;
  670. border-bottom: 1px solid #EEEEEE;
  671. .screen-record-text {
  672. margin-top: 36rpx;
  673. font-size: 30rpx;
  674. font-weight: 400;
  675. color: #333333;
  676. line-height: 30rpx;
  677. }
  678. .screen-record-tab {
  679. margin-top: 30rpx;
  680. display: flex;
  681. // justify-content: space-around;
  682. .screen-record-chose {
  683. width: 156rpx;
  684. height: 60rpx;
  685. background: #2671E2;
  686. border-radius: 4rpx;
  687. border: 1px solid #2671E2;
  688. text-align: center;
  689. line-height: 60rpx;
  690. margin-right: 22rpx;
  691. color: #FFFFFF;
  692. }
  693. .screen-record-nochose {
  694. width: 156rpx;
  695. height: 60rpx;
  696. background: #FFFFFF;
  697. border-radius: 4rpx;
  698. border: 1px solid #C9C9C9;
  699. text-align: center;
  700. line-height: 60rpx;
  701. margin-right: 22rpx;
  702. }
  703. }
  704. }
  705. .screen-foot {
  706. width: 100%;
  707. height: 100rpx;
  708. display: flex;
  709. .screen-foot-reset {
  710. width: 50%;
  711. text-align: center;
  712. height: 100rpx;
  713. line-height: 100rpx;
  714. font-size: 30rpx;
  715. font-weight: 400;
  716. color: #666666;
  717. }
  718. .screen-foot-sure {
  719. width: 50%;
  720. text-align: center;
  721. line-height: 100rpx;
  722. height: 100rpx;
  723. font-size: 30rpx;
  724. font-weight: 400;
  725. color: #FFFFFF;
  726. background: #2671E2;
  727. }
  728. }
  729. }
  730. </style>