初始化项目
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
package com.jeesite.modules.apps.Module;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ScreenTop implements Serializable {
|
||||||
|
|
||||||
|
private String module;
|
||||||
|
private String title;
|
||||||
|
private String label;
|
||||||
|
private BigDecimal value;
|
||||||
|
private String iconImg;
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
|
||||||
|
public ScreenTop() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScreenTop(String module, String title, String label, BigDecimal value, String iconImg, Integer sort) {
|
||||||
|
this.module = module;
|
||||||
|
this.title = title;
|
||||||
|
this.label = label;
|
||||||
|
this.value = value;
|
||||||
|
this.iconImg = iconImg;
|
||||||
|
this.sort = sort;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.jeesite.modules.apps.web;
|
package com.jeesite.modules.apps.web;
|
||||||
|
|
||||||
import com.jeesite.modules.apps.Module.ChartDataItem;
|
import com.jeesite.modules.apps.Module.ChartDataItem;
|
||||||
|
import com.jeesite.modules.apps.Module.ScreenTop;
|
||||||
import com.jeesite.modules.erp.entity.ErpTransactionFlow;
|
import com.jeesite.modules.erp.entity.ErpTransactionFlow;
|
||||||
import com.jeesite.modules.erp.service.ErpTransactionFlowService;
|
import com.jeesite.modules.erp.service.ErpTransactionFlowService;
|
||||||
import com.jeesite.modules.utils.BigDecimalUtils;
|
import com.jeesite.modules.utils.BigDecimalUtils;
|
||||||
|
import com.jeesite.modules.utils.DateUtils;
|
||||||
|
import com.jeesite.modules.utils.KeyUtil;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
@@ -23,6 +26,32 @@ public class ErpScreenController {
|
|||||||
this.erpTransactionFlowService = erpTransactionFlowService;
|
this.erpTransactionFlowService = erpTransactionFlowService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "getErpChartTop")
|
||||||
|
@ResponseBody
|
||||||
|
public List<ScreenTop> getErpChartTop(ErpTransactionFlow erpTransactionFlow) {
|
||||||
|
List<ScreenTop> screenTops = new ArrayList<>();
|
||||||
|
erpTransactionFlow.setMonthDate(DateUtils.getCurrentMonth());
|
||||||
|
List<ErpTransactionFlow> flowList = erpTransactionFlowService.findList(erpTransactionFlow);
|
||||||
|
Map<String, BigDecimal> sumMap = flowList.stream()
|
||||||
|
.collect(Collectors.groupingBy(
|
||||||
|
ErpTransactionFlow::getFlowType,
|
||||||
|
Collectors.reducing(BigDecimal.ZERO, ErpTransactionFlow::getAmount, BigDecimal::add)
|
||||||
|
));
|
||||||
|
BigDecimal totalIncome = sumMap.getOrDefault("2", BigDecimal.ZERO); //收入
|
||||||
|
BigDecimal totalExpense = sumMap.getOrDefault("1", BigDecimal.ZERO); //支出
|
||||||
|
BigDecimal netProfit = BigDecimalUtils.subtract(totalIncome, totalExpense); //净利润
|
||||||
|
BigDecimal profitRate = BigDecimalUtils.percent(netProfit, totalIncome); //利润率
|
||||||
|
BigDecimal expenseRate = BigDecimalUtils.percent(totalExpense, totalIncome); //支出率
|
||||||
|
BigDecimal profitLossRate = BigDecimalUtils.percent(netProfit, totalExpense); //盈亏率
|
||||||
|
|
||||||
|
screenTops.add(new ScreenTop("总收入", "", "金额(元)", totalIncome, "icons/erp-shouru.svg", 1));
|
||||||
|
screenTops.add(new ScreenTop("总支出", "", "金额(元)", totalExpense, "icons/erp-zhichu.svg", 2));
|
||||||
|
screenTops.add(new ScreenTop("净利润", "", "金额(元)", netProfit, "icons/erp-jiaoyizhichu.svg", 3));
|
||||||
|
screenTops.add(new ScreenTop("利润率", "", "占比(%)", profitRate, "icons/erp-fencheng.svg", 4));
|
||||||
|
screenTops.add(new ScreenTop("支出率", "", "占比(%)", expenseRate, "icons/erp-lirunfenxi.svg", 5));
|
||||||
|
screenTops.add(new ScreenTop("盈亏率", "", "占比(%)", profitLossRate, "icons/erp-zongshouru.svg", 6));
|
||||||
|
return screenTops;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 账号收支
|
* 账号收支
|
||||||
@@ -368,7 +397,7 @@ public class ErpScreenController {
|
|||||||
/**
|
/**
|
||||||
* 分类收支
|
* 分类收支
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "getCategoryChart")
|
@RequestMapping(value = "getErpCategoryChart")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public List<ChartDataItem> getCategoryChart(ErpTransactionFlow erpTransactionFlow) {
|
public List<ChartDataItem> getCategoryChart(ErpTransactionFlow erpTransactionFlow) {
|
||||||
List<ChartDataItem> chartDataItems = new ArrayList<>();
|
List<ChartDataItem> chartDataItems = new ArrayList<>();
|
||||||
|
|||||||
@@ -4,18 +4,26 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.system.oshi.CpuInfo;
|
import cn.hutool.system.oshi.CpuInfo;
|
||||||
import cn.hutool.system.oshi.OshiUtil;
|
import cn.hutool.system.oshi.OshiUtil;
|
||||||
import com.jeesite.modules.apps.Module.ChartInfo;
|
import com.jeesite.modules.apps.Module.ChartInfo;
|
||||||
|
import com.jeesite.modules.biz.entity.MyMunicipalities;
|
||||||
|
import com.jeesite.modules.biz.service.MyMunicipalitiesService;
|
||||||
import com.jeesite.modules.utils.KeyUtil;
|
import com.jeesite.modules.utils.KeyUtil;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping(value = "${adminPath}/desktop/analysis")
|
@RequestMapping(value = "${adminPath}/desktop/analysis")
|
||||||
public class SysAnalysisController {
|
public class SysAnalysisController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MyMunicipalitiesService municipalitiesService;
|
||||||
|
|
||||||
@RequestMapping(value = "getHostInfo")
|
@RequestMapping(value = "getHostInfo")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public List<ChartInfo> getHostInfo() {
|
public List<ChartInfo> getHostInfo() {
|
||||||
@@ -36,4 +44,33 @@ public class SysAnalysisController {
|
|||||||
chartInfoList.add(new ChartInfo("time", "服务器运行时长", 0, KeyUtil.getColor(), runTime));
|
chartInfoList.add(new ChartInfo("time", "服务器运行时长", 0, KeyUtil.getColor(), runTime));
|
||||||
return chartInfoList;
|
return chartInfoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取社区数量
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "getProvinceChart")
|
||||||
|
@ResponseBody
|
||||||
|
public List<ChartInfo> getProvinceChart(MyMunicipalities myMunicipalities) {
|
||||||
|
List<ChartInfo> chartInfos = new ArrayList<>();
|
||||||
|
myMunicipalities.setUstatus("1");
|
||||||
|
List<MyMunicipalities> municipalitiesList = municipalitiesService.findList(myMunicipalities);
|
||||||
|
Map<String, Long> provinceCountMap = municipalitiesList.stream()
|
||||||
|
.sorted((a, b) -> {
|
||||||
|
if (a.getSorting() == null) return 1;
|
||||||
|
if (b.getSorting() == null) return -1;
|
||||||
|
return a.getSorting().compareTo(b.getSorting());
|
||||||
|
})
|
||||||
|
.collect(Collectors.groupingBy(
|
||||||
|
MyMunicipalities::getProvinceName,
|
||||||
|
java.util.LinkedHashMap::new, // 关键:保证顺序不变
|
||||||
|
Collectors.counting()
|
||||||
|
));
|
||||||
|
for (Map.Entry<String, Long> entry : provinceCountMap.entrySet()) {
|
||||||
|
ChartInfo chartInfo = new ChartInfo();
|
||||||
|
chartInfo.setLabel(entry.getKey());
|
||||||
|
chartInfo.setValue(entry.getValue());
|
||||||
|
chartInfos.add(chartInfo);
|
||||||
|
}
|
||||||
|
return chartInfos;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import com.jeesite.modules.apps.Module.NoteInfo;
|
|||||||
import com.jeesite.modules.biz.entity.MyNotes;
|
import com.jeesite.modules.biz.entity.MyNotes;
|
||||||
import com.jeesite.modules.biz.service.MyNotesService;
|
import com.jeesite.modules.biz.service.MyNotesService;
|
||||||
import com.jeesite.modules.sys.entity.DictData;
|
import com.jeesite.modules.sys.entity.DictData;
|
||||||
|
import com.jeesite.modules.sys.entity.User;
|
||||||
import com.jeesite.modules.sys.utils.DictUtils;
|
import com.jeesite.modules.sys.utils.DictUtils;
|
||||||
|
import com.jeesite.modules.sys.utils.UserUtils;
|
||||||
import com.jeesite.modules.utils.DateUtils;
|
import com.jeesite.modules.utils.DateUtils;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
@@ -25,6 +27,8 @@ public class SysWorkbenchController {
|
|||||||
@RequestMapping(value = "getNoteInfo")
|
@RequestMapping(value = "getNoteInfo")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public List<NoteInfo> getNoteInfo(MyNotes myNotes) {
|
public List<NoteInfo> getNoteInfo(MyNotes myNotes) {
|
||||||
|
User user = UserUtils.getUser();
|
||||||
|
myNotes.setCreateUser(user.getLoginCode());
|
||||||
List<NoteInfo> noteInfos = new ArrayList<>();
|
List<NoteInfo> noteInfos = new ArrayList<>();
|
||||||
myNotes.setCreateTime_gte(DateUtils.getFirstDayOfCurrentYear());
|
myNotes.setCreateTime_gte(DateUtils.getFirstDayOfCurrentYear());
|
||||||
List<DictData> dictDataList = DictUtils.getDictList("note_type");
|
List<DictData> dictDataList = DictUtils.getDictList("note_type");
|
||||||
@@ -47,6 +51,8 @@ public class SysWorkbenchController {
|
|||||||
@RequestMapping(value = "getNoteChart")
|
@RequestMapping(value = "getNoteChart")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public List<ChartDataItem> getNoteChart(MyNotes myNotes) {
|
public List<ChartDataItem> getNoteChart(MyNotes myNotes) {
|
||||||
|
User user = UserUtils.getUser();
|
||||||
|
myNotes.setCreateUser(user.getLoginCode());
|
||||||
myNotes.setCreateTime_gte(DateUtils.getFirstDayOfCurrentYear());
|
myNotes.setCreateTime_gte(DateUtils.getFirstDayOfCurrentYear());
|
||||||
List<MyNotes> myNotesList = myNotesService.findList(myNotes);
|
List<MyNotes> myNotesList = myNotesService.findList(myNotes);
|
||||||
Map<String, ChartDataItem> chartDataMap = myNotesList.stream()
|
Map<String, ChartDataItem> chartDataMap = myNotesList.stream()
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.jeesite.modules.biz.dao;
|
||||||
|
|
||||||
|
import com.jeesite.common.dao.CrudDao;
|
||||||
|
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||||
|
import com.jeesite.modules.biz.entity.MyMunicipalities;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区信息 DAO 接口
|
||||||
|
* @author gaoxq
|
||||||
|
* @version 2026-03-27
|
||||||
|
*/
|
||||||
|
@MyBatisDao(dataSourceName="work")
|
||||||
|
public interface MyMunicipalitiesDao extends CrudDao<MyMunicipalities> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,14 +2,14 @@ package com.jeesite.modules.biz.dao;
|
|||||||
|
|
||||||
import com.jeesite.common.dao.CrudDao;
|
import com.jeesite.common.dao.CrudDao;
|
||||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||||
import com.jeesite.modules.biz.entity.MyPageIndex;
|
import com.jeesite.modules.biz.entity.MyQuickLogin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 指标数据表 DAO 接口
|
* 快捷登录 DAO 接口
|
||||||
* @author gaoxq
|
* @author gaoxq
|
||||||
* @version 2026-03-23
|
* @version 2026-03-27
|
||||||
*/
|
*/
|
||||||
@MyBatisDao(dataSourceName="work")
|
@MyBatisDao(dataSourceName="work")
|
||||||
public interface MyPageIndexDao extends CrudDao<MyPageIndex> {
|
public interface MyQuickLoginDao extends CrudDao<MyQuickLogin> {
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package com.jeesite.modules.biz.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.jeesite.common.mybatis.annotation.JoinTable;
|
||||||
|
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
|
||||||
|
import com.jeesite.common.entity.DataEntity;
|
||||||
|
import com.jeesite.common.mybatis.annotation.Column;
|
||||||
|
import com.jeesite.common.mybatis.annotation.Table;
|
||||||
|
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||||
|
import com.jeesite.common.utils.excel.annotation.ExcelField;
|
||||||
|
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
|
||||||
|
import com.jeesite.common.utils.excel.annotation.ExcelFields;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区信息 Entity
|
||||||
|
*
|
||||||
|
* @author gaoxq
|
||||||
|
* @version 2026-03-27
|
||||||
|
*/
|
||||||
|
@Table(name = "my_municipalities", alias = "a", label = "社区信息", columns = {
|
||||||
|
@Column(name = "municipality_id", attrName = "municipalityId", label = "唯一主键", isPK = true),
|
||||||
|
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdateForce = true),
|
||||||
|
@Column(name = "county_name", attrName = "countyName", label = "县区名称", queryType = QueryType.LIKE),
|
||||||
|
@Column(name = "province_code", attrName = "provinceCode", label = "省份编码"),
|
||||||
|
@Column(name = "city_code", attrName = "cityCode", label = "市区编码"),
|
||||||
|
@Column(name = "county_code", attrName = "countyCode", label = "县区编码"),
|
||||||
|
@Column(name = "town_name", attrName = "townName", label = "街道名称", queryType = QueryType.LIKE),
|
||||||
|
@Column(name = "town_code", attrName = "townCode", label = "街道编号"),
|
||||||
|
@Column(name = "village_name", attrName = "villageName", label = "社区名称", queryType = QueryType.LIKE),
|
||||||
|
@Column(name = "village_code", attrName = "villageCode", label = "社区编号"),
|
||||||
|
@Column(name = "update_time", attrName = "updateTime", label = "更新时间", isUpdateForce = true),
|
||||||
|
@Column(name = "ustatus", attrName = "ustatus", label = "状态"),
|
||||||
|
}, joinTable = {
|
||||||
|
@JoinTable(type = Type.LEFT_JOIN, entity = MyProvince.class, alias = "b",
|
||||||
|
on = "a.province_code = b.province_code", attrName = "this",
|
||||||
|
columns = {
|
||||||
|
@Column(name = "province_name", attrName = "provinceName", label = "省份名称"),
|
||||||
|
@Column(name = "sorting", attrName = "sorting", label = "省份序号"),
|
||||||
|
}),
|
||||||
|
@JoinTable(type = Type.LEFT_JOIN, entity = MyCities.class, alias = "c",
|
||||||
|
on = "a.province_code = c.province_code AND a.city_code = c.city_code", attrName = "this",
|
||||||
|
columns = {
|
||||||
|
@Column(name = "city_name", attrName = "cityName", label = "市区名称"),
|
||||||
|
@Column(name = "area_code", attrName = "areaCode", label = "市区区号"),
|
||||||
|
@Column(name = "area_type", attrName = "areaType", label = "市区级别"),
|
||||||
|
}),
|
||||||
|
}, orderBy = "a.create_time DESC"
|
||||||
|
)
|
||||||
|
@Data
|
||||||
|
public class MyMunicipalities extends DataEntity<MyMunicipalities> implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private String municipalityId; // 唯一主键
|
||||||
|
private Date createTime; // 记录时间
|
||||||
|
private String countyName; // 县区名称
|
||||||
|
private String provinceCode; // 省份编码
|
||||||
|
private String cityCode; // 市区编码
|
||||||
|
private String countyCode; // 县区编码
|
||||||
|
private String townName; // 街道名称
|
||||||
|
private String townCode; // 街道编号
|
||||||
|
private String villageName; // 社区名称
|
||||||
|
private String villageCode; // 社区编号
|
||||||
|
private Date updateTime; // 更新时间
|
||||||
|
private String ustatus; // 状态
|
||||||
|
|
||||||
|
private String provinceName;
|
||||||
|
private String cityName;
|
||||||
|
private String areaCode;
|
||||||
|
private String areaType;
|
||||||
|
private Integer sorting; // 省份序号
|
||||||
|
|
||||||
|
@ExcelFields({
|
||||||
|
@ExcelField(title = "唯一主键", attrName = "municipalityId", align = Align.CENTER, sort = 10),
|
||||||
|
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 20, dataFormat = "yyyy-MM-dd hh:mm"),
|
||||||
|
@ExcelField(title = "省份编码", attrName = "provinceCode", align = Align.CENTER, sort = 40),
|
||||||
|
@ExcelField(title = "省份名称", attrName = "provinceName", align = Align.CENTER, sort = 45),
|
||||||
|
@ExcelField(title = "市区编码", attrName = "cityCode", align = Align.CENTER, sort = 50),
|
||||||
|
@ExcelField(title = "市区编码", attrName = "cityName", align = Align.CENTER, sort = 50),
|
||||||
|
@ExcelField(title = "市区级别", attrName = "areaType", dictType = "area_level", align = Align.CENTER, sort = 50),
|
||||||
|
@ExcelField(title = "县区编码", attrName = "countyCode", align = Align.CENTER, sort = 60),
|
||||||
|
@ExcelField(title = "县区名称", attrName = "countyName", align = Align.CENTER, sort = 65),
|
||||||
|
@ExcelField(title = "街道编号", attrName = "townCode", align = Align.CENTER, sort = 70),
|
||||||
|
@ExcelField(title = "街道名称", attrName = "townName", align = Align.CENTER, sort = 80),
|
||||||
|
@ExcelField(title = "社区编号", attrName = "villageCode", align = Align.CENTER, sort = 90),
|
||||||
|
@ExcelField(title = "社区名称", attrName = "villageName", align = Align.CENTER, sort = 100),
|
||||||
|
@ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 110, dataFormat = "yyyy-MM-dd hh:mm"),
|
||||||
|
@ExcelField(title = "状态", attrName = "ustatus", dictType = "biz_status", align = Align.CENTER, sort = 120),
|
||||||
|
})
|
||||||
|
public MyMunicipalities() {
|
||||||
|
this(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyMunicipalities(String id) {
|
||||||
|
super(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
package com.jeesite.modules.biz.entity;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import com.jeesite.common.mybatis.annotation.JoinTable;
|
|
||||||
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.Size;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
import com.jeesite.common.entity.DataEntity;
|
|
||||||
import com.jeesite.common.mybatis.annotation.Column;
|
|
||||||
import com.jeesite.common.mybatis.annotation.Table;
|
|
||||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
|
||||||
import com.jeesite.common.utils.excel.annotation.ExcelField;
|
|
||||||
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
|
|
||||||
import com.jeesite.common.utils.excel.annotation.ExcelFields;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 指标数据表 Entity
|
|
||||||
*
|
|
||||||
* @author gaoxq
|
|
||||||
* @version 2026-03-23
|
|
||||||
*/
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Table(name = "my_page_index", alias = "a", label = "指标信息", columns = {
|
|
||||||
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isUpdateForce = true),
|
|
||||||
@Column(name = "index_id", attrName = "indexId", label = "唯一标识", isPK = true),
|
|
||||||
@Column(name = "module", attrName = "module", label = "模块名称"),
|
|
||||||
@Column(name = "module_code", attrName = "moduleCode", label = "模块编码"),
|
|
||||||
@Column(name = "title", attrName = "title", label = "说明描述", queryType = QueryType.LIKE),
|
|
||||||
@Column(name = "value", attrName = "value", label = "数值", isQuery = false, isUpdateForce = true),
|
|
||||||
@Column(name = "label", attrName = "label", label = "名称"),
|
|
||||||
@Column(name = "icon_img", attrName = "iconImg", label = "图片路径", isQuery = false),
|
|
||||||
@Column(name = "icon_filter", attrName = "iconFilter", label = "图标颜色", isQuery = false),
|
|
||||||
@Column(name = "sort", attrName = "sort", label = "序号", isQuery = false),
|
|
||||||
@Column(name = "index_code", attrName = "indexCode", label = "指标编号"),
|
|
||||||
}, orderBy = "a.create_time DESC,index_code,sort "
|
|
||||||
)
|
|
||||||
@Data
|
|
||||||
public class MyPageIndex extends DataEntity<MyPageIndex> implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
private Date createTime; // 记录时间
|
|
||||||
private String indexId; // 唯一标识
|
|
||||||
private String module; // 模块名称
|
|
||||||
private String moduleCode; // 模块编码
|
|
||||||
private String title; // 说明描述
|
|
||||||
private Double value; // 数值
|
|
||||||
private String label; // 名称
|
|
||||||
private String iconImg; // 图片路径
|
|
||||||
private String iconFilter; // 图标颜色
|
|
||||||
private Integer sort; // 序号
|
|
||||||
private String indexCode; // 指标编号
|
|
||||||
|
|
||||||
@ExcelFields({
|
|
||||||
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"),
|
|
||||||
@ExcelField(title = "唯一标识", attrName = "indexId", align = Align.CENTER, sort = 20),
|
|
||||||
@ExcelField(title = "模块名称", attrName = "module", align = Align.CENTER, sort = 30),
|
|
||||||
@ExcelField(title = "模块编码", attrName = "moduleCode", align = Align.CENTER, sort = 40),
|
|
||||||
@ExcelField(title = "说明描述", attrName = "title", align = Align.CENTER, sort = 50),
|
|
||||||
@ExcelField(title = "数值", attrName = "value", align = Align.CENTER, sort = 60),
|
|
||||||
@ExcelField(title = "名称", attrName = "label", align = Align.CENTER, sort = 70),
|
|
||||||
@ExcelField(title = "图片路径", attrName = "iconImg", align = Align.CENTER, sort = 80),
|
|
||||||
@ExcelField(title = "图标颜色", attrName = "iconFilter", align = Align.CENTER, sort = 90),
|
|
||||||
@ExcelField(title = "序号", attrName = "sort", align = Align.CENTER, sort = 100),
|
|
||||||
@ExcelField(title = "指标编号", attrName = "indexCode", align = Align.CENTER, sort = 110),
|
|
||||||
})
|
|
||||||
public MyPageIndex() {
|
|
||||||
this(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MyPageIndex(String id) {
|
|
||||||
super(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreateTime_gte() {
|
|
||||||
return sqlMap.getWhere().getValue("create_time", QueryType.GTE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateTime_gte(Date createTime) {
|
|
||||||
sqlMap.getWhere().and("create_time", QueryType.GTE, createTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreateTime_lte() {
|
|
||||||
return sqlMap.getWhere().getValue("create_time", QueryType.LTE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateTime_lte(Date createTime) {
|
|
||||||
sqlMap.getWhere().and("create_time", QueryType.LTE, createTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.jeesite.modules.biz.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.jeesite.common.mybatis.annotation.JoinTable;
|
||||||
|
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
|
||||||
|
import com.jeesite.common.entity.DataEntity;
|
||||||
|
import com.jeesite.common.mybatis.annotation.Column;
|
||||||
|
import com.jeesite.common.mybatis.annotation.Table;
|
||||||
|
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||||
|
import com.jeesite.common.utils.excel.annotation.ExcelField;
|
||||||
|
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
|
||||||
|
import com.jeesite.common.utils.excel.annotation.ExcelFields;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 快捷登录 Entity
|
||||||
|
* @author gaoxq
|
||||||
|
* @version 2026-03-27
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table(name="my_quick_login", alias="a", label="快捷登录信息", columns={
|
||||||
|
@Column(name="create_time", attrName="createTime", label="记录时间", isUpdate=false, isQuery=false, isUpdateForce=true),
|
||||||
|
@Column(name="quick_id", attrName="quickId", label="自增主键", isPK=true),
|
||||||
|
@Column(name="system_name", attrName="systemName", label="系统名称", queryType=QueryType.LIKE),
|
||||||
|
@Column(name="system_type", attrName="systemType", label="系统类型"),
|
||||||
|
@Column(name="system_url", attrName="systemUrl", label="首页地址", isQuery=false),
|
||||||
|
@Column(name="system_icon", attrName="systemIcon", label="系统图标", isQuery=false),
|
||||||
|
@Column(name="bg_color", attrName="bgColor", label="图标背景色", isQuery=false),
|
||||||
|
@Column(name="ustatus", attrName="ustatus", label="状态"),
|
||||||
|
@Column(name="update_time", attrName="updateTime", label="更新时间", isQuery=false, isUpdateForce=true),
|
||||||
|
}, orderBy="a.create_time DESC"
|
||||||
|
)
|
||||||
|
@Data
|
||||||
|
public class MyQuickLogin extends DataEntity<MyQuickLogin> implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private Date createTime; // 记录时间
|
||||||
|
private String quickId; // 自增主键
|
||||||
|
private String systemName; // 系统名称
|
||||||
|
private String systemType; // 系统类型
|
||||||
|
private String systemUrl; // 首页地址
|
||||||
|
private String systemIcon; // 系统图标
|
||||||
|
private String bgColor; // 图标背景色
|
||||||
|
private String ustatus; // 状态
|
||||||
|
private Date updateTime; // 更新时间
|
||||||
|
|
||||||
|
@ExcelFields({
|
||||||
|
@ExcelField(title="记录时间", attrName="createTime", align=Align.CENTER, sort=10, dataFormat="yyyy-MM-dd hh:mm"),
|
||||||
|
@ExcelField(title="自增主键", attrName="quickId", align=Align.CENTER, sort=20),
|
||||||
|
@ExcelField(title="系统名称", attrName="systemName", align=Align.CENTER, sort=30),
|
||||||
|
@ExcelField(title="系统类型", attrName="systemType", align=Align.CENTER, sort=40),
|
||||||
|
@ExcelField(title="首页地址", attrName="systemUrl", align=Align.CENTER, sort=50),
|
||||||
|
@ExcelField(title="系统图标", attrName="systemIcon", align=Align.CENTER, sort=60),
|
||||||
|
@ExcelField(title="图标背景色", attrName="bgColor", align=Align.CENTER, sort=70),
|
||||||
|
@ExcelField(title="状态", attrName="ustatus", align=Align.CENTER, sort=80),
|
||||||
|
@ExcelField(title="更新时间", attrName="updateTime", align=Align.CENTER, sort=90, dataFormat="yyyy-MM-dd hh:mm"),
|
||||||
|
})
|
||||||
|
public MyQuickLogin() {
|
||||||
|
this(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyQuickLogin(String id){
|
||||||
|
super(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
package com.jeesite.modules.biz.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.jeesite.common.entity.Page;
|
||||||
|
import com.jeesite.common.service.CrudService;
|
||||||
|
import com.jeesite.modules.biz.entity.MyMunicipalities;
|
||||||
|
import com.jeesite.modules.biz.dao.MyMunicipalitiesDao;
|
||||||
|
import com.jeesite.common.service.ServiceException;
|
||||||
|
import com.jeesite.common.config.Global;
|
||||||
|
import com.jeesite.common.validator.ValidatorUtils;
|
||||||
|
import com.jeesite.common.utils.excel.ExcelImport;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import jakarta.validation.ConstraintViolation;
|
||||||
|
import jakarta.validation.ConstraintViolationException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区信息 Service
|
||||||
|
* @author gaoxq
|
||||||
|
* @version 2026-03-27
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MyMunicipalitiesService extends CrudService<MyMunicipalitiesDao, MyMunicipalities> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单条数据
|
||||||
|
* @param myMunicipalities 主键
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MyMunicipalities get(MyMunicipalities myMunicipalities) {
|
||||||
|
return super.get(myMunicipalities);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分页数据
|
||||||
|
* @param myMunicipalities 查询条件
|
||||||
|
* @param myMunicipalities page 分页对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Page<MyMunicipalities> findPage(MyMunicipalities myMunicipalities) {
|
||||||
|
return super.findPage(myMunicipalities);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表数据
|
||||||
|
* @param myMunicipalities 查询条件
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MyMunicipalities> findList(MyMunicipalities myMunicipalities) {
|
||||||
|
return super.findList(myMunicipalities);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存数据(插入或更新)
|
||||||
|
* @param myMunicipalities 数据对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void save(MyMunicipalities myMunicipalities) {
|
||||||
|
super.save(myMunicipalities);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
* @param file 导入的数据文件
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
public String importData(MultipartFile file) {
|
||||||
|
if (file == null){
|
||||||
|
throw new ServiceException(text("请选择导入的数据文件!"));
|
||||||
|
}
|
||||||
|
int successNum = 0; int failureNum = 0;
|
||||||
|
StringBuilder successMsg = new StringBuilder();
|
||||||
|
StringBuilder failureMsg = new StringBuilder();
|
||||||
|
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
|
||||||
|
List<MyMunicipalities> list = ei.getDataList(MyMunicipalities.class);
|
||||||
|
for (MyMunicipalities myMunicipalities : list) {
|
||||||
|
try{
|
||||||
|
ValidatorUtils.validateWithException(myMunicipalities);
|
||||||
|
this.save(myMunicipalities);
|
||||||
|
successNum++;
|
||||||
|
successMsg.append("<br/>" + successNum + "、编号 " + myMunicipalities.getId() + " 导入成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
failureNum++;
|
||||||
|
String msg = "<br/>" + failureNum + "、编号 " + myMunicipalities.getId() + " 导入失败:";
|
||||||
|
if (e instanceof ConstraintViolationException){
|
||||||
|
ConstraintViolationException cve = (ConstraintViolationException)e;
|
||||||
|
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
|
||||||
|
msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")";
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
msg += e.getMessage();
|
||||||
|
}
|
||||||
|
failureMsg.append(msg);
|
||||||
|
logger.error(msg, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error(e.getMessage(), e);
|
||||||
|
failureMsg.append(e.getMessage());
|
||||||
|
return failureMsg.toString();
|
||||||
|
}
|
||||||
|
if (failureNum > 0) {
|
||||||
|
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||||
|
throw new ServiceException(failureMsg.toString());
|
||||||
|
}else{
|
||||||
|
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||||
|
}
|
||||||
|
return successMsg.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新状态
|
||||||
|
* @param myMunicipalities 数据对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void updateStatus(MyMunicipalities myMunicipalities) {
|
||||||
|
super.updateStatus(myMunicipalities);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
* @param myMunicipalities 数据对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void delete(MyMunicipalities myMunicipalities) {
|
||||||
|
super.delete(myMunicipalities);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,8 +6,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import com.jeesite.common.entity.Page;
|
import com.jeesite.common.entity.Page;
|
||||||
import com.jeesite.common.service.CrudService;
|
import com.jeesite.common.service.CrudService;
|
||||||
import com.jeesite.modules.biz.entity.MyPageIndex;
|
import com.jeesite.modules.biz.entity.MyQuickLogin;
|
||||||
import com.jeesite.modules.biz.dao.MyPageIndexDao;
|
import com.jeesite.modules.biz.dao.MyQuickLoginDao;
|
||||||
import com.jeesite.common.service.ServiceException;
|
import com.jeesite.common.service.ServiceException;
|
||||||
import com.jeesite.common.config.Global;
|
import com.jeesite.common.config.Global;
|
||||||
import com.jeesite.common.validator.ValidatorUtils;
|
import com.jeesite.common.validator.ValidatorUtils;
|
||||||
@@ -17,49 +17,49 @@ import jakarta.validation.ConstraintViolation;
|
|||||||
import jakarta.validation.ConstraintViolationException;
|
import jakarta.validation.ConstraintViolationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 指标数据表 Service
|
* 快捷登录 Service
|
||||||
* @author gaoxq
|
* @author gaoxq
|
||||||
* @version 2026-03-23
|
* @version 2026-03-27
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class MyPageIndexService extends CrudService<MyPageIndexDao, MyPageIndex> {
|
public class MyQuickLoginService extends CrudService<MyQuickLoginDao, MyQuickLogin> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取单条数据
|
* 获取单条数据
|
||||||
* @param myPageIndex 主键
|
* @param myQuickLogin 主键
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public MyPageIndex get(MyPageIndex myPageIndex) {
|
public MyQuickLogin get(MyQuickLogin myQuickLogin) {
|
||||||
return super.get(myPageIndex);
|
return super.get(myQuickLogin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询分页数据
|
* 查询分页数据
|
||||||
* @param myPageIndex 查询条件
|
* @param myQuickLogin 查询条件
|
||||||
* @param myPageIndex page 分页对象
|
* @param myQuickLogin page 分页对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Page<MyPageIndex> findPage(MyPageIndex myPageIndex) {
|
public Page<MyQuickLogin> findPage(MyQuickLogin myQuickLogin) {
|
||||||
return super.findPage(myPageIndex);
|
return super.findPage(myQuickLogin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询列表数据
|
* 查询列表数据
|
||||||
* @param myPageIndex 查询条件
|
* @param myQuickLogin 查询条件
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<MyPageIndex> findList(MyPageIndex myPageIndex) {
|
public List<MyQuickLogin> findList(MyQuickLogin myQuickLogin) {
|
||||||
return super.findList(myPageIndex);
|
return super.findList(myQuickLogin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存数据(插入或更新)
|
* 保存数据(插入或更新)
|
||||||
* @param myPageIndex 数据对象
|
* @param myQuickLogin 数据对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void save(MyPageIndex myPageIndex) {
|
public void save(MyQuickLogin myQuickLogin) {
|
||||||
super.save(myPageIndex);
|
super.save(myQuickLogin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,16 +75,16 @@ public class MyPageIndexService extends CrudService<MyPageIndexDao, MyPageIndex>
|
|||||||
StringBuilder successMsg = new StringBuilder();
|
StringBuilder successMsg = new StringBuilder();
|
||||||
StringBuilder failureMsg = new StringBuilder();
|
StringBuilder failureMsg = new StringBuilder();
|
||||||
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
|
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
|
||||||
List<MyPageIndex> list = ei.getDataList(MyPageIndex.class);
|
List<MyQuickLogin> list = ei.getDataList(MyQuickLogin.class);
|
||||||
for (MyPageIndex myPageIndex : list) {
|
for (MyQuickLogin myQuickLogin : list) {
|
||||||
try{
|
try{
|
||||||
ValidatorUtils.validateWithException(myPageIndex);
|
ValidatorUtils.validateWithException(myQuickLogin);
|
||||||
this.save(myPageIndex);
|
this.save(myQuickLogin);
|
||||||
successNum++;
|
successNum++;
|
||||||
successMsg.append("<br/>" + successNum + "、编号 " + myPageIndex.getId() + " 导入成功");
|
successMsg.append("<br/>" + successNum + "、编号 " + myQuickLogin.getId() + " 导入成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
failureNum++;
|
failureNum++;
|
||||||
String msg = "<br/>" + failureNum + "、编号 " + myPageIndex.getId() + " 导入失败:";
|
String msg = "<br/>" + failureNum + "、编号 " + myQuickLogin.getId() + " 导入失败:";
|
||||||
if (e instanceof ConstraintViolationException){
|
if (e instanceof ConstraintViolationException){
|
||||||
ConstraintViolationException cve = (ConstraintViolationException)e;
|
ConstraintViolationException cve = (ConstraintViolationException)e;
|
||||||
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
|
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
|
||||||
@@ -113,22 +113,22 @@ public class MyPageIndexService extends CrudService<MyPageIndexDao, MyPageIndex>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新状态
|
* 更新状态
|
||||||
* @param myPageIndex 数据对象
|
* @param myQuickLogin 数据对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void updateStatus(MyPageIndex myPageIndex) {
|
public void updateStatus(MyQuickLogin myQuickLogin) {
|
||||||
super.updateStatus(myPageIndex);
|
super.updateStatus(myQuickLogin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除数据
|
* 删除数据
|
||||||
* @param myPageIndex 数据对象
|
* @param myQuickLogin 数据对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void delete(MyPageIndex myPageIndex) {
|
public void delete(MyQuickLogin myQuickLogin) {
|
||||||
super.delete(myPageIndex);
|
super.delete(myQuickLogin);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.jeesite.modules.biz.web;
|
package com.jeesite.modules.biz.web;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
@@ -26,6 +27,7 @@ import com.jeesite.modules.biz.service.MyCitiesService;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 城市信息 Controller
|
* 城市信息 Controller
|
||||||
|
*
|
||||||
* @author gaoxq
|
* @author gaoxq
|
||||||
* @version 2026-03-21
|
* @version 2026-03-21
|
||||||
*/
|
*/
|
||||||
@@ -33,114 +35,123 @@ import com.jeesite.modules.biz.service.MyCitiesService;
|
|||||||
@RequestMapping(value = "${adminPath}/biz/myCities")
|
@RequestMapping(value = "${adminPath}/biz/myCities")
|
||||||
public class MyCitiesController extends BaseController {
|
public class MyCitiesController extends BaseController {
|
||||||
|
|
||||||
private final MyCitiesService myCitiesService;
|
private final MyCitiesService myCitiesService;
|
||||||
|
|
||||||
public MyCitiesController(MyCitiesService myCitiesService) {
|
public MyCitiesController(MyCitiesService myCitiesService) {
|
||||||
this.myCitiesService = myCitiesService;
|
this.myCitiesService = myCitiesService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取数据
|
|
||||||
*/
|
|
||||||
@ModelAttribute
|
|
||||||
public MyCities get(String cityId, boolean isNewRecord) {
|
|
||||||
return myCitiesService.get(cityId, isNewRecord);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询列表
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("biz:myCities:view")
|
|
||||||
@RequestMapping(value = {"list", ""})
|
|
||||||
public String list(MyCities myCities, Model model) {
|
|
||||||
model.addAttribute("myCities", myCities);
|
|
||||||
return "modules/biz/myCitiesList";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询列表数据
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("biz:myCities:view")
|
|
||||||
@RequestMapping(value = "listData")
|
|
||||||
@ResponseBody
|
|
||||||
public Page<MyCities> listData(MyCities myCities, HttpServletRequest request, HttpServletResponse response) {
|
|
||||||
myCities.setPage(new Page<>(request, response));
|
|
||||||
Page<MyCities> page = myCitiesService.findPage(myCities);
|
|
||||||
return page;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查看编辑表单
|
* 获取数据
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("biz:myCities:view")
|
@ModelAttribute
|
||||||
@RequestMapping(value = "form")
|
public MyCities get(String cityId, boolean isNewRecord) {
|
||||||
public String form(MyCities myCities, Model model) {
|
return myCitiesService.get(cityId, isNewRecord);
|
||||||
model.addAttribute("myCities", myCities);
|
}
|
||||||
return "modules/biz/myCitiesForm";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存数据
|
* 查询列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("biz:myCities:edit")
|
@RequiresPermissions("biz:myCities:view")
|
||||||
@PostMapping(value = "save")
|
@RequestMapping(value = {"list", ""})
|
||||||
@ResponseBody
|
public String list(MyCities myCities, Model model) {
|
||||||
public String save(@Validated MyCities myCities) {
|
model.addAttribute("myCities", myCities);
|
||||||
myCitiesService.save(myCities);
|
return "modules/biz/myCitiesList";
|
||||||
return renderResult(Global.TRUE, text("保存城市成功!"));
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出数据
|
* 查询列表数据
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("biz:myCities:view")
|
@RequiresPermissions("biz:myCities:view")
|
||||||
@RequestMapping(value = "exportData")
|
@RequestMapping(value = "listData")
|
||||||
public void exportData(MyCities myCities, HttpServletResponse response) {
|
@ResponseBody
|
||||||
List<MyCities> list = myCitiesService.findList(myCities);
|
public Page<MyCities> listData(MyCities myCities, HttpServletRequest request, HttpServletResponse response) {
|
||||||
String fileName = "城市" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
myCities.setPage(new Page<>(request, response));
|
||||||
try(ExcelExport ee = new ExcelExport("城市", MyCities.class)){
|
Page<MyCities> page = myCitiesService.findPage(myCities);
|
||||||
ee.setDataList(list).write(response, fileName);
|
return page;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下载模板
|
* 查看编辑表单
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("biz:myCities:view")
|
@RequiresPermissions("biz:myCities:view")
|
||||||
@RequestMapping(value = "importTemplate")
|
@RequestMapping(value = "form")
|
||||||
public void importTemplate(HttpServletResponse response) {
|
public String form(MyCities myCities, Model model) {
|
||||||
MyCities myCities = new MyCities();
|
model.addAttribute("myCities", myCities);
|
||||||
List<MyCities> list = ListUtils.newArrayList(myCities);
|
return "modules/biz/myCitiesForm";
|
||||||
String fileName = "城市模板.xlsx";
|
}
|
||||||
try(ExcelExport ee = new ExcelExport("城市", MyCities.class, Type.IMPORT)){
|
|
||||||
ee.setDataList(list).write(response, fileName);
|
/**
|
||||||
}
|
* 保存数据
|
||||||
}
|
*/
|
||||||
|
@RequiresPermissions("biz:myCities:edit")
|
||||||
|
@PostMapping(value = "save")
|
||||||
|
@ResponseBody
|
||||||
|
public String save(@Validated MyCities myCities) {
|
||||||
|
myCitiesService.save(myCities);
|
||||||
|
return renderResult(Global.TRUE, text("保存城市成功!"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myCities:view")
|
||||||
|
@RequestMapping(value = "exportData")
|
||||||
|
public void exportData(MyCities myCities, HttpServletResponse response) {
|
||||||
|
List<MyCities> list = myCitiesService.findList(myCities);
|
||||||
|
String fileName = "城市" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
||||||
|
try (ExcelExport ee = new ExcelExport("城市", MyCities.class)) {
|
||||||
|
ee.setDataList(list).write(response, fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myCities:view")
|
||||||
|
@RequestMapping(value = "importTemplate")
|
||||||
|
public void importTemplate(HttpServletResponse response) {
|
||||||
|
MyCities myCities = new MyCities();
|
||||||
|
List<MyCities> list = ListUtils.newArrayList(myCities);
|
||||||
|
String fileName = "城市模板.xlsx";
|
||||||
|
try (ExcelExport ee = new ExcelExport("城市", MyCities.class, Type.IMPORT)) {
|
||||||
|
ee.setDataList(list).write(response, fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@RequiresPermissions("biz:myCities:edit")
|
||||||
|
@PostMapping(value = "importData")
|
||||||
|
public String importData(MultipartFile file) {
|
||||||
|
try {
|
||||||
|
String message = myCitiesService.importData(file);
|
||||||
|
return renderResult(Global.TRUE, "posfull:" + message);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return renderResult(Global.FALSE, "posfull:" + ex.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myCities:edit")
|
||||||
|
@RequestMapping(value = "delete")
|
||||||
|
@ResponseBody
|
||||||
|
public String delete(MyCities myCities) {
|
||||||
|
myCitiesService.delete(myCities);
|
||||||
|
return renderResult(Global.TRUE, text("删除城市成功!"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表数据
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "listAll")
|
||||||
|
@ResponseBody
|
||||||
|
public List<MyCities> listAll(MyCities myCities) {
|
||||||
|
return myCitiesService.findList(myCities);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入数据
|
|
||||||
*/
|
|
||||||
@ResponseBody
|
|
||||||
@RequiresPermissions("biz:myCities:edit")
|
|
||||||
@PostMapping(value = "importData")
|
|
||||||
public String importData(MultipartFile file) {
|
|
||||||
try {
|
|
||||||
String message = myCitiesService.importData(file);
|
|
||||||
return renderResult(Global.TRUE, "posfull:"+message);
|
|
||||||
} catch (Exception ex) {
|
|
||||||
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除数据
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("biz:myCities:edit")
|
|
||||||
@RequestMapping(value = "delete")
|
|
||||||
@ResponseBody
|
|
||||||
public String delete(MyCities myCities) {
|
|
||||||
myCitiesService.delete(myCities);
|
|
||||||
return renderResult(Global.TRUE, text("删除城市成功!"));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
package com.jeesite.modules.biz.web;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
import com.jeesite.common.config.Global;
|
||||||
|
import com.jeesite.common.collect.ListUtils;
|
||||||
|
import com.jeesite.common.entity.Page;
|
||||||
|
import com.jeesite.common.lang.DateUtils;
|
||||||
|
import com.jeesite.common.utils.excel.ExcelExport;
|
||||||
|
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import com.jeesite.common.web.BaseController;
|
||||||
|
import com.jeesite.modules.biz.entity.MyMunicipalities;
|
||||||
|
import com.jeesite.modules.biz.service.MyMunicipalitiesService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区信息 Controller
|
||||||
|
* @author gaoxq
|
||||||
|
* @version 2026-03-27
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping(value = "${adminPath}/biz/myMunicipalities")
|
||||||
|
public class MyMunicipalitiesController extends BaseController {
|
||||||
|
|
||||||
|
private final MyMunicipalitiesService myMunicipalitiesService;
|
||||||
|
|
||||||
|
public MyMunicipalitiesController(MyMunicipalitiesService myMunicipalitiesService) {
|
||||||
|
this.myMunicipalitiesService = myMunicipalitiesService;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取数据
|
||||||
|
*/
|
||||||
|
@ModelAttribute
|
||||||
|
public MyMunicipalities get(String municipalityId, boolean isNewRecord) {
|
||||||
|
return myMunicipalitiesService.get(municipalityId, isNewRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myMunicipalities:view")
|
||||||
|
@RequestMapping(value = {"list", ""})
|
||||||
|
public String list(MyMunicipalities myMunicipalities, Model model) {
|
||||||
|
model.addAttribute("myMunicipalities", myMunicipalities);
|
||||||
|
return "modules/biz/myMunicipalitiesList";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表数据
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myMunicipalities:view")
|
||||||
|
@RequestMapping(value = "listData")
|
||||||
|
@ResponseBody
|
||||||
|
public Page<MyMunicipalities> listData(MyMunicipalities myMunicipalities, HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
myMunicipalities.setPage(new Page<>(request, response));
|
||||||
|
Page<MyMunicipalities> page = myMunicipalitiesService.findPage(myMunicipalities);
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看编辑表单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myMunicipalities:view")
|
||||||
|
@RequestMapping(value = "form")
|
||||||
|
public String form(MyMunicipalities myMunicipalities, Model model) {
|
||||||
|
model.addAttribute("myMunicipalities", myMunicipalities);
|
||||||
|
return "modules/biz/myMunicipalitiesForm";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存数据
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myMunicipalities:edit")
|
||||||
|
@PostMapping(value = "save")
|
||||||
|
@ResponseBody
|
||||||
|
public String save(@Validated MyMunicipalities myMunicipalities) {
|
||||||
|
myMunicipalitiesService.save(myMunicipalities);
|
||||||
|
return renderResult(Global.TRUE, text("保存社区成功!"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myMunicipalities:view")
|
||||||
|
@RequestMapping(value = "exportData")
|
||||||
|
public void exportData(MyMunicipalities myMunicipalities, HttpServletResponse response) {
|
||||||
|
List<MyMunicipalities> list = myMunicipalitiesService.findList(myMunicipalities);
|
||||||
|
String fileName = "社区" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
||||||
|
try(ExcelExport ee = new ExcelExport("社区", MyMunicipalities.class)){
|
||||||
|
ee.setDataList(list).write(response, fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myMunicipalities:view")
|
||||||
|
@RequestMapping(value = "importTemplate")
|
||||||
|
public void importTemplate(HttpServletResponse response) {
|
||||||
|
MyMunicipalities myMunicipalities = new MyMunicipalities();
|
||||||
|
List<MyMunicipalities> list = ListUtils.newArrayList(myMunicipalities);
|
||||||
|
String fileName = "社区模板.xlsx";
|
||||||
|
try(ExcelExport ee = new ExcelExport("社区", MyMunicipalities.class, Type.IMPORT)){
|
||||||
|
ee.setDataList(list).write(response, fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@RequiresPermissions("biz:myMunicipalities:edit")
|
||||||
|
@PostMapping(value = "importData")
|
||||||
|
public String importData(MultipartFile file) {
|
||||||
|
try {
|
||||||
|
String message = myMunicipalitiesService.importData(file);
|
||||||
|
return renderResult(Global.TRUE, "posfull:"+message);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myMunicipalities:edit")
|
||||||
|
@RequestMapping(value = "delete")
|
||||||
|
@ResponseBody
|
||||||
|
public String delete(MyMunicipalities myMunicipalities) {
|
||||||
|
myMunicipalitiesService.delete(myMunicipalities);
|
||||||
|
return renderResult(Global.TRUE, text("删除社区成功!"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -99,6 +99,7 @@ public class MyNoticeTodoController extends BaseController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
public String save(@Validated MyNoticeTodo myNoticeTodo) {
|
public String save(@Validated MyNoticeTodo myNoticeTodo) {
|
||||||
User user = UserUtils.getUser();
|
User user = UserUtils.getUser();
|
||||||
|
myNoticeTodo.setUstatus("0");
|
||||||
myNoticeTodo.setAvatar(user.getAvatar());
|
myNoticeTodo.setAvatar(user.getAvatar());
|
||||||
myNoticeTodo.setCreateUser(user.getLoginCode());
|
myNoticeTodo.setCreateUser(user.getLoginCode());
|
||||||
myNoticeTodoService.save(myNoticeTodo);
|
myNoticeTodoService.save(myNoticeTodo);
|
||||||
@@ -158,6 +159,18 @@ public class MyNoticeTodoController extends BaseController {
|
|||||||
return renderResult(Global.TRUE, text("删除消息成功!"));
|
return renderResult(Global.TRUE, text("删除消息成功!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布数据
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "publish")
|
||||||
|
@ResponseBody
|
||||||
|
public String publish(MyNoticeTodo myNoticeTodo) {
|
||||||
|
MyNoticeTodo noticeTodo = myNoticeTodoService.get(myNoticeTodo);
|
||||||
|
noticeTodo.setUstatus("1");
|
||||||
|
myNoticeTodoService.save(noticeTodo);
|
||||||
|
return renderResult(Global.TRUE, text("发布消息成功!"));
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "listAll")
|
@RequestMapping(value = "listAll")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public List<MyNoticeTodo> listAll(MyNoticeTodo myNoticeTodo) {
|
public List<MyNoticeTodo> listAll(MyNoticeTodo myNoticeTodo) {
|
||||||
|
|||||||
@@ -1,157 +0,0 @@
|
|||||||
package com.jeesite.modules.biz.web;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.ui.Model;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import com.jeesite.common.config.Global;
|
|
||||||
import com.jeesite.common.collect.ListUtils;
|
|
||||||
import com.jeesite.common.entity.Page;
|
|
||||||
import com.jeesite.common.lang.DateUtils;
|
|
||||||
import com.jeesite.common.utils.excel.ExcelExport;
|
|
||||||
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
import com.jeesite.common.web.BaseController;
|
|
||||||
import com.jeesite.modules.biz.entity.MyPageIndex;
|
|
||||||
import com.jeesite.modules.biz.service.MyPageIndexService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 指标数据表 Controller
|
|
||||||
*
|
|
||||||
* @author gaoxq
|
|
||||||
* @version 2026-03-23
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@RequestMapping(value = "${adminPath}/biz/myPageIndex")
|
|
||||||
public class MyPageIndexController extends BaseController {
|
|
||||||
|
|
||||||
private final MyPageIndexService myPageIndexService;
|
|
||||||
|
|
||||||
public MyPageIndexController(MyPageIndexService myPageIndexService) {
|
|
||||||
this.myPageIndexService = myPageIndexService;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取数据
|
|
||||||
*/
|
|
||||||
@ModelAttribute
|
|
||||||
public MyPageIndex get(String indexId, boolean isNewRecord) {
|
|
||||||
return myPageIndexService.get(indexId, isNewRecord);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询列表
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("biz:myPageIndex:view")
|
|
||||||
@RequestMapping(value = {"list", ""})
|
|
||||||
public String list(MyPageIndex myPageIndex, Model model) {
|
|
||||||
model.addAttribute("myPageIndex", myPageIndex);
|
|
||||||
return "modules/biz/myPageIndexList";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询列表数据
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("biz:myPageIndex:view")
|
|
||||||
@RequestMapping(value = "listData")
|
|
||||||
@ResponseBody
|
|
||||||
public Page<MyPageIndex> listData(MyPageIndex myPageIndex, HttpServletRequest request, HttpServletResponse response) {
|
|
||||||
myPageIndex.setPage(new Page<>(request, response));
|
|
||||||
Page<MyPageIndex> page = myPageIndexService.findPage(myPageIndex);
|
|
||||||
return page;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查看编辑表单
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("biz:myPageIndex:view")
|
|
||||||
@RequestMapping(value = "form")
|
|
||||||
public String form(MyPageIndex myPageIndex, Model model) {
|
|
||||||
model.addAttribute("myPageIndex", myPageIndex);
|
|
||||||
return "modules/biz/myPageIndexForm";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存数据
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("biz:myPageIndex:edit")
|
|
||||||
@PostMapping(value = "save")
|
|
||||||
@ResponseBody
|
|
||||||
public String save(@Validated MyPageIndex myPageIndex) {
|
|
||||||
myPageIndexService.save(myPageIndex);
|
|
||||||
return renderResult(Global.TRUE, text("保存指标成功!"));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出数据
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("biz:myPageIndex:view")
|
|
||||||
@RequestMapping(value = "exportData")
|
|
||||||
public void exportData(MyPageIndex myPageIndex, HttpServletResponse response) {
|
|
||||||
List<MyPageIndex> list = myPageIndexService.findList(myPageIndex);
|
|
||||||
String fileName = "指标" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
|
||||||
try (ExcelExport ee = new ExcelExport("指标", MyPageIndex.class)) {
|
|
||||||
ee.setDataList(list).write(response, fileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下载模板
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("biz:myPageIndex:view")
|
|
||||||
@RequestMapping(value = "importTemplate")
|
|
||||||
public void importTemplate(HttpServletResponse response) {
|
|
||||||
MyPageIndex myPageIndex = new MyPageIndex();
|
|
||||||
List<MyPageIndex> list = ListUtils.newArrayList(myPageIndex);
|
|
||||||
String fileName = "指标模板.xlsx";
|
|
||||||
try (ExcelExport ee = new ExcelExport("指标", MyPageIndex.class, Type.IMPORT)) {
|
|
||||||
ee.setDataList(list).write(response, fileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入数据
|
|
||||||
*/
|
|
||||||
@ResponseBody
|
|
||||||
@RequiresPermissions("biz:myPageIndex:edit")
|
|
||||||
@PostMapping(value = "importData")
|
|
||||||
public String importData(MultipartFile file) {
|
|
||||||
try {
|
|
||||||
String message = myPageIndexService.importData(file);
|
|
||||||
return renderResult(Global.TRUE, "posfull:" + message);
|
|
||||||
} catch (Exception ex) {
|
|
||||||
return renderResult(Global.FALSE, "posfull:" + ex.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除数据
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("biz:myPageIndex:edit")
|
|
||||||
@RequestMapping(value = "delete")
|
|
||||||
@ResponseBody
|
|
||||||
public String delete(MyPageIndex myPageIndex) {
|
|
||||||
myPageIndexService.delete(myPageIndex);
|
|
||||||
return renderResult(Global.TRUE, text("删除指标成功!"));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表数据
|
|
||||||
*/
|
|
||||||
@RequestMapping(value = "listAll")
|
|
||||||
@ResponseBody
|
|
||||||
public List<MyPageIndex> listAll(MyPageIndex myPageIndex) {
|
|
||||||
return myPageIndexService.findList(myPageIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
package com.jeesite.modules.biz.web;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
import com.jeesite.common.config.Global;
|
||||||
|
import com.jeesite.common.collect.ListUtils;
|
||||||
|
import com.jeesite.common.entity.Page;
|
||||||
|
import com.jeesite.common.lang.DateUtils;
|
||||||
|
import com.jeesite.common.utils.excel.ExcelExport;
|
||||||
|
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import com.jeesite.common.web.BaseController;
|
||||||
|
import com.jeesite.modules.biz.entity.MyQuickLogin;
|
||||||
|
import com.jeesite.modules.biz.service.MyQuickLoginService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 快捷登录 Controller
|
||||||
|
* @author gaoxq
|
||||||
|
* @version 2026-03-27
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping(value = "${adminPath}/biz/myQuickLogin")
|
||||||
|
public class MyQuickLoginController extends BaseController {
|
||||||
|
|
||||||
|
private final MyQuickLoginService myQuickLoginService;
|
||||||
|
|
||||||
|
public MyQuickLoginController(MyQuickLoginService myQuickLoginService) {
|
||||||
|
this.myQuickLoginService = myQuickLoginService;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取数据
|
||||||
|
*/
|
||||||
|
@ModelAttribute
|
||||||
|
public MyQuickLogin get(String quickId, boolean isNewRecord) {
|
||||||
|
return myQuickLoginService.get(quickId, isNewRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myQuickLogin:view")
|
||||||
|
@RequestMapping(value = {"list", ""})
|
||||||
|
public String list(MyQuickLogin myQuickLogin, Model model) {
|
||||||
|
model.addAttribute("myQuickLogin", myQuickLogin);
|
||||||
|
return "modules/biz/myQuickLoginList";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表数据
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myQuickLogin:view")
|
||||||
|
@RequestMapping(value = "listData")
|
||||||
|
@ResponseBody
|
||||||
|
public Page<MyQuickLogin> listData(MyQuickLogin myQuickLogin, HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
myQuickLogin.setPage(new Page<>(request, response));
|
||||||
|
Page<MyQuickLogin> page = myQuickLoginService.findPage(myQuickLogin);
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看编辑表单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myQuickLogin:view")
|
||||||
|
@RequestMapping(value = "form")
|
||||||
|
public String form(MyQuickLogin myQuickLogin, Model model) {
|
||||||
|
model.addAttribute("myQuickLogin", myQuickLogin);
|
||||||
|
return "modules/biz/myQuickLoginForm";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存数据
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myQuickLogin:edit")
|
||||||
|
@PostMapping(value = "save")
|
||||||
|
@ResponseBody
|
||||||
|
public String save(@Validated MyQuickLogin myQuickLogin) {
|
||||||
|
myQuickLoginService.save(myQuickLogin);
|
||||||
|
return renderResult(Global.TRUE, text("保存快捷登录成功!"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myQuickLogin:view")
|
||||||
|
@RequestMapping(value = "exportData")
|
||||||
|
public void exportData(MyQuickLogin myQuickLogin, HttpServletResponse response) {
|
||||||
|
List<MyQuickLogin> list = myQuickLoginService.findList(myQuickLogin);
|
||||||
|
String fileName = "快捷登录" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
||||||
|
try(ExcelExport ee = new ExcelExport("快捷登录", MyQuickLogin.class)){
|
||||||
|
ee.setDataList(list).write(response, fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myQuickLogin:view")
|
||||||
|
@RequestMapping(value = "importTemplate")
|
||||||
|
public void importTemplate(HttpServletResponse response) {
|
||||||
|
MyQuickLogin myQuickLogin = new MyQuickLogin();
|
||||||
|
List<MyQuickLogin> list = ListUtils.newArrayList(myQuickLogin);
|
||||||
|
String fileName = "快捷登录模板.xlsx";
|
||||||
|
try(ExcelExport ee = new ExcelExport("快捷登录", MyQuickLogin.class, Type.IMPORT)){
|
||||||
|
ee.setDataList(list).write(response, fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@RequiresPermissions("biz:myQuickLogin:edit")
|
||||||
|
@PostMapping(value = "importData")
|
||||||
|
public String importData(MultipartFile file) {
|
||||||
|
try {
|
||||||
|
String message = myQuickLoginService.importData(file);
|
||||||
|
return renderResult(Global.TRUE, "posfull:"+message);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("biz:myQuickLogin:edit")
|
||||||
|
@RequestMapping(value = "delete")
|
||||||
|
@ResponseBody
|
||||||
|
public String delete(MyQuickLogin myQuickLogin) {
|
||||||
|
myQuickLoginService.delete(myQuickLogin);
|
||||||
|
return renderResult(Global.TRUE, text("删除快捷登录成功!"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "listAll")
|
||||||
|
@ResponseBody
|
||||||
|
public List<MyQuickLogin> listAll(MyQuickLogin myQuickLogin){
|
||||||
|
return myQuickLoginService.findList(myQuickLogin);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?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.jeesite.modules.biz.dao.MyMunicipalitiesDao">
|
||||||
|
|
||||||
|
<!-- 查询数据
|
||||||
|
<select id="findList" resultType="MyMunicipalities">
|
||||||
|
SELECT ${sqlMap.column.toSql()}
|
||||||
|
FROM ${sqlMap.table.toSql()}
|
||||||
|
<where>
|
||||||
|
${sqlMap.where.toSql()}
|
||||||
|
</where>
|
||||||
|
ORDER BY ${sqlMap.order.toSql()}
|
||||||
|
</select> -->
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?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.jeesite.modules.biz.dao.MyQuickLoginDao">
|
||||||
|
|
||||||
|
<!-- 查询数据
|
||||||
|
<select id="findList" resultType="MyQuickLogin">
|
||||||
|
SELECT ${sqlMap.column.toSql()}
|
||||||
|
FROM ${sqlMap.table.toSql()}
|
||||||
|
<where>
|
||||||
|
${sqlMap.where.toSql()}
|
||||||
|
</where>
|
||||||
|
ORDER BY ${sqlMap.order.toSql()}
|
||||||
|
</select> -->
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -19,3 +19,6 @@ export interface ChartInfo extends BasicModel<ChartInfo> {
|
|||||||
|
|
||||||
export const HostInfoData = () =>
|
export const HostInfoData = () =>
|
||||||
defHttp.get<ChartInfo[]>({ url: adminPath + '/desktop/analysis/getHostInfo' });
|
defHttp.get<ChartInfo[]>({ url: adminPath + '/desktop/analysis/getHostInfo' });
|
||||||
|
|
||||||
|
export const ProvinceChart = () =>
|
||||||
|
defHttp.get<ChartInfo[]>({ url: adminPath + '/desktop/analysis/getProvinceChart' });
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ export interface MyCities extends BasicModel<MyCities> {
|
|||||||
export const myCitiesList = (params?: MyCities | any) =>
|
export const myCitiesList = (params?: MyCities | any) =>
|
||||||
defHttp.get<MyCities>({ url: adminPath + '/biz/myCities/list', params });
|
defHttp.get<MyCities>({ url: adminPath + '/biz/myCities/list', params });
|
||||||
|
|
||||||
|
export const myCitiesListAll = (params?: MyCities | any) =>
|
||||||
|
defHttp.get<MyCities[]>({ url: adminPath + '/biz/myCities/listAll', params });
|
||||||
|
|
||||||
export const myCitiesListData = (params?: MyCities | any) =>
|
export const myCitiesListData = (params?: MyCities | any) =>
|
||||||
defHttp.post<Page<MyCities>>({ url: adminPath + '/biz/myCities/listData', params });
|
defHttp.post<Page<MyCities>>({ url: adminPath + '/biz/myCities/listData', params });
|
||||||
|
|
||||||
|
|||||||
55
web-vue/packages/biz/api/biz/myMunicipalities.ts
Normal file
55
web-vue/packages/biz/api/biz/myMunicipalities.ts
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2013-Now https://jeesite.com All rights reserved.
|
||||||
|
* No deletion without permission, or be held responsible to law.
|
||||||
|
* @author gaoxq
|
||||||
|
*/
|
||||||
|
import { defHttp } from '@jeesite/core/utils/http/axios';
|
||||||
|
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||||
|
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
||||||
|
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
||||||
|
import { UploadFileParams } from '@jeesite/types/axios';
|
||||||
|
import { AxiosProgressEvent } from 'axios';
|
||||||
|
|
||||||
|
const { ctxPath, adminPath } = useGlobSetting();
|
||||||
|
|
||||||
|
export interface MyMunicipalities extends BasicModel<MyMunicipalities> {
|
||||||
|
municipalityId?: string; // 唯一主键
|
||||||
|
createTime?: string; // 记录时间
|
||||||
|
countyName?: string; // 县区名称
|
||||||
|
provinceCode?: string; // 省份编码
|
||||||
|
cityCode?: string; // 市区编码
|
||||||
|
countyCode?: string; // 县区编码
|
||||||
|
townName?: string; // 街道名称
|
||||||
|
townCode?: string; // 街道编号
|
||||||
|
villageName?: string; // 社区名称
|
||||||
|
villageCode?: string; // 社区编号
|
||||||
|
updateTime?: string; // 更新时间
|
||||||
|
ustatus?: string; // 状态
|
||||||
|
}
|
||||||
|
|
||||||
|
export const myMunicipalitiesList = (params?: MyMunicipalities | any) =>
|
||||||
|
defHttp.get<MyMunicipalities>({ url: adminPath + '/biz/myMunicipalities/list', params });
|
||||||
|
|
||||||
|
export const myMunicipalitiesListData = (params?: MyMunicipalities | any) =>
|
||||||
|
defHttp.post<Page<MyMunicipalities>>({ url: adminPath + '/biz/myMunicipalities/listData', params });
|
||||||
|
|
||||||
|
export const myMunicipalitiesForm = (params?: MyMunicipalities | any) =>
|
||||||
|
defHttp.get<MyMunicipalities>({ url: adminPath + '/biz/myMunicipalities/form', params });
|
||||||
|
|
||||||
|
export const myMunicipalitiesSave = (params?: any, data?: MyMunicipalities | any) =>
|
||||||
|
defHttp.postJson<MyMunicipalities>({ url: adminPath + '/biz/myMunicipalities/save', params, data });
|
||||||
|
|
||||||
|
export const myMunicipalitiesImportData = (
|
||||||
|
params: UploadFileParams,
|
||||||
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
||||||
|
) =>
|
||||||
|
defHttp.uploadFile<UploadApiResult>(
|
||||||
|
{
|
||||||
|
url: ctxPath + adminPath + '/biz/myMunicipalities/importData',
|
||||||
|
onUploadProgress,
|
||||||
|
},
|
||||||
|
params,
|
||||||
|
);
|
||||||
|
|
||||||
|
export const myMunicipalitiesDelete = (params?: MyMunicipalities | any) =>
|
||||||
|
defHttp.get<MyMunicipalities>({ url: adminPath + '/biz/myMunicipalities/delete', params });
|
||||||
@@ -87,3 +87,6 @@ export const myNoticeTodoImportData = (
|
|||||||
|
|
||||||
export const myNoticeTodoDelete = (params?: MyNoticeTodo | any) =>
|
export const myNoticeTodoDelete = (params?: MyNoticeTodo | any) =>
|
||||||
defHttp.get<MyNoticeTodo>({ url: adminPath + '/biz/myNoticeTodo/delete', params });
|
defHttp.get<MyNoticeTodo>({ url: adminPath + '/biz/myNoticeTodo/delete', params });
|
||||||
|
|
||||||
|
export const myNoticeTodoPublish = (params?: MyNoticeTodo | any) =>
|
||||||
|
defHttp.get<MyNoticeTodo>({ url: adminPath + '/biz/myNoticeTodo/publish', params });
|
||||||
|
|||||||
@@ -1,57 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2013-Now https://jeesite.com All rights reserved.
|
|
||||||
* No deletion without permission, or be held responsible to law.
|
|
||||||
* @author gaoxq
|
|
||||||
*/
|
|
||||||
import { defHttp } from '@jeesite/core/utils/http/axios';
|
|
||||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
|
||||||
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
|
||||||
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
|
||||||
import { UploadFileParams } from '@jeesite/types/axios';
|
|
||||||
import { AxiosProgressEvent } from 'axios';
|
|
||||||
|
|
||||||
const { ctxPath, adminPath } = useGlobSetting();
|
|
||||||
|
|
||||||
export interface MyPageIndex extends BasicModel<MyPageIndex> {
|
|
||||||
createTime?: string; // 记录时间
|
|
||||||
indexId?: string; // 唯一标识
|
|
||||||
module: string; // 模块名称
|
|
||||||
moduleCode: string; // 模块编码
|
|
||||||
title: string; // 说明描述
|
|
||||||
value?: number; // 数值
|
|
||||||
label?: string; // 名称
|
|
||||||
iconImg: string; // 图片路径
|
|
||||||
iconFilter?: string; // 图标颜色
|
|
||||||
sort: number; // 序号
|
|
||||||
indexCode: string; // 指标编号
|
|
||||||
}
|
|
||||||
|
|
||||||
export const myPageIndexList = (params?: MyPageIndex | any) =>
|
|
||||||
defHttp.get<MyPageIndex>({ url: adminPath + '/biz/myPageIndex/list', params });
|
|
||||||
|
|
||||||
export const myPageIndexListAll = (params?: MyPageIndex | any) =>
|
|
||||||
defHttp.get<MyPageIndex[]>({ url: adminPath + '/biz/myPageIndex/listAll', params });
|
|
||||||
|
|
||||||
export const myPageIndexListData = (params?: MyPageIndex | any) =>
|
|
||||||
defHttp.post<Page<MyPageIndex>>({ url: adminPath + '/biz/myPageIndex/listData', params });
|
|
||||||
|
|
||||||
export const myPageIndexForm = (params?: MyPageIndex | any) =>
|
|
||||||
defHttp.get<MyPageIndex>({ url: adminPath + '/biz/myPageIndex/form', params });
|
|
||||||
|
|
||||||
export const myPageIndexSave = (params?: any, data?: MyPageIndex | any) =>
|
|
||||||
defHttp.postJson<MyPageIndex>({ url: adminPath + '/biz/myPageIndex/save', params, data });
|
|
||||||
|
|
||||||
export const myPageIndexImportData = (
|
|
||||||
params: UploadFileParams,
|
|
||||||
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
|
||||||
) =>
|
|
||||||
defHttp.uploadFile<UploadApiResult>(
|
|
||||||
{
|
|
||||||
url: ctxPath + adminPath + '/biz/myPageIndex/importData',
|
|
||||||
onUploadProgress,
|
|
||||||
},
|
|
||||||
params,
|
|
||||||
);
|
|
||||||
|
|
||||||
export const myPageIndexDelete = (params?: MyPageIndex | any) =>
|
|
||||||
defHttp.get<MyPageIndex>({ url: adminPath + '/biz/myPageIndex/delete', params });
|
|
||||||
55
web-vue/packages/biz/api/biz/myQuickLogin.ts
Normal file
55
web-vue/packages/biz/api/biz/myQuickLogin.ts
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2013-Now https://jeesite.com All rights reserved.
|
||||||
|
* No deletion without permission, or be held responsible to law.
|
||||||
|
* @author gaoxq
|
||||||
|
*/
|
||||||
|
import { defHttp } from '@jeesite/core/utils/http/axios';
|
||||||
|
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||||
|
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
||||||
|
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
||||||
|
import { UploadFileParams } from '@jeesite/types/axios';
|
||||||
|
import { AxiosProgressEvent } from 'axios';
|
||||||
|
|
||||||
|
const { ctxPath, adminPath } = useGlobSetting();
|
||||||
|
|
||||||
|
export interface MyQuickLogin extends BasicModel<MyQuickLogin> {
|
||||||
|
createTime?: string; // 记录时间
|
||||||
|
quickId?: string; // 自增主键
|
||||||
|
systemName: string; // 系统名称
|
||||||
|
systemType?: string; // 系统类型
|
||||||
|
systemUrl?: string; // 首页地址
|
||||||
|
systemIcon?: string; // 系统图标
|
||||||
|
bgColor?: string; // 图标背景色
|
||||||
|
ustatus?: string; // 状态
|
||||||
|
updateTime?: string; // 更新时间
|
||||||
|
}
|
||||||
|
|
||||||
|
export const myQuickLoginList = (params?: MyQuickLogin | any) =>
|
||||||
|
defHttp.get<MyQuickLogin>({ url: adminPath + '/biz/myQuickLogin/list', params });
|
||||||
|
|
||||||
|
export const myQuickLoginListAll = (params?: MyQuickLogin | any) =>
|
||||||
|
defHttp.get<MyQuickLogin[]>({ url: adminPath + '/biz/myQuickLogin/listAll', params });
|
||||||
|
|
||||||
|
export const myQuickLoginListData = (params?: MyQuickLogin | any) =>
|
||||||
|
defHttp.post<Page<MyQuickLogin>>({ url: adminPath + '/biz/myQuickLogin/listData', params });
|
||||||
|
|
||||||
|
export const myQuickLoginForm = (params?: MyQuickLogin | any) =>
|
||||||
|
defHttp.get<MyQuickLogin>({ url: adminPath + '/biz/myQuickLogin/form', params });
|
||||||
|
|
||||||
|
export const myQuickLoginSave = (params?: any, data?: MyQuickLogin | any) =>
|
||||||
|
defHttp.postJson<MyQuickLogin>({ url: adminPath + '/biz/myQuickLogin/save', params, data });
|
||||||
|
|
||||||
|
export const myQuickLoginImportData = (
|
||||||
|
params: UploadFileParams,
|
||||||
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
||||||
|
) =>
|
||||||
|
defHttp.uploadFile<UploadApiResult>(
|
||||||
|
{
|
||||||
|
url: ctxPath + adminPath + '/biz/myQuickLogin/importData',
|
||||||
|
onUploadProgress,
|
||||||
|
},
|
||||||
|
params,
|
||||||
|
);
|
||||||
|
|
||||||
|
export const myQuickLoginDelete = (params?: MyQuickLogin | any) =>
|
||||||
|
defHttp.get<MyQuickLogin>({ url: adminPath + '/biz/myQuickLogin/delete', params });
|
||||||
@@ -44,6 +44,8 @@
|
|||||||
import InputForm from './form.vue';
|
import InputForm from './form.vue';
|
||||||
|
|
||||||
const { t } = useI18n('biz.myChartInfo');
|
const { t } = useI18n('biz.myChartInfo');
|
||||||
|
|
||||||
|
|
||||||
const { showMessage } = useMessage();
|
const { showMessage } = useMessage();
|
||||||
const { meta } = unref(router.currentRoute);
|
const { meta } = unref(router.currentRoute);
|
||||||
const record = ref<MyChartInfo>({} as MyChartInfo);
|
const record = ref<MyChartInfo>({} as MyChartInfo);
|
||||||
|
|||||||
191
web-vue/packages/biz/views/biz/myMunicipalities/form.vue
Normal file
191
web-vue/packages/biz/views/biz/myMunicipalities/form.vue
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
<!--
|
||||||
|
* Copyright (c) 2013-Now https://jeesite.com All rights reserved.
|
||||||
|
* No deletion without permission, or be held responsible to law.
|
||||||
|
* @author gaoxq
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<BasicDrawer
|
||||||
|
v-bind="$attrs"
|
||||||
|
:showFooter="true"
|
||||||
|
:okAuth="'biz:myMunicipalities:edit'"
|
||||||
|
@register="registerDrawer"
|
||||||
|
@ok="handleSubmit"
|
||||||
|
width="70%"
|
||||||
|
>
|
||||||
|
<template #title>
|
||||||
|
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
|
||||||
|
<span> {{ getTitle.value }} </span>
|
||||||
|
</template>
|
||||||
|
<BasicForm @register="registerForm" />
|
||||||
|
</BasicDrawer>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup name="ViewsBizMyMunicipalitiesForm">
|
||||||
|
import { ref, unref, computed } from 'vue';
|
||||||
|
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||||
|
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||||
|
import { router } from '@jeesite/core/router';
|
||||||
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
|
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||||
|
import { BasicDrawer, useDrawerInner } from '@jeesite/core/components/Drawer';
|
||||||
|
import { MyCities, myCitiesListAll } from '@jeesite/biz/api/biz/myCities';
|
||||||
|
import { MyMunicipalities, myMunicipalitiesSave, myMunicipalitiesForm } from '@jeesite/biz/api/biz/myMunicipalities';
|
||||||
|
|
||||||
|
const emit = defineEmits(['success', 'register']);
|
||||||
|
|
||||||
|
const { t } = useI18n('biz.myMunicipalities');
|
||||||
|
const { showMessage } = useMessage();
|
||||||
|
const { meta } = unref(router.currentRoute);
|
||||||
|
const record = ref<MyMunicipalities>({} as MyMunicipalities);
|
||||||
|
|
||||||
|
const cityListParams = ref<Recordable>({ provinceCode: '1' });
|
||||||
|
|
||||||
|
const getTitle = computed(() => ({
|
||||||
|
icon: meta.icon || 'i-ant-design:book-outlined',
|
||||||
|
value: record.value.isNewRecord ? t('新增社区') : t('编辑社区'),
|
||||||
|
}));
|
||||||
|
|
||||||
|
const inputFormSchemas: FormSchema<MyMunicipalities>[] = [
|
||||||
|
{
|
||||||
|
label: t('基本信息'),
|
||||||
|
field: 'basicInfo',
|
||||||
|
component: 'FormGroup',
|
||||||
|
colProps: { md: 24, lg: 24 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('省份名称'),
|
||||||
|
field: 'provinceCode',
|
||||||
|
fieldLabel: 'provinceName',
|
||||||
|
component: 'ListSelect',
|
||||||
|
componentProps: {
|
||||||
|
selectType: 'bizProvinceSelect',
|
||||||
|
onChange: (value: string) => {
|
||||||
|
cityListParams.value.provinceCode = value;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('市区名称'),
|
||||||
|
field: 'cityCode',
|
||||||
|
fieldLabel: 'cityName',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
api: myCitiesListAll,
|
||||||
|
params: cityListParams.value,
|
||||||
|
fieldNames: { label: 'cityName', value: 'cityCode' },
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('县区编码'),
|
||||||
|
field: 'countyCode',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
maxlength: 24,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
colProps: { md: 24, lg: 24 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('县区名称'),
|
||||||
|
field: 'countyName',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
maxlength: 65,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
colProps: { md: 24, lg: 24 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('街道编号'),
|
||||||
|
field: 'townCode',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
maxlength: 32,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
colProps: { md: 24, lg: 24 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('街道名称'),
|
||||||
|
field: 'townName',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
maxlength: 125,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
colProps: { md: 24, lg: 24 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('社区编号'),
|
||||||
|
field: 'villageCode',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
maxlength: 32,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
colProps: { md: 24, lg: 24 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('社区名称'),
|
||||||
|
field: 'villageName',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
maxlength: 125,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
colProps: { md: 24, lg: 24 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('状态'),
|
||||||
|
field: 'ustatus',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
dictType: 'biz_status',
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
colProps: { md: 24, lg: 24 },
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<MyMunicipalities>({
|
||||||
|
labelWidth: 120,
|
||||||
|
schemas: inputFormSchemas,
|
||||||
|
baseColProps: { md: 24, lg: 12 },
|
||||||
|
});
|
||||||
|
|
||||||
|
const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
|
||||||
|
setDrawerProps({ loading: true });
|
||||||
|
await resetFields();
|
||||||
|
const res = await myMunicipalitiesForm(data);
|
||||||
|
record.value = (res.myMunicipalities || {}) as MyMunicipalities;
|
||||||
|
record.value.__t = new Date().getTime();
|
||||||
|
await setFieldsValue(record.value);
|
||||||
|
setDrawerProps({ loading: false });
|
||||||
|
});
|
||||||
|
|
||||||
|
async function handleSubmit() {
|
||||||
|
try {
|
||||||
|
const data = await validate();
|
||||||
|
setDrawerProps({ confirmLoading: true });
|
||||||
|
const params: any = {
|
||||||
|
isNewRecord: record.value.isNewRecord,
|
||||||
|
municipalityId: record.value.municipalityId || data.municipalityId,
|
||||||
|
};
|
||||||
|
// console.log('submit', params, data, record);
|
||||||
|
const res = await myMunicipalitiesSave(params, data);
|
||||||
|
showMessage(res.message);
|
||||||
|
setTimeout(closeDrawer);
|
||||||
|
emit('success', data);
|
||||||
|
} catch (error: any) {
|
||||||
|
if (error && error.errorFields) {
|
||||||
|
showMessage(error.message || t('common.validateError'));
|
||||||
|
}
|
||||||
|
console.log('error', error);
|
||||||
|
} finally {
|
||||||
|
setDrawerProps({ confirmLoading: false });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
298
web-vue/packages/biz/views/biz/myMunicipalities/list.vue
Normal file
298
web-vue/packages/biz/views/biz/myMunicipalities/list.vue
Normal file
@@ -0,0 +1,298 @@
|
|||||||
|
<!--
|
||||||
|
* Copyright (c) 2013-Now https://jeesite.com All rights reserved.
|
||||||
|
* No deletion without permission, or be held responsible to law.
|
||||||
|
* @author gaoxq
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<BasicTable @register="registerTable">
|
||||||
|
<template #tableTitle>
|
||||||
|
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
|
||||||
|
<span> {{ getTitle.value }} </span>
|
||||||
|
</template>
|
||||||
|
<template #toolbar>
|
||||||
|
<a-button type="default" :loading="loading" @click="handleExport()">
|
||||||
|
<Icon icon="i-ant-design:download-outlined" /> {{ t('导出') }}
|
||||||
|
</a-button>
|
||||||
|
<a-button type="primary" @click="handleForm({})" v-auth="'biz:myMunicipalities:edit'">
|
||||||
|
<Icon icon="i-fluent:add-12-filled" /> {{ t('新增') }}
|
||||||
|
</a-button>
|
||||||
|
</template>
|
||||||
|
<template #bizScopeKey="{ record, text, value }">
|
||||||
|
<a @click="handleForm({ municipalityId: record.municipalityId })" :title="value">
|
||||||
|
{{ text }}
|
||||||
|
</a>
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
<InputForm @register="registerDrawer" @success="handleSuccess" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup name="ViewsBizMyMunicipalitiesList">
|
||||||
|
import { onMounted, ref, unref } from 'vue';
|
||||||
|
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||||
|
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||||
|
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||||
|
import { downloadByUrl } from '@jeesite/core/utils/file/download';
|
||||||
|
import { router } from '@jeesite/core/router';
|
||||||
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
|
import { BasicTable, BasicColumn, useTable } from '@jeesite/core/components/Table';
|
||||||
|
import { MyCities, myCitiesListAll } from '@jeesite/biz/api/biz/myCities';
|
||||||
|
import { MyMunicipalities, myMunicipalitiesList } from '@jeesite/biz/api/biz/myMunicipalities';
|
||||||
|
import { myMunicipalitiesDelete, myMunicipalitiesListData } from '@jeesite/biz/api/biz/myMunicipalities';
|
||||||
|
import { useDrawer } from '@jeesite/core/components/Drawer';
|
||||||
|
import { useModal } from '@jeesite/core/components/Modal';
|
||||||
|
import { FormProps } from '@jeesite/core/components/Form';
|
||||||
|
import InputForm from './form.vue';
|
||||||
|
|
||||||
|
const { t } = useI18n('biz.myMunicipalities');
|
||||||
|
const { showMessage } = useMessage();
|
||||||
|
const { meta } = unref(router.currentRoute);
|
||||||
|
const record = ref<MyMunicipalities>({} as MyMunicipalities);
|
||||||
|
|
||||||
|
const cityListParams = ref<Recordable>({ provinceCode: '1' });
|
||||||
|
|
||||||
|
const getTitle = {
|
||||||
|
icon: meta.icon || 'i-ant-design:book-outlined',
|
||||||
|
value: meta.title || t('社区管理'),
|
||||||
|
};
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
|
const searchForm: FormProps<MyMunicipalities> = {
|
||||||
|
baseColProps: { md: 8, lg: 6 },
|
||||||
|
labelWidth: 90,
|
||||||
|
schemas: [
|
||||||
|
{
|
||||||
|
label: t('省份名称'),
|
||||||
|
field: 'provinceCode',
|
||||||
|
fieldLabel: 'provinceName',
|
||||||
|
component: 'ListSelect',
|
||||||
|
componentProps: {
|
||||||
|
selectType: 'bizProvinceSelect',
|
||||||
|
onChange: (value: string) => {
|
||||||
|
cityListParams.value.provinceCode = value;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('市区名称'),
|
||||||
|
field: 'cityCode',
|
||||||
|
fieldLabel: 'cityName',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
api: myCitiesListAll,
|
||||||
|
params: cityListParams.value,
|
||||||
|
fieldNames: { label: 'cityName', value: 'cityCode' },
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('县区名称'),
|
||||||
|
field: 'countyName',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('街道名称'),
|
||||||
|
field: 'townName',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('社区编号'),
|
||||||
|
field: 'villageCode',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('社区名称'),
|
||||||
|
field: 'villageName',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('状态'),
|
||||||
|
field: 'ustatus',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
dictType: 'biz_status',
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableColumns: BasicColumn<MyMunicipalities>[] = [
|
||||||
|
{
|
||||||
|
title: t('记录时间'),
|
||||||
|
dataIndex: 'createTime',
|
||||||
|
key: 'a.create_time',
|
||||||
|
sorter: true,
|
||||||
|
width: 150,
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('省份编码'),
|
||||||
|
dataIndex: 'provinceCode',
|
||||||
|
key: 'a.province_code',
|
||||||
|
sorter: true,
|
||||||
|
width: 130,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('省份名称'),
|
||||||
|
dataIndex: 'provinceName',
|
||||||
|
key: 'b.province_name',
|
||||||
|
sorter: true,
|
||||||
|
width: 130,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('市区编码'),
|
||||||
|
dataIndex: 'cityCode',
|
||||||
|
key: 'a.city_code',
|
||||||
|
sorter: true,
|
||||||
|
width: 130,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('市区名称'),
|
||||||
|
dataIndex: 'cityName',
|
||||||
|
key: 'c.city_name',
|
||||||
|
sorter: true,
|
||||||
|
width: 130,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('县区编码'),
|
||||||
|
dataIndex: 'countyCode',
|
||||||
|
key: 'a.county_code',
|
||||||
|
sorter: true,
|
||||||
|
width: 130,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('县区名称'),
|
||||||
|
dataIndex: 'countyName',
|
||||||
|
key: 'a.county_name',
|
||||||
|
sorter: true,
|
||||||
|
width: 130,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('街道编号'),
|
||||||
|
dataIndex: 'townCode',
|
||||||
|
key: 'a.town_code',
|
||||||
|
sorter: true,
|
||||||
|
width: 130,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('街道名称'),
|
||||||
|
dataIndex: 'townName',
|
||||||
|
key: 'a.town_name',
|
||||||
|
sorter: true,
|
||||||
|
width: 130,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('社区编号'),
|
||||||
|
dataIndex: 'villageCode',
|
||||||
|
key: 'a.village_code',
|
||||||
|
sorter: true,
|
||||||
|
width: 130,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('社区名称'),
|
||||||
|
dataIndex: 'villageName',
|
||||||
|
key: 'a.village_name',
|
||||||
|
sorter: true,
|
||||||
|
width: 130,
|
||||||
|
align: 'left',
|
||||||
|
slot: 'bizScopeKey',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('更新时间'),
|
||||||
|
dataIndex: 'updateTime',
|
||||||
|
key: 'a.update_time',
|
||||||
|
sorter: true,
|
||||||
|
width: 150,
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('状态'),
|
||||||
|
dataIndex: 'ustatus',
|
||||||
|
key: 'a.ustatus',
|
||||||
|
sorter: true,
|
||||||
|
width: 130,
|
||||||
|
align: 'left',
|
||||||
|
dictType: 'biz_status'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const actionColumn: BasicColumn<MyMunicipalities> = {
|
||||||
|
width: 160,
|
||||||
|
align: 'center',
|
||||||
|
actions: (record: MyMunicipalities) => [
|
||||||
|
{
|
||||||
|
icon: 'i-clarity:note-edit-line',
|
||||||
|
title: t('编辑'),
|
||||||
|
onClick: handleForm.bind(this, { municipalityId: record.municipalityId }),
|
||||||
|
auth: 'biz:myMunicipalities:edit',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'i-ant-design:delete-outlined',
|
||||||
|
color: 'error',
|
||||||
|
title: t('删除'),
|
||||||
|
popConfirm: {
|
||||||
|
title: t('是否确认删除社区?'),
|
||||||
|
confirm: handleDelete.bind(this, record),
|
||||||
|
},
|
||||||
|
auth: 'biz:myMunicipalities:edit',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const [registerTable, { reload, getForm }] = useTable<MyMunicipalities>({
|
||||||
|
api: myMunicipalitiesListData,
|
||||||
|
beforeFetch: (params) => {
|
||||||
|
return params;
|
||||||
|
},
|
||||||
|
columns: tableColumns,
|
||||||
|
actionColumn: actionColumn,
|
||||||
|
formConfig: searchForm,
|
||||||
|
showTableSetting: true,
|
||||||
|
useSearchForm: true,
|
||||||
|
canResize: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const res = await myMunicipalitiesList();
|
||||||
|
record.value = (res.myMunicipalities || {}) as MyMunicipalities;
|
||||||
|
await getForm().setFieldsValue(record.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
const [registerDrawer, { openDrawer }] = useDrawer();
|
||||||
|
|
||||||
|
function handleForm(record: Recordable) {
|
||||||
|
openDrawer(true, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleExport() {
|
||||||
|
loading.value = true;
|
||||||
|
const { ctxAdminPath } = useGlobSetting();
|
||||||
|
await downloadByUrl({
|
||||||
|
url: ctxAdminPath + '/biz/myMunicipalities/exportData',
|
||||||
|
params: getForm().getFieldsValue(),
|
||||||
|
});
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleDelete(record: Recordable) {
|
||||||
|
const params = { municipalityId: record.municipalityId };
|
||||||
|
const res = await myMunicipalitiesDelete(params);
|
||||||
|
showMessage(res.message);
|
||||||
|
await handleSuccess(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleSuccess(record: Recordable) {
|
||||||
|
await reload({ record });
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -140,14 +140,6 @@
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
slot: 'bizScopeKey',
|
slot: 'bizScopeKey',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: t('内容'),
|
|
||||||
dataIndex: 'content',
|
|
||||||
key: 'a.content',
|
|
||||||
sorter: true,
|
|
||||||
width: 225,
|
|
||||||
align: 'left',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: t('级别'),
|
title: t('级别'),
|
||||||
dataIndex: 'priority',
|
dataIndex: 'priority',
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup name="ViewsBizMyNoticeTodoList">
|
<script lang="ts" setup name="ViewsBizMyNoticeTodoList">
|
||||||
import { onMounted, ref, unref } from 'vue';
|
import { computed, onMounted, ref, unref } from 'vue';
|
||||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||||
@@ -37,11 +37,15 @@
|
|||||||
import { Icon } from '@jeesite/core/components/Icon';
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
import { BasicTable, BasicColumn, useTable } from '@jeesite/core/components/Table';
|
import { BasicTable, BasicColumn, useTable } from '@jeesite/core/components/Table';
|
||||||
import { MyNoticeTodo, myNoticeTodoList } from '@jeesite/biz/api/biz/myNoticeTodo';
|
import { MyNoticeTodo, myNoticeTodoList } from '@jeesite/biz/api/biz/myNoticeTodo';
|
||||||
import { myNoticeTodoDelete, myNoticeTodoListData } from '@jeesite/biz/api/biz/myNoticeTodo';
|
import { myNoticeTodoDelete, myNoticeTodoPublish, myNoticeTodoListData } from '@jeesite/biz/api/biz/myNoticeTodo';
|
||||||
import { useDrawer } from '@jeesite/core/components/Drawer';
|
import { useDrawer } from '@jeesite/core/components/Drawer';
|
||||||
import { useModal } from '@jeesite/core/components/Modal';
|
import { useModal } from '@jeesite/core/components/Modal';
|
||||||
import { FormProps } from '@jeesite/core/components/Form';
|
import { FormProps } from '@jeesite/core/components/Form';
|
||||||
import InputForm from './form.vue';
|
import InputForm from './form.vue';
|
||||||
|
import { useUserStore } from '@jeesite/core/store/modules/user';
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const userinfo = computed(() => userStore.getUserInfo);
|
||||||
|
|
||||||
const { t } = useI18n('biz.myNoticeTodo');
|
const { t } = useI18n('biz.myNoticeTodo');
|
||||||
const { showMessage } = useMessage();
|
const { showMessage } = useMessage();
|
||||||
@@ -212,14 +216,28 @@
|
|||||||
confirm: handleDelete.bind(this, record),
|
confirm: handleDelete.bind(this, record),
|
||||||
},
|
},
|
||||||
auth: 'biz:myNoticeTodo:edit',
|
auth: 'biz:myNoticeTodo:edit',
|
||||||
|
ifShow: record.ustatus == '0'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: 'ant-design:rollback-outlined',
|
||||||
|
color: 'warning',
|
||||||
|
title: t('发布'),
|
||||||
|
popConfirm: {
|
||||||
|
title: t('是否确认发布消息?'),
|
||||||
|
confirm: handlePublish.bind(this, record),
|
||||||
|
},
|
||||||
|
ifShow: record.ustatus == '0'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
const [registerTable, { reload, getForm }] = useTable<MyNoticeTodo>({
|
const [registerTable, { reload, getForm }] = useTable<MyNoticeTodo>({
|
||||||
api: myNoticeTodoListData,
|
api: myNoticeTodoListData,
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return params;
|
return {
|
||||||
|
...params,
|
||||||
|
createUser: userinfo.value.loginCode,
|
||||||
|
};
|
||||||
},
|
},
|
||||||
columns: tableColumns,
|
columns: tableColumns,
|
||||||
actionColumn: actionColumn,
|
actionColumn: actionColumn,
|
||||||
@@ -257,6 +275,13 @@
|
|||||||
showMessage(res.message);
|
showMessage(res.message);
|
||||||
await handleSuccess(record);
|
await handleSuccess(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function handlePublish(record: Recordable) {
|
||||||
|
const params = { id: record.id };
|
||||||
|
const res = await myNoticeTodoPublish(params);
|
||||||
|
showMessage(res.message);
|
||||||
|
await handleSuccess(record);
|
||||||
|
}
|
||||||
|
|
||||||
async function handleSuccess(record: Recordable) {
|
async function handleSuccess(record: Recordable) {
|
||||||
await reload({ record });
|
await reload({ record });
|
||||||
|
|||||||
@@ -4,44 +4,44 @@
|
|||||||
* @author gaoxq
|
* @author gaoxq
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<BasicModal
|
<BasicDrawer
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
:showFooter="true"
|
:showFooter="true"
|
||||||
:okAuth="'biz:myPageIndex:edit'"
|
:okAuth="'biz:myQuickLogin:edit'"
|
||||||
@register="registerModal"
|
@register="registerDrawer"
|
||||||
@ok="handleSubmit"
|
@ok="handleSubmit"
|
||||||
width="60%"
|
width="70%"
|
||||||
>
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
|
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
|
||||||
<span> {{ getTitle.value }} </span>
|
<span> {{ getTitle.value }} </span>
|
||||||
</template>
|
</template>
|
||||||
<BasicForm @register="registerForm" />
|
<BasicForm @register="registerForm" />
|
||||||
</BasicModal>
|
</BasicDrawer>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup name="ViewsBizMyPageIndexForm">
|
<script lang="ts" setup name="ViewsBizMyQuickLoginForm">
|
||||||
import { ref, unref, computed } from 'vue';
|
import { ref, unref, computed } from 'vue';
|
||||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||||
import { router } from '@jeesite/core/router';
|
import { router } from '@jeesite/core/router';
|
||||||
import { Icon } from '@jeesite/core/components/Icon';
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
import { BasicDrawer, useDrawerInner } from '@jeesite/core/components/Drawer';
|
||||||
import { MyPageIndex, myPageIndexSave, myPageIndexForm } from '@jeesite/biz/api/biz/myPageIndex';
|
import { MyQuickLogin, myQuickLoginSave, myQuickLoginForm } from '@jeesite/biz/api/biz/myQuickLogin';
|
||||||
|
|
||||||
const emit = defineEmits(['success', 'register']);
|
const emit = defineEmits(['success', 'register']);
|
||||||
|
|
||||||
const { t } = useI18n('biz.myPageIndex');
|
const { t } = useI18n('biz.myQuickLogin');
|
||||||
const { showMessage } = useMessage();
|
const { showMessage } = useMessage();
|
||||||
const { meta } = unref(router.currentRoute);
|
const { meta } = unref(router.currentRoute);
|
||||||
const record = ref<MyPageIndex>({} as MyPageIndex);
|
const record = ref<MyQuickLogin>({} as MyQuickLogin);
|
||||||
|
|
||||||
const getTitle = computed(() => ({
|
const getTitle = computed(() => ({
|
||||||
icon: meta.icon || 'i-ant-design:book-outlined',
|
icon: meta.icon || 'i-ant-design:book-outlined',
|
||||||
value: record.value.isNewRecord ? t('新增指标') : t('编辑指标'),
|
value: record.value.isNewRecord ? t('新增快捷登录') : t('编辑快捷登录'),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const inputFormSchemas: FormSchema<MyPageIndex>[] = [
|
const inputFormSchemas: FormSchema<MyQuickLogin>[] = [
|
||||||
{
|
{
|
||||||
label: t('基本信息'),
|
label: t('基本信息'),
|
||||||
field: 'basicInfo',
|
field: 'basicInfo',
|
||||||
@@ -49,44 +49,27 @@
|
|||||||
colProps: { md: 24, lg: 24 },
|
colProps: { md: 24, lg: 24 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('指标名称'),
|
label: t('系统名称'),
|
||||||
field: 'module',
|
field: 'systemName',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
maxlength: 52,
|
maxlength: 100,
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('指标编码'),
|
label: t('系统类型'),
|
||||||
field: 'moduleCode',
|
field: 'systemType',
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
maxlength: 32,
|
dictType: 'system_type',
|
||||||
},
|
allowClear: true,
|
||||||
required: true,
|
},
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('指标描述'),
|
|
||||||
field: 'title',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: {
|
|
||||||
maxlength: 32,
|
|
||||||
},
|
|
||||||
colProps: { md: 24, lg: 24 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('指标数值'),
|
|
||||||
field: 'value',
|
|
||||||
component: 'InputNumber',
|
|
||||||
componentProps: {
|
|
||||||
maxlength: 18,
|
|
||||||
},
|
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('指标单位'),
|
label: t('首页地址'),
|
||||||
field: 'label',
|
field: 'systemUrl',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
maxlength: 32,
|
maxlength: 32,
|
||||||
@@ -94,67 +77,61 @@
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('图片路径'),
|
label: t('系统图标'),
|
||||||
field: 'iconImg',
|
field: 'systemIcon',
|
||||||
component: 'Input',
|
|
||||||
componentProps: {
|
|
||||||
maxlength: 125,
|
|
||||||
},
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('图标颜色'),
|
|
||||||
field: 'iconFilter',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: {
|
|
||||||
maxlength: 32,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('指标序号'),
|
|
||||||
field: 'sort',
|
|
||||||
component: 'InputNumber',
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('指标编号'),
|
|
||||||
field: 'indexCode',
|
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
maxlength: 24,
|
maxlength: 24,
|
||||||
},
|
},
|
||||||
required: true,
|
},
|
||||||
|
{
|
||||||
|
label: t('背景颜色'),
|
||||||
|
field: 'bgColor',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
maxlength: 52,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('系统状态'),
|
||||||
|
field: 'ustatus',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
dictType: 'biz_status',
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<MyPageIndex>({
|
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<MyQuickLogin>({
|
||||||
labelWidth: 120,
|
labelWidth: 120,
|
||||||
schemas: inputFormSchemas,
|
schemas: inputFormSchemas,
|
||||||
baseColProps: { md: 24, lg: 12 },
|
baseColProps: { md: 24, lg: 12 },
|
||||||
});
|
});
|
||||||
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
|
||||||
setModalProps({ loading: true });
|
setDrawerProps({ loading: true });
|
||||||
await resetFields();
|
await resetFields();
|
||||||
const res = await myPageIndexForm(data);
|
const res = await myQuickLoginForm(data);
|
||||||
record.value = (res.myPageIndex || {}) as MyPageIndex;
|
record.value = (res.myQuickLogin || {}) as MyQuickLogin;
|
||||||
record.value.__t = new Date().getTime();
|
record.value.__t = new Date().getTime();
|
||||||
await setFieldsValue(record.value);
|
await setFieldsValue(record.value);
|
||||||
setModalProps({ loading: false });
|
setDrawerProps({ loading: false });
|
||||||
});
|
});
|
||||||
|
|
||||||
async function handleSubmit() {
|
async function handleSubmit() {
|
||||||
try {
|
try {
|
||||||
const data = await validate();
|
const data = await validate();
|
||||||
setModalProps({ confirmLoading: true });
|
setDrawerProps({ confirmLoading: true });
|
||||||
const params: any = {
|
const params: any = {
|
||||||
isNewRecord: record.value.isNewRecord,
|
isNewRecord: record.value.isNewRecord,
|
||||||
indexId: record.value.indexId || data.indexId,
|
quickId: record.value.quickId || data.quickId,
|
||||||
};
|
};
|
||||||
// console.log('submit', params, data, record);
|
// console.log('submit', params, data, record);
|
||||||
const res = await myPageIndexSave(params, data);
|
const res = await myQuickLoginSave(params, data);
|
||||||
showMessage(res.message);
|
showMessage(res.message);
|
||||||
setTimeout(closeModal);
|
setTimeout(closeDrawer);
|
||||||
emit('success', data);
|
emit('success', data);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
if (error && error.errorFields) {
|
if (error && error.errorFields) {
|
||||||
@@ -162,7 +139,7 @@
|
|||||||
}
|
}
|
||||||
console.log('error', error);
|
console.log('error', error);
|
||||||
} finally {
|
} finally {
|
||||||
setModalProps({ confirmLoading: false });
|
setDrawerProps({ confirmLoading: false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -14,20 +14,20 @@
|
|||||||
<a-button type="default" :loading="loading" @click="handleExport()">
|
<a-button type="default" :loading="loading" @click="handleExport()">
|
||||||
<Icon icon="i-ant-design:download-outlined" /> {{ t('导出') }}
|
<Icon icon="i-ant-design:download-outlined" /> {{ t('导出') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button type="primary" @click="handleForm({})" v-auth="'biz:myPageIndex:edit'">
|
<a-button type="primary" @click="handleForm({})" v-auth="'biz:myQuickLogin:edit'">
|
||||||
<Icon icon="i-fluent:add-12-filled" /> {{ t('新增') }}
|
<Icon icon="i-fluent:add-12-filled" /> {{ t('新增') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #firstColumn="{ record, text, value }">
|
<template #bizScopeKey="{ record, text, value }">
|
||||||
<a @click="handleForm({ indexId: record.indexId })" :title="value">
|
<a @click="handleForm({ quickId: record.quickId })" :title="value">
|
||||||
{{ text }}
|
{{ text }}
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<InputForm @register="registerModal" @success="handleSuccess" />
|
<InputForm @register="registerDrawer" @success="handleSuccess" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup name="ViewsBizMyPageIndexList">
|
<script lang="ts" setup name="ViewsBizMyQuickLoginList">
|
||||||
import { onMounted, ref, unref } from 'vue';
|
import { onMounted, ref, unref } from 'vue';
|
||||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||||
@@ -36,74 +36,55 @@
|
|||||||
import { router } from '@jeesite/core/router';
|
import { router } from '@jeesite/core/router';
|
||||||
import { Icon } from '@jeesite/core/components/Icon';
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
import { BasicTable, BasicColumn, useTable } from '@jeesite/core/components/Table';
|
import { BasicTable, BasicColumn, useTable } from '@jeesite/core/components/Table';
|
||||||
import { MyPageIndex, myPageIndexList } from '@jeesite/biz/api/biz/myPageIndex';
|
import { MyQuickLogin, myQuickLoginList } from '@jeesite/biz/api/biz/myQuickLogin';
|
||||||
import { myPageIndexDelete, myPageIndexListData } from '@jeesite/biz/api/biz/myPageIndex';
|
import { myQuickLoginDelete, myQuickLoginListData } from '@jeesite/biz/api/biz/myQuickLogin';
|
||||||
|
import { useDrawer } from '@jeesite/core/components/Drawer';
|
||||||
import { useModal } from '@jeesite/core/components/Modal';
|
import { useModal } from '@jeesite/core/components/Modal';
|
||||||
import { FormProps } from '@jeesite/core/components/Form';
|
import { FormProps } from '@jeesite/core/components/Form';
|
||||||
import InputForm from './form.vue';
|
import InputForm from './form.vue';
|
||||||
|
|
||||||
const { t } = useI18n('biz.myPageIndex');
|
const { t } = useI18n('biz.myQuickLogin');
|
||||||
const { showMessage } = useMessage();
|
const { showMessage } = useMessage();
|
||||||
const { meta } = unref(router.currentRoute);
|
const { meta } = unref(router.currentRoute);
|
||||||
const record = ref<MyPageIndex>({} as MyPageIndex);
|
const record = ref<MyQuickLogin>({} as MyQuickLogin);
|
||||||
|
|
||||||
const getTitle = {
|
const getTitle = {
|
||||||
icon: meta.icon || 'i-ant-design:book-outlined',
|
icon: meta.icon || 'i-ant-design:book-outlined',
|
||||||
value: meta.title || t('指标管理'),
|
value: meta.title || t('快捷登录管理'),
|
||||||
};
|
};
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
const searchForm: FormProps<MyPageIndex> = {
|
const searchForm: FormProps<MyQuickLogin> = {
|
||||||
baseColProps: { md: 8, lg: 6 },
|
baseColProps: { md: 8, lg: 6 },
|
||||||
labelWidth: 90,
|
labelWidth: 90,
|
||||||
schemas: [
|
schemas: [
|
||||||
{
|
{
|
||||||
label: t('记录时间起'),
|
label: t('系统名称'),
|
||||||
field: 'createTime_gte',
|
field: 'systemName',
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
format: 'YYYY-MM-DD HH:mm',
|
|
||||||
showTime: { format: 'HH:mm' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('记录时间止'),
|
|
||||||
field: 'createTime_lte',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
format: 'YYYY-MM-DD HH:mm',
|
|
||||||
showTime: { format: 'HH:mm' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('指标名称'),
|
|
||||||
field: 'module',
|
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('指标编码'),
|
label: t('系统类型'),
|
||||||
field: 'moduleCode',
|
field: 'systemType',
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
dictType: 'system_type',
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('指标描述'),
|
label: t('状态'),
|
||||||
field: 'title',
|
field: 'ustatus',
|
||||||
component: 'Input',
|
component: 'Select',
|
||||||
},
|
componentProps: {
|
||||||
{
|
dictType: 'biz_status',
|
||||||
label: t('单位名称'),
|
allowClear: true,
|
||||||
field: 'label',
|
},
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: t('指标编号'),
|
|
||||||
field: 'indexCode',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
const tableColumns: BasicColumn<MyPageIndex>[] = [
|
const tableColumns: BasicColumn<MyQuickLogin>[] = [
|
||||||
{
|
{
|
||||||
title: t('记录时间'),
|
title: t('记录时间'),
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
@@ -114,105 +95,91 @@
|
|||||||
fixed: 'left',
|
fixed: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('指标名称'),
|
title: t('系统名称'),
|
||||||
dataIndex: 'module',
|
dataIndex: 'systemName',
|
||||||
key: 'a.module',
|
key: 'a.system_name',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 130,
|
width: 200,
|
||||||
align: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('指标编码'),
|
|
||||||
dataIndex: 'moduleCode',
|
|
||||||
key: 'a.module_code',
|
|
||||||
sorter: true,
|
|
||||||
width: 130,
|
|
||||||
align: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('指标描述'),
|
|
||||||
dataIndex: 'title',
|
|
||||||
key: 'a.title',
|
|
||||||
sorter: true,
|
|
||||||
width: 130,
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
slot: 'bizScopeKey',
|
slot: 'bizScopeKey',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('指标数值'),
|
title: t('系统类型'),
|
||||||
dataIndex: 'value',
|
dataIndex: 'systemType',
|
||||||
key: 'a.value',
|
key: 'a.system_type',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 130,
|
width: 130,
|
||||||
align: 'right',
|
align: 'left',
|
||||||
|
dictType: 'system_type',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('单位名称'),
|
title: t('首页地址'),
|
||||||
dataIndex: 'label',
|
dataIndex: 'systemUrl',
|
||||||
key: 'a.label',
|
key: 'a.system_url',
|
||||||
|
sorter: true,
|
||||||
|
width: 200,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('系统图标'),
|
||||||
|
dataIndex: 'systemIcon',
|
||||||
|
key: 'a.system_icon',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 130,
|
width: 130,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('图片路径'),
|
title: t('图标背景色'),
|
||||||
dataIndex: 'iconImg',
|
dataIndex: 'bgColor',
|
||||||
key: 'a.icon_img',
|
key: 'a.bg_color',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 130,
|
width: 130,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('图标颜色'),
|
title: t('状态'),
|
||||||
dataIndex: 'iconFilter',
|
dataIndex: 'ustatus',
|
||||||
key: 'a.icon_filter',
|
key: 'a.ustatus',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 130,
|
width: 130,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
dictType: 'biz_status',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('指标序号'),
|
title: t('更新时间'),
|
||||||
dataIndex: 'sort',
|
dataIndex: 'updateTime',
|
||||||
key: 'a.sort',
|
key: 'a.update_time',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 130,
|
width: 150,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: t('指标编号'),
|
|
||||||
dataIndex: 'indexCode',
|
|
||||||
key: 'a.index_code',
|
|
||||||
sorter: true,
|
|
||||||
width: 130,
|
|
||||||
align: 'left',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const actionColumn: BasicColumn<MyPageIndex> = {
|
const actionColumn: BasicColumn<MyQuickLogin> = {
|
||||||
width: 160,
|
width: 160,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
actions: (record: MyPageIndex) => [
|
actions: (record: MyQuickLogin) => [
|
||||||
{
|
{
|
||||||
icon: 'i-clarity:note-edit-line',
|
icon: 'i-clarity:note-edit-line',
|
||||||
title: t('编辑'),
|
title: t('编辑'),
|
||||||
onClick: handleForm.bind(this, { indexId: record.indexId }),
|
onClick: handleForm.bind(this, { quickId: record.quickId }),
|
||||||
auth: 'biz:myPageIndex:edit',
|
auth: 'biz:myQuickLogin:edit',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'i-ant-design:delete-outlined',
|
icon: 'i-ant-design:delete-outlined',
|
||||||
color: 'error',
|
color: 'error',
|
||||||
title: t('删除'),
|
title: t('删除'),
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
title: t('是否确认删除指标?'),
|
title: t('是否确认删除快捷登录?'),
|
||||||
confirm: handleDelete.bind(this, record),
|
confirm: handleDelete.bind(this, record),
|
||||||
},
|
},
|
||||||
auth: 'biz:myPageIndex:edit',
|
auth: 'biz:myQuickLogin:edit',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
const [registerTable, { reload, getForm }] = useTable<MyPageIndex>({
|
const [registerTable, { reload, getForm }] = useTable<MyQuickLogin>({
|
||||||
api: myPageIndexListData,
|
api: myQuickLoginListData,
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return params;
|
return params;
|
||||||
},
|
},
|
||||||
@@ -225,30 +192,30 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const res = await myPageIndexList();
|
const res = await myQuickLoginList();
|
||||||
record.value = (res.myPageIndex || {}) as MyPageIndex;
|
record.value = (res.myQuickLogin || {}) as MyQuickLogin;
|
||||||
await getForm().setFieldsValue(record.value);
|
await getForm().setFieldsValue(record.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
const [registerDrawer, { openDrawer }] = useDrawer();
|
||||||
|
|
||||||
function handleForm(record: Recordable) {
|
function handleForm(record: Recordable) {
|
||||||
openModal(true, record);
|
openDrawer(true, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleExport() {
|
async function handleExport() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const { ctxAdminPath } = useGlobSetting();
|
const { ctxAdminPath } = useGlobSetting();
|
||||||
await downloadByUrl({
|
await downloadByUrl({
|
||||||
url: ctxAdminPath + '/biz/myPageIndex/exportData',
|
url: ctxAdminPath + '/biz/myQuickLogin/exportData',
|
||||||
params: getForm().getFieldsValue(),
|
params: getForm().getFieldsValue(),
|
||||||
});
|
});
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleDelete(record: Recordable) {
|
async function handleDelete(record: Recordable) {
|
||||||
const params = { indexId: record.indexId };
|
const params = { quickId: record.quickId };
|
||||||
const res = await myPageIndexDelete(params);
|
const res = await myQuickLoginDelete(params);
|
||||||
showMessage(res.message);
|
showMessage(res.message);
|
||||||
await handleSuccess(record);
|
await handleSuccess(record);
|
||||||
}
|
}
|
||||||
222
web-vue/packages/biz/views/biz/myScreen/components/ChartTop.vue
Normal file
222
web-vue/packages/biz/views/biz/myScreen/components/ChartTop.vue
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
<template>
|
||||||
|
<div class="chart-top">
|
||||||
|
<div v-for="item in cardList" :key="item.key" class="chart-top__card">
|
||||||
|
<div class="chart-top__left">
|
||||||
|
<div class="chart-top__icon" :style="{ background: item.iconBg, color: item.iconColor }">
|
||||||
|
<Icon :icon="item.icon" size="18" />
|
||||||
|
</div>
|
||||||
|
<div class="chart-top__label">{{ item.label }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="chart-top__right">
|
||||||
|
<span class="chart-top__value">{{ item.value }}</span>
|
||||||
|
<span class="chart-top__unit">{{ item.unit }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue';
|
||||||
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
|
|
||||||
|
interface TopCardItem {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
value: string | number;
|
||||||
|
unit: string;
|
||||||
|
icon: string;
|
||||||
|
iconBg: string;
|
||||||
|
iconColor: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const cardList = computed<TopCardItem[]>(() => [
|
||||||
|
{
|
||||||
|
key: 'customer',
|
||||||
|
label: '客户总数',
|
||||||
|
value: 1280,
|
||||||
|
unit: '户',
|
||||||
|
icon: 'ant-design:team-outlined',
|
||||||
|
iconBg: 'rgba(59, 130, 246, 0.14)',
|
||||||
|
iconColor: '#2563eb',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'contract',
|
||||||
|
label: '合同金额',
|
||||||
|
value: 986,
|
||||||
|
unit: '万',
|
||||||
|
icon: 'ant-design:file-text-outlined',
|
||||||
|
iconBg: 'rgba(16, 185, 129, 0.14)',
|
||||||
|
iconColor: '#059669',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'project',
|
||||||
|
label: '项目数量',
|
||||||
|
value: 246,
|
||||||
|
unit: '个',
|
||||||
|
icon: 'ant-design:appstore-outlined',
|
||||||
|
iconBg: 'rgba(249, 115, 22, 0.14)',
|
||||||
|
iconColor: '#ea580c',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'payment',
|
||||||
|
label: '本月回款',
|
||||||
|
value: 368,
|
||||||
|
unit: '万',
|
||||||
|
icon: 'ant-design:wallet-outlined',
|
||||||
|
iconBg: 'rgba(168, 85, 247, 0.14)',
|
||||||
|
iconColor: '#7e22ce',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'warning',
|
||||||
|
label: '风险预警',
|
||||||
|
value: 19,
|
||||||
|
unit: '条',
|
||||||
|
icon: 'ant-design:alert-outlined',
|
||||||
|
iconBg: 'rgba(236, 72, 153, 0.14)',
|
||||||
|
iconColor: '#db2777',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'rate',
|
||||||
|
label: '完成率',
|
||||||
|
value: 92.6,
|
||||||
|
unit: '%',
|
||||||
|
icon: 'ant-design:line-chart-outlined',
|
||||||
|
iconBg: 'rgba(6, 182, 212, 0.14)',
|
||||||
|
iconColor: '#0891b2',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
@dark-bg: #141414;
|
||||||
|
|
||||||
|
.chart-top {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-top__card {
|
||||||
|
min-width: 0;
|
||||||
|
height: 100%;
|
||||||
|
padding: 12px 14px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid rgb(226 232 240);
|
||||||
|
background: rgb(255, 255, 255);
|
||||||
|
box-shadow: 0 8px 24px rgb(148 163 184 / 14%);
|
||||||
|
cursor: pointer;
|
||||||
|
transition:
|
||||||
|
transform 0.2s ease,
|
||||||
|
box-shadow 0.2s ease,
|
||||||
|
border-color 0.2s ease,
|
||||||
|
background-color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-top__card:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
border-color: rgb(147 197 253);
|
||||||
|
box-shadow: 0 12px 28px rgb(96 165 250 / 20%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-top__left {
|
||||||
|
min-width: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-top__icon {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-top__label {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: rgb(71 85 105);
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-top__right {
|
||||||
|
flex-shrink: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 2px;
|
||||||
|
color: rgb(15 23 42);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-top__value {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-top__unit {
|
||||||
|
color: rgb(100 116 139);
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-theme='dark'] .chart-top__card {
|
||||||
|
border-color: rgb(51 65 85);
|
||||||
|
background: @dark-bg !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-theme='dark'] .chart-top__card:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
border-color: rgb(96 165 250);
|
||||||
|
background: @dark-bg !important;
|
||||||
|
box-shadow: 0 14px 32px rgb(37 99 235 / 22%) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-theme='dark'] .chart-top__label {
|
||||||
|
color: rgb(148 163 184);
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-theme='dark'] .chart-top__right {
|
||||||
|
color: rgb(241 245 249);
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-theme='dark'] .chart-top__unit {
|
||||||
|
color: rgb(148 163 184);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1400px) {
|
||||||
|
.chart-top {
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
grid-template-rows: repeat(2, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.chart-top {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
grid-template-rows: repeat(3, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-top__card {
|
||||||
|
padding: 10px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-top__value {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="my-screen-page">
|
<div class="my-screen-page">
|
||||||
<header class="my-screen-top">顶部区域</header>
|
<header class="my-screen-panel my-screen-panel--header">
|
||||||
|
<ChartTop />
|
||||||
|
</header>
|
||||||
<section class="my-screen-bottom">
|
<section class="my-screen-bottom">
|
||||||
<div class="my-screen-left">
|
<div class="my-screen-left">
|
||||||
<section class="my-screen-panel my-screen-left-top">左上区域</section>
|
<section class="my-screen-panel my-screen-left-top">左上区域</section>
|
||||||
@@ -22,7 +24,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="BizMyScreen"></script>
|
<script lang="ts" setup name="BizMyScreen">
|
||||||
|
import ChartTop from './components/ChartTop.vue';
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@dark-bg: #141414;
|
@dark-bg: #141414;
|
||||||
@@ -34,29 +38,34 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
padding: 4px;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-screen-top,
|
|
||||||
.my-screen-panel {
|
.my-screen-panel {
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
padding: 8px 12px 12px;
|
||||||
|
box-sizing: border-box;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border: 1px solid rgb(226 232 240);
|
border: 1px solid rgb(226 232 240);
|
||||||
background: rgb(248 250 252);
|
background: rgb(255, 255, 255);
|
||||||
box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
|
box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: rgb(71 85 105);
|
color: rgb(71 85 105);
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-screen-top {
|
.my-screen-panel--header {
|
||||||
flex: 0 0 10%;
|
flex: 0 0 10%;
|
||||||
|
padding: 8px 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: rgb(51 65 85);
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-screen-bottom {
|
.my-screen-bottom {
|
||||||
@@ -65,6 +74,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-screen-left {
|
.my-screen-left {
|
||||||
@@ -102,6 +112,10 @@
|
|||||||
flex: 1 1 0;
|
flex: 1 1 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.my-screen-right .my-screen-panel {
|
||||||
|
flex: 1 1 0;
|
||||||
|
}
|
||||||
|
|
||||||
.my-screen-right-top,
|
.my-screen-right-top,
|
||||||
.my-screen-right-middle,
|
.my-screen-right-middle,
|
||||||
.my-screen-right-bottom {
|
.my-screen-right-bottom {
|
||||||
@@ -109,11 +123,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
html[data-theme='dark'] .my-screen-page,
|
html[data-theme='dark'] .my-screen-page,
|
||||||
html[data-theme='dark'] .my-screen-bottom {
|
html[data-theme='dark'] .my-screen-bottom,
|
||||||
|
html[data-theme='dark'] .my-screen-left,
|
||||||
|
html[data-theme='dark'] .my-screen-right,
|
||||||
|
html[data-theme='dark'] .my-screen-left-middle,
|
||||||
|
html[data-theme='dark'] .my-screen-left-bottom {
|
||||||
background: @dark-bg !important;
|
background: @dark-bg !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[data-theme='dark'] .my-screen-top,
|
html[data-theme='dark'] .my-screen-panel,
|
||||||
html[data-theme='dark'] .my-screen-panel {
|
html[data-theme='dark'] .my-screen-panel {
|
||||||
border-color: rgb(51 65 85);
|
border-color: rgb(51 65 85);
|
||||||
background: @dark-bg !important;
|
background: @dark-bg !important;
|
||||||
@@ -121,13 +139,17 @@
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html[data-theme='dark'] .my-screen-panel--header {
|
||||||
|
color: rgb(203 213 225);
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.my-screen-page {
|
.my-screen-page {
|
||||||
height: auto;
|
height: auto;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-screen-top {
|
.my-screen-panel--header {
|
||||||
flex-basis: 72px;
|
flex-basis: 72px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="card-item" v-for="(item, index) in cardList" :key="index">
|
<div class="card-item" v-for="(item, index) in cardList" :key="index">
|
||||||
<div class="card-left">
|
<div class="card-left">
|
||||||
<div class="icon-box">
|
<div class="icon-box">
|
||||||
<Icon :icon="item.iconImg" class="icon-img" :style="{ filter: item.iconFilter }" />
|
<Icon :icon="item.iconImg" class="icon-img" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-text">
|
<div class="card-text">
|
||||||
<div class="module-name">{{ item.module }}</div>
|
<div class="module-name">{{ item.module }}</div>
|
||||||
@@ -19,25 +19,40 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted, watch } from 'vue';
|
||||||
import { Icon } from '@jeesite/core/components/Icon';
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
import { MyPageIndex, myPageIndexListAll } from '@jeesite/biz/api/biz/myPageIndex';
|
import { ScreenTop, ErpChartTop } from '@jeesite/erp/api/erp/screen';
|
||||||
|
|
||||||
const cardList = ref<MyPageIndex[]>();
|
const props = defineProps({
|
||||||
|
formParams: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const cardList = ref<ScreenTop[]>();
|
||||||
|
|
||||||
async function getList() {
|
async function getList() {
|
||||||
try {
|
try {
|
||||||
const reqParams = {
|
const reqParams = {
|
||||||
indexCode: 'werpIndex',
|
...props.formParams,
|
||||||
};
|
};
|
||||||
const res = await myPageIndexListAll(reqParams);
|
const res = await ErpChartTop(reqParams);
|
||||||
cardList.value = res || [];
|
cardList.value = res || [];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取数据失败:', error);
|
console.error('获取数据失败:', error);
|
||||||
cardList.value = [];
|
cardList.value = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.formParams,
|
||||||
|
() => {
|
||||||
|
getList();
|
||||||
|
},
|
||||||
|
{ deep: true, immediate: true },
|
||||||
|
);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onUnmounted, watch } from 'vue';
|
import { ref, onMounted, onUnmounted, watch } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import { ChartDataItem, CategoryChart } from '@jeesite/erp/api/erp/screen';
|
import { ChartDataItem, ErpCategoryChart } from '@jeesite/erp/api/erp/screen';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formParams: {
|
formParams: {
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
...props.formParams,
|
...props.formParams,
|
||||||
flowType: '1',
|
flowType: '1',
|
||||||
};
|
};
|
||||||
const res = await CategoryChart(params);
|
const res = await ErpCategoryChart(params);
|
||||||
vList.value = res || [];
|
vList.value = res || [];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取支出数据失败:', error);
|
console.error('获取支出数据失败:', error);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onUnmounted, watch } from 'vue';
|
import { ref, onMounted, onUnmounted, watch } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import { ChartDataItem, CategoryChart } from '@jeesite/erp/api/erp/screen';
|
import { ChartDataItem, ErpCategoryChart } from '@jeesite/erp/api/erp/screen';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formParams: {
|
formParams: {
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
...props.formParams,
|
...props.formParams,
|
||||||
flowType: '2',
|
flowType: '2',
|
||||||
};
|
};
|
||||||
const res = await CategoryChart(params);
|
const res = await ErpCategoryChart(params);
|
||||||
vList.value = res || [];
|
vList.value = res || [];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取收入数据失败:', error);
|
console.error('获取收入数据失败:', error);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onUnmounted, watch } from 'vue';
|
import { ref, onMounted, onUnmounted, watch } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import { ChartDataItem, CategoryChart } from '@jeesite/erp/api/erp/screen';
|
import { ChartDataItem, ErpCategoryChart } from '@jeesite/erp/api/erp/screen';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formParams: {
|
formParams: {
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
...props.formParams,
|
...props.formParams,
|
||||||
flowType: '1',
|
flowType: '1',
|
||||||
};
|
};
|
||||||
const res = await CategoryChart(params);
|
const res = await ErpCategoryChart(params);
|
||||||
vList.value = res || [];
|
vList.value = res || [];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="erp-layout-container">
|
<div class="erp-layout-container">
|
||||||
<div class="erp-section erp-top-header">
|
<div class="erp-section erp-top-header">
|
||||||
<div class="erp-card full-card">
|
<div class="erp-card full-card">
|
||||||
<ChartTop />
|
<ChartTop :formParams="FormValues" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="card-item" v-for="(item, index) in cardList" :key="index">
|
<div class="card-item" v-for="(item, index) in cardList" :key="index">
|
||||||
<div class="card-left">
|
<div class="card-left">
|
||||||
<div class="icon-box">
|
<div class="icon-box">
|
||||||
<Icon :icon="item.iconImg" class="icon-img" :style="{ filter: item.iconFilter }" />
|
<Icon :icon="item.iconImg" class="icon-img" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-text">
|
<div class="card-text">
|
||||||
<div class="module-name">{{ item.module }}</div>
|
<div class="module-name">{{ item.module }}</div>
|
||||||
@@ -21,17 +21,9 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import { Icon } from '@jeesite/core/components/Icon';
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
import { MyPageIndex, myPageIndexListAll } from '@jeesite/biz/api/biz/myPageIndex';
|
|
||||||
|
|
||||||
const cardList = ref<MyPageIndex[]>();
|
|
||||||
|
|
||||||
async function getList() {
|
async function getList() {
|
||||||
try {
|
try {
|
||||||
const reqParams = {
|
|
||||||
indexCode: 'homeIndex',
|
|
||||||
};
|
|
||||||
const res = await myPageIndexListAll(reqParams);
|
|
||||||
cardList.value = res || [];
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取数据失败:', error);
|
console.error('获取数据失败:', error);
|
||||||
cardList.value = [];
|
cardList.value = [];
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="card-item" v-for="(item, index) in cardList" :key="index">
|
<div class="card-item" v-for="(item, index) in cardList" :key="index">
|
||||||
<div class="card-left">
|
<div class="card-left">
|
||||||
<div class="icon-box">
|
<div class="icon-box">
|
||||||
<Icon :icon="item.iconImg" class="icon-img" :style="{ filter: item.iconFilter }" />
|
<Icon :icon="item.iconImg" class="icon-img" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-text">
|
<div class="card-text">
|
||||||
<div class="module-name">{{ item.module }}</div>
|
<div class="module-name">{{ item.module }}</div>
|
||||||
@@ -21,17 +21,9 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import { Icon } from '@jeesite/core/components/Icon';
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
import { MyPageIndex, myPageIndexListAll } from '@jeesite/biz/api/biz/myPageIndex';
|
|
||||||
|
|
||||||
const cardList = ref<MyPageIndex[]>();
|
|
||||||
|
|
||||||
async function getList() {
|
async function getList() {
|
||||||
try {
|
try {
|
||||||
const reqParams = {
|
|
||||||
indexCode: 'sysIndex',
|
|
||||||
};
|
|
||||||
const res = await myPageIndexListAll(reqParams);
|
|
||||||
cardList.value = res || [];
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取数据失败:', error);
|
console.error('获取数据失败:', error);
|
||||||
cardList.value = [];
|
cardList.value = [];
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="card-item" v-for="(item, index) in cardList" :key="index">
|
<div class="card-item" v-for="(item, index) in cardList" :key="index">
|
||||||
<div class="card-left">
|
<div class="card-left">
|
||||||
<div class="icon-box">
|
<div class="icon-box">
|
||||||
<Icon :icon="item.iconImg" class="icon-img" :style="{ filter: item.iconFilter }" />
|
<Icon :icon="item.iconImg" class="icon-img" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-text">
|
<div class="card-text">
|
||||||
<div class="module-name">{{ item.module }}</div>
|
<div class="module-name">{{ item.module }}</div>
|
||||||
@@ -21,17 +21,9 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import { Icon } from '@jeesite/core/components/Icon';
|
import { Icon } from '@jeesite/core/components/Icon';
|
||||||
import { MyPageIndex, myPageIndexListAll } from '@jeesite/biz/api/biz/myPageIndex';
|
|
||||||
|
|
||||||
const cardList = ref<MyPageIndex[]>();
|
|
||||||
|
|
||||||
async function getList() {
|
async function getList() {
|
||||||
try {
|
try {
|
||||||
const reqParams = {
|
|
||||||
indexCode: 'workIndex',
|
|
||||||
};
|
|
||||||
const res = await myPageIndexListAll(reqParams);
|
|
||||||
cardList.value = res || [];
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取数据失败:', error);
|
console.error('获取数据失败:', error);
|
||||||
cardList.value = [];
|
cardList.value = [];
|
||||||
|
|||||||
@@ -4,63 +4,47 @@
|
|||||||
<span>常用应用</span>
|
<span>常用应用</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<button v-for="item in appList" :key="item.id" class="biz-apps-item" type="button" @click="handleOpen(item)">
|
<button v-for="item in bizAppData" class="biz-apps-item" type="button" @click="handleOpen(item)">
|
||||||
<div class="biz-apps-item__main">
|
<div class="biz-apps-item__main">
|
||||||
<div class="biz-apps-item__pane biz-apps-item__pane--left">左侧区域</div>
|
<div class="biz-apps-item__pane">
|
||||||
<div class="biz-apps-item__pane biz-apps-item__pane--right">右侧区域</div>
|
<img class="biz-apps-item__icon" :src="item.systemIcon" :alt="item.systemName" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="biz-apps-item__name">{{ item.name }}</div>
|
<div class="biz-apps-item__name">{{ item.systemName }}</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ElMessage } from 'element-plus';
|
import { onMounted, ref } from 'vue';
|
||||||
import { ref } from 'vue';
|
import { useRouter } from 'vue-router';
|
||||||
|
import { MyQuickLogin, myQuickLoginListAll } from '@jeesite/biz/api/biz/myQuickLogin';
|
||||||
|
|
||||||
interface BizAppItem {
|
const router = useRouter();
|
||||||
id: string;
|
const bizAppData = ref<MyQuickLogin[]>([]);
|
||||||
name: string;
|
|
||||||
url: string;
|
async function getList() {
|
||||||
|
try {
|
||||||
|
const reqParams = {
|
||||||
|
ustatus: '1',
|
||||||
|
systemType: '1',
|
||||||
|
};
|
||||||
|
const res = await myQuickLoginListAll(reqParams);
|
||||||
|
bizAppData.value = res || [];
|
||||||
|
} catch (error) {
|
||||||
|
bizAppData.value = [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const appList = ref<BizAppItem[]>([
|
function handleOpen(item: MyQuickLogin) {
|
||||||
{
|
if (!item.systemUrl) return;
|
||||||
id: 'oa',
|
router.push(item.systemUrl);
|
||||||
name: '协同办公',
|
|
||||||
url: '/oa',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'erp',
|
|
||||||
name: 'ERP系统',
|
|
||||||
url: '/erp',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'mes',
|
|
||||||
name: 'MES平台',
|
|
||||||
url: '/mes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'crm',
|
|
||||||
name: 'CRM系统',
|
|
||||||
url: '/crm',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'hr',
|
|
||||||
name: '人资门户',
|
|
||||||
url: '/hr',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'bi',
|
|
||||||
name: '数据驾驶舱',
|
|
||||||
url: '/bi',
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
function handleOpen(item: BizAppItem) {
|
|
||||||
ElMessage.success(`准备进入:${item.name}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
@@ -76,8 +60,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 37px;
|
height: var(--analysis-card-title-height, 37px);
|
||||||
padding: 8px 16px;
|
padding: var(--analysis-card-title-padding, 8px 16px);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -91,11 +75,11 @@
|
|||||||
.card-content {
|
.card-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 8px 12px 12px;
|
padding: var(--analysis-card-content-padding, 8px 12px 12px);
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(6, minmax(0, 1fr));
|
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||||
grid-template-rows: minmax(0, 1fr);
|
grid-template-rows: minmax(0, 1fr);
|
||||||
gap: 8px;
|
gap: var(--analysis-card-item-gap, 8px);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,10 +92,11 @@
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border: 1px solid rgb(226 232 240);
|
border: 1px solid rgb(226 232 240);
|
||||||
border-radius: 10px;
|
border-radius: var(--analysis-card-radius, 10px);
|
||||||
background: rgb(255, 255, 255);
|
background: rgb(255, 255, 255);
|
||||||
box-shadow: 0 8px 24px rgb(148 163 184 / 14%);
|
box-shadow: 0 8px 24px rgb(148 163 184 / 14%);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
appearance: none;
|
||||||
transition:
|
transition:
|
||||||
transform 0.2s ease,
|
transform 0.2s ease,
|
||||||
box-shadow 0.2s ease,
|
box-shadow 0.2s ease,
|
||||||
@@ -128,25 +113,33 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 8px;
|
padding: 2px;
|
||||||
gap: 8px;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__pane {
|
&__pane {
|
||||||
flex: 1 1 0;
|
width: 100%;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: rgb(255, 255, 255);
|
background: linear-gradient(135deg, rgb(239 246 255), rgb(224 242 254));
|
||||||
color: rgb(51 65 85);
|
color: rgb(51 65 85);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
box-shadow: 0 8px 24px rgb(148 163 184 / 14%);
|
box-shadow: 0 8px 24px rgb(148 163 184 / 14%);
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__icon {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__name {
|
&__name {
|
||||||
@@ -185,11 +178,8 @@
|
|||||||
box-shadow: 0 14px 32px rgb(37 99 235 / 22%);
|
box-shadow: 0 14px 32px rgb(37 99 235 / 22%);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__pane,
|
&__pane {
|
||||||
&__pane--left,
|
background: linear-gradient(135deg, rgb(30 41 59), rgb(15 23 42));
|
||||||
&__pane--right {
|
|
||||||
background: linear-gradient(180deg, rgb(20, 20, 20) 0%, rgb(28 28 28) 100%);
|
|
||||||
color: rgb(226 232 240);
|
|
||||||
box-shadow: 0 10px 24px rgb(0 0 0 / 24%);
|
box-shadow: 0 10px 24px rgb(0 0 0 / 24%);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,8 +193,8 @@
|
|||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.biz-apps-card {
|
.biz-apps-card {
|
||||||
.card-content {
|
.card-content {
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||||
grid-template-rows: repeat(2, minmax(0, 1fr));
|
grid-template-rows: minmax(0, 1fr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -221,8 +221,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 37px;
|
height: var(--analysis-card-title-height, 37px);
|
||||||
padding: 8px 16px;
|
padding: var(--analysis-card-title-padding, 8px 16px);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -266,7 +266,7 @@
|
|||||||
.card-content {
|
.card-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 8px 12px 12px;
|
padding: var(--analysis-card-content-padding, 8px 12px 12px);
|
||||||
color: rgb(71 85 105);
|
color: rgb(71 85 105);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
>
|
>
|
||||||
<el-table-column prop="projectCode" label="项目编码" min-width="100" show-overflow-tooltip />
|
<el-table-column prop="projectCode" label="项目编码" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column prop="projectName" label="项目名称" min-width="120" show-overflow-tooltip />
|
<el-table-column prop="projectName" label="项目名称" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column prop="projectType" label="项目类型" width="120" show-overflow-tooltip>
|
<el-table-column prop="projectType" label="项目类型" width="100" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ getDictLabel(projectTypeDict, row.projectType) }}
|
{{ getDictLabel(projectTypeDict, row.projectType) }}
|
||||||
</template>
|
</template>
|
||||||
@@ -64,12 +64,13 @@
|
|||||||
{{ getDictLabel(projectStatusDict, row.projectStatus) }}
|
{{ getDictLabel(projectStatusDict, row.projectStatus) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="budget" label="项目预算(元)" width="120" show-overflow-tooltip />
|
<el-table-column prop="treeName" label="项目区域" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="personName" label="项目人员" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column prop="startDate" label="开始日期" width="150" show-overflow-tooltip />
|
<el-table-column prop="startDate" label="开始日期" width="150" show-overflow-tooltip />
|
||||||
<el-table-column prop="endDate" label="结束日期" width="150" show-overflow-tooltip />
|
<el-table-column prop="endDate" label="结束日期" width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="budget" label="项目预算(元)" width="120" show-overflow-tooltip />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pagination-panel">
|
<div class="pagination-panel">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-model:current-page="currentPage"
|
v-model:current-page="currentPage"
|
||||||
@@ -208,8 +209,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 37px;
|
height: var(--analysis-card-title-height, 37px);
|
||||||
padding: 8px 16px;
|
padding: var(--analysis-card-title-padding, 8px 16px);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -223,7 +224,7 @@
|
|||||||
.card-content {
|
.card-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 8px 12px 12px;
|
padding: var(--analysis-card-content-padding, 8px 12px 12px);
|
||||||
color: rgb(71 85 105);
|
color: rgb(71 85 105);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
@@ -231,7 +232,7 @@
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: var(--analysis-card-item-gap, 8px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.query-panel,
|
.query-panel,
|
||||||
|
|||||||
@@ -0,0 +1,260 @@
|
|||||||
|
<template>
|
||||||
|
<div ref="provinceCardRef" class="province-card">
|
||||||
|
<div class="card-title">
|
||||||
|
<span>社区分布</span>
|
||||||
|
<el-tooltip content="刷新" placement="top" :show-after="200">
|
||||||
|
<el-button
|
||||||
|
class="card-title__refresh"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
:icon="RefreshRight"
|
||||||
|
:loading="loading"
|
||||||
|
@click="getList"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
<div class="card-content">
|
||||||
|
<div class="province-chart-panel">
|
||||||
|
<div ref="chartRef" class="province-chart"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { nextTick, onMounted, onUnmounted, ref } from 'vue';
|
||||||
|
import * as echarts from 'echarts';
|
||||||
|
import { RefreshRight } from '@element-plus/icons-vue';
|
||||||
|
import { ChartInfo, ProvinceChart } from '@jeesite/biz/api/biz/myAnalysis';
|
||||||
|
|
||||||
|
const chartData = ref<ChartInfo[]>([]);
|
||||||
|
const loading = ref(false);
|
||||||
|
const provinceCardRef = ref<HTMLElement>();
|
||||||
|
const chartRef = ref<HTMLElement>();
|
||||||
|
|
||||||
|
async function getList() {
|
||||||
|
loading.value = true;
|
||||||
|
try {
|
||||||
|
const res = await ProvinceChart();
|
||||||
|
chartData.value = res || [];
|
||||||
|
nextTick(() => {
|
||||||
|
renderChart();
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
chartData.value = [];
|
||||||
|
nextTick(() => {
|
||||||
|
renderChart();
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let chartInstance: echarts.ECharts | null = null;
|
||||||
|
let resizeObserver: ResizeObserver | null = null;
|
||||||
|
let themeObserver: MutationObserver | null = null;
|
||||||
|
|
||||||
|
function renderChart() {
|
||||||
|
if (!chartRef.value) return;
|
||||||
|
|
||||||
|
if (!chartInstance) {
|
||||||
|
chartInstance = echarts.init(chartRef.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
const isDark = document.documentElement.getAttribute('data-theme') === 'dark';
|
||||||
|
const axisLabelRotate = chartData.value.length > 10 ? 45 : chartData.value.length > 6 ? 30 : 0;
|
||||||
|
|
||||||
|
chartInstance.setOption({
|
||||||
|
grid: {
|
||||||
|
left: 12,
|
||||||
|
right: 12,
|
||||||
|
top: 36,
|
||||||
|
bottom: 8,
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
type: 'shadow',
|
||||||
|
},
|
||||||
|
backgroundColor: isDark ? 'rgba(20, 20, 20, 0.96)' : 'rgba(255, 255, 255, 0.96)',
|
||||||
|
borderColor: isDark ? 'rgb(51 65 85)' : 'rgb(226 232 240)',
|
||||||
|
borderWidth: 1,
|
||||||
|
textStyle: {
|
||||||
|
color: isDark ? '#e2e8f0' : '#334155',
|
||||||
|
},
|
||||||
|
formatter: (params: any) => {
|
||||||
|
const current = Array.isArray(params) ? params[0] : params;
|
||||||
|
const label = current?.axisValue || current?.name || '-';
|
||||||
|
const value = current?.value ?? 0;
|
||||||
|
const total = chartData.value.reduce((sum, item) => sum + Number(item.value || 0), 0);
|
||||||
|
const percent = total > 0 ? ((Number(value) / total) * 100).toFixed(2) : '0.00';
|
||||||
|
return `区域:${label}<br/>数量:${value}<br/>占比:${percent}%`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: chartData.value.map((item) => item.label || '-'),
|
||||||
|
axisTick: {
|
||||||
|
alignWithLabel: true,
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: isDark ? '#475569' : '#cbd5e1',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: isDark ? '#cbd5e1' : '#64748b',
|
||||||
|
margin: 10,
|
||||||
|
rotate: axisLabelRotate,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
name: '数量',
|
||||||
|
nameTextStyle: {
|
||||||
|
color: isDark ? '#94a3b8' : '#64748b',
|
||||||
|
padding: [0, 0, 4, 0],
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: isDark ? 'rgba(71, 85, 105, 0.35)' : 'rgba(203, 213, 225, 0.55)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: isDark ? '#94a3b8' : '#64748b',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: '24%',
|
||||||
|
data: chartData.value.map((item) => ({
|
||||||
|
value: item.value,
|
||||||
|
itemStyle: {
|
||||||
|
color: item.color || '#3B82F6',
|
||||||
|
borderRadius: [6, 6, 0, 0],
|
||||||
|
},
|
||||||
|
})),
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top',
|
||||||
|
color: isDark ? '#cbd5e1' : '#475569',
|
||||||
|
fontSize: 11,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function resizeChart() {
|
||||||
|
chartInstance?.resize();
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
|
||||||
|
if (provinceCardRef.value) {
|
||||||
|
resizeObserver = new ResizeObserver(() => {
|
||||||
|
resizeChart();
|
||||||
|
});
|
||||||
|
resizeObserver.observe(provinceCardRef.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('resize', resizeChart);
|
||||||
|
|
||||||
|
themeObserver = new MutationObserver(() => {
|
||||||
|
nextTick(() => {
|
||||||
|
renderChart();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
themeObserver.observe(document.documentElement, {
|
||||||
|
attributes: true,
|
||||||
|
attributeFilter: ['data-theme'],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
resizeObserver?.disconnect();
|
||||||
|
themeObserver?.disconnect();
|
||||||
|
window.removeEventListener('resize', resizeChart);
|
||||||
|
chartInstance?.dispose();
|
||||||
|
chartInstance = null;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.province-card {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
background: rgb(255, 255, 255);
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 37px;
|
||||||
|
padding: 8px 16px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 20px;
|
||||||
|
color: rgb(51 65 85);
|
||||||
|
border-bottom: 1px solid rgb(226 232 240);
|
||||||
|
background: transparent;
|
||||||
|
|
||||||
|
&__refresh {
|
||||||
|
padding: 0;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-content {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
padding: 8px 12px 12px;
|
||||||
|
overflow: hidden;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.province-chart-panel {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 0;
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: rgb(255, 255, 255);
|
||||||
|
box-shadow: 0 8px 24px rgb(148 163 184 / 14%);
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.province-chart {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-theme='dark'] .province-card {
|
||||||
|
background: rgb(20, 20, 20);
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
color: rgb(203 213 225);
|
||||||
|
border-bottom-color: rgb(51 65 85);
|
||||||
|
|
||||||
|
&__refresh:deep(.el-icon) {
|
||||||
|
color: rgb(147 197 253);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.province-chart-panel {
|
||||||
|
background: linear-gradient(180deg, rgb(20, 20, 20) 0%, rgb(28 28 28) 100%);
|
||||||
|
box-shadow: 0 10px 24px rgb(0 0 0 / 24%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -21,16 +21,16 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
v-for="item in displayList"
|
v-for="item in quickData"
|
||||||
:key="item.renderKey"
|
:key="item.quickId || item.systemName"
|
||||||
class="quick-login-item"
|
class="quick-login-item"
|
||||||
type="button"
|
type="button"
|
||||||
@click="handleLogin(item)"
|
@click="handleLogin(item)"
|
||||||
>
|
>
|
||||||
<div class="quick-login-item__image-wrap">
|
<div class="quick-login-item__image-wrap">
|
||||||
<img class="quick-login-item__image" :src="item.logo" :alt="item.name" />
|
<img class="quick-login-item__image" :src="item.systemIcon" :alt="item.systemName" />
|
||||||
</div>
|
</div>
|
||||||
<div class="quick-login-item__name">{{ item.name }}</div>
|
<div class="quick-login-item__name">{{ item.systemName }}</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -52,55 +52,10 @@
|
|||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue';
|
import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue';
|
||||||
|
|
||||||
interface QuickLoginItem {
|
import { MyQuickLogin, myQuickLoginListAll } from '@jeesite/biz/api/biz/myQuickLogin';
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
logo: string;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RenderQuickLoginItem extends QuickLoginItem {
|
const quickData = ref<MyQuickLogin[]>([]);
|
||||||
renderKey: string;
|
const loading = ref(false);
|
||||||
}
|
|
||||||
|
|
||||||
const baseList = ref<QuickLoginItem[]>([
|
|
||||||
{
|
|
||||||
id: 'oa',
|
|
||||||
name: '协同办公',
|
|
||||||
logo: 'https://dummyimage.com/96x96/2563eb/ffffff.png&text=OA',
|
|
||||||
url: '/oa',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'erp',
|
|
||||||
name: 'ERP系统',
|
|
||||||
logo: 'https://dummyimage.com/96x96/0891b2/ffffff.png&text=ERP',
|
|
||||||
url: '/erp',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'mes',
|
|
||||||
name: 'MES平台',
|
|
||||||
logo: 'https://dummyimage.com/96x96/7c3aed/ffffff.png&text=MES',
|
|
||||||
url: '/mes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'crm',
|
|
||||||
name: 'CRM系统',
|
|
||||||
logo: 'https://dummyimage.com/96x96/ea580c/ffffff.png&text=CRM',
|
|
||||||
url: '/crm',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'hr',
|
|
||||||
name: '人资门户',
|
|
||||||
logo: 'https://dummyimage.com/96x96/16a34a/ffffff.png&text=HR',
|
|
||||||
url: '/hr',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'bi',
|
|
||||||
name: '数据驾驶舱',
|
|
||||||
logo: 'https://dummyimage.com/96x96/db2777/ffffff.png&text=BI',
|
|
||||||
url: '/bi',
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const itemWidth = 136;
|
const itemWidth = 136;
|
||||||
const gapWidth = 8;
|
const gapWidth = 8;
|
||||||
@@ -111,22 +66,15 @@
|
|||||||
let resizeObserver: ResizeObserver | null = null;
|
let resizeObserver: ResizeObserver | null = null;
|
||||||
let autoScrollTimer: ReturnType<typeof setInterval> | null = null;
|
let autoScrollTimer: ReturnType<typeof setInterval> | null = null;
|
||||||
|
|
||||||
const canScroll = computed(() => baseList.value.length > visibleCount.value);
|
const canScroll = computed(() => quickData.value.length > visibleCount.value);
|
||||||
|
|
||||||
const maxIndex = computed(() => {
|
const maxIndex = computed(() => {
|
||||||
const value = baseList.value.length - visibleCount.value;
|
const value = quickData.value.length - visibleCount.value;
|
||||||
return value > 0 ? value : 0;
|
return value > 0 ? value : 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
const currentOffset = computed(() => currentIndex.value * stepWidth);
|
const currentOffset = computed(() => currentIndex.value * stepWidth);
|
||||||
|
|
||||||
const displayList = computed<RenderQuickLoginItem[]>(() => {
|
|
||||||
return baseList.value.map((item, index) => ({
|
|
||||||
...item,
|
|
||||||
renderKey: `${item.id}-${index}`,
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
|
|
||||||
function updateVisibleCount() {
|
function updateVisibleCount() {
|
||||||
const width = viewportRef.value?.clientWidth || 0;
|
const width = viewportRef.value?.clientWidth || 0;
|
||||||
if (!width) return;
|
if (!width) return;
|
||||||
@@ -162,11 +110,33 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleLogin(item: QuickLoginItem) {
|
function handleLogin(item: MyQuickLogin) {
|
||||||
ElMessage.success(`准备进入:${item.name}`);
|
window.open(item.systemUrl, '_blank');
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getList() {
|
||||||
|
loading.value = true;
|
||||||
|
try {
|
||||||
|
const reqParams = {
|
||||||
|
ustatus: '1',
|
||||||
|
systemType: '2',
|
||||||
|
};
|
||||||
|
const res = await myQuickLoginListAll(reqParams);
|
||||||
|
quickData.value = res || [];
|
||||||
|
currentIndex.value = 0;
|
||||||
|
nextTick(() => {
|
||||||
|
updateVisibleCount();
|
||||||
|
startAutoScroll();
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
quickData.value = [];
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
updateVisibleCount();
|
updateVisibleCount();
|
||||||
startAutoScroll();
|
startAutoScroll();
|
||||||
@@ -199,8 +169,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 37px;
|
height: var(--analysis-card-title-height, 37px);
|
||||||
padding: 8px 16px;
|
padding: var(--analysis-card-title-padding, 8px 16px);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -214,12 +184,12 @@
|
|||||||
.card-content {
|
.card-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 8px 12px 12px;
|
padding: var(--analysis-card-content-padding, 8px 12px 12px);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
gap: 8px;
|
gap: var(--analysis-card-item-gap, 8px);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,7 +213,7 @@
|
|||||||
|
|
||||||
.quick-login-track {
|
.quick-login-track {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: var(--analysis-card-item-gap, 8px);
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
@@ -262,7 +232,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border: 1px solid rgb(226 232 240);
|
border: 1px solid rgb(226 232 240);
|
||||||
border-radius: 10px;
|
border-radius: var(--analysis-card-radius, 10px);
|
||||||
background: rgb(255, 255, 255);
|
background: rgb(255, 255, 255);
|
||||||
box-shadow: 0 8px 24px rgb(148 163 184 / 14%);
|
box-shadow: 0 8px 24px rgb(148 163 184 / 14%);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -285,7 +255,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 8px;
|
padding: 2px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,7 +263,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__name {
|
&__name {
|
||||||
@@ -343,7 +313,7 @@
|
|||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.quick-login-card {
|
.quick-login-card {
|
||||||
.card-content {
|
.card-content {
|
||||||
padding: 8px 12px 12px;
|
padding: var(--analysis-card-content-padding, 8px 12px 12px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-login-item {
|
.quick-login-item {
|
||||||
|
|||||||
@@ -268,8 +268,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 37px;
|
height: var(--analysis-card-title-height, 37px);
|
||||||
padding: 8px 16px;
|
padding: var(--analysis-card-title-padding, 8px 16px);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -313,7 +313,7 @@
|
|||||||
.card-content {
|
.card-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 8px 12px 12px;
|
padding: var(--analysis-card-content-padding, 8px 12px 12px);
|
||||||
color: rgb(71 85 105);
|
color: rgb(71 85 105);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
|
|||||||
@@ -90,12 +90,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mySpring-analysis .analysis-layout {
|
.mySpring-analysis .analysis-layout {
|
||||||
|
--analysis-gap: 12px;
|
||||||
|
--analysis-row-height: calc((100% - var(--analysis-gap) * 2) / 3);
|
||||||
|
--analysis-double-row-height: calc(var(--analysis-row-height) * 2 + var(--analysis-gap));
|
||||||
|
--analysis-card-title-height: 37px;
|
||||||
|
--analysis-card-title-padding: 8px 16px;
|
||||||
|
--analysis-card-content-padding: 8px 12px 12px;
|
||||||
|
--analysis-card-item-gap: 8px;
|
||||||
|
--analysis-card-radius: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
gap: 12px;
|
gap: var(--analysis-gap);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -110,14 +118,14 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
gap: 12px;
|
gap: var(--analysis-gap);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mySpring-analysis .analysis-right-top {
|
.mySpring-analysis .analysis-right-top {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: repeat(2, minmax(0, 1fr));
|
grid-template-rows: repeat(2, minmax(0, 1fr));
|
||||||
gap: 12px;
|
gap: var(--analysis-gap);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
@@ -129,7 +137,7 @@
|
|||||||
|
|
||||||
.mySpring-analysis .analysis-right {
|
.mySpring-analysis .analysis-right {
|
||||||
flex: 3 1 0;
|
flex: 3 1 0;
|
||||||
grid-template-rows: repeat(2, minmax(0, 1fr));
|
grid-template-rows: minmax(0, var(--analysis-row-height)) minmax(0, var(--analysis-double-row-height));
|
||||||
}
|
}
|
||||||
|
|
||||||
.mySpring-analysis .analysis-panel {
|
.mySpring-analysis .analysis-panel {
|
||||||
@@ -139,7 +147,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border-radius: 10px;
|
border-radius: var(--analysis-card-radius);
|
||||||
border: 1px solid rgb(226 232 240);
|
border: 1px solid rgb(226 232 240);
|
||||||
background: rgb(255, 255, 255);
|
background: rgb(255, 255, 255);
|
||||||
box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
|
box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
|
||||||
|
|||||||
@@ -142,7 +142,10 @@
|
|||||||
{ label: '进行中', color: '#3B82F6', field: 'value02' },
|
{ label: '进行中', color: '#3B82F6', field: 'value02' },
|
||||||
{ label: '已完成', color: '#10B981', field: 'value03' },
|
{ label: '已完成', color: '#10B981', field: 'value03' },
|
||||||
] as const;
|
] as const;
|
||||||
const months = chartData.value.map((item) => item.axisName || '-');
|
const months = chartData.value.map((item) => {
|
||||||
|
const axisName = item.axisName || '-';
|
||||||
|
return axisName.endsWith('月') ? axisName : `${axisName}月`;
|
||||||
|
});
|
||||||
const pendingData = chartData.value.map((item) => Number(item.value01 || 0));
|
const pendingData = chartData.value.map((item) => Number(item.value01 || 0));
|
||||||
const processingData = chartData.value.map((item) => Number(item.value02 || 0));
|
const processingData = chartData.value.map((item) => Number(item.value02 || 0));
|
||||||
const finishedData = chartData.value.map((item) => Number(item.value03 || 0));
|
const finishedData = chartData.value.map((item) => Number(item.value03 || 0));
|
||||||
|
|||||||
@@ -7,13 +7,15 @@
|
|||||||
<div class="workbench-layout">
|
<div class="workbench-layout">
|
||||||
<div class="workbench-row">
|
<div class="workbench-row">
|
||||||
<div class="workbench-col">
|
<div class="workbench-col">
|
||||||
<NoteInfo />
|
<NoteInfo />
|
||||||
</div>
|
</div>
|
||||||
<div class="workbench-col">上右</div>
|
<div class="workbench-col">
|
||||||
|
上右
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="workbench-row">
|
<div class="workbench-row">
|
||||||
<div class="workbench-col">中左</div>
|
<div class="workbench-col">下左</div>
|
||||||
<div class="workbench-col">中右</div>
|
<div class="workbench-col">下右</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -46,11 +48,11 @@
|
|||||||
.jeesite-workbench .workbench-layout {
|
.jeesite-workbench .workbench-layout {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 12px;
|
gap: 8px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 2px;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -60,7 +62,7 @@
|
|||||||
.jeesite-workbench .workbench-row {
|
.jeesite-workbench .workbench-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1 1 0;
|
flex: 1 1 0;
|
||||||
gap: 12px;
|
gap: 8px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,14 +52,28 @@ export interface ChartDataItem extends BasicModel<ChartDataItem> {
|
|||||||
indexMin: number; // 指标最小
|
indexMin: number; // 指标最小
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface ScreenTop extends BasicModel<ScreenTop> {
|
||||||
|
module: string; // 模块名称
|
||||||
|
title: string; // 说明描述
|
||||||
|
label?: string; // 名称
|
||||||
|
value?: number; // 数值
|
||||||
|
iconImg: string; // 图片路径
|
||||||
|
iconFilter?: string; // 图标颜色
|
||||||
|
sort: number; // 序号
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ErpChartTop = (params?: ErpTransactionFlow | any) =>
|
||||||
|
defHttp.get<ScreenTop[]>({ url: adminPath + '/erp/screen/getErpChartTop', params });
|
||||||
|
|
||||||
export const ErpYearChart = (params?: ErpTransactionFlow | any) =>
|
export const ErpYearChart = (params?: ErpTransactionFlow | any) =>
|
||||||
defHttp.get<ChartDataItem[]>({ url: adminPath + '/erp/screen/getErpYearChart', params });
|
defHttp.get<ChartDataItem[]>({ url: adminPath + '/erp/screen/getErpYearChart', params });
|
||||||
|
|
||||||
export const ErpMonthChart = (params?: ErpTransactionFlow | any) =>
|
export const ErpMonthChart = (params?: ErpTransactionFlow | any) =>
|
||||||
defHttp.get<ChartDataItem[]>({ url: adminPath + '/erp/screen/getErpMonthChart', params });
|
defHttp.get<ChartDataItem[]>({ url: adminPath + '/erp/screen/getErpMonthChart', params });
|
||||||
|
|
||||||
export const CategoryChart = (params?: ErpTransactionFlow | any) =>
|
export const ErpCategoryChart = (params?: ErpTransactionFlow | any) =>
|
||||||
defHttp.get<ChartDataItem[]>({ url: adminPath + '/erp/screen/getCategoryChart', params });
|
defHttp.get<ChartDataItem[]>({ url: adminPath + '/erp/screen/getErpCategoryChart', params });
|
||||||
|
|
||||||
export const ErpAccountChart = (params?: ErpTransactionFlow | any) =>
|
export const ErpAccountChart = (params?: ErpTransactionFlow | any) =>
|
||||||
defHttp.get<ChartDataItem[]>({ url: adminPath + '/erp/screen/getErpAccountChart', params });
|
defHttp.get<ChartDataItem[]>({ url: adminPath + '/erp/screen/getErpAccountChart', params });
|
||||||
|
|||||||
Reference in New Issue
Block a user