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.
 
 
 
 

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