ProjectBudgetDetailsServiceImpl
parent
964c34e4b8
commit
f27fc0d903
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.server.sso_combined.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.server.sso_combined.domain.SsoCombined;
|
||||
import com.ruoyi.server.sso_combined.service.ISsoCombinedService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 单点登录配置与健康检查合并Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/sso_combined")
|
||||
public class SsoCombinedController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISsoCombinedService ssoCombinedService;
|
||||
|
||||
/**
|
||||
* 查询单点登录配置与健康检查合并列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:sso_combined:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SsoCombined ssoCombined)
|
||||
{
|
||||
startPage();
|
||||
List<SsoCombined> list = ssoCombinedService.selectSsoCombinedList(ssoCombined);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出单点登录配置与健康检查合并列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:sso_combined:export')")
|
||||
@Log(title = "单点登录配置与健康检查合并", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SsoCombined ssoCombined)
|
||||
{
|
||||
List<SsoCombined> list = ssoCombinedService.selectSsoCombinedList(ssoCombined);
|
||||
ExcelUtil<SsoCombined> util = new ExcelUtil<SsoCombined>(SsoCombined.class);
|
||||
util.exportExcel(response, list, "单点登录配置与健康检查合并数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单点登录配置与健康检查合并详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:sso_combined:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(ssoCombinedService.selectSsoCombinedById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单点登录配置与健康检查合并
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:sso_combined:add')")
|
||||
@Log(title = "单点登录配置与健康检查合并", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SsoCombined ssoCombined)
|
||||
{
|
||||
return toAjax(ssoCombinedService.insertSsoCombined(ssoCombined));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单点登录配置与健康检查合并
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:sso_combined:edit')")
|
||||
@Log(title = "单点登录配置与健康检查合并", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SsoCombined ssoCombined)
|
||||
{
|
||||
return toAjax(ssoCombinedService.updateSsoCombined(ssoCombined));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单点登录配置与健康检查合并
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:sso_combined:remove')")
|
||||
@Log(title = "单点登录配置与健康检查合并", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(ssoCombinedService.deleteSsoCombinedByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.server.sso_combined.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.server.sso_combined.domain.SsoCombined;
|
||||
|
||||
/**
|
||||
* 单点登录配置与健康检查合并Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-02
|
||||
*/
|
||||
public interface SsoCombinedMapper
|
||||
{
|
||||
/**
|
||||
* 查询单点登录配置与健康检查合并
|
||||
*
|
||||
* @param id 单点登录配置与健康检查合并主键
|
||||
* @return 单点登录配置与健康检查合并
|
||||
*/
|
||||
public SsoCombined selectSsoCombinedById(Long id);
|
||||
|
||||
/**
|
||||
* 查询单点登录配置与健康检查合并列表
|
||||
*
|
||||
* @param ssoCombined 单点登录配置与健康检查合并
|
||||
* @return 单点登录配置与健康检查合并集合
|
||||
*/
|
||||
public List<SsoCombined> selectSsoCombinedList(SsoCombined ssoCombined);
|
||||
|
||||
/**
|
||||
* 新增单点登录配置与健康检查合并
|
||||
*
|
||||
* @param ssoCombined 单点登录配置与健康检查合并
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSsoCombined(SsoCombined ssoCombined);
|
||||
|
||||
/**
|
||||
* 修改单点登录配置与健康检查合并
|
||||
*
|
||||
* @param ssoCombined 单点登录配置与健康检查合并
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSsoCombined(SsoCombined ssoCombined);
|
||||
|
||||
/**
|
||||
* 删除单点登录配置与健康检查合并
|
||||
*
|
||||
* @param id 单点登录配置与健康检查合并主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSsoCombinedById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除单点登录配置与健康检查合并
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSsoCombinedByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.server.sso_combined.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.server.sso_combined.domain.SsoCombined;
|
||||
|
||||
/**
|
||||
* 单点登录配置与健康检查合并Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-02
|
||||
*/
|
||||
public interface ISsoCombinedService
|
||||
{
|
||||
/**
|
||||
* 查询单点登录配置与健康检查合并
|
||||
*
|
||||
* @param id 单点登录配置与健康检查合并主键
|
||||
* @return 单点登录配置与健康检查合并
|
||||
*/
|
||||
public SsoCombined selectSsoCombinedById(Long id);
|
||||
|
||||
/**
|
||||
* 查询单点登录配置与健康检查合并列表
|
||||
*
|
||||
* @param ssoCombined 单点登录配置与健康检查合并
|
||||
* @return 单点登录配置与健康检查合并集合
|
||||
*/
|
||||
public List<SsoCombined> selectSsoCombinedList(SsoCombined ssoCombined);
|
||||
|
||||
/**
|
||||
* 新增单点登录配置与健康检查合并
|
||||
*
|
||||
* @param ssoCombined 单点登录配置与健康检查合并
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSsoCombined(SsoCombined ssoCombined);
|
||||
|
||||
/**
|
||||
* 修改单点登录配置与健康检查合并
|
||||
*
|
||||
* @param ssoCombined 单点登录配置与健康检查合并
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSsoCombined(SsoCombined ssoCombined);
|
||||
|
||||
/**
|
||||
* 批量删除单点登录配置与健康检查合并
|
||||
*
|
||||
* @param ids 需要删除的单点登录配置与健康检查合并主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSsoCombinedByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除单点登录配置与健康检查合并信息
|
||||
*
|
||||
* @param id 单点登录配置与健康检查合并主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSsoCombinedById(Long id);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.server.sso_combined.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.server.sso_combined.mapper.SsoCombinedMapper;
|
||||
import com.ruoyi.server.sso_combined.domain.SsoCombined;
|
||||
import com.ruoyi.server.sso_combined.service.ISsoCombinedService;
|
||||
|
||||
/**
|
||||
* 单点登录配置与健康检查合并Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-02
|
||||
*/
|
||||
@Service
|
||||
public class SsoCombinedServiceImpl implements ISsoCombinedService
|
||||
{
|
||||
@Autowired
|
||||
private SsoCombinedMapper ssoCombinedMapper;
|
||||
|
||||
/**
|
||||
* 查询单点登录配置与健康检查合并
|
||||
*
|
||||
* @param id 单点登录配置与健康检查合并主键
|
||||
* @return 单点登录配置与健康检查合并
|
||||
*/
|
||||
@Override
|
||||
public SsoCombined selectSsoCombinedById(Long id)
|
||||
{
|
||||
return ssoCombinedMapper.selectSsoCombinedById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单点登录配置与健康检查合并列表
|
||||
*
|
||||
* @param ssoCombined 单点登录配置与健康检查合并
|
||||
* @return 单点登录配置与健康检查合并
|
||||
*/
|
||||
@Override
|
||||
public List<SsoCombined> selectSsoCombinedList(SsoCombined ssoCombined)
|
||||
{
|
||||
return ssoCombinedMapper.selectSsoCombinedList(ssoCombined);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单点登录配置与健康检查合并
|
||||
*
|
||||
* @param ssoCombined 单点登录配置与健康检查合并
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSsoCombined(SsoCombined ssoCombined)
|
||||
{
|
||||
ssoCombined.setCreateTime(DateUtils.getNowDate());
|
||||
return ssoCombinedMapper.insertSsoCombined(ssoCombined);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单点登录配置与健康检查合并
|
||||
*
|
||||
* @param ssoCombined 单点登录配置与健康检查合并
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSsoCombined(SsoCombined ssoCombined)
|
||||
{
|
||||
ssoCombined.setUpdateTime(DateUtils.getNowDate());
|
||||
return ssoCombinedMapper.updateSsoCombined(ssoCombined);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除单点登录配置与健康检查合并
|
||||
*
|
||||
* @param ids 需要删除的单点登录配置与健康检查合并主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSsoCombinedByIds(Long[] ids)
|
||||
{
|
||||
return ssoCombinedMapper.deleteSsoCombinedByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单点登录配置与健康检查合并信息
|
||||
*
|
||||
* @param id 单点登录配置与健康检查合并主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSsoCombinedById(Long id)
|
||||
{
|
||||
return ssoCombinedMapper.deleteSsoCombinedById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.server.sso_combined.mapper.SsoCombinedMapper">
|
||||
|
||||
<resultMap type="SsoCombined" id="SsoCombinedResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="systemName" column="system_name" />
|
||||
<result property="ssoUrl" column="sso_url" />
|
||||
<result property="configStatus" column="config_status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="checkTime" column="check_time" />
|
||||
<result property="healthStatus" column="health_status" />
|
||||
<result property="responseTime" column="response_time" />
|
||||
<result property="errorMessage" column="error_message" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSsoCombinedVo">
|
||||
select id, system_name, sso_url, config_status, create_time, update_time, check_time, health_status, response_time, error_message from sso_combined
|
||||
</sql>
|
||||
|
||||
<select id="selectSsoCombinedList" parameterType="SsoCombined" resultMap="SsoCombinedResult">
|
||||
<include refid="selectSsoCombinedVo"/>
|
||||
<where>
|
||||
<if test="systemName != null and systemName != ''"> and system_name like concat('%', #{systemName}, '%')</if>
|
||||
<if test="ssoUrl != null and ssoUrl != ''"> and sso_url like concat('%', #{ssoUrl}, '%')</if>
|
||||
<if test="configStatus != null "> and config_status = #{configStatus}</if>
|
||||
<if test="checkTime != null "> and check_time = #{checkTime}</if>
|
||||
<if test="healthStatus != null "> and health_status = #{healthStatus}</if>
|
||||
<if test="responseTime != null "> and response_time = #{responseTime}</if>
|
||||
<if test="errorMessage != null and errorMessage != ''"> and error_message = #{errorMessage}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSsoCombinedById" parameterType="Long" resultMap="SsoCombinedResult">
|
||||
<include refid="selectSsoCombinedVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSsoCombined" parameterType="SsoCombined" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sso_combined
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="systemName != null and systemName != ''">system_name,</if>
|
||||
<if test="ssoUrl != null and ssoUrl != ''">sso_url,</if>
|
||||
<if test="configStatus != null">config_status,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="checkTime != null">check_time,</if>
|
||||
<if test="healthStatus != null">health_status,</if>
|
||||
<if test="responseTime != null">response_time,</if>
|
||||
<if test="errorMessage != null">error_message,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="systemName != null and systemName != ''">#{systemName},</if>
|
||||
<if test="ssoUrl != null and ssoUrl != ''">#{ssoUrl},</if>
|
||||
<if test="configStatus != null">#{configStatus},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="checkTime != null">#{checkTime},</if>
|
||||
<if test="healthStatus != null">#{healthStatus},</if>
|
||||
<if test="responseTime != null">#{responseTime},</if>
|
||||
<if test="errorMessage != null">#{errorMessage},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSsoCombined" parameterType="SsoCombined">
|
||||
update sso_combined
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="systemName != null and systemName != ''">system_name = #{systemName},</if>
|
||||
<if test="ssoUrl != null and ssoUrl != ''">sso_url = #{ssoUrl},</if>
|
||||
<if test="configStatus != null">config_status = #{configStatus},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="checkTime != null">check_time = #{checkTime},</if>
|
||||
<if test="healthStatus != null">health_status = #{healthStatus},</if>
|
||||
<if test="responseTime != null">response_time = #{responseTime},</if>
|
||||
<if test="errorMessage != null">error_message = #{errorMessage},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSsoCombinedById" parameterType="Long">
|
||||
delete from sso_combined where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSsoCombinedByIds" parameterType="String">
|
||||
delete from sso_combined where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询单点登录配置与健康检查合并列表
|
||||
export function listSso_combined(query) {
|
||||
return request({
|
||||
url: '/system/sso_combined/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询单点登录配置与健康检查合并详细
|
||||
export function getSso_combined(id) {
|
||||
return request({
|
||||
url: '/system/sso_combined/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增单点登录配置与健康检查合并
|
||||
export function addSso_combined(data) {
|
||||
return request({
|
||||
url: '/system/sso_combined',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改单点登录配置与健康检查合并
|
||||
export function updateSso_combined(data) {
|
||||
return request({
|
||||
url: '/system/sso_combined',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除单点登录配置与健康检查合并
|
||||
export function delSso_combined(id) {
|
||||
return request({
|
||||
url: '/system/sso_combined/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -0,0 +1,374 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="系统名称" prop="systemName">
|
||||
<el-input
|
||||
v-model="queryParams.systemName"
|
||||
placeholder="请输入系统名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单点登录URL" prop="ssoUrl">
|
||||
<el-input
|
||||
v-model="queryParams.ssoUrl"
|
||||
placeholder="请输入单点登录URL"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="配置状态" prop="configStatus">
|
||||
<el-select v-model="queryParams.configStatus" placeholder="请选择配置状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sso_combined_config_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查时间" prop="checkTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.checkTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择检查时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="健康状态" prop="healthStatus">
|
||||
<el-select v-model="queryParams.healthStatus" placeholder="请选择健康状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sso_combined_health_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="响应时间" prop="responseTime">
|
||||
<el-input
|
||||
v-model="queryParams.responseTime"
|
||||
placeholder="请输入响应时间"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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:sso_combined:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:sso_combined:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:sso_combined:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:sso_combined:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="sso_combinedList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键ID" align="center" prop="id" />
|
||||
<el-table-column label="系统名称" align="center" prop="systemName" />
|
||||
<el-table-column label="单点登录URL" align="center" prop="ssoUrl" />
|
||||
<el-table-column label="配置状态" align="center" prop="configStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sso_combined_config_status" :value="scope.row.configStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查时间" align="center" prop="checkTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="健康状态" align="center" prop="healthStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sso_combined_health_status" :value="scope.row.healthStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="响应时间" align="center" prop="responseTime" />
|
||||
<el-table-column label="错误信息" align="center" prop="errorMessage" />
|
||||
<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:sso_combined:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:sso_combined:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改单点登录配置与健康检查合并对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="系统名称" prop="systemName">
|
||||
<el-input v-model="form.systemName" placeholder="请输入系统名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单点登录URL" prop="ssoUrl">
|
||||
<el-input v-model="form.ssoUrl" placeholder="请输入单点登录URL" />
|
||||
</el-form-item>
|
||||
<el-form-item label="配置状态" prop="configStatus">
|
||||
<el-select v-model="form.configStatus" placeholder="请选择配置状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sso_combined_config_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查时间" prop="checkTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.checkTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择检查时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="健康状态" prop="healthStatus">
|
||||
<el-select v-model="form.healthStatus" placeholder="请选择健康状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sso_combined_health_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="响应时间" prop="responseTime">
|
||||
<el-input v-model="form.responseTime" placeholder="请输入响应时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="错误信息" prop="errorMessage">
|
||||
<el-input v-model="form.errorMessage" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</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 { listSso_combined, getSso_combined, delSso_combined, addSso_combined, updateSso_combined } from "@/api/system/sso_combined";
|
||||
|
||||
export default {
|
||||
name: "Sso_combined",
|
||||
dicts: ['sso_combined_config_status', 'sso_combined_health_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 单点登录配置与健康检查合并表格数据
|
||||
sso_combinedList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
systemName: null,
|
||||
ssoUrl: null,
|
||||
configStatus: null,
|
||||
checkTime: null,
|
||||
healthStatus: null,
|
||||
responseTime: null,
|
||||
errorMessage: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
systemName: [
|
||||
{ required: true, message: "系统名称不能为空", trigger: "blur" }
|
||||
],
|
||||
ssoUrl: [
|
||||
{ required: true, message: "单点登录URL不能为空", trigger: "blur" }
|
||||
],
|
||||
configStatus: [
|
||||
{ required: true, message: "配置状态不能为空", trigger: "change" }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: "配置创建时间不能为空", trigger: "blur" }
|
||||
],
|
||||
updateTime: [
|
||||
{ required: true, message: "配置更新时间不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询单点登录配置与健康检查合并列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSso_combined(this.queryParams).then(response => {
|
||||
this.sso_combinedList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
systemName: null,
|
||||
ssoUrl: null,
|
||||
configStatus: null,
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
checkTime: null,
|
||||
healthStatus: null,
|
||||
responseTime: null,
|
||||
errorMessage: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加单点登录配置与健康检查合并";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getSso_combined(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改单点登录配置与健康检查合并";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateSso_combined(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSso_combined(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除单点登录配置与健康检查合并编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delSso_combined(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/sso_combined/export', {
|
||||
...this.queryParams
|
||||
}, `sso_combined_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue