ProjectBudgetDetailsServiceImpl

main
zhangshengli 3 months ago
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,140 @@
package com.ruoyi.server.sso_combined.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* sso_combined
*
* @author ruoyi
* @date 2024-07-02
*/
public class SsoCombined extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 系统名称 */
@Excel(name = "系统名称")
private String systemName;
/** 单点登录URL */
@Excel(name = "单点登录URL")
private String ssoUrl;
/** 配置状态1启用0禁用 */
@Excel(name = "配置状态", readConverterExp = "1=启用0禁用")
private Integer configStatus;
/** 检查时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "检查时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date checkTime;
/** 健康状态1正常0异常 */
@Excel(name = "健康状态", readConverterExp = "1=正常0异常")
private Integer healthStatus;
/** 响应时间(毫秒) */
@Excel(name = "响应时间", readConverterExp = "毫=秒")
private Long responseTime;
/** 错误信息 */
@Excel(name = "错误信息")
private String errorMessage;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setSystemName(String systemName)
{
this.systemName = systemName;
}
public String getSystemName()
{
return systemName;
}
public void setSsoUrl(String ssoUrl)
{
this.ssoUrl = ssoUrl;
}
public String getSsoUrl()
{
return ssoUrl;
}
public void setConfigStatus(Integer configStatus)
{
this.configStatus = configStatus;
}
public Integer getConfigStatus()
{
return configStatus;
}
public void setCheckTime(Date checkTime)
{
this.checkTime = checkTime;
}
public Date getCheckTime()
{
return checkTime;
}
public void setHealthStatus(Integer healthStatus)
{
this.healthStatus = healthStatus;
}
public Integer getHealthStatus()
{
return healthStatus;
}
public void setResponseTime(Long responseTime)
{
this.responseTime = responseTime;
}
public Long getResponseTime()
{
return responseTime;
}
public void setErrorMessage(String errorMessage)
{
this.errorMessage = errorMessage;
}
public String getErrorMessage()
{
return errorMessage;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("systemName", getSystemName())
.append("ssoUrl", getSsoUrl())
.append("configStatus", getConfigStatus())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("checkTime", getCheckTime())
.append("healthStatus", getHealthStatus())
.append("responseTime", getResponseTime())
.append("errorMessage", getErrorMessage())
.toString();
}
}

@ -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…
Cancel
Save