您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

1122 行
28 KiB

  1. <template>
  2. <div class="box-center">
  3. <!-- 头 -->
  4. <div class="app-top">
  5. <div class="app-titel" v-if="role != 3" style="margin-bottom: 10px">
  6. <div class="titel-text">项目选择:</div>
  7. <div style="margin-left: 26px">
  8. <el-select
  9. v-model="houseId"
  10. placeholder="请选择"
  11. filterable
  12. @change="houseChange"
  13. >
  14. <el-option
  15. v-for="item in houseList"
  16. :key="item.id"
  17. :label="item.propertyName"
  18. :value="item.id"
  19. >
  20. </el-option>
  21. </el-select>
  22. </div>
  23. </div>
  24. <div class="app-titel">
  25. <div style="text-indent: 30px">接待时间:</div>
  26. <div class="toptimeqhuan">
  27. <div :class="{ tophove: TimetoAhoose == 4 }" @click="tabtimetap(4)">
  28. 近7天
  29. </div>
  30. <div :class="{ tophove: TimetoAhoose == 5 }" @click="tabtimetap(5)">
  31. 近15天
  32. </div>
  33. <div :class="{ tophove: TimetoAhoose == 6 }" @click="tabtimetap(6)">
  34. 近30天
  35. </div>
  36. </div>
  37. <div style="margin-left: 26px">
  38. <el-date-picker
  39. v-model="customtime"
  40. @change="confirmtime()"
  41. type="daterange"
  42. :clearable="false"
  43. range-separator="-"
  44. :default-time="['00:00:00', '23:59:59']"
  45. value-format="yyyy-MM-dd"
  46. start-placeholder="开始日期"
  47. end-placeholder="结束日期"
  48. >
  49. </el-date-picker>
  50. </div>
  51. <div
  52. style="margin-left: auto; margin-right: 10px"
  53. v-if="sta_team_downLoad"
  54. >
  55. <el-button @click="downLoad">导出</el-button>
  56. </div>
  57. </div>
  58. </div>
  59. <!-- 表格 -->
  60. <div class="cen-tab">
  61. <div style="overflow: auto">
  62. <table>
  63. <tbody>
  64. <tr>
  65. <td
  66. v-for="(item, index) in tablsitdata1"
  67. :key="index"
  68. class="theadtd"
  69. >
  70. {{ item.name }}
  71. </td>
  72. </tr>
  73. <tr v-for="(item, iddex) in tablsitdata2" :key="iddex">
  74. <td v-if="iddex + 1 == tablsitdata2.length" class="theadtd">
  75. 合计/平均
  76. </td>
  77. <td v-else class="theadtd">{{ iddex + 1 }}</td>
  78. <td class="theadtd">{{ item.deptName }}</td>
  79. <td class="theadtd">{{ item.receptionCount }}</td>
  80. <td class="theadtd">{{ item.accountNum }}</td>
  81. <td class="theadtd">{{ item.activeCustomer || 0 }}</td>
  82. <td class="theadtd">{{ item.prohibitedCustomer || 0 }}</td>
  83. <td class="theadtd">
  84. {{ Math.floor(item.sumDuration / 60) || 0 }}
  85. </td>
  86. <td class="theadtd">{{ item.fraction || 0 }}%</td>
  87. <td class="theadtd">{{ item.prohibitedZb || 0 }}%</td>
  88. <td
  89. class="theadtd"
  90. v-for="(che, ind) in item.resultsList"
  91. :key="ind"
  92. >
  93. {{ che.zxl }}%
  94. </td>
  95. </tr>
  96. </tbody>
  97. </table>
  98. </div>
  99. </div>
  100. <div class="app-box-san">
  101. <div class="zuo">
  102. <div class="title">
  103. <div class="text1">接待量排名</div>
  104. </div>
  105. <div class="hejisan">
  106. <div class="sanbox1" style="width: 50%">
  107. <div class="text1-1">团队总数</div>
  108. <div class="text1-2">{{ teamobj1.num || 0 }}个</div>
  109. </div>
  110. <div class="sanbox1" style="width: 50%">
  111. <div class="text1-1">均值</div>
  112. <div class="text1-2">{{ teamobj1.avg || 0 }}个</div>
  113. </div>
  114. </div>
  115. <div
  116. v-if="teamobj1.list.length != 0"
  117. style="width: 94%; margin: 0 auto"
  118. >
  119. <div class="jinbox" v-for="(item, i) in teamobj1.list" :key="i">
  120. <div class="jinboxtit">{{ item.name }}</div>
  121. <div class="jinbox-box">
  122. <div
  123. class="boxbaifenbi"
  124. :style="'width:' + item.zxl1 + '%;'"
  125. ></div>
  126. </div>
  127. <div class="jinboxbott">{{ item.zxl }}个</div>
  128. </div>
  129. </div>
  130. <div
  131. class="nulllist"
  132. v-if="teamobj1.list.length == 0"
  133. >
  134. <div class="imgboxc">
  135. <img class="imgboxc-img" src="/img/nullnull.png" alt="" />
  136. <div class="nulltext">暂无数据</div>
  137. </div>
  138. </div>
  139. </div>
  140. <div class="you">
  141. <div class="title">
  142. <div class="text1">接待时长排名</div>
  143. </div>
  144. <div class="hejisan">
  145. <div class="sanbox1" style="width: 50%">
  146. <div class="text1-1">团队总数</div>
  147. <div class="text1-2">{{ teamobj2.num || 0 }}个</div>
  148. </div>
  149. <div class="sanbox1" style="width: 50%">
  150. <div class="text1-1">均值</div>
  151. <div class="text1-2">
  152. {{ Math.floor(teamobj2.avg / 60) || 0 }}分钟
  153. </div>
  154. </div>
  155. </div>
  156. <div
  157. v-if="teamobj2.list.length != 0"
  158. style="width: 94%; margin: 0 auto"
  159. >
  160. <div class="jinbox" v-for="(item, i) in teamobj2.list" :key="i">
  161. <div class="jinboxtit">{{ item.name }}</div>
  162. <div class="jinbox-box">
  163. <div
  164. class="boxbaifenbi"
  165. :style="'width:' + item.zxl1 + '%;'"
  166. ></div>
  167. </div>
  168. <div class="jinboxbott">{{ item.zxl }}分钟</div>
  169. </div>
  170. </div>
  171. <div
  172. class="nulllist"
  173. v-if="teamobj2.list.length == 0"
  174. >
  175. <div class="imgboxc">
  176. <img class="imgboxc-img" src="/img/nullnull.png" alt="" />
  177. <div class="nulltext">暂无数据</div>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. <div class="app-box-san">
  183. <div class="zuo">
  184. <div class="title">
  185. <div class="text1">销讲执行率</div>
  186. <div class="text2">
  187. <el-select
  188. @change="teamAllLevelidtap()"
  189. style="width: 90%; margin: 0 auto"
  190. v-model="teamAllLevelid"
  191. placeholder="请选择"
  192. >
  193. <el-option
  194. v-for="item in teamAllLevel"
  195. :key="item.value"
  196. :label="item.name"
  197. :value="item.value"
  198. >
  199. </el-option>
  200. </el-select>
  201. </div>
  202. </div>
  203. <div class="hejisan">
  204. <div class="sanbox1" style="width: 50%">
  205. <div class="text1-1">团队总数</div>
  206. <div class="text1-2">{{ teamobj3.num || 0 }}个</div>
  207. </div>
  208. <div class="sanbox1" style="width: 50%">
  209. <div class="text1-1">均值</div>
  210. <div class="text1-2">{{ teamobj3.avg || 0 }}%</div>
  211. </div>
  212. </div>
  213. <div
  214. v-if="teamobj3.list.length != 0"
  215. style="width: 94%; margin: 0 auto"
  216. >
  217. <div class="jinbox" v-for="(item, i) in teamobj3.list" :key="i">
  218. <div class="jinboxtit">{{ item.name }}</div>
  219. <div class="jinbox-box">
  220. <div
  221. class="boxbaifenbi"
  222. :style="'width:' + item.zxl + '%;'"
  223. ></div>
  224. </div>
  225. <div class="jinboxbott">{{ item.zxl }}%</div>
  226. </div>
  227. </div>
  228. <div
  229. class="nulllist"
  230. v-if="teamobj3.list.length == 0"
  231. >
  232. <div class="imgboxc">
  233. <img class="imgboxc-img" src="/img/nullnull.png" alt="" />
  234. <div class="nulltext">暂无数据</div>
  235. </div>
  236. </div>
  237. </div>
  238. <div class="you">
  239. <div class="title">
  240. <div class="text1">销讲能力雷达图</div>
  241. </div>
  242. <div
  243. id="main"
  244. v-if="isshowcd2 == true"
  245. style="width: 94%; margin: 0 auto"
  246. ></div>
  247. <div class="nulllist" v-if="isshowcd2 == false">
  248. <div class="imgboxc">
  249. <img class="imgboxc-img" src="/img/nullnull.png" alt="" />
  250. <div class="nulltext">暂无数据</div>
  251. </div>
  252. </div>
  253. </div>
  254. </div>
  255. <div class="app-box-san">
  256. <div class="zuo">
  257. <div class="title">
  258. <div class="text1">违禁接待次数</div>
  259. <div class="text2">
  260. <el-select
  261. @change="teamAllLeve2tap()"
  262. style="width: 90%; margin: 0 auto"
  263. v-model="teamAllLeve2id"
  264. placeholder="请选择"
  265. >
  266. <el-option
  267. v-for="item in teamAllLeve2"
  268. :key="item.value"
  269. :label="item.name"
  270. :value="item.value"
  271. >
  272. </el-option>
  273. </el-select>
  274. </div>
  275. </div>
  276. <div class="hejisan">
  277. <div class="sanbox1" style="width: 50%">
  278. <div class="text1-1">团队总数</div>
  279. <div class="text1-2">{{ teamobj5.num || 0 }}个</div>
  280. </div>
  281. <div class="sanbox1" style="width: 50%">
  282. <div class="text1-1">均值</div>
  283. <div class="text1-2">{{ teamobj5.avg || 0 }}次</div>
  284. </div>
  285. </div>
  286. <div
  287. v-if="teamobj5.list.length != 0"
  288. style="width: 94%; margin: 0 auto"
  289. >
  290. <div class="jinbox" v-for="(item, i) in teamobj5.list" :key="i">
  291. <div class="jinboxtit">{{ item.name }}</div>
  292. <div class="jinbox-box">
  293. <div
  294. class="boxbaifenbi"
  295. :style="'width:' + item.zxl1 + '%;'"
  296. ></div>
  297. </div>
  298. <div class="jinboxbott">{{ item.zxl }}次</div>
  299. </div>
  300. </div>
  301. <div
  302. class="nulllist"
  303. v-if="teamobj5.list.length == 0"
  304. >
  305. <div class="imgboxc">
  306. <img class="imgboxc-img" src="/img/nullnull.png" alt="" />
  307. <div class="nulltext">暂无数据</div>
  308. </div>
  309. </div>
  310. </div>
  311. <div class="you">
  312. <div class="title">
  313. <div class="text1">违禁话术雷达图</div>
  314. </div>
  315. <div
  316. v-if="isshowcd == true"
  317. id="main2"
  318. style="width: 94%; margin: 0 auto"
  319. ></div>
  320. <div class="nulllist" v-if="isshowcd == false">
  321. <div class="imgboxc">
  322. <img class="imgboxc-img" src="/img/nullnull.png" alt="" />
  323. <div class="nulltext">暂无数据</div>
  324. </div>
  325. </div>
  326. </div>
  327. </div>
  328. </div>
  329. </template>
  330. <script>
  331. import * as echarts from "echarts";
  332. import { mapGetters } from "vuex";
  333. import { exportMethodPost } from "@/util/util";
  334. export default {
  335. data() {
  336. return {
  337. houseId: "",
  338. TimetoAhoose: 4,
  339. customtime: [],
  340. statDateStart: "",
  341. statDateEnd: "",
  342. tablsitdata1: [],
  343. tablsitdata2: [],
  344. teamobj1: {
  345. avg: "",
  346. list: [],
  347. num: "",
  348. },
  349. teamobj2: {
  350. avg: "",
  351. list: [],
  352. num: "",
  353. },
  354. teamobj3: {
  355. avg: "",
  356. list: [],
  357. num: "",
  358. },
  359. teamobj5: {
  360. avg: "",
  361. list: [],
  362. num: "",
  363. },
  364. teamAllLevel: [],
  365. teamAllLevelid: "",
  366. teamAllLeve2: [],
  367. teamAllLeve2id: "",
  368. ceratelist: [],
  369. role: "",
  370. houseList: [],
  371. isshowcd: true,
  372. isshowcd2: true,
  373. };
  374. },
  375. computed: {
  376. ...mapGetters(["permissions"]),
  377. },
  378. created() {
  379. this.sta_team_downLoad = this.permissions["sta_team_downLoad"];
  380. },
  381. mounted() {
  382. this.role = localStorage.getItem("orgType");
  383. if (this.role == 3) {
  384. this.houseId = localStorage.getItem("houseId");
  385. this.allhttp();
  386. } else {
  387. this.zkhousePage();
  388. }
  389. },
  390. methods: {
  391. downLoad() {
  392. let pamaet = {
  393. houseId: this.houseId,
  394. dateType: 0,
  395. statDateStart: this.statDateStart,
  396. statDateEnd: this.statDateEnd,
  397. };
  398. if (this.TimetoAhoose == 7) {
  399. pamaet.dateType = null;
  400. } else {
  401. pamaet.dateType = this.TimetoAhoose;
  402. }
  403. exportMethodPost(
  404. "autoSR/cusStageStatistics/teamTableExport",
  405. "团队对比",
  406. pamaet
  407. );
  408. },
  409. zkhousePage() {
  410. this.$api.api
  411. .findHouseByUser({
  412. orgType: localStorage.getItem("orgType"),
  413. })
  414. .then((res) => {
  415. this.houseList = res.data;
  416. this.houseId = res.data[0].id;
  417. this.allhttp();
  418. });
  419. },
  420. houseChange() {
  421. this.customtime = [];
  422. this.TimetoAhoose = 4;
  423. this.statDateStart = "";
  424. this.statDateEnd = "";
  425. this.allhttp();
  426. },
  427. allhttp() {
  428. this.teamteamTable();
  429. this.teamData1();
  430. this.teamData2();
  431. this.teamData3();
  432. this.teamData4();
  433. this.teamData5();
  434. this.teamData6();
  435. this.teamAllLeve();
  436. },
  437. // 获取一级
  438. teamAllLeve() {
  439. this.teamAllLevel = [{ name: "平均执行", value: "" }];
  440. this.teamAllLeve2 = [{ name: "总次数", value: "" }];
  441. let pamaet = {
  442. houseId: this.houseId,
  443. dateType: 0,
  444. statDateStart: this.statDateStart,
  445. statDateEnd: this.statDateEnd,
  446. };
  447. if (this.TimetoAhoose == 7) {
  448. pamaet.dateType = null;
  449. } else {
  450. pamaet.dateType = this.TimetoAhoose;
  451. }
  452. this.$api.http.teamAllLevel(pamaet).then((res) => {
  453. let arr1 = res.data.resultsList || [];
  454. let arr2 = res.data.sensitiveWordsList || [];
  455. arr1.map((item) => {
  456. this.teamAllLevel.push({
  457. name: item.name,
  458. value: item.marketingId,
  459. });
  460. });
  461. arr2.map((item) => {
  462. this.teamAllLeve2.push({
  463. name: item.words,
  464. value: item.words,
  465. });
  466. });
  467. this.teamAllLevelid = "";
  468. this.teamAllLeve2id = "";
  469. });
  470. },
  471. //表格
  472. teamteamTable() {
  473. this.tablsitdata1 = [
  474. { name: "序号" },
  475. { name: "团队" },
  476. { name: "接待量" },
  477. { name: "接待顾问" },
  478. { name: "有效接待" },
  479. { name: "违禁接待次数" },
  480. { name: "接待时长(分)" },
  481. { name: "平均执行率" },
  482. { name: "违禁接待占比" },
  483. ];
  484. let pamaet = {
  485. houseId: this.houseId,
  486. dateType: 0,
  487. statDateStart: this.statDateStart,
  488. statDateEnd: this.statDateEnd,
  489. };
  490. if (this.TimetoAhoose == 7) {
  491. pamaet.dateType = null;
  492. } else {
  493. pamaet.dateType = this.TimetoAhoose;
  494. }
  495. this.$api.http.teamteamTable(pamaet).then((res) => {
  496. let newlist = res.data || [];
  497. this.tablsitdata2 = res.data;
  498. newlist[0].resultsList.map((item) => {
  499. this.tablsitdata1.push({ name: item.name });
  500. });
  501. });
  502. },
  503. //接待量排名
  504. teamData1() {
  505. this.teamobj1 = {
  506. avg: "",
  507. list: [],
  508. num: "",
  509. };
  510. let pamaet = {
  511. houseId: this.houseId,
  512. dateType: 0,
  513. statDateStart: this.statDateStart,
  514. statDateEnd: this.statDateEnd,
  515. type: 1,
  516. };
  517. if (this.TimetoAhoose == 7) {
  518. pamaet.dateType = null;
  519. } else {
  520. pamaet.dateType = this.TimetoAhoose;
  521. }
  522. this.$api.http.teamData(pamaet).then((res) => {
  523. let arr = [];
  524. res.data.list.map((item) => {
  525. let obj = {};
  526. obj.name = item.deptName;
  527. obj.zxl = item.activeCustomer;
  528. arr.push(obj);
  529. });
  530. arr = this.dealData(arr);
  531. this.teamobj1 = {
  532. avg: res.data.avg || 0,
  533. num: res.data.num || 0,
  534. list: arr || [],
  535. };
  536. });
  537. },
  538. //录音时长排名
  539. teamData2() {
  540. this.teamobj2 = {
  541. avg: "",
  542. list: [],
  543. num: "",
  544. };
  545. let pamaet = {
  546. houseId: this.houseId,
  547. dateType: 0,
  548. statDateStart: this.statDateStart,
  549. statDateEnd: this.statDateEnd,
  550. type: 2,
  551. };
  552. if (this.TimetoAhoose == 7) {
  553. pamaet.dateType = null;
  554. } else {
  555. pamaet.dateType = this.TimetoAhoose;
  556. }
  557. this.$api.http.teamData(pamaet).then((res) => {
  558. let arr = [];
  559. res.data.list.map((item) => {
  560. let obj = {};
  561. obj.name = item.deptName;
  562. obj.zxl = Math.floor(item.sumDuration / 60);
  563. arr.push(obj);
  564. });
  565. arr = this.dealData(arr);
  566. this.teamobj2 = {
  567. avg: res.data.avg || 0,
  568. num: res.data.num || 0,
  569. list: arr || [],
  570. };
  571. });
  572. },
  573. //销讲执行率切换一级
  574. teamAllLevelidtap() {
  575. this.teamData3();
  576. },
  577. //销讲执行率
  578. teamData3() {
  579. this.teamobj3 = {
  580. avg: "",
  581. list: [],
  582. num: "",
  583. };
  584. let pamaet = {
  585. houseId: this.houseId,
  586. dateType: 0,
  587. statDateStart: this.statDateStart,
  588. statDateEnd: this.statDateEnd,
  589. type: 3,
  590. marketingId: this.teamAllLevelid,
  591. };
  592. if (this.TimetoAhoose == 7) {
  593. pamaet.dateType = null;
  594. } else {
  595. pamaet.dateType = this.TimetoAhoose;
  596. }
  597. this.$api.http.teamData(pamaet).then((res) => {
  598. let arr = [];
  599. res.data.list.map((item) => {
  600. let obj = {};
  601. obj.name = item.deptName;
  602. obj.zxl = item.fraction;
  603. arr.push(obj);
  604. });
  605. // arr=this.dealData(arr)
  606. this.teamobj3 = {
  607. avg: res.data.avg || 0,
  608. num: res.data.num || 0,
  609. list: arr || [],
  610. };
  611. });
  612. },
  613. //销讲雷达图
  614. teamData4() {
  615. let pamaet = {
  616. houseId: this.houseId,
  617. dateType: 0,
  618. statDateStart: this.statDateStart,
  619. statDateEnd: this.statDateEnd,
  620. type: 4,
  621. };
  622. if (this.TimetoAhoose == 7) {
  623. pamaet.dateType = null;
  624. } else {
  625. pamaet.dateType = this.TimetoAhoose;
  626. }
  627. this.$api.http.teamData(pamaet).then((res) => {
  628. let namelist = [];
  629. let datalist = [];
  630. let newlinename = [];
  631. let arr = res.data.list || [];
  632. if (arr.length != 0) {
  633. arr.map((item) => {
  634. namelist.push(item.deptName);
  635. datalist.push({
  636. name: item.deptName,
  637. value: [],
  638. });
  639. });
  640. arr[0].resultsList.map((item) => {
  641. newlinename.push({
  642. name: item.name,
  643. max: 100,
  644. });
  645. });
  646. arr.map((item, index) => {
  647. datalist.map((che) => {
  648. if (item.deptName == che.name) {
  649. item.resultsList.map((as) => {
  650. che.value.push(as.zxl);
  651. });
  652. }
  653. });
  654. });
  655. }
  656. this.initecah(namelist, datalist, newlinename);
  657. });
  658. },
  659. //违禁话术雷达图
  660. teamData6() {
  661. let pamaet = {
  662. houseId: this.houseId,
  663. dateType: 0,
  664. statDateStart: this.statDateStart,
  665. statDateEnd: this.statDateEnd,
  666. type: 6,
  667. };
  668. if (this.TimetoAhoose == 7) {
  669. pamaet.dateType = null;
  670. } else {
  671. pamaet.dateType = this.TimetoAhoose;
  672. }
  673. this.$api.http.teamData(pamaet).then((res) => {
  674. let namelist = [];
  675. let datalist = [];
  676. let newlinename = [];
  677. let arr = res.data.list || [];
  678. if (arr.length != 0) {
  679. arr.map((item) => {
  680. namelist.push(item.deptName);
  681. datalist.push({
  682. name: item.deptName,
  683. value: [],
  684. });
  685. });
  686. arr[0].sensitiveWordsList.map((item) => {
  687. newlinename.push({
  688. name: item.words,
  689. max: 100,
  690. });
  691. });
  692. arr.map((item, index) => {
  693. datalist.map((che) => {
  694. if (item.deptName == che.name) {
  695. item.sensitiveWordsList.map((as) => {
  696. che.value.push(as.num);
  697. });
  698. }
  699. });
  700. });
  701. }
  702. this.initecah2(namelist, datalist, newlinename);
  703. });
  704. },
  705. initecah(namelist, datalist, newlinename) {
  706. if (datalist.length == 0) {
  707. this.isshowcd2 = false;
  708. return;
  709. } else {
  710. this.isshowcd2 = true;
  711. }
  712. echarts.init(document.getElementById("main")).dispose();
  713. var chartDom = document.getElementById("main");
  714. var myChart = echarts.init(chartDom);
  715. var option;
  716. option = {
  717. color: [
  718. "#6F8EDC",
  719. "#EE6666",
  720. "#F98120",
  721. "#1CC99E",
  722. "#9474FB",
  723. "#66AFF5",
  724. "#FABD2B",
  725. "#FFCF8F",
  726. "#657292",
  727. "#7A6A99",
  728. "#BF5D52",
  729. "#77B7E4",
  730. "#E6A065",
  731. "#9D5139",
  732. "#C1AA88",
  733. "#F87F7A",
  734. "#F6CF74",
  735. "#7F5506",
  736. "#88BB9B",
  737. "#6E99AA",
  738. "#5789D0",
  739. ],
  740. tooltip: {
  741. trigger: "axis",
  742. },
  743. legend: {
  744. data: namelist,
  745. right: "10",
  746. top: "10",
  747. },
  748. color: ["#2671E2", "#F3787B"],
  749. radar: {
  750. // shape: 'circle',
  751. indicator: newlinename,
  752. },
  753. series: [
  754. {
  755. type: "radar",
  756. tooltip: {
  757. trigger: "item",
  758. },
  759. data: datalist,
  760. },
  761. ],
  762. };
  763. option && myChart.setOption(option);
  764. window.addEventListener("resize", () => {
  765. myChart.resize();
  766. });
  767. },
  768. initecah2(namelist, datalist, newlinename) {
  769. if (datalist.length == 0) {
  770. this.isshowcd = false;
  771. return;
  772. } else {
  773. this.isshowcd = true;
  774. }
  775. echarts.init(document.getElementById("main2")).dispose();
  776. var chartDom = document.getElementById("main2");
  777. var myChart = echarts.init(chartDom);
  778. var option;
  779. option = {
  780. color: [
  781. "#6F8EDC",
  782. "#EE6666",
  783. "#F98120",
  784. "#1CC99E",
  785. "#9474FB",
  786. "#66AFF5",
  787. "#FABD2B",
  788. "#FFCF8F",
  789. "#657292",
  790. "#7A6A99",
  791. "#BF5D52",
  792. "#77B7E4",
  793. "#E6A065",
  794. "#9D5139",
  795. "#C1AA88",
  796. "#F87F7A",
  797. "#F6CF74",
  798. "#7F5506",
  799. "#88BB9B",
  800. "#6E99AA",
  801. "#5789D0",
  802. ],
  803. tooltip: {
  804. trigger: "axis",
  805. },
  806. legend: {
  807. data: namelist,
  808. right: "10",
  809. top: "10",
  810. },
  811. color: ["#2671E2", "#F3787B"],
  812. radar: {
  813. // shape: 'circle',
  814. indicator: newlinename,
  815. },
  816. series: [
  817. {
  818. type: "radar",
  819. tooltip: {
  820. trigger: "item",
  821. },
  822. data: datalist,
  823. },
  824. ],
  825. };
  826. option && myChart.setOption(option);
  827. window.addEventListener("resize", () => {
  828. myChart.resize();
  829. });
  830. },
  831. //违禁接待次数一级切换
  832. teamAllLeve2tap() {
  833. this.teamData5();
  834. },
  835. //违禁接待次数
  836. teamData5() {
  837. this.teamobj5 = {
  838. avg: "",
  839. list: [],
  840. num: "",
  841. };
  842. let pamaet = {
  843. houseId: this.houseId,
  844. dateType: 0,
  845. statDateStart: this.statDateStart,
  846. statDateEnd: this.statDateEnd,
  847. type: 5,
  848. words: this.teamAllLeve2id,
  849. };
  850. if (this.TimetoAhoose == 7) {
  851. pamaet.dateType = null;
  852. } else {
  853. pamaet.dateType = this.TimetoAhoose;
  854. }
  855. this.$api.http.teamData(pamaet).then((res) => {
  856. let arr = [];
  857. res.data.list.map((item) => {
  858. let obj = {};
  859. obj.name = item.deptName;
  860. obj.zxl = item.prohibitedCustomer;
  861. arr.push(obj);
  862. });
  863. arr = this.dealData(arr);
  864. this.teamobj5 = {
  865. avg: res.data.avg || 0,
  866. num: res.data.num || 0,
  867. list: arr || [],
  868. };
  869. });
  870. },
  871. // 自定义时间
  872. confirmtime() {
  873. this.TimetoAhoose = 7;
  874. (this.statDateStart = this.customtime[0]),
  875. (this.statDateEnd = this.customtime[1]);
  876. this.allhttp();
  877. },
  878. //切换时间
  879. tabtimetap(index) {
  880. this.TimetoAhoose = index;
  881. this.statDateStart = "";
  882. this.statDateEnd = "";
  883. this.customtime = [];
  884. this.allhttp();
  885. },
  886. dealData(arr) {
  887. console.log(arr);
  888. let num = Math.max.apply(
  889. Math,
  890. arr.map(function (o) {
  891. return o.zxl;
  892. })
  893. ); //结果:3
  894. arr.map((item) => {
  895. item.zxl1 = Math.floor((item.zxl / num) * 100) || 0;
  896. });
  897. return arr;
  898. },
  899. },
  900. };
  901. </script>
  902. <style scoped="scoped" lang="scss" >
  903. /* 添加table滚动条 */
  904. table {
  905. border-collapse: collapse;
  906. width: 100%;
  907. }
  908. tbody {
  909. display: block;
  910. // width: 100%;
  911. // overflow-x: auto;
  912. height: 220px;
  913. }
  914. tbody tr {
  915. display: table;
  916. width: 100%;
  917. table-layout: fixed;
  918. // word-break: break-all;
  919. }
  920. .box-center {
  921. width: 100%;
  922. padding: 15px;
  923. min-width: 1000px;
  924. padding-bottom: 100px;
  925. }
  926. .cen-tab {
  927. width: 100%;
  928. padding: 15px;
  929. background: #ffffff;
  930. margin-top: 15px;
  931. }
  932. .tophove {
  933. color: #ffffff;
  934. background: #2671e2;
  935. }
  936. .app-top {
  937. width: 100%;
  938. background: #ffffff;
  939. box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
  940. border-radius: 4px;
  941. padding-top: 15px;
  942. padding-bottom: 15px;
  943. }
  944. .app-titel {
  945. width: 100%;
  946. display: flex;
  947. align-items: center;
  948. .titel-text {
  949. height: 100%;
  950. font-size: 16px;
  951. font-weight: 600;
  952. color: #32363d;
  953. text-indent: 30px;
  954. }
  955. .toptimeqhuan {
  956. width: 190px;
  957. height: 32px;
  958. background: #ffffff;
  959. border-radius: 4px;
  960. border: 1px solid #e0e0e0;
  961. display: flex;
  962. align-items: center;
  963. overflow: hidden;
  964. margin-left: 20px;
  965. cursor: pointer;
  966. }
  967. .toptimeqhuan div {
  968. flex: 1;
  969. text-align: center;
  970. line-height: 32px;
  971. font-size: 14px;
  972. }
  973. }
  974. .app-box-san {
  975. width: 100%;
  976. min-height: 400px;
  977. display: flex;
  978. margin-top: 15px;
  979. .zuo {
  980. flex: 1;
  981. margin-right: 15px;
  982. background: #ffffff;
  983. border-radius: 4px;
  984. .title {
  985. width: 100%;
  986. height: 55px;
  987. border-bottom: 1px solid #e0e0e0;
  988. display: flex;
  989. align-content: center;
  990. .text1 {
  991. flex: 2;
  992. line-height: 55px;
  993. text-indent: 20px;
  994. font-weight: 500;
  995. font-size: 16px;
  996. color: #333333;
  997. }
  998. .text2 {
  999. flex: 1;
  1000. height: 55px;
  1001. display: flex;
  1002. align-items: center;
  1003. }
  1004. }
  1005. }
  1006. .you {
  1007. flex: 1;
  1008. background: #ffffff;
  1009. border-radius: 4px;
  1010. .title {
  1011. width: 100%;
  1012. height: 55px;
  1013. border-bottom: 1px solid #e0e0e0;
  1014. display: flex;
  1015. align-content: center;
  1016. .text1 {
  1017. flex: 2;
  1018. line-height: 55px;
  1019. text-indent: 20px;
  1020. font-weight: 500;
  1021. font-size: 16px;
  1022. color: #333333;
  1023. }
  1024. .text2 {
  1025. flex: 1;
  1026. height: 55px;
  1027. display: flex;
  1028. align-items: center;
  1029. }
  1030. }
  1031. #main {
  1032. height: calc(400px - 55px);
  1033. }
  1034. #main2 {
  1035. height: calc(400px - 55px);
  1036. }
  1037. }
  1038. }
  1039. .hejisan {
  1040. width: 92%;
  1041. margin: 0 auto;
  1042. display: flex;
  1043. padding-top: 10px;
  1044. padding-bottom: 10px;
  1045. .text1-1 {
  1046. color: #666666;
  1047. }
  1048. .text1-2 {
  1049. color: #333333;
  1050. margin-top: 10px;
  1051. }
  1052. }
  1053. // 进度条
  1054. .jinbox {
  1055. width: 100%;
  1056. height: 18px;
  1057. line-height: 18px;
  1058. display: flex;
  1059. font-size: 16px;
  1060. color: #2c3542;
  1061. margin-top: 10px;
  1062. .jinboxtit {
  1063. width: 14%;
  1064. height: 18px;
  1065. padding-right: 6px;
  1066. white-space: nowrap;
  1067. text-overflow: ellipsis;
  1068. overflow: hidden;
  1069. }
  1070. .jinbox-box {
  1071. width: 75%;
  1072. height: 100%;
  1073. border-radius: 8px;
  1074. background: #f2f2f2;
  1075. }
  1076. .boxbaifenbi {
  1077. height: 100%;
  1078. background: #60d7a0;
  1079. border-radius: 8px;
  1080. }
  1081. .boxbaifenbi2 {
  1082. height: 100%;
  1083. background: #5b8ff9;
  1084. }
  1085. .jinboxbott {
  1086. width: 16%;
  1087. text-indent: 16px;
  1088. }
  1089. }
  1090. .theadtd {
  1091. width: 140px;
  1092. height: 48px;
  1093. border: 1px solid #e0e0e0;
  1094. text-align: center;
  1095. line-height: 48px;
  1096. font-size: 16px;
  1097. color: #32363d;
  1098. }
  1099. .nulllist {
  1100. flex: 1;
  1101. }
  1102. </style>