25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

655 lines
16 KiB

  1. <template>
  2. <div class="box-center" ref="boxcenter" style="cursor:pointer;">
  3. <!-- 头 -->
  4. <div class="app-top">
  5. <div v-if="orgType!=3" class="app-titel2" style="margin-bottom: 10px">
  6. <div class="titel-text" >
  7. 项目选择: </div>
  8. <div style="margin-left: 26px">
  9. <el-select v-model="houseId" filterable @change="houseChange" placeholder="请选择">
  10. <el-option
  11. v-for="item in buildingoptions"
  12. :key="item.value"
  13. :label="item.propertyName"
  14. :value="item.id"
  15. >
  16. </el-option>
  17. </el-select>
  18. </div>
  19. </div>
  20. <div class="app-titel2">
  21. <div style="text-indent: 30px;font-weight: bold;">接待时间:</div>
  22. <div class="toptimeqhuan">
  23. <div :class="{ tophove: TimetoAhoose == 0 }" @click="tabtimetap(0)">
  24. 今日
  25. </div>
  26. <div :class="{ tophove: TimetoAhoose == 1 }" @click="tabtimetap(1)">
  27. 昨日
  28. </div>
  29. <div :class="{ tophove: TimetoAhoose == 2 }" @click="tabtimetap(2)">
  30. 近一周
  31. </div>
  32. </div>
  33. <div style="margin-left: 26px">
  34. <el-date-picker
  35. v-model="customtime"
  36. @change="confirmtime()"
  37. type="daterange"
  38. range-separator="-"
  39. :default-time="['00:00:00', '23:59:59']"
  40. value-format="yyyy-MM-dd"
  41. start-placeholder="开始日期"
  42. end-placeholder="结束日期"
  43. >
  44. </el-date-picker>
  45. </div>
  46. </div>
  47. </div>
  48. <!-- 中间 -->
  49. <div style="display: flex;justify-content: space-between" :style="{'margin-top':orgType != 3?'110px':'70px'}">
  50. <el-card style="width: 33%;display: flex;flex-direction: column;align-items: center;text-align: center">
  51. <div @click="goTo(1)">{{efficient}}</div>
  52. <div @click="goTo(1)" style="margin-top: 10px">有效接待</div>
  53. </el-card>
  54. <el-card style="width: 33%;display: flex;flex-direction: column;align-items: center;text-align: center">
  55. <div @click="goTo(2)">{{markCount}}</div>
  56. <div @click="goTo(2)" style="margin-top: 10px">已标顾问</div>
  57. </el-card>
  58. <el-card style="width: 33%;display: flex;flex-direction: column;align-items: center;text-align: center">
  59. <div @click="goTo(3)">{{noMarkCount}}</div>
  60. <div @click="goTo(3)" style="margin-top: 10px">未标顾问</div>
  61. </el-card>
  62. </div>
  63. <div class="app-box">
  64. <div class="conbox">客群特征总览</div>
  65. <div class="alllistbox">
  66. <div
  67. class="alllist"
  68. v-for="(item, index) in alllist"
  69. :key="index"
  70. @click="movePlace(index)"
  71. style="cursor: pointer"
  72. >
  73. <div class="alllist-text1">{{ item.name }}</div>
  74. <div class="alllist-text1">{{ item.num }}</div>
  75. </div>
  76. </div>
  77. </div>
  78. <!-- 下面 -->
  79. <div class="box-forhtml" v-for="(item, index) in objlist" :key="index">
  80. <div class="conbox">{{ item.name }}触达排名</div>
  81. <div class="box-forhtml-flex">
  82. <div class="left">
  83. <div class="Templatetable">
  84. <div class="table-tit">
  85. <div>排名</div>
  86. <div>画像语意词/触达次数</div>
  87. <div>触达占比</div>
  88. <div>沟通记录</div>
  89. </div>
  90. <div
  91. v-if="item.total == 0"
  92. style="
  93. width: 100%;
  94. line-height: 300px;
  95. text-align: center;
  96. color: #999999;
  97. font-size: 14px;
  98. "
  99. >
  100. 暂无数据
  101. </div>
  102. <div
  103. class="table-cent"
  104. v-else
  105. v-for="(itcen, inde) in item.matchKeywords"
  106. :key="inde"
  107. >
  108. <div
  109. style="
  110. display: flex;
  111. align-items: center;
  112. justify-content: center;
  113. "
  114. >
  115. <img
  116. v-if="inde == 0"
  117. style="width: 30px; height: 30px"
  118. src="/img/ranking1.png"
  119. alt=""
  120. />
  121. <img
  122. v-else-if="inde == 1"
  123. style="width: 30px; height: 30px"
  124. src="/img/ranking2.png"
  125. alt=""
  126. />
  127. <img
  128. v-else-if="inde == 2"
  129. style="width: 30px; height: 30px"
  130. src="/img/ranking3.png"
  131. alt=""
  132. />
  133. <div v-else class="indeclass">{{ inde + 1 }}</div>
  134. </div>
  135. <div v-if="index == 2">
  136. {{ itcen.name + "-" + itcen.endName + "㎡" }}({{ itcen.total }})
  137. </div>
  138. <div v-else-if="index == 3">
  139. {{ itcen.name + "-" + itcen.endName + "万" }}({{ itcen.total }})
  140. </div>
  141. <div v-else>{{ itcen.name }}({{ itcen.total }})</div>
  142. <div>{{ itcen.proportion }}%</div>
  143. <div
  144. style="color: #2671e2; cursor: pointer"
  145. @click="Toview(item, inde)"
  146. >
  147. 查看
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. <div class="right">
  153. <div
  154. :id="'ids' + item.id"
  155. class="container"
  156. style="width: 400px; height: 330px; text-align: center"
  157. >
  158. <img
  159. v-if="item.total == 0"
  160. style="width: 260px; height: 260px"
  161. src="/img/Elementcircle.png"
  162. alt=""
  163. />
  164. </div>
  165. </div>
  166. </div>
  167. </div>
  168. <div @click="backTop()" class="backTopbox">
  169. <img class="backTop" src="http://121.42.63.138:9091/autoSR/static/images/system/images/backTop.png" alt="">
  170. </div>
  171. </div>
  172. </template>
  173. <script>
  174. import * as echarts from "echarts";
  175. import Router from "../../router/router";
  176. import colorTheme from "../../util/theme.color"
  177. export default {
  178. data() {
  179. return {
  180. alllist: [],
  181. namelist: [],
  182. numlist: [],
  183. objlist: [],
  184. value: "",
  185. orgType: localStorage.getItem("orgType"),
  186. houseId: "",
  187. buildingoptions: [],
  188. TimetoAhoose: 2,
  189. customtime: [],
  190. fromobj: {
  191. starttime: "",
  192. endoftime: "",
  193. },
  194. efficient:"",
  195. markCount:"",
  196. noMarkCount:""
  197. };
  198. },
  199. mounted() {
  200. this.zkhousePage();
  201. },
  202. methods: {
  203. goTo(i){
  204. if(i==1){
  205. Router.push("/ReceivingRecords/index?activeTotal=0&validInvalid=0")
  206. }else if(i==2){
  207. Router.push("/ReceivingRecords/index?activeTotal=0&markAdvisor=1");
  208. }else{
  209. Router.push("/ReceivingRecords/index?activeTotal=0&markAdvisor=0");
  210. }
  211. },
  212. backTop(){
  213. $('#avue-view').scrollTop(0)
  214. },
  215. movePlace(index){
  216. if(index==0){
  217. return
  218. }else {
  219. var as55=this.objlist[index-1].id;
  220. var shu='#ids'+as55;
  221. $('#avue-view').scrollTop(($(shu).offset().top)-200)
  222. }
  223. },
  224. houseChange() {
  225. this.getorgCode();
  226. },
  227. Toview(item, index) {
  228. let Userrecord = {
  229. TimetoAhoose: this.TimetoAhoose,
  230. keywordsId: item.matchKeywords[index].keywordsId,
  231. customtime: this.customtime,
  232. starttime: this.fromobj.starttime,
  233. endoftime: this.fromobj.endoftime,
  234. houseId: this.houseId,
  235. };
  236. this.$router.push({
  237. path: "/Statistics/Insightintothedetails",
  238. query: { flag: Userrecord },
  239. });
  240. },
  241. //获取项目
  242. zkhousePage() {
  243. this.$api.api
  244. .findHouseByUser({
  245. orgType: localStorage.getItem("orgType"),
  246. })
  247. .then((res) => {
  248. this.buildingoptions = res.data;
  249. if (localStorage.getItem("orgType") == 3) {
  250. this.houseId = localStorage.getItem("houseId");
  251. } else {
  252. this.houseId = res.data[0].id;
  253. }
  254. // this.houseId = res.data[0].id;
  255. this.getorgCode();
  256. });
  257. },
  258. //自定义时间
  259. confirmtime() {
  260. this.TimetoAhoose = 6;
  261. this.fromobj.starttime = this.customtime[0];
  262. this.fromobj.endoftime = this.customtime[1];
  263. this.getorgCode();
  264. },
  265. //切换时间
  266. tabtimetap(index) {
  267. this.TimetoAhoose = index;
  268. this.fromobj.starttime = "";
  269. this.fromobj.endoftime = "";
  270. this.customtime = [];
  271. this.getorgCode();
  272. },
  273. //初始化
  274. getorgCode() {
  275. this.namelist = [];
  276. this.numlist = [];
  277. this.objlist = [];
  278. var dateType = "";
  279. if (this.TimetoAhoose == 6) {
  280. dateType = "";
  281. } else {
  282. dateType = this.TimetoAhoose;
  283. }
  284. this.$api.http
  285. .findmatchdata({
  286. dateType: dateType,
  287. houseId: this.houseId,
  288. statDateStart: this.fromobj.starttime,
  289. statDateEnd: this.fromobj.endoftime,
  290. })
  291. .then((res) => {
  292. this.objlist = res.data.list;
  293. this.alllist = [{ name: "有效接待", num: res.data.total }];
  294. this.efficient = res.data.total
  295. this.markCount = res.data.markCount
  296. this.noMarkCount = res.data.noMarkCount
  297. res.data.list.forEach((item, index) => {
  298. this.alllist.push({
  299. name: item.name,
  300. num: item.total,
  301. });
  302. });
  303. this.$nextTick(() => {
  304. this.myChartinit();
  305. });
  306. });
  307. },
  308. myChartinit() {
  309. this.objlist.forEach((item, index) => {
  310. if (item.total != 0) {
  311. var id = "ids" + item.id;
  312. var myChart = echarts.init(document.getElementById(id));
  313. var objoptlis = [];
  314. item.matchKeywords.forEach((ice) => {
  315. objoptlis.push({ value: ice.total, name: ice.name });
  316. });
  317. var option = {
  318. color: colorTheme.colorArr,
  319. tooltip: {
  320. trigger: "item",
  321. },
  322. legend:{
  323. show:true,
  324. bottom: "0",
  325. },
  326. graphic: [
  327. {
  328. type: "text",
  329. left: "center",
  330. top: "42%",
  331. style: {
  332. text: item.total,
  333. textAlign: "center",
  334. fill: "#000",
  335. width: 30,
  336. height: 30,
  337. fontSize: 24,
  338. color: "#32363D",
  339. fontFamily: "Microsoft YaHei",
  340. },
  341. },
  342. {
  343. type: "text",
  344. left: "center",
  345. top: "55%",
  346. style: {
  347. text: "总触达次数",
  348. textAlign: "center",
  349. fill: "#000",
  350. width: 30,
  351. height: 30,
  352. fontSize: 16,
  353. color: "#666666",
  354. },
  355. },
  356. ],
  357. series: [
  358. {
  359. name: "",
  360. type: "pie",
  361. radius: ["48%", "70%"],
  362. avoidLabelOverlap: false,
  363. data: objoptlis,
  364. },
  365. ],
  366. };
  367. myChart.setOption(option);
  368. }
  369. });
  370. },
  371. },
  372. };
  373. </script>
  374. <style scoped="scoped" lang="scss" >
  375. .backTopbox{
  376. width: 40px;
  377. height: 40px;
  378. border-radius: 50%;
  379. background: #D0EDFF;
  380. position:fixed;
  381. bottom: 40px;
  382. right: 40px;
  383. border: none;
  384. display: flex;
  385. align-items: center;
  386. justify-content: center;
  387. z-index: 9999;
  388. }
  389. .backTop{
  390. display: block;
  391. width: 16px;
  392. height: 20px;
  393. }
  394. .box-center {
  395. width: 100%;
  396. padding: 15px;
  397. min-width: 1000px;
  398. padding-bottom: 100px;
  399. }
  400. .tophove {
  401. color: #ffffff;
  402. background: #2671e2;
  403. }
  404. .app-titel {
  405. width: 100%;
  406. height: 70px;
  407. background: #ffffff;
  408. box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
  409. border-radius: 4px;
  410. display: flex;
  411. align-items: center;
  412. .titel-text {
  413. height: 100%;
  414. font-size: 16px;
  415. font-weight: 600;
  416. color: #32363d;
  417. line-height: 70px;
  418. margin-left: 30px;
  419. }
  420. .toptimeqhuan {
  421. width: 190px;
  422. height: 32px;
  423. background: #ffffff;
  424. border-radius: 4px;
  425. border: 1px solid #e0e0e0;
  426. display: flex;
  427. align-items: center;
  428. overflow: hidden;
  429. margin-left: 20px;
  430. cursor: pointer;
  431. }
  432. .toptimeqhuan div {
  433. flex: 1;
  434. text-align: center;
  435. line-height: 32px;
  436. font-size: 16px;
  437. }
  438. }
  439. .app-box {
  440. width: 100%;
  441. padding-bottom: 20px;
  442. background: #ffffff;
  443. box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
  444. border-radius: 4px;
  445. padding-top: 20px;
  446. padding-left: 30px;
  447. padding-right: 30px;
  448. margin-top: 20px;
  449. .conbox {
  450. height: 18px;
  451. font-size: 18px;
  452. font-family: PingFangSC-Semibold, PingFang SC;
  453. font-weight: 600;
  454. color: #32363d;
  455. line-height: 18px;
  456. }
  457. .alllistbox {
  458. width: 100%;
  459. margin-top: 20px;
  460. display: flex;
  461. flex-wrap: wrap;
  462. .alllist {
  463. width: 16.66%;
  464. border: 1px solid #e0e0e0;
  465. padding-bottom: 2px;
  466. padding-top: 4px;
  467. }
  468. .alllist-text1 {
  469. width: 100%;
  470. font-size: 16px;
  471. font-family: PingFangSC-Regular, PingFang SC;
  472. font-weight: 400;
  473. color: #333333;
  474. line-height: 26px;
  475. text-align: center;
  476. }
  477. }
  478. }
  479. .box-forhtml {
  480. width: 100%;
  481. min-height: 400px;
  482. background: #ffffff;
  483. box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
  484. border-radius: 4px;
  485. padding: 20px 30px;
  486. margin-top: 20px;
  487. }
  488. .box-forhtml-flex {
  489. width: 100%;
  490. display: flex;
  491. margin-top: 20px;
  492. }
  493. .box-forhtml-flex .left {
  494. width: 50%;
  495. min-height: 320px;
  496. }
  497. .box-forhtml-flex .right {
  498. width: 50%;
  499. min-height: 330px;
  500. display: flex;
  501. justify-content: center;
  502. }
  503. .Templatetable {
  504. width: 88%;
  505. height: 100%;
  506. margin: 0 auto;
  507. overflow-y: auto;
  508. }
  509. .table-tit {
  510. width: 100%;
  511. height: 20px;
  512. line-height: 20px;
  513. display: flex;
  514. }
  515. .table-tit > div:nth-of-type(1) {
  516. width: 10%;
  517. text-align: center;
  518. font-size: 16px;
  519. font-family: PingFangSC-Semibold, PingFang SC;
  520. font-weight: 600;
  521. color: #606775;
  522. }
  523. .table-tit > div:nth-of-type(2) {
  524. width: 40%;
  525. text-align: center;
  526. font-size: 16px;
  527. font-family: PingFangSC-Semibold, PingFang SC;
  528. font-weight: 600;
  529. color: #606775;
  530. }
  531. .table-tit > div:nth-of-type(3) {
  532. width: 25%;
  533. text-align: center;
  534. font-size: 16px;
  535. font-family: PingFangSC-Semibold, PingFang SC;
  536. font-weight: 600;
  537. color: #606775;
  538. }
  539. .table-tit > div:nth-of-type(4) {
  540. width: 25%;
  541. text-align: center;
  542. font-size: 16px;
  543. font-family: PingFangSC-Semibold, PingFang SC;
  544. font-weight: 600;
  545. color: #606775;
  546. }
  547. .table-cent {
  548. width: 100%;
  549. height: 20px;
  550. line-height: 20px;
  551. display: flex;
  552. margin-top: 18px;
  553. }
  554. .table-cent > div:nth-of-type(1) {
  555. width: 10%;
  556. text-align: center;
  557. font-size: 14px;
  558. font-family: PingFangSC-Semibold, PingFang SC;
  559. color: #32363d;
  560. }
  561. .table-cent > div:nth-of-type(2) {
  562. width: 40%;
  563. text-align: center;
  564. font-size: 14px;
  565. font-family: PingFangSC-Semibold, PingFang SC;
  566. color: #32363d;
  567. }
  568. .table-cent > div:nth-of-type(3) {
  569. width: 25%;
  570. text-align: center;
  571. font-size: 14px;
  572. font-family: PingFangSC-Semibold, PingFang SC;
  573. color: #32363d;
  574. }
  575. .table-cent > div:nth-of-type(4) {
  576. width: 25%;
  577. text-align: center;
  578. font-size: 14px;
  579. font-family: PingFangSC-Semibold, PingFang SC;
  580. color: #32363d;
  581. }
  582. .indeclass {
  583. width: 20px;
  584. height: 20px;
  585. border-radius: 50%;
  586. background: #ecf1ff;
  587. color: #ffffff;
  588. text-align: center;
  589. line-height: 20px;
  590. font-size: 14px;
  591. }
  592. .app-top {
  593. // width: 100%;
  594. width: calc(100% - 270px);
  595. position: fixed;
  596. z-index: 999;
  597. margin-top: -16px;
  598. background: #ffffff;
  599. box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
  600. box-shadow: 0px 0px 10px 0px #dadada;
  601. border-radius: 4px;
  602. padding-top: 15px;
  603. padding-bottom: 15px;
  604. .app-titel2 {
  605. width: 100%;
  606. display: flex;
  607. align-items: center;
  608. .titel-text {
  609. height: 100%;
  610. font-size: 16px;
  611. font-weight: 600;
  612. color: #32363d;
  613. text-indent: 30px;
  614. }
  615. .toptimeqhuan {
  616. width: 190px;
  617. height: 32px;
  618. background: #ffffff;
  619. border-radius: 4px;
  620. border: 1px solid #e0e0e0;
  621. display: flex;
  622. align-items: center;
  623. overflow: hidden;
  624. margin-left: 20px;
  625. cursor: pointer;
  626. }
  627. .toptimeqhuan div {
  628. flex: 1;
  629. text-align: center;
  630. line-height: 32px;
  631. font-size: 14px;
  632. }
  633. }
  634. }
  635. </style>