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.
 
 
 
 

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