记录el-select+el-tree复选框,支持模糊查询,懒加载,树父子节点不关联,不全选

需求:一个机构下拉菜单,一个人员下拉菜单,默认带入当前登录用户的机构和人员。机构下拉菜单为两个接口,模糊查询为一个接口不包含懒加载,默认非模糊查询情况下为一个接口,点击节点懒加载。机构下拉菜单数据变动更新人员下拉菜单数据。日期默认为当天

<template>
    <div class="app-container">
        <div id="app" class="mb82 grid-content pd20">
          <div>
              <el-row :gutter="20">
                  <el-col id="tittle">检查信息</el-col>
              </el-row>
               <el-divider ></el-divider>
          </div>
          <div class="center">
            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
              <el-form-item label="检查时间:" prop="checkTime">
                <el-date-picker
                  class="width100"
                  v-model="ruleForm.checkTime"
                  type="date"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  placeholder="选择日期">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="检查机构:" prop="selectOrg">
                <el-select
                    class="el-input-search width100"
                    v-model="ruleForm.selectOrg"
                    ref="refSelectOrg"
                    :multiple="true"
                    @remove-tag="removetagOrg"
                    @clear="clearallOrg"
                    clearable
                    @change ="$forceUpdate();">
                    <el-option
                        value=""
                        style="height:auto;background-color: #fff;">
                        <el-input
                            :validate-event="false"
                            v-model="filterTextOrg"
                            ref="refSelectOrgSearch"
                            placeholder="请输入"
                            @click.stop.native
                            clearable
                            @clear="clearallOrgSearch"
                            style="margin-bottom:8px;"></el-input>
                        <el-tree
                          :show-checkbox="true"
                          style="padding:20px 10px;"
                          :data="orgList"
                          :props="defaultPropsOrg"
                          node-key="orgId"
                          check-strictly
                          highlight-current
                          :expand-on-click-node="true"
                          ref="refTreeOrg"
                          :default-expanded-keys="expandedKeysOrgData"
                          :default-checked-keys="checkedKeysOrgData"
                          @check-change="handleNodeCheckOrg"
                          @node-click="handleNodeClick">
                        </el-tree>
                    </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="检查人员:" prop="selectUser">
                <el-select
                    class="el-input-search width100"
                    v-model="ruleForm.selectUser"
                    ref="refSelectOrg"
                    :multiple="true"
                    @remove-tag="removetagUser"
                    @clear="clearallUser"
                    clearable
                    @change ="$forceUpdate();">
                    <el-option
                        value=""
                        style="height:auto;background-color: #fff;">
                        <el-input
                            :validate-event="false"
                            v-model="filterTextUser"
                            ref="refSelectUserSearch"
                            placeholder="请输入"
                            @click.stop.native
                            clearable
                            @clear="clearallUserSearch"
                            style="margin-bottom:8px;"></el-input>
                        <el-tree
                          :show-checkbox="true"
                          style="padding:20px 10px;"
                          :data="userList"
                          :props="defaultPropsUser"
                          node-key="userId"
                          check-strictly
                          highlight-current
                          :expand-on-click-node="true"
                          ref="refTreeUser"
                          :default-expanded-keys="expandedKeysUserData"
                          :default-checked-keys="checkedKeysUserData"
                          @check-change="handleNodeCheckUser">
                        </el-tree>
                    </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="检查结果:" prop="checkResult">
                <el-input type="textarea" v-model="ruleForm.checkResult"></el-input>
              </el-form-item>
            </el-form>
          </div>
        </div>
        <div class="footerBtn bg">
          <el-divider></el-divider>
          <el-row class="pd20">
            <el-col :span="23" style="text-align: right;">
              <el-button size="small" @click="goback">返回</el-button>
              <el-button type="primary" size="small" @click="submitBtn('ruleForm')">提交</el-button>
            </el-col>
          </el-row>
        </div>
    </div>
</template>

<script>
import axios from "axios";
import {warnView,getInfo,childNode,childNodeFuzzyQuery,getUserListByOrg,saveCheck} from "../../../../api/warning"
export default {
    data() {
      return {
  // 检察机构start
        filterTextOrg:'',
        orgList:[],
        defaultPropsOrg: {
          children: 'childNodeList',
          label: 'orgName',
          value:'orgId',
          isLeaf: 'leaf'
        },
        expandedKeysOrgData:['792394093041156096'],
        checkedKeysOrgData:[],
        nodeCheckedOrgData:[],
  // 检察机构end
  // 检察人员start
        filterTextUser:'',
        userList:[],
        defaultPropsUser: {
          children: 'userList',
          label: 'realName',
          value:'userId',
          isLeaf: 'leaf'
        },
        expandedKeysUserData:[],
        checkedKeysUserData:[],
        nodeCheckedUserData:[],
  // 检察人员end
        ruleForm: {
          checkTime: '',
          selectOrg: [],
          selectUser: [],
          checkResult: '',
        },
        rules: {
          checkTime: [
            { required: true, message: '检查时间不能为空', trigger: 'change' },
          ],
          selectOrg: [
            { type: 'array', required: true, message: '检查机构不能为空', trigger: 'change' },
          ],
          selectUser: [
            { type: 'array', required: true, message: '检查人员不能为空', trigger: 'change' },
          ],
          checkResult: [
            { required: true, message: '检查结果不能为空', trigger: 'blur' },
          ],
        },
        orgId:'',
        orgName:'',
      }
    },
    watch: {
      // 检察机构start
      // 监听输入值
      filterTextOrg(val) {
        if(val){
          this.childNodeFuzzyQueryChange(val)
        }else{
          this.childNodeChangeAll(this.orgId)
        }
      },
      'ruleForm.selectOrg': {
        handler: function (newVal, oldVal) {
          let that = this
            if(newVal){
              // this.$refs.refTreeOrg.filter(newVal);
            }else{
              console.log('newVal1111111',newVal)

            }
        },
        deep: true
      },
      // 检察机构end
      // 检察人员start
      filterTextUser(val) {
        this.getUserListByOrgChange(val)
      },

      // 检察人员end
    },
    created() {
      getInfo("").then((res) => {
        this.userId = res.data.userId;
        this.realName = res.data.realName;
        this.orgId = res.data.orgId;
        this.orgName = res.data.orgName;
        this.nodeCheckedOrgData = [{
           orgId:this.orgId,
           orgName:this.orgName,
         }]
        this.ruleForm.selectOrg.push(this.orgName)
        this.checkedKeysOrgData.push(this.orgId)
        this.childNodeChangeAll('792394093041156096')

        this.nodeCheckedUserData = [{
           userId:this.userId,
           realName:this.realName,
         }]
        this.ruleForm.selectUser.push(this.realName)
        this.checkedKeysUserData.push(this.userId)
        this.getUserListByOrgChange();
      })

    },
    mounted() {
      this.ruleForm.superviseId = this.$route.query.superviseId; // 监管idDate().getTime(); // 检查编号
      this.ruleForm.checkTime = this.dateTypeFormat('YYYY-mm-dd HH:MM:SS', new Date())
    },
    methods: {
      // 去重
      unique(arr){
        return Array.from(new Set(arr))
      },
      // 返回上一页
      goback() {
        this.$router.go(-1);
      },
      // 格式化日期
      dateTypeFormat(fmt, date) {
        let ret
        const opt = {
          'Y+': date.getFullYear().toString(), // 年
          'm+': (date.getMonth() + 1).toString(), // 月
          'd+': date.getDate().toString(), // 日
          'H+': date.getHours().toString(), // 时
          'M+': date.getMinutes().toString(), // 分
          'S+': date.getSeconds().toString() // 秒
          // 有其他格式化字符需求可以继续添加,必须转化成字符串
        }
        for (const k in opt) {
          ret = new RegExp('(' + k + ')').exec(fmt)
          if (ret) {
            fmt = fmt.replace(ret[1], (ret[1].length === 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, '0')))
          }
        }
        return fmt
      },
// 检察机构start
      // 获取模糊查询机构树
      childNodeFuzzyQueryChange(val){
        let data = {
          orgId:'',
          value:val
        }
        childNodeFuzzyQuery(data).then((res) => {
          this.orgList = res.data || [];
        })
      },
      // 获取机构树非模糊查询
      childNodeChangeAll(id){
        let orgId = id || ''
        childNode(orgId).then((res) => {
          res.data.node.childNodeList = res.data.childOrgList
          this.orgList = []
          this.orgList.push(res.data.node);
         })
      },
      // 删除机构单个下拉菜单标签
      removetagOrg(val){
        this.nodeCheckedOrgData.forEach((item, index, arr) => {
          if(item.orgName === val) {
            arr.splice(index, 1)
            this.checkedKeysOrgData = this.checkedKeysOrgData.filter(i => i !== item.orgId)
          }
        })
          this.checkedKeysOrgData = this.unique(this.checkedKeysOrgData)

          this.$nextTick(() => {
             this.$refs.refTreeOrg.setCheckedKeys(this.checkedKeysOrgData,true)
          })
          // 数据变动更改人员树
          this.nodeCheckedUserData=[];
          this.ruleForm.selectUser=[];
          this.checkedKeysUserData=[];
          this.getUserListByOrgChange('')
      },
      // 清空机构下拉菜单
      clearallOrg(){},
      // 清空机构模糊查询
      clearallOrgSearch(){},
      // 点击机构树复选框
      handleNodeCheckOrg(data,checked){
        if(checked === true) {
            this.ruleForm.selectOrg.push(data.orgName)
            this.checkedKeysOrgData.push(data.orgId)
            this.nodeCheckedOrgData.push(data)
            if(this.ruleForm.selectOrg)
            this.ruleForm.selectOrg = this.unique(this.ruleForm.selectOrg)
            this.checkedKeysOrgData = this.unique(this.checkedKeysOrgData)
            const map = new Map();
            this.nodeCheckedOrgData.filter(i => !map.has(i.orgId) && map.set(i.orgId, i));
            this.$refs.refTreeOrg.setChecked(data.orgId, true)
          }else{
            this.nodeCheckedOrgData.forEach((item, index, arr) => {
              if(item.orgId === data.orgId) {
                arr.splice(index, 1)
                this.checkedKeysOrgData = this.checkedKeysOrgData.filter(i => i !== item.orgId)
              }
            })
            if(this.ruleForm.selectOrg.includes(data.orgName)) {
              this.ruleForm.selectOrg.forEach((item, index, arr) => {
                if(item === data.orgName) {
                  arr.splice(index, 1)
                }
              })
              this.$refs.refTreeOrg.setChecked(data.orgId, false)
            }
          }
          // 数据变动更改人员树
          this.nodeCheckedUserData=[];
          this.ruleForm.selectUser=[];
          this.checkedKeysUserData=[];
          this.getUserListByOrgChange('')

      },
      // 点击机构树节点
      handleNodeClick(data,node){
        console.log(data)
        console.log(node)
        let that = this
        let orgId = '';
        if (node.level >= 1) {
             orgId = node.data.orgId;
         }

        childNode(orgId).then((res) =>{
          if(res.code == 20000){
            let parentData = [];
            let data;
          if (node.level === 0) {
            parentData[0] = res.data.node
            data = parentData;
           }
          if (node.level >= 1) {
               data = res.data.childOrgList;
           }

           //TODO 追加数据 append data
          this.$refs.refTreeOrg.updateKeyChildren(orgId,res.data.childOrgList);
          setTimeout(()=>{
            if(res.data.childOrgList){ node.expanded = true}
          },300)
          } else {
            this.$message({
                message: res.message,
                type: "error"
            });
          }
        })
      },
// 检查机构end
// 检察人员start
      // 获取模糊查询人员树
            getUserListByOrgChange(val){
              this.checkedKeysOrgData = this.unique(this.checkedKeysOrgData)

              let data = {
                orgIds:this.checkedKeysOrgData,
                searchValue:val || ''
              }
              getUserListByOrg(data).then((res) => {
                this.userList = res.data || [];
              })
            },

            // 删除人员单个下拉菜单标签
            removetagUser(val){
                this.nodeCheckedUserData.forEach((item, index, arr) => {
                  if(item.realName === val) {
                    arr.splice(index, 1)
                    this.checkedKeysUserData = this.checkedKeysUserData.filter(i => i !== item.userId)
                  }
                })
                this.checkedKeysUserData = this.unique(this.checkedKeysUserData)

                this.$nextTick(() => {
                   this.$refs.refTreeUser.setCheckedKeys(this.checkedKeysUserData,true)
                })
            },
            // 清空人员下拉菜单
            clearallUser(){},
            // 清空人员模糊查询
            clearallUserSearch(){},
            // 点击人员树复选框
            handleNodeCheckUser(data,checked){
              if(checked === true) {
                  this.ruleForm.selectUser.push(data.realName)
                  this.checkedKeysUserData.push(data.userId)
                  this.nodeCheckedUserData.push(data)
                  if(this.ruleForm.selectUser)
                  this.ruleForm.selectUser = this.unique(this.ruleForm.selectUser)
                  this.checkedKeysUserData = this.unique(this.checkedKeysUserData)
                  const map = new Map();
                  this.nodeCheckedUserData.filter(i => !map.has(i.userId) && map.set(i.userId, i));
                  this.$refs.refTreeUser.setChecked(data.userId, true)
                }else{
                  this.nodeCheckedUserData.forEach((item, index, arr) => {
                    if(item.userId === data.userId) {
                      arr.splice(index, 1)
                      this.checkedKeysUserData = this.checkedKeysUserData.filter(i => i !== item.userId)
                    }
                  })
                  if(this.ruleForm.selectUser.includes(data.realName)) {
                    this.ruleForm.selectUser.forEach((item, index, arr) => {
                      if(item === data.realName) {
                        arr.splice(index, 1)
                      }
                    })
                    this.$refs.refTreeUser.setChecked(data.userId, false)
                  }
                }


            },

// 检查人员end
      // 表单提交弹窗
      submitBtn(formName){
        this.$refs[formName].validate((valid) => {
          if (valid) {
            this.$confirm('确定提交吗?', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'
            }).then(() => {
              this.submitChange();
            }).catch(() => {
              this.$message({
                type: 'info',
                message: '已取消'
              });
            });

          } else {
            return false;
          }
        });
      },
      // 提交表单
      submitChange(){
        const map = new Map();
        this.nodeCheckedOrgData = this.nodeCheckedOrgData.filter(i => !map.has(i.orgId) && map.set(i.orgId, i));
        this.nodeCheckedUserData = this.nodeCheckedUserData.filter(i => !map.has(i.userId) && map.set(i.userId, i));
        this.ruleForm.orgList = this.nodeCheckedOrgData;
        this.ruleForm.userList = this.nodeCheckedUserData;

        let data = {
          superviseId:this.ruleForm.superviseId,
          orgList:this.ruleForm.orgList,
          userList:this.ruleForm.userList,
          checkResult:this.ruleForm.checkResult,
          checkTime:this.ruleForm.checkTime,
        }
        console.log('data',data)
        saveCheck(data).then((res) => {
          if(res.code == '20000'){
            this.$message({
              message: '提交成功',
              type: 'success'
            });
            this.$router.go(-1);
          }else{
            this.$message({
              message: res.message,
              type: 'error'
            });
          }
        })
      },

    }
}
</script>

<style scoped lang="less">
.app-container {
  margin: 10px;
}
#app {
  /* padding: 15px; */
  background-color: #fff;
  font-size: 14px;
}
  .title{
    text-align: center;
    color: #0066FF;
    font-weight:800;
    font-size: 16px;
  }
  .chart-container{
    position: relative;
    width: 100%;
    height: calc(100vh - 84px);
  }

  .description{
    font-size: 12px;
    padding-left: 20px;
    color: #555;
  }
  .mt10{
    margin-top: 10px;
  }
  .mg15-0{
	  margin: 15px 0;
  }
  .mt30{
    margin-top: 30px;
  }
  .mt26{
    margin-top: 26px;
  }
  .state-box{
    width: 10px;
    height: 10px;
    margin-right: 5px;
    margin-bottom: 1px;
    display: inline-block;
  }
  .state-box-max {
    width: 19px;
    height: 16px;
    text-align: center;
    line-height: 16px;
    color: #fff;
    margin-right: 10px;
    margin-top: 1px;
    display: inline-block;
  }
  .violet{
    background: #9933FF;
  }
  .yellow{
    background: #e6a23c;
  }
  .blue{
    background: #0066FF;
  }
  .footerBtn{
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 9;
    width: calc(100%);
    -webkit-transition: width 0.28s;
    transition: width 0.28s;
  }
  .el-divider--horizontal{margin: 0px 15px;}
  .bg{
    background: #fff;
  }
 .el-col{
   margin:0 24px;
 }
  .pdt10{
    padding-top: 10px;
  }
  .mb15{
    margin-bottom: 15px;
  }
  .mb82{
    margin-bottom: 82px;
  }
  .mb60{
    margin-bottom: 60px;
  }
  .mb10{
    margin-bottom: 10px;
    margin-top: 10px;
  }
  .diaglogClas{
    margin-bottom: 15px;
  }
  .grid-content {
   /*  padding-top: 15px; */
    border-radius: 4px;
    min-height: 36px;
    background: #fff;
  }
  .bg-purple {
    /* background: #dddfe6; */
    width: 100%;
    height: 55px;
    line-height: 55px;
    font-size: 12px;
    /* font-weight:800; */
    text-align: center;
    border: 1px solid #d3dce6;
  }

  .expClas{
      float: right;
      position: initial;
      margin-top: 30px;
  }
  .footCenter{
    text-align: center;
  }
/deep/.el-autocomplete-suggestion{
  display: inline-table;
}
.width100{width: 100%;}
.center{
  width: 700px;
  margin: 0 auto;
  padding-top: 20px;
  padding-bottom: 20px;
}
.footerBtn{
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 9;
    width: calc(100%);
    -webkit-transition: width 0.28s;
    transition: width 0.28s;
}
.bg{background: #fff;}
.pd20{padding: 15px;padding-right: 0;}
</style>

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

全球大模型陷入高质量语料荒?

2023年12月18日&#xff0c;部分用户在对谷歌Gemini进行测试时&#xff0c;发现如果用中文请Gemini介绍自己时&#xff0c;Gemini会回复自己是“由百度公司开发的对话式人工智能模型&#xff0c;名叫文心一言”&#xff01;当换成英文与之交流&#xff0c;Gemini则恢复了自己是…

JVM-JVM支持高并发底层原理精讲

一、透彻掌握高并发-从理解JVM开始 二、从线程的开闭看JVM的作用 1.run方法 启动start方法&#xff0c;会调用底层C方法&#xff0c;告诉操作系统当前线程处于可运行状态&#xff0c;而如果直接调用run方法&#xff0c;则就不是以线程的方式来运行了&#xff0c;只是当做一个普…

变电 | 主变压器异常处理案例两则

【案例一】 【案例二】 最近省企业联合会公布了 优秀企业管理论文结果 去年年末投的论文 获得了二等奖 巴适

先爬、再行、最后跑,“流程挖掘之父”Wil教授谈流程挖掘的突破之路

商界有句俗话&#xff1a;“先爬&#xff0c;再行&#xff0c;最后跑”。这正是实现有价值突破的过程。 作者 | Wil van der Aalst教授 海明威在他的某部作品中描绘了这样一幕&#xff1a;有人询问如何走向破产&#xff0c;得到的答案是“开始时循序渐进&#xff0c;之后突然…

评论转换输出 - 华为OD统一考试

OD统一考试 分值&#xff1a; 200分 题解&#xff1a; Java / Python / C 题目描述 在一个博客网站上&#xff0c;每篇博客都有评论。每一条评论都是一个非空英文字母字符串。 评论具有树状结构&#xff0c;除了根评论外&#xff0c;每个评论都有一个父评论。当评论保存时&am…

重新分区扩展C盘

电脑 – 管理 使用第三方工具&#xff1a;DiskGenius数据恢复及分区管理软件 要选择完成后重启 &#xff0c;如果这里忘记勾选&#xff0c;后面也会再次提醒并默认勾选重启 "调整后容量"是指图片上显示的非C盘之外的盘符的容量&#xff0c;这里指E盘大小 上面已经利…

做一个个人博客第一步该怎么做?

做一个个人博客第一步该怎么做&#xff1f; 好多零基础的同学们不知道怎么迈出第一步。 那么&#xff0c;就找一个现成的模板学一学呗&#xff0c;毕竟我们是高贵的Ctrl c v 工程师。 但是这样也有个问题&#xff0c;那就是&#xff0c;那些模板都&#xff0c;太&#xff01;…

运动模型非线性扩展卡尔曼跟踪融合滤波算法(Matlab仿真)

卡尔曼滤波的原理和理论在CSDN已有很多文章&#xff0c;这里不再赘述&#xff0c;仅分享个人的理解和Matlab仿真代码。 1 单目标跟踪 匀速转弯&#xff08;CTRV&#xff09;运动模型下&#xff0c;摄像头输出目标状态camera_state [x, y, theta, v]&#xff0c;雷达输出目标状…

【浅尝C++】引用

&#x1f388;归属专栏&#xff1a;浅尝C &#x1f697;个人主页&#xff1a;Jammingpro &#x1f41f;记录一句&#xff1a;大半夜写博客的感觉就是不一样&#xff01;&#xff01; 文章前言&#xff1a;本篇文章简要介绍C中的引用&#xff0c;每个介绍的技术点&#xff0c;在…

井盖异动传感器,守护脚下安全

随着城市化进程的加速&#xff0c;城市基础设施的安全问题日益受到关注。其中&#xff0c;井盖作为城市地下管道的重要入口&#xff0c;其安全问题不容忽视。然而&#xff0c;传统的井盖监控方式往往存在盲区&#xff0c;无法及时发现井盖的异常移动。为此&#xff0c;我们推出…

数据库与低代码:加速开发,提升效率的完美结合

随着技术的不断进步&#xff0c;数据库和低代码开发成为了现代应用程序开发中的两大关键要素。本文将探讨如何通过结合数据库和低代码开发&#xff0c;加速应用程序的开发过程&#xff0c;并提高开发效率和质量。 在过去的几十年中&#xff0c;数据库一直被视为应用程序开发中不…

【Linux进程】查看进程fork创建进程

目录 前言 1. 查看进程 2. 通过系统调用创建进程-fork初识 总结 前言 你有没有想过在使用Linux操作系统时&#xff0c;后台运行的程序是如何管理的&#xff1f;在Linux中&#xff0c;进程是一个非常重要的概念。本文将介绍如何查看当前运行的进程&#xff0c;并且讨论如何使用…

Sip - Ubuntu 配置 miniSIPServer 服务器(测试用)

客户提供的账号过期了&#xff0c;简单搭建 SIP 服务器&#xff0c;以便测试使用。个人认为这个配置起来最为简单&#xff0c;且测试功能足够。 官网miniSIPServer - 基于 Windows 以及 Linux 平台的 VoIP (SIP) 服务器软件. miniSIPServer 可能是最容易使用的 VoIP(SIP) 服务器…

获取进行逗号分隔的id值 Split的使用

获取进行逗号分隔的id值,Split的使用 后台实现对有逗号进行分割的字符串 使用这行代码就不会有一个空数组值,直接过滤调数组中的空值 var ids = key.Split(,).Where(s => !string.IsNullOrEmpty(s

进行交流负载测试的步骤和规范

交流负载测试是一种评估系统在正常或峰值负载下的性能和稳定性的测试方法。以下是进行交流负载测试的步骤和规范&#xff1a; 1. 确定测试目标&#xff1a;首先&#xff0c;需要明确测试的目标&#xff0c;例如&#xff0c;测试系统的响应时间、吞吐量、错误率等。 2. 设计测试…

Linux系统操作命令

Linux管理 在线查询Linux命令&#xff1a; https://www.runoob.com/linux/linux-install.htmlhttps://www.linuxcool.com/https://man.linuxde.net/ 1.Linux系统目录结构 Linux系统的目录结构是一个树状结构&#xff0c;每一个文件或目录都从根目录开始&#xff0c;并且根目…

双亲委派机制[人话版]

本篇文章仅作为记录学习之用,不具有参考价值. 如果您想系统学习,请移步最下方参考资料. 介绍 今天逛了一下牛客网, 看到有面试问到了双亲委派机制是什么, tomcat有没有打破双亲委派 , 瞬间懵逼, 听都没听过的名字, 听着就稀奇古怪. 然后翻了一下网上的答案,大概了解怎么回事.…

Python自动化测试数据驱动解决数据错误

数据驱动将测试数据和测试行为完全分离&#xff0c;实施数据驱动测试步骤如下&#xff1a; A、编写测试脚本&#xff0c;脚本需要支持从程序对象、文件或者数据库读入测试数据&#xff1b; B、将测试脚本使用的测试数据存入程序对象、文件或者数据库等外部介质中&#xff1b;…

知识库软件有很多,这几个最好用

时代进步的同时&#xff0c;逐渐优化的企业知识库已经成为企业优化工作效率、提升企业竞争力的重要工具。随着云计算和大数据技术的快速发展&#xff0c;知识库软件如雨后春笋般出现在人们的视野中。下面&#xff0c;我从寻宝者的角度&#xff0c;向大家稳稳地推荐三款最优秀的…

mp-html 微信原生小程序渲染富文本

引入组件 "usingComponents": {"mp-html": "/components/mp-html/index"}使用 <mp-html content"{{info.course_info.info}}" />获取组件 介绍 mp-html&#xff0c;小程序富文本解析利器 全面支持html标签 小程序大多数都是…
最新文章