AI销管
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

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