Vue 项目中如何使用FullCalendar 时间段选择插件(类似会议室预定、课程表)

news2024/11/25 23:15:07

在这里插入图片描述
本文中是基于VUE+elementui项目中实现的前后端分离的前端功能部分:

插件的官方文档:FullCalendar

1.安装对应依赖(统一安装版本为6.15)

npm install  --save @fullcalendar/core@6.15
npm install  --save @fullcalendar/daygrid@6.15
npm install  --save @fullcalendar/interaction@6.15
npm install  --save @fullcalendar/moment@6.15
npm install  --save @fullcalendar/resource@6.15
npm install  --save @fullcalendar/resource-timeline@6.15
npm install  --save @fullcalendar/timegrid@6.15
npm install  --save @fullcalendar/vue@6.15

2.放置组件展示的div(包含选中之后的弹框)

<template>
  <div class="app-container meetingroomApply">
    <el-button
      type="primary"
      icon="el-icon-plus"
      size=" medium"
      @click="openDialog"
      style="margin-bottom: 10px;"
      >会议室预定</el-button
    >
    <div class="fullCalendar" id="calendar"></div>
    <div class="tips-text">请用鼠标滑动选择时间段进行会议预约!</div>

    <el-dialog
      :visible.sync="dialogVisible"
      :close-on-click-modal="false"
      :title="title"
    >
      <el-form
        ref="form"
        :model="form"
        :rules="rules"
        label-width="110px"
        style="padding: 10px 10px"
      >
        <el-form-item label="会议室" prop="meetingroomName">
          <el-select
            v-model="form.meetingroomName"
            placeholder="请选择会议室"
            @change="roomChange"
            :disabled="this.eventClickFlag ? true : false"
          >
            <el-option
              v-for="room in meetingroomList"
              :key="room.id"
              :label="room.meetingroomName"
              :value="room.meetingroomName"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="会议名称" prop="meetingName">
          <el-input
            placeholder="请输入会议名称"
            v-model="form.meetingName"
            :disabled="this.eventClickFlag ? true : false"
          ></el-input>
        </el-form-item>
        <el-form-item label="会议开始时间" prop="meetingStartTime">
          <el-date-picker
            clearable
            v-model="form.meetingStartTime"
            type="datetime"
            value-format="yyyy-MM-dd HH:mm:ss"
            placeholder="请选择会议开始时间"
            :disabled="this.eventClickFlag ? true : false"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="会议结束时间" prop="meetingEndTime">
          <el-date-picker
            clearable
            v-model="form.meetingEndTime"
            type="datetime"
            value-format="yyyy-MM-dd HH:mm:ss"
            placeholder="请选择会议结束时间"
            :disabled="this.eventClickFlag ? true : false"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="预定人" prop="userName">
          <el-input
            v-model="form.userName"
            :disabled="this.eventClickFlag ? true : false"
          ></el-input>
        </el-form-item>
        <el-form-item label="预定人电话" prop="userPhone">
          <el-input
            v-model="form.userPhone"
            placeholder="请输入联系电话"
            :disabled="this.eventClickFlag ? true : false"
          />
        </el-form-item>

        <el-form-item label="预定人公司" prop="companyId">
          <el-input
            v-model="form.companyId"
            type="text"
            :disabled="this.eventClickFlag ? true : false"
          ></el-input>
        </el-form-item>
        <el-form-item label="预定部门" prop="deptId">
          <el-input
            v-model="form.deptId"
            type="text"
            :disabled="this.eventClickFlag ? true : false"
          ></el-input>
        </el-form-item>
        <el-form-item label="参会人" prop="participant">
          <el-input
            v-model="form.participant"
            type="textarea"
            :disabled="this.eventClickFlag ? true : false"
          ></el-input>
        </el-form-item>
        <el-row>
          <el-col :span="6">
            <el-form-item label="投屏" prop="projectionScreen">
              <el-checkbox
                v-model="form.projectionScreen"
                :true-label="1"
                :false-label="0"
                :disabled="this.eventClickFlag ? true : false"
              ></el-checkbox>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="桌牌" prop="tableBrand">
              <el-checkbox
                v-model="form.tableBrand"
                :true-label="1"
                :false-label="0"
                :disabled="this.eventClickFlag ? true : false"
              ></el-checkbox>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="瓶装水" prop="bottleWater">
              <el-checkbox
                v-model="form.bottleWater"
                :true-label="1"
                :false-label="0"
                :disabled="this.eventClickFlag ? true : false"
              ></el-checkbox>
            </el-form-item>
          </el-col>
        </el-row>

        <el-form-item label="其他需要" prop="otherNeeds">
          <el-input
            v-model="form.otherNeeds"
            type="textarea"
            :disabled="this.eventClickFlag ? true : false"
          ></el-input>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input
            v-model="form.remark"
            type="textarea"
            :disabled="this.eventClickFlag ? true : false"
          ></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button
          type="primary"
          :loading="buttonLoading"
          @click="submitForm"
          v-if="!this.eventClickFlag"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>

3.对应的js代码

<script>
import FullCalendar from "@fullcalendar/vue";
import { Calendar } from "@fullcalendar/core";
import dayGridPlugin from "@fullcalendar/daygrid";
import interactionPlugin from "@fullcalendar/interaction";
import timeGridPlugin from "@fullcalendar/timegrid";
import resourceTimelinePlugin from "@fullcalendar/resource-timeline";
export default {
  components: {
    FullCalendar, // 像使用自定义组件一样使用
  },
  constructor() {
    const name = Calendar.name;
  },
  data() {
    return {
      // 显示搜索条件
      showSearch: true,
      // 按钮loading
      buttonLoading: false,
      dialogVisible: false,
      eventClickFlag: false,
      title: "",
      // 部门树选项
      deptOptions: [],
      deptOptionsLink: [], //根据公司id查询部门数据
      // 公司名称数组
      companyList: [],
      meetingroomList: [],
      meetingroomEventList: [],
      form: {
        meetingName: "",
        participant: "",
        projectionScreen: "",
        tableBrand: "",
        bottleWater: "",
        otherNeeds: "",
        remark: "",
        meetingStartTime: "",
        meetingEndTime: "",
        meetingroomName: "",
        meetingroomId: "",
      },
      rules: {},
      // 查询参数
      queryParams: {
        meetingroomNo: undefined,
        meetingroomName: undefined,
        meetingDay: undefined,
        viewType: undefined,
        beginDayTime: undefined,
        endDayTime: undefined,
        year: undefined,
        month: undefined,
      },
      meetingroomList: [],
      meetingroomEventList: [],
      //监听到的当前view模式
      viewType: "",
      calendar: null,
      calendarOptions: {
        //   timeGridPlugin  可显示每日时间段
        height: 700,
        allDaySlot: false, //是否在日历上方显示all-day(全天)
        axisFormat: "h(:mm)tt",
        plugins: [
          dayGridPlugin,
          interactionPlugin,
          timeGridPlugin,
          resourceTimelinePlugin,
        ],
        headerToolbar: {
          left: "prev,next today",
          center: "title",
          // right: "dayGrid,dayGridWeek,dayGridMonth",
          right: "resourceTimelineDay,resourceTimelineWeek,dayGridMonth",
        },
        buttonText: {
          // 设置按钮
          today: "今天",
          day: "日",
          week: "周",
          month: "月",
        },
        editable: true,
        selectable: true,
        navLinks: true,
        datesSet: this.datesSet, //日期渲染;修改日期范围后触发
        // displayEventEnd: true,//所有视图显示结束时间
        // initialView: "dayGrid", // 设置默认显示周,可选周、日
        initialView: "resourceTimelineDay",
        dateClick: this.handleDateClick,
        eventClick: this.handleEventClick,
        // eventsSet: this.handleEvents,
        select: this.handleSelect,
        resourceAreaColumns: [
          {
            headerContent: "会议室",
          },
        ],
        eventColor: "#f08f00", // 修改日程背景色
        locale: "zh-cn", // 设置语言
        weekNumberCalculation: "ISO", // 周数
        customButtons: {
          prev: {
            // this overrides the prev button
            text: "PREV",
            click: () => {
              this.prev();
            },
          },
          next: {
            // this overrides the next button
            text: "PREV",
            click: () => {
              this.next();
            },
          },
          today: {
            text: "今天",
            click: () => {
              this.today();
            },
          },
        },
        // 最小时间
        slotMinTime: "07:00:00",
        // 最大时间
        slotMaxTime: "22:00:00",
        resourceAreaWidth: "15%", //高级功能配置Column宽度
        // 高级功能许可key,需要用到高级功能时候添加上,避免左下角出现警告提醒
        schedulerLicenseKey: "CC-Attribution-NonCommercial-NoDerivatives",
      },
    };
  },
  created() {
    this.getList();
  },
  mounted() {
    this.initCalendar();
  },
  methods: {
    /** 查询会议室列表 (替换为自己本公司的接口)*/
    getList() {
      this.queryParams.companyIds = 1319;
      this.queryParams.viewType = "day";
      this.queryParams.meetingDay = this.setCurrentDate(new Date());
      this.getListApplyMeetingroom(this.queryParams);
    },
    ///获取当前的年月日,做查询参数
    setCurrentDate(data) {
      const currentDate = data;
      const year = currentDate.getFullYear();
      const month = String(currentDate.getMonth() + 1).padStart(2, "0");
      const day = String(currentDate.getDate()).padStart(2, "0");
      const formattedDate = `${year}-${month}-${day}`;
      return formattedDate;
    },
    getListApplyMeetingroom(queryParams) {
      this.$nextTick(() => {
        // listApplyMeetingroom(queryParams).then((response) => {}); //修改为自己的接口

        //清空原始数据
        this.meetingroomList = [
          {
            id: 1,
            companyId: 1319,
            companyName: "测试",
            companyShortName: null,
            tenantId: 1319,
            meetingroomNo: "HYS20241118001",
            meetingroomName: "测试 - 309会议室",
            meetingroomLocation: "测试公司三层309会议室",
            meetingroomArea: "86.0000",
            meetingroomGalleryful: 40,
            meetingroomEquipment: "投影仪",
            appliable: 1,
            remark: "第一次申请",
            scopeDeptId: 1321,
            projectionScreen: null,
            tableBrand: null,
            bottleWater: null,
          },
        ];
        this.meetingroomEventList = [
          {
            id: 20,
            meetingroomId: 1,
            meetingroomName: "测试 - 309会议室",
            meetingName: "22好的会议",
            participant: "我额人他",
            meetingStartTime: "2024-11-22 09:30:00",
            meetingEndTime: "2024-11-22 13:30:00",
            specialRequest: null,
            companyId: 1319,
            companyName: "测试公司",
            userCode: "1",
            userName: "sysadmin",
            userPhone: "1222222222",
            deptId: 1323,
            deptName: "研发部",
            applyTime: null,
            applyStatus: 1,
            cancelRemark: null,
            remark: "问问嗯嗯",
            tenantId: 1319,
            scopeDeptId: 1323,
            projectionScreen: 1,
            tableBrand: 1,
            bottleWater: 1,
            otherNeeds: "问问",
          },
        ];

        // 提取所有资源的 id 值
        const resourceIds = this.calendar
          .getResources()
          .map((resource) => resource.id);
        // 逐个删除原有资源,防止显示出错
        resourceIds.forEach((id) => {
          this.calendar.getResourceById(id).remove();
        });

        if (this.meetingroomList.length > 0) {
          // 遍历 this.meetingroomList 并添加资源
          this.meetingroomList.forEach((room) => {
            this.calendar.addResource({
              id: room.id,
              title: room.meetingroomName,
            });
          });
        }

        if (this.meetingroomEventList.length > 0) {
          // 获取现有的事件列表
          const existingEvents = this.calendar.getEvents();
          // 添加新的事件,避免重复
          this.meetingroomEventList.forEach((event) => {
            const isDuplicate = existingEvents.some((existingEvent) => {
              const formattedStart = this.formmatTime(existingEvent.start);
              const formattedEnd = this.formmatTime(existingEvent.end);

              return (
                formattedStart === this.formmatTime(event.meetingStartTime) &&
                formattedEnd === this.formmatTime(event.meetingEndTime)
              );
            });

            if (!isDuplicate) {
              this.calendar.addEvent({
                resourceId: event.meetingroomId,
                title: `${event.meetingName}  预定人: (${event.userName})`,
                start: event.meetingStartTime,
                end: event.meetingEndTime,
                extendedProps: {
                  meetingroomId: event.meetingroomId,
                  meetingroomName: event.meetingroomName,
                  meetingStartTime: event.meetingStartTime,
                  meetingEndTime: event.meetingEndTime,
                  meetingName: event.meetingName,
                  userName: event.userName,
                  userPhone: event.userPhone,
                  companyName: event.companyName,
                  deptName: event.deptName,
                  participant: event.participant,
                  projectionScreen: event.projectionScreen,
                  tableBrand: event.tableBrand,
                  bottleWater: event.bottleWater,
                  otherNeeds: event.otherNeeds,
                  remark: event.remark,
                },
              });
            }
          });
        }
      });
    },
    //加载会议事件
    initCalendar() {
      var calendarEl = document.getElementById("calendar");
      this.calendar = new Calendar(calendarEl, this.calendarOptions);
      this.calendar.render();
    },
    openDialog() {
      this.resetForm();
      this.title = "会议室预定";
      this.form.meetingStartTime = "";
      this.form.meetingEndTime = "";
      this.form.meetingroomName = "";
      this.form.meetingroomId = "";
      this.eventClickFlag = false;

      this.dialogVisible = true;
    },
    roomChange(value) {
      // 根据选中的会议室名称找到对应的会议室对象
      const selectedRoom = this.meetingroomList.find(
        (room) => room.meetingroomName === value
      );
      if (selectedRoom) {
        // 更新 form.meetingroomId 为选中的会议室meetingroomNo
        this.form.meetingroomId = selectedRoom.id;
      }
    },
    //选择会议室和时间
    handleSelect(info) {
      this.resetForm();
      this.form.meetingStartTime = this.handleSelectDate(info.startStr);
      this.form.meetingEndTime = this.handleSelectDate(info.endStr);
      if (info.resource) {
        this.form.meetingroomName = info.resource.title;
        this.form.meetingroomId = info.resource.id;
      }
      this.eventClickFlag = false;
      this.dialogVisible = true;
    },
    handleSelectDate(selectData) {
      const originalTime = selectData;
      const date = new Date(originalTime);
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, "0");
      const day = String(date.getDate()).padStart(2, "0");
      const hours = String(date.getHours()).padStart(2, "0");
      const minutes = String(date.getMinutes()).padStart(2, "0");
      const formattedTime = `${year}-${month}-${day} ${hours}:${minutes}:00`;
      return formattedTime;
    },
    resetForm() {
      this.form.meetingName = "";
      this.form.participant = "";
      this.form.projectionScreen = "";
      this.form.tableBrand = "";
      this.form.bottleWater = "";
      this.form.otherNeeds = "";
      this.form.remark = "";
    },
    //获取视图的日期参数
    getViewDate() {
      const currentDate = this.calendar.getDate();
      const currentViewType = this.calendar.view.type;

      if (currentViewType === "resourceTimelineDay") {
        // 日视图
        this.queryParams.viewType = "day";
        this.queryParams.meetingDay = this.formatDate(
          currentDate,
          "yyyy-MM-dd"
        );
      } else if (currentViewType === "resourceTimelineWeek") {
        // 周视图
        const startOfWeek = new Date(currentDate);
        startOfWeek.setDate(startOfWeek.getDate() - startOfWeek.getDay() + 1);
        const endOfWeek = new Date(startOfWeek);
        endOfWeek.setDate(endOfWeek.getDate() + 6);
        this.queryParams.viewType = "week";
        this.queryParams.beginDayTime = this.formatDate(
          startOfWeek,
          "yyyy-MM-dd"
        );
        this.queryParams.endDayTime = this.formatDate(endOfWeek, "yyyy-MM-dd");
      } else if (currentViewType === "dayGridMonth") {
        // 月视图

        const startOfMonth = new Date(currentDate);
        startOfMonth.setDate(1);
        const endOfMonth = new Date(currentDate);
        endOfMonth.setMonth(endOfMonth.getMonth() + 1);
        endOfMonth.setDate(0);
        this.queryParams.viewType = "month";
        this.queryParams.beginDayTime = this.formatDate(
          startOfMonth,
          "yyyy-MM-dd"
        );
        this.queryParams.endDayTime = this.formatDate(endOfMonth, "yyyy-MM-dd");
      }
      this.queryParams.companyIds =
        this.queryParams.tenantIdList.length > 0
          ? this.queryParams.tenantIdList.join(",")
          : this.form.companyId;
    },
    // 辅助方法:格式化日期
    formatDate(date, format) {
      const pad = (n) => (n < 10 ? "0" + n : n);
      return format
        .replace("yyyy", date.getFullYear())
        .replace("MM", pad(date.getMonth() + 1))
        .replace("dd", pad(date.getDate()));
    },
    prev() {
      this.calendar.prev();
      this.getViewDate();
      this.getListApplyMeetingroom(this.queryParams);
    },
    // 切换下一个按钮事件
    next() {
      this.calendar.next();
      this.getViewDate();
      this.getListApplyMeetingroom(this.queryParams);
    },
    // 点击今天按钮
    today() {
      this.calendar.today();
      this.getViewDate();
      this.getListApplyMeetingroom(this.queryParams);
    },
    handleDateClick: function (arg) {
      this.$forceUpdate();
      console.log(arg, "事件1");
    },
    handleEventClick(calEvent) {
      console.log(calEvent, "事件2");
      this.title = "查看会议详情";
      // 将 extendedProps 里的字段及数值逐个放入 this.form
      const extendedProps = calEvent.event.extendedProps;
      for (const key in extendedProps) {
        if (extendedProps.hasOwnProperty(key)) {
          this.form[key] = extendedProps[key];
        }
      }
      this.eventClickFlag = true;
      this.dialogVisible = true; // 显示dialog弹窗
    },
    getShowTime(beginDate, endDate) {
      this.form.startDate = this.dealWithTime(beginDate);
      this.form.startTime = this.getHoursMin(beginDate);
      this.form.endDate = this.dealWithTime(endDate);
      this.form.endTime = this.getHoursMin(endDate);
    },
    // 获取时分时间
    getHoursMin(value) {
      return value.substring(11, 16);
    },
    // 处理会议时间格式
    dealWithTime(date) {
      let newDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(date)[0];
      return newDate;
    },
    handleEvents(events) {
      console.log(events, "事件3");
    },
    getReservationList(arrayData) {
      let newArr = [];
      this.subList = arrayData;
      arrayData.forEach((item) => {
        newArr.push({
          start: this.dealWithTime(item.beginDate),
          end: this.addDate(this.dealWithTime(item.endDate), 1),
          color: item.status,
          id: item.id,
          title: `${this.getTitle(item.beginDate, item.endDate)} ${item.title}`,
        });
      });
      this.calendarOptions.events = newArr;
    },
    //UTC时间去掉T
    formmatTime(time) {
      const utcTimestamp = time;
      const date = new Date(utcTimestamp);

      const year = date.getUTCFullYear();
      const month = String(date.getUTCMonth() + 1).padStart(2, "0");
      const day = String(date.getUTCDate()).padStart(2, "0");

      const hours = String(date.getUTCHours()).padStart(2, "0");
      const minutes = String(date.getUTCMinutes()).padStart(2, "0");
      const seconds = String(date.getUTCSeconds()).padStart(2, "0");

      const formattedDateTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;

      return formattedDateTime;
    },

    datesSet(info) {
      //注意:该方法在页面初始化时就会触发一次
      this.viewType = info.view.type;
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
        }
      });
    },
  },
};
</script>
<style scoped lang="scss">
::v-deep .el-select {
  width: 100%;
}
::v-deep .el-date-editor.el-input,
.el-date-editor.el-input__inner {
  width: 100%;
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2247532.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Oracle SQL优化③——表的连接方式

前言 表&#xff08;结果集&#xff09;与表&#xff08;结果集&#xff09;之间的连接方式非常重要&#xff0c;如果CBO选择了错误的连接方式&#xff0c;本来几秒就能出结果的SQL可能执行一天都执行不完。如果想要快速定位超大型SQL性能问题&#xff0c;就必须深入理解表连接…

小程序25- iconfont 字体图标的使用

项目中使用到图标&#xff0c;一般由公司设计进行设计&#xff0c;设计好后上传到阿里巴巴矢量图标库 日常开发过程中&#xff0c;也可以通过 iconfont 图标库下载使用自带的图标 补充&#xff1a;使用 iconfont 图标库报错&#xff1a;Failed to load font 操作步骤&#xff…

Java基于SpringBoot+Vue的藏区特产销售平台

博主介绍&#xff1a;✌程序员徐师兄、7年大厂程序员经历。全网粉丝12w、csdn博客专家、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和毕业项目实战✌ &#x1f345;文末获取源码联系&#x1f345; &#x1f447;&#x1f3fb; 精彩专栏推荐订阅&#x1f447;…

selinux及防火墙

selinux说明 SELinux 是 Security-Enhanced Linux 的缩写&#xff0c;意思是安全强化的 linux 。 SELinux 主要由美国国家安全局&#xff08; NSA &#xff09;开发&#xff0c;当初开发的目的是为了避免资源的误用。 httpd进程标签&#xff08;/usr/share/nginx/html &#…

详细探索xinput1_3.dll:功能、问题与xinput1_3.dll丢失的解决方案

本文旨在深入探讨xinput1_3.dll这一动态链接库文件。首先介绍其在计算机系统中的功能和作用&#xff0c;特别是在游戏和输入设备交互方面的重要性。然后分析在使用过程中可能出现的诸如文件丢失、版本不兼容等问题&#xff0c;并提出相应的解决方案&#xff0c;包括重新安装相关…

生成对抗网络模拟缺失数据,辅助PAMAP2数据集仿真实验

PAMAP2数据集是一个包含丰富身体活动信息的数据集&#xff0c;它为我们提供了一个理想的平台来开发和测试HAR模型。本文将从数据集的基本介绍开始&#xff0c;逐步引导大家通过数据分割、预处理、模型训练&#xff0c;到最终的性能评估&#xff0c;在接下来的章节中&#xff0c…

IEC61850读服务器目录命令——GetServerDirectory介绍

IEC61850标准中的GetServerDirectory命令是变电站自动化系统中非常重要的一个功能&#xff0c;它主要用于读取服务器的目录信息&#xff0c;特别是服务器的逻辑设备节点&#xff08;LDevice&#xff09;信息。以下是对GetServerDirectory命令的详细介绍。 目录 一、命令功能 …

基于CNN+RNNs(LSTM, GRU)的红点位置检测(pytorch)

1 项目背景 需要在图片精确识别三跟红线所在的位置&#xff0c;并输出这三个像素的位置。 其中&#xff0c;每跟红线占据不止一个像素&#xff0c;并且像素颜色也并不是饱和度和亮度极高的红黑配色&#xff0c;每个红线放大后可能是这样的。 而我们的目标是精确输出每个红点的…

前端:JavaScript (学习笔记)【2】

目录 一&#xff0c;数组的使用 1&#xff0c;数组的创建 [ ] 2&#xff0c;数组的元素和长度 3&#xff0c;数组的遍历方式 4&#xff0c;数组的常用方法 二&#xff0c;JavaScript中的对象 1&#xff0c;常用对象 &#xff08;1&#xff09;String和java中的Stri…

全面解析多种mfc140u.dll丢失的解决方法,五种方法详细解决

当你满心期待地打开某个常用软件&#xff0c;却突然弹出一个错误框&#xff0c;提示“mfc140u.dll丢失”&#xff0c;那一刻&#xff0c;你的好心情可能瞬间消失。这种情况在很多电脑用户的使用过程中都可能出现。无论是游戏玩家还是办公族&#xff0c;面对这个问题都可能不知所…

STM32总体架构简单介绍

目录 一、引言 二、STM32的总体架构 1、三个被动单元 &#xff08;1&#xff09;内部SRAM &#xff08;2&#xff09;内部闪存存储器 &#xff08;3&#xff09;AHB到APB的桥&#xff08;AHB to APBx&#xff09; 2、四个主动&#xff08;驱动&#xff09;单元 &#x…

【PHP】 环境以及插件的配置,自学笔记(一)

文章目录 环境的准备安装 XAMPPWindowMacOS 配置开发环境Vscode 关于 PHP 的插件推荐Vscode 配置 php 环境Apache 启动Hello php配置热更新 参考 环境的准备 下载 XAMPP , 可以从 官网下载 https://www.apachefriends.org/download.html 安装 XAMPP XAMPP 是一个跨平台的集成开…

跟着问题学5——深度学习中的数据集详解(1)

深度学习数据集的创建与读取 数据 &#xff08;计算机术语&#xff09; 数据(data)是事实或观察的结果&#xff0c;是对客观事物的逻辑归纳&#xff0c;是用于表示客观事物的未经加工的的原始素材。 数据可以是连续的值&#xff0c;比如声音、图像&#xff0c;称为模拟数据。…

实验-Linux文件系统和磁盘管理

操作1 远程连接Linux系统 下述连接方式2选一即可。 使用xshell工具连接Linux系统。打开xshell&#xff0c;新建连接&#xff0c;将主机ip修改为实际Linux系统的ip(ifconfig命令查看)&#xff0c;可以新建多个xshell会话&#xff0c;使用不同的用户名登录&#xff0c;方便后续…

GPTZero:高效识别AI生成文本,保障学术诚信与内容原创性

产品描述 GPTZero 是一款先进的AI文本检测工具&#xff0c;专为识别由大型语言模型&#xff08;如ChatGPT、GPT-4、Bard等&#xff09;生成的文本而设计。它通过分析文本的复杂性和一致性&#xff0c;判断文本是否可能由人类编写。GPTZero 已经得到了超过100家媒体机构的报道&…

Apple Vision Pro开发003-PolySpatial2.0新建项目

unity6.0下载链接:Unity 实时开发平台 | 3D、2D、VR 和 AR 引擎 一、新建项目 二、导入开发包 com.unity.polyspatial.visionos 输入版本号 2.0.4 com.unity.polyspatial&#xff08;单独导入&#xff09;&#xff0c;或者直接安装 三、对应设置 其他的操作与之前的版本相同…

百度在下一盘大棋

这两天世界互联网大会在乌镇又召开了。 我看到一条新闻&#xff0c;今年世界互联网大会乌镇峰会发布“2024 年度中国互联网企业创新发展十大典型案例”&#xff0c;百度文心智能体平台入选。 这个智能体平台我最近也有所关注&#xff0c;接下来我就来讲讲它。 百度在下一盘大棋…

038集——quadtree(CAD—C#二次开发入门)

效果如下&#xff1a; using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.DatabaseServices; using Autodesk.AutoCAD.EditorInput; using Autodesk.AutoCAD.Geometry; using System; using System.Collections.Generic; using System.Linq; using System.T…

深入探讨 Puppeteer 如何使用 X 和 Y 坐标实现鼠标移动

背景介绍 现代爬虫技术中&#xff0c;模拟人类行为已成为绕过反爬虫系统的关键策略之一。无论是模拟用户点击、滚动&#xff0c;还是鼠标的轨迹移动&#xff0c;都可以为爬虫脚本带来更高的“伪装性”。在众多的自动化工具中&#xff0c;Puppeteer作为一个无头浏览器控制库&am…

RabbitMQ2:介绍、安装、快速入门、数据隔离

欢迎来到“雪碧聊技术”CSDN博客&#xff01; 在这里&#xff0c;您将踏入一个专注于Java开发技术的知识殿堂。无论您是Java编程的初学者&#xff0c;还是具有一定经验的开发者&#xff0c;相信我的博客都能为您提供宝贵的学习资源和实用技巧。作为您的技术向导&#xff0c;我将…