<template>
  <div class="container">
    <WlUser :data="userData" :inline="true" cosType="thumbnail" />123123
    <WlInput type="number" />
    <WlPic src="https://wlmvp-1304040775.cos.ap-shanghai.myqcloud.com/ico/toutiao.png" />
    <WlVideo
      poster="https://wlmvp-cos.weiling.cn/1356898121111711744/1654167888RMYKpHS.mp4_1658131166552_0cdf9774-2ea6-4d08-902d-b9a6f437bf43.jpg"
      videoUrl="https://wlmvp-cos.weiling.cn/1554342194568241152/1661511506QfpJdCh.mp4" @onTimeUpdate="ontimeupdate" />
  </div>
</template>

<script>
import WlNotice from "@packages/components/Common/WlNotice";
import WlInput from "@packages/components/Common/WlInput";
import WlPic from "@packages/components/Common/WlPic";
import WlVideo from "@packages/components/Common/WlVideo";
import WlUser from "@packages/components/Common/WlUser";
// import WlLoading from "../../lib/WlLoading";

export default {
  name: "lxlTestPage",
  components: { WlInput, WlPic, WlVideo, WlUser },
  data() {
    return {
      test: true,
      treeData: [
        {
          dept_name: "敦敦有限公司",
          dept_id: "1",
          operation_type: 1,
          talk_groups: [
            {
              group_id: "1482963843301924864",
              dept_id: "1",
              group_name: "test2",
              group_order: 1,
            },
            {
              group_id: "1482979546046291968",
              dept_id: "1",
              group_name: "test5",
              group_order: 1,
            },
          ],
          children: [
            {
              dept_name: "一级部门",
              dept_id: "10",
              operation_type: 1,
              talk_groups: [
                {
                  group_id: "1482995192918335488",
                  dept_id: "10",
                  group_name: "test9",
                  group_order: 1,
                },
              ],
              children: [
                {
                  dept_name: "二级部门",
                  dept_id: "11",
                  operation_type: 1,
                  children: [
                    {
                      dept_name: "三级部门",
                      dept_id: "12",
                      operation_type: 1,
                      children: [
                        {
                          dept_name: "四级",
                          dept_id: "13",
                          operation_type: 2,
                          talk_groups: [
                            {
                              group_id: "1482990607965249536",
                              dept_id: "13",
                              group_name: "123",
                              group_order: 1,
                            },
                            {
                              group_id: "1482990701800218624",
                              dept_id: "13",
                              group_name: "1",
                              group_order: 1,
                            },
                            {
                              group_id: "1482990880255270912",
                              dept_id: "13",
                              group_name: "2",
                              group_order: 1,
                            },
                            {
                              group_id: "1482991044432912384",
                              dept_id: "13",
                              group_name: "a",
                              group_order: 1,
                            },
                            {
                              group_id: "1482991273987170304",
                              dept_id: "13",
                              group_name: "qwe",
                              group_order: 1,
                            },
                            {
                              group_id: "1482991727689228288",
                              dept_id: "13",
                              group_name: "6",
                              group_order: 1,
                            },
                          ],
                          children: [
                            {
                              dept_name: "五级测试",
                              dept_id: "14",
                              operation_type: 2,
                              talk_groups: [
                                {
                                  group_id: "1482990186412531712",
                                  dept_id: "14",
                                  group_name: "qwe",
                                  group_order: 1,
                                },
                              ],
                              children: [
                                {
                                  dept_name: "六级",
                                  dept_id: "15",
                                  operation_type: 2,
                                  talk_groups: [
                                    {
                                      group_id: "1481221429960794112",
                                      dept_id: "15",
                                      group_name: "123123",
                                      group_order: 1,
                                    },
                                    {
                                      group_id: "1481223005936967680",
                                      dept_id: "15",
                                      group_name: "asd",
                                      group_order: 1,
                                    },
                                  ],
                                  children: [
                                    {
                                      dept_name: "七级",
                                      dept_id: "16",
                                      operation_type: 2,
                                      talk_groups: [
                                        {
                                          group_id: "1481221796622655488",
                                          dept_id: "16",
                                          group_name: "123",
                                          group_order: 1,
                                        },
                                      ],
                                      children: [
                                        {
                                          dept_name: "八级",
                                          dept_id: "17",
                                          operation_type: 2,
                                          talk_groups: [
                                            {
                                              group_id: "1481200861991559168",
                                              dept_id: "17",
                                              group_name: "asdasd",
                                              group_order: 1,
                                            },
                                          ],
                                          children: [
                                            {
                                              dept_name: "九级",
                                              dept_id: "18",
                                              operation_type: 2,
                                              talk_groups: [
                                                {
                                                  group_id: "1481220921153970176",
                                                  dept_id: "18",
                                                  group_name: "123",
                                                  group_order: 1,
                                                },
                                              ],
                                              children: [
                                                {
                                                  dept_name: "十级",
                                                  dept_id: "19",
                                                  operation_type: 2,
                                                  children: [
                                                    {
                                                      dept_name: "十一级",
                                                      dept_id: "20",
                                                      operation_type: 2,
                                                      children: [
                                                        {
                                                          dept_name: "十二级",
                                                          dept_id: "23",
                                                          operation_type: 2,
                                                          children: [
                                                            {
                                                              dept_name: "十三级",
                                                              dept_id: "24",
                                                              operation_type: 2,
                                                              children: [
                                                                {
                                                                  dept_name: "十四级",
                                                                  dept_id: "25",
                                                                  operation_type: 2,
                                                                  children: [],
                                                                },
                                                              ],
                                                            },
                                                          ],
                                                        },
                                                      ],
                                                    },
                                                  ],
                                                },
                                              ],
                                            },
                                          ],
                                        },
                                      ],
                                    },
                                  ],
                                },
                              ],
                            },
                          ],
                        },
                      ],
                    },
                  ],
                },
              ],
            },
            {
              dept_name: "觌氅屾氤氲",
              dept_id: "29",
              operation_type: 1,
              children: [],
            },
          ],
        },
      ],
      activeValue: "",
      fixedMenuList: [
        {
          icon: require("@packages/assets/images/add.png"),
          text: "测试",
          isShow: true,
        },
      ],
      popupVisible: true,
      userData: {
        "nick_name": "廖秀力廖秀力廖秀力廖秀力廖秀力廖秀力廖秀力廖秀力廖秀力廖秀力廖秀力",
        "head_img_url": "https://wework.qpic.cn/wwpic/306566__ZsX0xGCQR-rhwJ_1666591758/0"
      }
    };
  },
  methods: {
    ontimeupdate(val) {
      console.log(val);
    },
    onClick() {
      this.popupVisible = false;
      setTimeout(() => {
        this.$router.push({
          path: "/yx",
        });
      }, 1000);
    },
    onNodeClick() {
      return;
    },
    onTestLoading() {
      this.$loading({
        type: "show",
        tips: "测试",
        needPercent: true,
      });
      let n = 1;
      setInterval(() => {
        this.$loading({
          type: "changePercent",
          percent: n++,
        });
      }, 1000);
    },
    onTestNotice() {
      WlNotice({ message: "你好", type: "success", duration: 3000 });
      // setTimeout(() => {
      //   WlNotice({ message: "你好1", type: "success", duration: 3000 });
      // }, 1000);
    },
  },
  mounted() {
    this.onTestNotice();
    // this.$notice({
    //   message: "ni",
    //   type: "success",
    // });
    // WlLoading({
    //   type: "show",
    // });
    // let n = 1;
    // setInterval(() => {
    //   WlLoading({
    //     type: "changePercent",
    //     percent: n++,
    //   });
    // }, 1000);
  },
};
</script>

<style lang="scss" scope>
.container {
  background-color: #fff;
}
</style>
