AI销管
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

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