WXL
2025-01-15 3a7caf4344d5911a3ee68d232e53887d6cc2ff6b
src/components/Assistant/index.vue
@@ -42,7 +42,7 @@
        <div
          v-for="(item, index) in powerList"
          :key="index"
          @click.stop="activeHandle(index)"
          @click.stop="activeHandle(index,item.url)"
        >
          <div
            :class="activeIndex == index ? 'active power-item' : 'power-item'"
@@ -105,22 +105,27 @@
      powerList: [
        {
          path: require("@/assets/images/huanzheliebiao.png"),
          url:'/patient/patient/',
          label: "患者",
        },
        {
          path: require("@/assets/images/fwwu.png"),
          label: "服务",
          url:'/followvisit/tasklist/',
          label: "任务",
        },
        {
          path: require("@/assets/images/duanxinjilu.png"),
          url:'',
          label: "短信",
        },
        {
          path: require("@/assets/images/dianhua.png"),
          url:'',
          label: "电话",
        },
        {
          path: require("@/assets/images/zxlt.png"),
          url:'',
          label: "在线聊天",
        },
      ],
@@ -137,8 +142,8 @@
        // 获取元素位置属性
        this.floatDragDom = this.floatDrag.getBoundingClientRect();
        // 设置初始位置
        // this.left = this.clientWidth - this.floatDragDom.width - this.distanceRight;
        this.right = 0;
        this.left = this.clientWidth - this.floatDragDom.width - this.distanceRight;
        // this.right = 0;
        this.top =
          this.clientHeight - this.floatDragDom.height - this.distanceBottom;
        this.initDraggable();
@@ -164,9 +169,12 @@
      console.log("是否展开", this.flag);
    },
    // 点击哪个power
    activeHandle(index) {
    activeHandle(index,url) {
      //把我们自定义的下标赋值
      this.activeIndex = index;
      this.$router.push({
        path: url,
      })
      console.log("HHHH", index);
    },
    // 获取要改变得样式属性