尚医通(十三)后台医院管理模块

news2025/2/28 15:33:42

目录

  • 一、医院管理模块需求分析
    • 1、医院列表
    • 2、医院详情
  • 二、医院列表功能(接口)
    • 1、添加service分页接口与实现
    • 2、添加controller方法
    • 3、service_cmn模块提供接口
      • 3.1 添加service接口与实现
      • 3.2 添加controller
    • 4、封装Feign服务调用
      • 4.1 搭建service_client父模块
      • 4.2 在service_client模块引入依赖
      • 4.3 搭建service_cmn_client模块
      • 4.4 添加Feign接口类
    • 5、医院接口远程调用数据字典
      • 5.1 在service-hosp添加依赖
      • 5.2 service_hosp模块启动类添加注解
      • 5.3 调整service方法
    • 6、添加数据字典显示接口
      • 6.1 根据dictcode查询下层节点
  • 三、医院列表功能(前端)
  • 四、更新医院上线状态功能(接口)
    • 1、添加service方法和实现
    • 2、添加controller
  • 五、更新医院上线状态功能(前端)
    • 1、封装api请求
    • 2、修改/views/hosp/list.vue组件
  • 六、医院详情(接口)
    • 1、添加service方法和实现
    • 2、添加controller方法
  • 七、医院详情(前端)
    • 1、添加隐藏路由
    • 2、创建医院详情页面

一、医院管理模块需求分析

目前我们把医院、科室和排班都上传到了平台,那么管理平台就应该把他们管理起来,在我们的管理平台能够直观的查看这些信息

1、医院列表

在这里插入图片描述

2、医院详情

在这里插入图片描述

二、医院列表功能(接口)

1、添加service分页接口与实现

(1)在HospitalService定义医院列表方法

Page<Hospital> getHospitalPage(Integer pageNum, Integer pageSize, HospitalQueryVo hospitalQueryVo);

(2)在HospitalServiceImpl添加医院列表实现的方法

 @Override
    public Page<Hospital> getHospitalPage(Integer pageNum, Integer pageSize, HospitalQueryVo hospitalQueryVo) {

        Hospital hospital = new Hospital();
//        if (!StringUtils.isEmpty(hospitalQueryVo.getHosname())){
//            hospital.setHosname(hospitalQueryVo.getHosname());
//        }
//        if (!StringUtils.isEmpty(hospitalQueryVo.getHoscode())){
//            hospital.setHoscode(hospitalQueryVo.getHoscode());
//        }
//        if (!StringUtils.isEmpty(hospitalQueryVo.getCityCode())){
//            hospital.setCityCode(hospitalQueryVo.getCityCode());
//        }
        BeanUtils.copyProperties(hospitalQueryVo, hospital);
        //0为第一页
        Pageable pageable = PageRequest.of(pageNum-1, pageSize);
        //创建匹配器,即如何使用查询条件
        ExampleMatcher matcher = ExampleMatcher.matching() //构建对象
//                .withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING) //改变默认字符串匹配方式:模糊查询
                .withMatcher("hosname",ExampleMatcher.GenericPropertyMatchers.contains())
                .withIgnoreCase(true); //改变默认大小写忽略方式:忽略大小写
        Example<Hospital> hospitalExample = Example.of(hospital, matcher);
        Page<Hospital> pages = hospitalRepository.findAll(hospitalExample, pageable);
        return pages;
    }

2、添加controller方法

在HospitalController添加医院列表方法

@RestController
@RequestMapping("/admin/hospital")
public class HospitalController {

    @Autowired
    private HospitalService hospitalService;

    @GetMapping("/{pageNum}/{pageSize}")
    public R getHospitalPage(@PathVariable Integer pageNum, @PathVariable Integer pageSize, HospitalQueryVo hospitalQueryVo){
        Page<Hospital> hospitalPage = hospitalService.getHospitalPage(pageNum,pageSize,hospitalQueryVo);
        return R.ok().data("total",hospitalPage.getTotalPages()).data("list",hospitalPage.getTotalElements());
    }
}

3、service_cmn模块提供接口

3.1 添加service接口与实现

在DictService添加查询数据字典方法

    String getNameByValue(Long value);

    String getNameByDictCodeAndValue(String dictCode, Long value);

在DictServiceImpl实现查询数据字典方法

    @Override
    public String getNameByValue(Long value) {
        QueryWrapper<Dict> wrapper = new QueryWrapper<>();
        wrapper.eq("value",value);
        Dict dict = baseMapper.selectOne(wrapper);
        if (dict != null){
            return dict.getName();
        }
        return null;
    }

    @Override
    public String getNameByDictCodeAndValue(String dictCode, Long value) {
        QueryWrapper<Dict> wrapper = new QueryWrapper<>();
        wrapper.eq("dict_code",dictCode);
        Dict dict = baseMapper.selectOne(wrapper);
        QueryWrapper<Dict> wrapper1 = new QueryWrapper<>();
        wrapper1.eq("parent_id",dict.getId());
        wrapper1.eq("value",value);
        Dict dict2 = baseMapper.selectOne(wrapper1);
        return dict2.getName();
    }

3.2 添加controller

在DictController添加方法
提供两个api接口,如省市区不需要上级编码,医院等级需要上级编码

    //根据医院所属的省市区编号获取省市区文字
    //远程调用@PathVariable指定value属性值
    @GetMapping("/{value}")
    public String getNameByValue(@PathVariable("value") Long value){
        return dictService.getNameByValue(value);
    }

    //根据医院的等级编号获取医院等级信息
    @GetMapping("/{dictCode}/{value}")
    public String getNameByDictCodeAndValue(@PathVariable("dictCode") String dictCode,
                                            @PathVariable("value") Long value){
        return dictService.getNameByDictCodeAndValue(dictCode,value);
    }

4、封装Feign服务调用

openfeign4步骤
1.导入openfeign依赖
2.自定义一个feign客户端接口,@FeignClient(value="调用方在注册中心上的应用名称“),方法和被调用方的controller层方法完全一致
3.在启动类上加@EnableFeignClient(basePackages=“com.donglin.yygh”)注解
4.在远程调用的地方直接注入自定义feign接口的代理对象,即可远程调用

思考如果多个模块调用同一个微服务?
service 
   service_cmn
   service_hosp:4步依赖service-cmn-client
       3.在启动类上加@EnableFeignClient(basePackages="com.donglin.yygh")注解
       4.在远程调用的地方直接注入自定义feign接口的代理对象,即可远程调用
service-client:
   service-cmn-client
       1.导入openfeign依赖
       2.自定义一个feign客户端接口,@FeignClient(value="调用方在注册中心上的应用名称“),方法和被调用方的controller层方法完全一致

4.1 搭建service_client父模块

在这里插入图片描述

4.2 在service_client模块引入依赖

    <dependencies>
        <dependency>
            <groupId>com.donglin</groupId>
            <artifactId>model</artifactId>
            <version>0.0.1-SNAPSHOT</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>

4.3 搭建service_cmn_client模块

在这里插入图片描述

4.4 添加Feign接口类

在这里插入图片描述

@FeignClient(value = "service-cmn")  //被调用方  在application.properties去查看服务名称   spring.application.name=service-cmn
public interface DictFeignClient {

    //根据医院所属的省市区编号获取省市区文字
    //远程调用@PathVariable指定value属性值
    @GetMapping("/admin/cmn/{value}")
    public String getNameByValue(@PathVariable("value") Long value);

    //根据医院的等级编号获取医院等级信息
    @GetMapping("/admin/cmn/{dictCode}/{value}")
    public String getNameByDictCodeAndValue(@PathVariable("dictCode") String dictCode,
                                            @PathVariable("value") Long value);

}

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

5.1 在service-hosp添加依赖

        <dependency>
            <groupId>com.donglin</groupId>
            <artifactId>service_cmn_client</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>

5.2 service_hosp模块启动类添加注解

@SpringBootApplication
@ComponentScan(basePackages = {"com.donglin"})
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.donglin.yygh")
public class ServiceHospApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceHospApplication.class,args);
    }
}

5.3 调整service方法

修改HospitalServiceImpl类实现分页

    @Autowired
    private DictFeignClient dictFeignClient;
    
    @Override
    public Page<Hospital> getHospitalPage(Integer pageNum, Integer pageSize, HospitalQueryVo hospitalQueryVo) {

        Hospital hospital = new Hospital();
        BeanUtils.copyProperties(hospitalQueryVo, hospital);
        //0为第一页
        Pageable pageable = PageRequest.of(pageNum-1, pageSize);
        //创建匹配器,即如何使用查询条件
        ExampleMatcher matcher = ExampleMatcher.matching() //构建对象
//                .withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING) //改变默认字符串匹配方式:模糊查询
                .withMatcher("hosname",ExampleMatcher.GenericPropertyMatchers.contains())
                .withIgnoreCase(true); //改变默认大小写忽略方式:忽略大小写
        Example<Hospital> hospitalExample = Example.of(hospital, matcher);
        Page<Hospital> pages = hospitalRepository.findAll(hospitalExample, pageable);
        pages.getContent().stream().forEach(item->{
            this.packageHospital(item);
        });
        return pages;
    }

    private void packageHospital(Hospital item) {
        String hostype = item.getHostype();
        String provinceCode = item.getProvinceCode();
        String cityCode = item.getCityCode();
        String districtCode = item.getDistrictCode();
        String provinceAddress = dictFeignClient.getNameByValue(Long.parseLong(provinceCode));
        String cityAddress = dictFeignClient.getNameByValue(Long.parseLong(cityCode));
        String districtAddress = dictFeignClient.getNameByValue(Long.parseLong(districtCode));

        String level = dictFeignClient.getNameByDictCodeAndValue(DictEnum.HOSTYPE.getDictCode(), Long.parseLong(hostype));
        item.getParam().put("hostypeString",level);
        item.getParam().put("fullAddress",provinceAddress+cityAddress+districtAddress+ item.getAddress());
    }

5.4 启动service_cmn和service_hosp服务,访问service_hosp的swagger-ui界面测试

6、添加数据字典显示接口

用于页面条件查询,多级联动
直接用之前的

6.1 根据dictcode查询下层节点

(1)添加controller

    @ApiOperation(value = "根据数据id查询子数据列表")
    @GetMapping("/childList/{pid}")
    @Cacheable(value = "dict", key = "'selectIndexList'+#pid")
    public R getchildListById(@PathVariable Long pid){
        List<Dict> list = dictService.getchildListById(pid);
        return R.ok().data("items",list);
    }

(2)编写service
定义方法

List<Dict> getchildListById(Long pid);

实现方法

    @Override
    public List<Dict> getchildListById(Long pid) {
        QueryWrapper<Dict> wrapper = new QueryWrapper<>();
        wrapper.eq("parent_id",pid);
        List<Dict> dictList = baseMapper.selectList(wrapper);
        //向list集合每个dict对象中设置hasChildren
        for (Dict dict : dictList) {
            Long dictId = dict.getId();
            boolean isChild = this.isChildren(dictId);
            dict.setHasChildren(isChild);
        }
        return dictList;
    }

三、医院列表功能(前端)

(1)在router/index.js添加

  {
    path: '/yygh/hosp',
    component: Layout,
    redirect: '/yygh/hosp/list',
    name: '医院管理',
    alwaysShow: true,
    meta: { title: '医院管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'list',
        name: '医院列表',
        component: () => import('@/views/yygh/hosp/list'),
        meta: { title: '医院列表', icon: 'table' }
      }
    ]
  },

(2)封装api请求
在api/yygh目录下创建hosp.js文件
在这里插入图片描述

import request from '@/utils/request'

export default {
  //医院列表
  getPageList(pageNum,pageSize,searchObj) {
    return request ({
      url: `/admin/hospital/${pageNum}/${pageSize}`,
      method: 'get',
      params: searchObj  
    })
  },
  //查询dictCode查询下级数据字典
  getChildList(pid) {
    return request({
        url: `/admin/cmn/childList/${pid}`,
        method: 'get'
      })
    },
  
}

创建hosp/list.vue页面
在这里插入图片描述

(3)编写页面内容
在hosp/list.vue添加内容

<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="请选择市">
                    <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">
                <template slot-scope="scope">
                    <router-link :to="'/hospSet/hospital/show/'+scope.row.id">
                        <el-button type="primary" size="mini">查看</el-button>
                    </router-link>
                    <router-link :to="'/hospSet/hospital/schedule/'+scope.row.hoscode">
                        <el-button type="primary" size="mini">排班</el-button>
                    </router-link>
    
                    <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>
        </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>
    import hospApi from '@/api/hosp.js'
    export default {
        data() {
            return {
                listLoading: true, // 数据是否正在加载
                list: null, // 医院列表数据集合
                total: 0, // 数据库中的总记录数
                page: 1, // 默认页码
                limit: 10, // 每页记录数
                searchObj: {
                    provinceCode:'',
                    cityCode:''
                }, // 查询表单对象
                provinceList: [], //所有省集合
                cityList: []   //所有市集合
            }
        },
        created() {
            //调用医院列表
            this.fetchData()
            //调用查询所有省的方法
            hospApi.getChildList(86).then(response => {
                this.provinceList = response.data.items
            })
    
        },
        methods: {
            //医院列表
            fetchData(page=1) {
                this.page = page
                hospApi.getPageList(this.page,this.limit,this.searchObj)
                    .then(response => {
                        //每页数据集合
                        this.list = response.data.list
                        //总记录数
                        this.total = response.data.total
                        //加载图表不显示
                        this.listLoading = false
                    })
            },
            //查询所有省
            findAllProvince() {
                hospApi.getChildList(86).then(response => {
                    this.provinceList = response.data.items
            })
            },
            //点击某个省,显示里面市(联动)
            provinceChanged() {
                //初始化值
                this.cityList = []
                this.searchObj.cityCode = ''
                //调用方法,根据省id,查询下面子节点
                hospApi.getChildList(this.searchObj.provinceCode)
                    .then(response => {
                        //console.log(response.data.dictList)
                        this.cityList = response.data.items
                    })
            },
            //分页,页码变化
            changeSize() {
                this.limit = size
                this.fetchData(1)
            },
             //医院列表
            fetchData(page=1) {
                this.page = page
                hospApi.getPageList(this.page,this.limit,this.searchObj)
                    .then(response => {
                        //每页数据集合
                        this.list = response.data.list
                        //总记录数
                        this.total = response.data.total
                        //加载图表不显示
                        this.listLoading = false
                    })
            },
            //查询所有省
            findAllProvince() {
                hospApi.getChildList(86).then(response => {
                    this.provinceList = response.data.items
            })
            },
            //点击某个省,显示里面市(联动)
            provinceChanged() {
                //初始化值
                this.cityList = []
                this.searchObj.cityCode = ''
                //调用方法,根据省id,查询下面子节点
                hospApi.getChildList(this.searchObj.provinceCode)
                    .then(response => {
                        //console.log(response.data.dictList)
                        this.cityList = response.data.items
                    })
            },
            //分页,页码变化
            changeSize() {
                this.limit = size
                this.fetchData(1)
            },
            resetData(){
                this.searchObj={},
                this.fetchData()
            }
        }
    }
    </script>

四、更新医院上线状态功能(接口)

1、添加service方法和实现

(1)在HospService定义方法

void updateStatus(String id, Integer status);

(2)在HospServiceImpl实现方法

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

2、添加controller

在HospController添加方法

    @ApiOperation(value = "更新上线状态")
    @PutMapping("/{id}/{status}")
    public R updateStatus(@PathVariable String id,@PathVariable Integer status){
        hospitalService.updateStatus(id,status);
        return R.ok();
    }

五、更新医院上线状态功能(前端)

1、封装api请求

在api/yygh/hosp.js添加

    //更新上线状态
    updateStatus(id,status){
        return request({
            url: `/admin/hospital/${id}/${status}`,
            method: 'put'
        })
    },

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

<el-table-column label="操作" width="230" align="center">
    <template slot-scope="scope">
        <router-link :to="'/hospSet/hospital/show/'+scope.row.id">
            <el-button type="primary" size="mini">查看</el-button>
        </router-link>
        <router-link :to="'/hospSet/hospital/schedule/'+scope.row.hoscode">
            <el-button type="primary" size="mini">排班</el-button>
        </router-link>

        <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){
                this.$confirm('您是否要修改医院状态, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                    }).then(() => {
                        hospApi.updateStatus(id,status).then(res=>{
                          this.fetchData(this.page)
                        })  
                    }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消修改'
                    });          
                    });
            },

六、医院详情(接口)

1、添加service方法和实现

(1)在HospService定义方法

/**
     * 医院详情
     * @param id
     * @return
     */
    Hospital detail(String id);

(2)在HospServiceImpl定义方法

    @Override
    public Hospital detail(String id) {
        Hospital hospital = hospitalRepository.findById(id).get();
        this.packageHospital(hospital);
        return hospital;
    }

2、添加controller方法

    @ApiOperation(value = "获取医院详情")
    @GetMapping("/detail/{id}")
    public R detail(@PathVariable String id){
        Hospital hospital = hospitalService.detail(id);
        return R.ok().data("hospital",hospital);
    }

七、医院详情(前端)

1、添加隐藏路由

在router/index.js添加

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

2、创建医院详情页面

在这里插入图片描述

(1)添加查看按钮
list.vue

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

(2)封装api请求

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

(3)修改显示页面组件

<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>
import hospApi from '@/api/yygh/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.hospital
                    this.bookingRule = response.data.hospital.bookingRule
                })
        },
        //返回医院列表
        back() {
            this.$router.push({ path: '/hospSet/hosp/list' })
        }
    }
}
</script>

(4)引入样式
第一、将show.css文件复制到src/styles目录
在这里插入图片描述
第二、在src/main.js文件添加引用

import '@/styles/show.css'

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

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

相关文章

论文投稿指南——中文核心期刊推荐(园艺)

【前言】 &#x1f680; 想发论文怎么办&#xff1f;手把手教你论文如何投稿&#xff01;那么&#xff0c;首先要搞懂投稿目标——论文期刊 &#x1f384; 在期刊论文的分布中&#xff0c;存在一种普遍现象&#xff1a;即对于某一特定的学科或专业来说&#xff0c;少数期刊所含…

Spring3之注解(Annotation)

简介 前面介绍的都是通过 xml 文件配置的方式&#xff0c;Spring 也可以通过注解的方式添加配置&#xff0c;在实际开发过程中&#xff0c;最佳实践是&#xff1a;属于 Spring 的系统配置配置在 xml 文件中&#xff0c;而像注入 bean 之类的配置则通过注解的方式&#xff1b;这…

IDEA根据wsdl生成java代码(Generate Java Code from WSDL)以及乱码问题的解决

目录 一、根据wsdl生成java代码 1、创建待存放java代码的目录&#xff0c;点击“帮助”>“查找操作”&#xff0c;打开查找窗口&#xff1b; 2、输入wsdl并查找&#xff0c;点击“从WSDL生成Java代码”&#xff0c;打开新的窗口&#xff1b; 3、选择wsdl文件&#xff0c…

LeetCode 2.两数相加

原题链接 难度&#xff1a;middle\color{orange}{middle}middle 题目描述 给你两个 非空 的链表&#xff0c;表示两个非负的整数。它们每位数字都是按照 逆序 的方式存储的&#xff0c;并且每个节点只能存储 一位 数字。 请你将两个数相加&#xff0c;并以相同形式返回一个表…

工作记录------lombok中@Data包含哪些功能?

工作记录------lombok中Data包含哪些功能&#xff1f; 在实体类中加上Data后&#xff0c;实体类有哪些增强&#xff1f; Data public class BaseProcedure {TableId(value "id", type IdType.ASSIGN_UUID)private String id;private String procedureCode;写上Da…

字节青训营——秒杀系统设计学习笔记(二)

一、两次MD5加密设计 加密&#xff1a;出于安全考虑 第一次 &#xff08;在前端加密&#xff0c;客户端&#xff09;&#xff1a;密码加密是&#xff08;明文密码固定盐值&#xff09;生成md5用于传输&#xff0c;目的&#xff0c;由于http是明文传输&#xff0c;当输入密码若…

Linux进程线程管理

目录 存储管理 linux内存管理基本框架 系统空间管理和用户空间管理 进程与进程调度 进程四要素 用户堆栈的扩展 进程三部曲&#xff1a;创建&#xff0c;执行&#xff0c;消亡 系统调用exit(),wait() 内核中的互斥操作 存储管理 linux内存管理基本框架 系统空间管理…

sql手工注入练习拿flag

sql手工注入练习拿flag 记录一下自己重新开始学习web安全之路⑤。 1、找注入点 ①url ②搜索框 ③登录框 2、找交互点 用单引号判断是否存在交互点&#xff0c;发现回显不正常&#xff0c;说明url存在有交互点 3、判断类型&#xff08;char类型&#xff09; 利用and 11 和…

Linux Shell脚本讲解

目录 Shell脚本基础 Shell脚本组成 Shell脚本工作方式 编写简单的Shell脚本 Shell脚本参数 Shell脚本接收参数 Shell脚本判断用户参数 文件测试与逻辑测试语句 整数测试比较语句 字符串比较语句 Shell流程控制 if条件判断语句 单分支 双分支 多分支 for循环语句…

第五章.与学习相关技巧—参数更新的最优化方法(SGD,Momentum,AdaGrad,Adam)

第五章.与学习相关技巧 5.1 参数更新的最优化方法 神经网络学习的目的是找到使损失函数的值尽可能小的参数&#xff0c;这是寻找最优参数的问题&#xff0c;解决这个问题的过程称为最优化。很多深度学习框架都实现了各种最优化方法&#xff0c;比如Lasagne深度学习框架&#xf…

Vue中使用天地图

Vue项目引入天地图 在vue的静态资源目录下的index.html中引入天地图的底图&#xff0c;开发天地图源码路径&#xff1a;天地图API 方法一&#xff1a;加载天地图&#xff0c;引用&#xff1a;public/index.html <script type"text/javascript" src"http:/…

来来来,手摸手写一个hook

hello&#xff0c;这里是潇晨&#xff0c;今天就带着大家一起来手写一个迷你版的hooks&#xff0c;方便大家理解hook在源码中的运行机制&#xff0c;配有图解&#xff0c;保姆级的教程&#xff0c;只求同学一个小小的&#x1f44d;&#xff0c;&#x1f436;。 第一步&#xf…

【软件测试】团队测试技术体现,遇到不可复现bug处理方式......

目录&#xff1a;导读前言一、Python编程入门到精通二、接口自动化项目实战三、Web自动化项目实战四、App自动化项目实战五、一线大厂简历六、测试开发DevOps体系七、常用自动化测试工具八、JMeter性能测试九、总结&#xff08;尾部小惊喜&#xff09;前言 测试技术带来的是PP…

ThingsBoard-规则链-check alarm status

1、概述 从今天开始,专门讲解ThingsBoard的规则链,每一个节点都会详细讲解,并且配套案例,让大家都能理解,喜欢请点个关注。今天讲的是筛选器的第第一个节点【check alarm status】,意思是检测告警状态。 2、节点理解 2.1、概述 【check alarm status】节点如图所示:…

解立方根-蓝桥杯

题目 分析 主要是运用二分法使复杂度减低。 代码 #include<iostream> #include<iomanip> #include<cmath> using namespace std; #define double long double const double eps 1e-12; int main() {int T 1;cin >> T;while (T--){double n;cin &g…

LMS 最佳实践:学习管理系统中的知识管理!

企业需要在整个组织中收集、存储和传播知识。我们被信息淹没了&#xff0c;因此应该充分利用学习管理系统&#xff08;LMS&#xff09;来组织业务资产并支持知识管理&#xff08;KM&#xff09;战略。LMS 不仅仅是一个捕获电子学习单元和多项选择题的系统。它很可能没有充分发挥…

代码随想录算法训练营第二十八天 | 491.递增子序列,46.全排列,47.全排列 II

一、参考资料递增子序列题目链接/文章讲解&#xff1a;https://programmercarl.com/0491.%E9%80%92%E5%A2%9E%E5%AD%90%E5%BA%8F%E5%88%97.html 视频讲解&#xff1a;https://www.bilibili.com/video/BV1EG4y1h78v 全排列题目链接/文章讲解&#xff1a;https://programmercarl.…

从零学架构-基础部分

一、架构的基础将学习的架构设计知识总结出来&#xff0c;分享给大家。1.1什么是架构架构和框架是什么关系&#xff1f;有什么区别?Linux有架构&#xff0c;MySQL有架构&#xff0c;JVM也有架构&#xff0c;应该关注哪个架构&#xff1f;金融有架构&#xff0c;支付有架构&…

【排序算法】数据结构排序详解

前言&#xff1a; 今天我们将讲解我们数据结构初阶的最后一部分知识的学习&#xff0c;也是最为“炸裂”的知识---------排序算法的讲解&#xff01;&#xff01;&#xff01;&#xff01; 目录1.排序的概念及其运用1.1排序的概念1.2排序运用2.常见排序算法的实现2.1 插入排序2…

Java 基础面试题——集合

目录1.Java 有哪些常用容器&#xff08;集合&#xff09;&#xff1f;2.Collection 和 Collections 有什么区别&#xff1f;3.List、Set、Map 之间的区别是什么&#xff1f;4.HashMap 的长度为什么是 2 的 N 次方&#xff1f;源码中是如何保证的&#xff1f;5.HashMap 和 Hasht…