vue+Element-ui实现树形组件、表格树

news2024/9/30 5:40:43

需求

要做出如下图所示的 树形表格,也就是数据之间有父子类关系的这种,可以点击展开、收缩

像上图这样的表格树

 

实现

1.使用树形组件

在学习树形表格之前,肯定得先搞懂普通的树形组件是怎么搞的,然后将其套到表格中就好了,请参考ElementUI官方文档中的使用方法

链接:组件 | Element 

基础用法展示

也就是数据中要有 children 作为树形组件中的 子数据

学会使用普通的树形结构之后,我们再来看 怎么使用树形的表格

 

2.使用树形表格

下面这段话出自博客:Element-ui 表格实现树形结构表格_elementui树形表格_在奋斗的大道的博客-CSDN博客

在el-table中,支持树类型的数据的显示。当 row 中包含 children 字段时,被视为树形数据。

渲染树形数据时,必须要指定 row-key。支持子节点数据异步加载。

通过指定 row 中的 hasChildren 字段来指定哪些行是包含子节点。children 与 hasChildren 都可以通过 tree-props 配置。

row-key="id"和:tree-props="{children: 'children', hasChildren: 'hasChildren'}是必须的。

 数据表格区代码

<!--    表格数据区-->
    <el-table
        v-if="refreshTable"
        v-loading="loading"
        :data="deptList"
        row-key="id"
        :default-expand-all="isExpandAll"
        :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
    >
      <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
      <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
    ......
    ......
    ......
    </el-table>

数据的格式

数据必须要有 children,例如下面的代码,就是树形表格数据的地方,我们伪造了一点数据,也是可以展示的。


// 表格树数据
deptList: [
  {
    id: "1",
    deptName: "若依科技",
    deptStatus: 1,
    superiorId: "0",
    orderNum: 1,
    ancestors: "0",
    createTime: "2023-07-18 08:49:56",
    leaderId: "1678651668064612354",
    children: [{
      id: "1",
      deptName: "若依科技",
      deptStatus: 1,
      superiorId: "0",
      orderNum: 1,
      ancestors: "0",
      createTime: "2023-07-18 08:49:56",
      leaderId: "1678651668064612354",
    }]
  },
],

伪造的代码 的效果如下图

伪造数据效果图

后端返回代码格式

 我们项目中返回的数据是下面代码,只需要将后端返回的data 与前端的表格绑定即可

{
    "status": 0,
    "data": [
        {
            "id": "1",
            "deptName": "若依科技",
            "deptStatus": 1,
            "superiorId": "0",
            "orderNum": 1,
            "ancestors": "0",
            "createTime": "2023-07-18 08:49:56",
            "leaderId": "1678651668064612354",
            "children": [
                {
                    "id": "2",
                    "deptName": "深圳总公司",
                    "deptStatus": 1,
                    "superiorId": "1",
                    "orderNum": 1,
                    "ancestors": "1",
                    "createTime": "2023-07-18 08:50:35",
                    "leaderId": "1678651883026886657",
                    "children": [
                        {
                            "id": "4",
                            "deptName": "研发部门",
                            "deptStatus": 1,
                            "superiorId": "2",
                            "orderNum": 1,
                            "ancestors": "1,2",
                            "createTime": "2023-07-18 08:53:09",
                            "leaderId": "1679386932135268353"
                        },
                        {
                            "id": "5",
                            "deptName": "市场部门",
                            "deptStatus": 1,
                            "superiorId": "2",
                            "orderNum": 2,
                            "ancestors": "1,2",
                            "createTime": "2023-07-18 08:53:43",
                            "leaderId": "1681179955059970050"
                        },
                        {
                            "id": "6",
                            "deptName": "测试部门",
                            "deptStatus": 1,
                            "superiorId": "2",
                            "orderNum": 3,
                            "ancestors": "1,2",
                            "createTime": "2023-07-18 08:54:06",
                            "leaderId": "1681181469627338754"
                        },
                        {
                            "id": "1683401601626902529",
                            "deptName": "新的部门",
                            "deptStatus": 0,
                            "superiorId": "2",
                            "orderNum": 4,
                            "ancestors": "1,2",
                            "createTime": "2023-07-24 16:59:53",
                            "leaderId": "1679386932135268353"
                        }
                    ]
                },
                {
                    "id": "3",
                    "deptName": "长沙分公司",
                    "deptStatus": 1,
                    "superiorId": "1",
                    "orderNum": 2,
                    "ancestors": "1",
                    "createTime": "2023-07-18 08:51:43",
                    "leaderId": "1679385454339403778",
                    "children": [
                        {
                            "id": "7",
                            "deptName": "市场部门",
                            "deptStatus": 1,
                            "superiorId": "3",
                            "orderNum": 1,
                            "ancestors": "1,3",
                            "createTime": "2023-07-18 08:54:26",
                            "leaderId": "1681181510534385666"
                        }
                    ]
                }
            ]
        }
    ],
    "success": true
}

真实数据效果图

前端全部代码

不建议直接看此处代码,写的杂而乱,建议先去看前面的简洁的代码 

<template>
  <!--与若依相比修改的地方:
  所有的parentId 修改成 superiorId
  所有的 deptId 修改成 id
  所有的 status 修改成 deptStatus
-->
  <div class="app-container">
<!--    头部搜索区-->
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
      <el-form-item label="部门名称" prop="deptName">
        <el-input
            v-model="queryParams.deptName"
            placeholder="请输入部门名称"
            clearable
            @keyup.enter.native="handleQuery"
        />
      </el-form-item>


      <el-form-item label="状态" prop="deptStatus">
        <el-select v-model="queryParams.deptStatus" placeholder="请选择状态">
          <el-option
              v-for="item in statusOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value">
          </el-option>
        </el-select>
      </el-form-item>



      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>




<!--  展开折叠、搜索区-->
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
            type="primary"
            plain
            icon="el-icon-plus"
            size="mini"
            @click="handleAdd"
            v-hasPermi="['system:dept:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
            type="info"
            plain
            icon="el-icon-sort"
            size="mini"
            @click="toggleExpandAll"
        >展开/折叠</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

<!--    表格数据区-->
    <el-table
        v-if="refreshTable"
        v-loading="loading"
        :data="deptList"
        row-key="id"
        :default-expand-all="isExpandAll"
        :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
    >
      <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
      <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
      <el-table-column prop="deptStatus" label="状态" width="100">
<!--        <template slot-scope="scope">-->
<!--          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>-->
<!--        </template>-->
        <template slot-scope="scope">
          <el-tag type="success" effect="dark" v-if="scope.row.deptStatus==1">正常</el-tag>
          <el-tag type="warning" effect="dark" v-if="scope.row.deptStatus==0">停用</el-tag>
        </template>

      </el-table-column>
      <el-table-column label="创建时间" align="center" prop="createTime" width="200">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime) }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['system:dept:edit']"
          >修改</el-button>
          <el-button
              size="mini"
              type="text"
              icon="el-icon-plus"
              @click="handleAdd(scope.row)"
              v-hasPermi="['system:dept:add']"
          >新增</el-button>
          <el-button
              v-if="scope.row.superiorId != 0"
              size="mini"
              type="text"
              icon="el-icon-delete"
              @click="handleDelete(scope.row)"
              v-hasPermi="['system:dept:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <!-- 添加或修改部门对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-row>
          <el-col :span="24" v-if="form.superiorId !== 0">

            <el-form-item label="上级部门" prop="superiorId">
<!--              <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />-->
              <el-input v-model="form.superiorId" placeholder="请输入上级部门id" />
            </el-form-item>

          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="部门名称" prop="deptName">
              <el-input v-model="form.deptName" placeholder="请输入部门名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="显示排序" prop="orderNum">
              <el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
            </el-form-item>
          </el-col>
        </el-row>

<!--        负责人信息只做显示,不可修改-->
        <el-row>
<!--          <el-col :span="12">-->
<!--            <el-form-item label="负责人id" prop="leader">-->
<!--              <el-input v-model="form.leaderId" placeholder="请输入负责人id" maxlength="20" :disabled="true" />-->
<!--            </el-form-item>-->
<!--          </el-col>-->
          <el-col :span="12">
            <el-form-item label="负责人姓名" prop="leader">
              <el-input v-model="form.userName" placeholder="请输入负责人姓名" maxlength="20" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="联系电话" prop="phone">
              <el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="11" :disabled="true"/>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="邮箱" prop="email">
              <el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" :disabled="true"/>
            </el-form-item>
          </el-col>


          <el-col :span="12">
            <el-form-item label="部门状态" prop="email">
              <el-input v-model="form.deptStatus" placeholder="请输入部门状态" maxlength="50" :disabled="true"/>
            </el-form-item>
          </el-col>

          <el-form-item label="状态" prop="deptStatus">
            <el-select v-model="form.deptStatus" placeholder="请选择状态">
              <el-option
                  v-for="item in statusOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>

<!--          <el-col :span="12">-->
<!--            <el-form-item label="部门状态">-->

<!--              <el-switch-->
<!--                  v-model="form.deptStatus"-->
<!--                  active-value="1"-->
<!--                  inactive-value="0"-->
<!--                  active-color="#13ce66"-->
<!--                  inactive-color="#ff4949">-->
<!--              </el-switch>-->

<!--                <el-radio  v-model="form.deptStatus" label="1" >正常</el-radio>-->
<!--                <el-radio  v-model="form.deptStatus" label="0" >停用</el-radio>-->


<!--            </el-form-item>-->
<!--          </el-col>-->
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
// import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import axios from 'axios'

export default {
  name: "Dept",
  dicts: ['sys_normal_disable'],
  components: { Treeselect },
  data() {
    return {



      urls:{
        listDept2:'/dept/list',// 查询部门列表:普通
        listDept:'/dept/getDeptTree',// 查询部门列表:树形
        addDept:'/dept/insert', // 新增部门
        delDept: '/dept/delete/',// 删除部门
        updateDept:'/dept/update',// 修改部门
        selectDeptById:'/dept/selectDeptById',// 根据id查询

        getDept:'/system/dept/',// 查询部门详细



        listDeptExcludeChild:'/user/add', // 查询部门列表(排除节点)



      },

      statusOptions:[
        {
          value: '0',
          label: '停用'
        },
        {
        value: '1',
        label: '正常'
        },
      ],



      //区分提交按钮:有提交id 就是修改,没有就是添加,因为修改需要id,添加不需要id
      submitId: undefined,
      // 遮罩层
      loading: false,
      // 显示搜索条件
      showSearch: true,
      // 表格树数据
      deptList: [
        {
          // id: "1",
          // deptName: "若依科技",
          // deptStatus: 1,
          // superiorId: "0",
          // orderNum: 1,
          // ancestors: "0",
          // createTime: "2023-07-18 08:49:56",
          // leaderId: "1678651668064612354",
          //
          // children: [{
          //   id: "1",
          //   deptName: "若依科技",
          //   deptStatus: 1,
          //   superiorId: "0",
          //   orderNum: 1,
          //   ancestors: "0",
          //   createTime: "2023-07-18 08:49:56",
          //   leaderId: "1678651668064612354",
          // }]
        },
      ],
      // 部门树选项
      deptOptions: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 是否展开,默认全部展开
      isExpandAll: true,
      // 重新渲染表格状态
      refreshTable: true,
      // 查询参数
      queryParams: {
        deptName: undefined,
        deptStatus: undefined,
      },
      // 表单参数
      form: {
      },
      // 表单校验
      rules: {
        // parentId: [
        superiorId: [
          { required: true, message: "上级部门不能为空", trigger: "blur" }
        ],
        deptName: [
          { required: true, message: "部门名称不能为空", trigger: "blur" }
        ],
        orderNum: [
          { required: true, message: "显示排序不能为空", trigger: "blur" }
        ],
        // email: [
        //   {
        //     type: "email",
        //     message: "请输入正确的邮箱地址",
        //     trigger: ["blur", "change"]
        //   }
        // ],
        // phone: [
        //   {
        //     pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
        //     message: "请输入正确的手机号码",
        //     trigger: "blur"
        //   }
        // ]
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {



    /** 查询部门列表:查出树形结构 */
    getList() {
      axios({
        method:"get",
        url:this.urls.listDept,
        params: {
          deptName : this.queryParams.deptName,
          deptStatus : this.queryParams.deptStatus,
        }
      }).then(res => {
        this.deptList = res.data.data;
          }
      );
    },




    /** 转换部门数据结构 */
    normalizer(node) {
      if (node.children && !node.children.length) {
        delete node.children;
      }
      return {
        // id: node.deptId,
        id: node.id,
        label: node.deptName,
        children: node.children
      };
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      //添加、修改 框数据清空
      this.form = {
        // deptId: undefined,
        // parentId: undefined,
        id: undefined,
        superiorId: undefined,
        deptName: undefined,
        orderNum: undefined,
        leader: undefined,
        phone: undefined,
        email: undefined,
        deptStatus: undefined,
      };
      // this.resetForm("form");
      //搜索框 数据清空
      this.queryParams  = {
        deptName: undefined,
        deptStatus: ' ',

      };

    },
    /** 搜索按钮操作 */
    handleQuery() {
      // this.getList();

      //搜索功能没有做树形结构,按照普通结构来的
      //先清空表格数据
      this.deptList = undefined;
      axios({
        method:"get",
        url:this.urls.listDept2,
        params: {
          deptName : this.queryParams.deptName,
          deptStatus : this.queryParams.deptStatus,
        }
      }).then(res => {
            this.deptList = res.data.data;
          }
      );
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.queryParams  = {
        deptName: undefined,
        deptStatus: undefined,

      };
      this.getList();
    },
    /** 新增 添加 按钮操作 */
    handleAdd(row) {
      this.reset();//表单重置
      //将 提交按钮 存的id清空了
      this.submitId = undefined
      if (row != undefined) {
        // this.form.parentId = row.deptId;
        this.form.superiorId = row.id;
      }
      this.open = true;
      this.title = "添加部门";
    },
    /** 展开/折叠操作 */
    toggleExpandAll() {
      this.refreshTable = false;
      this.isExpandAll = !this.isExpandAll;
      this.$nextTick(() => {
        this.refreshTable = true;
      });
    },

    /** 修改按钮操作 */
    handleUpdate(row) {
      // this.reset();
      this.submitId = row.id;
      //先拿着部门id去查询出来这条数据,并连带这将他的负责人信息查询出来,再把数据赋给form
      axios({
        method:"get",
        url:this.urls.selectDeptById,
        params: {
          id : row.id,
        }
      }).then(res => {
        //查询成功后复制给 修改弹框
        this.form = res.data.data;

          }
      );

        this.open = true;
        this.title = "修改部门";


    },
    /** 提交按钮 */
    submitForm: function() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.submitId != undefined) {//是修改,不是添加

            axios({
              method:"post",
              url:this.urls.updateDept,
              data: {
                id:this.submitId,
                deptName:this.form.deptName,
                leaderId:this.form.leaderId,
                // 修改的状态怎么 单选框?
                deptStatus:this.form.deptStatus,
                superiorId:this.form.superiorId,
                ancestors:this.form.ancestors,
                orderNum:this.form.orderNum,

              }
            }).then(res => {
                  this.$message({
                    type: 'success',
                    message: '修改成功!'
                  });
                  this.open = false;
                  this.getList();
                }
            );

          } else {//添加


            axios({
              method:"post",
              url:this.urls.addDept,
              data: {
                deptName:this.form.deptName,
                //负责人id???直接从查询的数据中取
                leaderId:this.form.leaderId,
                deptStatus:this.form.deptStatus,
                superiorId:this.form.superiorId,
                ancestors:this.form.ancestors,
                orderNum:this.form.orderNum,
              }
            }).then(res => {
              this.$message({
                type: 'success',
                message: '添加成功!'
              });

              this.open = false;
              this.getList();
                }
            );

          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {

      this.$confirm('是否删除选中的所有部门?删除后无法恢复!', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        axios({
          method:"get",
          url:this.urls.delDept,
          params: {
            id : row.id,
          }
        }).then(res => {
          if(res.data.deptStatus===0){
            this.getList();
            this.$message({
              type: 'success',
              message: '删除成功!'
            });
          }else{
            this.$message({
              type: 'error',
              message: res.data.msg
            });
          }
            }
        );

      }).catch(() => {});


    },
    //时间解析
    parseTime(time, pattern) {
      if (arguments.length === 0 || !time) {
        return null
      }
      const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
      let date
      if (typeof time === 'object') {
        date = time
      } else {
        if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
          time = parseInt(time)
        } else if (typeof time === 'string') {
          time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
        }
        if ((typeof time === 'number') && (time.toString().length === 10)) {
          time = time * 1000
        }
        date = new Date(time)
      }
      const formatObj = {
        y: date.getFullYear(),
        m: date.getMonth() + 1,
        d: date.getDate(),
        h: date.getHours(),
        i: date.getMinutes(),
        s: date.getSeconds(),
        a: date.getDay()
      }
      const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
        let value = formatObj[key]
        // Note: getDay() returns 0 on Sunday
        if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
        if (result.length > 0 && value < 10) {
          value = '0' + value
        }
        return value || 0
      })
      return time_str
    },
  }
};
</script>

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

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

相关文章

基于JavaSE的手机库存管理系统

1、项目背景 基于JavaSE完成如下需求&#xff1a; 功能需求&#xff1a; 1、查询库存量 2、可以修改库存中不同品牌手机的个数 3、退出系统 实现步骤&#xff1a; 1、把List当做库房 2、把手机存放在库房中 3、使用封装的方法区操作仓库中的手机 2、项目知识点 面向对象 集合…

存储过程——case函数、while函数、repeat函数的应用、loop函数

1.case循环 存储过程中&#xff0c;几种循环格式的语法讲解。 create procedure p6(in month int) begindeclare result varchar(10);casewhen month > 1 and month < 3 thenset result : 第一季度;when month > 4 and month < 6 thenset result : 第二季度;whe…

spring cloud sentinel

初始时 并不能将sentinel实例显示出来的 需要修改加配置clent-ip spring:cloud:sentinel:transport:#本机ipclient-ip: 192.168.10.108#dashboard服务端的grp端口 监听心跳的port: 8719#dashboard服务端地址dashboard: 192.168.12.14:8080

数据结构【栈和队列】

第三章 栈与队列 一、栈 1.定义&#xff1a;只允许一端进行插入和删除的线性表&#xff0c;结构与手枪的弹夹差不多&#xff0c;可以作为实现递归函数&#xff08;调用和返回都是后进先出&#xff09;调用的一种数据结构&#xff1b; 栈顶&#xff1a;允许插入删除的那端&…

了解Unity编辑器之组件篇Physics(四)

Physics&#xff1a;用于处理物理仿真和碰撞检测。它提供了一组功能强大的工具和算法&#xff0c;用于模拟真实世界中的物理行为&#xff0c;使游戏或应用程序更加真实和可信。 主要用途包括&#xff1a; 碰撞检测&#xff1a;Unity Physics 提供了高效的碰撞检测算法&#x…

【Unity实战篇 】| 游戏中实现镂空遮罩效果【矩形、圆形镂空遮罩】

前言【Unity实战篇 】 | 游戏中实现镂空遮罩效果【矩形、圆形镂空遮罩】一、制作原理二、矩形中间镂空遮罩效果2.1 实现镂空显示2.2 镂空区域内事件穿透三、圆形中间镂空遮罩效果总结前言 本文来写一下怎样在Unity中完成一个 镂空遮罩 的效果。镂空遮罩 比较常用的有两种:矩形…

力扣题库刷题笔记73--矩阵置零

1、题目如下&#xff1a; 2、个人Python代码实现 3、个人Python代码思路 a、声明2个空数组p、q&#xff0c;用于存放值为0的元素matrix[i][j]的下标 b、首先遍历二维数组matrix&#xff0c;找到值为0的元素matrix[i][j]&#xff0c;将下标i加入数组p&#xff0c;将下标j加入数…

【【51单片机直流电机调速】】

学会电机调速&#xff0c;掌握中国速度 PWM的生成方法 先用户设定一个比较值&#xff0c;然后计数器定时自增。 当计数器<比较值&#xff0c;输出0 当计数器>比较值&#xff0c;输出1 main.c #include <REGX52.H> #include"delay.h" #include"…

vue 学习笔记 【ElementPlus】el-menu 折叠后图标不见了

项目当前版本 {"dependencies": {"element-plus/icons-vue": "^2.1.0","types/js-cookie": "^3.0.3","types/nprogress": "^0.2.0","axios": "^1.4.0","core-js": &quo…

PHP 药店管理系统mysql数据库web结构apache计算机软件工程网页wamp

一、源码特点 PHP 药品管理系统 是一套完善的web设计系统,系统采用smarty框架进行开发设计&#xff0c;对理解php编程开发语言有帮助&#xff0c;系统具有完整的源代码和数据库&#xff0c;系统主要采用B/S模式开发。 PHP 药店管理系统mysql数据库web结构apache计 下载地址…

TSN -促进IT/OT 融合的网络技术

时间敏感网络&#xff08;tsn&#xff09;技术是IT/OT 融合的一项关键的基础网络技术&#xff0c;它实现了在一个异构网络中&#xff0c;实现OT的实时数据和IT系统的交互数据的带宽共享。 TSN允许将经典的高确定性现场总线系统和IT应用&#xff08;如大数据传输&#xff09;的功…

第1章 获取数据库中的数据

CoreShop源程序是以数据库优先进行定义的&#xff0c;所以其本身不包含代码优先的定义&#xff0c;但本从更习惯于代码优先&#xff0c;所以为其定义了代码优先的定义。 1 CoreCms.Net.Model.Entities.SysRole using SqlSugar; using System.ComponentModel.DataAnnotations…

力扣 56. 合并区间

题目来源&#xff1a;https://leetcode.cn/problems/merge-intervals/description/ C题解&#xff1a;根据左区间排序&#xff0c;更新每一段的右区间最大值&#xff0c;直到间断。 class Solution { public:static bool cmp(vector<int> & a, vector<int> &a…

小学期笔记——天天酷跑5

效果&#xff1a; -------------------------- 效果&#xff1a; ------------------ 让人物跑起来 效果&#xff1a;&#xff08;此时的人物是运动的&#xff09; ---------------------- 通过键盘控制角色 效果&#xff1a; 人物可以上左右动&#xff0c;自由落体

K8S初级入门系列之二-集群搭建

一、前言 为了更好学习K8S&#xff0c;建议自行搭建一套K8S的环境&#xff0c;目前比较流行的有两种搭建工具&#xff0c;一种是单机版的minkube&#xff0c;一种是集群版的kubeadm。minkube更多是用于实验环境&#xff0c;且单机版隐藏了很多细节&#xff0c;而kubeadm更贴近实…

Vue 3.3 + Vite 4.3 + TypeScript 5+ Element-Plus:从零到一构建企业级后台管理系统(前后端开源)

vue3-element-admin 是基于 vue-element-admin 升级的 Vue3 Element Plus 版本的后台管理前端解决方案&#xff0c;技术栈为 Vue3 Vite4 TypeScript Element Plus Pinia Vue Router 等当前主流框架。 相较于其他管理前端框架&#xff0c;vue3-element-admin 的优势在于一…

红队打靶:Nullbyte打靶思路详解(vulnhub)

目录 写在开头 第一步&#xff1a;主机发现与端口扫描 第二步&#xff1a;Web渗透 第三步&#xff1a;hydra密码爆破 第四步&#xff1a;SQL注入大赏 方法一&#xff1a;手工SQL注入之联合查询 方法二&#xff1a;SQL注入写入一句话木马 方法三&#xff1a;SQL注入写入…

快速了解新一轮Moonbeam Grants申请提案

随着Moonbeam Grant第二期计划的发布&#xff0c;超过12个项目同时提交了生态Grant申请的提案。任何大于25万枚GLMR Grant的申请都将会要求项目在Moonbeam社区治理论坛上发布Grant提案&#xff0c;内容包含项目概览、申请金额、Grant使用方案以及背后的原因等等。 Grant的发放…

【VUE】vue-i18n: Uncaught SyntaxError: Not available in legacy mode

环境 vue ^3.3.4vue-i18n ^9.2.2vite ^4.4.7 问题 在vite脚手架项目当中&#xff0c;使用vue-i18n插件进行国际化多语言时&#xff0c; 报错&#xff1a;Uncaught SyntaxError: Not available in legacy mode 对于这个报错信息&#xff0c;网上大部分的处理方案是&#xff1a…

五,Eureka 第五章

5.3.2 修改pom添加依赖 <dependencies><!--公共部门--><dependency><groupId>cn.bdqn</groupId><artifactId>springcloud-api-commons</artifactId><version>${project.version}</version></dependency><!--e…