index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <template>
  2. <div class="app-container">
  3. <div class="conPanel">
  4. <el-row class="ht50p" :gutter="20">
  5. <el-col class="ht100p" :span="7">
  6. <div class="cardDiv">
  7. <div class="cardTitle">客户年龄段性别分布</div>
  8. <bar-two-way-chart
  9. id="barTwoWayChart"
  10. :width="width"
  11. :height="height"
  12. :data="barTwoWayChartData" />
  13. </div>
  14. </el-col>
  15. <el-col class="ht100p" :span="17">
  16. <div class="cardDiv">
  17. <div class="cardTitle">查询条件</div>
  18. <div class="lunboDiv">
  19. <div class="wrapper horizontal demo1">
  20. <ul class="container" style=" transform-style: preserve-3d;transform: rotateX(-5deg) rotateY(0deg);">
  21. <li class="cards-list" v-for="(item,index) in lunboData" :key="index">
  22. <div class="img">
  23. <img class="iconImg" :src="item.iconSrc" alt="">
  24. <img class="shadowImg" src="../assets/image/shadow.png" alt="">
  25. </div>
  26. <div class="main-con">
  27. <div class="name">{{item.name}}</div>
  28. <img src="../assets/image/ItalicsLine.png" alt="">
  29. </div>
  30. </li>
  31. </ul>
  32. </div>
  33. </div>
  34. <div class="infoLeft">
  35. <img class="lineImg" src="../assets/image/line.png" alt="">
  36. <el-form v-if="lunboActiveIndex == 1" ref="conditionData" :model="conditionData" label-width="90px">
  37. <el-form-item label="产品名称:" size="mini">
  38. <el-input v-model="conditionData.name"></el-input>
  39. </el-form-item>
  40. <el-form-item class="mt10" label="保单状态:" size="mini">
  41. <el-select v-model="conditionData.status">
  42. <el-option label="有效" value="有效"></el-option>
  43. <el-option label="无效" value="无效"></el-option>
  44. </el-select>
  45. </el-form-item>
  46. <el-form-item class="mt10" label="首期保费:" size="mini">
  47. <el-input v-model="conditionData.money"></el-input>
  48. </el-form-item>
  49. <el-form-item class="mt10" label="保单数量:" size="mini">
  50. <el-select v-model="conditionData.num">
  51. <el-option label="3张以下" value="有效"></el-option>
  52. <el-option label="4-7张" value="无效"></el-option>
  53. <el-option label="8-10张" value="无效"></el-option>
  54. <el-option label="10张以上" value="无效"></el-option>
  55. </el-select>
  56. </el-form-item>
  57. </el-form>
  58. <div v-else>
  59. </div>
  60. </div>
  61. <div class="infoRight">
  62. <div v-if="lunboActiveIndex == 1">
  63. <div class="infoItem">
  64. <div class="infoItemTitle">基本信息</div>
  65. <el-row class="infoCon">
  66. <el-col :span="12">性别:{{conditionData.sex}}</el-col>
  67. <el-col :span="12">年龄:{{conditionData.age}}</el-col>
  68. </el-row>
  69. </div>
  70. <div class="infoItem">
  71. <div class="infoItemTitle">客户标签</div>
  72. <el-row class="infoCon">
  73. <el-col :span="12" v-for="(item,index) in conditionData.tag" :key="index">{{item}}</el-col>
  74. </el-row>
  75. </div>
  76. </div>
  77. <div v-else>
  78. </div>
  79. <div>
  80. <el-button class="searchBtn" type="primary" size="mini">查询</el-button>
  81. </div>
  82. </div>
  83. </div>
  84. </el-col>
  85. </el-row>
  86. <el-row class="ht50p" :gutter="20">
  87. <el-col class="ht100p" :span="7">
  88. <div class="cardDiv">
  89. <div class="cardTitle">险种类别</div>
  90. <bar-chart3
  91. id="barChart"
  92. :width="width"
  93. :height="height"
  94. :data="barChartData" />
  95. </div>
  96. </el-col>
  97. <el-col class="ht100p" :span="10">
  98. <div class="cardDiv">
  99. <div class="cardTitle">近10年有效客户数</div>
  100. <bar-chart
  101. id="barChartVistors"
  102. :width="width"
  103. :height="height"
  104. :data="barChartVistorsData" />
  105. </div>
  106. </el-col>
  107. <el-col class="ht100p" :span="7">
  108. <div class="cardDiv">
  109. <div class="cardTitle">拥有保单件数分布</div>
  110. <pie-chart
  111. id="pieChart"
  112. :width="width"
  113. :height="height"
  114. :data="pieChartData" />
  115. </div>
  116. </el-col>
  117. </el-row>
  118. </div>
  119. </div>
  120. </template>
  121. <script>
  122. import '../assets/styles/lunbo.css'
  123. import '../assets/js/empile.js'
  124. import BarTwoWayChart from './dashboard/BarTwoWayChart'
  125. import BarChart from './dashboard/BarChart2'
  126. import BarChart3 from './dashboard/BarChart3'
  127. import PieChart from './dashboard/PieChart2'
  128. export default {
  129. name: "UserInfoDetails",
  130. components: {
  131. BarTwoWayChart,
  132. BarChart,
  133. BarChart3,
  134. PieChart
  135. },
  136. data() {
  137. return {
  138. barTwoWayChartData:{
  139. legendData:["男生", "女生"],
  140. xAxisData:["儿童", "少年", "青年", "中年", "老年", "大龄", "高龄"],
  141. seriesData:[
  142. [4, 5, 9, 12, 19, 22, 23, ],
  143. [5,12,12,19,19,23,23]
  144. ]
  145. },
  146. barChartData:{
  147. yAxisName:'单位:万',
  148. color:['#028FF3','#F29700'],
  149. xAxisData:['A意外险', 'H健康险', 'L寿险'],
  150. seriesData:[
  151. {
  152. name:'客户数量',
  153. data: [ 390, 330, 220]
  154. },
  155. {
  156. name:'保单总金额',
  157. data: [80, 52, 200]
  158. },
  159. ]
  160. },
  161. pieChartData:{
  162. color:['#0084F1','#ED475B','#F39801','#00C7FF'],
  163. seriesData:[
  164. { value: 320, name: '1-3' },
  165. { value: 240, name: '4-7' },
  166. { value: 149, name: '8-10' },
  167. { value: 100, name: '>10' },
  168. ]
  169. },
  170. barChartVistorsData:{
  171. yAxisName:'数量:万个',
  172. color:['#048EF3','#7FE59A','#FAD889','#F29EC2'],
  173. xAxisData:['2011', '2012', '2013', '2014', '2015', '2016', '2017'],
  174. seriesData:[
  175. {
  176. name:'白银',
  177. stack: 'vistors',
  178. data: [79, 52, 200, 334, 390, 330, 220]
  179. },
  180. {
  181. name:'黄金',
  182. stack: 'vistors',
  183. data: [80, 52, 200, 334, 390, 330, 220]
  184. },
  185. {
  186. name:'铂金',
  187. stack: 'vistors',
  188. data: [30, 52, 200, 334, 390, 330, 220]
  189. },
  190. {
  191. name:'钻石',
  192. stack: 'vistors',
  193. data: [30, 52, 200, 334, 390, 330, 220]
  194. },
  195. ]
  196. },
  197. width:'100%',
  198. height:'80%',
  199. lunboActiveIndex:'1',
  200. lunboData:[
  201. {
  202. iconSrc:require('../assets/image/productInfo.png'),
  203. name:'产品信息',
  204. },
  205. {
  206. iconSrc:require('../assets/image/baseInfo.png'),
  207. name:'基本信息',
  208. },
  209. {
  210. iconSrc:require('../assets/image/money.png'),
  211. name:'资产信息',
  212. },
  213. {
  214. iconSrc:require('../assets/image/guanlian.png'),
  215. name:'关联信息',
  216. },
  217. {
  218. iconSrc:require('../assets/image/tag.png'),
  219. name:'客户标签',
  220. },
  221. ],
  222. conditionData:{
  223. name:'',
  224. status:'',
  225. money:'',
  226. num:'',
  227. sex:'女',
  228. age:'23',
  229. tag:['万能险大户','百万医疗','单身女青年','理性用户'],
  230. },
  231. }
  232. },
  233. created() {
  234. },
  235. mounted() {
  236. this.lunboFn();
  237. },
  238. methods: {
  239. _$ (el) {
  240. try {
  241. var item = document.querySelectorAll(el);
  242. return item.length == 1 ? item[0] : item;
  243. } catch (err) {
  244. console.log(err)
  245. }
  246. },
  247. lunboFn(){
  248. var that = this;
  249. var empile1 = new Empile(that._$('.demo1>.container'), {
  250. waitForTransition: true,
  251. isClickSlide: true,
  252. on: {
  253. // 卡片切换时执行
  254. slideChange: function () {
  255. //设置'当前显示的是第[xxx]张'元素的文本内容
  256. // activeIndexEle.textContent = this.activeIndex + 1;
  257. that.lunboActiveIndex = this.activeIndex;
  258. }
  259. },
  260. css: function (coord, absCoord) {
  261. var zIndex = 100 - absCoord,
  262. opacity = Math.pow(.92, absCoord).toFixed(3),
  263. scale = 'scale(' + Math.pow(.9, absCoord).toFixed(2) + ')',
  264. translateX = 'translateX(' + 30 * coord + 'px)',
  265. translateZ = 'translateZ(' + '105px)',
  266. rotateY= 'rotateY('+ coord * 30 +'deg)';
  267. var transform = [translateX,rotateY,translateZ].join(' ');
  268. return {
  269. zIndex: zIndex,
  270. opacity: opacity,
  271. transform: transform,
  272. }
  273. },
  274. });
  275. },
  276. }
  277. };
  278. </script>
  279. <style lang="scss" scoped>
  280. .conPanel{
  281. width: 97%;
  282. height: 96%;
  283. position: absolute;
  284. .cardDiv {
  285. height: 95%;
  286. position: relative;
  287. margin-top: 5px;
  288. background:#FFF;
  289. border-radius:3px;
  290. /*border: 1px solid #122E83;*/
  291. box-sizing: border-box;
  292. /*position:relative;*/
  293. /*&.cardBg{*/
  294. /* background: url("../assets/image/cardBg.png") no-repeat;*/
  295. /* background-size: 100% 100%;*/
  296. /* }*/
  297. /* &.cardBg2{*/
  298. /* background: url("../assets/image/cardBg2.png") no-repeat;*/
  299. /* background-size: 100% 100%;*/
  300. /* }*/
  301. /* &.cardBg3{*/
  302. /* background: url("../assets/image/cardBg3.png") no-repeat;*/
  303. /* background-size: 100% 100%;*/
  304. /* }*/
  305. .cardTitle {
  306. height: 32px;
  307. line-height: 32px;
  308. font-size: 14px;
  309. color: #164993;
  310. font-weight: bold;
  311. padding: 0 15px;
  312. box-sizing: border-box;
  313. background: #DCE4F7;
  314. }
  315. }
  316. }
  317. .mt20{
  318. margin-top: 20px;
  319. }
  320. .ht100p{
  321. height: 100%;
  322. }
  323. .ht50p{
  324. height: 50%;
  325. }
  326. </style>