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.
 
 
 

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