三、尚医通医院管理实现

news/2024/7/10 1:20:33 标签: java, servlet, javascript, html, vue

文章目录

  • 三、医院管理实现
    • 1、医院列表
      • 1.1 医院列表api接口
        • 1.1.1 添加service分页接口与实现
        • 1.1.2 添加controller方法
      • 1.2 service-cmn模块提供接口
        • 1.2.1添加service接口与实现
        • 1.2.2添加controller方法
      • 1.3封装Feign服务调用
        • 1.3.1搭建service-client父模块
        • 1.3.2 搭建service-cmn-client模块
          • 1.3.2.1修改pom.xml文件
          • 1.3.2.2添加Feign接口类
      • 1.4医院接口远程调用数据字典
        • 1.4.1 service模块引入依赖
        • 1.4.2 操作service-hosp模块
          • 1.4.2.1在service-hosp添加依赖
          • 1.4.2.2 启动类开启服务调用
          • 1.4.2.3调整service方法
      • 1.5 添加数据字典显示接口
        • 1.5.1 编写controller
        • 1.5.2 编写service
      • 1.6 医院列表前端
        • 1.6.1 添加路由
        • 1.6.2封装api请求
        • 1.6.3 添加组件
    • 2、更新医院上线状态
      • 2.1 api接口
        • 2.1.1 添加service接口
        • 2.1.2 添加controller方法
      • 2.2 更新上线状态前端
        • 2.2.1封装api请求
        • 2.2.2 修改组件
    • 3、医院详情
      • 3.1 api接口
        • 3.1.1 添加service接口
        • 3.1.2 添加controller方法
      • 3.2 医院详情前端
        • 3.2.2修改医院列表组件
        • 3.2.3封装api请求
        • 3.2.4 修改显示页面组件
        • 3.2.5 引入详情样式文件

三、医院管理实现

1、医院列表

1.1 医院列表api接口

1.1.1 添加service分页接口与实现

在HospitalService类添加分页接口

html" title=java>java">/**
 * 分页查询
 * @param page 当前页码
 * @param limit 每页记录数
 * @param hospitalQueryVo 查询条件
 * @return
*/
Page<Hospital> selectPage(Integer page, Integer limit, HospitalQueryVo hospitalQueryVo);

HospitalServiceImpl类实现分页

html" title=java>java">@Override
public Page<Hospital> selectPage(Integer page, Integer limit, HospitalQueryVo hospitalQueryVo) {
      Sort sort = Sort.by(Sort.Direction.DESC, "createTime");
//0为第一页
Pageable pageable = PageRequest.of(page-1, limit, sort);

      Hospital hospital = new Hospital();
      BeanUtils.copyProperties(hospitalQueryVo, hospital);

//创建匹配器,即如何使用查询条件
ExampleMatcher matcher = ExampleMatcher.matching() //构建对象
.withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING) //改变默认字符串匹配方式:模糊查询
.withIgnoreCase(true); //改变默认大小写忽略方式:忽略大小写

      //创建实例
Example<Hospital> example = Example.of(hospital, matcher);
      Page<Hospital> pages = hospitalRepository.findAll(example, pageable);

return pages;
   }

1.1.2 添加controller方法

添加com.atguigu.yygh.hosp.controller.HospitalController类

html" title=java>java">package com.atguigu.yygh.hosp.controller;

@Api(tags = "医院管理接口")
@RestController
@RequestMapping("/admin/hosp/hospital")
public class HospitalController {

@Autowired
private HospitalService hospitalService;

@ApiOperation(value = "获取分页列表")
@GetMapping("{page}/{limit}")
public Result index(
@ApiParam(name = "page", value = "当前页码", required = true)
@PathVariable Integer page,

@ApiParam(name = "limit", value = "每页记录数", required = true)
@PathVariable Integer limit,

@ApiParam(name = "hospitalQueryVo", value = "查询对象", required = false)
                HospitalQueryVo hospitalQueryVo) {
return Result.ok(hospitalService.selectPage(page, limit, hospitalQueryVo));
   }

}

1.2 service-cmn模块提供接口

由于我们的医院等级、省市区地址都是取的数据字典value值,因此我们在列表显示医院等级与医院地址时要根据数据字典value值获取数据字典名称
通过学习数据字典我们知道,根据上级编码与value值可以获取对应的数据字典名称,如果value值能够保持唯一(不一定唯一),我们也可以直接通过value值获取数据字典名称,目前省市区三级数据我们使用的是国家统计局的数据,数据编码我们就是数据字典的id与value,所以value能够唯一确定一条数据字典,如图:
在这里插入图片描述

1.2.1添加service接口与实现

在DictService类添加接口

html" title=java>java">/**
 * 根据上级编码与值获取数据字典名称
 * @param parentDictCode
* @param value
* @return
*/
String getNameByParentDictCodeAndValue(String parentDictCode, String value);

DictServiceImpl类实现

html" title=java>java">@Cacheable(value = "dict",keyGenerator = "keyGenerator")
@Override
public String getNameByParentDictCodeAndValue(String parentDictCode, String value) {
//如果value能唯一定位数据字典,parentDictCode可以传空,例如:省市区的value值能够唯一确定
if(StringUtils.isEmpty(parentDictCode)) {
      Dict dict = dictMapper.selectOne(new QueryWrapper<Dict>().eq("value", value));
if(null != dict) {
return dict.getName();
      }
   } else {
      Dict parentDict = this.getByDictsCode(parentDictCode);
if(null == parentDict) return "";
      Dict dict = dictMapper.selectOne(new QueryWrapper<Dict>().eq("parent_id", parentDict.getId()).eq("value", value));
if(null != dict) {
return dict.getName();
      }
   }
return "";
}

1.2.2添加controller方法

DictController类添加方法

html" title=java>java">@ApiOperation(value = "获取数据字典名称")
@GetMapping(value = "/getName/{parentDictCode}/{value}")
public String getName(
@ApiParam(name = "parentDictCode", value = "上级编码", required = true)
@PathVariable("parentDictCode") String parentDictCode,

@ApiParam(name = "value", value = "值", required = true)
@PathVariable("value") String value) {
return dictService.getNameByParentDictCodeAndValue(parentDictCode, value);
}

@ApiOperation(value = "获取数据字典名称")
@ApiImplicitParam(name = "value", value = "值", required = true, dataType = "Long", paramType = "path")
@GetMapping(value = "/getName/{value}")
public String getName(
@ApiParam(name = "value", value = "值", required = true)
@PathVariable("value") String value) {
return dictService.getNameByParentDictCodeAndValue("", value);
}

说明:提供两个api接口,如省市区不需要上级编码,医院等级需要上级编码

1.3封装Feign服务调用

1.3.1搭建service-client父模块

搭建过程如service父模块

修改pom.xml文件

<?xml version="1.0"encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.atguigu.yygh</groupId>
<artifactId>yygh-parent</artifactId>
<version>1.0</version>
</parent>

<artifactId>service-client</artifactId>
<packaging>pom</packaging>
<version>1.0</version>

<dependencies>
<dependency>
<groupId>com.atguigu.yygh</groupId>
<artifactId>common-util</artifactId>
<version>1.0</version>
<scope>provided </scope>
</dependency>

<dependency>
<groupId>com.atguigu.yygh</groupId>
<artifactId>model</artifactId>
<version>1.0</version>
<scope>provided </scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>provided </scope>
</dependency>

<!-- 服务调用feign -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<scope>provided </scope>
</dependency>
</dependencies>

</project>

1.3.2 搭建service-cmn-client模块

搭建过程如service-hosp模块

1.3.2.1修改pom.xml文件
<?xml version="1.0"encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.atguigu.yygh</groupId>
<artifactId>service-client</artifactId>
<version>1.0</version>
</parent>
<version>1.0</version>
<artifactId>service-cmn-client</artifactId>
<packaging>jar</packaging>
<name>service-cmn-client</name>
<description>service-cmn-client</description>

</project>
1.3.2.2添加Feign接口类
html" title=java>java">/**
 * 数据字典API接口
 */
@FeignClient("service-cmn")
public interface DictFeignClient {

/**
     * 获取数据字典名称
     * @param parentDictCode
* @param value
* @return
*/
@GetMapping(value = "/admin/cmn/dict/getName/{parentDictCode}/{value}")
    String getName(@PathVariable("parentDictCode") String parentDictCode, @PathVariable("value") String value);

/**
     * 获取数据字典名称
     * @param value
* @return
*/
@GetMapping(value = "/admin/cmn/dict/getName/{value}")
    String getName(@PathVariable("value") String value);
}

1.4医院接口远程调用数据字典

1.4.1 service模块引入依赖

在pom.xml添加依赖

<!-- 服务调用feign -->
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>

1.4.2 操作service-hosp模块

1.4.2.1在service-hosp添加依赖
<dependency>
    <groupId>com.atguigu.yygh</groupId>
    <artifactId>service-cmn-client</artifactId>
    <version>1.0</version>
</dependency>
1.4.2.2 启动类开启服务调用
html" title=java>java">@SpringBootApplication
@ComponentScan(basePackages = "com.atguigu")
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.atguigu")
public class ServiceHospApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceHospApplication.class, args);
    }
}
1.4.2.3调整service方法

修改HospitalServiceImpl类实现分页

html" title=java>java">@Autowired
private DictFeignClient dictFeignClient;
@Override
public Page<Hospital> selectPage(Integer page, Integer limit, HospitalQueryVo hospitalQueryVo) {
   Sort sort = Sort.by(Sort.Direction.DESC, "createTime");
//0为第一页
Pageable pageable = PageRequest.of(page-1, limit, sort);

   Hospital hospital = new Hospital();
   BeanUtils.copyProperties(hospitalQueryVo, hospital);

//创建匹配器,即如何使用查询条件
ExampleMatcher matcher = ExampleMatcher.matching() //构建对象
.withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING) //改变默认字符串匹配方式:模糊查询
.withIgnoreCase(true); //改变默认大小写忽略方式:忽略大小写

   //创建实例
Example<Hospital> example = Example.of(hospital, matcher);
   Page<Hospital> pages = hospitalRepository.findAll(example, pageable);

pages.getContent().stream().forEach(item -> {
this.packHospital(item);
   });
return pages;
}

/**
    * 封装数据
    * @param hospital
* @return
*/
private Hospital packHospital(Hospital hospital) {
       String hostypeString = dictFeignClient.getName(DictEnum.HOSTYPE.getDictCode(),hospital.getHostype());
       String provinceString = dictFeignClient.getName(hospital.getProvinceCode());
       String cityString = dictFeignClient.getName(hospital.getCityCode());
       String districtString = dictFeignClient.getName(hospital.getDistrictCode());

       hospital.getParam().put("hostypeString", hostypeString);
       hospital.getParam().put("fullAddress", provinceString + cityString + districtString + hospital.getAddress());
return hospital;
   }

1.5 添加数据字典显示接口

1.5.1 编写controller

根据dicode查询下层节点

html" title=java>java">@ApiOperation(value = "根据dictCode获取下级节点")
@GetMapping(value = "/findByDictCode/{dictCode}")
public Result<List<Dict>> findByDictCode(
        @ApiParam(name = "dictCode", value = "节点编码", required = true)
        @PathVariable String dictCode) {
    List<Dict> list = dictService.findByDictCode(dictCode);
    return Result.ok(list);
}

1.5.2 编写service

根据dicode查询下层节点

html" title=java>java">@Override
public List<Dict> findByDictCode(String dictCode) {
    Dict codeDict = this.getDictByDictCode(dictCode);
    if(null == codeDict) return null;
    return this.findChlidData(codeDict.getId());
}

1.6 医院列表前端

1.6.1 添加路由

在 src/router/index.js 文件添加路由

{
  path: 'hospital/list',
  name: '医院列表',
        component: () =>import('@/views/hosp/list'),
  meta: { title: '医院列表', icon: 'table' }
}

1.6.2封装api请求

创建/api/hosp.js

import request from '@/utils/request'

export default {
  //医院列表
  getPageList(current,limit,searchObj) {
    return request ({
      url: `/admin/hosp/hospital/list/${current}/${limit}`,
      method: 'get',
      params: searchObj  
    })
  },
  //查询dictCode查询下级数据字典
  findByDictCode(dictCode) {
    return request({
        url: `/admin/cmn/dict/findByDictCode/${dictCode}`,
        method: 'get'
      })
    },
  
  //根据id查询下级数据字典
  findByParentId(dictCode) {
    return request({
        url: `/admin/cmn/dict/findChildData/${dictCode}`,
        method: 'get'
      })
  }
}

1.6.3 添加组件

创建/views/hosp/hospital/list.vue组件

html"><template>
<div class="app-container">
    <el-form :inline="true" class="demo-form-inline">
    <el-form-item>
        <el-select
            v-model="searchObj.provinceCode"
            placeholder="请选择省"
                @change="provinceChanged">
            <el-option
                v-for="item in provinceList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"/>
        </el-select>
    </el-form-item>

    <el-form-item>
        <el-select
        v-model="searchObj.cityCode"
        placeholder="请选择市"
        @change="cityChanged">
            <el-option
            v-for="item in cityList"
            :key="item.id"
            :label="item.name"
            :value="item.id"/>
        </el-select>
    </el-form-item>

    <el-form-item>
        <el-input v-model="searchObj.hosname" placeholder="医院名称"/>
    </el-form-item>

    <el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
    <el-button type="default" @click="resetData()">清空</el-button>
    </el-form>

<!-- banner列表 -->
<el-table v-loading="listLoading" :data="list"
        border
      fit
      highlight-current-row>

    <el-table-column
    label="序号"
    width="60"
    align="center">
        <template slot-scope="scope">
                {{ (page - 1) * limit + scope.$index + 1 }}
        </template>
    </el-table-column>

    <el-table-column label="医院logo">
        <template slot-scope="scope">
        <img :src="'data:image/jpeg;base64,'+scope.row.logoData" width="80">
        </template>
    </el-table-column>

    <el-table-column prop="hosname" label="医院名称"/>
    <el-table-column prop="param.hostypeString" label="等级" width="90"/>
    <el-table-column prop="param.fullAddress" label="详情地址"/>
    <el-table-column label="状态" width="80">
        <template slot-scope="scope">
                {{ scope.row.status === 0 ? '未上线' : '已上线' }}
        </template>
    </el-table-column>
    <el-table-column prop="createTime" label="创建时间"/>

    <el-table-column label="操作" width="230" align="center">
    </el-table-column>
</el-table>

    <!-- 分页组件 -->
    <el-pagination
        :current-page="page"
        :total="total"
        :page-size="limit"
        :page-sizes="[5, 10, 20, 30, 40, 50, 100]"
        style="padding: 30px 0; text-align: center;"
        layout="sizes, prev, pager, next, jumper, ->, total, slot"
        @current-change="fetchData"
        @size-change="changeSize"
    />
</div>
</template>

<script>html" title=java>javascript">
import hospitalApi from '@/api/hosp'
export default {
    data() {
        return {
            listLoading: true, // 数据是否正在加载
            list: null, // banner列表
            total: 0, // 数据库中的总记录数
            page: 1, // 默认页码
            limit: 10, // 每页记录数
            searchObj: {}, // 查询表单对象
            provinceList: [],
            cityList: [],
            districtList: []
        }
    },

    // 生命周期函数:内存准备完毕,页面尚未渲染
    created() {
        console.log('list created......')
        this.fetchData()

        hospitalApi.findByDictCode('Province').then(response => {
            this.provinceList = response.data
        })
    },

    methods: {
        // 加载banner列表数据
        fetchData(page = 1) {
            console.log('翻页。。。' + page)
            // 异步获取远程数据(ajax)
            this.page = page
            hospitalApi.getPageList(this.page, this.limit, this.searchObj).then(
                response => {
                this.list = response.data.content
                this.total = response.data.totalElements

                    // 数据加载并绑定成功
                this.listLoading = false
                }
            )
        },

        // 当页码发生改变的时候
        changeSize(size) {
            console.log(size)
            this.limit = size
            this.fetchData(1)
        },

        // 重置查询表单
        resetData() {
            console.log('重置查询表单')
            this.searchObj = {}
            this.fetchData()
        },
        provinceChanged() {
            this.cityList = []
            this.searchObj.cityCode = null
            this.districtList = []
            this.searchObj.districtCode = null
            hospitalApi.findByParentId(this.searchObj.provinceCode).then(response => {
            this.cityList = response.data
        })
        }
    }
}
</script>

2、更新医院上线状态

2.1 api接口

2.1.1 添加service接口

在HospitalService类添加接口

html" title=java>java">/**
 * 更新上线状态
*/
void updateStatus(String id, Integer status);

HospitalServiceImpl类实现

html" title=java>java">@Override
public void updateStatus(String id, Integer status) {
    if(status.intValue() == 0 || status.intValue() == 1) {
        Hospital hospital = hospitalRepository.findById(id).get();
        hospital.setStatus(status);
        hospital.setUpdateTime(new Date());
        hospitalRepository.save(hospital);
    }
}

2.1.2 添加controller方法

在HospitalController类添加方法

html" title=java>java">@ApiOperation(value = "更新上线状态")
@GetMapping("updateStatus/{id}/{status}")
public Result lock(
        @ApiParam(name = "id", value = "医院id", required = true)
        @PathVariable("id") String id,
        @ApiParam(name = "status", value = "状态(0:未上线 1:已上线)", required = true)
        @PathVariable("status") Integer status){
    hospitalService.updateStatus(id, status);
    return Result.ok();
}

2.2 更新上线状态前端

2.2.1封装api请求

在/api/hosp/hospital.js文件添加方法

  updateStatus(id, status) {
    return request({
      url: `/admin/hosp/hospital/updateStatus/${id}/${status}`,
      method: 'get'
    })
  }

2.2.2 修改组件

修改/views/hosp/list.vue组件

html"><el-table-column label="操作" width="230" align="center">
    <template slot-scope="scope">
        <el-button v-if="scope.row.status == 1"  type="primary" size="mini" @click="updateStatus(scope.row.id, 0)">下线</el-button>
        <el-button v-if="scope.row.status == 0"  type="danger" size="mini" @click="updateStatus(scope.row.id, 1)">上线</el-button>
    </template>
</el-table-column>

updateStatus(id, status) {
    hospApi.updateStatus(id, status)
        .then(response => {
            this.fetchData(this.page)
        })
},

3、医院详情

3.1 api接口

3.1.1 添加service接口

在HospitalService类添加接口

html" title=java>java">/**
 * 医院详情
 * @param id
* @return
*/
Map<String, Object> show(String id);

HospitalServiceImpl类实现

html" title=java>java">@Override
public Map<String, Object> show(String id) {
    Map<String, Object> result = new HashMap<>();

    Hospital hospital = this.packHospital(this.getById(id));
    result.put("hospital", hospital);

//单独处理更直观
result.put("bookingRule", hospital.getBookingRule());
//不需要重复返回
hospital.setBookingRule(null);
return result;
}

3.1.2 添加controller方法

在HospitalController类添加方法

html" title=java>java">@ApiOperation(value = "获取医院详情")
@GetMapping("show/{id}")
public Result show(
@ApiParam(name = "id", value = "医院id", required = true)
@PathVariable String id) {
return Result.ok(hospitalService.show(id));
}

3.2 医院详情前端

3.2.1添加隐藏路由

{
  path: 'hospital/show/:id',
  name: '查看',
  component: () => import('@/views/hosp/show'),
  meta: { title: '查看', noCache: true },
  hidden: true
}

3.2.2修改医院列表组件

<router-link :to="'/hospSet/hospital/show/'+scope.row.id">
    <el-button type="primary" size="mini">查看</el-button>
</router-link>

3.2.3封装api请求

//查看医院详情
getHospById(id) {
  return request ({
    url: `/admin/hosp/hospital/showHospDetail/${id}`,
    method: 'get'
  })
}

3.2.4 修改显示页面组件

添加/views/hosp/show.vue组件

html"><template>
<div class="app-container">
    <h4>基本信息</h4>
    <table class="table table-striped table-condenseda table-bordered" width="100%">
        <tbody>
            <tr>
                <th width="15%">医院名称</th>
                <td width="35%"><b style="font-size: 14px">{{ hospital.hosname }}</b> | {{ hospital.param.hostypeString }}</td>
                <th width="15%">医院logo</th>
                <td width="35%">
                    <img :src="'data:image/jpeg;base64,'+hospital.logoData" width="80">
                </td>
            </tr>
            <tr>
                <th>医院编码</th>
                <td>{{ hospital.hoscode }}</td>
                <th>地址</th>
                <td>{{ hospital.param.fullAddress }}</td>
            </tr>
            <tr>
                <th>坐车路线</th>
                <td colspan="3">{{ hospital.route }}</td>
            </tr>
            <tr>
                <th>医院简介</th>
                <td colspan="3">{{ hospital.intro }}</td>
            </tr>
        </tbody>
        </table>

        <h4>预约规则信息</h4>
        <table class="table table-striped table-condenseda table-bordered" width="100%">
        <tbody>
            <tr>
                <th width="15%">预约周期</th>
                <td width="35%">{{ bookingRule.cycle }}天</td>
                <th width="15%">放号时间</th>
                <td width="35%">{{ bookingRule.releaseTime }}</td>
            </tr>
            <tr>
                <th>停挂时间</th>
                <td>{{ bookingRule.stopTime }}</td>
                <th>退号时间</th>
                <td>{{ bookingRule.quitDay == -1 ? '就诊前一工作日' : '就诊当日' }}{{ bookingRule.quitTime }} 前取消</td>
            </tr>
            <tr>
                <th>预约规则</th>
                <td colspan="3">
                <ol>
                <li v-for="item in bookingRule.rule" :key="item">{{ item }}</li>
                </ol>
                </td>
            </tr>
        <br>
            <el-row>
            <el-button @click="back">返回</el-button>
            </el-row>
        </tbody>
    </table>
</div>
</template>

<script>html" title=java>javascript">
import hospApi from '@/api/hosp'
export default {
    data() {
        return {
            hospital: null,  //医院信息
            bookingRule: null //预约信息
        }
    },
    created() {
        //获取路由id
        const id = this.$route.params.id
        //调用方法,根据id查询医院详情
        this.fetachHospDetail(id)
    },
    methods:{
        //根据id查询医院详情
        fetachHospDetail(id) {
            hospApi.getHospById(id)
                .then(response => {
                    this.hospital = response.data.hospital
                    this.bookingRule = response.data.bookingRule
                })
        },
        //返回医院列表
        back() {
            this.$router.push({ path: '/hospSet/hosp/list' })
        }
    }
}
</script>

3.2.5 引入详情样式文件

改样式文件是控制详情展示的css布局文件

1,将/show.css文件引入yygh-admin/src/styles目录

2,在src/main.js文件添加引用

html" title=java>java">import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n

import '@/styles/index.scss' // global css
import '@/styles/show.css'
……

http://www.niftyadmin.cn/n/349784.html

相关文章

微软 LoRA| 使用万分之一的参数微调你的GPT3模型

一、概述 title&#xff1a;LORA: LOW-RANK ADAPTATION OF LARGE LAN- GUAGE MODELS 论文地址&#xff1a;https://arxiv.org/abs/2106.09685 代码&#xff1a;GitHub - microsoft/LoRA: Code for loralib, an implementation of "LoRA: Low-Rank Adaptation of Large …

六、元素属性,元素操作,设备操作

目录 1、元素属性 2、元素操作 3、设备操作 TouchAction-单指操作 MultiAction-多指操作 1、元素属性 ele_attribute(value) 2、元素操作 # 点击 ele.click() # 输入 ele.send_keys() # 截图 ele.screenshot() # 输入value ele.set_value() # 输入text ele.set_text() # 元…

归纳和演绎

1. 概念 归纳就是从个别到一般的推理过程。指从许多个别的事物中概括出一般性概念、原则或结论的思维方法。 而演绎则是从一般到个别的推理过程。由一般原理推演出特殊情况下的结论。 2.区别 2.1 思考的顺序不同 归纳的本质是情况—结果—规则。推理的起点是从认清现状开始…

VuePress V1 踩坑记录

文章目录 前言1.Node.js 版本问题2.侧边栏3.添加页面目录导航4.非首页 footer 不生效5.部署到 Github 的错误vuepress 的 docs 与 Github Pages 的 docs 目录冲突样式丢失 7.资源引用问题本地图片找不到引用 CSDN 图片报 403 错误 参考文献 前言 我的第二本开源电子书《后台开…

【数据结构与算法】- 周测三

课程链接: 清华大学驭风计划 代码仓库&#xff1a;Victor94-king/MachineLearning: MachineLearning basic introduction (github.com) 驭风计划是由清华大学老师教授的&#xff0c;其分为四门课&#xff0c;包括: 机器学习(张敏教授) &#xff0c; 深度学习(胡晓林教授), 计算…

Java【TCP 协议2】确认应答、超时重传机制

文章目录 前言一、确认应答1, 什么是确认应答2, 序列号和确认应答号 二、超时重传1, 什么是超时重传 总结 前言 各位读者好, 我是小陈, 这是我的个人主页, 希望我的专栏能够帮助到你: &#x1f4d5; JavaSE基础: 基础语法, 类和对象, 封装继承多态, 接口, 综合小练习图书管理系…

【自然语言处理】- 作业5: 智能问答在法律智能领域的应用

课程链接: 清华大学驭风计划 代码仓库&#xff1a;Victor94-king/MachineLearning: MachineLearning basic introduction (github.com) 驭风计划是由清华大学老师教授的&#xff0c;其分为四门课&#xff0c;包括: 机器学习(张敏教授) &#xff0c; 深度学习(胡晓林教授), 计算…

【算法】【算法杂谈】从n个数中等概率打印m个数

aTOC 前言 当前所有算法都使用测试用例运行过&#xff0c;但是不保证100%的测试用例&#xff0c;如果存在问题务必联系批评指正~ 在此感谢左大神让我对算法有了新的感悟认识&#xff01; 问题介绍 原问题 给定一个arr&#xff0c;已知arr长度为n&#xff0c;给定一个整数m&a…