export default {
  data() {
    return {
      storeAttributes: [
        {
          id: 1,
          value: '仪器'
        }, {
          id: 2,
          value: '设备'
        }
      ],
      storeClass: [
        {
          id: 1,
          value: '医美'
        }, {
          id: 2,
          value: '生美'
        }
      ],
      storeInfo: [
        {
          id: 1,
          value: '商品库获取'
        },
        {
          id: 2,
          value: '自定义'
        }
      ],
      storeAddRules: {
        name: [
          { required: true, message: '请输入商品名称', trigger: 'blur' }
        ],
        image: [
          { required: true, message: '请上传商品图片', trigger: 'blur' }
        ],
        linkMan: [
          { required: true, message: '请输入供应商名称', trigger: 'blur' }
        ]
      },
      fileAddRules: {
        name: [
          { required: true, message: '请输入标题', trigger: 'blur' }
        ],
        file: [
          { required: true, message: '请上传文件', trigger: 'change' }
        ],
        userClass: [
          { required: true, message: '请选择用户阶段', trigger: 'change' }
        ],
        userType: [
          { require: true, message: '请选择标签', trigger: 'change' }
        ]
      },
      userClass: [
        {
          id: 0,
          value: '全部'
        },
        {
          id: 1,
          value: '认知阶段'
        },
        {
          id: 2,
          value: '兴趣阶段'
        },
        {
          id: 3,
          value: '决策阶段'
        },
        {
          id: 4,
          value: '购买阶段'
        }
      ],
      userType: [
        {
          id: 0,
          value: '全部'
        },
        {
          id: 1,
          value: '标签一'
        },
        {
          id: 2,
          value: '标签二'
        }
      ],
      dataManageListType: [
        {
          id: '1',
          value: '文件'
        },
        {
          id: '2',
          value: '视频'
        },
        {
          id: '3',
          value: '图片'
        },
        {
          id: '4',
          value: '文本'
        },
        {
          id: '5',
          value: '话术'
        }
      ]
    }
  },
  computed: {
    type() {
      return Number(this.$route.query.t) || false
    },
    id() {
      return this.$route.query.id || false
    },
    tId() {
      return this.$route.query.tId || false
    }
  },
  filters: {
    userStateFilter(val, list) {
      return list.filter(e => e.id === val)[0].value
    },
    userTypeFilter(val, list) {
      return list.filter(e => e.id === val)[0].value
    }
  }
}
