Commit e52cf1d6ae8e7291752fe363ebd567b90ddc0934
1 parent
d8162827
添加丹阳
Showing
13 changed files
with
636 additions
and
431 deletions
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
| 1 | -{"version":3,"sources":["webpack:///webpack/bootstrap 3252dcfca6d866f8d6bd"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3252dcfca6d866f8d6bd"],"sourceRoot":""} | ||
| 2 | \ No newline at end of file | 1 | \ No newline at end of file |
| 2 | +{"version":3,"sources":["webpack:///webpack/bootstrap 5610c80c2badb037245d"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 5610c80c2badb037245d"],"sourceRoot":""} | ||
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/api/api.js
| 1 | import { get, post} from './httpRequest' | 1 | import { get, post} from './httpRequest' |
| 2 | - | 2 | +const baseWX = 'http://bcp.service.renniting.cn/' //无锡 |
| 3 | +const baseDY = 'http://test.renniting.cn/bcp/' //丹阳 | ||
| 3 | //....用户数 | 4 | //....用户数 |
| 4 | -export const memberAddress = p => post('urban/intelligence/appuser/queryUserPersonStatistic',p) | ||
| 5 | - | 5 | +export const memberAddress = p => post(baseWX+'urban/intelligence/appuser/queryUserPersonStatistic',p) |
| 6 | +export const memberAddressDY = p => post(baseDY+'urban/intelligence/appuser/queryUserPersonStatistic',p) | ||
| 6 | //....收费员 | 7 | //....收费员 |
| 7 | -export const tollmanAddress = p => post('urban/intelligence/employee/queryEmployeeStaByOrgIds',p) | ||
| 8 | - | 8 | +export const tollmanAddress = p => post(baseWX+'urban/intelligence/employee/queryEmployeeStaByOrgIds',p) |
| 9 | +export const tollmanAddressDY = p => post(baseDY+'urban/intelligence/employee/queryEmployeeStaByOrgIds',p) | ||
| 9 | //....收入 | 10 | //....收入 |
| 10 | -export const incomeAddress = p => post('urban/intelligence/income/queryIncomeStaByOrgIds',p) | ||
| 11 | - | 11 | +export const incomeAddress = p => post(baseWX+'urban/intelligence/income/queryIncomeStaByOrgIds',p) |
| 12 | +export const incomeAddressDY = p => post(baseDY+'urban/intelligence/income/queryIncomeStaByOrgIds',p) | ||
| 12 | //....泊位 | 13 | //....泊位 |
| 13 | -export const berthAddress = p => post('urban/intelligence/berth/queryBerthStatisticByOrgIds',p) | ||
| 14 | - | 14 | +export const berthAddress = p => post(baseWX+'urban/intelligence/berth/queryBerthStatisticByOrgIds',p) |
| 15 | +export const berthAddressDY = p => post(baseDY+'urban/intelligence/berth/queryBerthStatisticByOrgIds',p) | ||
| 15 | //....设备 | 16 | //....设备 |
| 16 | -export const deviceAddress = p => post('urban/intelligence/device/queryDeviceStatistic',p) | ||
| 17 | - | 17 | +export const deviceAddress = p => post(baseWX+'urban/intelligence/device/queryDeviceStatistic',p) |
| 18 | +export const deviceAddressDY = p => post(baseDY+'urban/intelligence/device/queryDeviceStatistic',p) | ||
| 18 | //....消息 | 19 | //....消息 |
| 19 | -export const msgAddress = p => post('urban/intelligence/orderPark/queryLastOrderPark',p) | ||
| 20 | - | 20 | +export const msgAddress = p => post(baseWX+'urban/intelligence/orderPark/queryLastOrderPark',p) |
| 21 | +export const msgAddressDY = p => post(baseDY+'urban/intelligence/orderPark/queryLastOrderPark',p) | ||
| 21 | //....今日车流量 | 22 | //....今日车流量 |
| 22 | -export const dayAddress = p => post('urban/intelligence/orderPark/queryOrderParkNumForToday',p) | ||
| 23 | - | 23 | +export const dayAddress = p => post(baseWX+'urban/intelligence/orderPark/queryOrderParkNumForToday',p) |
| 24 | +export const dayAddressDY = p => post(baseDY+'urban/intelligence/orderPark/queryOrderParkNumForToday',p) | ||
| 24 | //....周出场 | 25 | //....周出场 |
| 25 | -export const weekAddress = p => post('urban/intelligence/orderPark/queryOrderParkNumForLastWeek',p) | ||
| 26 | - | 26 | +export const weekAddress = p => post(baseWX+'urban/intelligence/orderPark/queryOrderParkNumForLastWeek',p) |
| 27 | +export const weekAddressDY = p => post(baseDY+'urban/intelligence/orderPark/queryOrderParkNumForLastWeek',p) | ||
| 27 | //....停车场总数 | 28 | //....停车场总数 |
| 28 | -export const parkAddress = p => post('urban/intelligence/park/queryParkNumStatisticByOrgIds',p) | ||
| 29 | - | 29 | +export const parkAddress = p => post(baseWX+'urban/intelligence/park/queryParkNumStatisticByOrgIds',p) |
| 30 | +export const parkAddressDY = p => post(baseDY+'urban/intelligence/park/queryParkNumStatisticByOrgIds',p) | ||
| 30 | //....地图 | 31 | //....地图 |
| 31 | -export const baiduMapAddress = p => post('urban/intelligence/berth/queryBerthStatisticForOrgId',p) | 32 | +export const baiduMapAddress = p => post(baseWX+'urban/intelligence/berth/queryBerthStatisticForOrgId',p) |
| 33 | +export const baiduMapAddressDY = p => post(baseDY+'urban/intelligence/berth/queryBerthStatisticForOrgId',p) |
src/api/httpRequest.js
| @@ -73,7 +73,7 @@ axios.interceptors.response.use(response => { | @@ -73,7 +73,7 @@ axios.interceptors.response.use(response => { | ||
| 73 | }) | 73 | }) |
| 74 | //基础url前缀 | 74 | //基础url前缀 |
| 75 | //axios.defaults.baseURL = '/api' | 75 | //axios.defaults.baseURL = '/api' |
| 76 | -axios.defaults.baseURL = 'http://bcp.service.renniting.cn/'; | 76 | +// axios.defaults.baseURL = 'http://bcp.service.renniting.cn/'; |
| 77 | //设置默认请求头 | 77 | //设置默认请求头 |
| 78 | // axios.defaults.withCredentials=true;//让ajax携带cookie | 78 | // axios.defaults.withCredentials=true;//让ajax携带cookie |
| 79 | 79 |
src/components/berth/index.vue
| @@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
| 24 | <script> | 24 | <script> |
| 25 | import common from '../../api/common'; | 25 | import common from '../../api/common'; |
| 26 | import echarts from 'echarts' | 26 | import echarts from 'echarts' |
| 27 | - import { berthAddress } from '../../api/api' | 27 | + import { berthAddress, berthAddressDY } from '../../api/api' |
| 28 | export default { | 28 | export default { |
| 29 | name: "berth", | 29 | name: "berth", |
| 30 | data() { | 30 | data() { |
| @@ -68,6 +68,31 @@ | @@ -68,6 +68,31 @@ | ||
| 68 | }).catch((response)=>{ | 68 | }).catch((response)=>{ |
| 69 | console.log(response); | 69 | console.log(response); |
| 70 | }) | 70 | }) |
| 71 | + | ||
| 72 | + | ||
| 73 | + this.$axios.all( | ||
| 74 | + [ | ||
| 75 | + berthAddress({ orgIds: this.GLOBAL.paramsvariables}), | ||
| 76 | + berthAddressDY({ orgIds: this.GLOBAL.paramsvariables}) | ||
| 77 | + ] | ||
| 78 | + ) | ||
| 79 | + .then(this.$axios.spread((acctWX, acctDY) => { | ||
| 80 | + let WXdata = acctWX.data.data | ||
| 81 | + let DYdata = acctDY.data.data | ||
| 82 | + this.berthTotal = common.formatNumToStr(WXdata.allBerthNum+DYdata.allBerthNum) | ||
| 83 | + this.free = WXdata.freeBerthNum+DYdata.freeBerthNum | ||
| 84 | + this.have = WXdata.isOccupyBertnNum+DYdata.isOccupyBertnNum | ||
| 85 | + this.pieChartOption.seriesData[0].value = WXdata.isOccupyBertnNum+DYdata.isOccupyBertnNum | ||
| 86 | + this.pieChartOption.seriesData[1].value = WXdata.freeBerthNum+DYdata.freeBerthNum | ||
| 87 | + let pieChartOption = this.pieChartOption | ||
| 88 | + //占有率 | ||
| 89 | + this.pieChart=this.createPie(pieChartOption); | ||
| 90 | + window.addEventListener('resize', function() { | ||
| 91 | + this.pieChart.resize() | ||
| 92 | + }.bind(this)); | ||
| 93 | + | ||
| 94 | + })) | ||
| 95 | + | ||
| 71 | }, | 96 | }, |
| 72 | /* | 97 | /* |
| 73 | * 泊位占比 | 98 | * 泊位占比 |
src/components/chinaMap/index.vue
| @@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
| 33 | import echarts from 'echarts' | 33 | import echarts from 'echarts' |
| 34 | import countTo from 'vue-count-to';//通过设置:endVall 和 :startVall 会自动判断计数和倒数,:duration='3000'是指完成动画的时间。 | 34 | import countTo from 'vue-count-to';//通过设置:endVall 和 :startVall 会自动判断计数和倒数,:duration='3000'是指完成动画的时间。 |
| 35 | import {mapGetters} from 'vuex' //use commit | 35 | import {mapGetters} from 'vuex' //use commit |
| 36 | - import { parkAddress, baiduMapAddress } from '../../api/api' | 36 | + import { parkAddress, baiduMapAddress, baiduMapAddressDY, parkAddressDY } from '../../api/api' |
| 37 | 37 | ||
| 38 | export default { | 38 | export default { |
| 39 | name: "chinaMap", | 39 | name: "chinaMap", |
| @@ -67,16 +67,70 @@ | @@ -67,16 +67,70 @@ | ||
| 67 | }, | 67 | }, |
| 68 | methods: { | 68 | methods: { |
| 69 | parkInit() { | 69 | parkInit() { |
| 70 | - parkAddress({ | ||
| 71 | - orgIds: this.GLOBAL.paramsvariables | ||
| 72 | - }).then((response)=>{ | ||
| 73 | - let data = response.data.data | ||
| 74 | - this.parkParams.endVal=data | ||
| 75 | - }).catch((response)=>{ | ||
| 76 | - console.log(response); | ||
| 77 | - }) | 70 | + // parkAddress({ |
| 71 | + // orgIds: this.GLOBAL.paramsvariables | ||
| 72 | + // }).then((response)=>{ | ||
| 73 | + // let data = response.data.data | ||
| 74 | + // console.log(response) | ||
| 75 | + // this.parkParams.endVal=data | ||
| 76 | + // }).catch((response)=>{ | ||
| 77 | + // console.log(response); | ||
| 78 | + // }) | ||
| 79 | + | ||
| 80 | + this.$axios.all( | ||
| 81 | + [ | ||
| 82 | + parkAddress({ orgIds: this.GLOBAL.paramsvariables}), | ||
| 83 | + parkAddressDY({ orgIds: this.GLOBAL.paramsvariables}) | ||
| 84 | + ] | ||
| 85 | + ) | ||
| 86 | + .then(this.$axios.spread((acctWX, acctDY) => { | ||
| 87 | + let WXdata = acctWX.data.data | ||
| 88 | + let DYdata = acctDY.data.data | ||
| 89 | + console.log(WXdata) | ||
| 90 | + console.log(DYdata) | ||
| 91 | + this.parkParams.endVal=WXdata+DYdata | ||
| 92 | + | ||
| 93 | + })) | ||
| 78 | }, | 94 | }, |
| 79 | baiduMapInit() { | 95 | baiduMapInit() { |
| 96 | + | ||
| 97 | + | ||
| 98 | + this.$axios.all( | ||
| 99 | + [ | ||
| 100 | + baiduMapAddress({ orgIds: this.GLOBAL.paramsvariables}), | ||
| 101 | + baiduMapAddressDY({ orgIds: this.GLOBAL.paramsvariables}) | ||
| 102 | + ] | ||
| 103 | + ) | ||
| 104 | + .then(this.$axios.spread((acctWX, acctDY) => { | ||
| 105 | + let WXdata = acctWX.data.data | ||
| 106 | + let DYdata = acctDY.data.data | ||
| 107 | + console.log(WXdata) | ||
| 108 | + console.log(DYdata) | ||
| 109 | + //let mapData = []; | ||
| 110 | + for (let i=0;i<WXdata.length;i++){ | ||
| 111 | + this.mapData.push({ | ||
| 112 | + name:WXdata[i].orgName, | ||
| 113 | + value:WXdata[i].allBerthNum | ||
| 114 | + }) | ||
| 115 | + this.coordinateData[WXdata[i].orgName] = [WXdata[i].lonId,WXdata[i].latId] | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + for (let i=0;i<DYdata.length;i++){ | ||
| 119 | + this.mapData.push({ | ||
| 120 | + name:DYdata[i].orgName, | ||
| 121 | + value:DYdata[i].allBerthNum | ||
| 122 | + }) | ||
| 123 | + this.coordinateData[DYdata[i].orgName] = [DYdata[i].lonId,DYdata[i].latId] | ||
| 124 | + } | ||
| 125 | + //'双流': [103.912493, 30.586969] | ||
| 126 | + this.mapChart= this.createPie(); | ||
| 127 | + window.addEventListener('resize', function() { | ||
| 128 | + this.mapChart.resize() | ||
| 129 | + }.bind(this)); | ||
| 130 | + | ||
| 131 | + })) | ||
| 132 | + | ||
| 133 | + | ||
| 80 | baiduMapAddress({ | 134 | baiduMapAddress({ |
| 81 | orgIds: this.GLOBAL.paramsvariables | 135 | orgIds: this.GLOBAL.paramsvariables |
| 82 | }).then((response)=>{ | 136 | }).then((response)=>{ |
| @@ -98,6 +152,8 @@ | @@ -98,6 +152,8 @@ | ||
| 98 | }).catch((response)=>{ | 152 | }).catch((response)=>{ |
| 99 | console.log(response); | 153 | console.log(response); |
| 100 | }) | 154 | }) |
| 155 | + | ||
| 156 | + | ||
| 101 | }, | 157 | }, |
| 102 | /* | 158 | /* |
| 103 | * china地图 | 159 | * china地图 |
src/components/device/index.vue
| @@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
| 41 | </template> | 41 | </template> |
| 42 | 42 | ||
| 43 | <script> | 43 | <script> |
| 44 | -import { deviceAddress } from '../../api/api' | 44 | +import { deviceAddress, deviceAddressDY } from '../../api/api' |
| 45 | export default { | 45 | export default { |
| 46 | name: "device", | 46 | name: "device", |
| 47 | data() { | 47 | data() { |
| @@ -62,24 +62,35 @@ import { deviceAddress } from '../../api/api' | @@ -62,24 +62,35 @@ import { deviceAddress } from '../../api/api' | ||
| 62 | }, | 62 | }, |
| 63 | methods: { | 63 | methods: { |
| 64 | onLoad() { | 64 | onLoad() { |
| 65 | - deviceAddress({orgIds: this.GLOBAL.paramsvariables}).then((response)=>{ | ||
| 66 | - let data = response.data.data | ||
| 67 | - console.log(data) | ||
| 68 | - this.PDANum = data[0].num | ||
| 69 | - this.PDAName = data[0].deviceName | ||
| 70 | - this.diCiNum = data[1].num | ||
| 71 | - this.diCiName = data[1].deviceName | ||
| 72 | - this.daoZhaNum = data[2].num | 65 | + this.$axios.all( |
| 66 | + [ | ||
| 67 | + deviceAddress({ orgIds: this.GLOBAL.paramsvariables}), | ||
| 68 | + deviceAddressDY({ orgIds: this.GLOBAL.paramsvariables}) | ||
| 69 | + ] | ||
| 70 | + ) | ||
| 71 | + .then(this.$axios.spread((acctWX, acctDY) => { | ||
| 72 | + let WXdata = acctWX.data.data | ||
| 73 | + let DYdata = acctDY.data.data | ||
| 74 | + this.PDANum = WXdata[0].num+DYdata[0].num | ||
| 75 | + this.PDAName = WXdata[0].deviceName | ||
| 73 | 76 | ||
| 74 | - this.daoZhaName = data[2].deviceName | ||
| 75 | - this.youDaoNum = data[3].num | 77 | + this.diCiNum = WXdata[1].num+DYdata[1].num |
| 78 | + this.diCiName = WXdata[1].deviceName | ||
| 79 | + | ||
| 80 | + this.daoZhaNum = WXdata[2].num+DYdata[2].num | ||
| 81 | + this.daoZhaName = WXdata[2].deviceName | ||
| 82 | + | ||
| 83 | + this.youDaoNum = WXdata[3].num+DYdata[3].num | ||
| 76 | if(this.youDaoNum == 0){ | 84 | if(this.youDaoNum == 0){ |
| 77 | this.youDaoNum = '-' | 85 | this.youDaoNum = '-' |
| 78 | } | 86 | } |
| 79 | - this.youDaoName = data[3].deviceName | ||
| 80 | - }).catch((response)=>{ | ||
| 81 | - console.log(response); | ||
| 82 | - }) | 87 | + this.youDaoName = WXdata[3].deviceName |
| 88 | + // this.tollmanTotal = WXdata.allTollCollector+DYdata.allTollCollector | ||
| 89 | + // this.tollmanTotal = common.formatNumToStr(this.tollmanTotal); | ||
| 90 | + // this.onDutyNum = WXdata.signInTollCollector+DYdata.signInTollCollector | ||
| 91 | + // this.noDutyNum = WXdata.unSignInTollCollector+DYdata.unSignInTollCollector | ||
| 92 | + | ||
| 93 | + })) | ||
| 83 | } | 94 | } |
| 84 | }, | 95 | }, |
| 85 | } | 96 | } |
src/components/incomeOverview/index.vue
| @@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
| 19 | <script> | 19 | <script> |
| 20 | import common from '../../api/common'; | 20 | import common from '../../api/common'; |
| 21 | import echarts from 'echarts' | 21 | import echarts from 'echarts' |
| 22 | - import { incomeAddress } from '../../api/api' | 22 | + import { incomeAddress, incomeAddressDY } from '../../api/api' |
| 23 | export default { | 23 | export default { |
| 24 | name: "incomeOverview", | 24 | name: "incomeOverview", |
| 25 | data() { | 25 | data() { |
| @@ -43,23 +43,48 @@ | @@ -43,23 +43,48 @@ | ||
| 43 | }, | 43 | }, |
| 44 | methods: { | 44 | methods: { |
| 45 | onLoad() { | 45 | onLoad() { |
| 46 | - incomeAddress({ | ||
| 47 | - orgIds: this.GLOBAL.paramsvariables | ||
| 48 | - }).then((response)=>{ | ||
| 49 | - let data = response.data.data | ||
| 50 | - this.incomeTotal = data.totalPay | 46 | + // incomeAddress({ |
| 47 | + // orgIds: this.GLOBAL.paramsvariables | ||
| 48 | + // }).then((response)=>{ | ||
| 49 | + // let data = response.data.data | ||
| 50 | + // this.incomeTotal = data.totalPay | ||
| 51 | + // this.incomeTotal = common.formatNumToStr(Math.round(this.incomeTotal/100)) | ||
| 52 | + // this.barChartOption.barColor[0].value = Math.round(data.aliPay/100) | ||
| 53 | + // this.barChartOption.barColor[1].value = Math.round(data.wxPay/100) | ||
| 54 | + // this.barChartOption.barColor[2].value = Math.round(data.otherPay/100) | ||
| 55 | + // let barChartOption = this.barChartOption | ||
| 56 | + // this.barChart=this.createBar(barChartOption); | ||
| 57 | + // window.addEventListener('resize', function() { | ||
| 58 | + // this.barChart.resize() | ||
| 59 | + // }.bind(this)); | ||
| 60 | + // }).catch((response)=>{ | ||
| 61 | + // console.log(response); | ||
| 62 | + // }) | ||
| 63 | + | ||
| 64 | + | ||
| 65 | + this.$axios.all( | ||
| 66 | + [ | ||
| 67 | + incomeAddress({ orgIds: this.GLOBAL.paramsvariables}), | ||
| 68 | + incomeAddressDY({ orgIds: this.GLOBAL.paramsvariables}) | ||
| 69 | + ] | ||
| 70 | + ) | ||
| 71 | + .then(this.$axios.spread((acctWX, acctDY) => { | ||
| 72 | + let WXdata = acctWX.data.data | ||
| 73 | + let DYdata = acctDY.data.data | ||
| 74 | + this.incomeTotal = WXdata.totalPay+DYdata.totalPay | ||
| 51 | this.incomeTotal = common.formatNumToStr(Math.round(this.incomeTotal/100)) | 75 | this.incomeTotal = common.formatNumToStr(Math.round(this.incomeTotal/100)) |
| 52 | - this.barChartOption.barColor[0].value = Math.round(data.aliPay/100) | ||
| 53 | - this.barChartOption.barColor[1].value = Math.round(data.wxPay/100) | ||
| 54 | - this.barChartOption.barColor[2].value = Math.round(data.otherPay/100) | 76 | + |
| 77 | + this.barChartOption.barColor[0].value = Math.round((WXdata.aliPay+DYdata.aliPay)/100) | ||
| 78 | + this.barChartOption.barColor[1].value = Math.round((WXdata.wxPay+DYdata.wxPay)/100) | ||
| 79 | + this.barChartOption.barColor[2].value = Math.round((WXdata.otherPay+DYdata.otherPay)/100) | ||
| 55 | let barChartOption = this.barChartOption | 80 | let barChartOption = this.barChartOption |
| 56 | this.barChart=this.createBar(barChartOption); | 81 | this.barChart=this.createBar(barChartOption); |
| 57 | window.addEventListener('resize', function() { | 82 | window.addEventListener('resize', function() { |
| 58 | this.barChart.resize() | 83 | this.barChart.resize() |
| 59 | }.bind(this)); | 84 | }.bind(this)); |
| 60 | - }).catch((response)=>{ | ||
| 61 | - console.log(response); | ||
| 62 | - }) | 85 | + |
| 86 | + })) | ||
| 87 | + | ||
| 63 | }, | 88 | }, |
| 64 | /* | 89 | /* |
| 65 | * 创建收入Bar | 90 | * 创建收入Bar |
src/components/memberNum/index.vue
| 1 | <template> | 1 | <template> |
| 2 | - <div class="app-memberNumBox"> | ||
| 3 | - <div class="theme-card"> | ||
| 4 | - <div class="title"><span>用户数</span></div> | ||
| 5 | - <div class="content"> | ||
| 6 | - <div class="topBox eleVerHorCenter-flex"> | ||
| 7 | - <span class="eleText">总计</span> | ||
| 8 | - <div class="eleMarginLeft" v-html="memberNumTotal"></div> | 2 | + <div class="app-memberNumBox"> |
| 3 | + <div class="theme-card"> | ||
| 4 | + <div class="title"><span>用户数</span></div> | ||
| 5 | + <div class="content"> | ||
| 6 | + <div class="topBox eleVerHorCenter-flex"> | ||
| 7 | + <span class="eleText">总计</span> | ||
| 8 | + <div class="eleMarginLeft" v-html="memberNumTotal"></div> | ||
| 9 | + </div> | ||
| 10 | + <div class="bottomBox"> | ||
| 11 | + <table class="memberNumTb"> | ||
| 12 | + <tr> | ||
| 13 | + <td> | ||
| 14 | + <div class="activeUserBox"><span class="activeUserNum">{{activeUserNum}}</span> | ||
| 15 | + <div class="activeUserText">日活跃</div> | ||
| 16 | + </div> | ||
| 17 | + </td> | ||
| 18 | + <td> | ||
| 19 | + <div class="memberRadarBox"> | ||
| 20 | + <div class="memberRadar eleRotation"></div> | ||
| 21 | + </div> | ||
| 22 | + </td> | ||
| 23 | + <td> | ||
| 24 | + <div class="newUerBox"><span class="newUerNum">{{newUerNum}}</span> | ||
| 25 | + <div class="newUerNumText">新增用户</div> | ||
| 26 | + </div> | ||
| 27 | + </td> | ||
| 28 | + </tr> | ||
| 29 | + </table> | ||
| 30 | + </div> | ||
| 31 | + </div> | ||
| 9 | </div> | 32 | </div> |
| 10 | - <div class="bottomBox"> | ||
| 11 | - <table class="memberNumTb"> | ||
| 12 | - <tr> | ||
| 13 | - <td> <div class="activeUserBox"> <span class="activeUserNum">{{activeUserNum}}</span><div class="activeUserText">日活跃</div> </div> </td> | ||
| 14 | - <td><div class="memberRadarBox"><div class="memberRadar eleRotation"></div></div> </td> | ||
| 15 | - <td> <div class="newUerBox"> <span class="newUerNum">{{newUerNum}}</span><div class="newUerNumText">新增用户</div></div> </td> | ||
| 16 | - </tr> | ||
| 17 | - </table> | ||
| 18 | - </div> | ||
| 19 | - </div> | ||
| 20 | </div> | 33 | </div> |
| 21 | - </div> | ||
| 22 | </template> | 34 | </template> |
| 23 | 35 | ||
| 24 | <script> | 36 | <script> |
| 25 | - import { mapActions } from 'vuex' | ||
| 26 | - import common from '../../api/common'; | ||
| 27 | - import { memberAddress } from '../../api/api' | ||
| 28 | - export default { | ||
| 29 | - name: "memberNum", | ||
| 30 | - data() { | ||
| 31 | - return { | ||
| 32 | - demo:'',//示例 总数 | ||
| 33 | - memberNumTotal:"",//会员总数html | ||
| 34 | - activeUserNum:'',//日活跃 | ||
| 35 | - newUerNum:'',//新增用户 | ||
| 36 | - name: '会员数' | ||
| 37 | - } | ||
| 38 | - }, | ||
| 39 | - mounted() { | ||
| 40 | - //会员总数 | ||
| 41 | - this.onLoad() | ||
| 42 | - }, | ||
| 43 | - methods: { | ||
| 44 | - ...mapActions([ | ||
| 45 | - 'transferParkingTotal' | ||
| 46 | - ]), | ||
| 47 | - onLoad() { | ||
| 48 | - memberAddress().then((response)=>{ | ||
| 49 | - let data = response.data.data | ||
| 50 | - this.registerNum = data.registerNum | ||
| 51 | - this.memberNumTotal = common.formatNumToStr(this.registerNum); | ||
| 52 | - this.activeUserNum = data.todayActiveNum | ||
| 53 | - this.newUerNum = data.todayRegisterNum | ||
| 54 | - this.$store.dispatch('transferParkingTotal', data.registerNum) | ||
| 55 | - //this.$store.dispatch('transferParkingTotal',10000); | ||
| 56 | - //this.transferParkingTotal( data.registerNum); | ||
| 57 | - console.log(this.$store.state.ParkingTotal) | ||
| 58 | - }).catch((response)=>{ | ||
| 59 | - console.log(response); | ||
| 60 | - }) | ||
| 61 | - } | ||
| 62 | - /* | ||
| 63 | - * 格式化会员总数 | ||
| 64 | - // * */ | ||
| 65 | - // formatNumToStr:function(){ | ||
| 66 | - // return common.formatNumToStr(this.$options.data().demo); | ||
| 67 | - // }, | 37 | +import {mapActions} from 'vuex' |
| 38 | +import common from '../../api/common'; | ||
| 39 | +import {memberAddress, memberAddressDY} from '../../api/api' | ||
| 40 | +// import axios from 'axios' | ||
| 41 | +export default { | ||
| 42 | + name: "memberNum", | ||
| 43 | + data() { | ||
| 44 | + return { | ||
| 45 | + demo: '',//示例 总数 | ||
| 46 | + memberNumTotal: "",//会员总数html | ||
| 47 | + activeUserNum: '',//日活跃 | ||
| 48 | + newUerNum: '',//新增用户 | ||
| 49 | + name: '会员数' | ||
| 50 | + } | ||
| 51 | + }, | ||
| 52 | + mounted() { | ||
| 53 | + //会员总数 | ||
| 54 | + this.onLoad() | ||
| 55 | + }, | ||
| 56 | + methods: { | ||
| 57 | + ...mapActions([ | ||
| 58 | + 'transferParkingTotal' | ||
| 59 | + ]), | ||
| 60 | + onLoad() { | ||
| 61 | + // Promise.all([memberAddress(), memberAddressDY()]).then(function(values) { | ||
| 62 | + // console.log(values);//values为一个数组 | ||
| 63 | + // ///进行你的下一步操作 | ||
| 64 | + // }); | ||
| 65 | + this.$axios.all([memberAddress(), memberAddressDY()]) | ||
| 66 | + .then(this.$axios.spread((acctWX, acctDY) => { | ||
| 67 | + let WXdata = acctWX.data.data | ||
| 68 | + let DYdata = acctDY.data.data | ||
| 69 | + this.registerNum = WXdata.registerNum+DYdata.registerNum | ||
| 70 | + this.activeUserNum = WXdata.todayActiveNum+DYdata.todayActiveNum | ||
| 71 | + this.newUerNum = WXdata.todayRegisterNum+DYdata.todayRegisterNum | ||
| 72 | + this.memberNumTotal = common.formatNumToStr(this.registerNum) | ||
| 73 | + this.$store.dispatch('transferParkingTotal', this.registerNum) | ||
| 74 | + })) | ||
| 68 | 75 | ||
| 69 | - } | ||
| 70 | } | 76 | } |
| 71 | -</script> | 77 | + /* |
| 78 | + * 格式化会员总数 | ||
| 79 | + // * */ | ||
| 80 | + // formatNumToStr:function(){ | ||
| 81 | + // return common.formatNumToStr(this.$options.data().demo); | ||
| 82 | + // }, | ||
| 72 | 83 | ||
| 73 | -<style scoped lang="scss"> | ||
| 74 | - .app-memberNumBox { | ||
| 75 | - width: 100%; | ||
| 76 | - .theme-card{ | ||
| 77 | - height: 100%; | ||
| 78 | - } | ||
| 79 | - .topBox,.bottomBox{ | ||
| 80 | - border:0px solid red; | ||
| 81 | - } | ||
| 82 | - .memberNumTb{ | ||
| 83 | - margin: 0 auto; | ||
| 84 | - width: 100%; | ||
| 85 | - height: 100%; | ||
| 86 | } | 84 | } |
| 87 | - .memberNumTb >tr{ | ||
| 88 | - width: 100%;height: 100%; | ||
| 89 | - } | ||
| 90 | - .memberNumTb >tr>td{ | ||
| 91 | - height: 100%;width:33.333%; | ||
| 92 | - } | ||
| 93 | - /*.memberNumTb >tr>td:first-child{*/ | ||
| 94 | - /*width:25%;*/ | ||
| 95 | - /*}*/ | ||
| 96 | - /*.memberNumTb >tr>td:last-child{*/ | ||
| 97 | - /*width:25%;*/ | ||
| 98 | - /*}*/ | ||
| 99 | - .memberNumTb >tr>td:nth-child(2){ | ||
| 100 | - vertical-align: middle; | ||
| 101 | - text-align: center; | ||
| 102 | - position:relative; | 85 | +} |
| 86 | +</script> | ||
| 103 | 87 | ||
| 104 | - } | ||
| 105 | - .memberNumTb >tr>td:first-child{ | ||
| 106 | - vertical-align: middle; | ||
| 107 | - text-align: right; | ||
| 108 | - padding-right: 5px; | ||
| 109 | - } | ||
| 110 | - .memberNumTb >tr>td:last-child{ | ||
| 111 | - vertical-align: middle; | ||
| 112 | - text-align: left; | ||
| 113 | - padding-left:5px; | ||
| 114 | - } | ||
| 115 | - .memberRadar{ | ||
| 116 | - background: url(../../images/com/memberRadar.png) no-repeat; | ||
| 117 | - background-size: 100% 100%; | ||
| 118 | - width:90%; | ||
| 119 | - height:0; | ||
| 120 | - padding-bottom: 90%; | ||
| 121 | - margin: auto; | 88 | +<style scoped lang="scss"> |
| 89 | + .app-memberNumBox { | ||
| 90 | + width: 100%; | ||
| 91 | + .theme-card { | ||
| 92 | + height: 100%; | ||
| 93 | + } | ||
| 94 | + .topBox, .bottomBox { | ||
| 95 | + border: 0px solid red; | ||
| 96 | + } | ||
| 97 | + .memberNumTb { | ||
| 98 | + margin: 0 auto; | ||
| 99 | + width: 100%; | ||
| 100 | + height: 100%; | ||
| 101 | + } | ||
| 102 | + .memberNumTb > tr { | ||
| 103 | + width: 100%; | ||
| 104 | + height: 100%; | ||
| 105 | + } | ||
| 106 | + .memberNumTb > tr > td { | ||
| 107 | + height: 100%; | ||
| 108 | + width: 33.333%; | ||
| 109 | + } | ||
| 110 | + /*.memberNumTb >tr>td:first-child{*/ | ||
| 111 | + /*width:25%;*/ | ||
| 112 | + /*}*/ | ||
| 113 | + /*.memberNumTb >tr>td:last-child{*/ | ||
| 114 | + /*width:25%;*/ | ||
| 115 | + /*}*/ | ||
| 116 | + .memberNumTb > tr > td:nth-child(2) { | ||
| 117 | + vertical-align: middle; | ||
| 118 | + text-align: center; | ||
| 119 | + position: relative; | ||
| 122 | 120 | ||
| 123 | - background-position: center center; | ||
| 124 | - background-repeat: no-repeat; | ||
| 125 | - background-size: cover; | ||
| 126 | - -webkit-background-size: cover; | ||
| 127 | - -moz-background-size: cover; | ||
| 128 | - } | ||
| 129 | - .memberRadarBox:before{ | ||
| 130 | - content: " "; | ||
| 131 | - display: block; | ||
| 132 | - height: 30px; | ||
| 133 | - width: 30px; | ||
| 134 | - background: url(../../images/com/memberactiveUser.svg) no-repeat; | ||
| 135 | - background-size: 100%; | ||
| 136 | - position: absolute; | ||
| 137 | - left: 0px; | ||
| 138 | - top: 15px; | ||
| 139 | - z-index: 8; | ||
| 140 | - } | ||
| 141 | - .memberRadarBox:after{ | ||
| 142 | - content: " "; | ||
| 143 | - display: block; | ||
| 144 | - height: 30px; | ||
| 145 | - width: 30px; | ||
| 146 | - background: url(../../images/com/membernewUer.svg) no-repeat; | ||
| 147 | - background-size: 100%; | ||
| 148 | - position: absolute; | ||
| 149 | - right: 0px; | ||
| 150 | - bottom: 15px; | ||
| 151 | - z-index: 8; | ||
| 152 | - } | ||
| 153 | - .activeUserNum{ | ||
| 154 | - background-image: -webkit-linear-gradient(bottom, #67F967, #05C405); | ||
| 155 | - -webkit-background-clip:text; | ||
| 156 | - -webkit-text-fill-color:transparent; | ||
| 157 | - font-size: 24px; | ||
| 158 | - } | ||
| 159 | - .newUerNum{ | ||
| 160 | - background-image: -webkit-linear-gradient(bottom, #FFBA00, #FF8100); | ||
| 161 | - -webkit-background-clip:text; | ||
| 162 | - -webkit-text-fill-color:transparent; | ||
| 163 | - font-size: 24px; | ||
| 164 | - } | ||
| 165 | - .activeUserText,.newUerNumText{ | ||
| 166 | - font-size: 12px; | ||
| 167 | - } | ||
| 168 | - .activeUserText:after{ | ||
| 169 | - content: " "; | ||
| 170 | - display: inline-block; | ||
| 171 | - height: 12px; | ||
| 172 | - width: 13px; | ||
| 173 | - background: url(../../images/com/activeUser.png) no-repeat; | ||
| 174 | - background-size: 100%; | ||
| 175 | - margin-left:5px; | ||
| 176 | - } | ||
| 177 | - .newUerNumText:before{ | ||
| 178 | - content: " "; | ||
| 179 | - display: inline-block; | ||
| 180 | - height: 12px; | ||
| 181 | - width: 13px; | ||
| 182 | - background: url(../../images/com/newUser.png) no-repeat; | ||
| 183 | - background-size: 100%; | ||
| 184 | - margin-right:5px; | ||
| 185 | - } | 121 | + } |
| 122 | + .memberNumTb > tr > td:first-child { | ||
| 123 | + vertical-align: middle; | ||
| 124 | + text-align: right; | ||
| 125 | + padding-right: 5px; | ||
| 126 | + } | ||
| 127 | + .memberNumTb > tr > td:last-child { | ||
| 128 | + vertical-align: middle; | ||
| 129 | + text-align: left; | ||
| 130 | + padding-left: 5px; | ||
| 131 | + } | ||
| 132 | + .memberRadar { | ||
| 133 | + background: url(../../images/com/memberRadar.png) no-repeat; | ||
| 134 | + background-size: 100% 100%; | ||
| 135 | + width: 90%; | ||
| 136 | + height: 0; | ||
| 137 | + padding-bottom: 90%; | ||
| 138 | + margin: auto; | ||
| 186 | 139 | ||
| 187 | - } | 140 | + background-position: center center; |
| 141 | + background-repeat: no-repeat; | ||
| 142 | + background-size: cover; | ||
| 143 | + -webkit-background-size: cover; | ||
| 144 | + -moz-background-size: cover; | ||
| 145 | + } | ||
| 146 | + .memberRadarBox:before { | ||
| 147 | + content: " "; | ||
| 148 | + display: block; | ||
| 149 | + height: 30px; | ||
| 150 | + width: 30px; | ||
| 151 | + background: url(../../images/com/memberactiveUser.svg) no-repeat; | ||
| 152 | + background-size: 100%; | ||
| 153 | + position: absolute; | ||
| 154 | + left: 0px; | ||
| 155 | + top: 15px; | ||
| 156 | + z-index: 8; | ||
| 157 | + } | ||
| 158 | + .memberRadarBox:after { | ||
| 159 | + content: " "; | ||
| 160 | + display: block; | ||
| 161 | + height: 30px; | ||
| 162 | + width: 30px; | ||
| 163 | + background: url(../../images/com/membernewUer.svg) no-repeat; | ||
| 164 | + background-size: 100%; | ||
| 165 | + position: absolute; | ||
| 166 | + right: 0px; | ||
| 167 | + bottom: 15px; | ||
| 168 | + z-index: 8; | ||
| 169 | + } | ||
| 170 | + .activeUserNum { | ||
| 171 | + background-image: -webkit-linear-gradient(bottom, #67F967, #05C405); | ||
| 172 | + -webkit-background-clip: text; | ||
| 173 | + -webkit-text-fill-color: transparent; | ||
| 174 | + font-size: 24px; | ||
| 175 | + } | ||
| 176 | + .newUerNum { | ||
| 177 | + background-image: -webkit-linear-gradient(bottom, #FFBA00, #FF8100); | ||
| 178 | + -webkit-background-clip: text; | ||
| 179 | + -webkit-text-fill-color: transparent; | ||
| 180 | + font-size: 24px; | ||
| 181 | + } | ||
| 182 | + .activeUserText, .newUerNumText { | ||
| 183 | + font-size: 12px; | ||
| 184 | + } | ||
| 185 | + .activeUserText:after { | ||
| 186 | + content: " "; | ||
| 187 | + display: inline-block; | ||
| 188 | + height: 12px; | ||
| 189 | + width: 13px; | ||
| 190 | + background: url(../../images/com/activeUser.png) no-repeat; | ||
| 191 | + background-size: 100%; | ||
| 192 | + margin-left: 5px; | ||
| 193 | + } | ||
| 194 | + .newUerNumText:before { | ||
| 195 | + content: " "; | ||
| 196 | + display: inline-block; | ||
| 197 | + height: 12px; | ||
| 198 | + width: 13px; | ||
| 199 | + background: url(../../images/com/newUser.png) no-repeat; | ||
| 200 | + background-size: 100%; | ||
| 201 | + margin-right: 5px; | ||
| 202 | + } | ||
| 203 | + | ||
| 204 | + } | ||
| 188 | </style> | 205 | </style> |
src/components/orderMessage/index.vue
| @@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
| 24 | </template> | 24 | </template> |
| 25 | 25 | ||
| 26 | <script> | 26 | <script> |
| 27 | - import { msgAddress } from '../../api/api' | 27 | + import { msgAddress, msgAddressDY } from '../../api/api' |
| 28 | export default { | 28 | export default { |
| 29 | name: "orderMessage", | 29 | name: "orderMessage", |
| 30 | data() { | 30 | data() { |
| @@ -47,20 +47,40 @@ | @@ -47,20 +47,40 @@ | ||
| 47 | }, | 47 | }, |
| 48 | methods: { | 48 | methods: { |
| 49 | onLoad() { | 49 | onLoad() { |
| 50 | - msgAddress({ | ||
| 51 | - orgIds: this.GLOBAL.paramsvariables | ||
| 52 | - }).then((response)=>{ | ||
| 53 | - let data = response.data.data | ||
| 54 | - console.log(data) | ||
| 55 | - this.list = data; | 50 | + // msgAddress({ |
| 51 | + // orgIds: this.GLOBAL.paramsvariables | ||
| 52 | + // }).then((response)=>{ | ||
| 53 | + // let data = response.data.data | ||
| 54 | + // console.log(data) | ||
| 55 | + // this.list = data; | ||
| 56 | + // var that = this | ||
| 57 | + // this.intnum = setInterval(_ => { | ||
| 58 | + // that.list.push(that.list[this.activeIndex]); | ||
| 59 | + // this.activeIndex += 1; | ||
| 60 | + // }, 1000); | ||
| 61 | + // }).catch((response)=>{ | ||
| 62 | + // console.log(response); | ||
| 63 | + // }) | ||
| 64 | + | ||
| 65 | + | ||
| 66 | + this.$axios.all( | ||
| 67 | + [ | ||
| 68 | + msgAddress({ orgIds: this.GLOBAL.paramsvariables}), | ||
| 69 | + msgAddressDY({ orgIds: this.GLOBAL.paramsvariables}) | ||
| 70 | + ] | ||
| 71 | + ) | ||
| 72 | + .then(this.$axios.spread((acctWX, acctDY) => { | ||
| 73 | + let WXdata = acctWX.data.data | ||
| 74 | + let DYdata = acctDY.data.data | ||
| 75 | + this.list = WXdata.concat(DYdata); | ||
| 56 | var that = this | 76 | var that = this |
| 57 | this.intnum = setInterval(_ => { | 77 | this.intnum = setInterval(_ => { |
| 58 | that.list.push(that.list[this.activeIndex]); | 78 | that.list.push(that.list[this.activeIndex]); |
| 59 | this.activeIndex += 1; | 79 | this.activeIndex += 1; |
| 60 | }, 1000); | 80 | }, 1000); |
| 61 | - }).catch((response)=>{ | ||
| 62 | - console.log(response); | ||
| 63 | - }) | 81 | + |
| 82 | + | ||
| 83 | + })) | ||
| 64 | }, | 84 | }, |
| 65 | scroll() { | 85 | scroll() { |
| 66 | this.animate = !this.animate; | 86 | this.animate = !this.animate; |
src/components/tollman/index.vue
| @@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
| 27 | 27 | ||
| 28 | <script> | 28 | <script> |
| 29 | import common from '../../api/common'; | 29 | import common from '../../api/common'; |
| 30 | - import { tollmanAddress } from '../../api/api' | 30 | + import { tollmanAddress, tollmanAddressDY } from '../../api/api' |
| 31 | export default { | 31 | export default { |
| 32 | name: "tollman", | 32 | name: "tollman", |
| 33 | data() { | 33 | data() { |
| @@ -49,17 +49,36 @@ | @@ -49,17 +49,36 @@ | ||
| 49 | * 格式化会员总数 | 49 | * 格式化会员总数 |
| 50 | * */ | 50 | * */ |
| 51 | onLoad() { | 51 | onLoad() { |
| 52 | - tollmanAddress({ | ||
| 53 | - orgIds: this.GLOBAL.paramsvariables | ||
| 54 | - }).then((response)=>{ | ||
| 55 | - let data = response.data.data | ||
| 56 | - this.tollmanTotal = data.allTollCollector | 52 | + // tollmanAddress({ |
| 53 | + // orgIds: this.GLOBAL.paramsvariables | ||
| 54 | + // }).then((response)=>{ | ||
| 55 | + // let data = response.data.data | ||
| 56 | + // this.tollmanTotal = data.allTollCollector | ||
| 57 | + // this.tollmanTotal = common.formatNumToStr(this.tollmanTotal); | ||
| 58 | + // this.onDutyNum = data.signInTollCollector | ||
| 59 | + // this.noDutyNum = data.unSignInTollCollector | ||
| 60 | + // }).catch((response)=>{ | ||
| 61 | + // console.log(response); | ||
| 62 | + // }) | ||
| 63 | + | ||
| 64 | + | ||
| 65 | + this.$axios.all( | ||
| 66 | + [ | ||
| 67 | + tollmanAddress({ orgIds: this.GLOBAL.paramsvariables}), | ||
| 68 | + tollmanAddressDY({ orgIds: this.GLOBAL.paramsvariables}) | ||
| 69 | + ] | ||
| 70 | + ) | ||
| 71 | + .then(this.$axios.spread((acctWX, acctDY) => { | ||
| 72 | + console.log(acctWX) | ||
| 73 | + console.log(acctDY) | ||
| 74 | + let WXdata = acctWX.data.data | ||
| 75 | + let DYdata = acctDY.data.data | ||
| 76 | + this.tollmanTotal = WXdata.allTollCollector+DYdata.allTollCollector | ||
| 57 | this.tollmanTotal = common.formatNumToStr(this.tollmanTotal); | 77 | this.tollmanTotal = common.formatNumToStr(this.tollmanTotal); |
| 58 | - this.onDutyNum = data.signInTollCollector | ||
| 59 | - this.noDutyNum = data.unSignInTollCollector | ||
| 60 | - }).catch((response)=>{ | ||
| 61 | - console.log(response); | ||
| 62 | - }) | 78 | + this.onDutyNum = WXdata.signInTollCollector+DYdata.signInTollCollector |
| 79 | + this.noDutyNum = WXdata.unSignInTollCollector+DYdata.unSignInTollCollector | ||
| 80 | + | ||
| 81 | + })) | ||
| 63 | } | 82 | } |
| 64 | }, | 83 | }, |
| 65 | 84 |
src/components/weekAndDay/uDay.vue
| 1 | <template> | 1 | <template> |
| 2 | - <div class="app-uDayBox"> | ||
| 3 | - <div class="theme-card2"> | ||
| 4 | - <div class="title"><span>今日车流量</span></div> | ||
| 5 | - <div class="content" style="padding: 10px;box-sizing:border-box;padding-left: 0px;"> | ||
| 6 | - <div class="contentBox"> | ||
| 7 | - <div class="lineChart"></div> | 2 | + <div class="app-uDayBox"> |
| 3 | + <div class="theme-card2"> | ||
| 4 | + <div class="title"><span>今日车流量</span></div> | ||
| 5 | + <div class="content" style="padding: 10px;box-sizing:border-box;padding-left: 0px;"> | ||
| 6 | + <div class="contentBox"> | ||
| 7 | + <div class="lineChart"></div> | ||
| 8 | + </div> | ||
| 9 | + </div> | ||
| 8 | </div> | 10 | </div> |
| 9 | - </div> | ||
| 10 | </div> | 11 | </div> |
| 11 | - </div> | ||
| 12 | </template> | 12 | </template> |
| 13 | 13 | ||
| 14 | <script> | 14 | <script> |
| 15 | - import echarts from 'echarts' | ||
| 16 | - import { dayAddress } from '../../api/api' | ||
| 17 | - export default { | ||
| 18 | - name: "uDay", | ||
| 19 | - data() { | ||
| 20 | - return { | ||
| 21 | - name: '进出场折线图', | ||
| 22 | - lineChart: {}, | 15 | +import echarts from 'echarts' |
| 16 | +import {dayAddress, dayAddressDY} from '../../api/api' | ||
| 17 | + | ||
| 18 | +export default { | ||
| 19 | + name: "uDay", | ||
| 20 | + data() { | ||
| 21 | + return { | ||
| 22 | + name: '进出场折线图', | ||
| 23 | + lineChart: {}, | ||
| 24 | + } | ||
| 25 | + }, | ||
| 26 | + /* | ||
| 27 | + * 进出场折线图 | ||
| 28 | + * */ | ||
| 29 | + mounted() { | ||
| 30 | + this.onLoad() | ||
| 31 | + }, | ||
| 32 | + methods: { | ||
| 33 | + onLoad() { | ||
| 34 | + // dayAddress({ | ||
| 35 | + // orgIds: this.GLOBAL.paramsvariables | ||
| 36 | + // }).then((response)=>{ | ||
| 37 | + // let data = response.data.data | ||
| 38 | + // let xData=[],inNum=[],outNum=[] | ||
| 39 | + // for(let i=0;i<data.length;i++){ | ||
| 40 | + // xData.push(data[i].queryDate) | ||
| 41 | + // inNum.push(data[i].inNum) | ||
| 42 | + // outNum.push(data[i].outNum) | ||
| 43 | + // } | ||
| 44 | + // | ||
| 45 | + // this.lineChart=this.createLine(xData,inNum,outNum); | ||
| 46 | + // window.addEventListener('resize', function() { | ||
| 47 | + // this.lineChart.resize() | ||
| 48 | + // }.bind(this)); | ||
| 49 | + // }).catch((response)=>{ | ||
| 50 | + // console.log(response); | ||
| 51 | + // }) | ||
| 52 | + | ||
| 53 | + this.$axios.all( | ||
| 54 | + [ | ||
| 55 | + dayAddress({ orgIds: this.GLOBAL.paramsvariables }), | ||
| 56 | + dayAddressDY({ orgIds: this.GLOBAL.paramsvariables }) | ||
| 57 | + ] | ||
| 58 | + ) | ||
| 59 | + .then(this.$axios.spread((acctWX, acctDY) => { | ||
| 60 | + let WXdata = acctWX.data.data | ||
| 61 | + let DYdata = acctDY.data.data | ||
| 62 | + let xData = [], inNum = [], outNum = [] | ||
| 63 | + for (let i = 0; i < WXdata.length; i++) { | ||
| 64 | + xData.push(WXdata[i].queryDate) | ||
| 65 | + inNum.push(WXdata[i].inNum + DYdata[i].inNum) | ||
| 66 | + outNum.push(WXdata[i].outNum + DYdata[i].outNum) | ||
| 67 | + //lastInNum = WXdata[WXdata.length-1].inNum+DYdata[WXdata.length-1].inNum | ||
| 23 | } | 68 | } |
| 24 | - }, | ||
| 25 | - /* | ||
| 26 | - * 进出场折线图 | ||
| 27 | - * */ | ||
| 28 | - mounted() { | ||
| 29 | - this.onLoad() | ||
| 30 | - }, | ||
| 31 | - methods: { | ||
| 32 | - onLoad() { | ||
| 33 | - dayAddress({ | ||
| 34 | - orgIds: this.GLOBAL.paramsvariables | ||
| 35 | - }).then((response)=>{ | ||
| 36 | - let data = response.data.data | ||
| 37 | - let xData=[],inNum=[],outNum=[] | ||
| 38 | - for(let i=0;i<data.length;i++){ | ||
| 39 | - xData.push(data[i].queryDate) | ||
| 40 | - inNum.push(data[i].inNum) | ||
| 41 | - outNum.push(data[i].outNum) | 69 | + //this.$store.dispatch('transferOrderTotal',lastInNum) |
| 70 | + this.weekChart = this.createLine(xData, inNum, outNum); | ||
| 71 | + window.addEventListener('resize', function () { | ||
| 72 | + this.weekChart.resize() | ||
| 73 | + }.bind(this)); | ||
| 74 | + })) | ||
| 75 | + }, | ||
| 76 | + createLine(xAxis_data, series_in, series_out) { | ||
| 77 | + // 基于准备好的dom,初始化echarts实例 | ||
| 78 | + let lineChart = echarts.init(document.querySelector('.lineChart')); | ||
| 79 | + let axisLineColor = "#10377c"; | ||
| 80 | + let axisLabelColor = "#7c8799"; | ||
| 81 | + let legend_data = ['进场', '出场']; | ||
| 82 | + // let xAxis_data=['06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00']; | ||
| 83 | + // let series_in=[220, 182, 191, 134, 150, 120,100]; | ||
| 84 | + // let series_out=[120, 82, 125, 145, 122, 191,150]; | ||
| 85 | + const option = { | ||
| 86 | + grid: { | ||
| 87 | + top: 13, left: 10, | ||
| 88 | + right: 10, bottom: 20, | ||
| 89 | + containLabel: true | ||
| 90 | + }, | ||
| 91 | + tooltip: { | ||
| 92 | + trigger: 'axis', | ||
| 93 | + axisPointer: { | ||
| 94 | + lineStyle: { | ||
| 95 | + color: '#072d6e', | ||
| 96 | + fontSize: 12, | ||
| 42 | } | 97 | } |
| 43 | - | ||
| 44 | - this.lineChart=this.createLine(xData,inNum,outNum); | ||
| 45 | - window.addEventListener('resize', function() { | ||
| 46 | - this.lineChart.resize() | ||
| 47 | - }.bind(this)); | ||
| 48 | - }).catch((response)=>{ | ||
| 49 | - console.log(response); | ||
| 50 | - }) | 98 | + }, |
| 99 | + formatter: this._formatTooltip | ||
| 51 | }, | 100 | }, |
| 52 | - createLine(xAxis_data,series_in,series_out){ | ||
| 53 | - // 基于准备好的dom,初始化echarts实例 | ||
| 54 | - let lineChart = echarts.init(document.querySelector('.lineChart')); | ||
| 55 | - let axisLineColor="#10377c"; | ||
| 56 | - let axisLabelColor="#7c8799"; | ||
| 57 | - let legend_data=['进场', '出场']; | ||
| 58 | - // let xAxis_data=['06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00']; | ||
| 59 | - // let series_in=[220, 182, 191, 134, 150, 120,100]; | ||
| 60 | - // let series_out=[120, 82, 125, 145, 122, 191,150]; | ||
| 61 | - const option={ | ||
| 62 | - grid: { | ||
| 63 | - top: 13,left: 10, | ||
| 64 | - right: 10,bottom: 20, | ||
| 65 | - containLabel: true | ||
| 66 | - }, | ||
| 67 | - tooltip: { | ||
| 68 | - trigger: 'axis', | ||
| 69 | - axisPointer: { | ||
| 70 | - lineStyle: { | ||
| 71 | - color: '#072d6e', | ||
| 72 | - fontSize: 12, | ||
| 73 | - } | ||
| 74 | - }, | ||
| 75 | - formatter:this._formatTooltip | ||
| 76 | - }, | ||
| 77 | - legend: { | ||
| 78 | - itemWidth: 15,itemHeight: 8, | ||
| 79 | - itemGap: 13, | ||
| 80 | - data:legend_data ,bottom: 0, | ||
| 81 | - textStyle: {fontSize: 12,color: '#59AAF7'} | 101 | + legend: { |
| 102 | + itemWidth: 15, itemHeight: 8, | ||
| 103 | + itemGap: 13, | ||
| 104 | + data: legend_data, bottom: 0, | ||
| 105 | + textStyle: { fontSize: 12, color: '#59AAF7' } | ||
| 106 | + }, | ||
| 107 | + xAxis: [{ | ||
| 108 | + type: "category", | ||
| 109 | + boundaryGap: true, | ||
| 110 | + axisTick: { show: false }, | ||
| 111 | + axisLine: { | ||
| 112 | + lineStyle: { color: axisLineColor } | ||
| 113 | + }, | ||
| 114 | + axisLabel: { | ||
| 115 | + margin: 5, | ||
| 116 | + textStyle: { | ||
| 117 | + color: axisLabelColor, fontSize: 12 | ||
| 118 | + } | ||
| 119 | + }, | ||
| 120 | + splitLine: { | ||
| 121 | + lineStyle: { color: '#57617B' } | ||
| 122 | + }, | ||
| 123 | + data: xAxis_data | ||
| 124 | + }], | ||
| 125 | + yAxis: [{ | ||
| 126 | + type: 'value', | ||
| 127 | + //name: '单位(%)', | ||
| 128 | + axisTick: { show: false }, | ||
| 129 | + axisLine: { lineStyle: { color: axisLineColor } }, | ||
| 130 | + axisLabel: { | ||
| 131 | + margin: 5, | ||
| 132 | + textStyle: { color: axisLabelColor, fontSize: 12 } | ||
| 133 | + }, | ||
| 134 | + splitLine: { lineStyle: { color: '#10377c' } } | ||
| 135 | + }], | ||
| 136 | + series: [ | ||
| 137 | + { | ||
| 138 | + name: '进场', type: 'line', symbol: 'circle', symbolSize: 5, | ||
| 139 | + // smooth: true,// showSymbol: false, | ||
| 140 | + lineStyle: { normal: { width: 0.8 } }, | ||
| 141 | + itemStyle: { | ||
| 142 | + normal: { | ||
| 143 | + color: 'rgb(255,177,48)', | ||
| 144 | + borderColor: 'rgba(216,152,57,0.17)', | ||
| 145 | + borderWidth: 8 | ||
| 146 | + } | ||
| 82 | }, | 147 | }, |
| 83 | - xAxis: [{ | ||
| 84 | - type: "category", | ||
| 85 | - boundaryGap: true, | ||
| 86 | - axisTick: {show: false}, | ||
| 87 | - axisLine: { | ||
| 88 | - lineStyle: {color: axisLineColor} | ||
| 89 | - }, | ||
| 90 | - axisLabel: { | ||
| 91 | - margin: 5, | ||
| 92 | - textStyle: { | ||
| 93 | - color:axisLabelColor,fontSize: 12 | ||
| 94 | - } | ||
| 95 | - }, | ||
| 96 | - splitLine: { | ||
| 97 | - lineStyle: {color: '#57617B'} | ||
| 98 | - }, | ||
| 99 | - data: xAxis_data | ||
| 100 | - }], | ||
| 101 | - yAxis: [{ | ||
| 102 | - type: 'value', | ||
| 103 | - //name: '单位(%)', | ||
| 104 | - axisTick: {show: false}, | ||
| 105 | - axisLine: {lineStyle: { color: axisLineColor}}, | ||
| 106 | - axisLabel: { | ||
| 107 | - margin: 5, | ||
| 108 | - textStyle: {color:axisLabelColor,fontSize: 12} | ||
| 109 | - }, | ||
| 110 | - splitLine: {lineStyle: {color: '#10377c'}} | ||
| 111 | - }], | ||
| 112 | - series: [ | ||
| 113 | - { | ||
| 114 | - name: '进场',type: 'line',symbol: 'circle',symbolSize: 5, | ||
| 115 | - // smooth: true,// showSymbol: false, | ||
| 116 | - lineStyle: {normal: { width: 0.8}}, | ||
| 117 | - itemStyle: { | ||
| 118 | - normal: { | ||
| 119 | - color: 'rgb(255,177,48)', | ||
| 120 | - borderColor: 'rgba(216,152,57,0.17)', | ||
| 121 | - borderWidth: 8 | ||
| 122 | - } | ||
| 123 | - }, | ||
| 124 | - data:series_in//[220, 182, 191, 134, 150, 120] | ||
| 125 | - }, | ||
| 126 | - { | ||
| 127 | - name: '出场',type: 'line',symbol: 'circle',symbolSize: 5, | ||
| 128 | - // showSymbol: false, // smooth: true, | ||
| 129 | - lineStyle: {normal: { width: 0.8}}, | ||
| 130 | - itemStyle: { | ||
| 131 | - normal: { | ||
| 132 | - color: 'rgb(8,185,252)', | ||
| 133 | - borderColor: 'rgba(8,185,252,0.2)', | ||
| 134 | - borderWidth: 8 | ||
| 135 | - } | ||
| 136 | - }, | ||
| 137 | - data: series_out | 148 | + data: series_in//[220, 182, 191, 134, 150, 120] |
| 149 | + }, | ||
| 150 | + { | ||
| 151 | + name: '出场', type: 'line', symbol: 'circle', symbolSize: 5, | ||
| 152 | + // showSymbol: false, // smooth: true, | ||
| 153 | + lineStyle: { normal: { width: 0.8 } }, | ||
| 154 | + itemStyle: { | ||
| 155 | + normal: { | ||
| 156 | + color: 'rgb(8,185,252)', | ||
| 157 | + borderColor: 'rgba(8,185,252,0.2)', | ||
| 158 | + borderWidth: 8 | ||
| 138 | } | 159 | } |
| 139 | - ] | ||
| 140 | - }; | ||
| 141 | - lineChart.setOption(option); | ||
| 142 | - return lineChart; | ||
| 143 | - }, | ||
| 144 | - _formatTooltip:function(ticket,html){ | ||
| 145 | - //debugger; | ||
| 146 | - let tmpHtml=ticket[0].name; | ||
| 147 | - for(let i=0;i<ticket.length;i++){ | ||
| 148 | - let tmpObj=ticket[i]; | ||
| 149 | - tmpHtml +="<br />"+tmpObj.seriesName+" : "+tmpObj.data+" (辆)"; | 160 | + }, |
| 161 | + data: series_out | ||
| 150 | } | 162 | } |
| 151 | - return tmpHtml; | ||
| 152 | - } | ||
| 153 | - }, | ||
| 154 | - | 163 | + ] |
| 164 | + }; | ||
| 165 | + lineChart.setOption(option); | ||
| 166 | + return lineChart; | ||
| 167 | + }, | ||
| 168 | + _formatTooltip: function (ticket, html) { | ||
| 169 | + //debugger; | ||
| 170 | + let tmpHtml = ticket[0].name; | ||
| 171 | + for (let i = 0; i < ticket.length; i++) { | ||
| 172 | + let tmpObj = ticket[i]; | ||
| 173 | + tmpHtml += "<br />" + tmpObj.seriesName + " : " + tmpObj.data + " (辆)"; | ||
| 174 | + } | ||
| 175 | + return tmpHtml; | ||
| 155 | } | 176 | } |
| 177 | + }, | ||
| 178 | + | ||
| 179 | +} | ||
| 156 | </script> | 180 | </script> |
| 157 | 181 | ||
| 158 | -<style scoped lang="scss"> | ||
| 159 | - .app-uDayBox { | ||
| 160 | - width: 100%; | ||
| 161 | - .theme-card2{ | ||
| 162 | - height: 100%; | ||
| 163 | - } | ||
| 164 | - .lineChart{ | ||
| 165 | - position: absolute; | ||
| 166 | - margin:auto; | ||
| 167 | - top:0; | ||
| 168 | - bottom: 0; | ||
| 169 | - left:0; | ||
| 170 | - width: 100%; | ||
| 171 | - height: 100%; | 182 | +<style scoped lang="scss"> |
| 183 | + .app-uDayBox { | ||
| 184 | + width: 100%; | ||
| 185 | + .theme-card2 { | ||
| 186 | + height: 100%; | ||
| 187 | + } | ||
| 188 | + .lineChart { | ||
| 189 | + position: absolute; | ||
| 190 | + margin: auto; | ||
| 191 | + top: 0; | ||
| 192 | + bottom: 0; | ||
| 193 | + left: 0; | ||
| 194 | + width: 100%; | ||
| 195 | + height: 100%; | ||
| 196 | + } | ||
| 197 | + .contentBox { | ||
| 198 | + background: url(../../images/com/border.svg) no-repeat; | ||
| 199 | + background-size: 100% 100%; | ||
| 200 | + width: 100%; | ||
| 201 | + height: 100%; | ||
| 202 | + position: relative; | ||
| 203 | + } | ||
| 172 | } | 204 | } |
| 173 | - .contentBox{ | ||
| 174 | - background: url(../../images/com/border.svg) no-repeat; | ||
| 175 | - background-size: 100% 100%; | ||
| 176 | - width: 100%; | ||
| 177 | - height: 100%; | ||
| 178 | - position: relative; | ||
| 179 | - } | ||
| 180 | - } | ||
| 181 | </style> | 205 | </style> |
src/components/weekAndDay/uWeek.vue
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | 14 | ||
| 15 | <script> | 15 | <script> |
| 16 | import echarts from 'echarts' | 16 | import echarts from 'echarts' |
| 17 | - import { weekAddress } from '../../api/api' | 17 | + import { weekAddress, weekAddressDY } from '../../api/api' |
| 18 | export default { | 18 | export default { |
| 19 | name: "uWeek", | 19 | name: "uWeek", |
| 20 | data() { | 20 | data() { |
| @@ -28,25 +28,29 @@ | @@ -28,25 +28,29 @@ | ||
| 28 | }, | 28 | }, |
| 29 | methods: { | 29 | methods: { |
| 30 | onLoad() { | 30 | onLoad() { |
| 31 | - weekAddress({ | ||
| 32 | - orgIds: this.GLOBAL.paramsvariables | ||
| 33 | - }).then((response)=>{ | ||
| 34 | - let data = response.data.data | 31 | + this.$axios.all( |
| 32 | + [ | ||
| 33 | + weekAddress({ orgIds: this.GLOBAL.paramsvariables}), | ||
| 34 | + weekAddressDY({ orgIds: this.GLOBAL.paramsvariables}) | ||
| 35 | + ] | ||
| 36 | + ) | ||
| 37 | + .then(this.$axios.spread((acctWX, acctDY) => { | ||
| 38 | + let WXdata = acctWX.data.data | ||
| 39 | + let DYdata = acctDY.data.data | ||
| 35 | let xData=[],inNum=[],outNum=[],lastInNum | 40 | let xData=[],inNum=[],outNum=[],lastInNum |
| 36 | - for(let i=0;i<data.length;i++){ | ||
| 37 | - xData.push(data[i].queryDate) | ||
| 38 | - inNum.push(data[i].inNum) | ||
| 39 | - outNum.push(data[i].outNum) | ||
| 40 | - lastInNum = data[data.length-1].inNum | 41 | + for(let i=0;i<WXdata.length;i++){ |
| 42 | + xData.push(WXdata[i].queryDate) | ||
| 43 | + inNum.push(WXdata[i].inNum+DYdata[i].inNum) | ||
| 44 | + outNum.push(WXdata[i].outNum+DYdata[i].outNum) | ||
| 45 | + lastInNum = WXdata[WXdata.length-1].inNum+DYdata[WXdata.length-1].inNum | ||
| 41 | } | 46 | } |
| 42 | this.$store.dispatch('transferOrderTotal',lastInNum) | 47 | this.$store.dispatch('transferOrderTotal',lastInNum) |
| 43 | this.weekChart=this.createLine(xData,inNum,outNum); | 48 | this.weekChart=this.createLine(xData,inNum,outNum); |
| 44 | window.addEventListener('resize', function() { | 49 | window.addEventListener('resize', function() { |
| 45 | this.weekChart.resize() | 50 | this.weekChart.resize() |
| 46 | }.bind(this)); | 51 | }.bind(this)); |
| 47 | - }).catch((response)=>{ | ||
| 48 | - console.log(response); | ||
| 49 | - }) | 52 | + |
| 53 | + })) | ||
| 50 | }, | 54 | }, |
| 51 | createLine(xAxis_data,series_in,series_out){ | 55 | createLine(xAxis_data,series_in,series_out){ |
| 52 | // 基于准备好的dom,初始化echarts实例 | 56 | // 基于准备好的dom,初始化echarts实例 |
src/main.js
| @@ -13,6 +13,8 @@ Vue.prototype.qs = Qs | @@ -13,6 +13,8 @@ Vue.prototype.qs = Qs | ||
| 13 | //import { powerRouter } from './router'; | 13 | //import { powerRouter } from './router'; |
| 14 | import store from './store'; | 14 | import store from './store'; |
| 15 | import ElementUI from 'element-ui' | 15 | import ElementUI from 'element-ui' |
| 16 | + | ||
| 17 | +Vue.prototype.$axios = axios | ||
| 16 | //import 'element-ui/lib/theme-chalk/index.css' | 18 | //import 'element-ui/lib/theme-chalk/index.css' |
| 17 | Vue.use(ElementUI) | 19 | Vue.use(ElementUI) |
| 18 | require('element-ui/lib/theme-chalk/index.css') | 20 | require('element-ui/lib/theme-chalk/index.css') |