Commit 627f8cc0 authored by zhangjianqian's avatar zhangjianqian

企业评价与总结

parent c69195a5
package com.zehong.web.controller.evaluate;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TEnterpriseRanking;
import com.zehong.system.service.ITEnterpriseRankingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 企业评价Controller
*
* @author zehong
* @date 2026-03-17
*/
@RestController
@RequestMapping("/system/ranking")
public class TEnterpriseRankingController extends BaseController
{
@Autowired
private ITEnterpriseRankingService tEnterpriseRankingService;
/**
* 查询企业评价列表
*/
@GetMapping("/list")
public TableDataInfo list(TEnterpriseRanking tEnterpriseRanking)
{
startPage();
List<TEnterpriseRanking> list = tEnterpriseRankingService.selectTEnterpriseRankingList(tEnterpriseRanking);
return getDataTable(list);
}
/**
* 导出企业评价列表
*/
@Log(title = "企业评价", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEnterpriseRanking tEnterpriseRanking)
{
List<TEnterpriseRanking> list = tEnterpriseRankingService.selectTEnterpriseRankingList(tEnterpriseRanking);
ExcelUtil<TEnterpriseRanking> util = new ExcelUtil<TEnterpriseRanking>(TEnterpriseRanking.class);
return util.exportExcel(list, "企业评价数据");
}
/**
* 获取企业评价详细信息
*/
@GetMapping(value = "/{rankingId}")
public AjaxResult getInfo(@PathVariable("rankingId") Long rankingId)
{
return AjaxResult.success(tEnterpriseRankingService.selectTEnterpriseRankingById(rankingId));
}
/**
* 新增企业评价
*/
@Log(title = "企业评价", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEnterpriseRanking tEnterpriseRanking)
{
return toAjax(tEnterpriseRankingService.insertTEnterpriseRanking(tEnterpriseRanking));
}
/**
* 修改企业评价
*/
@Log(title = "企业评价", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEnterpriseRanking tEnterpriseRanking)
{
return toAjax(tEnterpriseRankingService.updateTEnterpriseRanking(tEnterpriseRanking));
}
/**
* 删除企业评价
*/
@Log(title = "企业评价", businessType = BusinessType.DELETE)
@DeleteMapping("/{rankingIds}")
public AjaxResult remove(@PathVariable Long[] rankingIds)
{
return toAjax(tEnterpriseRankingService.deleteTEnterpriseRankingByIds(rankingIds));
}
}
package com.zehong.web.controller.evaluate;
import java.util.List;
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.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TEnterpriseRankingRisk;
import com.zehong.system.service.ITEnterpriseRankingRiskService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 薄弱跟踪Controller
*
* @author zehong
* @date 2026-03-17
*/
@RestController
@RequestMapping("/system/risk")
public class TEnterpriseRankingRiskController extends BaseController
{
@Autowired
private ITEnterpriseRankingRiskService tEnterpriseRankingRiskService;
/**
* 查询薄弱跟踪列表
*/
@GetMapping("/list")
public TableDataInfo list(TEnterpriseRankingRisk tEnterpriseRankingRisk)
{
startPage();
List<TEnterpriseRankingRisk> list = tEnterpriseRankingRiskService.selectTEnterpriseRankingRiskList(tEnterpriseRankingRisk);
return getDataTable(list);
}
/**
* 导出薄弱跟踪列表
*/
@Log(title = "薄弱跟踪", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEnterpriseRankingRisk tEnterpriseRankingRisk)
{
List<TEnterpriseRankingRisk> list = tEnterpriseRankingRiskService.selectTEnterpriseRankingRiskList(tEnterpriseRankingRisk);
ExcelUtil<TEnterpriseRankingRisk> util = new ExcelUtil<TEnterpriseRankingRisk>(TEnterpriseRankingRisk.class);
return util.exportExcel(list, "薄弱跟踪数据");
}
/**
* 获取薄弱跟踪详细信息
*/
@GetMapping(value = "/{riskId}")
public AjaxResult getInfo(@PathVariable("riskId") Long riskId)
{
return AjaxResult.success(tEnterpriseRankingRiskService.selectTEnterpriseRankingRiskById(riskId));
}
/**
* 新增薄弱跟踪
*/
@Log(title = "薄弱跟踪", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEnterpriseRankingRisk tEnterpriseRankingRisk)
{
return toAjax(tEnterpriseRankingRiskService.insertTEnterpriseRankingRisk(tEnterpriseRankingRisk));
}
/**
* 修改薄弱跟踪
*/
@Log(title = "薄弱跟踪", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEnterpriseRankingRisk tEnterpriseRankingRisk)
{
return toAjax(tEnterpriseRankingRiskService.updateTEnterpriseRankingRisk(tEnterpriseRankingRisk));
}
/**
* 删除薄弱跟踪
*/
@Log(title = "薄弱跟踪", businessType = BusinessType.DELETE)
@DeleteMapping("/{riskIds}")
public AjaxResult remove(@PathVariable Long[] riskIds)
{
return toAjax(tEnterpriseRankingRiskService.deleteTEnterpriseRankingRiskByIds(riskIds));
}
}
package com.zehong.system.domain;
import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 企业评价对象 t_enterprise_ranking
*
* @author zehong
* @date 2026-03-17
*/
public class TEnterpriseRanking extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 排名id */
private Long rankingId;
/** 年度 */
@Excel(name = "年度")
private Integer yearNum;
/** 企业id */
@Excel(name = "企业id")
private String beyondEnterpriseId;
/** 企业名称 */
@Excel(name = "企业名称")
private String enterpriseName;
private String enterpriseTyep;
/** 事故评分 */
@Excel(name = "事故评分")
private BigDecimal accidentNum;
/** 隐患评分 */
@Excel(name = "隐患评分")
private BigDecimal hiddenNum;
/** 投诉评分 */
@Excel(name = "投诉评分")
private BigDecimal complaintNum;
/** 总评分 */
@Excel(name = "总评分")
private BigDecimal fraction;
/** 评价结果 */
@Excel(name = "评价结果")
private String result;
public String getEnterpriseTyep() {
return enterpriseTyep;
}
public void setEnterpriseTyep(String enterpriseTyep) {
this.enterpriseTyep = enterpriseTyep;
}
public void setRankingId(Long rankingId)
{
this.rankingId = rankingId;
}
public Long getRankingId()
{
return rankingId;
}
public void setYearNum(Integer yearNum)
{
this.yearNum = yearNum;
}
public Integer getYearNum()
{
return yearNum;
}
public void setBeyondEnterpriseId(String beyondEnterpriseId)
{
this.beyondEnterpriseId = beyondEnterpriseId;
}
public String getBeyondEnterpriseId()
{
return beyondEnterpriseId;
}
public void setEnterpriseName(String enterpriseName)
{
this.enterpriseName = enterpriseName;
}
public String getEnterpriseName()
{
return enterpriseName;
}
public void setAccidentNum(BigDecimal accidentNum)
{
this.accidentNum = accidentNum;
}
public BigDecimal getAccidentNum()
{
return accidentNum;
}
public void setHiddenNum(BigDecimal hiddenNum)
{
this.hiddenNum = hiddenNum;
}
public BigDecimal getHiddenNum()
{
return hiddenNum;
}
public void setComplaintNum(BigDecimal complaintNum)
{
this.complaintNum = complaintNum;
}
public BigDecimal getComplaintNum()
{
return complaintNum;
}
public void setFraction(BigDecimal fraction)
{
this.fraction = fraction;
}
public BigDecimal getFraction()
{
return fraction;
}
public void setResult(String result)
{
this.result = result;
}
public String getResult()
{
return result;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("rankingId", getRankingId())
.append("yearNum", getYearNum())
.append("beyondEnterpriseId", getBeyondEnterpriseId())
.append("enterpriseName", getEnterpriseName())
.append("accidentNum", getAccidentNum())
.append("hiddenNum", getHiddenNum())
.append("complaintNum", getComplaintNum())
.append("fraction", getFraction())
.append("result", getResult())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.domain;
import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 薄弱跟踪对象 t_enterprise_ranking_risk
*
* @author zehong
* @date 2026-03-17
*/
public class TEnterpriseRankingRisk extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 评价风险指标id */
private Long riskId;
/** 年度 */
@Excel(name = "年度")
private Integer yearNum;
/** 企业id */
@Excel(name = "企业id")
private String beyondEnterpriseId;
/** 企业名称 */
@Excel(name = "企业名称")
private String enterpriseName;
/** 不合格指标项 */
@Excel(name = "不合格指标项")
private String indicator;
/** 总分 */
@Excel(name = "总分")
private BigDecimal allNum;
/** 指标分 */
@Excel(name = "指标分")
private BigDecimal indicatorNum;
/** 风险问题 */
@Excel(name = "风险问题")
private String problem;
/** 解决方案 */
@Excel(name = "解决方案")
private String plan;
/** 附件 */
@Excel(name = "附件")
private String fileUrl;
/** 状态 1处理中 2已处理 */
@Excel(name = "状态 1处理中 2已处理")
private Integer status;
public void setRiskId(Long riskId)
{
this.riskId = riskId;
}
public Long getRiskId()
{
return riskId;
}
public void setYearNum(Integer yearNum)
{
this.yearNum = yearNum;
}
public Integer getYearNum()
{
return yearNum;
}
public void setBeyondEnterpriseId(String beyondEnterpriseId)
{
this.beyondEnterpriseId = beyondEnterpriseId;
}
public String getBeyondEnterpriseId()
{
return beyondEnterpriseId;
}
public void setEnterpriseName(String enterpriseName)
{
this.enterpriseName = enterpriseName;
}
public String getEnterpriseName()
{
return enterpriseName;
}
public void setIndicator(String indicator)
{
this.indicator = indicator;
}
public String getIndicator()
{
return indicator;
}
public void setAllNum(BigDecimal allNum)
{
this.allNum = allNum;
}
public BigDecimal getAllNum()
{
return allNum;
}
public void setIndicatorNum(BigDecimal indicatorNum)
{
this.indicatorNum = indicatorNum;
}
public BigDecimal getIndicatorNum()
{
return indicatorNum;
}
public void setProblem(String problem)
{
this.problem = problem;
}
public String getProblem()
{
return problem;
}
public void setPlan(String plan)
{
this.plan = plan;
}
public String getPlan()
{
return plan;
}
public void setFileUrl(String fileUrl)
{
this.fileUrl = fileUrl;
}
public String getFileUrl()
{
return fileUrl;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("riskId", getRiskId())
.append("yearNum", getYearNum())
.append("beyondEnterpriseId", getBeyondEnterpriseId())
.append("enterpriseName", getEnterpriseName())
.append("indicator", getIndicator())
.append("allNum", getAllNum())
.append("indicatorNum", getIndicatorNum())
.append("problem", getProblem())
.append("plan", getPlan())
.append("fileUrl", getFileUrl())
.append("status", getStatus())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TEnterpriseRanking;
/**
* 企业评价Mapper接口
*
* @author zehong
* @date 2026-03-17
*/
public interface TEnterpriseRankingMapper
{
/**
* 查询企业评价
*
* @param rankingId 企业评价ID
* @return 企业评价
*/
public TEnterpriseRanking selectTEnterpriseRankingById(Long rankingId);
/**
* 查询企业评价列表
*
* @param tEnterpriseRanking 企业评价
* @return 企业评价集合
*/
public List<TEnterpriseRanking> selectTEnterpriseRankingList(TEnterpriseRanking tEnterpriseRanking);
/**
* 新增企业评价
*
* @param tEnterpriseRanking 企业评价
* @return 结果
*/
public int insertTEnterpriseRanking(TEnterpriseRanking tEnterpriseRanking);
/**
* 修改企业评价
*
* @param tEnterpriseRanking 企业评价
* @return 结果
*/
public int updateTEnterpriseRanking(TEnterpriseRanking tEnterpriseRanking);
/**
* 删除企业评价
*
* @param rankingId 企业评价ID
* @return 结果
*/
public int deleteTEnterpriseRankingById(Long rankingId);
/**
* 批量删除企业评价
*
* @param rankingIds 需要删除的数据ID
* @return 结果
*/
public int deleteTEnterpriseRankingByIds(Long[] rankingIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TEnterpriseRankingRisk;
/**
* 薄弱跟踪Mapper接口
*
* @author zehong
* @date 2026-03-17
*/
public interface TEnterpriseRankingRiskMapper
{
/**
* 查询薄弱跟踪
*
* @param riskId 薄弱跟踪ID
* @return 薄弱跟踪
*/
public TEnterpriseRankingRisk selectTEnterpriseRankingRiskById(Long riskId);
/**
* 查询薄弱跟踪列表
*
* @param tEnterpriseRankingRisk 薄弱跟踪
* @return 薄弱跟踪集合
*/
public List<TEnterpriseRankingRisk> selectTEnterpriseRankingRiskList(TEnterpriseRankingRisk tEnterpriseRankingRisk);
/**
* 新增薄弱跟踪
*
* @param tEnterpriseRankingRisk 薄弱跟踪
* @return 结果
*/
public int insertTEnterpriseRankingRisk(TEnterpriseRankingRisk tEnterpriseRankingRisk);
/**
* 修改薄弱跟踪
*
* @param tEnterpriseRankingRisk 薄弱跟踪
* @return 结果
*/
public int updateTEnterpriseRankingRisk(TEnterpriseRankingRisk tEnterpriseRankingRisk);
/**
* 删除薄弱跟踪
*
* @param riskId 薄弱跟踪ID
* @return 结果
*/
public int deleteTEnterpriseRankingRiskById(Long riskId);
/**
* 批量删除薄弱跟踪
*
* @param riskIds 需要删除的数据ID
* @return 结果
*/
public int deleteTEnterpriseRankingRiskByIds(Long[] riskIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TEnterpriseRankingRisk;
/**
* 薄弱跟踪Service接口
*
* @author zehong
* @date 2026-03-17
*/
public interface ITEnterpriseRankingRiskService
{
/**
* 查询薄弱跟踪
*
* @param riskId 薄弱跟踪ID
* @return 薄弱跟踪
*/
public TEnterpriseRankingRisk selectTEnterpriseRankingRiskById(Long riskId);
/**
* 查询薄弱跟踪列表
*
* @param tEnterpriseRankingRisk 薄弱跟踪
* @return 薄弱跟踪集合
*/
public List<TEnterpriseRankingRisk> selectTEnterpriseRankingRiskList(TEnterpriseRankingRisk tEnterpriseRankingRisk);
/**
* 新增薄弱跟踪
*
* @param tEnterpriseRankingRisk 薄弱跟踪
* @return 结果
*/
public int insertTEnterpriseRankingRisk(TEnterpriseRankingRisk tEnterpriseRankingRisk);
/**
* 修改薄弱跟踪
*
* @param tEnterpriseRankingRisk 薄弱跟踪
* @return 结果
*/
public int updateTEnterpriseRankingRisk(TEnterpriseRankingRisk tEnterpriseRankingRisk);
/**
* 批量删除薄弱跟踪
*
* @param riskIds 需要删除的薄弱跟踪ID
* @return 结果
*/
public int deleteTEnterpriseRankingRiskByIds(Long[] riskIds);
/**
* 删除薄弱跟踪信息
*
* @param riskId 薄弱跟踪ID
* @return 结果
*/
public int deleteTEnterpriseRankingRiskById(Long riskId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TEnterpriseRanking;
/**
* 企业评价Service接口
*
* @author zehong
* @date 2026-03-17
*/
public interface ITEnterpriseRankingService
{
/**
* 查询企业评价
*
* @param rankingId 企业评价ID
* @return 企业评价
*/
public TEnterpriseRanking selectTEnterpriseRankingById(Long rankingId);
/**
* 查询企业评价列表
*
* @param tEnterpriseRanking 企业评价
* @return 企业评价集合
*/
public List<TEnterpriseRanking> selectTEnterpriseRankingList(TEnterpriseRanking tEnterpriseRanking);
/**
* 新增企业评价
*
* @param tEnterpriseRanking 企业评价
* @return 结果
*/
public int insertTEnterpriseRanking(TEnterpriseRanking tEnterpriseRanking);
/**
* 修改企业评价
*
* @param tEnterpriseRanking 企业评价
* @return 结果
*/
public int updateTEnterpriseRanking(TEnterpriseRanking tEnterpriseRanking);
/**
* 批量删除企业评价
*
* @param rankingIds 需要删除的企业评价ID
* @return 结果
*/
public int deleteTEnterpriseRankingByIds(Long[] rankingIds);
/**
* 删除企业评价信息
*
* @param rankingId 企业评价ID
* @return 结果
*/
public int deleteTEnterpriseRankingById(Long rankingId);
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TEnterpriseRankingRiskMapper;
import com.zehong.system.domain.TEnterpriseRankingRisk;
import com.zehong.system.service.ITEnterpriseRankingRiskService;
/**
* 薄弱跟踪Service业务层处理
*
* @author zehong
* @date 2026-03-17
*/
@Service
public class TEnterpriseRankingRiskServiceImpl implements ITEnterpriseRankingRiskService
{
@Autowired
private TEnterpriseRankingRiskMapper tEnterpriseRankingRiskMapper;
/**
* 查询薄弱跟踪
*
* @param riskId 薄弱跟踪ID
* @return 薄弱跟踪
*/
@Override
public TEnterpriseRankingRisk selectTEnterpriseRankingRiskById(Long riskId)
{
return tEnterpriseRankingRiskMapper.selectTEnterpriseRankingRiskById(riskId);
}
/**
* 查询薄弱跟踪列表
*
* @param tEnterpriseRankingRisk 薄弱跟踪
* @return 薄弱跟踪
*/
@Override
public List<TEnterpriseRankingRisk> selectTEnterpriseRankingRiskList(TEnterpriseRankingRisk tEnterpriseRankingRisk)
{
return tEnterpriseRankingRiskMapper.selectTEnterpriseRankingRiskList(tEnterpriseRankingRisk);
}
/**
* 新增薄弱跟踪
*
* @param tEnterpriseRankingRisk 薄弱跟踪
* @return 结果
*/
@Override
public int insertTEnterpriseRankingRisk(TEnterpriseRankingRisk tEnterpriseRankingRisk)
{
tEnterpriseRankingRisk.setCreateTime(DateUtils.getNowDate());
return tEnterpriseRankingRiskMapper.insertTEnterpriseRankingRisk(tEnterpriseRankingRisk);
}
/**
* 修改薄弱跟踪
*
* @param tEnterpriseRankingRisk 薄弱跟踪
* @return 结果
*/
@Override
public int updateTEnterpriseRankingRisk(TEnterpriseRankingRisk tEnterpriseRankingRisk)
{
return tEnterpriseRankingRiskMapper.updateTEnterpriseRankingRisk(tEnterpriseRankingRisk);
}
/**
* 批量删除薄弱跟踪
*
* @param riskIds 需要删除的薄弱跟踪ID
* @return 结果
*/
@Override
public int deleteTEnterpriseRankingRiskByIds(Long[] riskIds)
{
return tEnterpriseRankingRiskMapper.deleteTEnterpriseRankingRiskByIds(riskIds);
}
/**
* 删除薄弱跟踪信息
*
* @param riskId 薄弱跟踪ID
* @return 结果
*/
@Override
public int deleteTEnterpriseRankingRiskById(Long riskId)
{
return tEnterpriseRankingRiskMapper.deleteTEnterpriseRankingRiskById(riskId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TEnterpriseRankingMapper;
import com.zehong.system.domain.TEnterpriseRanking;
import com.zehong.system.service.ITEnterpriseRankingService;
/**
* 企业评价Service业务层处理
*
* @author zehong
* @date 2026-03-17
*/
@Service
public class TEnterpriseRankingServiceImpl implements ITEnterpriseRankingService
{
@Autowired
private TEnterpriseRankingMapper tEnterpriseRankingMapper;
/**
* 查询企业评价
*
* @param rankingId 企业评价ID
* @return 企业评价
*/
@Override
public TEnterpriseRanking selectTEnterpriseRankingById(Long rankingId)
{
return tEnterpriseRankingMapper.selectTEnterpriseRankingById(rankingId);
}
/**
* 查询企业评价列表
*
* @param tEnterpriseRanking 企业评价
* @return 企业评价
*/
@Override
public List<TEnterpriseRanking> selectTEnterpriseRankingList(TEnterpriseRanking tEnterpriseRanking)
{
return tEnterpriseRankingMapper.selectTEnterpriseRankingList(tEnterpriseRanking);
}
/**
* 新增企业评价
*
* @param tEnterpriseRanking 企业评价
* @return 结果
*/
@Override
public int insertTEnterpriseRanking(TEnterpriseRanking tEnterpriseRanking)
{
tEnterpriseRanking.setCreateTime(DateUtils.getNowDate());
return tEnterpriseRankingMapper.insertTEnterpriseRanking(tEnterpriseRanking);
}
/**
* 修改企业评价
*
* @param tEnterpriseRanking 企业评价
* @return 结果
*/
@Override
public int updateTEnterpriseRanking(TEnterpriseRanking tEnterpriseRanking)
{
return tEnterpriseRankingMapper.updateTEnterpriseRanking(tEnterpriseRanking);
}
/**
* 批量删除企业评价
*
* @param rankingIds 需要删除的企业评价ID
* @return 结果
*/
@Override
public int deleteTEnterpriseRankingByIds(Long[] rankingIds)
{
return tEnterpriseRankingMapper.deleteTEnterpriseRankingByIds(rankingIds);
}
/**
* 删除企业评价信息
*
* @param rankingId 企业评价ID
* @return 结果
*/
@Override
public int deleteTEnterpriseRankingById(Long rankingId)
{
return tEnterpriseRankingMapper.deleteTEnterpriseRankingById(rankingId);
}
}
<?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.zehong.system.mapper.TEnterpriseRankingMapper">
<resultMap type="TEnterpriseRanking" id="TEnterpriseRankingResult">
<result property="rankingId" column="ranking_id" />
<result property="yearNum" column="year_num" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="enterpriseTyep" column="enterprise_type" />
<result property="accidentNum" column="accident_num" />
<result property="hiddenNum" column="hidden_num" />
<result property="complaintNum" column="complaint_num" />
<result property="fraction" column="fraction" />
<result property="result" column="result" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTEnterpriseRankingVo">
select ranking_id, year_num, beyond_enterprise_id, enterprise_name,enterprise_type, accident_num, hidden_num, complaint_num, fraction, result, create_time from t_enterprise_ranking
</sql>
<select id="selectTEnterpriseRankingList" parameterType="TEnterpriseRanking" resultMap="TEnterpriseRankingResult">
<include refid="selectTEnterpriseRankingVo"/>
<where>
<if test="yearNum != null "> and year_num = #{yearNum}</if>
</where>
</select>
<select id="selectTEnterpriseRankingById" parameterType="Long" resultMap="TEnterpriseRankingResult">
<include refid="selectTEnterpriseRankingVo"/>
where ranking_id = #{rankingId}
</select>
<insert id="insertTEnterpriseRanking" parameterType="TEnterpriseRanking" useGeneratedKeys="true" keyProperty="rankingId">
insert into t_enterprise_ranking
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="yearNum != null">year_num,</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="accidentNum != null">accident_num,</if>
<if test="hiddenNum != null">hidden_num,</if>
<if test="complaintNum != null">complaint_num,</if>
<if test="fraction != null">fraction,</if>
<if test="result != null">result,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="yearNum != null">#{yearNum},</if>
<if test="beyondEnterpriseId != null">#{beyondEnterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="accidentNum != null">#{accidentNum},</if>
<if test="hiddenNum != null">#{hiddenNum},</if>
<if test="complaintNum != null">#{complaintNum},</if>
<if test="fraction != null">#{fraction},</if>
<if test="result != null">#{result},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTEnterpriseRanking" parameterType="TEnterpriseRanking">
update t_enterprise_ranking
<trim prefix="SET" suffixOverrides=",">
<if test="yearNum != null">year_num = #{yearNum},</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id = #{beyondEnterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="accidentNum != null">accident_num = #{accidentNum},</if>
<if test="hiddenNum != null">hidden_num = #{hiddenNum},</if>
<if test="complaintNum != null">complaint_num = #{complaintNum},</if>
<if test="fraction != null">fraction = #{fraction},</if>
<if test="result != null">result = #{result},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where ranking_id = #{rankingId}
</update>
<delete id="deleteTEnterpriseRankingById" parameterType="Long">
delete from t_enterprise_ranking where ranking_id = #{rankingId}
</delete>
<delete id="deleteTEnterpriseRankingByIds" parameterType="String">
delete from t_enterprise_ranking where ranking_id in
<foreach item="rankingId" collection="array" open="(" separator="," close=")">
#{rankingId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.zehong.system.mapper.TEnterpriseRankingRiskMapper">
<resultMap type="TEnterpriseRankingRisk" id="TEnterpriseRankingRiskResult">
<result property="riskId" column="risk_id" />
<result property="yearNum" column="year_num" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="indicator" column="indicator" />
<result property="allNum" column="all_num" />
<result property="indicatorNum" column="indicator_num" />
<result property="problem" column="problem" />
<result property="plan" column="plan" />
<result property="fileUrl" column="file_url" />
<result property="status" column="status" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTEnterpriseRankingRiskVo">
select risk_id, year_num, beyond_enterprise_id, enterprise_name, indicator, all_num, indicator_num, problem, plan, file_url, status, create_time from t_enterprise_ranking_risk
</sql>
<select id="selectTEnterpriseRankingRiskList" parameterType="TEnterpriseRankingRisk" resultMap="TEnterpriseRankingRiskResult">
<include refid="selectTEnterpriseRankingRiskVo"/>
<where>
<if test="yearNum != null "> and year_num = #{yearNum}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
</where>
</select>
<select id="selectTEnterpriseRankingRiskById" parameterType="Long" resultMap="TEnterpriseRankingRiskResult">
<include refid="selectTEnterpriseRankingRiskVo"/>
where risk_id = #{riskId}
</select>
<insert id="insertTEnterpriseRankingRisk" parameterType="TEnterpriseRankingRisk" useGeneratedKeys="true" keyProperty="riskId">
insert into t_enterprise_ranking_risk
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="yearNum != null">year_num,</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="indicator != null">indicator,</if>
<if test="allNum != null">all_num,</if>
<if test="indicatorNum != null">indicator_num,</if>
<if test="problem != null">problem,</if>
<if test="plan != null">plan,</if>
<if test="fileUrl != null">file_url,</if>
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="yearNum != null">#{yearNum},</if>
<if test="beyondEnterpriseId != null">#{beyondEnterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="indicator != null">#{indicator},</if>
<if test="allNum != null">#{allNum},</if>
<if test="indicatorNum != null">#{indicatorNum},</if>
<if test="problem != null">#{problem},</if>
<if test="plan != null">#{plan},</if>
<if test="fileUrl != null">#{fileUrl},</if>
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTEnterpriseRankingRisk" parameterType="TEnterpriseRankingRisk">
update t_enterprise_ranking_risk
<trim prefix="SET" suffixOverrides=",">
<if test="yearNum != null">year_num = #{yearNum},</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id = #{beyondEnterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="indicator != null">indicator = #{indicator},</if>
<if test="allNum != null">all_num = #{allNum},</if>
<if test="indicatorNum != null">indicator_num = #{indicatorNum},</if>
<if test="problem != null">problem = #{problem},</if>
<if test="plan != null">plan = #{plan},</if>
<if test="fileUrl != null">file_url = #{fileUrl},</if>
<if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where risk_id = #{riskId}
</update>
<delete id="deleteTEnterpriseRankingRiskById" parameterType="Long">
delete from t_enterprise_ranking_risk where risk_id = #{riskId}
</delete>
<delete id="deleteTEnterpriseRankingRiskByIds" parameterType="String">
delete from t_enterprise_ranking_risk where risk_id in
<foreach item="riskId" collection="array" open="(" separator="," close=")">
#{riskId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询企业评价列表
export function listRanking(query) {
return request({
url: '/system/ranking/list',
method: 'get',
params: query
})
}
// 查询企业评价详细
export function getRanking(rankingId) {
return request({
url: '/system/ranking/' + rankingId,
method: 'get'
})
}
// 新增企业评价
export function addRanking(data) {
return request({
url: '/system/ranking',
method: 'post',
data: data
})
}
// 修改企业评价
export function updateRanking(data) {
return request({
url: '/system/ranking',
method: 'put',
data: data
})
}
// 删除企业评价
export function delRanking(rankingId) {
return request({
url: '/system/ranking/' + rankingId,
method: 'delete'
})
}
// 导出企业评价
export function exportRanking(query) {
return request({
url: '/system/ranking/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询薄弱跟踪列表
export function listRisk(query) {
return request({
url: '/system/risk/list',
method: 'get',
params: query
})
}
// 查询薄弱跟踪详细
export function getRisk(riskId) {
return request({
url: '/system/risk/' + riskId,
method: 'get'
})
}
// 新增薄弱跟踪
export function addRisk(data) {
return request({
url: '/system/risk',
method: 'post',
data: data
})
}
// 修改薄弱跟踪
export function updateRisk(data) {
return request({
url: '/system/risk',
method: 'put',
data: data
})
}
// 删除薄弱跟踪
export function delRisk(riskId) {
return request({
url: '/system/risk/' + riskId,
method: 'delete'
})
}
// 导出薄弱跟踪
export function exportRisk(query) {
return request({
url: '/system/risk/export',
method: 'get',
params: query
})
}
\ No newline at end of file
1111
<template> <template>
<div class="exa"> <div class="exa">
<div class="exaone"> <!--<div class="exaone">-->
<div class="topleft"> <!--<div class="topleft">-->
<div class="exaleft"> <!--<div class="exaleft">-->
<div style="color: #188df0">优秀</div> <!--<div style="color: #188df0">优秀</div>-->
<div>考核级别</div> <!--<div>考核级别</div>-->
<div style="width: 30px;border-bottom: 1px solid #188df0;margin-top: 10px"></div> <!--<div style="width: 30px;border-bottom: 1px solid #188df0;margin-top: 10px"></div>-->
</div> <!--</div>-->
<div class="exacenter" id="myChartpieone" :style="{width: '250px', height: '100%'}"></div> <!--<div class="exacenter" id="myChartpieone" :style="{width: '250px', height: '100%'}"></div>-->
<div class="exaright"> <!--<div class="exaright">-->
<div style="color: #188df0"> <!--<div style="color: #188df0">-->
<span>0</span> <!--<span>0</span>-->
<img src="../../assets/up.png" style="width: 15px;height: 12px;margin-bottom: 3px"> <!--<img src="../../assets/up.png" style="width: 15px;height: 12px;margin-bottom: 3px">-->
</div> <!--</div>-->
<div>排名</div> <!--<div>排名</div>-->
<div style="width: 30px;border-bottom: 1px solid #188df0;margin-top: 10px"></div> <!--<div style="width: 30px;border-bottom: 1px solid #188df0;margin-top: 10px"></div>-->
</div> <!--</div>-->
</div> <!--</div>-->
<div class="topright"> <!--<div class="topright">-->
<div class="exatop">2024年度全县共处置<span style="color: #b65bff;font-size: 20px;">0件</span>燃气事故,事故办结率<span style="color: red;font-size: 20px;">0%</span>,平均办结时效<span style="color: #1c84c6;font-size: 20px;">24小时</span>;</div> <!--<div class="exatop">2024年度全县共处置<span style="color: #b65bff;font-size: 20px;">0件</span>燃气事故,事故办结率<span style="color: red;font-size: 20px;">0%</span>,平均办结时效<span style="color: #1c84c6;font-size: 20px;">24小时</span>;</div>-->
<div class="exatop">共组织燃气取暖专项排查、检查任务<span style="color: #2934ff;font-size: 20px;">0次</span>,燃气企业日常巡查<span style="color: #ffbc00;font-size: 20px;">280次</span>,整改<span style="color: red;font-size: 20px;">72次</span>安全隐患。</div> <!--<div class="exatop">共组织燃气取暖专项排查、检查任务<span style="color: #2934ff;font-size: 20px;">0次</span>,燃气企业日常巡查<span style="color: #ffbc00;font-size: 20px;">280次</span>,整改<span style="color: red;font-size: 20px;">72次</span>安全隐患。</div>-->
<div class="exatop">共寄到投诉<span style="color: #1c84c6;font-size: 20px;">30次</span>,已全部处置完成。</div> <!--<div class="exatop">共寄到投诉<span style="color: #1c84c6;font-size: 20px;">30次</span>,已全部处置完成。</div>-->
<div class="exabottom"> <!--<div class="exabottom">-->
<div class="bottoml">全年燃气总结:</div> <!--<div class="bottoml">全年燃气总结:</div>-->
<div class="bottomr"> <!--<div class="bottomr">-->
燃气监管由排名、区域、企业名称、经营类别、燃气事故(件),隐患整治(次),投诉处置(件)、考核得分、考核结果组成。 <!--燃气监管由排名、区域、企业名称、经营类别、燃气事故(件),隐患整治(次),投诉处置(件)、考核得分、考核结果组成。-->
共组织燃区隐患装箱排查、检查任务0次,燃气企业日常巡查0次; <!--共组织燃区隐患装箱排查、检查任务0次,燃气企业日常巡查0次;-->
2024年度全县共处置0件燃气事故,事故办结率0%,平均办结时效24小时;共组织燃气隐患专项排查、检查任务0次,燃气企业日常巡查0次,整改0次安全隐患。共接到投诉0次,已经全部处置完成。</div> <!--2024年度全县共处置0件燃气事故,事故办结率0%,平均办结时效24小时;共组织燃气隐患专项排查、检查任务0次,燃气企业日常巡查0次,整改0次安全隐患。共接到投诉0次,已经全部处置完成。</div>-->
</div> <!--</div>-->
</div> <!--</div>-->
</div> <!--</div>-->
<div class="exatwo"> <div class="exatwo">
<div class="exatwobanner"> <div class="exatwobanner">
<div style="font-size: 22px;margin-left: 5%;">企业排名</div> <div style="font-size: 22px;margin-left: 5%;">企业排名</div>
<el-tabs v-model="activeName" style="width: 360px;margin-left: 60px" @tab-click="handleClick">
<!--<el-tab-pane label="2026年度" name="2026"></el-tab-pane>-->
<el-tab-pane label="2025年度" name="2025"></el-tab-pane>
<el-tab-pane label="2024年度" name="2024"></el-tab-pane>
<el-tab-pane label="2023年度" name="2023"></el-tab-pane>
</el-tabs>
</div> </div>
<div class="exatwoul"> <div class="exatwoul">
<div> <div>
...@@ -41,7 +47,7 @@ ...@@ -41,7 +47,7 @@
<thead> <thead>
<tr> <tr>
<th>排名</th> <th>排名</th>
<th>区域</th> <th>年份</th>
<th>企业名称</th> <th>企业名称</th>
<th>经营类别</th> <th>经营类别</th>
<th>燃气事故评分</th> <th>燃气事故评分</th>
...@@ -52,17 +58,28 @@ ...@@ -52,17 +58,28 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(user, index) in stu" :key="index + 1"> <tr v-for="(item, index) in rankingList" :key="index + 1">
<td>{{index+1}}</td> <td>{{index+1}}</td>
<td>{{user.name}}</td> <td>{{item.yearNum}}</td>
<td>{{user.type}}</td> <td>{{item.enterpriseName}}</td>
<td>{{user.num}}</td> <td>{{item.enterpriseType}}</td>
<td>{{user.price}}</td> <td>{{item.accidentNum}}</td>
<td>{{user.yh}}</td> <td>{{item.hiddenNum}}</td>
<td>{{user.ts}}</td> <td>{{item.complaintNum}}</td>
<td>{{user.kh}}</td> <td>{{item.fraction}}</td>
<td>{{user.jg}}</td> <td>{{item.result}}</td>
</tr> </tr>
<!--<tr v-for="(user, index) in stu" :key="index + 1">-->
<!--<td>{{index+1}}</td>-->
<!--<td>{{user.year}}</td>-->
<!--<td>{{user.type}}</td>-->
<!--<td>{{user.num}}</td>-->
<!--<td>{{user.price}}</td>-->
<!--<td>{{user.yh}}</td>-->
<!--<td>{{user.ts}}</td>-->
<!--<td>{{user.kh}}</td>-->
<!--<td>{{user.jg}}</td>-->
<!--</tr>-->
</tbody> </tbody>
</table> </table>
</div> </div>
...@@ -72,174 +89,55 @@ ...@@ -72,174 +89,55 @@
</template> </template>
<script> <script>
import { listRanking, getRanking, delRanking, addRanking, updateRanking, exportRanking } from "@/api/system/ranking";
export default { export default {
components: {}, components: {},
data() { data() {
return{ return{
user:{name:'',type:'',num:'',price:''}, user:{name:'',type:'',num:'',price:''},
rankingList:[],
activeName:'2025',
stu: [ stu: [
{ {
},
/*{
name: "河北省石家庄平山县", name: "河北省石家庄平山县",
type: "中诚燃气", type: "中诚燃气",
num: "管道燃气", num: "天燃气",
price: "0件", year:'2025',
yh: "42次", price: "4.8",
ts: "10次", yh: "2.8",
kh: 100, ts: "1.9",
kh: 9.5,
jg: "优秀", jg: "优秀",
}, },
{
name: "河北省石家庄平山县",
type: "敬业集团",
num: "瓶装燃气",
price: "0件",
yh: "30次",
ts: "20次",
kh: 100,
jg: "优秀",
},*/
// {
// name: "河北省石家庄平山县",
// type: "盈德气体",
// num: "瓶装燃气",
// price: "1件",
// yh: "70次",
// ts: "18次",
// kh: 99,
// jg: "优秀",
// },
// {
// name: "河北省石家庄平山县",
// type: "石家庄柏坡正元化肥有限公司",
// num: "瓶装燃气",
// price: "3件",
// yh: "46次",
// ts: "10次",
// kh: 99,
// jg: "优秀",
// },
// {
// name: "河北省石家庄平山县",
// type: "平山县顺诚燃气有限公司 -",
// num: "城镇燃气",
// price: "3件",
// yh: "50次",
// ts: "10次",
// kh: 99,
// jg: "优秀",
// },
// {
// name: "河北省石家庄平山县",
// type: "河北玺竑能源有限公司",
// num: "汽车加气",
// price: "4件",
// yh: "43次",
// ts: "25次",
// kh: 99,
// jg: "优秀",
// },
// {
// name: "河北省石家庄平山县",
// type: "石家庄新捷燃气运输有限公司",
// num: "瓶装燃气",
// price: "5件",
// yh: "71次",
// ts: "20次",
// kh: 99,
// jg: "优秀",
// },
// {
// name: "河北省石家庄平山县",
// type: "中裕燃气公司",
// num: "天然气经营",
// price: "3件",
// yh: "56次",
// ts: "14次",
// kh: 99,
// jg: "优秀",
// },
// {
// name: "河北省石家庄平山县",
// type: "石家庄华玉燃气有限公司汽车天然气加气站",
// num: "汽车加气",
// price: "9件",
// yh: "33次",
// ts: "20次",
// kh: 98,
// jg: "优秀",
// },
// {
// name: "河北省石家庄平山县",
// type: "河北天然气华建CNG加气站",
// num: "汽车加气",
// price: "5件",
// yh: "43次",
// ts: "29次",
// kh: 98,
// jg: "优秀",
// },
// {
// name: "河北省石家庄平山县",
// type: "顺诚燃气加气站",
// num: "汽车加气",
// price: "6件",
// yh: "54次",
// ts: "27次",
// kh: 95,
// jg: "优秀",
// },
// {
// name: "河北省石家庄平山县",
// type: "平山博闵加气站",
// num: "汽车加气",
// price: "8件",
// yh: "38次",
// ts: "16次",
// kh: 95,
// jg: "优秀",
// },
// {
// name: "河北省石家庄平山县",
// type: "平山县平安天然气有限公司",
// num: "汽车加气",
// price: "3件",
// yh: "54次",
// ts: "11次",
// kh: 94,
// jg: "良好",
// },
// {
// name: "河北省石家庄平山县",
// type: "平山县烟堡村",
// num: "管道燃气",
// price: "3件",
// yh: "26次",
// ts: "10次",
// kh: 93,
// jg: "良好",
// },
// {
// name: "河北省石家庄平山县",
// type: "平山县西石桥",
// num: "管道燃气",
// price: "10件",
// yh: "19次",
// ts: "11次",
// kh: 92,
// jg: "良好",
// },
], ],
queryParams: {
pageNum: 1,
pageSize: 100,
yearNum: new Date().getFullYear()-1,
},
} }
}, },
mounted () { mounted () {
this.drawLine(); this.getList();
//this.drawLine();
}, },
methods: { methods: {
handleClick(tab, event) {
console.log(tab, event);
this.queryParams.yearNum = this.activeName;
this.getList();
},
getList() {
this.loading = true;
listRanking(this.queryParams).then(response => {
this.rankingList = response.rows;
if(response.rows.length<1){
this.rankingList = [{
}]
}
});
},
drawLine() { drawLine() {
// 基于准备好的dom,初始化echarts实例 // 基于准备好的dom,初始化echarts实例
let myChart1 = this.$echarts.init(document.getElementById("myChartpieone")); let myChart1 = this.$echarts.init(document.getElementById("myChartpieone"));
...@@ -365,6 +263,7 @@ ...@@ -365,6 +263,7 @@
margin-top: 20px; margin-top: 20px;
} }
.exatwobanner{ .exatwobanner{
display: flex;
width: 92%; width: 92%;
height: 35px; height: 35px;
margin-left: 4%; margin-left: 4%;
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="企业名称" prop="enterpriseName">
<el-input
v-model="queryParams.enterpriseName"
placeholder="请输入企业名称"
clearable
size="small"
@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:risk: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:risk: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:risk:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['system:risk:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="riskList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="企业名称" align="center" prop="enterpriseName" />
<el-table-column label="不合格指标项" align="center" prop="indicator" />
<el-table-column label="总分" align="center" prop="allNum" />
<el-table-column label="指标分" align="center" prop="indicatorNum" />
<el-table-column label="风险问题" align="center" prop="problem" />
<el-table-column label="解决方案" align="center" prop="plan" />
<el-table-column label="附件" align="center" prop="fileUrl" >
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.fileUrl)"
v-if="scope.row.fileUrl != null && scope.row.fileUrl!=''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" >
<template slot-scope="scope" >
<span :style="scope.row.status==1?'color:#ff0000':'color:rgb(48, 180, 107)' ">{{scope.row.status==1?'处理中':'已处理'}}</span>
</template>
</el-table-column>
<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:risk:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:risk: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="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!--<el-form-item label="年度" prop="yearNum">-->
<!--<el-input v-model="form.yearNum" placeholder="请输入年度" />-->
<!--</el-form-item>-->
<el-form-item label="企业名称" prop="enterpriseName">
<el-input v-model="form.enterpriseName" placeholder="请输入企业名称" />
</el-form-item>
<el-form-item label="不合格项" prop="indicator">
<el-input v-model="form.indicator" placeholder="请输入不合格指标项" />
</el-form-item>
<el-form-item label="总分" prop="allNum">
<el-input v-model="form.allNum" placeholder="请输入总分" />
</el-form-item>
<el-form-item label="指标分" prop="indicatorNum">
<el-input v-model="form.indicatorNum" placeholder="请输入指标分" />
</el-form-item>
<el-form-item label="风险问题" prop="problem">
<el-input type="textarea" v-model="form.problem" placeholder="请输入风险问题" />
</el-form-item>
<el-form-item label="解决方案" prop="plan">
<el-input type="textarea" v-model="form.plan" placeholder="请输入解决方案" />
</el-form-item>
<el-form-item label="附件" prop="fileUrl">
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" v-model="form.fileUrl"></el-input>
<!--<el-input v-model="form.fileUrl" placeholder="请输入附件" />-->
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio :label="parseInt(1)">处理中</el-radio>
<el-radio :label="parseInt(2)">已完成</el-radio>
</el-radio-group>
</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 { listRisk, getRisk, delRisk, addRisk, updateRisk, exportRisk } from "@/api/system/risk";
import FileUpload from '@/components/FileUpload';
let uploadfile = require("@/assets/uploadfile.png");
export default {
name: "Risk",
components: { FileUpload
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
fileList:[],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 薄弱跟踪表格数据
riskList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
yearNum: null,
beyondEnterpriseId: null,
enterpriseName: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询薄弱跟踪列表 */
getList() {
this.loading = true;
listRisk(this.queryParams).then(response => {
this.riskList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
riskId: null,
yearNum: null,
beyondEnterpriseId: null,
enterpriseName: null,
indicator: null,
allNum: null,
indicatorNum: null,
problem: null,
plan: null,
fileUrl: null,
status: 0,
createTime: 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.riskId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加薄弱跟踪";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const riskId = row.riskId || this.ids
getRisk(riskId).then(response => {
this.form = response.data;
if(this.form.fileUrl!=null||this.form.fileUrl==""){
this.fileList = [{name: 'file', url:uploadfile}];
}
this.open = true;
this.title = "修改薄弱跟踪";
});
},
//上传
getFileInfo(res){
this.form.fileUrl = res.url;
this.fileList.push({
name: res.fileName,
url: uploadfile,
});
},
listRemove(e) {
this.form.fileUrl = "";
this.fileList = [];
},
checkFile(url) {
window.open(url,'_blank');
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.riskId != null) {
updateRisk(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRisk(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const riskIds = row.riskId || this.ids;
this.$confirm('是否确认删除薄弱跟踪编号为"' + riskIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delRisk(riskIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有薄弱跟踪数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportRisk(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
<style>
.dbtn {
display: inline-block;
line-height: normal;
padding-left: 2px;
padding-right: 2px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment