defaultPortal.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  1. <template>
  2. <view class="">
  3. <view class="u-m-b-20">
  4. <HCard :cardData="cardData">
  5. <template #content>
  6. <view class="sale-module">
  7. <view class="sale-module-box u-flex">
  8. <view class="head-tabs u-flex"
  9. :style="{'justify-content':list.length>3?'flex-start':'space-between'}">
  10. <view class="head-tabs-item" v-for="(item,index) in list" :key="index">
  11. <view class="u-flex-col">
  12. <text class="u-font-24">{{item.text1}}</text>
  13. <text class="u-font-28" style="color: #1890FF;">{{item.text2}}</text>
  14. <text class="u-font-20" style="color: #008B4F;">{{item.text3}}</text>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. </HCard>
  22. </view>
  23. <view class="u-m-b-20">
  24. <HCard>
  25. <template #content>
  26. <view class="sale-module">
  27. <view class="sale-module-box u-flex">
  28. <view class="head-tabs u-flex"
  29. :style="{'justify-content':list2.length>3?'flex-start':'space-between'}">
  30. <view class="head-tabs-item" v-for="(item,index) in list2" :key="index">
  31. <view class="u-flex-col head-tabs-inner">
  32. <view class="img" :class="item.icon" :style="{'background':item.bgColor}">
  33. </view>
  34. <text class="u-font-24 u-m-b-10 u-m-t-10">{{item.text1}}</text>
  35. <text class="u-font-28" style="font-weight: 700;">{{item.text3}}</text>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. </HCard>
  43. </view>
  44. <view class="u-m-b-20">
  45. <HCard :cardData='cardData2'>
  46. <template #content>
  47. <view class="charts-box">
  48. <qiun-data-charts type="tarea" :opts="opts" :chartData="chartData" :ontouch="true" />
  49. </view>
  50. </template>
  51. </HCard>
  52. </view>
  53. <view class="u-m-b-20">
  54. <HCard :cardData='cardData3'>
  55. <template #content>
  56. <view class="notice-v">
  57. <view class="notice-box">
  58. <view class="notice-inner u-flex" v-for="(item,index) in noticeList" :key="index">
  59. <view class="l"
  60. :style="{'color':item.type==1?'#093FF4':'#05ED05','background-color':item.type==1?'#e5ebfe':'#e6ffe5'}">
  61. {{item.title}}
  62. </view>
  63. <view class="c u-line-1 u-font-28">{{item.content}}</view>
  64. <span class="r u-font-24">{{item.time}}</span>
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. </HCard>
  70. </view>
  71. <view class="u-m-b-20">
  72. <HCard :cardData='cardData4'>
  73. <template #content>
  74. <view class="proList-v">
  75. <view class="proList-box">
  76. <view class="proList-inner" v-for="(item,index) in proListList" :key="index">
  77. <view class="u-flex u-m-b-20 t">
  78. <u-image width="40rpx" height="40rpx" :src="item.imgUrl" class="img"></u-image>
  79. <text class="u-font-28 u-m-l-10 title">{{item.title}}</text>
  80. <text class="u-font-24 time">5{{item.time}}</text>
  81. </view>
  82. <view class="c u-line-3">
  83. {{item.content}}
  84. </view>
  85. <view class="b">
  86. <span>项目组名:{{item.name}}</span>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </template>
  92. </HCard>
  93. </view>
  94. </view>
  95. </template>
  96. <script>
  97. import HCard from './HCard'
  98. import img1 from '@/pages/portal/static/image/1.png'
  99. import img2 from '@/pages/portal/static/image/2.png'
  100. import img3 from '@/pages/portal/static/image/3.png'
  101. export default {
  102. components: {
  103. HCard
  104. },
  105. data() {
  106. return {
  107. opts: {
  108. color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
  109. "#ea7ccc"
  110. ],
  111. padding: [15, 15, 0, 15],
  112. enableScroll: true,
  113. legend: {
  114. show: false
  115. },
  116. xAxis: {
  117. disableGrid: true,
  118. scrollShow: true,
  119. itemCount: 4
  120. },
  121. yAxis: {
  122. gridType: "dash",
  123. dashLength: 2,
  124. data: [{
  125. min: null,
  126. max: 10000,
  127. }]
  128. },
  129. extra: {
  130. area: {
  131. type: "curve",
  132. opacity: 0.2,
  133. addLine: true,
  134. width: 2,
  135. gradient: true,
  136. activeType: "hollow"
  137. }
  138. }
  139. },
  140. chartData: {},
  141. proListList: [{
  142. imgUrl: img1,
  143. title: "销售管理信息项目",
  144. time: '5 小时前',
  145. name: '超越超越卓尔不凡',
  146. content: '销售管理信息项目是为全面提升企业市场占有率和竞争力,越来越多企业已经意识到上销售管理软件销售管理信息项目是为全面提升企业市场占有率和竞争力,越来越多企业已经意识到上销售管理软件销售管理信息项目是为全面提升企业市场占有率和竞争力,越来越多企业已经意识到上销售管理软件'
  147. },
  148. {
  149. imgUrl: img1,
  150. title: "知识库管理搭建",
  151. time: '5 小时前',
  152. name: '快乐每一天',
  153. content: '知识库管理搭建是一个企业内部信息的汇总,建立知识库,对这些知识进行统一管理能够有效帮助企业提高'
  154. },
  155. {
  156. imgUrl: img2,
  157. title: "报表样式调整",
  158. time: '5 小时前',
  159. name: '超越超越卓尔不凡',
  160. content: '报表引用UReport2是一款基于架构在Spring之上纯Java的高性能报表引擎,通过迭代单元格可以实现任意'
  161. },
  162. {
  163. imgUrl: img3,
  164. title: "企业门户平台",
  165. time: '5 小时前',
  166. name: '智慧成功人士',
  167. content: '企业统一门户为企业提供一个统一入口访问企业各种资源信息,企业的员工、客户、合作伙伴和供应商等都可'
  168. }
  169. ],
  170. list: [{
  171. text1: "今日交易总额",
  172. text2: "¥ 124,546,233",
  173. text3: "+2.34%"
  174. },
  175. {
  176. text1: "销售目标完成率",
  177. text2: "92 %",
  178. text3: "-0.3%"
  179. },
  180. {
  181. text1: "活动剩余时间",
  182. text2: "23:26:59",
  183. text3: "活动时间48小时"
  184. },
  185. {
  186. text1: "每秒交易总额",
  187. text2: "¥ 2,663",
  188. text3: "+9.34%"
  189. },
  190. {
  191. text1: "在售商品总数",
  192. text2: "569 件",
  193. text3: ""
  194. }
  195. ],
  196. noticeList: [{
  197. title: '通知',
  198. content: '中秋国庆双节放假通知',
  199. time: '2020-09-19',
  200. type: 1
  201. },
  202. {
  203. title: '公告',
  204. content: '你好朋友,感谢使用 JNPF快速开发平台新版本',
  205. time: '2020-09-18',
  206. type: 2
  207. },
  208. {
  209. title: '通知',
  210. content: '月饼发放通知,请各部门主管到行政部领取',
  211. time: '2020-09-17',
  212. type: 1
  213. },
  214. {
  215. title: '公告',
  216. content: '本季度销售之星名单公示',
  217. time: '2020-09-16',
  218. type: 2
  219. },
  220. {
  221. title: '通知',
  222. content: '公司上班时间调整通知,下月执行',
  223. time: '2020-09-15',
  224. type: 1
  225. },
  226. {
  227. title: '公告',
  228. content: '公司新上任总裁任命书',
  229. time: '2020-09-14',
  230. type: 2
  231. },
  232. {
  233. title: '公告',
  234. content: '午餐补贴通知,本月生效',
  235. time: '2020-09-13',
  236. type: 2
  237. },
  238. {
  239. title: '通知',
  240. content: '公司技术交流培训课通知',
  241. time: '2020-09-12',
  242. type: 1
  243. },
  244. {
  245. title: '通知',
  246. content: '关于公司组织员工秋季旅游通知',
  247. time: '2020-09-11',
  248. type: 1
  249. }
  250. ],
  251. list2: [{
  252. bgColor: '#f2ebfb',
  253. icon: 'icon-ym icon-ym-wf-payDistribution',
  254. text1: "总销售额",
  255. text3: "102,400"
  256. },
  257. {
  258. bgColor: '#edf8fe',
  259. icon: 'icon-ym icon-ym-generator-Panel',
  260. text1: "访问量",
  261. text3: "81,212"
  262. },
  263. {
  264. bgColor: '#fef3ef',
  265. icon: 'icon-ym icon-ym-extend-folder',
  266. text1: "支付笔数",
  267. text3: "9,280"
  268. },
  269. {
  270. bgColor: '#ffeff2',
  271. icon: 'icon-ym icon-ym-Refresh',
  272. text1: "线上购物转化率",
  273. text3: "13,600"
  274. },
  275. ],
  276. cardData: {
  277. 'title': "销售指数",
  278. 'viceTitle': '活动实时交易情况',
  279. 'card': {
  280. 'titleBgColor': "#fff",
  281. 'cardIcon': "icon-ym icon-ym-generator-bar",
  282. 'titleFontColor': '#6a6a6a',
  283. 'viceTitleFontColor': '#606266',
  284. 'titleFontSize': 14,
  285. 'viceTitleFontSize': 12,
  286. 'titleFontWeight': false,
  287. 'cardRightBtn': '',
  288. 'titleLeft': 'left'
  289. }
  290. },
  291. cardData2: {
  292. 'title': "实时数据",
  293. 'viceTitle': '',
  294. 'card': {
  295. 'titleBgColor': "#fff",
  296. 'cardIcon': "icon-ym icon-ym-liveData",
  297. 'titleFontColor': '#6a6a6a',
  298. 'viceTitleFontColor': '#606266',
  299. 'titleFontSize': 14,
  300. 'viceTitleFontSize': 12,
  301. 'titleFontWeight': false,
  302. 'cardRightBtn': '',
  303. 'titleLeft': 'left'
  304. }
  305. },
  306. cardData3: {
  307. 'title': "公告通知",
  308. 'viceTitle': '',
  309. 'card': {
  310. 'titleBgColor': "#fff",
  311. 'cardIcon': "icon-ym icon-ym-xitong",
  312. 'titleFontColor': '#6a6a6a',
  313. 'viceTitleFontColor': '#606266',
  314. 'titleFontSize': 14,
  315. 'viceTitleFontSize': 12,
  316. 'titleFontWeight': false,
  317. 'cardRightBtn': '查看更多>',
  318. 'titleLeft': 'left'
  319. }
  320. },
  321. cardData4: {
  322. 'title': "进行中的项目",
  323. 'viceTitle': '',
  324. 'card': {
  325. 'titleBgColor': "#fff",
  326. 'cardIcon': "icon-ym icon-ym-tree-department",
  327. 'titleFontColor': '#6a6a6a',
  328. 'viceTitleFontColor': '#606266',
  329. 'titleFontSize': 14,
  330. 'viceTitleFontSize': 12,
  331. 'titleFontWeight': false,
  332. 'cardRightBtn': '查看更多>',
  333. 'titleLeft': 'left'
  334. }
  335. }
  336. }
  337. },
  338. created() {
  339. this.getServerData();
  340. },
  341. methods: {
  342. getServerData() {
  343. //模拟从服务器获取数据时的延时
  344. setTimeout(() => {
  345. //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
  346. let res = {
  347. categories: ["2AM", "4AM", "6AM", "8AM", "10AM", "12AM", "2AM", "4AM", "6AM", "8AM",
  348. "10AM", "12AM"
  349. ],
  350. series: [{
  351. name: "成交量A",
  352. data: [0, 2820, 8932, 5700, 7901, 4934, 5000, 3000, 4090, 2330, 3820, 0]
  353. }]
  354. };
  355. this.chartData = JSON.parse(JSON.stringify(res));
  356. }, 500);
  357. },
  358. }
  359. }
  360. </script>
  361. <style lang="scss">
  362. .charts-box {
  363. width: 100%;
  364. height: 660rpx;
  365. padding: 20rpx;
  366. }
  367. .proList-v {
  368. width: 100%;
  369. height: 100%;
  370. .proList-box {
  371. width: 100%;
  372. max-height: 600rpx;
  373. overflow-y: scroll;
  374. padding: 20rpx 20rpx 0rpx 20rpx;
  375. .proList-inner {
  376. margin-bottom: 20rpx;
  377. border-bottom: 1rpx solid #ebebeb;
  378. .t {
  379. .img {}
  380. .title {
  381. color: #303133;
  382. flex: 0.8;
  383. }
  384. .time {
  385. flex: 0.2;
  386. text-align: right;
  387. }
  388. }
  389. .c {
  390. margin: 20rpx 0;
  391. color: #606266;
  392. }
  393. .b {}
  394. }
  395. }
  396. }
  397. .notice-v {
  398. width: 100%;
  399. height: 100%;
  400. .notice-box {
  401. width: 100%;
  402. max-height: 400rpx;
  403. overflow-y: scroll;
  404. padding: 0 20rpx;
  405. .notice-inner {
  406. // margin-bottom: 20rpx;
  407. justify-content: flex-start;
  408. padding: 16rpx 0;
  409. .l {
  410. width: 64rpx;
  411. height: 36rpx;
  412. font-size: 24rpx;
  413. border-radius: 4rpx;
  414. line-height: 36rpx;
  415. text-align: center;
  416. }
  417. .c {
  418. flex: 0.8;
  419. width: 61%;
  420. margin-left: 20rpx;
  421. text-align: left;
  422. }
  423. .r {
  424. flex: 0.3;
  425. text-align: right;
  426. }
  427. }
  428. }
  429. }
  430. .sale-module {
  431. .sale-module-box {
  432. justify-content: space-between;
  433. height: 100%;
  434. .head-tabs {
  435. width: 100%;
  436. overflow-x: scroll;
  437. align-items: flex-start;
  438. .head-tabs-item {
  439. width: 220rpx;
  440. display: flex;
  441. flex-direction: column;
  442. align-items: center;
  443. justify-content: center;
  444. font-size: 28rpx;
  445. color: #303133;
  446. line-height: 40rpx;
  447. flex-shrink: 0;
  448. height: 100%;
  449. padding: 20rpx 0;
  450. border-right: 1rpx solid #EEF0F4;
  451. text-align: center;
  452. .head-tabs-inner {
  453. align-items: center;
  454. .img {
  455. width: 75rpx;
  456. height: 75rpx;
  457. text-align: center;
  458. line-height: 75rpx;
  459. border-radius: 50%;
  460. flex-shrink: 0;
  461. font-size: 36rpx;
  462. }
  463. .icon-ym-wf-payDistribution {
  464. color: #713bdb;
  465. }
  466. .icon-ym-Refresh {
  467. color: #fc5180;
  468. }
  469. .icon-ym-extend-folder {
  470. color: #ff8b58;
  471. }
  472. .icon-ym-generator-Panel {
  473. color: #4ab8ff;
  474. }
  475. }
  476. }
  477. }
  478. }
  479. }
  480. </style>