<template>
  <Container :needPadding="true">
    <template v-slot:header>
      <WlHeader :needBottomBorder="true">BOCard 商机卡片</WlHeader>
    </template>
    <template v-slot:main>
      <Title>基础使用</Title>
      <BOCard :data="cardData" :stage_list="stageList" :stage_fail_list="stageFailList" />
      <Title>禁止编辑使用</Title>
      <BOCard :data="disbaleEditCard" :stage_list="stageList" :stage_fail_list="stageFailList" />
      <Title>输入框使用</Title>
      <BOCard :data="inputCard" :stage_list="stageList" :stage_fail_list="stageFailList" />
      <Title>隐藏行</Title>
      <BOCard :data="hiddenCard" :stage_list="stageList" :stage_fail_list="stageFailList" />
    </template>
  </Container>
</template>

<script>
import Title from "../components/Title";
import Container from "../components/Container";
import { stageList, stageFailList } from "../../utils/exampleData";
const cardData = {
  business_id: "1514595543467974656",
  stage: 1,
  name: "123",
  hidden: {
    name: false,
    owner: false,
  },
  owner: {
    id: "1356946737750749184",
    nick_name: "王朝勇哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
    head_img_url: "https://wework.qpic.cn/wwpic/604798_0Iun_-ChTbKzE4t_1649952900/0",
  },
  create_time: "1649942692000",
  is_focus: 0,
  is_related: 0,
  is_owner: 0,
  tag: "与我相关",
  stage_text: "需求沟通",
  is_edit: true,
  input_edit: false,
  indexID: "15145955434679746561",
  href:
    "https://demo.weiling.cn//h5/worktable-h5/?corp_id=ww90b1ab33636e7da5&sid=ce7078e213cdf5631beafcfa28c94c2e&user_id=1357167653223018496#/business-detail?business_id=1514595543467974656",
};
export default {
  name: "BOCard-Example",
  components: { Title, Container },
  data() {
    return {
      cardData: cardData,
      disbaleEditCard: {
        ...cardData,
        is_edit: false,
      },
      inputCard: {
        ...cardData,
        input_edit: true,
      },
      hiddenCard: {
        ...cardData,
        hidden: {
          stage: true,
        },
        tag: "",
      },
      stageList,
      stageFailList,
    };
  },
};
</script>
