AI销管
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.
 
 
 
 

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