AI销管
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 

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