index.blade.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. <!-- <script src="{{static_url('js/echarts.js')}}" type="text/javascript"></script> -->
  2. <script src="{{static_url('assets/js/echarts.min@5.1.2.js')}}"></script>
  3. @extends('layouts.base')
  4. @section('content')
  5. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}" />
  6. <link rel="stylesheet" href="//at.alicdn.com/t/font_432132_ira95q5fge8.css" />
  7. <style>
  8. [v-cloak] {
  9. display: none
  10. }
  11. @font-face {
  12. font-family: 'iconfont'; /* Project id 432132 */
  13. src: url('//at.alicdn.com/t/font_432132_ira95q5fge8.woff2?t=1630649370303') format('woff2'),
  14. url('//at.alicdn.com/t/font_432132_ira95q5fge8.woff?t=1630649370303') format('woff'),
  15. url('//at.alicdn.com/t/font_432132_ira95q5fge8.ttf?t=1630649370303') format('truetype');
  16. }
  17. .head-more {
  18. color: #4d8bfc;
  19. font-size: 16px;
  20. }
  21. .basic-function_tabs {
  22. margin: 0 20px;
  23. }
  24. .basic-functions {
  25. display: grid;
  26. column-gap: 20px;
  27. row-gap: 20px;
  28. grid-template-columns: repeat(6, calc(16.6% - 20px));
  29. padding: 20px;
  30. text-align: center;
  31. }
  32. .basic-functions li {
  33. color: #333;
  34. cursor: pointer;
  35. box-shadow: 0px 2px 13px 0px rgba(218, 218, 218, 0.34);
  36. border-radius: 10px;
  37. background-color: white;
  38. }
  39. .basic-functions li:hover {
  40. color: white;
  41. background-color: #f8a544;
  42. }
  43. .basic-functions a {
  44. display: block;
  45. padding: 20px 10px 15px;
  46. color: #333;
  47. }
  48. .basic-functions li>a div {
  49. margin-bottom: 20px;
  50. color: #f8a544;
  51. font-size: 30px;
  52. }
  53. .basic-functions li:hover>a,
  54. .basic-functions li:hover>a div {
  55. color: white;
  56. }
  57. .basic-functions li i {
  58. vertical-align: middle;
  59. font-size: 14px;
  60. }
  61. /** 统计 */
  62. .statistics {
  63. display: flex;
  64. justify-content: space-evenly;
  65. align-items: center;
  66. padding: 16px 0;
  67. text-align: center;
  68. }
  69. .statistics .iconfont {
  70. display: inline-block;
  71. padding: 11px 9px;
  72. color: #2cc08d;
  73. font-size: 24px;
  74. background-color: #e5f8f2;
  75. border-radius: 4px;
  76. }
  77. .statistics-count {
  78. display: block;
  79. margin-top: 14px;
  80. font-size: 24px;
  81. font-weight: bold;
  82. }
  83. .statistics-name {
  84. margin-top: 10px;
  85. color: #333;
  86. font-size: 14px;
  87. }
  88. /* 入口 */
  89. /* .entry-warp {
  90. height: calc(100% - 15px);
  91. } */
  92. .entry {
  93. display: flex;
  94. justify-content: space-evenly;
  95. margin-top: 32px;
  96. text-align: center;
  97. }
  98. .entry li .head-more {
  99. display: block;
  100. }
  101. .entry li img {
  102. width: 130px;
  103. }
  104. .entry-item {
  105. display: block;
  106. margin-left: 34px;
  107. }
  108. .entry-item:not(:last-child) {
  109. margin-bottom: 19px;
  110. }
  111. .entry-item:nth-of-type(1) {
  112. margin-top: 55px;
  113. }
  114. .entry-legend {
  115. margin-top: 26px;
  116. margin: 0 34px;
  117. color: #333;
  118. font-size: 14px;
  119. }
  120. .entry img {
  121. display: inline-block;
  122. margin-top: 26px;
  123. }
  124. /* 系统情况 */
  125. .system-situation {
  126. height: 300px;
  127. font-size: 15px;
  128. color: #333;
  129. }
  130. .system-situation .el-button.is-circle {
  131. padding: 16px;
  132. }
  133. .system-situation .el-button .el-icon-s-opportunity {
  134. font-size: 30px;
  135. }
  136. .system-situation_tips {
  137. margin: 23px 30px;
  138. font-size: 14px;
  139. color: #333;
  140. }
  141. .system-situation p {
  142. margin: 0px;
  143. }
  144. /** 提现动态 */
  145. /** 访客播报 */
  146. .visitor-list,
  147. .withdraw-list {
  148. padding: 0 15px;
  149. }
  150. .visitor-item:not(:last-child),
  151. .withdraw-item:not(:last-child) {
  152. margin-bottom: 35px;
  153. }
  154. .ellipsis1 {
  155. white-space: nowrap;
  156. text-overflow: ellipsis;
  157. overflow: hidden;
  158. }
  159. .member-info img {
  160. width: 36px;
  161. height: 36px;
  162. border-radius: 50%;
  163. }
  164. .goods-sales_list.el-table td,
  165. .goods-sales_list.el-table th {
  166. padding: 11px 0;
  167. font-size: 14px;
  168. }
  169. </style>
  170. <div class="all">
  171. <div id="app" v-cloak v-loading="loading">
  172. <el-row type="flex">
  173. <el-col :span="16">
  174. <div class="vue-head">
  175. <div class="vue-main-title">
  176. <div class="vue-main-title-left"></div>
  177. <div class="vue-main-title-content">基础功能指引</div>
  178. </div>
  179. <el-tabs class="basic-function_tabs" v-model="guideTabActiveIndex">
  180. <el-tab-pane :label="guideItem.title" :name="String(itemIndex)" v-for="(guideItem,itemIndex) in guide" :key="guideItem.title"></el-tab-pane>
  181. </el-tabs>
  182. <ul class="basic-functions">
  183. <li v-for="guideItem in guideList" :key="guideItem.name" v-if="guideItem.is_plugin===0||guideItem.is_plugin===1&&guideItem.is_enabled">
  184. <a :href="guideItem.url">
  185. <div class="iconfont" :class="[guideItem.icon]"></div>
  186. [[ guideItem.name ]] <i class="iconfont icon-member_right"></i>
  187. </a>
  188. </li>
  189. </ul>
  190. </div>
  191. <ul class="vue-head statistics">
  192. <li v-for="(statisticsItem,itemIndex) in statistics.slice(0,4)" :key="itemIndex">
  193. <el-link :underline="false" :href="statisticsItem.link">
  194. <div class="iconfont" :class="[ statisticsItem.icon ]" :style="{ color:statisticsItem.color,backgroundColor:statisticsItem.backgroundColor }"></div>
  195. <div class="statistics-count">
  196. <span v-if="itemIndex===4" :style="{ color:statisticsItem.color }">¥</span>
  197. <count-to :start-val='0' :end-val="Number(statisticsItem.count)" :duration="4000" :style="{ color:statisticsItem.color }"></count-to>
  198. </div>
  199. <div class="statistics-name">
  200. <el-link :underline="false" :href="statisticsItem.link">[[statisticsItem.title]]</el-link>
  201. </div>
  202. </el-link>
  203. </li>
  204. <li>
  205. <div class="iconfont" :class="[ statistics[4].icon ]" :style="{ color:statistics[4].color,backgroundColor:statistics[4].backgroundColor }"></div>
  206. <div class="statistics-count">
  207. <span :style="{ color:statistics[4].color,fontSize:'14px',marginRight:'-5px' }">¥</span>
  208. <count-to :start-val='0' :end-val="Number(statistics[4]['count'])" :duration="4000" :style="{ color:statistics[4].color }" :decimals="2"></count-to>
  209. </div>
  210. <div class="statistics-name">[[ statistics[4].title ]]</div>
  211. </li>
  212. </ul>
  213. <div class="chart vue-head">
  214. <div class="vue-main-title">
  215. <div class="vue-main-title-left"></div>
  216. <div class="vue-main-title-content">订单趋势</div>
  217. <a class="vue-main-title-button head-more" @click="goToOrderStatisticsPage" style="cursor: pointer;">
  218. 查看更多订单数据统计<i class="iconfont icon-member_right"></i>
  219. </a>
  220. </div>
  221. <div ref="chartmain" style="position:relative;width:100%; height: 433px;margin:0;padding:0;margin-top:20px;">
  222. <div style="display:inline-block;position:absolute;inset:0px;margin:auto;width:300px;height:30px;">请先安装并启用统计2.0插件,请联系管理员!</div>
  223. </div>
  224. </div>
  225. <div class="vue-head">
  226. <div class="vue-main-title">
  227. <div class="vue-main-title-left"></div>
  228. <div class="vue-main-title-content">销量排行</div>
  229. <a class="vue-main-title-button head-more" @click="goToGoodsStatisticsPage" >
  230. 查看更多商品数据统计<i class="iconfont icon-member_right"></i>
  231. </a>
  232. </div>
  233. <el-table class="goods-sales_list" :data="list" style="width: calc(100% - 30px);font-size:14px;" v-loading="loading">
  234. <el-table-column prop="title" label="商品名称"></el-table-column>
  235. <el-table-column prop="real_sales" label="销量" align="center"> </el-table-column>
  236. <el-table-column prop="created_at" label="创建时间" align="center"> </el-table-column>
  237. </el-table>
  238. </div>
  239. </el-col>
  240. <el-col :span="8">
  241. <div class="vue-head entry-warp">
  242. <div class="vue-main-title">
  243. <div class="vue-main-title-left"></div>
  244. <div class="vue-main-title-content">主要入口</div>
  245. </div>
  246. <ul class="entry">
  247. <li>
  248. <a :href="entrance.home_url" class="head-more" target="_blank">点击访问商城首页 >></a>
  249. <img :src="entrance.home_code" alt="">
  250. </li>
  251. <li>
  252. <a :href="entrance.more_home_url" class="head-more" >更多前端入口 >></a>
  253. <img :src="entrance.mini_app_code" :alt="entrance.mini_app_code_error" v-if="entrance.is_enabled_mini_app&&entrance.is_mini_app_config">
  254. </li>
  255. </ul>
  256. <!-- <a :href="entrance.customer_service_url" class="head-more entry-item" v-if="entrance.is_enabled_customer_service" @click="goToCustomerService" target="_blank">客服登录 >></a>
  257. <a :href="entrance.contract_url" class="head-more entry-item" v-if="entrance.is_enabled_contract" target="_blank">电子合同管理登录 >></a> -->
  258. <div class="entry-legend" style="margin-top:20px;">
  259. 门店、供应商、酒店、企业管理、区域代理等独立后台登录域名同总平台,使用对应的店员账号密码即可,注意不能使用同一浏览器登录
  260. </div>
  261. </div>
  262. <div class="vue-head">
  263. <div class="vue-main-title">
  264. <div class="vue-main-title-left"></div>
  265. <div class="vue-main-title-content">提现动态</div>
  266. </div>
  267. <div v-if="withdrawalList.length==0" style="text-align: center;transform:translateY(150px);">
  268. <img src="{{ static_url('images/empty@2x.png') }}" width="300px" />
  269. <p> 暂无数据~</p>
  270. </div>
  271. <el-carousel :interval="5000" arrow="always" direction="vertical" autoplay indicator-position="none" height="391">
  272. <el-carousel-item v-for="(listItem,itemIndex) in withdrawalList" :key="itemIndex">
  273. <div class="withdraw-list">
  274. <el-row class="withdraw-item" v-for="withdrawalItem in listItem" :key="withdrawalItem.id" type="flex" align="middle" justify="space-between" :gutter="10">
  275. <el-col class="ellipsis1" :span="8">
  276. [[ withdrawalItem.created_at ]]
  277. </el-col>
  278. <el-col :span="8">
  279. <div class="member-info ellipsis1" v-if="withdrawalItem.has_one_member">
  280. <img :src="withdrawalItem.has_one_member.avatar_image" />
  281. [[ withdrawalItem.has_one_member.nickname ]]
  282. </div>
  283. </el-col>
  284. <el-col class="ellipsis1" :span="8" style="text-align:right;color:#f05347;">
  285. [[ withdrawalItem.amounts ]]
  286. </el-col>
  287. </el-row>
  288. </div>
  289. </el-carousel-item>
  290. </el-carousel>
  291. <div style="margin-top:24px;text-align: center;" v-if="withdrawalList.length>0">
  292. <a :href="withdrawalMore" class="head-more">查看更多提现记录 <i class="iconfont icon-member_right"></i></a>
  293. </div>
  294. </div>
  295. <div class="vue-head">
  296. <div class="vue-main-title">
  297. <div class="vue-main-title-left"></div>
  298. <div class="vue-main-title-content">访客播报</div>
  299. </div>
  300. <div v-if="visitorEnabled&&visitorData.length==0" style="text-align: center;transform:translateY(150px);">
  301. <img src="{{ static_url('images/empty@2x.png') }}" width="300px" />
  302. <p> 暂无数据~</p>
  303. </div>
  304. <el-carousel :interval="6000" arrow="always" direction="vertical" autoplay indicator-position="none" height="391" :gutter="10" v-if="visitorEnabled">
  305. <el-carousel-item v-for="(dataItem,dataItemIndex) in visitorData" :key="dataItemIndex">
  306. <div class="visitor-list">
  307. <el-row class="visitor-item" v-for="(item,itemIndex) in dataItem" :key="itemIndex" type="flex" align="middle" justify="space-between">
  308. <el-col class="ellipsis1" :span="8">
  309. [[ item.access_time ]]
  310. </el-col>
  311. <el-col :span="8">
  312. <div class="member-info ellipsis1">
  313. <img :src="item.avatar_image" />
  314. [[ item.name ]]
  315. </div>
  316. </el-col>
  317. <el-col class="ellipsis1" :span="8" style="text-align:right;" :stlye="{ color:item.cookie_type==='new'?'#29ba9c':'#101010' }">
  318. [[ item.cookie_type === 'new'?'新访客':'老访客' ]]
  319. </el-col>
  320. </el-row>
  321. </div>
  322. </el-carousel-item>
  323. </el-carousel>
  324. <div style="margin-top:24px;text-align: center;" v-if="visitorEnabled">
  325. <a :href="visitorUrl" class="head-more">查看更多访问轨迹<i class="iconfont icon-member_right"></i></a>
  326. </div>
  327. <div v-if="!visitorEnabled" style="padding:20% 0;text-align: center;">请先安装浏览轨迹插件</div>
  328. </div>
  329. </el-col>
  330. </el-row>
  331. </div>
  332. </div>
  333. <script>
  334. let orderChart = null;
  335. var app = new Vue({
  336. el: "#app",
  337. delimiters: ['[[', ']]'],
  338. name: 'test',
  339. data() {
  340. // let data = JSON.parse(`{!! $data ? : '{}'!!}`);
  341. return {
  342. chart_data: [],
  343. plugins: [],
  344. list: [{}],
  345. today_order_money: 0, //今日交易额
  346. to_be_paid: 0, //待付款订单
  347. to_be_shipped: 0, //待发货订单
  348. today_order_count: 0, //今日订单数
  349. member_count: 0,
  350. loadAvg: [],
  351. status_content: '',
  352. status_rate: 0,
  353. cpu: {},
  354. ram: {},
  355. disk: {},
  356. disk_content: '',
  357. status_show: 0,
  358. loading: false,
  359. statistics: [{
  360. title: "会员总数",
  361. count: 0,
  362. icon: "icon-fontclass-renshu",
  363. color: "#2cc08d",
  364. backgroundColor: "#e5f8f2",
  365. link: '{!! yzWebFullUrl('member.member') !!}',
  366. }, {
  367. title: "今日订单数",
  368. count: 0,
  369. icon: "icon-fontclass-shangpindingdan",
  370. color: "#f3766c",
  371. backgroundColor: "#fdeeec",
  372. link: '{!! yzWebFullUrl('order.order-list.index', ['o_time' => 'create_time']) !!}',
  373. }, {
  374. title: "待付款订单",
  375. count: 0,
  376. icon: "icon-ht_content_tixian",
  377. color: " #ecb134",
  378. backgroundColor: "#fcf9e9",
  379. link: '{!! yzWebFullUrl('order.order-list.index', ['o_status' => 'waitPay']) !!}',
  380. }, {
  381. title: "待发货订单",
  382. count: 0,
  383. icon: "icon-ht_content_order",
  384. color: "#4d8bfc",
  385. backgroundColor: "#f0f4ff",
  386. link: '{!! yzWebFullUrl('order.order-list.index', ['o_status' => 1]) !!}',
  387. }, {
  388. title: "今日交易额",
  389. count: 0,
  390. icon: "icon-fontclass-yue",
  391. color: "#7e8bfa",
  392. backgroundColor: "#eceefa"
  393. }],
  394. guide: [], //* 基础功能指引
  395. guideTabActiveIndex: "0",
  396. statisticsChartEnabled: false,
  397. entrance: {}, //* 入口链接
  398. withdrawalMore: "", //* 更多提现动态入口
  399. withdrawalList: [], //* 提现动态数据
  400. visitorEnabled: false, //* 是否开启浏览轨迹插件
  401. visitorUrl: "", //* 查看更多访问轨迹数据
  402. visitorData: [], //* 访问数据
  403. }
  404. },
  405. created() {
  406. },
  407. mounted() {
  408. this.getData();
  409. // let data = JSON.parse(`{!! $data ? : '{goods:[],order:{}}' !!}`);
  410. // this.setData(data);
  411. // let system_data = data.system || {};
  412. // this.status_show = (system_data && system_data.is_show) ? system_data.is_show : 0;
  413. // this.status_show = 1;
  414. // setTimeout(() => {
  415. // this.status_content = `最近1分钟平均负载:${system_data.loadAvg?system_data.loadAvg[0]:''}<br>最近5分钟平均负载:${system_data.loadAvg?system_data.loadAvg[1]:''}<br>最近15分钟平均负载:${system_data.loadAvg?system_data.loadAvg[2]:''}`
  416. // this.status_rate = system_data.loadAvg ? system_data.loadAvg[3] : 0;
  417. // this.disk_content = `容量:${system_data.disk?system_data.disk.total:''}G<br>已用:${system_data.disk?system_data.disk.used:''}G<br>可用:${system_data.disk?system_data.disk.free:''}G<br>使用率:${system_data.disk?system_data.disk.percent:''}%`
  418. // this.loadAvg = system_data.loadAvg;
  419. // this.cpu = system_data.cpu;
  420. // this.ram = system_data.RAM;
  421. // this.disk = system_data.disk;
  422. // }, 500);
  423. },
  424. methods: {
  425. setData(data) {
  426. this.loading = true;
  427. this.chart_data = data.chart_data;
  428. this.plugins = data.plugins;
  429. this.list = data.goods;
  430. this.list.forEach((item, index) => {
  431. item.title = this.escapeHTML(item.title)
  432. });
  433. this.today_order_money = Number(data.order.today_order_money);
  434. this.to_be_paid = data.order.to_be_paid;
  435. this.to_be_shipped = data.order.to_be_shipped;
  436. this.today_order_count = data.order.today_order_count;
  437. this.member_count = data.member_count;
  438. this.loading = false;
  439. this.guide = data.guide.list;
  440. this.statistics[0]['count'] = data.member_count;
  441. this.statistics[1]['count'] = data.order.today_order_count;
  442. this.statistics[2]['count'] = data.order.to_be_paid;
  443. this.statistics[3]['count'] = data.order.to_be_shipped;
  444. this.statistics[4]['count'] = data.order.today_order_money;
  445. this.statisticsChartEnabled = Boolean(data.is_enabled_statistics);
  446. if (this.statisticsChartEnabled) {
  447. this.getRef();
  448. window.addEventListener("resize", () => {
  449. orderChart.resize();
  450. })
  451. }
  452. this.entrance = data.entrance;
  453. this.withdrawalMore = data.withdrawal.url;
  454. let withdrawalList = [];
  455. for (let index = 0; index < data.withdrawal.list.length;) {
  456. withdrawalList.push(data.withdrawal.list.slice(index, index + 6));
  457. index += 6;
  458. }
  459. this.withdrawalList = withdrawalList;
  460. //* 访客播报
  461. this.visitorEnabled = data.visitor.is_enabled;
  462. let visitorData = [];
  463. for (let index = 0; index < data.visitor.list.length;) {
  464. visitorData.push(data.visitor.list.slice(index, index + 6));
  465. index += 6;
  466. }
  467. this.visitorData = visitorData;
  468. this.visitorUrl = data.visitor.url;
  469. },
  470. getData() {
  471. this.loading = true;
  472. this.$http.post("{!! yzWebFullUrl('survey.survey.survey') !!}").then(function(response) {
  473. if (response.data.result) {
  474. let data=response.data.data;
  475. this.setData(data);
  476. } else {
  477. this.$message({
  478. message: response.data.msg,
  479. type: 'error'
  480. });
  481. }
  482. this.loading = false;
  483. }, function(response) {
  484. this.$message({
  485. message: response.data.msg,
  486. type: 'error'
  487. });
  488. this.loading = false;
  489. });
  490. },
  491. getRef() {
  492. //指定图标的配置和数据 '总订单', '已完成', '已发货'
  493. var option = {
  494. tooltip: {
  495. trigger: 'axis',
  496. formatter: "{b}<br/>{a0}:{c0}"
  497. },
  498. legend: {
  499. right: 123,
  500. data: ["总订单", "已完成", "已发货"]
  501. },
  502. xAxis: {
  503. data: [this.chart_data[0].date, this.chart_data[1].date, this.chart_data[2].date, this.chart_data[3].date, this.chart_data[4].date, this.chart_data[5].date, this.chart_data[6].date],
  504. axisPointer: {
  505. show: true
  506. },
  507. axisLine: {
  508. show: true,
  509. lineStyle: {
  510. width: 4,
  511. color: "#ebeff3"
  512. }
  513. },
  514. axisLabel: {
  515. color: "#b1b5b8"
  516. }
  517. },
  518. yAxis: {
  519. splitLine: {
  520. show: true,
  521. lineStyle: {
  522. type: 'dashed',
  523. color: "#f0f3f6",
  524. opacity: 1
  525. }
  526. }
  527. },
  528. series: [{
  529. name: '总订单',
  530. type: 'line',
  531. data: [this.chart_data[0].total, this.chart_data[1].total, this.chart_data[2].total, this.chart_data[3].total, this.chart_data[4].total, this.chart_data[5].total, this.chart_data[6].total],
  532. itemStyle: {
  533. color: "rgba(239, 113, 113, 1)",
  534. borderColor: "rgba(86, 86, 86, 1)",
  535. borderWidth: 6
  536. }
  537. },
  538. {
  539. name: '已完成',
  540. type: 'line',
  541. data: [this.chart_data[0].complete, this.chart_data[1].complete, this.chart_data[2].complete, this.chart_data[3].complete, this.chart_data[4].complete, this.chart_data[5].complete, this.chart_data[6].complete],
  542. itemStyle: {
  543. color: "#f8a544"
  544. }
  545. },
  546. {
  547. name: '已发货',
  548. type: 'line',
  549. data: [this.chart_data[0].deliver_goods, this.chart_data[1].deliver_goods, this.chart_data[2].deliver_goods, this.chart_data[3].deliver_goods, this.chart_data[4].deliver_goods, this.chart_data[5].deliver_goods, this.chart_data[6].deliver_goods],
  550. itemStyle: {
  551. color: "#2cc08d"
  552. }
  553. },
  554. ]
  555. };
  556. //初始化echarts实例
  557. // var myChart = echarts.init(document.getElementById('chartmain'));
  558. orderChart = echarts.init(this.$refs.chartmain);
  559. //使用制定的配置项和数据显示图表
  560. orderChart.setOption(option);
  561. },
  562. // 字符转义
  563. escapeHTML(a) {
  564. a = "" + a;
  565. return a.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "\"").replace(/&apos;/g, "'");;
  566. },
  567. goToOrderStatisticsPage() {
  568. window.event.preventDefault();
  569. if (this.statisticsChartEnabled === false) {
  570. this.$message.warning("请先安装并启用统计2.0插件,请联系管理员!");
  571. return;
  572. }
  573. location.href = "{!! yzWebFullUrl('plugin.shop-statistics.backend.order.show') !!}";
  574. },
  575. goToGoodsStatisticsPage() {
  576. window.event.preventDefault();
  577. if (this.statisticsChartEnabled === false) {
  578. this.$message.warning("请先安装并启用统计2.0插件,请联系管理员!");
  579. return;
  580. }
  581. location.href = "{!! yzWebFullUrl('plugin.shop-statistics.backend.goods.show') !!}";
  582. },
  583. goToCustomerService() {
  584. if (this.entrance.is_enabled_customer_service == 0) {
  585. this.$mesasge.warning("您未安装客服插件,请联系管理员");
  586. window.event.preventDefault();
  587. }
  588. }
  589. },
  590. computed: {
  591. guideList() {
  592. if (this.guide[this.guideTabActiveIndex]) {
  593. return this.guide[this.guideTabActiveIndex].list;
  594. }
  595. return [];
  596. }
  597. }
  598. })
  599. </script>
  600. @endsection