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.
 
 
 

760 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-if="recordList.length!=0" 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 }}
  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. staTime: this.staTime,
  352. endtime: this.endtime,
  353. taboo: 1,
  354. dateType: dateType,
  355. disposeStatus: this.orderBy, // 处理状态
  356. violatedStatus: this.violatedStatus, // 违禁状态
  357. }
  358. };
  359. if (this.screen.agentId) {
  360. parames.query.agentId = this.screen.agentId
  361. }
  362. this.$u.post("/customer/findbypage", parames).then(data => {
  363. var list = data.results || [];
  364. if (this.isRefresh) {
  365. this.recordList = list;
  366. } else {
  367. this.recordList = [...this.recordList, ...list];
  368. }
  369. this.totalRecord = data.totalPage;
  370. this.totalRecords = data.totalRecord;
  371. this.nextPageObj = parames.query
  372. })
  373. },
  374. //获取顾问列表
  375. getFreeList() {
  376. this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
  377. houseId: this.buildingID
  378. }).then(res => {
  379. this.freeList = res;
  380. this.freeList.forEach(item => {
  381. item.label = item.name;
  382. item.value = item.accountId
  383. })
  384. this.freeList.unshift({
  385. label: '全部',
  386. value: null,
  387. })
  388. })
  389. },
  390. //顾问确认
  391. actionSelectCallback(e) {
  392. this.screen.agentId = e[0].value;
  393. this.guwenText = e[0].label;
  394. this.recordList = [];
  395. this.nextPage = 1;
  396. this.selectshow = false;
  397. this.isRefresh = false;
  398. this.getMyCustom();
  399. },
  400. },
  401. filters: {
  402. // violatedStatus
  403. ViolatedStatus(status) {
  404. let str = '';
  405. switch (status) {
  406. case 0:
  407. str = '待处理'
  408. break;
  409. case 1:
  410. str = '有效违禁'
  411. break;
  412. case 2:
  413. str = '无效违禁'
  414. break;
  415. }
  416. return str
  417. },
  418. }
  419. }
  420. </script>
  421. <style lang="scss" scoped>
  422. .box {
  423. width: 100vw;
  424. min-height: calc(100vh - var(--window-top));
  425. background: #F8F8F8;
  426. }
  427. .count {
  428. width: 100%;
  429. height: 90rpx;
  430. display: flex;
  431. align-items: center;
  432. justify-content: center;
  433. background-color: #FBE4E4;
  434. text {
  435. color: #F71616;
  436. }
  437. }
  438. .timeview {
  439. height: 80rpx;
  440. line-height: 80rpx;
  441. width: 100%;
  442. text-align: center;
  443. border-bottom: 1px solid #F8F8F8;
  444. }
  445. //时间切换的样式
  446. .boxtittab {
  447. position: sticky;
  448. top: var(--window-top);
  449. z-index: 100;
  450. width: 100;
  451. height: 92rpx;
  452. background: #FFFFFF;
  453. border: 1px solid #E0E0E0;
  454. display: flex;
  455. align-items: center;
  456. .tabbox {
  457. flex: 1;
  458. height: 100%;
  459. text-align: center;
  460. line-height: 92rpx;
  461. color: #666666;
  462. font-size: 28rpx;
  463. overflow: hidden;
  464. /* 超出一行文字自动隐藏 */
  465. text-overflow: ellipsis;
  466. /*文字隐藏后添加省略号*/
  467. white-space: nowrap;
  468. /*强制不换行*/
  469. }
  470. }
  471. .search-box {
  472. width: 100%;
  473. height: 102rpx;
  474. background: #FFFFFF;
  475. display: flex;
  476. align-items: center;
  477. justify-content: center;
  478. .search {
  479. width: 94%;
  480. height: 70rpx;
  481. display: flex;
  482. align-items: center;
  483. background: #F8F8F8;
  484. border-radius: 33rpx;
  485. .search-img {
  486. width: 26rpx;
  487. height: 30rpx;
  488. margin-left: 20rpx;
  489. .search-img1 {
  490. width: 100%;
  491. height: 100%;
  492. margin-top: 2rpx;
  493. }
  494. }
  495. .search-text {
  496. font-size: 28rpx;
  497. font-weight: 400;
  498. color: #999999;
  499. margin-left: 10rpx;
  500. }
  501. }
  502. .search-screen {
  503. width: 40rpx;
  504. height: 40rpx;
  505. margin-left: 30rpx;
  506. .search-screen1 {
  507. width: 100%;
  508. height: 100%;
  509. }
  510. }
  511. }
  512. .content {
  513. .content-tips {
  514. margin: 0 0 20rpx 0;
  515. background: #fff;
  516. box-sizing: border-box;
  517. display: flex;
  518. flex-direction: column;
  519. .content-first {
  520. padding: 20rpx 30rpx;
  521. display: flex;
  522. justify-content: space-between;
  523. background-color: #EEF4FD;
  524. .left {
  525. display: flex;
  526. .img {
  527. margin-right: 10rpx;
  528. width: 52rpx;
  529. height: 52rpx;
  530. background: #FFFFFF;
  531. border: 1px solid #C9C9C9;
  532. border-radius: 50%;
  533. text-align: center;
  534. line-height: 52rpx;
  535. }
  536. .name {
  537. font-weight: 600;
  538. color: #333333;
  539. // margin-left: 20rpx;
  540. margin-top: 11rpx;
  541. }
  542. .status {
  543. width: 110rpx;
  544. height: 42rpx;
  545. background: #FFF9F5;
  546. border-radius: 4rpx;
  547. font-size: 26rpx;
  548. font-weight: 400;
  549. color: #EC8D49;
  550. line-height: 42rpx;
  551. text-align: center;
  552. margin-left: 19rpx;
  553. margin-top: 11rpx;
  554. }
  555. }
  556. .right {
  557. display: flex;
  558. margin-top: 11rpx;
  559. .point {
  560. width: 12rpx;
  561. height: 12rpx;
  562. background: #2B6EFF;
  563. border-radius: 50%;
  564. margin-right: 9rpx;
  565. margin-top: 16rpx;
  566. }
  567. }
  568. }
  569. .content-last {
  570. padding: 24rpx 30rpx;
  571. font-size: 30rpx;
  572. font-weight: 400;
  573. color: #666666;
  574. display: flex;
  575. justify-content: space-between;
  576. .item {
  577. flex-shrink: 0;
  578. display: flex;
  579. align-items: center;
  580. image {
  581. margin-right: 10rpx;
  582. width: 32rpx;
  583. height: 32rpx;
  584. }
  585. text {
  586. font-size: 28rpx;
  587. }
  588. }
  589. }
  590. }
  591. }
  592. // 这是弹出层
  593. .screen {
  594. // box-sizing: border-box;
  595. // padding: 0 30rpx;
  596. position: absolute;
  597. .screen-counselor {
  598. display: flex;
  599. height: 106rpx;
  600. // padding: 40rpx 30rpx 36rpx 30rpx;
  601. padding: 0 30rpx;
  602. box-sizing: border-box;
  603. border-bottom: 1px solid #EEEEEE;
  604. .screen-text {
  605. margin: 40rpx 0 36rpx 0;
  606. font-size: 30rpx;
  607. font-weight: 400;
  608. color: #333333;
  609. line-height: 30rpx;
  610. }
  611. .screen-sel {
  612. display: flex;
  613. justify-content: space-between;
  614. width: 500rpx;
  615. margin-left: 60rpx;
  616. .screen-sel-img {
  617. margin: 40rpx 0 36rpx 0;
  618. width: 14rpx;
  619. height: 30rpx;
  620. }
  621. .screen-inp {
  622. margin-top: 20rpx;
  623. }
  624. }
  625. }
  626. .screen-record {
  627. height: 192rpx;
  628. // width: 100%;
  629. overflow: hidden;
  630. padding: 0 30rpx;
  631. box-sizing: border-box;
  632. border-bottom: 1px solid #EEEEEE;
  633. .screen-record-text {
  634. margin-top: 36rpx;
  635. font-size: 30rpx;
  636. font-weight: 400;
  637. color: #333333;
  638. line-height: 30rpx;
  639. }
  640. .screen-record-tab {
  641. margin-top: 30rpx;
  642. display: flex;
  643. // justify-content: space-around;
  644. .screen-record-chose {
  645. width: 156rpx;
  646. height: 60rpx;
  647. background: #2671E2;
  648. border-radius: 4rpx;
  649. border: 1px solid #2671E2;
  650. text-align: center;
  651. line-height: 60rpx;
  652. margin-right: 22rpx;
  653. color: #FFFFFF;
  654. }
  655. .screen-record-nochose {
  656. width: 156rpx;
  657. height: 60rpx;
  658. background: #FFFFFF;
  659. border-radius: 4rpx;
  660. border: 1px solid #C9C9C9;
  661. text-align: center;
  662. line-height: 60rpx;
  663. margin-right: 22rpx;
  664. }
  665. }
  666. }
  667. .screen-foot {
  668. width: 100%;
  669. height: 100rpx;
  670. display: flex;
  671. .screen-foot-reset {
  672. width: 50%;
  673. text-align: center;
  674. height: 100rpx;
  675. line-height: 100rpx;
  676. font-size: 30rpx;
  677. font-weight: 400;
  678. color: #666666;
  679. }
  680. .screen-foot-sure {
  681. width: 50%;
  682. text-align: center;
  683. line-height: 100rpx;
  684. height: 100rpx;
  685. font-size: 30rpx;
  686. font-weight: 400;
  687. color: #FFFFFF;
  688. background: #2671E2;
  689. }
  690. }
  691. }
  692. </style>