143 lines
4.0 KiB
JavaScript
143 lines
4.0 KiB
JavaScript
import {
|
|
reqProductAnalysis,
|
|
reqProductizationProduct,
|
|
reqSuppilerAnalysis,
|
|
reqSuppilerNameList,
|
|
reqSuppilerNameProductList
|
|
} from "@/api/product/productization";
|
|
|
|
const state = {
|
|
productSpuerComputingList: [],//存储超算列表
|
|
intendedCustomerWindowShow: false,//意向客户展示弹窗状态
|
|
|
|
//初始化大屏
|
|
showScreen: true,
|
|
//产品化
|
|
productizationProduct: [],
|
|
suppilerListNames: [],//获取供应商列表
|
|
supplierProductList: [],//根据供应商获取产品列表
|
|
suppilerData: {},//供应商统计分析数据
|
|
suppilerProductData: {},//产品统计分析数据
|
|
AvailableZoneCode: '',//可用区
|
|
regionArea: "",//地域名称
|
|
availableArea: "",//可用区名称
|
|
RegionCode: "",//地区Code
|
|
AzIdX: '',//
|
|
|
|
showTalk: false,//是否立即试用
|
|
showHomeNav: false,//展示主页nav
|
|
navIndex: 0,//导航展示内容
|
|
logoInfoNew: {},//网站展示logo
|
|
}
|
|
const mutations = {
|
|
setLogoInfoNew(state, logoInfoNew) {
|
|
state.logoInfoNew = logoInfoNew
|
|
},
|
|
setNavIndex(state, navIndex) {
|
|
state.navIndex = navIndex;
|
|
},
|
|
setShowHomeNav(state, showHomeNav) {
|
|
state.showHomeNav = showHomeNav;
|
|
},
|
|
setShowTalk(state, showTalk) {
|
|
state.showTalk = showTalk;
|
|
},
|
|
setShowScreen(state, showScreen) {
|
|
console.log("展示执行了", showScreen)
|
|
state.showScreen = showScreen
|
|
},
|
|
setAvailableArea(state, availableArea) {
|
|
state.availableArea = availableArea
|
|
},
|
|
setAzIdX(state, AzIdX) {
|
|
state.AzIdX = AzIdX
|
|
},
|
|
seatRegionCode(state, RegionCode) {
|
|
state.RegionCode = RegionCode;
|
|
},
|
|
setRegionArea(state, regionArea) {
|
|
state.regionArea = regionArea
|
|
},
|
|
|
|
setAvailableZoneCode(state, AvailableZoneCode) {
|
|
// console.log("vuex被带哦用了")
|
|
state.AvailableZoneCode = AvailableZoneCode
|
|
},
|
|
//存储超算列表
|
|
setProductSpuerComputingList(state, productSpuerComputingList) {
|
|
state.productSpuerComputingList = productSpuerComputingList
|
|
},
|
|
//修改意向客户展示弹窗状态
|
|
setIntendedCustomerWindowShow(state, intendedCustomerWindowShow) {
|
|
state.intendedCustomerWindowShow = intendedCustomerWindowShow
|
|
},
|
|
// 产品化产品列表
|
|
setProductizationProduct(state, productizationProduct) {
|
|
state.productizationProduct = productizationProduct
|
|
},
|
|
//获取全部供应商列表
|
|
GETSUPPILERLISTNAMES(state, suppilerListNames) {
|
|
state.suppilerListNames = suppilerListNames
|
|
},
|
|
//根据供应商获取产品列表信息
|
|
GETSUPPLIERPRODUCTLIST(state, supplierProductList) {
|
|
state.supplierProductList = supplierProductList
|
|
},
|
|
//修改供应商统计分析数据
|
|
GETSUPPILERDATA(state, suppilerData) {
|
|
state.suppilerData = suppilerData
|
|
},
|
|
//修改产品统计分析数据
|
|
GETSUPPILERPRODUCTDATA(state, suppilerProductData) {
|
|
state.suppilerProductData = suppilerProductData
|
|
}
|
|
}
|
|
const actions = {
|
|
async getproductizationProduct({commit}, data) {
|
|
let result = await reqProductizationProduct(data)
|
|
if (result.status) {
|
|
commit('setProductizationProduct', result.data)
|
|
} else {
|
|
commit('setProductizationProduct', [])
|
|
}
|
|
},
|
|
//获取供应商
|
|
async getSuppilerListNames({commit}, data) {
|
|
let result = await reqSuppilerNameList(data)
|
|
if (result.status) {
|
|
commit('GETSUPPILERLISTNAMES', result.data)
|
|
}
|
|
},
|
|
//获取产品
|
|
async getSuppilerProductList({commit}, data) {
|
|
let result = await reqSuppilerNameProductList(data)
|
|
|
|
if (result.status) {
|
|
commit('GETSUPPLIERPRODUCTLIST', result.data)
|
|
} else {
|
|
|
|
}
|
|
},
|
|
// 获取供应商统计分析数据
|
|
async getSuppilerData({commit}, data) {
|
|
let result = await reqSuppilerAnalysis(data)
|
|
if (result.status) {
|
|
commit('GETSUPPILERDATA', result)
|
|
}
|
|
},
|
|
// 获取产品统计分析数据
|
|
async getSuppilerProductData({commit}, data) {
|
|
let result = await reqProductAnalysis(data)
|
|
if (result.status) {
|
|
commit('GETSUPPILERPRODUCTDATA', result)
|
|
}
|
|
},
|
|
}
|
|
const getters = {}
|
|
export default {
|
|
state,
|
|
mutations,
|
|
actions,
|
|
getters
|
|
}
|