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.
 
 
 

886 lines
23 KiB

  1. <template>
  2. <view class="box">
  3. <view class="boxtittabs">
  4. <view class="items" @tap="screenShow = true">{{ showTimeText }}
  5. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon>
  6. </view>
  7. <view class="items" @tap="showTemplate = true">{{ showBeText }}
  8. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon>
  9. </view>
  10. </view>
  11. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  12. <view class="Piabodata-box">
  13. <view class="Piabodata" @click="toTrendAnalysis()">
  14. <view class="Piabodata-img">
  15. <image class="Piabodata-img1" src="../../../static/images/qushi.png" mode=""></image>
  16. </view>
  17. <view class="Piabodata-text">趋势分析</view>
  18. </view>
  19. <view class="Piabodata" @click="toStaffAnalysis()">
  20. <view class="Piabodata-img">
  21. <image class="Piabodata-img1" src="../../../static/images/yuangong.png" mode=""></image>
  22. </view>
  23. <view class="Piabodata-text">员工分析</view>
  24. </view>
  25. <view class="Piabodata" @click="toUserinsightinto()">
  26. <view class="Piabodata-img">
  27. <image class="Piabodata-img1" src="../../../static/images/yinghu.png" mode=""></image>
  28. </view>
  29. <view class="Piabodata-text">用户洞察</view>
  30. </view>
  31. <view class="Piabodata" @click="Theteamcompared()" v-if="Theteamcomparedisshow">
  32. <view class="Piabodata-img">
  33. <image class="Piabodata-img1" src="../../../static/images/tuandui.png" mode=""></image>
  34. </view>
  35. <view class="Piabodata-text">团队对比</view>
  36. </view>
  37. <view class="Piabodata" @click="Groupcontrast()" v-if="Groupcontrastisshow">
  38. <view class="Piabodata-img">
  39. <image class="Piabodata-img1" src="../../../static/images/jituan.png" mode=""></image>
  40. </view>
  41. <view class="Piabodata-text">集团对比</view>
  42. </view>
  43. <view class="Piabodata" @click="towajue()">
  44. <view class="Piabodata-img">
  45. <image class="Piabodata-img1" src="../../../static/images/qushi.png" mode=""></image>
  46. </view>
  47. <view class="Piabodata-text">需求挖掘分析</view>
  48. </view>
  49. </view>
  50. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  51. <view class="boxzonglan" style="min-height: 400rpx;">
  52. <view class="zonglantit">简报</view>
  53. <view class="zonglanbox">
  54. <view class="grid" v-for="(item,index) in numlist" :key="index">
  55. <view class="audonum">{{item.name}}</view>
  56. <view class="num">{{item.num}}</view>
  57. </view>
  58. </view>
  59. </view>
  60. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  61. <view class="single">
  62. <view class="title">
  63. <view class="title1">接待趋势</view>
  64. </view>
  65. <view class="swiper-box">
  66. <u-tabs-swiper ref="tabs" font-size="30" :bold="true" swiper-width="600" :current="bocindex"
  67. @change="tapspagek2()" inactive-color="#b1b1b1" active-color="#008ef2" :list="newlistoj1"
  68. :is-scroll="true">
  69. </u-tabs-swiper>
  70. </view>
  71. <!-- <view class="hejibox">
  72. <view class="heji">合计:50</view>
  73. <view class="heji">均值:25</view>
  74. </view> -->
  75. <view class="danwei">{{danwei}} </view>
  76. <view class="uchaserbox">
  77. <template v-if="danwei == '单位(%)'">
  78. <qiun-data-charts type="line" :chartData="lineOptsect" :opts="lineOpts" background="none"
  79. :ontouch="true" canvasId="wangxiaohuaerlingilingwuyiba1" :canvas2d="true" />
  80. </template>
  81. <template v-else>
  82. <qiun-data-charts type="line" :chartData="lineOptsect" background="none" :ontouch="true"
  83. canvasId="wangxiaohuaerlingilingwuyiba1" :canvas2d="true" />
  84. </template>
  85. </view>
  86. </view>
  87. <view class="" v-if="teamFlag">
  88. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  89. <view class="single">
  90. <view class="title" @click="staffShow1=true">
  91. <view class="title1">团队接待趋势</view>
  92. <view class="title2">
  93. <view class="title2-che" style="width: 220rpx;display: flex;align-items: center;">
  94. <text
  95. style="flex-grow: 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{team.label}}</text>
  96. <image style="flex-shrink: 0;" class="righttochoose"
  97. src="../../../static/images/righttochoose.png" mode=""></image>
  98. </view>
  99. </view>
  100. </view>
  101. <view class="danwei">单位(%)</view>
  102. <view class="uchaserbox">
  103. <qiun-data-charts type="line" :chartData="lineOptsect1" background="none" :ontouch="true"
  104. canvasId="wangxiaohuaerlineryiliwuyibao" :canvas2d="true" :opts="lineOpts" />
  105. </view>
  106. </view>
  107. </view>
  108. <view class="" v-if="staffFlag">
  109. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  110. <view class="single">
  111. <view class="title">
  112. <view class="title1">员工接待趋势</view>
  113. <view class="title2" @click="staffShow=true">
  114. <view class="title2-che" style="width: 220rpx;">{{staff.label}}
  115. <image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="danwei">单位(%)</view>
  120. <view class="uchaserbox">
  121. <qiun-data-charts type="line" :chartData="lineOptsect2" background="none" :ontouch="true"
  122. canvasId="wangxiaohuaerlingeryilingwuyibao" :canvas2d="true" :opts="lineOpts" />
  123. </view>
  124. </view>
  125. </view>
  126. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  127. <view class="single">
  128. <view class="title">
  129. <view class="title1">场景触达分析</view>
  130. <view class="title2" @click="showTemplates=true">
  131. <view class="title2-che" style="width: 220rpx;">
  132. {{ showBeTexts }}
  133. <image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
  134. </view>
  135. </view>
  136. </view>
  137. <view style="width: 100%;height: 300rpx;text-align: center;line-height: 300rpx;"
  138. v-if="newlisttabinfo.length==0">暂无数据</view>
  139. <view v-else class="jindu" style="margin-top: 20rpx;">
  140. <scroll-view style="height: 300rpx;" scroll-y="true">
  141. <view class="jindu-box" v-for="(item,index) in newlisttabinfo" :key="index">
  142. <view class="jindu-boxche">
  143. <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
  144. <view style="width: 440rpx;margin-left: 10rpx;">
  145. <u-line-progress height="24" :show-percent="false" active-color="#4FC78F"
  146. :percent="item.zxl"></u-line-progress>
  147. </view>
  148. <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view>
  149. </view>
  150. </view>
  151. </scroll-view>
  152. </view>
  153. </view>
  154. <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
  155. <view class="single">
  156. <view class="title">
  157. <view class="title1">销讲指标执行率</view>
  158. </view>
  159. <view class="swiper-box">
  160. <u-tabs-swiper ref="tabs" font-size="30" :bold="true" swiper-width="600" :current="bocindex1"
  161. @change="tapspagek3" inactive-color="#b1b1b1" active-color="#008ef2" :list="newlistoj"
  162. :is-scroll="true">
  163. </u-tabs-swiper>
  164. </view>
  165. <view style="width: 100%;height: 300rpx;text-align: center;line-height: 300rpx;"
  166. v-if="newlisttabinfo1.length==0">暂无数据</view>
  167. <view class="jindu" v-else>
  168. <scroll-view style="height: 300rpx;" scroll-y="true">
  169. <view class="jindu-box" v-for="(item,index) in newlisttabinfo1" :key="index">
  170. <view class="jindu-boxche">
  171. <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
  172. <view style="width: 440rpx;margin-left: 10rpx;">
  173. <u-line-progress height="24" :show-percent="false" active-color="#4FC78F"
  174. :percent="item.zxl"></u-line-progress>
  175. </view>
  176. <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view>
  177. </view>
  178. </view>
  179. </scroll-view>
  180. </view>
  181. </view>
  182. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  183. <u-select v-model="staffShow" :list="staffList" @confirm="staffSelectCallback($event,0)"
  184. :default-value='selindex'></u-select>
  185. <u-select v-model="staffShow1" :list="teamList" @confirm="staffSelectCallback($event,1)"
  186. :default-value='selindex'></u-select>
  187. <!-- 更多筛选 -->
  188. <u-popup v-model="screenShow" mode="bottom" height="368">
  189. <view class="screen">
  190. <view class="boxtittab">
  191. <view class="tabbox">
  192. <view :class="{ activecllasscet: activeTotal == 4 }" @click="tabtimetap(4, '近七天')">近七天</view>
  193. </view>
  194. <view class="tabbox">
  195. <view :class="{ activecllasscet: activeTotal == 5 }" @click="tabtimetap(5, '近15天')">近15天</view>
  196. </view>
  197. <view class="tabbox">
  198. <view :class="{ activecllasscet: activeTotal == 6 }" @click="tabtimetap(6, '近30天')">近30天</view>
  199. </view>
  200. <view class="tabbox">
  201. <view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3, '自定义')">自定义</view>
  202. </view>
  203. </view>
  204. </view>
  205. </u-popup>
  206. <!-- 销讲业务 -->
  207. <u-select :mask-close-able="false" label-name="templateName" value-name="id" v-model="showTemplate"
  208. mode="single-column" :list="templateList" @cancel="templateCancel" @confirm="templateConfirm"></u-select>
  209. <!-- 销讲业务2 -->
  210. <u-select :mask-close-able="false" label-name="templateName" value-name="id" v-model="showTemplates"
  211. mode="single-column" :list="templateLists" @cancel="showTemplates = false" @confirm="templateConfirms">
  212. </u-select>
  213. <!-- 加载组件 -->
  214. <loading v-model="LOADING"></loading>
  215. </view>
  216. </template>
  217. <script>
  218. var app = getApp();
  219. var config = require("../../../config");
  220. import loading from "@/components/loading/index.vue"
  221. export default {
  222. components: {
  223. loading
  224. },
  225. data() {
  226. return {
  227. activeTotal: 4,
  228. activeTotal2: 0,
  229. houseId: '',
  230. timeobj: {
  231. statDateStart: '',
  232. statDateEnd: ''
  233. },
  234. // 员工列表
  235. staffList: [],
  236. // 团队列表
  237. teamList: [],
  238. staffShow: false,
  239. staff: {
  240. value: '',
  241. label: ''
  242. },
  243. team: {
  244. value: '',
  245. label: ''
  246. },
  247. teamFlag: true,
  248. bocindex1: 0,
  249. staffFlag: true,
  250. staffShow1: false,
  251. lastStartDate: '',
  252. lastEndDate: '',
  253. allnum: '',
  254. allavg: '',
  255. allnum1: '',
  256. allavg1: '',
  257. danwei: '单位(次)',
  258. totalTimeShow: false,
  259. activeTab: 0,
  260. numlist: [{
  261. name: '接待量',
  262. num: '',
  263. setName: 'sumCustomer'
  264. }, {
  265. name: '有效接待',
  266. num: '',
  267. setName: 'receptionCount'
  268. },
  269. {
  270. name: '平均执行率',
  271. num: '',
  272. setName: 'fraction'
  273. },
  274. {
  275. name: '平均接待时长',
  276. num: '',
  277. setName: 'sumDuration'
  278. },
  279. ],
  280. lineOptsect: {
  281. "categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
  282. "series": [{
  283. "name": "成交量",
  284. "data": [35, 8, 25, 37, 4, 20]
  285. }]
  286. },
  287. lineOptsect1: {
  288. "categories": [],
  289. "series": []
  290. },
  291. lineOptsect2: {
  292. "categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
  293. "series": [{
  294. "name": "成交量",
  295. "data": [35, 8, 25, 37, 4, 20]
  296. }]
  297. },
  298. newlistoj: [],
  299. newlistoj1: [{
  300. name: "接待量",
  301. id: 3,
  302. title: '单位(个)',
  303. setName: 'sumCustomer'
  304. },
  305. {
  306. name: "有效接待",
  307. id: 1,
  308. title: '单位(次)',
  309. setName: 'receptionCount'
  310. },
  311. {
  312. name: "平均执行率",
  313. id: 2,
  314. title: '单位(%)',
  315. setName: 'fraction'
  316. },
  317. {
  318. name: "平均接待时长",
  319. id: 5,
  320. title: '单位(min)',
  321. setName: 'sumDuration'
  322. },
  323. ],
  324. bocindex: 0,
  325. newlisttabinfo: [{
  326. name: '接待量',
  327. zxl: '10'
  328. },
  329. {
  330. name: '平均执行率',
  331. zxl: '50'
  332. },
  333. {
  334. name: '接待客户',
  335. zxl: '80'
  336. },
  337. ],
  338. newlisttabinfo1: [],
  339. Theteamcomparedisshow: false,
  340. Groupcontrastisshow: false,
  341. allechar: [],
  342. allList: [],
  343. lineOpts: {
  344. yAxis: {
  345. data: [{
  346. max: 100,
  347. min: 0,
  348. }]
  349. }
  350. },
  351. screenShow: false, // 时间筛选弹窗
  352. showTimeText: '近七天', // 展示文字
  353. showBeText: '全部业务', //
  354. templateList: [], // 销讲业务
  355. showTemplate: false, // 展示选择销讲业务弹窗
  356. marketingBusiness: '', // 选择的业务id
  357. showTemplates: false, // 展示选择销讲业务弹窗
  358. templateLists: [], // 销讲业务
  359. marketingBusinessId: '', // 选择的业务id
  360. showBeTexts: '', //
  361. };
  362. },
  363. onShow() {
  364. this.LOADING = true
  365. // 获取项目id
  366. this.houseId = uni.getStorageSync('buildingID').id;
  367. // 获取数据看板
  368. this.getMarketingBusiness()
  369. // 获取员工
  370. this.getStaffList()
  371. // 获取团队
  372. this.getSectionList()
  373. // 获取团队是否显示权限
  374. this.queryHaveDept()
  375. // 获取简报
  376. this.getReport()
  377. // 获取接待趋势
  378. this.getRtrent()
  379. // 获取维度
  380. this.getindexZxl()
  381. },
  382. onPullDownRefresh() {
  383. this.getMarketingBusiness()
  384. // 获取员工
  385. this.getStaffList()
  386. // 获取团队
  387. this.getSectionList()
  388. // 获取团队是否显示权限
  389. // 获取简报
  390. this.getReport()
  391. // 获取接待趋势
  392. this.getRtrent()
  393. // 获取维度
  394. this.getindexZxl()
  395. setTimeout(function() {
  396. uni.stopPullDownRefresh();
  397. }, 1000);
  398. },
  399. methods: {
  400. // 销讲业务方法
  401. templateCancel() {
  402. this.showTemplate = false;
  403. },
  404. // 确认选择销讲业务
  405. templateConfirm(e) {
  406. this.showTemplate = false;
  407. this.marketingBusiness = e[0].value
  408. this.showBeText = e[0].label
  409. this.getdata()
  410. },
  411. // 确认选择销讲业务
  412. templateConfirms(e) {
  413. this.showTemplates = false;
  414. this.marketingBusinessId = e[0].value
  415. this.showBeTexts = e[0].label
  416. this.getdata()
  417. },
  418. // 获取销讲业务
  419. getMarketingBusiness() {
  420. this.$u.get('/customer/marketingBusiness', {
  421. houseId: uni.getStorageSync('buildingID').id,
  422. }).then(res => {
  423. this.templateLists = res.map(item => {
  424. return item
  425. })
  426. this.marketingBusinessId = res[0].id
  427. this.showBeTexts = res[0].templateName
  428. this.templateList = res
  429. this.templateList.unshift({
  430. templateName: '全部业务',
  431. id: ''
  432. })
  433. // 获取维度
  434. this.getindexZxl()
  435. })
  436. },
  437. towajue() {
  438. uni.navigateTo({
  439. url: "/pages/center/Piabodata/requireminingAnalysis"
  440. })
  441. },
  442. queryHaveDept() {
  443. return new Promise((resolve, reject) => {
  444. this.$u.get("/user/queryHaveDept?houseId=" + this.houseId).then(res => {
  445. this.permissions(res)
  446. })
  447. })
  448. },
  449. permissions(res) {
  450. if (res == 1) {
  451. this.Theteamcomparedisshow = false;
  452. this.Groupcontrastisshow = false;
  453. return
  454. }
  455. let totle = uni.getStorageSync('weapp_session_userInfo_data').total;
  456. if (totle == 1) {
  457. this.Theteamcomparedisshow = true;
  458. this.Groupcontrastisshow = false;
  459. } else {
  460. this.Theteamcomparedisshow = true;
  461. this.Groupcontrastisshow = true;
  462. }
  463. },
  464. // 获取员工列表
  465. getStaffList() {
  466. this.$u.post('/cusLvStatistics/selectAllAccountIdByHouseId', {
  467. houseId: this.houseId
  468. })
  469. .then(res => {
  470. // console.log(res,'123')
  471. this.staffList = []
  472. res.map(item => {
  473. let obj = {}
  474. obj.value = item.accountId
  475. obj.label = item.name
  476. this.staffList.push(obj)
  477. })
  478. this.staff = this.staffList[0]
  479. this.getAward()
  480. })
  481. },
  482. // 获取接待趋势
  483. getRtrent() {
  484. this.$u.post('/cusLvStatistics/receptionTrend', {
  485. houseId: this.houseId,
  486. timeType: this.lastEndDate ? null : this.activeTotal,
  487. lastEndDate: this.lastEndDate,
  488. lastStartDate: this.lastStartDate,
  489. marketingBusiness: this.marketingBusiness,
  490. })
  491. .then(res => {
  492. // console.log(res)
  493. this.allechar = res
  494. this.tapspagek2(this.bocindex)
  495. })
  496. },
  497. // 销奖维度
  498. getindexZxl() {
  499. this.$u.post('/cusLvStatistics/indexZxl', {
  500. houseId: this.houseId,
  501. timeType: this.lastEndDate ? null : this.activeTotal,
  502. lastEndDate: this.lastEndDate,
  503. lastStartDate: this.lastStartDate,
  504. marketingBusiness: this.marketingBusinessId,
  505. })
  506. .then(res => {
  507. this.LOADING = false
  508. // console.log(res)
  509. // 处理销奖维度执行率
  510. // this.newlisttabinfo
  511. let arr = []
  512. this.newlistoj = []
  513. res.list.map((item, index) => {
  514. arr.push({
  515. name: item.name,
  516. zxl: item.zxl
  517. })
  518. this.newlistoj.push({
  519. name: item.name,
  520. id: index
  521. })
  522. })
  523. this.newlisttabinfo = arr
  524. this.allList = res.list
  525. this.tapspagek3(this.bocindex1)
  526. }).catch(e => {
  527. this.LOADING = false
  528. })
  529. },
  530. // 获取简报
  531. getReport() {
  532. this.$u.post('/cusLvStatistics/xiaojiangAnalysis', {
  533. houseId: this.houseId,
  534. timeType: this.lastEndDate ? null : this.activeTotal,
  535. lastEndDate: this.lastEndDate,
  536. lastStartDate: this.lastStartDate,
  537. marketingBusiness: this.marketingBusiness,
  538. })
  539. .then(res => {
  540. res.sumDuration = Math.floor(res.sumDuration / 60) || 0
  541. res.fraction = (res.fraction > 100 ? 100 : (res.fraction || 0)) + '%'
  542. this.numlist.map(item => {
  543. item.num = res[item.setName]
  544. })
  545. })
  546. },
  547. // 获取团队列表
  548. getSectionList() {
  549. this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId', {
  550. houseId: this.houseId
  551. })
  552. .then(res => {
  553. this.teamList = []
  554. res.map(item => {
  555. let obj = {}
  556. obj.value = item.deptId
  557. obj.label = item.deptName
  558. this.teamList.push(obj)
  559. })
  560. this.team = this.teamList[0]
  561. this.receptionCountList()
  562. })
  563. },
  564. // 员工销奖趋势
  565. getAward() {
  566. if (this.staffList.length == 0) {
  567. this.staffFlag = false
  568. this.$forceUpdate()
  569. return
  570. }
  571. this.$u.post('/cusLvStatistics/employeeAnalysisExacutiveRate', {
  572. userA: this.staff.value,
  573. userB: '',
  574. houseId: this.houseId,
  575. timeType: this.lastEndDate ? null : this.activeTotal + '',
  576. lastEndDate: this.lastEndDate,
  577. lastStartDate: this.lastStartDate,
  578. marketingBusiness: this.marketingBusiness,
  579. })
  580. .then(res => {
  581. this.allnum1 = res.avg[0]
  582. this.allavg1 = res.avg[1]
  583. // console.log(res)
  584. let first = res.first
  585. let second = res.second
  586. this.lineOptsect2.categories = []
  587. this.lineOptsect2.series = [{
  588. name: first[0].accountName,
  589. data: []
  590. }]
  591. first.map(item => {
  592. this.lineOptsect2.categories.push(item.statDate.slice(5, 10))
  593. this.lineOptsect2.series[0].data.push(item.sumFraction)
  594. })
  595. })
  596. },
  597. // 团队接待趋势
  598. receptionCountList() {
  599. if (this.teamList.length == 0) {
  600. this.teamFlag = false
  601. this.$forceUpdate()
  602. return
  603. }
  604. this.$u.post('/cusLvStatistics/teamAnalysisExecutionRate', {
  605. deptIds: this.team.value,
  606. showRank: 1,
  607. houseId: this.houseId,
  608. timeType: this.lastEndDate ? null : this.activeTotal + '',
  609. lastEndDate: this.lastEndDate,
  610. lastStartDate: this.lastStartDate,
  611. marketingBusiness: this.marketingBusiness,
  612. })
  613. .then(res => {
  614. // console.log(res)
  615. let result = res.result
  616. this.allnum = res.avg[0]
  617. this.allavg = res.avg[1]
  618. // 当选择趋势时
  619. this.lineOptsect1 = {}
  620. let allobj = {
  621. categories: [],
  622. series: []
  623. }
  624. // 先处理时间
  625. // 当选择全部时
  626. // 当选择只有一个时
  627. let obj = {}
  628. obj.data = []
  629. obj.name = result[0][0].deptName
  630. result[0].map(item => {
  631. allobj.categories.push(item.statDate.slice(5, 10))
  632. obj.data.push(item.data)
  633. })
  634. allobj.series.push(obj)
  635. this.lineOptsect1 = allobj
  636. })
  637. },
  638. //时间切换
  639. tabtimetap(index, text) {
  640. if (index == 3) {
  641. this.totalTimeShow = true;
  642. this.screenShow = false
  643. } else {
  644. this.screenShow = false
  645. this.showTimeText = text
  646. this.activeTotal = index;
  647. this.lastEndDate = ''
  648. this.lastStartDate = ''
  649. this.getdata()
  650. }
  651. },
  652. // 获取数据
  653. getdata() {
  654. this.receptionCountList()
  655. this.getReport()
  656. this.getRtrent()
  657. this.getindexZxl()
  658. this.getAward()
  659. },
  660. staffSelectCallback(e, idx) {
  661. if (idx == 0) {
  662. this.staff = e[0]
  663. this.getAward()
  664. } else {
  665. this.team = e[0]
  666. this.receptionCountList()
  667. }
  668. // console.log(e,idx)
  669. },
  670. //自定义时间
  671. totalTimeChange(e) {
  672. console.log(e.startDate, e.endDate)
  673. this.screenShow = false
  674. this.showTimeText = `${e.startDate}-${e.endDate}`
  675. this.activeTotal = 3;
  676. this.lastEndDate = e.endDate
  677. this.lastStartDate = e.startDate
  678. this.getdata()
  679. },
  680. //指标执行率分析tab
  681. tapspagek2(index) {
  682. console.log(index)
  683. // 对数据进行分析和处理
  684. // 先处理日期
  685. let allobj = {
  686. "categories": [],
  687. "series": [{
  688. name: '接待量',
  689. data: []
  690. }]
  691. }
  692. this.danwei = this.newlistoj1[index].title
  693. allobj.series[0].name = this.newlistoj1[index].name
  694. this.allechar.map(item => {
  695. allobj.categories.push(item.statDate.slice(5, 10))
  696. allobj.series[0].data.push(item[this.newlistoj1[index].setName])
  697. })
  698. this.bocindex = index;
  699. this.lineOptsect = allobj
  700. this.$forceUpdate()
  701. },
  702. tapspagek3(index) {
  703. let arr = []
  704. // return
  705. // console.log(index,this.allList[index])
  706. this.allList[index].children.map(item => {
  707. arr.push({
  708. name: item.name,
  709. zxl: item.zxl > 100 ? 100 : item.zxl
  710. })
  711. })
  712. this.newlisttabinfo1 = arr
  713. this.bocindex1 = index;
  714. },
  715. //集团对比
  716. Groupcontrast() {
  717. uni.navigateTo({
  718. url: '/pages/center/Piabodata/Groupcontrast'
  719. });
  720. },
  721. //团队对比
  722. Theteamcompared() {
  723. if (this.teamList.length == 0) {
  724. uni.showToast({
  725. title: '没有团队呢',
  726. icon: 'none'
  727. })
  728. return
  729. }
  730. uni.navigateTo({
  731. url: '/pages/center/Piabodata/Theteamcompared'
  732. });
  733. },
  734. //用户洞察
  735. toUserinsightinto() {
  736. uni.navigateTo({
  737. url: '/pages/center/Piabodata/Userinsightinto'
  738. });
  739. },
  740. //趋势分析
  741. toTrendAnalysis() {
  742. uni.navigateTo({
  743. url: '/pages/center/Piabodata/TrendAnalysis'
  744. });
  745. },
  746. //员工分析
  747. toStaffAnalysis() {
  748. if (this.staffList.length == 0) {
  749. uni.showToast({
  750. title: '没有团队呢',
  751. icon: 'none'
  752. })
  753. return
  754. }
  755. uni.navigateTo({
  756. url: '/pages/center/Piabodata/StaffAnalysis'
  757. });
  758. }
  759. }
  760. };
  761. </script>
  762. <style lang="scss" scoped>
  763. .boxtittabs {
  764. width: 100%;
  765. height: 92rpx;
  766. background: #FFFFFF;
  767. display: flex;
  768. align-items: center;
  769. .items {
  770. padding: 0 24rpx;
  771. width: 50%;
  772. height: 100%;
  773. display: flex;
  774. align-items: center;
  775. justify-content: center;
  776. overflow: hidden;
  777. white-space: nowrap;
  778. text-overflow: ellipsis;
  779. }
  780. }
  781. .screen {
  782. width: 100%;
  783. .boxtittab {
  784. width: 100%;
  785. flex-direction: column;
  786. border: none;
  787. .tabbox {
  788. width: 100%;
  789. }
  790. }
  791. }
  792. .box {
  793. width: 100%;
  794. height: 100%;
  795. background: #FAFAFA;
  796. padding-bottom: 60rpx;
  797. }
  798. .Piabodata-box {
  799. width: 100%;
  800. background: #FFFFFF;
  801. display: flex;
  802. flex-wrap: wrap;
  803. padding-bottom: 30rpx;
  804. .Piabodata {
  805. width: 33.3%;
  806. .Piabodata-img {
  807. width: 100%;
  808. text-align: center;
  809. .Piabodata-img1 {
  810. width: 134rpx;
  811. height: 134rpx;
  812. }
  813. }
  814. .Piabodata-text {
  815. width: 100%;
  816. text-align: center;
  817. font-size: 24rpx;
  818. font-weight: 400;
  819. color: #333333;
  820. margin-top: -10rpx;
  821. }
  822. }
  823. }
  824. .grid:nth-child(1) {
  825. border-right: none;
  826. border-bottom: none;
  827. }
  828. .grid:nth-child(2) {
  829. border-bottom: none;
  830. }
  831. .grid:nth-child(3) {
  832. border-right: none;
  833. }
  834. </style>