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