Commit 74b5bee214a73adefe72b7545c71fa79ee0ad1b1

Authored by liuqimichale
1 parent 909d7e57

全局 接口参数

src/api/variables.js 0 → 100644
  1 +const paramsvariables = [10003,10005]
  2 +export default {paramsvariables}
src/components/berth/index.vue
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 name: "berth", 28 name: "berth",
29 data() { 29 data() {
30 return { 30 return {
31 - demo:'234567',//示例 31 + demo:'',//示例
32 berthTotal:"",//泊位总数 32 berthTotal:"",//泊位总数
33 free:12345,//空余 33 free:12345,//空余
34 have:23456,//占有 34 have:23456,//占有
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 }, 45 },
46 mounted() { 46 mounted() {
47 this.axios.post('urban/intelligence/berth/queryBerthStatisticByOrgIds',{ 47 this.axios.post('urban/intelligence/berth/queryBerthStatisticByOrgIds',{
48 - orgIds: [10003,10005] 48 + orgIds: this.GLOBAL.paramsvariables
49 }).then((response)=>{ 49 }).then((response)=>{
50 let data = response.data.data 50 let data = response.data.data
51 console.log(data) 51 console.log(data)
src/components/chinaMap/index.vue
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 }, 61 },
62 mounted() { 62 mounted() {
63 this.axios.post('urban/intelligence/park/queryParkNumStatisticByOrgIds',{ 63 this.axios.post('urban/intelligence/park/queryParkNumStatisticByOrgIds',{
64 - orgIds: [10003,10005] 64 + orgIds: this.GLOBAL.paramsvariables
65 }).then((response)=>{ 65 }).then((response)=>{
66 let data = response.data.data 66 let data = response.data.data
67 this.parkParams.endVal=data 67 this.parkParams.endVal=data
src/components/device/index.vue
@@ -97,7 +97,7 @@ @@ -97,7 +97,7 @@
97 }, 97 },
98 mounted() { 98 mounted() {
99 this.axios.post('urban/intelligence/device/queryDeviceStatistic',{ 99 this.axios.post('urban/intelligence/device/queryDeviceStatistic',{
100 - orgIds: [10003,10005] 100 + orgIds: this.GLOBAL.paramsvariables
101 }).then((response)=>{ 101 }).then((response)=>{
102 let data = response.data.data 102 let data = response.data.data
103 this.PDANum = data[0].num 103 this.PDANum = data[0].num
src/components/incomeOverview/index.vue
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 name: "incomeOverview", 23 name: "incomeOverview",
24 data() { 24 data() {
25 return { 25 return {
26 - demo:'123456',//示例 26 + demo:'',//示例
27 incomeTotal:"",//总收入 27 incomeTotal:"",//总收入
28 barChart: {},//柱状图 28 barChart: {},//柱状图
29 barChartOption:{ 29 barChartOption:{
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
39 }, 39 },
40 mounted() { 40 mounted() {
41 this.axios.post('urban/intelligence/income/queryIncomeStaByOrgIds',{ 41 this.axios.post('urban/intelligence/income/queryIncomeStaByOrgIds',{
42 - orgIds: [10003,10005] 42 + orgIds: this.GLOBAL.paramsvariables
43 }).then((response)=>{ 43 }).then((response)=>{
44 let data = response.data.data 44 let data = response.data.data
45 this.incomeTotal = data.totalPay 45 this.incomeTotal = data.totalPay
src/components/memberNum/index.vue
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 name: "memberNum", 29 name: "memberNum",
30 data() { 30 data() {
31 return { 31 return {
32 - demo:'219743',//示例 总数 32 + demo:'',//示例 总数
33 memberNumTotal:"",//会员总数html 33 memberNumTotal:"",//会员总数html
34 activeUserNum:23454,//日活跃 34 activeUserNum:23454,//日活跃
35 newUerNum:521,//新增用户 35 newUerNum:521,//新增用户
src/components/orderMessage/index.vue
@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 }, 65 },
66 created() { 66 created() {
67 this.axios.post('urban/intelligence/orderPark/queryLastOrderPark',{ 67 this.axios.post('urban/intelligence/orderPark/queryLastOrderPark',{
68 - orgIds: [10003,10005] 68 + orgIds: this.GLOBAL.paramsvariables
69 }).then((response)=>{ 69 }).then((response)=>{
70 let data = response.data.data 70 let data = response.data.data
71 this.list = data; 71 this.list = data;
src/components/tollman/index.vue
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 name: "tollman", 32 name: "tollman",
33 data() { 33 data() {
34 return { 34 return {
35 - demo:'213',//示例 总数 35 + demo:'',//示例 总数
36 tollmanTotal:"",//收费员总数html 36 tollmanTotal:"",//收费员总数html
37 onDutyNum:254,//值班 37 onDutyNum:254,//值班
38 noDutyNum:154,//未值班 38 noDutyNum:154,//未值班
@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 //收费员总数 44 //收费员总数
45 45
46 this.axios.post('urban/intelligence/employee/queryEmployeeStaByOrgIds',{ 46 this.axios.post('urban/intelligence/employee/queryEmployeeStaByOrgIds',{
47 - orgIds: [10003,10005] 47 + orgIds: this.GLOBAL.paramsvariables
48 }).then((response)=>{ 48 }).then((response)=>{
49 let data = response.data.data 49 let data = response.data.data
50 this.tollmanTotal = data.allTollCollector 50 this.tollmanTotal = data.allTollCollector
src/components/weekAndDay/uDay.vue
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
13 13
14 <script> 14 <script>
15 import echarts from 'echarts' 15 import echarts from 'echarts'
  16 +
16 export default { 17 export default {
17 name: "uDay", 18 name: "uDay",
18 data() { 19 data() {
@@ -26,7 +27,7 @@ @@ -26,7 +27,7 @@
26 * */ 27 * */
27 mounted() { 28 mounted() {
28 this.axios.post('urban/intelligence/orderPark/queryOrderParkNumForToday',{ 29 this.axios.post('urban/intelligence/orderPark/queryOrderParkNumForToday',{
29 - orgIds: [10003,10005] 30 + orgIds: this.GLOBAL.paramsvariables
30 }).then((response)=>{ 31 }).then((response)=>{
31 let data = response.data.data 32 let data = response.data.data
32 let xData=[],inNum=[],outNum=[] 33 let xData=[],inNum=[],outNum=[]
src/components/weekAndDay/uWeek.vue
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 }, 25 },
26 mounted() { 26 mounted() {
27 this.axios.post('urban/intelligence/orderPark/queryOrderParkNumForLastWeek',{ 27 this.axios.post('urban/intelligence/orderPark/queryOrderParkNumForLastWeek',{
28 - orgIds: [10003,10005] 28 + orgIds: this.GLOBAL.paramsvariables
29 }).then((response)=>{ 29 }).then((response)=>{
30 let data = response.data.data 30 let data = response.data.data
31 let xData=[],inNum=[],outNum=[],lastInNum 31 let xData=[],inNum=[],outNum=[],lastInNum
src/main.js
@@ -5,6 +5,8 @@ import router from &#39;./router/router&#39; @@ -5,6 +5,8 @@ import router from &#39;./router/router&#39;
5 import axios from 'axios' 5 import axios from 'axios'
6 import Qs from 'qs' 6 import Qs from 'qs'
7 //QS是axios库中带的,不需要我们再npm安装一个 7 //QS是axios库中带的,不需要我们再npm安装一个
  8 +import global_ from './api/variables'
  9 +Vue.prototype.GLOBAL = global_
8 10
9 Vue.prototype.axios = axios; 11 Vue.prototype.axios = axios;
10 Vue.prototype.qs = Qs 12 Vue.prototype.qs = Qs