|
|
@@ -0,0 +1,283 @@
|
|
|
+import { $http } from "./config";
|
|
|
+import { ElNotification, ElMessageBox, ElMessage } from "element-plus";
|
|
|
+
|
|
|
+export default {
|
|
|
+ // 获取店铺列表
|
|
|
+ getShopList(data) {
|
|
|
+ return $http("/shop/list", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取店铺详情
|
|
|
+ getShopDetail(data) {
|
|
|
+ return $http("/shop/detail", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 新增周边商铺
|
|
|
+ addAroundShop(data) {
|
|
|
+ return $http("/shop/add/aroundShop", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取店铺周边商铺列表
|
|
|
+ getShopAroundList(data) {
|
|
|
+ return $http("/shop/around/list", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 根据省市区获取商店下拉列表
|
|
|
+ getSelectByRegion(data) {
|
|
|
+ return $http("/shop/getSelectByRegion", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 商品列表-品牌搜索-模糊列表
|
|
|
+ searchBrandSelect(data) {
|
|
|
+ return $http("/product/list/brand/data", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 商品列表-商品类型搜索-模糊列表
|
|
|
+ searchSubfamilySelect(data) {
|
|
|
+ return $http("/product/list/subfamily/data", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取商品列表
|
|
|
+ getProductList(data) {
|
|
|
+ return $http("/product/list", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取商品详情
|
|
|
+ getProductDetail(data) {
|
|
|
+ return $http("/product/detail", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 添加生命线
|
|
|
+ addLifeline(data) {
|
|
|
+ return $http("/product/lifeline/add", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 删除生命线
|
|
|
+ deleteLifeline(data) {
|
|
|
+ return $http("/product/lifeline/delete", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 更新生命线
|
|
|
+ updateLifeline(data) {
|
|
|
+ return $http("/product/lifeline/update", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取省
|
|
|
+ getProvince() {
|
|
|
+ return $http("/region/province");
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取市
|
|
|
+ getCity(data) {
|
|
|
+ return $http("/region/city", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取区
|
|
|
+ getDistrict(data) {
|
|
|
+ return $http("/region/district", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 根据省市区获取店铺下拉列表
|
|
|
+ getShopByArea(data) {
|
|
|
+ return $http("/shop/getSelectByRegion", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 创建决策组与子决策/新增子决策
|
|
|
+ addDecision(data) {
|
|
|
+ return $http("/decision/add", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取营销决策列表
|
|
|
+ getDecisionList(data) {
|
|
|
+ return $http("/decision/list", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取子决策组详情
|
|
|
+ getDecisionDetail(data) {
|
|
|
+ return $http("/decision/detail", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 周边业态分析
|
|
|
+ aroundAnalyze(data) {
|
|
|
+ return $http("/decision/detail/aroundAnalyze", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 周边业态词云分析
|
|
|
+ aroundWordCloudAnalyze(data) {
|
|
|
+ return $http("/decision/detail/aroundWordCloudAnalyze", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 运算
|
|
|
+ doCalculation(data) {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ setTimeout(() => {
|
|
|
+ resolve($http("/decision/doCalculation", data));
|
|
|
+ }, 8000);
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 创建营销决策-明星商品-模糊搜索下拉
|
|
|
+ getStarProductSelect(data) {
|
|
|
+ return $http("/decision/starProductSelect", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 创建营销决策-商品功能-模糊搜索下拉
|
|
|
+ getFunctionSelect(data) {
|
|
|
+ return $http("/decision/functionSelect", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 创建营销决策-生命周期-商品分类模糊搜索下拉
|
|
|
+ getCategorySelect(data) {
|
|
|
+ return $http("/decision/categorySelect", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 生成知识点
|
|
|
+ generateWords(data) {
|
|
|
+ return $http("/product/generate/words", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 商品折线图数据
|
|
|
+ getLineChartData(data) {
|
|
|
+ return $http("/product/lineChart", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取决策组详情
|
|
|
+ getMainDecisionDetail(data) {
|
|
|
+ return $http("/decision/detail/main", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 创建商品组合决策-ALL-选择商品分类模糊下拉
|
|
|
+ getCGFamilySelect(data) {
|
|
|
+ return $http("/decision/product/familySelect", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 创建商品组合决策-明星商品-产品列表
|
|
|
+ getCGStarProductList(data) {
|
|
|
+ return $http("/decision/product/starProduct/productList", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 创建商品组合决策-商品功能-产品列表
|
|
|
+ getCGFunctionList(data) {
|
|
|
+ return $http("/decision/product/productFunction/productList", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ //创建商品组合决策-生命周期-产品列表
|
|
|
+ getCGLifeCycleList(data) {
|
|
|
+ return $http("/decision/product/lifeCycle/productList", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ //创建商品组合决策-商品功能/生命周期-选择IP下拉数据
|
|
|
+ getCGIpSelect(data) {
|
|
|
+ return $http("/decision/product/productFunction/ipSelect", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 创建商品组合决策-商品功能/生命周期-选择生命周期事件数据
|
|
|
+ getCGLifeline(data) {
|
|
|
+ return $http("/decision/product/productFunction/lifeline", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 创建商品组合决策
|
|
|
+ createGroup(data) {
|
|
|
+ return $http("/decision/product/createGroup", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 商品组合分析
|
|
|
+ CGDoCalc(data) {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ setTimeout(() => {
|
|
|
+ resolve($http("/decision/product/doCalculation", data));
|
|
|
+ }, 10000);
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 活动转化相关接口
|
|
|
+ // 创建活动
|
|
|
+ addActivity(data) {
|
|
|
+ return $http("/activity/add", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取活动详情
|
|
|
+ getActivityDetail(data) {
|
|
|
+ return $http("/activity/detail", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ //获取活动列表
|
|
|
+ getActivityList(data) {
|
|
|
+ return $http("/activity/list", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 下载数据分析
|
|
|
+ downloadAnalysis(data) {
|
|
|
+ return $http("/activity/downloadAnalysis", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取活动决策列表
|
|
|
+ getActivityDecsisionList(data) {
|
|
|
+ return $http("/activity/decsisionList", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 店铺列表筛选城市
|
|
|
+ searchShopListCity(data) {
|
|
|
+ return $http("/shop/list/search/city", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 店铺列表筛选店铺名称
|
|
|
+ searchShopListShopName(data) {
|
|
|
+ return $http("/shop/list/search/shopName", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 店铺列表筛选店铺类型
|
|
|
+ searchShopListShopType(data) {
|
|
|
+ return $http("/shop/list/search/shopType", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 使用量列表
|
|
|
+ getUsageList(data) {
|
|
|
+ return $http("/product/usage/list", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 添加使用量
|
|
|
+ addUsage(data) {
|
|
|
+ return $http("/product/usage/add", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 删除使用量
|
|
|
+ deleteUsage(data) {
|
|
|
+ return $http("/product/usage/delete", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 修改使用量
|
|
|
+ updateUsage(data) {
|
|
|
+ return $http("/product/usage/update", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 添加生命周期-选择商品分类模糊下拉
|
|
|
+ searchLifelineFamilySelect(data) {
|
|
|
+ return $http("/product/lifeline/familySelect", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 添加生命周期-选择商品商品功能模糊下拉
|
|
|
+ searchLifelineFunctionSelect(data) {
|
|
|
+ return $http("/product/lifeline/functionSelect", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取生命线
|
|
|
+ getThinkTankLifeline(data) {
|
|
|
+ return $http("/product/lifeline/showLifeLine", data);
|
|
|
+ },
|
|
|
+
|
|
|
+ suc(res) {
|
|
|
+ ElNotification({
|
|
|
+ type: "success",
|
|
|
+ message: res.data.msg,
|
|
|
+ title: "Success!",
|
|
|
+ });
|
|
|
+ },
|
|
|
+ err(res) {
|
|
|
+ ElNotification({
|
|
|
+ type: "error",
|
|
|
+ message: res.data.msg,
|
|
|
+ });
|
|
|
+ console.log(res);
|
|
|
+ },
|
|
|
+};
|