import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    // configTitleList: ['摄像头', '完美传感器', '激光雷达', '毫米波雷达', 'GPS'],
    configTitleList: ['摄像头', '完美传感器', '激光雷达', 'GPS'],
    // fileHost: 'http://10.12.10.70:8001', // 开发环境需要连开发服务器地址，上线后会用相对地址拼接fileUrl
    // fileHost: 'http://47.94.105.148', // 开发环境需要连开发服务器地址，上线后会用相对地址拼接fileUrl
    // fileHost: 'http://47.94.105.148:81', // 开发环境需要连开发服务器地址，上线后会用相对地址拼接fileUrl
    // fileHost: 'http://47.94.105.148:80', // 开发环境需要连开发服务器地址，上线后会用相对地址拼接fileUrl
    fileHost: 'http://36.110.106.156:80', // 开发环境需要连开发服务器地址，上线后会用相对地址拼接fileUrl
    fileUrl: '/simulation/resource/common/minio/preview',
    themeColor: '#3397FF',
    id: '', //用户id
    username: '', //用户名称
    roleCode: '', //用户角色
    useType: '', //独占类型
    scale: 1.5, // 物体加载换算倍数
    scaleRate: 1.8, // 处理矿车等需要微调的
    projectInfoTabname: "",
    taskInfoTabname: "",
    vehicleConfigurationDetailTabName: "", // 车辆配置详情
    gitAlgorithmsTabName: "", // 仓库算法详情
    exportAlgorithmsTabName: "", // 导入算法详情
    gradingRuleDetailTabName: "", // 评分规则详情
    scenePacketListTabName: "", // 场景测试包详情
    parameterDetailTabName: "", // 编辑参数管理
    clusteringDetailTabName: "", // 编辑集群配置
    scenePacketDetailTabName: "", // 场景包详情
    scenePacketDistributionDetailTabName: "", // 场景包分配详情
    editAccountTabName: "", // 编辑账户详情
    vehicleModelDetailTabName: "", // 车辆设置详情
    evaluationInfo:{}, // 场景评价编辑信息
    sceneId:"", // 场景id
  },
  mutations: {
    getUserId(state, data) {
      state.id = data
    },
    getUsername(state, data) {
      state.username = data
    },
    getRoleCode(state, data) {
      state.roleCode = data
    },
    getUseType(state, data) {
      state.useType = data
    },
    getProjectInfoTabname(state, data) {
      state.projectInfoTabname = data
    },
    getTaskInfoTabname(state, data) {
      state.taskInfoTabname = data
    },
    getTabname(state, name, data) {
      console.log('zzz',name,data)
      state[name] = data
    },
    getEvaluationInfo(state,data){
      state.evaluationInfo = data
    },
    getSceneId(state,data){
      state.sceneId = data
    }
    
  },
  actions: {},
  modules: {},
});