index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. <template>
  2. <div class="app-container" v-loading="loading">
  3. <div class="conPanel">
  4. <el-row class="ht100p" :gutter="20">
  5. <el-col class="ht100p" :span="7">
  6. <div class="topDiv">
  7. <div class="cardDiv">
  8. <!--标题-->
  9. <div class="cardTitle">客户标签</div>
  10. <word-cloud-chart
  11. id="wordCloud"
  12. :title="chartsTitle"
  13. :data="wordCloudChartData"
  14. :width="width"
  15. :height="height"
  16. />
  17. <!--角边-->
  18. <!--<div class="borderLB"></div>-->
  19. <!--<div class="borderRB"></div>-->
  20. </div>
  21. </div>
  22. <div class="bottomDiv">
  23. <div class="cardDiv">
  24. <div class="cardTitle">客户保单信息</div>
  25. <div class="chart">
  26. <div class="topNumDiv">
  27. <div class="numTitle">保单总数</div>
  28. <div class="num">{{custInfo.bdTotalNum}}张</div>
  29. </div>
  30. <!-- <div class="dashedLine"></div>-->
  31. <div class="bottomNumDiv">
  32. <div class="leftNumDiv">
  33. <div class="numTitle">有效保单</div>
  34. <div class="num">{{custInfo.novpolicy}}张</div>
  35. </div>
  36. <div class="rightNumDiv">
  37. <div class="numTitle">失效保单</div>
  38. <div class="num">{{custInfo.noivpolicy}}张</div>
  39. </div>
  40. </div>
  41. </div>
  42. <!--<div class="borderLB"></div>-->
  43. <!--<div class="borderRB"></div>-->
  44. </div>
  45. </div>
  46. </el-col>
  47. <el-col class="ht100p" :span="10">
  48. <div class="cardDiv">
  49. <div class="cardTitle">客户信息</div>
  50. <div class="infoDiv">
  51. <div class="chartDiv">
  52. <pie-chart-half
  53. id="pieChartHalf"
  54. :title="chartsTitle"
  55. :data="pieChartHalfData"
  56. :width="width"
  57. :height="height"
  58. />
  59. </div>
  60. <div class="imgDiv">
  61. <!-- <div style="width: 240px;">-->
  62. <!-- <img style="width: 100%;" src="../../../assets/image/levelBg.png" alt=""/>-->
  63. <!-- </div>-->
  64. <div class="levelImgDiv">
  65. <div class="level">{{levelText(custInfo.custclass)}}会员</div>
  66. <div class="isPay">已交保费</div>
  67. <div class="payNum">{{custInfo.prem}}</div>
  68. </div>
  69. </div>
  70. <el-row class="bottomInfoDiv" :gutter="10">
  71. <el-col :span="24">
  72. <div class="bxDetail" style="padding: 10px 10px 6px;">
  73. <div class="numTitleB">险种信息</div>
  74. <el-row :gutter="10">
  75. <el-col :span="8">
  76. <div class="bxInfo">享受保障:<span>{{custInfo.guaranteeDay}}</span><span class="unit">天</span></div>
  77. </el-col>
  78. <el-col :span="8">
  79. <div class="bxInfo">标准保费:<span>{{custInfo.prem}}</span><span class="unit">元</span></div>
  80. </el-col>
  81. <el-col :span="8" v-for="(value, key, index) in majorCategorie">
  82. <div class="bxInfo">{{key}}:<span>{{value/10000}}</span><span class="unit">万</span></div>
  83. </el-col>
  84. </el-row>
  85. </div>
  86. </el-col>
  87. <!-- <el-col :span="6">-->
  88. <!-- <div class="bxDetail">-->
  89. <!-- <div class="numTitle">享受保障</div>-->
  90. <!-- <div class="num">{{custInfo.guaranteeDay}}<span class="unit">天</span></div>-->
  91. <!-- </div>-->
  92. <!-- </el-col>-->
  93. <!-- <el-col :span="6" v-for="(value, key, index) in majorCategorie">-->
  94. <!-- <div class="bxDetail">-->
  95. <!-- <div class="numTitle">{{key}}</div>-->
  96. <!-- <div class="num">{{value/10000}}<span class="unit">万</span></div>-->
  97. <!-- </div>-->
  98. <!-- </el-col>-->
  99. <!-- <el-col :span="6">-->
  100. <!-- <div class="bxDetail">-->
  101. <!-- <div class="numTitle">标准保费</div>-->
  102. <!-- <div class="num">{{custInfo.prem}}<span class="unit">元</span></div>-->
  103. <!-- </div>-->
  104. <!-- </el-col>-->
  105. </el-row>
  106. <el-row class="bottomInfoDiv" :gutter="10">
  107. <el-col :span="12">
  108. <div class="bxDetail bxDetailHt">
  109. <div class="numTitleB">续期信息</div>
  110. <div class="bxInfo">应交日期:{{custInfo.null}}</div><!--未接数据-->
  111. <div class="bxInfo">应交保费:{{custInfo.null}}元</div><!--未接数据-->
  112. <div class="bxInfo">已交保费:{{custInfo.null}}元</div><!--未接数据-->
  113. <div class="bxInfo">交费年期:{{custInfo.null}}年</div><!--未接数据-->
  114. </div>
  115. </el-col>
  116. <el-col :span="12">
  117. <div class="bxDetail bxDetailHt">
  118. <div class="numTitleB">理赔信息</div>
  119. <div class="bxInfo">是否理赔:{{insuranceclaimthread.isClaim}}</div>
  120. <div class="bxInfo">理赔类别:{{insuranceclaimthread.claimType}}</div>
  121. <div class="bxInfo">理赔金额:{{insuranceclaimthread.claimAmount}}元</div>
  122. </div>
  123. </el-col>
  124. </el-row>
  125. </div>
  126. <!--<div class="borderLB"></div>-->
  127. <!--<div class="borderRB"></div>-->
  128. </div>
  129. </el-col>
  130. <el-col class="ht100p" :span="7">
  131. <div class="topDiv">
  132. <div class="cardDiv">
  133. <div class="cardTitle">基本信息</div>
  134. <div class="userInfo">
  135. <el-row class="mt20" :gutter="10">
  136. <el-col :span="12">
  137. <div>姓名:{{custInfo.name}}</div>
  138. </el-col>
  139. <el-col :span="12">
  140. <div>手机:{{custInfo.pmphone}}</div>
  141. </el-col>
  142. </el-row>
  143. <el-row :gutter="10">
  144. <el-col :span="12">
  145. <div>年龄:{{custInfo.age}}岁</div>
  146. </el-col>
  147. </el-row>
  148. <div class="dayDiv">
  149. <div class="dayTitle">投保时长</div>
  150. <div class="dayNum">{{custInfo.insureDay}}<span class="unit">天</span></div>
  151. </div>
  152. </div>
  153. <!--<div class="borderLB"></div>-->
  154. <!--<div class="borderRB"></div>-->
  155. </div>
  156. </div>
  157. <div class="bottomDiv">
  158. <div class="cardDiv">
  159. <div class="cardTitle">投保时间节点及保费</div>
  160. <line-bar-chart
  161. id="lineBarChart"
  162. :width="width"
  163. :height="height"
  164. :data="lineBarChartData" />
  165. <!--<div class="borderLB"></div>-->
  166. <!--<div class="borderRB"></div>-->
  167. </div>
  168. </div>
  169. </el-col>
  170. </el-row>
  171. </div>
  172. </div>
  173. </template>
  174. <script>
  175. import { getCustomerById,getCustomerOverViewById } from "@/api/customerInformation/customerInformation.js";
  176. import WordCloudChart from '../../dashboard/WordCloudChart'
  177. import LineBarChart from '../../dashboard/LineBarChart'
  178. import PieChartHalf from '../../dashboard/PieChartHalf'
  179. export default {
  180. name: "UserInfoDetails",
  181. components: {
  182. WordCloudChart,
  183. LineBarChart,
  184. PieChartHalf
  185. },
  186. data() {
  187. return {
  188. loading:true,
  189. chartsTitle:'',
  190. custInfo : {},
  191. wordCloudChartData:[],
  192. lineBarChartData:{
  193. lineData:{
  194. name:'',
  195. yAxisName:'单位:元',
  196. data:[]
  197. },
  198. // barData:{
  199. // name:'',
  200. // data:[]
  201. // },
  202. xAxisData:[]
  203. },
  204. pieChartHalfData:[],
  205. width:'100%',
  206. height:'80%',
  207. insuranceclaimthread:{
  208. claimType: "", //理赔类型
  209. claimAmount: '', //理赔金额
  210. isClaim: "" //是否理赔
  211. },
  212. majorCategorie:{},
  213. }
  214. },
  215. created() {
  216. this.getCustomerOverViewByIdData();
  217. },
  218. mounted() {
  219. },
  220. methods: {
  221. getCustomerOverViewByIdData(){
  222. this.loading = true;
  223. var that = this;
  224. let id = this.$route.query.id;
  225. getCustomerOverViewById({id:id}).then(response => {
  226. console.log(response);
  227. // 客户标签
  228. for(var i =0 ;i< 120;i++){
  229. var label = 'label'+i;
  230. if(response.data.custInfo[label] && response.data.custInfo[label] != ""){
  231. var data = {
  232. name:response.data.custInfo[label],
  233. value:i,
  234. }
  235. that.wordCloudChartData.push(data)
  236. }
  237. }
  238. // 客户保单信息
  239. that.custInfo = response.data.custInfo;
  240. if(!that.custInfo.noivpolicy || that.custInfo.noivpolicy <= 0){
  241. that.custInfo.noivpolicy = 0;
  242. }
  243. if(!that.custInfo.novpolicy || that.custInfo.novpolicy <= 0){
  244. that.custInfo.novpolicy = 0;
  245. }
  246. that.custInfo.bdTotalNum = that.custInfo.noivpolicy + that.custInfo.novpolicy;
  247. // 理赔信息
  248. response.data.insuranceclaimthread != undefined ?that.insuranceclaimthread = response.data.insuranceclaimthread:{};
  249. response.data.majorCategorie != undefined ?that.majorCategorie = response.data.majorCategorie:{};
  250. // 投保时间节点及保费
  251. that.lineBarChartData.xAxisData = response.data.lineBarChartData.xaxisData;
  252. that.lineBarChartData.lineData.data = response.data.lineBarChartData.actaulData.data;
  253. that.lineBarChartData.lineData.name = response.data.lineBarChartData.actaulData.name;
  254. // that.lineBarChartData.barData.data = response.data.lineBarChartData.expectedData.data;
  255. // that.lineBarChartData.barData.name = response.data.lineBarChartData.expectedData.name;
  256. that.loading = false;
  257. }
  258. );
  259. },
  260. }
  261. };
  262. </script>
  263. <style lang="scss" scoped>
  264. .conPanel{
  265. width: 97%;
  266. height: 92%;
  267. position: absolute;
  268. .topDiv{
  269. height: 50%;
  270. padding-bottom: 10px;
  271. box-sizing: border-box;
  272. }
  273. .bottomDiv{
  274. height: 50%;
  275. padding-top: 10px;
  276. box-sizing: border-box;
  277. }
  278. .cardDiv{
  279. height: 100%;
  280. position: relative;
  281. /*border: 1px solid #122E83;*/
  282. box-sizing: border-box;
  283. /*background:url("../../../assets/image/cardBg.png") no-repeat;*/
  284. /*background-size:100% 100%;*/
  285. background:#FFF;
  286. border-radius:3px;
  287. .cardTitle{
  288. height: 32px;
  289. line-height: 32px;
  290. font-size: 14px;
  291. color: #164993;
  292. font-weight: bold;
  293. padding: 0 15px;
  294. box-sizing: border-box;
  295. background: #DCE4F7;
  296. /*background: linear-gradient( to right,rgba(6,34,128,0.7), rgba(18,107,209,0));*/
  297. }
  298. .chart{
  299. height: 80%;
  300. width: 100%;
  301. margin-top: 10px;
  302. }
  303. .numTitle{
  304. font-size: 14px;
  305. color: #333;
  306. /*font-weight: bold;*/
  307. line-height: 30px;
  308. }
  309. .num{
  310. font-size: 20px;
  311. color: #F39801;
  312. font-weight: bold;
  313. line-height: 20px;
  314. }
  315. .topNumDiv{
  316. width: 50%;
  317. height: 40%;
  318. text-align: center;
  319. margin-top: 8%;
  320. margin-left: 25%;
  321. padding-top: 10px;
  322. border-bottom: 1px dashed #F39801;
  323. box-sizing: border-box;
  324. }
  325. .dashedLine{
  326. width: 40%;
  327. height: 1px;
  328. border-bottom: 1px dashed #F39801;
  329. margin-top:25%;
  330. margin-left: 30%;
  331. }
  332. .bottomNumDiv{
  333. width: 60%;
  334. height: 50%;
  335. text-align: center;
  336. margin-left: 20%;
  337. .leftNumDiv{
  338. width: 50%;
  339. border-right: 1px dashed #F39801;
  340. box-sizing: border-box;
  341. float: left;
  342. padding-top: 10px;
  343. padding-right: 20px;
  344. }
  345. .rightNumDiv{
  346. width: 50%;
  347. float: left;
  348. padding-top: 10px;
  349. box-sizing: border-box;
  350. padding-left: 20px;
  351. }
  352. }
  353. .userInfo{
  354. font-size: 14px;
  355. color: #333;
  356. height: 24px;
  357. line-height: 24px;
  358. padding: 0 15px;
  359. box-sizing: border-box;
  360. height: 80%;
  361. }
  362. .infoDiv{
  363. height: 85%;
  364. padding: 15px;
  365. box-sizing:border-box;
  366. .chartDiv{
  367. height: 80%;
  368. width: 100%;
  369. position: absolute;
  370. top: 10px;
  371. left: 0;
  372. z-index: 0;
  373. }
  374. .imgDiv{
  375. height: 60%;
  376. position:relative;
  377. .levelImgDiv{
  378. width: 240px;
  379. height: 204px;
  380. background: url("../../../assets/image/levelBg.png") no-repeat;
  381. background-size: 100% 100%;
  382. position: absolute;
  383. bottom: 10px;
  384. left: 50%;
  385. margin-left: -125px;
  386. .level{
  387. width: 80px;
  388. padding: 4px 0;
  389. font-size: 14px;
  390. font-weight: bold;
  391. color: #FFF;
  392. background: #003B88;
  393. border-radius: 8px;
  394. text-align: center;
  395. position: absolute;
  396. top: 46px;
  397. left: 52%;
  398. margin-left: -40px;
  399. }
  400. .isPay{
  401. width: 100px;
  402. height: 40px;
  403. line-height: 40px;
  404. font-size: 14px;
  405. color: #333;
  406. text-align: center;
  407. position: absolute;
  408. bottom: 28px;
  409. left: 50%;
  410. margin-left: -50px;
  411. }
  412. .payNum{
  413. width: 100%;
  414. font-size: 20px;
  415. font-weight: bolder;
  416. color: #333;
  417. line-height: 50px;
  418. text-align: center;
  419. position: absolute;
  420. bottom: 0;
  421. left: 4px;
  422. }
  423. }
  424. }
  425. .bottomInfoDiv{
  426. /*height: 10%;*/
  427. margin-top:10px;
  428. .bxDetailHt{
  429. height: 110px;
  430. margin-top: 10px;
  431. padding: 10px 10px 6px !important;
  432. }
  433. .bxDetail{
  434. width: 100%;
  435. text-align: center;
  436. border: 1px solid #F39801;
  437. line-height: 24px;
  438. padding: 4px 10px;
  439. box-sizing:border-box;
  440. position:relative;
  441. .numTitle{
  442. font-size: 14px;
  443. color: #333;
  444. }
  445. .numTitleB{
  446. position: absolute;
  447. top: -12px;
  448. left: 50%;
  449. /*padding: 4px 0;*/
  450. width: 70px;
  451. margin-left: -35px;
  452. background: #FFF;
  453. font-size: 14px;
  454. color: #F39700;
  455. }
  456. .bxInfo{
  457. font-size: 12px;
  458. color: #333;
  459. line-height: 22px;
  460. text-align: left;
  461. span{
  462. color: #F39700;
  463. }
  464. }
  465. .num{
  466. font-size: 16px;
  467. color: #F39801;
  468. .unit{
  469. font-size: 12px;
  470. color: #333;
  471. margin-left: 6px;
  472. }
  473. }
  474. }
  475. }
  476. }
  477. .dayDiv{
  478. height: 50%;
  479. width:100%;
  480. background: #FEEBDC;
  481. border-radius: 5px;
  482. margin-top: 20px;
  483. padding: 15px 20px;
  484. box-sizing: border-box;
  485. .dayTitle{
  486. color: #333;
  487. }
  488. .dayNum{
  489. font-size: 24px;
  490. color: #F59801;
  491. text-align: center;
  492. padding-top: 10px;
  493. .unit{
  494. font-size: 14px;
  495. color: #333;
  496. margin-left: 6px;
  497. }
  498. }
  499. }
  500. }
  501. .borderLB{
  502. height: 20px;
  503. width: 20px;
  504. position: absolute;
  505. bottom: 0;
  506. left: 0;
  507. border-bottom: 1px solid #076DB9;
  508. border-left: 1px solid #076DB9;
  509. }
  510. .borderRB{
  511. height: 20px;
  512. width: 20px;
  513. position: absolute;
  514. bottom: 0;
  515. right: 0;
  516. border-bottom: 1px solid #076DB9;
  517. border-right: 1px solid #076DB9;
  518. }
  519. }
  520. .ht100p{
  521. height: 100%;
  522. }
  523. @media (min-width: 1400px) {
  524. .conPanel .cardDiv .topNumDiv{
  525. height: 28%;
  526. margin-top: 15%;
  527. }
  528. .conPanel .cardDiv .infoDiv .imgDiv .levelImgDiv{
  529. bottom: 15%;
  530. }
  531. .conPanel .cardDiv .infoDiv .bottomInfoDiv .bxDetail{
  532. padding: 20px;
  533. }
  534. .conPanel .cardDiv .infoDiv .bottomInfoDiv .bxDetailHt{
  535. height: 130px;
  536. padding: 20px !important;
  537. }
  538. .conPanel .cardDiv .dayDiv .dayNum{
  539. font-size: 28px;
  540. font-weight: bold;
  541. margin-top: 22px;
  542. }
  543. }
  544. </style>