Commit e880069f by 胡悦

提交接口

1 parent 6f175de7
......@@ -4,13 +4,13 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: huyue
* @LastEditTime: 2023-07-04 11:41:39
* @LastEditTime: 2023-07-13 15:06:41
*/
// const modulesFiles = require.context('./modules', true, /\.js$/)
// const modules = modulesFiles.keys().reduce((modules, modulePath) => {
// const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
// const value = modulesFiles(modulePath)
// modules[moduleName] = value.default
// return modules
// }, {})
// export default modules
const modulesFiles = require.context('./modules', true, /\.js$/)
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
modules[moduleName] = value.default
return modules
}, {})
export default modules
/*
* @Description:
* @Author: huyue
* @Date: 2023-07-12 16:17:18
* @LastEditors: huyue
* @LastEditTime: 2023-07-13 14:07:44
*/
// 总 - 商品采购占比
const getAllGoodsRatio = params => {
return window.$HTTP.get('solarfilm/getAllGoodsRatio', params)
}
// 总 - 开通商户数和使用商户数 趋势
const getAllOpenBuyTrend = params => {
return window.$HTTP.get('solarfilm/getAllOpenBuyTrend', params)
}
// 总 - 获取所有门店的 总采购额(总计、本月) 、商城采购额(总计、本月) 、自采采购额(总计、本月)、开通商户数(总计、本月)、购买商户数(总计、本月)、入库使用商户数、业务时间
const getAllPurchase = params => {
return window.$HTTP.get('solarfilm/getAllPurchase', params)
}
// 总 - 商城采购额(占比)、自采采购额(占比) 趋势
const getAllPurchaseTrend = params => {
return window.$HTTP.get('solarfilm/getAllPurchaseTrend', params)
}
// 总 - 商品采购额排名
const getAllRanking = params => {
return window.$HTTP.get('solarfilm/getAllRanking', params)
}
// 单店 - 获取每个门店的商品采购占比
const getMerchantGoodsRatio = params => {
return window.$HTTP.get('solarfilm/getMerchantGoodsRatio', params)
}
// 单店 - 获取每个门店的 总采购额(总计、本月) 、商城采购额(总计、本月) 、自采采购额(总计、本月)
const getMerchantPurchase = params => {
return window.$HTTP.get('solarfilm/getMerchantPurchase', params)
}
// 单店 - 获取每个门店的商城采购额(占比)、自采采购额(占比) 趋势
const getMerchantPurchaseTrend = params => {
return window.$HTTP.get('solarfilm/getMerchantPurchaseTrend', params)
}
export default {
getAllGoodsRatio,
getAllOpenBuyTrend,
getAllPurchase,
getAllPurchaseTrend,
getAllRanking,
getMerchantGoodsRatio,
getMerchantPurchase,
getMerchantPurchaseTrend
}
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: huyue
* @LastEditTime: 2023-02-28 14:50:10
* @LastEditTime: 2023-07-13 14:11:18
*/
// 本地环境配置
module.exports = {
......@@ -12,7 +12,7 @@ module.exports = {
title: '嘀加智慧门店',
request: {
// baseURL: 'http://192.168.3.126:8081', // 本地测试项目地址,
baseURL: 'http://192.168.1.152:9998', // 本地开发项目地址,
baseURL: 'http://192.168.1.152:8088', // 本地开发项目地址,
// baseURL: 'http://192.168.1.158:9996',
// baseURL: 'http://192.168.1.152:8081',
// baseURL: 'http://bi-view.beta.glsx.com.cn',
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: huyue
* @LastEditTime: 2023-07-05 16:35:22
* @LastEditTime: 2023-07-13 15:06:27
*/
// 兼容 IE
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
......@@ -22,7 +22,7 @@ import './utils/util'
import 'components'
import * as echarts from 'echarts'
// import dialog from './plugins/dialog'
import Bus from '../src/bus' //这是我的路径,正确引用你们的路径
import Bus from '../src/bus' // 这是我的路径,正确引用你们的路径
Vue.prototype.$bus = Bus
Vue.prototype.$echarts = echarts
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-07-05 10:35:43
* @LastEditors: huyue
* @LastEditTime: 2023-07-10 11:36:28
* @LastEditTime: 2023-07-13 15:12:36
-->
<template>
<div class="left">
......@@ -21,6 +21,7 @@
import PurchaseTrends from './PurchaseTrends.vue'
import MerchantTrends from './MerchantTrends.vue'
import StorageContent from './StorageContent.vue'
import { changeMixin } from '@/mixins'
export default {
name: 'ContentLeft',
components: {
......@@ -28,6 +29,7 @@ export default {
MerchantTrends,
StorageContent
},
mixins: [changeMixin],
data() {
return {
solarList: [
......@@ -65,6 +67,18 @@ export default {
}
]
}
},
mounted() {
},
methods: {
init() {
this.getSolarList()
},
getSolarList() {
this.api.solar.getAllPurchase({ req: { year: 2023 }}).then(res => {
console.log(res)
})
}
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!