《程序猿入职必会(4) · Vue 完成 CURD 案例 》

📢 大家好,我是 【战神刘玉栋】,有10多年的研发经验,致力于前后端技术栈的知识沉淀和传播。 💗
🌻 CSDN入驻不久,希望大家多多支持,后续会继续提升文章质量,绝不滥竽充数,欢迎多多交流。👍

文章目录

    • 写在前面的话
    • 教师信息管理 CURD
      • 前文回顾
      • 日期格式化
      • 前端代码生成
      • 代码修修补补
    • 前端知识拓展
      • 图形化方式创建 Vue
      • 整合路由 Vue-Router
    • 总结陈词

CSDN.gif

写在前面的话

本系列博文已连载到第三回,通过前三回博文,我们已完成了前后端基础服务的搭建,也完成后端的完整接口清单,前端还差一些,本篇博文,把前端功能补充完整,让它像那么回事。
本篇博文,还有几个目标要完成:

  • 回顾一下之前三篇文章,将一些知识点补充一下;
  • 针对需求内容,把前端服务的CURD功能丰富起来;
  • 对部分前端细节不到位的地方进行修复,同时分享相关经验;

加油,程序猿,保持住Tempo,开干,玩的就是真实!

关联文章:
《程序猿入职必会(1) · 搭建拥有数据交互的 SpringBoot 》
《程序猿入职必会(2) · 搭建具备前端展示效果的 Vue》
《程序猿入职必会(3) · SpringBoot 各层功能完善 》


教师信息管理 CURD

Tips:一直说CURD、CURD的,行业内的默认术语,如果有小伙伴不知道这是什么,那大概是代表创建(Create)、更新(Update)、读取(Read)和删除(Delete)操作的集合,可以指代某个实体表对应的维护页面,也是程序猿最基础的拧螺丝工作。

前文回顾

先回顾一下之前第二篇的结尾,我们引入 ElementUI 后,实现的效果如下。
效果还可以,不过只是功能的冰山一角。
image.png
不对,登记时间怎么是这个鬼样子?先给它修正,不然很别扭。

日期格式化

实现日期格式化可以后端来,也可以前端。

后端实现效果
Step1、引入 fastjson 依赖

<fastjson.version>2.0.33</fastjson.version><!-- JSON处理 -->
<dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>${fastjson.version}</version>
</dependency>

Step2、实体类添加注释

@JSONField(format = "yyyy-MM-dd HH:mm")
private java.util.Date createdTime;

Step3、前端正常展示

<span>{{ scope.row.createdTime}}</span>

效果如下:
image.png

前端实现效果
使用vue的管道符实现,代码如下:

<span>{{ scope.row.createdTime | timeFilter}}</span>timeFilter(time) {// 这边将字符串进行日期转换
}

前端代码生成

这里先使用代码生成器生成教师实体对应的前端基础页面和接口,不然一个个写是挺耗时的,也比较基础。
企业实际开发中,这部分代码通常也是代码生成或者CV其他代码,再进行调整。
先来一段完整的Vue:

<template><div class="app-container"><!-- 表头 查询与新增 --><el-row><el-col :span="24"><div class="filter-container"><el-input placeholder="关键词过滤" v-model="listQuery.query" style="width: 200px;" class="filter-item"@keyup.enter.native="handleFilter"/><el-select v-model="listQuery.validFlag" placeholder="有效标志" clearable class="filter-item" style="width: 150px"@change="handleFilter"><el-option v-for="(value, key) in statusOptions" :key="key" :label="value" :value="key"/></el-select><el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">搜索</el-button><el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-circle-plus-outline"@click="handleCreate">新增</el-button></div></el-col></el-row><!-- 表格list --><el-row><el-col :span="24" :gutter="24"><el-table:row-class-name="rowClassName"v-loading="listLoading":key="tableKey":data="list"element-loading-text="Loading"borderfit:height="tableHeight"style="width: 100%;"highlight-current-row><el-table-column align="center" label="序号" width="80"><template slot-scope="scope">{{ scope.$index }}</template></el-table-column><el-table-column show-overflow-tooltip label="教师编号" show-overflow-tooltip min-width="10%" align="center"><template slot-scope="scope">{{ scope.row.teaCode }}</template></el-table-column><el-table-column show-overflow-tooltip label="教师名称" show-overflow-tooltip min-width="10%" align="center"><template slot-scope="scope">{{ scope.row.teaName }}</template></el-table-column><el-table-column show-overflow-tooltip label="教师头像" show-overflow-tooltip min-width="10%" align="center"><template slot-scope="scope">{{ scope.row.teaImg }}</template></el-table-column><el-table-column show-overflow-tooltip label="教师电话" show-overflow-tooltip min-width="10%" align="center"><template slot-scope="scope">{{ scope.row.teaPhone }}</template></el-table-column><el-table-column show-overflow-tooltip label="教师学科" show-overflow-tooltip min-width="10%" align="center"><template slot-scope="scope">{{ scope.row.stuItem }}</template></el-table-column><el-table-column show-overflow-tooltip label="教师身份" show-overflow-tooltip min-width="10%" align="center"><template slot-scope="scope">{{ scope.row.teaType }}</template></el-table-column><el-table-column show-overflow-tooltip label="教师配置" show-overflow-tooltip min-width="10%" align="center"><template slot-scope="scope">{{ scope.row.teaConfig }}</template></el-table-column><el-table-column show-overflow-tooltip label="排序号" show-overflow-tooltip min-width="10%" align="center"><template slot-scope="scope">{{ scope.row.sortNo }}</template></el-table-column><el-table-column show-overflow-tooltip class-name="status-col" label="创建时间" min-width="20%" align="center"><template slot-scope="scope"><i class="el-icon-time"/><span>{{ scope.row.createdTime }}</span></template></el-table-column><el-table-column show-overflow-tooltip class-name="status-col" label="修改时间" min-width="20%" align="center"><template slot-scope="scope"><i class="el-icon-time"/><span>{{ scope.row.modifiedTime }}</span></template></el-table-column><el-table-column show-overflow-tooltip class-name="status-col" label="有效标志" min-width="10%" align="center"><template slot-scope="scope"><el-tag :type="scope.row.validFlag | statusFilter">{{ scope.row.validFlag | validFilter }}</el-tag></template></el-table-column><el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width"><template slot-scope="scope"><el-button size="mini" type="primary" @click="handleUpdate(scope.row)">编辑</el-button><el-button size="mini" type="danger" @click="handleDelete(scope.row)">删除</el-button></template></el-table-column></el-table></el-col></el-row><!-- 分页控件 --><pagination v-show="total>0" :total="total":page.sync="listQuery.pageNum":limit.sync="listQuery.pageSize"layout="total, sizes, prev, pager, next"style="float:right;"@pagination="fetchData"/><!-- 编辑弹窗 --><el-dialog:close-on-click-modal="false":title="textMap[dialogStatus]":visible.sync="dialogFormVisible"><el-formref="dataForm":rules="rules":model="temp"label-position="right"label-width="100px"style=""><el-row :gutter="20"><el-col :span="12"><el-form-item label="教师编号" label-width="105px" prop="teaCode"><el-input v-model="temp.teaCode" :disabled="dialogStatus === 'update'"/></el-form-item></el-col></el-row><el-row :gutter="20"><el-col :span="12"><el-form-item label="教师名称" label-width="105px" prop="teaName"><el-input v-model="temp.teaName"/></el-form-item></el-col><el-col :span="12"><el-form-item label="教师头像" label-width="105px" prop="teaImg"><el-input v-model="temp.teaImg"/></el-form-item></el-col></el-row><el-row :gutter="20"><el-col :span="12"><el-form-item label="教师电话" label-width="105px" prop="teaPhone"><el-input v-model="temp.teaPhone"/></el-form-item></el-col><el-col :span="12"><el-form-item label="教师学科" label-width="105px" prop="stuItem"><el-input v-model="temp.stuItem"/></el-form-item></el-col></el-row><el-row :gutter="20"><el-col :span="12"><el-form-item label="教师身份" label-width="105px" prop="teaType"><el-input v-model="temp.teaType"/></el-form-item></el-col><el-col :span="12"><el-form-item label="教师配置" label-width="105px" prop="teaConfig"><el-input v-model="temp.teaConfig"/></el-form-item></el-col></el-row><el-row :gutter="20"><el-col :span="12"><el-form-item label="排序号" label-width="105px" prop="sortNo"><el-input v-model.number="temp.sortNo"/></el-form-item></el-col><el-col :span="12"></el-col></el-row><el-row :gutter="20"><el-col :span="12"></el-col><el-col :span="12"><el-form-item label="有效标志" label-width="105px"><el-switchv-model="validSwitch"active-color="#13ce66"inactive-color="#ff4949"></el-switch></el-form-item></el-col></el-row></el-form><div slot="footer" class="dialog-footer"><el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">确认</el-button><el-button @click="dialogFormVisible = false">取消</el-button></div></el-dialog></div>
</template><script>
import ZyTeacherInfoApi from '@/api/study/ZyTeacherInfoApi'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
export default {directives: { waves },components: { Pagination },filters: {statusFilter(status) {const statusMap = {1: 'success',2: 'blue',3: 'warning',4: 'info',0: 'danger'}return statusMap[status]},commonFilter(status, data) {if (status) {return data[status].text || data[status]} else {return ''}},validFilter(status) {const statusMap = {1: '有效',0: '作废'}return statusMap[status]},timeFilter(time) {if (time) {return new Date(time).Format('yyyy-MM-dd hh:mm:ss')} else {return ''}}},data() {return {tableKey: 0,//表格key值list: null, //表格对象listLoading: true, //表格加载框total: 0, //分页总数tableHeight: window.innerHeight - 220, //表格高度listQuery: { //表格查询对象pageNum: 1,pageSize: 10,query: '',validFlag: undefined,teaCode: ''},temp: {}, //编辑框临时变量statusOptions: { //有效无效下拉框'1': '有效','0': '作废'},dialogFormVisible: false, //编辑框显示dialogStatus: '', //编辑框更新插入状态textMap: { //编辑框标题update: '编辑',create: '创建'},rules: { //编辑框校验规则teaCode: [{ required: true, message: '请输入教师编号', trigger: 'change' }],teaName: [{ required: true, message: '请输入教师名称', trigger: 'change' }],teaImg: [{ required: true, message: '请输入教师头像', trigger: 'change' }],teaPhone: [{ required: true, message: '请输入教师电话', trigger: 'change' }],stuItem: [{ required: true, message: '请输入教师学科', trigger: 'change' }],teaType: [{ required: true, message: '请输入教师身份', trigger: 'change' }],teaConfig: [{ required: true, message: '请输入教师配置', trigger: 'change' }],sortNo: [{type: 'number', required: false, message: '排序号必须为整数值', transform(value) {if (value === '' || value === null) {return 0}if (_.isInteger(value)) {return value} else {return false}}}],validFlag: [{ required: true, message: '请输入有效标志', trigger: 'change' }]}}},computed: {validSwitch: {// getterget: function() {return this.temp.validFlag === '1'},// setterset: function(newValue) {if (newValue) {this.temp.validFlag = '1'} else {this.temp.validFlag = '0'}}}},created() {this.fetchData()},methods: {/*** 获取表格数据*/fetchData() {let that = thisthis.listLoading = truethis.$http.all([ZyTeacherInfoApi.getPage(this.listQuery)]).then(this.$http.spread(function(perms) {that.list = perms.rowsthat.total = perms.totalthat.listLoading = false}))},/*** 新增弹窗*/handleCreate() {this.resetTemp()this.dialogStatus = 'create'this.dialogFormVisible = truethis.$nextTick(() => {this.$refs['dataForm'].clearValidate()})},/*** 清空弹窗内容*/resetTemp() {this.temp = {teaCode: '',teaName: '',teaImg: '',teaPhone: '',stuItem: '',teaType: '',teaConfig: '',sortNo: '',createdTime: '',modifiedTime: '',validFlag: '1'}},/*** 确定新增*/createData() {let that = thisthis.$refs['dataForm'].validate((valid) => {if (valid) {ZyTeacherInfoApi.insert(this.temp).then(() => {this.dialogFormVisible = falsethis.$notify({title: '成功',message: '创建成功',type: 'success',duration: 1000,onClose() {that.fetchData()}})})}})},/*** 编辑弹窗*/handleUpdate(row) {this.temp = Object.assign({}, row)this.dialogStatus = 'update'this.dialogFormVisible = truethis.$nextTick(() => {this.$refs['dataForm'].clearValidate()})},/*** 确认编辑*/updateData() {let that = thisthis.$refs['dataForm'].validate((valid) => {if (valid) {const tempData = Object.assign({}, this.temp)ZyTeacherInfoApi.update(tempData).then(() => {this.dialogFormVisible = falsethis.$notify({title: '成功',message: '更新成功',type: 'success',duration: 1000,onClose() {that.fetchData()}})})}})},/*** 删除操作*/handleDelete(row) {let that = thisZyTeacherInfoApi.remove({ teaCode: row.teaCode }).then(() => {this.$notify({title: '成功',message: '删除成功',type: 'success',duration: 1000,onClose() {that.fetchData()}})})},/*** 搜索过滤*/handleFilter() {this.listQuery.pageNum = 1this.fetchData()},rowClassName({ rowIndex }) {return rowIndex % 2 === 0 ? 'warning-row' : 'success-row'}}
}
</script><style>
.el-table .warning-row {background-color: #fff7e6;
}.el-table .success-row {background-color: #f0f9eb;
}
</style>

再来一段完整的api:

import request from '@/utils/request'export default {getList(params) {return request({url: '/zyTeacherInfo/', method: 'get', params})},get(params) {return request({url: '/zyTeacherInfo/' + params.teaCode, method: 'get', params})},getPage(params) {return request({url: '/zyTeacherInfo/page', method: 'get', params})},update(params) {return request({url: '/zyTeacherInfo/update', method: 'post', params})},insert(params) {return request({url: '/zyTeacherInfo/insert', method: 'post', params})},remove(params) {return request({url: '/zyTeacherInfo/delete', method: 'post', params})}
}

接着配一下路由,router.js

Tips:路由前面可能还没介绍,后续专题介绍。

{path: '/tea', component: () => import('@/views/study/ZyTeacherInfoManage'), hidden: true
},

最后,看一下效果,有那么回事吧。
image.png
image.png
操作一下增删改查,基本功能都正常,你敢相信,使用一套合适的代码生成器,仅仅几分钟就可以实现一个CURD功能。

代码修修补补

虽然功能全部正常,但是要拿去交差还是要完善一些。

【查询页面调整】
首先,表格页面代码生成的是全部字段,先把不重要的字段去掉,效果如下:image.png
表单元素太紧凑了,加一点间距,上一篇文章刚介绍了《企业实战分享 · CodeGeeX 初体验》,给它一个机会,练练手,如下所示:
image.png
生成很快,试试,效果如下图:
image.png
啧啧,什么鬼,没理解我意图,直接用 span 拆开间距了,也可能我没说清楚。
那给ChatGpt一个机会:
image.png
效果如下图,好像还不错,就这样吧。
image.png

【分页查询功能】
代码生成器是没办法那么智能知道你想用哪些字段作为搜索条件,当然生成的时候,给字段添加一些额外标识就另说,但感觉这样效率更低,还不如生成之后再来调整。
这边设计代码生成器的时候,固定保留了一个模糊搜索框和有效标志下拉框,可以覆盖大部分场景的最小需要。
看一下对应前端代码:
1、前端定义listQuery对象代表查询入参,传递query和validFlag两个属性,点击搜索触发handleFilter逻辑。
2、触发的JS逻辑,其实就是利用基于axios封装的请求工具,异步请求相关接口获取分页数据。

Tips:关于前端请求后端的工具封装,后续专栏介绍。

<el-input placeholder="关键词过滤" v-model="listQuery.query" class="filter-item input-item"@keyup.enter.native="handleFilter"
/>
<el-select v-model="listQuery.validFlag" placeholder="有效标志" clearable class="filter-item select-item"@change="handleFilter"><el-option v-for="(value, key) in statusOptions" :key="key" :label="value" :value="key"/>
</el-select>
<el-button v-waves class="filter-item button-item" type="primary" icon="el-icon-search" @click="handleFilter">搜索
</el-button>
/*** 搜索过滤*/
handleFilter() {this.listQuery.pageNum = 1this.fetchData()
},/*** 获取表格数据*/
fetchData() {let that = thisthis.listLoading = truethis.$http.all([ZyTeacherInfoApi.getPage(this.listQuery)]).then(this.$http.spread(function(perms) {that.list = perms.rowsthat.total = perms.totalthat.listLoading = false}))
},

再看看后端代码:
1、这边是借助PageHelper插件,轻松实现分页效果;
2、第二段是XML里面的SQL写法,参考一下即可,根据query模糊搜索,根据validFlag是精确查询;

@Service
public class ZyTeacherInfoService extends CrudService<ZyTeacherInfo, ZyTeacherInfoMapper> {/*** 获取用户分页列表** @param query    搜索关键词* @param pageInfo 分页实体* @param zyTeacherInfo 实体入参* @return 用户列表*/public PageInfo<ZyTeacherInfo> findListPage(String query, PageInfo pageInfo, ZyTeacherInfo zyTeacherInfo) {PageHelper.startPage(pageInfo);List<ZyTeacherInfo> zyTeacherInfolist = this.dao.findListPage(query, zyTeacherInfo);return new PageInfo<>(zyTeacherInfolist);}
}@Mapper
public interface ZyTeacherInfoMapper extends BaseMapper<ZyTeacherInfo> {/*** 分页获取教师信息表列表** @param query 搜索关键词* @param zyTeacherInfo 查询实体* @return 用户列表*/List<ZyTeacherInfo> findListPage(@Param("query") String query, @Param("model") ZyTeacherInfo zyTeacherInfo);
}
<!-- 分页查询教师信息表列表 -->
<select id="findListPage" resultType="zyTeacherInfo">selectt.*fromzy_teacher_info twhere 1=1<if test="query != null and query != ''">AND (INSTR(t.TEA_NAME , #{query})>0 OR t.TEA_CODE = #{query})</if><if test="model.validFlag != null and model.validFlag != ''">and t.VALID_FLAG = #{model.validFlag}</if>
</select>

【关于增删改】
这部分属于基操,前面示例都能看懂,这边以更新为例简单说明。
前端:
1、填写完表单信息,触发updateData函数,先针对表单信息做一个校验(参考ElementUI);
2、触发 ZyTeacherInfoApi 接口,该接口也是利用 Axios,触发 Post 请求,调用后端;

updateData() {let that = thisthis.$refs['dataForm'].validate((valid) => {if (valid) {const tempData = Object.assign({}, this.temp)ZyTeacherInfoApi.update(tempData).then(() => {this.dialogFormVisible = falsethis.$notify({title: '成功',message: '更新成功',type: 'success',duration: 1000,onClose() {that.fetchData()}})})}})
},update(params) {return request({url: '/zyTeacherInfo/update', method: 'post', params})
},

后端:好像没什么特别的,就是正常的 MyBatis - Update,搞定!


前端知识拓展

图形化方式创建 Vue

在这篇博文《程序猿学会 Vue · 基础与实战篇》中,介绍创建Vue项目的多种方式,漏介绍了一种图形化。
命令行输入:vue ui
会自动打开一个图形化页面,如下图,按步骤傻瓜式操作即可。

Tips:好像也没有什么特别的,不详细介绍。
Tips:SpringBoot也有类似界面,总之就是越来越简单了,怎么傻瓜怎么来。

image.png


整合路由 Vue-Router

【安装使用】
Step1、安装路由
npm install vue-router

Step2、编写路由配置文件,/router/index.js

import {createRouter, createWebHashHistory} from 'vue-router'
import HomeView from '../views/Home.vue'const routes = [{path: '/home', name: 'home', component: HomeView
}, {path: '/about', name: 'about', component: () => import('../views/About.vue')
}]const router = createRouter({history: createWebHashHistory(), routes
})export default router

Step3、引入上述 JS,在 main.js 操作

// 引入路由
import router from './router/index.js'
app.use(router)

Step4、效果使用
App.vue 页面在合适地方添加:
地址栏输入/home或/about,内容会随之变化。


总结陈词

本系列博文更新到第四篇了,基本实现了教师的CURD功能。
接下来几篇博文将针对其中涉及的几个框架封装知识点进行专题说明。
总之,目标是帮助初入职场的大家,快速适应企业开发,多一些机会。
💗 如果觉得内容还可以,麻烦点个关注不迷路,您的鼓励是我创作的动力。

CSDN_END.gif

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

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

相关文章

lua 游戏架构 之 游戏 AI (九)ai_mgr Ai管理

定义ai_mgr的类&#xff0c;用于管理游戏中实体的AI组件。 先定义 AI行为枚举和优先级&#xff1a; lua 游戏架构 之 游戏 AI &#xff08;八&#xff09;ai_tbl 行为和优先级-CSDN博客https://blog.csdn.net/heyuchang666/article/details/140712839?spm1001.2014.3001.55…

天工三维实景建软件 GodWork 3D 7.24 软件下载License使用

1、天工三维实景建软件GodWork 3D 7.24,城市级实景三维数据生产面临大数据量空三稳定解算的难题。受限于目前主流软件的解算能力与效率&#xff0c;生产单位常采用分块处理方法&#xff0c;接边处精度需要有足够的控制点来保证&#xff0c;这增加了外业布设控制点与内业的工作量…

巴斯勒相机(Basler) ACE2 dart 系列说明和软件

巴斯勒相机(Basler) ACE2 dart 系列说明和软件

开始尝试从0写一个项目--后端(三)

器材管理 和员工管理基本一致&#xff0c;就不赘述&#xff0c;展示代码为主 新增器材 表设计&#xff1a; 字段名 数据类型 说明 备注 id bigint 主键 自增 name varchar(32) 器材名字 img varchar(255) 图片 number BIGINT 器材数量 comment VARC…

Redis底层数据结构的实现

文章目录 1、Redis数据结构1.1 动态字符串1.2 intset1.3 Dict1.4 ZipList1.5 ZipList的连锁更新问题1.6 QuickList1.7 SkipList1.8 RedisObject 2、五种数据类型2.1 String2.2 List2.3 Set2.4 ZSET2.5 Hash 1、Redis数据结构 1.1 动态字符串 Redis中保存的Key是字符串&#xf…

php收银系统源码-收银员操作权限

收银系统是很多门店&#xff0c;尤其是连锁门店营业的必备工具&#xff0c;收银员每天需要通过收银系统记录商品的售卖数量&#xff0c;以及收款&#xff0c;会员开卡&#xff0c;核销订单等工作。但很多门店都不希望给收银员太高的权限&#xff0c;自然就离不开收银员的权限管…

windows server服务器/linux服务器离线安装pandas

windows server服务器/linux服务器离线安装pandas pypi官网下载whl文件速度较慢&#xff0c;推荐使用国内的镜像源来下载&#xff0c;镜像源地址为 清华大学 &#xff1a;https://pypi.tuna.tsinghua.edu.cn/simple/ 阿里云&#xff1a;http://mirrors.aliyun.com/pypi/simple…

Python | Leetcode Python题解之第278题第一个错误的版本

题目&#xff1a; 题解&#xff1a; # The isBadVersion API is already defined for you. # def isBadVersion(version: int) -> bool:class Solution:def firstBadVersion(self, n: int) -> int:left, right 1, nwhile left < right:mid left (right - left) //…

Dockerfile指令详解和Docker操作命令

1.容器的特点&#xff1a;1&#xff09;自包含&#xff08;包括应用程序及其运行环境&#xff09;&#xff1b;2&#xff09;可移植&#xff1b;3&#xff09;相互隔离&#xff1b;4&#xff09;轻量级。 2.docker成为容器的事实标准在于&#xff1a;1&#xff09;在运行环境上…

【通信模块】LoraWAN网络简介

LoRaWAN网络 技象科技相关文章总结&#xff0c;学习笔记&#xff0c;原文链接如下&#xff0c;转载请标明该出处&#xff1a; LORA&#xff1a; https://www.techphant.cn/tag/l-2 LORAWAN&#xff1a;https://www.techphant.cn/tag/l-3 其他&#xff1a;如LAN https://www…

静止轨道卫星大气校正(Atmospheric Correction)和BRDF校正

文章内容仅用于自己知识学习和分享&#xff0c;如有侵权&#xff0c;还请联系并删除 &#xff1a;&#xff09; 目的&#xff1a; TOA reflectance 转为 surface refletance。 主要包含两步&#xff1a; 1&#xff09;大气校正&#xff1b; 2&#xff09;BRDF校正 进度&#x…

repo 工具安装和使用教程(windows+gitee)

repo是什么 官方的定义&#xff1a;Repo是谷歌用python脚本写的调用git的一个脚本&#xff0c;可以实现管理多个git库。 Android的源代码使用Repo 命令行工具来管理多个git仓库&#xff0c;大概有百多个。要想克隆和管理百多个 Git 仓库&#xff0c;不是一件简单的事情。Repo 命…

嵌入式Python、ROS、SLAM、WebSocket和Node.js:智能巡逻监控安防机器人设计流程(代码示例)

项目概述 随着智能技术的发展&#xff0c;智能巡逻机器人在安防、监控和巡逻等领域的应用越来越广泛。本文将介绍一个结合嵌入式系统、机器人技术和后端开发的智能巡逻机器人。该机器人能够自主导航&#xff0c;实时检测异常情况&#xff08;如火灾或入侵者&#xff09;&#…

H616布线--规则设置于NET分组

一定先看工艺能力&#xff0c;再设计&#xff1a; 嘉立创盘中孔&#xff08;树脂塞孔电镀盖帽&#xff09;设计指引及规则 https://www.jlc.com/portal/q7i38630.html https://www.jlc.com/portal/vtechnology.html 这是我们的工艺参数&#xff0c;请您参考一下呢&#xff01…

Java_如何在IDEA中使用Git

注意&#xff1a;进行操作前首先要确保已经下载git&#xff0c;在IDEA中可以下载git&#xff0c;但是速度很慢&#xff0c;可以挂梯子下载。 导入git仓库代码 第一次导入&#xff1a; 首先得到要加载的git仓库的url&#xff1a; 在git仓库中点击 “克隆/下载” 按钮&#xf…

牛客TOP101:寻找峰值

文章目录 1. 题目描述2. 解题思路3. 代码实现 1. 题目描述 2. 解题思路 使用双指针&#xff0c;我们只需要找到一个峰值就可以了。 这个很重要&#xff0c;要记住。   我们先取到数组中间的值&#xff0c;让它与它的前一个或者后一个进行比较&#xff08;下面的代码实现是与后…

1、hadoop环境搭建

1、环境配置 ip(/etc/sysconfig/network-scripts) # 网卡1 DEVICEeht0 TYPEEthernet ONBOOTyes NM_CONTROLLEDyes BOOTPROTOstatic IPADDR192.168.59.11 GATEWAY192.168.59.1 NETMASK 255.255.255.0 # 网卡2 DEVICEeht0 TYPEEthernet ONBOOTyes NM_CONTROLLEDyes BOOTPROTOdh…

kafka源码阅读-ReplicaStateMachine(副本状态机)解析

概述 Kafka源码包含多个模块&#xff0c;每个模块负责不同的功能。以下是一些核心模块及其功能的概述&#xff1a; 服务端源码 &#xff1a;实现Kafka Broker的核心功能&#xff0c;包括日志存储、控制器、协调器、元数据管理及状态机管理、延迟机制、消费者组管理、高并发网络…

day05 Router、vuex、axios

配置 router和vuex需要在创建vue项目的时候&#xff0c;开始的时候选择Manually select features&#xff0c;于是就可以在下一个创建配置讯问中选择router和vuex。 axios则需要执行命令行&#xff1a; npm install axios -S 之后再在需要发送请求的view导入即可。 router…

某量JS逆向

https://chat.sensetime.com/wb/chat 目录 一、发起请求 二、观察发现只有入参 __data__ 进行了加密&#xff0c;返回是明文 三、 观察JS调用栈 四、从JS中搜索 __data__ 五、使用XHR对Ajax请求进行断点 六、再次发起请求就会断点拦住请求 七、对XHR入口分析 八、逐个…