完成swing版消息中心功能开发
BIN
.image/swing/我的消息1.png
Normal file
After Width: | Height: | Size: 215 KiB |
BIN
.image/swing/我的消息2.png
Normal file
After Width: | Height: | Size: 303 KiB |
BIN
.image/swing/我的消息3.png
Normal file
After Width: | Height: | Size: 650 KiB |
BIN
.image/swing/消息模板1.png
Normal file
After Width: | Height: | Size: 154 KiB |
BIN
.image/swing/消息模板2.png
Normal file
After Width: | Height: | Size: 180 KiB |
BIN
.image/swing/消息模板3.png
Normal file
After Width: | Height: | Size: 519 KiB |
BIN
.image/swing/消息记录1.png
Normal file
After Width: | Height: | Size: 358 KiB |
BIN
.image/swing/消息记录2.png
Normal file
After Width: | Height: | Size: 456 KiB |
BIN
.image/swing/消息记录3.png
Normal file
After Width: | Height: | Size: 834 KiB |
@ -158,6 +158,9 @@ HTTP库:使用 OpenFeign HTTP库,该库提供了方便的 HTTP 请求和响
|
||||
| 字典管理 |  |  |  |
|
||||
| 字典数据 |  |  |  |
|
||||
| 通知公告 |  |  |  |
|
||||
| 消息模板 |  |  |  |
|
||||
| 消息记录 |  |  |  |
|
||||
| 我的消息 |  |  |  |
|
||||
| 操作日志 |  |  |  |
|
||||
| 登录日志 |  |  |  |
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
<xercesImpl.version>2.12.2</xercesImpl.version>
|
||||
<weixin-java.version>4.6.0</weixin-java.version>
|
||||
<!-- flatlaf -->
|
||||
<flatlaf.version>3.4.1</flatlaf.version>
|
||||
<flatlaf.version>3.5</flatlaf.version>
|
||||
<!-- jfreechart -->
|
||||
<jfreechart.version>1.5.3</jfreechart.version>
|
||||
<!-- pinyin4j -->
|
||||
|
@ -27,8 +27,6 @@ public class NotifyTemplateViewModel implements ViewModel, SceneLifecycle {
|
||||
|
||||
private ObjectProperty<ObservableList<NotifyTemplateRespVO>> tableItems = new SimpleObjectProperty<>();
|
||||
|
||||
private ObjectProperty<LocalDate> beginDate = new SimpleObjectProperty<>();
|
||||
private ObjectProperty<LocalDate> endDate = new SimpleObjectProperty<>();
|
||||
private ObjectProperty<Integer> status = new SimpleObjectProperty<>();
|
||||
private ObjectProperty<String> name = new SimpleObjectProperty<>();
|
||||
private ObjectProperty<String> code = new SimpleObjectProperty<>();
|
||||
@ -45,14 +43,9 @@ public class NotifyTemplateViewModel implements ViewModel, SceneLifecycle {
|
||||
queryMap.put("pageNo", pageNum.get() + 1);
|
||||
queryMap.put("pageSize", pageSize.get());
|
||||
|
||||
// queryMap.put("code", code.get());
|
||||
// queryMap.put("name", name.get());
|
||||
// queryMap.put("status", status.get());
|
||||
if (ObjectUtil.isAllNotEmpty(getBeginDate(), getEndDate())) {
|
||||
String sd = getBeginDate().atTime(0, 0, 0).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
String ed = getEndDate().atTime(23, 59, 59).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
queryMap.put("createTime", new String[]{sd, ed});
|
||||
}
|
||||
queryMap.put("code", code.get());
|
||||
queryMap.put("name", name.get());
|
||||
queryMap.put("status", status.get());
|
||||
|
||||
ProcessChain.create()
|
||||
.addSupplierInExecutor(() -> Request.connector(NotifyTemplateFeign.class).getNotifyTemplatePage(queryMap))
|
||||
@ -87,21 +80,7 @@ public class NotifyTemplateViewModel implements ViewModel, SceneLifecycle {
|
||||
return tableItems.get();
|
||||
}
|
||||
|
||||
public LocalDate getBeginDate() {
|
||||
return beginDate.get();
|
||||
}
|
||||
|
||||
public ObjectProperty<LocalDate> beginDateProperty() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public LocalDate getEndDate() {
|
||||
return endDate.get();
|
||||
}
|
||||
|
||||
public ObjectProperty<LocalDate> endDateProperty() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name.get();
|
||||
|
@ -0,0 +1,64 @@
|
||||
package com.lw.swing.components.table.renderer;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.JTableHeader;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
import javax.swing.table.TableModel;
|
||||
import java.awt.*;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
|
||||
public class CheckHeaderCellRenderer implements TableCellRenderer {
|
||||
TableModel tableModel;
|
||||
JTableHeader tableHeader;
|
||||
final JCheckBox selectBox;
|
||||
|
||||
public CheckHeaderCellRenderer(JTable table) {
|
||||
this.tableModel = table.getModel();
|
||||
this.tableHeader = table.getTableHeader();
|
||||
selectBox = new JCheckBox(tableModel.getColumnName(0));
|
||||
selectBox.setSelected(false);
|
||||
tableHeader.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (e.getClickCount() > 0) {
|
||||
//获得选中列
|
||||
int selectColumn = tableHeader.columnAtPoint(e.getPoint());
|
||||
if (selectColumn == 0) {
|
||||
boolean value = !selectBox.isSelected();
|
||||
selectBox.setSelected(value);
|
||||
selectAllOrNull(value);
|
||||
tableHeader.repaint();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value,
|
||||
boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
// TODO Auto-generated method stub
|
||||
String valueStr = (String) value;
|
||||
JLabel label = new JLabel(valueStr);
|
||||
label.setHorizontalAlignment(SwingConstants.CENTER); // 表头标签剧中
|
||||
selectBox.setHorizontalAlignment(SwingConstants.CENTER);// 表头标签剧中
|
||||
selectBox.setBorderPainted(true);
|
||||
JComponent component = (column == 0) ? selectBox : label;
|
||||
|
||||
component.setForeground(tableHeader.getForeground());
|
||||
component.setBackground(tableHeader.getBackground());
|
||||
component.setFont(tableHeader.getFont());
|
||||
component.setBorder(UIManager.getBorder("TableHeader.cellBorder"));
|
||||
|
||||
return component;
|
||||
}
|
||||
|
||||
|
||||
public void selectAllOrNull(boolean value) {
|
||||
for (int i = 0; i < tableModel.getRowCount(); i++) {
|
||||
tableModel.setValueAt(value, i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -157,6 +157,16 @@ public class AppStore {
|
||||
return dictDataListMap.get(dictType.getType());
|
||||
}
|
||||
|
||||
public static Map<String, DictDataSimpleRespVO> getDictDataValueMap(DictTypeEnum dictType) {
|
||||
List<DictDataSimpleRespVO> dictDataSimpleRespVOList = dictDataListMap.get(dictType.getType());
|
||||
|
||||
// 将 List 转换为 Map,使用 id 作为键
|
||||
Map<String, DictDataSimpleRespVO> reultMap = dictDataSimpleRespVOList.stream()
|
||||
.collect(Collectors.toMap(DictDataSimpleRespVO::getValue, item -> item));
|
||||
|
||||
return reultMap;
|
||||
}
|
||||
|
||||
public static Map<String, DictDataSimpleRespVO> getDictDataMap(DictTypeEnum dictType) {
|
||||
List<DictDataSimpleRespVO> dictDataSimpleRespVOList = dictDataListMap.get(dictType.getType());
|
||||
|
||||
|
@ -0,0 +1,37 @@
|
||||
package com.lw.swing.utils;
|
||||
|
||||
import com.formdev.flatlaf.FlatClientProperties;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.dict.vo.data.DictDataSimpleRespVO;
|
||||
import com.lw.swing.store.AppStore;
|
||||
import com.lw.ui.utils.DictTypeEnum;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class BadgeLabelUtil {
|
||||
|
||||
public static JLabel getBadgeLabel(DictTypeEnum dictType, Object dictDataValue) {
|
||||
DictDataSimpleRespVO dict = AppStore.getDictDataValueMap(dictType).get(dictDataValue + "");
|
||||
JLabel redBadge = new JLabel(dict.getLabel());
|
||||
switch (dict.getColorType()) {
|
||||
case "primary":
|
||||
redBadge.putClientProperty(FlatClientProperties.STYLE_CLASS, "primary");
|
||||
break;
|
||||
case "success":
|
||||
redBadge.putClientProperty(FlatClientProperties.STYLE_CLASS, "success");
|
||||
break;
|
||||
case "info":
|
||||
redBadge.putClientProperty(FlatClientProperties.STYLE_CLASS, "info");
|
||||
break;
|
||||
case "warning":
|
||||
redBadge.putClientProperty(FlatClientProperties.STYLE_CLASS, "warning");
|
||||
break;
|
||||
case "danger":
|
||||
redBadge.putClientProperty(FlatClientProperties.STYLE_CLASS, "danger");
|
||||
break;
|
||||
default:
|
||||
redBadge.putClientProperty(FlatClientProperties.STYLE_CLASS, "info");
|
||||
}
|
||||
return redBadge;
|
||||
|
||||
}
|
||||
}
|
@ -18,6 +18,7 @@ import com.lw.swing.theme.DarkTheme;
|
||||
import com.lw.swing.theme.GlazzedTheme;
|
||||
import com.lw.swing.theme.LightTheme;
|
||||
import com.lw.swing.utils.IconLoader;
|
||||
import com.lw.swing.view.system.notice.MyNotifyMessagePane;
|
||||
import com.lw.swing.view.system.user.PersonalCenterPanel;
|
||||
import com.lw.swing.websocket.SSLWebSocketClient;
|
||||
import com.lw.ui.request.api.system.AuthFeign;
|
||||
@ -57,6 +58,7 @@ public class MainFrame extends JFrame {
|
||||
private JToolBar tabTrailingBar;
|
||||
private JButton themeBut;
|
||||
private JButton refreshBut;
|
||||
private JButton noticeBut;
|
||||
|
||||
|
||||
private MainFrame() {
|
||||
@ -286,11 +288,36 @@ public class MainFrame extends JFrame {
|
||||
titleMenuBar.add(Box.createGlue());
|
||||
// right
|
||||
titleMenuBar.add(getThemeBut());
|
||||
titleMenuBar.add(getNoticeBut());
|
||||
titleMenuBar.add(getUserBut());
|
||||
}
|
||||
return titleMenuBar;
|
||||
}
|
||||
|
||||
public JButton getNoticeBut() {
|
||||
if (noticeBut == null) {
|
||||
noticeBut = new JButton();
|
||||
noticeBut.setIcon( new FlatSVGIcon("icons/bell.svg", 25, 25));
|
||||
noticeBut.putClientProperty("JButton.buttonType", "toolBarButton");
|
||||
noticeBut.setFocusable(false);
|
||||
noticeBut.addActionListener(e -> {
|
||||
int tabIndex = MainFrame.getInstance().getTabbedPane().indexOfTab("我的消息");
|
||||
MyNotifyMessagePane myNotifyMessagePane;
|
||||
if (tabIndex == -1) {
|
||||
myNotifyMessagePane = new MyNotifyMessagePane();
|
||||
MainFrame.getInstance().getTabbedPane().addTab("我的消息",new FlatSVGIcon("icons/bell.svg", 25, 25), myNotifyMessagePane);
|
||||
} else {
|
||||
myNotifyMessagePane = (MyNotifyMessagePane) MainFrame.getInstance().getTabbedPane().getComponentAt(tabIndex);
|
||||
}
|
||||
MainFrame.getInstance().getTabbedPane().setSelectedIndex(MainFrame.getInstance().getTabbedPane().indexOfTab("我的消息"));
|
||||
myNotifyMessagePane.updateData();
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
return noticeBut;
|
||||
}
|
||||
|
||||
public JButton getThemeBut() {
|
||||
if (themeBut == null) {
|
||||
|
||||
|
@ -12,11 +12,14 @@ import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import com.lw.dillon.admin.framework.common.pojo.CommonResult;
|
||||
import com.lw.dillon.admin.framework.common.pojo.PageResult;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.logger.vo.loginlog.LoginLogRespVO;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.notify.vo.message.NotifyMessageRespVO;
|
||||
import com.lw.swing.components.*;
|
||||
import com.lw.swing.components.table.renderer.OptButtonTableCellEditor;
|
||||
import com.lw.swing.components.table.renderer.OptButtonTableCellRenderer;
|
||||
import com.lw.swing.request.Request;
|
||||
import com.lw.swing.utils.BadgeLabelUtil;
|
||||
import com.lw.ui.request.api.system.LoginLogFeign;
|
||||
import com.lw.ui.utils.DictTypeEnum;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.jdesktop.swingx.JXTable;
|
||||
|
||||
@ -29,8 +32,8 @@ import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import static javax.swing.JOptionPane.OK_CANCEL_OPTION;
|
||||
import static javax.swing.JOptionPane.WARNING_MESSAGE;
|
||||
import static com.lw.ui.utils.DictTypeEnum.*;
|
||||
import static javax.swing.JOptionPane.*;
|
||||
|
||||
/**
|
||||
* @author wenli
|
||||
@ -173,6 +176,7 @@ public class LoginlogManagementPanel extends JPanel {
|
||||
table.setDefaultRenderer(Object.class, new CenterTableCellRenderer());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUI() {
|
||||
super.updateUI();
|
||||
@ -180,14 +184,21 @@ public class LoginlogManagementPanel extends JPanel {
|
||||
table.setDefaultRenderer(Object.class, new CenterTableCellRenderer());
|
||||
}
|
||||
}
|
||||
|
||||
private JToolBar creatBar() {
|
||||
JToolBar optBar = new JToolBar();
|
||||
optBar.setOpaque(false);
|
||||
JButton viewBut = new JButton("详情");
|
||||
viewBut.setForeground(UIManager.getColor("App.accentColor"));
|
||||
viewBut.setIcon(new FlatSVGIcon("icons/chakan.svg", 15, 15));
|
||||
viewBut.addActionListener(e -> showDetailsDialog());
|
||||
|
||||
JButton del = new JButton("删除");
|
||||
del.setIcon(new FlatSVGIcon("icons/delte.svg", 15, 15));
|
||||
del.addActionListener(e -> delMenu());
|
||||
del.setForeground(UIManager.getColor("app-error-color-5"));
|
||||
optBar.add(Box.createGlue());
|
||||
optBar.add(viewBut);
|
||||
optBar.add(del);
|
||||
optBar.add(Box.createGlue());
|
||||
return optBar;
|
||||
@ -201,6 +212,54 @@ public class LoginlogManagementPanel extends JPanel {
|
||||
clearBut.addActionListener(e -> clearLoginLog());
|
||||
}
|
||||
|
||||
private void showDetailsDialog() {
|
||||
|
||||
|
||||
int selRow = table.getSelectedRow();
|
||||
LoginLogRespVO logRespVO = null;
|
||||
if (selRow != -1) {
|
||||
logRespVO = (LoginLogRespVO) table.getValueAt(selRow, COLUMN_ID.length - 1);
|
||||
}
|
||||
|
||||
JPanel panel = new JPanel();
|
||||
panel.setLayout(new MigLayout(
|
||||
"fill,insets 0,hidemode 3",
|
||||
// columns
|
||||
"[fill][grow,fill]",
|
||||
// rows
|
||||
"[][][][][][][]"));
|
||||
panel.setPreferredSize(new Dimension(450, 300));
|
||||
addMessageInfo("日志编号", logRespVO.getId(), panel, 0);
|
||||
addMessageInfo("操作类型", SYSTEM_LOGIN_TYPE, logRespVO.getLogType(), panel, 1);
|
||||
addMessageInfo("用户名称", logRespVO.getUsername(), panel, 2);
|
||||
addMessageInfo("登录地址", logRespVO.getUserIp(), panel, 3);
|
||||
addMessageInfo("浏览器", logRespVO.getUserAgent(), panel, 4);
|
||||
addMessageInfo("登陆结果", SYSTEM_LOGIN_RESULT, logRespVO.getResult(), panel, 5);
|
||||
addMessageInfo("登录日期", DateUtil.format(logRespVO.getCreateTime(), "yyyy-MM-dd HH:mm:ss"), panel, 6);
|
||||
WOptionPane.showOptionDialog(null, panel, "详情", OK_CANCEL_OPTION, PLAIN_MESSAGE, null, new Object[]{"确定", "取消"}, "确定");
|
||||
|
||||
}
|
||||
|
||||
private void addMessageInfo(String text, Object value, JPanel panel, int row) {
|
||||
JLabel label = new JLabel(text);
|
||||
JTextField textField = new JTextField(Convert.toStr(value));
|
||||
textField.setEditable(false);
|
||||
|
||||
panel.add(label, "cell 0 " + row);
|
||||
panel.add(textField, "cell 1 " + row);
|
||||
}
|
||||
|
||||
private void addMessageInfo(String text, DictTypeEnum dictType, Object value, JPanel panel, int row) {
|
||||
|
||||
|
||||
JLabel label = new JLabel(text);
|
||||
JLabel badge = BadgeLabelUtil.getBadgeLabel(dictType, value);
|
||||
|
||||
|
||||
panel.add(label, "cell 0 " + row);
|
||||
panel.add(badge, "cell 1 " + row + ",alignx left,growx 0");
|
||||
}
|
||||
|
||||
private void reset() {
|
||||
nameTextField.setText("");
|
||||
ipTextField.setText("");
|
||||
@ -348,13 +407,21 @@ public class LoginlogManagementPanel extends JPanel {
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 10));
|
||||
JLabel label = new JLabel(ObjectUtil.equals(value, 0) ? "成功" : "失败");
|
||||
label.setForeground(ObjectUtil.equals(value, 0) ? new Color(96, 197, 104) : new Color(0xf56c6c));
|
||||
FlatSVGIcon icon = new FlatSVGIcon("icons/yuan.svg", 10, 10);
|
||||
icon.setColorFilter(new FlatSVGIcon.ColorFilter(color -> {
|
||||
return label.getForeground();
|
||||
}));
|
||||
label.setIcon(icon);
|
||||
JLabel label = BadgeLabelUtil.getBadgeLabel(SYSTEM_LOGIN_RESULT, value);
|
||||
|
||||
panel.add(label);
|
||||
panel.setBackground(component.getBackground());
|
||||
panel.setOpaque(isSelected);
|
||||
return panel;
|
||||
}
|
||||
});
|
||||
table.getColumn("操作类型").setCellRenderer(new DefaultTableCellRenderer() {
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 10));
|
||||
JLabel label = BadgeLabelUtil.getBadgeLabel(SYSTEM_LOGIN_TYPE, value);
|
||||
|
||||
panel.add(label);
|
||||
panel.setBackground(component.getBackground());
|
||||
panel.setOpaque(isSelected);
|
||||
|
@ -12,11 +12,14 @@ import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import com.lw.dillon.admin.framework.common.pojo.CommonResult;
|
||||
import com.lw.dillon.admin.framework.common.pojo.PageResult;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.logger.vo.operatelog.OperateLogRespVO;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.notify.vo.message.NotifyMessageRespVO;
|
||||
import com.lw.swing.components.*;
|
||||
import com.lw.swing.components.table.renderer.OptButtonTableCellEditor;
|
||||
import com.lw.swing.components.table.renderer.OptButtonTableCellRenderer;
|
||||
import com.lw.swing.request.Request;
|
||||
import com.lw.swing.utils.BadgeLabelUtil;
|
||||
import com.lw.ui.request.api.system.OperateLogFeign;
|
||||
import com.lw.ui.utils.DictTypeEnum;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.jdesktop.swingx.JXTable;
|
||||
|
||||
@ -27,11 +30,10 @@ import javax.swing.table.DefaultTableModel;
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import static javax.swing.JOptionPane.OK_CANCEL_OPTION;
|
||||
import static javax.swing.JOptionPane.WARNING_MESSAGE;
|
||||
import static com.lw.ui.utils.DictTypeEnum.*;
|
||||
import static javax.swing.JOptionPane.*;
|
||||
|
||||
/**
|
||||
* @author wenli
|
||||
@ -193,12 +195,20 @@ public class OperatelogManagementPanel extends JPanel {
|
||||
JToolBar optBar = new JToolBar();
|
||||
optBar.setOpaque(false);
|
||||
|
||||
|
||||
JButton viewBut = new JButton("详情");
|
||||
viewBut.setForeground(UIManager.getColor("App.accentColor"));
|
||||
|
||||
viewBut.setIcon(new FlatSVGIcon("icons/chakan.svg", 15, 15));
|
||||
viewBut.addActionListener(e -> showDetailsDialog());
|
||||
|
||||
JButton del = new JButton("删除");
|
||||
del.setIcon(new FlatSVGIcon("icons/delte.svg", 15, 15));
|
||||
del.addActionListener(e -> del());
|
||||
del.setForeground(UIManager.getColor("app-error-color-5"));
|
||||
|
||||
optBar.add(Box.createGlue());
|
||||
optBar.add(viewBut);
|
||||
optBar.add(del);
|
||||
optBar.add(Box.createGlue());
|
||||
return optBar;
|
||||
@ -212,6 +222,61 @@ public class OperatelogManagementPanel extends JPanel {
|
||||
clearBut.addActionListener(e -> clear());
|
||||
}
|
||||
|
||||
|
||||
private void showDetailsDialog() {
|
||||
|
||||
|
||||
int selRow = table.getSelectedRow();
|
||||
OperateLogRespVO logRespVO = null;
|
||||
if (selRow != -1) {
|
||||
logRespVO = (OperateLogRespVO) table.getValueAt(selRow, COLUMN_ID.length - 1);
|
||||
}
|
||||
|
||||
JPanel panel = new JPanel();
|
||||
panel.setLayout(new MigLayout(
|
||||
"fill,insets 0,hidemode 3",
|
||||
// columns
|
||||
"[fill][grow,fill]",
|
||||
// rows
|
||||
"[][][][][][][][][][][][][]"));
|
||||
panel.setPreferredSize(new Dimension(450,600));
|
||||
addMessageInfo("日志主键", logRespVO.getId(), panel, 0);
|
||||
addMessageInfo("链路追踪",logRespVO.getTraceId(), panel, 1);
|
||||
addMessageInfo("操作人编号", logRespVO.getUserId(), panel, 2);
|
||||
addMessageInfo("操作人名字", logRespVO.getUserName(), panel, 3);
|
||||
addMessageInfo("操作人 IP", logRespVO.getUserIp(), panel, 4);
|
||||
addMessageInfo("操作人 UA", logRespVO.getUserAgent(), panel, 5);
|
||||
addMessageInfo("操作模块", logRespVO.getType(), panel, 6);
|
||||
addMessageInfo("操作名", logRespVO.getSubType(), panel, 7);
|
||||
addMessageInfoArea("操作内容",logRespVO.getAction(), panel, 8);
|
||||
addMessageInfo("操作拓展参数", logRespVO.getExtra(), panel, 9);
|
||||
addMessageInfo("请求 URL", logRespVO.getRequestMethod()+" "+logRespVO.getRequestUrl(), panel, 10);
|
||||
addMessageInfo("操作时间", DateUtil.format(logRespVO.getCreateTime(), "yyyy-MM-dd HH:mm:ss"), panel, 11);
|
||||
addMessageInfo("业务编号", logRespVO.getBizId(), panel, 12);
|
||||
WOptionPane.showOptionDialog(null, panel, "详情", OK_CANCEL_OPTION, PLAIN_MESSAGE, null, new Object[]{"确定", "取消"}, "确定");
|
||||
|
||||
}
|
||||
|
||||
private void addMessageInfo(String text, Object value, JPanel panel, int row) {
|
||||
JLabel label = new JLabel(text);
|
||||
JTextField textField = new JTextField(Convert.toStr(value));
|
||||
textField.setEditable(false);
|
||||
|
||||
panel.add(label, "cell 0 " + row);
|
||||
panel.add(textField, "cell 1 " + row);
|
||||
}
|
||||
|
||||
private void addMessageInfoArea(String text, Object value, JPanel panel, int row) {
|
||||
|
||||
|
||||
JLabel label = new JLabel(text);
|
||||
JTextArea textField = new JTextArea(value+"");
|
||||
textField.setEditable(false);
|
||||
textField.setLineWrap(true);
|
||||
|
||||
panel.add(label, "cell 0 " + row);
|
||||
panel.add(new JScrollPane(textField), "cell 1 " + row+",grow");
|
||||
}
|
||||
private void reset() {
|
||||
userNameTextField.setText("");
|
||||
typeTextField.setText("");
|
||||
@ -366,24 +431,7 @@ public class OperatelogManagementPanel extends JPanel {
|
||||
table.getColumn("操作").setCellRenderer(new OptButtonTableCellRenderer(creatBar()));
|
||||
table.getColumn("操作").setCellEditor(new OptButtonTableCellEditor(creatBar()));
|
||||
|
||||
table.getColumn("状态").setCellRenderer(new DefaultTableCellRenderer() {
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 10));
|
||||
JLabel label = new JLabel(ObjectUtil.equals(value, 0) ? "开启" : "停用");
|
||||
label.setForeground(ObjectUtil.equals(value, 0) ? new Color(96, 197, 104) : new Color(0xf56c6c));
|
||||
FlatSVGIcon icon = new FlatSVGIcon("icons/yuan.svg", 10, 10);
|
||||
icon.setColorFilter(new FlatSVGIcon.ColorFilter(color -> {
|
||||
return label.getForeground();
|
||||
}));
|
||||
label.setIcon(icon);
|
||||
panel.add(label);
|
||||
panel.setBackground(component.getBackground());
|
||||
panel.setOpaque(isSelected);
|
||||
return panel;
|
||||
}
|
||||
});
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
|
@ -0,0 +1,468 @@
|
||||
/*
|
||||
* Created by JFormDesigner on Thu Jun 13 19:52:21 CST 2024
|
||||
*/
|
||||
|
||||
package com.lw.swing.view.system.notice;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import com.lw.dillon.admin.framework.common.pojo.CommonResult;
|
||||
import com.lw.dillon.admin.framework.common.pojo.PageResult;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.dict.vo.data.DictDataSimpleRespVO;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.notify.vo.message.NotifyMessageRespVO;
|
||||
import com.lw.swing.components.*;
|
||||
import com.lw.swing.components.notice.WMessage;
|
||||
import com.lw.swing.components.table.renderer.CheckHeaderCellRenderer;
|
||||
import com.lw.swing.components.table.renderer.OptButtonTableCellEditor;
|
||||
import com.lw.swing.components.table.renderer.OptButtonTableCellRenderer;
|
||||
import com.lw.swing.request.Request;
|
||||
import com.lw.swing.utils.BadgeLabelUtil;
|
||||
import com.lw.swing.view.MainFrame;
|
||||
import com.lw.ui.request.api.system.NotifyMessageFeign;
|
||||
import com.lw.ui.utils.DictTypeEnum;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.jdesktop.swingx.JXTable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import static com.lw.ui.utils.DictTypeEnum.INFRA_BOOLEAN_STRING;
|
||||
import static com.lw.ui.utils.DictTypeEnum.SYSTEM_NOTIFY_TEMPLATE_TYPE;
|
||||
import static javax.swing.JOptionPane.*;
|
||||
|
||||
/**
|
||||
* @author wenli
|
||||
*/
|
||||
public class MyNotifyMessagePane extends JPanel {
|
||||
private String[] COLUMN_ID = {"", "发送人", "发送时间", "类型", "消息内容", "是否已读", "阅读时间", "操作"};
|
||||
|
||||
private DefaultTableModel tableModel;
|
||||
|
||||
private WPaginationPane paginationPane;
|
||||
|
||||
public MyNotifyMessagePane() {
|
||||
initComponents();
|
||||
initListeners();
|
||||
updateData();
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
textField = new JTextField();
|
||||
scrollPane1 = new WScrollPane();
|
||||
centerPane = new JPanel();
|
||||
scrollPane2 = new WScrollPane();
|
||||
table = new JXTable(tableModel = new DefaultTableModel()) {
|
||||
@Override
|
||||
public Class<?> getColumnClass(int columnIndex) {
|
||||
if (columnIndex == 0) {
|
||||
return Boolean.class;
|
||||
}
|
||||
return super.getColumnClass(columnIndex);
|
||||
}
|
||||
};
|
||||
toolPane = new WPanel();
|
||||
label7 = new JLabel();
|
||||
readStatusComboBox = new JComboBox();
|
||||
label10 = new JLabel();
|
||||
startDateTextField = new WLocalDateCombo();
|
||||
label11 = new JLabel();
|
||||
endDateTextField = new WLocalDateCombo();
|
||||
searchBut = new JButton();
|
||||
reseBut = new JButton();
|
||||
readingBut = new JButton();
|
||||
readingAllBut = new JButton();
|
||||
|
||||
//======== this ========
|
||||
setOpaque(false);
|
||||
setLayout(new BorderLayout(10, 10));
|
||||
|
||||
|
||||
//======== centerPane ========
|
||||
{
|
||||
centerPane.setOpaque(false);
|
||||
centerPane.setLayout(new BorderLayout(10, 10));
|
||||
|
||||
//======== scrollPane2 ========
|
||||
{
|
||||
tableModel.setColumnIdentifiers(COLUMN_ID);
|
||||
scrollPane2.setViewportView(table);
|
||||
}
|
||||
|
||||
JPanel panel = new WPanel();
|
||||
panel.setLayout(new BorderLayout());
|
||||
panel.add(scrollPane2);
|
||||
paginationPane = new WPaginationPane() {
|
||||
@Override
|
||||
public void setPageIndex(long pageIndex) {
|
||||
super.setPageIndex(pageIndex);
|
||||
updateData();
|
||||
}
|
||||
};
|
||||
paginationPane.setOpaque(false);
|
||||
panel.add(paginationPane, BorderLayout.SOUTH);
|
||||
centerPane.add(panel, BorderLayout.CENTER);
|
||||
|
||||
//======== toolPane ========
|
||||
{
|
||||
toolPane.setLayout(new MigLayout(
|
||||
"fill,insets 0,hidemode 3",
|
||||
// columns
|
||||
"[left]",
|
||||
// rows
|
||||
"[]"));
|
||||
toolPane.setBorder(new EmptyBorder(10, 10, 10, 10));
|
||||
//---- label7 ----
|
||||
label7.setText("是否已读");
|
||||
toolPane.add(label7, "cell 0 0");
|
||||
|
||||
//---- userNameTextField ----
|
||||
toolPane.add(readStatusComboBox, "cell 0 0");
|
||||
|
||||
|
||||
//---- label10 ----
|
||||
label10.setText("创建时间");
|
||||
toolPane.add(label10, "cell 0 0");
|
||||
|
||||
//---- startDateTextField ----
|
||||
toolPane.add(startDateTextField, "cell 0 0");
|
||||
|
||||
//---- label11 ----
|
||||
label11.setText("-");
|
||||
toolPane.add(label11, "cell 0 0");
|
||||
|
||||
//---- endDateTextField ----
|
||||
toolPane.add(endDateTextField, "cell 0 0");
|
||||
|
||||
//---- button1 ----
|
||||
searchBut.setText("\u641c\u7d22");
|
||||
toolPane.add(searchBut, "cell 0 0");
|
||||
|
||||
//---- reseBut ----
|
||||
reseBut.setText("\u91cd\u7f6e");
|
||||
toolPane.add(reseBut, "cell 0 0");
|
||||
|
||||
//---- newBut ----
|
||||
readingBut.setText("标记已读");
|
||||
toolPane.add(readingBut, "cell 0 0");
|
||||
|
||||
readingAllBut.setText("全部已读");
|
||||
toolPane.add(readingAllBut, "cell 0 0");
|
||||
}
|
||||
centerPane.add(toolPane, BorderLayout.NORTH);
|
||||
}
|
||||
add(centerPane, BorderLayout.CENTER);
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
||||
table.setRowHeight(40);
|
||||
|
||||
|
||||
startDateTextField.setValue(null);
|
||||
endDateTextField.setValue(null);
|
||||
table.setDefaultRenderer(Object.class, new CenterTableCellRenderer());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUI() {
|
||||
super.updateUI();
|
||||
if (table != null) {
|
||||
table.setDefaultRenderer(Object.class, new CenterTableCellRenderer());
|
||||
}
|
||||
}
|
||||
|
||||
private JToolBar creatBar() {
|
||||
JToolBar optBar = new JToolBar();
|
||||
optBar.setOpaque(false);
|
||||
|
||||
JButton viewBut = new JButton("详情");
|
||||
viewBut.setForeground(UIManager.getColor("App.accentColor"));
|
||||
|
||||
viewBut.setIcon(new FlatSVGIcon("icons/chakan.svg", 15, 15));
|
||||
viewBut.addActionListener(e -> showDetailsDialog());
|
||||
|
||||
JButton del = new JButton("删除");
|
||||
del.setIcon(new FlatSVGIcon("icons/delte.svg", 15, 15));
|
||||
del.addActionListener(e -> del());
|
||||
del.setForeground(UIManager.getColor("app-error-color-5"));
|
||||
|
||||
optBar.add(Box.createGlue());
|
||||
optBar.add(viewBut);
|
||||
optBar.add(del);
|
||||
optBar.add(Box.createGlue());
|
||||
return optBar;
|
||||
|
||||
}
|
||||
|
||||
private void initListeners() {
|
||||
|
||||
reseBut.addActionListener(e -> reset());
|
||||
searchBut.addActionListener(e -> updateData());
|
||||
readingBut.addActionListener(e -> updateNotifyMessageRead());
|
||||
readingAllBut.addActionListener(e -> updateAllNotifyMessageRead());
|
||||
}
|
||||
|
||||
private void showDetailsDialog() {
|
||||
|
||||
|
||||
int selRow = table.getSelectedRow();
|
||||
NotifyMessageRespVO noticeRespVO = null;
|
||||
if (selRow != -1) {
|
||||
noticeRespVO = (NotifyMessageRespVO) table.getValueAt(selRow, COLUMN_ID.length - 1);
|
||||
}
|
||||
|
||||
JPanel panel = new JPanel();
|
||||
panel.setLayout(new MigLayout(
|
||||
"fill,insets 0,hidemode 3",
|
||||
// columns
|
||||
"[fill][grow,fill]",
|
||||
// rows
|
||||
"[][][][][][]"));
|
||||
panel.setPreferredSize(new Dimension(450, 400));
|
||||
addMessageInfo("发送人", noticeRespVO.getTemplateNickname(), panel, 0);
|
||||
addMessageInfo("发送时间", DateUtil.format(noticeRespVO.getCreateTime(), "yyyy-MM-dd HH:mm:ss"), panel, 1);
|
||||
addMessageInfo("消息类型", SYSTEM_NOTIFY_TEMPLATE_TYPE, noticeRespVO.getTemplateType(), panel, 2);
|
||||
addMessageInfo("是否已读", INFRA_BOOLEAN_STRING, noticeRespVO.getReadStatus(), panel, 3);
|
||||
addMessageInfo("阅读时间", DateUtil.format(noticeRespVO.getCreateTime(), "yyyy-MM-dd HH:mm:ss"), panel, 4);
|
||||
addMessageInfo("内容", noticeRespVO.getTemplateContent(), panel, 5);
|
||||
WOptionPane.showOptionDialog(null, panel, "详情", OK_CANCEL_OPTION, PLAIN_MESSAGE, null, new Object[]{"确定", "取消"}, "确定");
|
||||
|
||||
}
|
||||
|
||||
private void addMessageInfo(String text, Object value, JPanel panel, int row) {
|
||||
JLabel label = new JLabel(text);
|
||||
JTextField textField = new JTextField(Convert.toStr(value));
|
||||
textField.setEditable(false);
|
||||
|
||||
panel.add(label, "cell 0 " + row);
|
||||
panel.add(textField, "cell 1 " + row);
|
||||
}
|
||||
|
||||
private void addMessageInfo(String text, DictTypeEnum dictType, Object value, JPanel panel, int row) {
|
||||
|
||||
|
||||
JLabel label = new JLabel(text);
|
||||
JLabel badge = BadgeLabelUtil.getBadgeLabel(dictType, value);
|
||||
|
||||
|
||||
panel.add(label, "cell 0 " + row);
|
||||
panel.add(badge, "cell 1 " + row + ",alignx left,growx 0");
|
||||
}
|
||||
|
||||
private void reset() {
|
||||
readStatusComboBox.setSelectedItem(null);
|
||||
startDateTextField.setValue(null);
|
||||
endDateTextField.setValue(null);
|
||||
}
|
||||
|
||||
private void updateNotifyMessageRead() {
|
||||
|
||||
|
||||
List<Long> ids = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < tableModel.getRowCount(); i++) {
|
||||
Boolean b = (Boolean) tableModel.getValueAt(i, 0);
|
||||
if (b) {
|
||||
NotifyMessageRespVO notifyMessageRespVO = (NotifyMessageRespVO) tableModel.getValueAt(i, COLUMN_ID.length-1);
|
||||
|
||||
ids.add(notifyMessageRespVO.getId());
|
||||
}
|
||||
}
|
||||
|
||||
if (ids.isEmpty()) {
|
||||
WMessage.showMessageWarning(MainFrame.getInstance(), "请选择要删除的数据!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SwingWorker<CommonResult<Boolean>, Object> swingWorker = new SwingWorker<CommonResult<Boolean>, Object>() {
|
||||
@Override
|
||||
protected CommonResult<Boolean> doInBackground() throws Exception {
|
||||
return Request.connector(NotifyMessageFeign.class).updateNotifyMessageRead(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
if (get().isSuccess()) {
|
||||
WMessage.showMessageSuccess(MainFrame.getInstance(), "批量已读成功!");
|
||||
|
||||
updateData();
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
swingWorker.execute();
|
||||
|
||||
}
|
||||
|
||||
private void updateAllNotifyMessageRead() {
|
||||
|
||||
|
||||
SwingWorker<CommonResult<Boolean>, Object> swingWorker = new SwingWorker<CommonResult<Boolean>, Object>() {
|
||||
@Override
|
||||
protected CommonResult<Boolean> doInBackground() throws Exception {
|
||||
return Request.connector(NotifyMessageFeign.class).updateAllNotifyMessageRead();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
if (get().isSuccess()) {
|
||||
WMessage.showMessageSuccess(MainFrame.getInstance(), "全部已读成功!");
|
||||
|
||||
updateData();
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
swingWorker.execute();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void del() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void updateData() {
|
||||
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
queryMap.put("pageNo", paginationPane.getPageIndex());
|
||||
queryMap.put("pageSize", paginationPane.getPageSize());
|
||||
|
||||
|
||||
if (readStatusComboBox.getSelectedItem() != null) {
|
||||
DictDataSimpleRespVO simpleRespVO = (DictDataSimpleRespVO) readStatusComboBox.getSelectedItem();
|
||||
queryMap.put("readStatus", simpleRespVO.getValue());
|
||||
}
|
||||
|
||||
|
||||
if (ObjectUtil.isAllNotEmpty(startDateTextField.getValue(), endDateTextField.getValue())) {
|
||||
String[] dateTimes = new String[2];
|
||||
dateTimes[0] = DateUtil.format(startDateTextField.getValue().atTime(0, 0, 0), "yyyy-MM-dd HH:mm:ss");
|
||||
dateTimes[1] = DateUtil.format(endDateTextField.getValue().atTime(23, 59, 59), "yyyy-MM-dd HH:mm:ss");
|
||||
queryMap.put("createTime", dateTimes);
|
||||
}
|
||||
|
||||
|
||||
SwingWorker<Vector<Vector>, Long> swingWorker = new SwingWorker<Vector<Vector>, Long>() {
|
||||
@Override
|
||||
protected Vector<Vector> doInBackground() throws Exception {
|
||||
CommonResult<PageResult<NotifyMessageRespVO>> result = Request.connector(NotifyMessageFeign.class).getMyMyNotifyMessagePage(queryMap);
|
||||
|
||||
Vector<Vector> tableData = new Vector<>();
|
||||
|
||||
|
||||
if (result.isSuccess()) {
|
||||
|
||||
result.getData().getList().forEach(roleRespVO -> {
|
||||
Vector rowV = new Vector();
|
||||
rowV.add(false);
|
||||
rowV.add(roleRespVO.getTemplateNickname());
|
||||
rowV.add(DateUtil.format(roleRespVO.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
|
||||
rowV.add(roleRespVO.getTemplateType());
|
||||
rowV.add(roleRespVO.getTemplateContent());
|
||||
rowV.add(roleRespVO.getReadStatus());
|
||||
rowV.add(DateUtil.format(roleRespVO.getReadTime(), "yyyy-MM-dd HH:mm:ss"));
|
||||
rowV.add(roleRespVO);
|
||||
tableData.add(rowV);
|
||||
});
|
||||
|
||||
publish(result.getData().getTotal());
|
||||
}
|
||||
return tableData;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void process(List<Long> chunks) {
|
||||
chunks.forEach(total -> paginationPane.setTotal(total));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
|
||||
|
||||
tableModel.setDataVector(get(), new Vector<>(Arrays.asList(COLUMN_ID)));
|
||||
table.getColumn("").setMinWidth(40);
|
||||
table.getColumn("").setMaxWidth(40);
|
||||
table.getColumn("").setHeaderRenderer(new CheckHeaderCellRenderer(table));
|
||||
table.getColumn("操作").setCellRenderer(new OptButtonTableCellRenderer(creatBar()));
|
||||
table.getColumn("操作").setCellEditor(new OptButtonTableCellEditor(creatBar()));
|
||||
|
||||
table.getColumn("是否已读").setCellRenderer(new DefaultTableCellRenderer() {
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 10));
|
||||
JLabel label = BadgeLabelUtil.getBadgeLabel(INFRA_BOOLEAN_STRING, value);
|
||||
|
||||
panel.add(label);
|
||||
panel.setBackground(component.getBackground());
|
||||
panel.setOpaque(isSelected);
|
||||
return panel;
|
||||
}
|
||||
});
|
||||
table.getColumn("类型").setCellRenderer(new DefaultTableCellRenderer() {
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 10));
|
||||
JLabel label = BadgeLabelUtil.getBadgeLabel(SYSTEM_NOTIFY_TEMPLATE_TYPE, value);
|
||||
panel.add(label);
|
||||
panel.setBackground(component.getBackground());
|
||||
panel.setOpaque(isSelected);
|
||||
return panel;
|
||||
}
|
||||
});
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
swingWorker.execute();
|
||||
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||
// Generated using JFormDesigner non-commercial license
|
||||
private JTextField textField;
|
||||
private JScrollPane scrollPane1;
|
||||
private JPanel centerPane;
|
||||
private JScrollPane scrollPane2;
|
||||
private JTable table;
|
||||
private JPanel toolPane;
|
||||
private JLabel label7;
|
||||
private JComboBox readStatusComboBox;
|
||||
private JLabel label10;
|
||||
private WLocalDateCombo startDateTextField;
|
||||
private JLabel label11;
|
||||
private WLocalDateCombo endDateTextField;
|
||||
private JButton searchBut;
|
||||
private JButton reseBut;
|
||||
private JButton readingBut;
|
||||
private JButton readingAllBut;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||
}
|
@ -67,12 +67,12 @@ public class NoticeFormPane extends JPanel {
|
||||
//---- label2 ----
|
||||
label2.setText("*\u516c\u544a\u7c7b\u578b ");
|
||||
add(label2, "cell 0 1");
|
||||
add(typeComboBox, "cell 1 1");
|
||||
add(typeComboBox, "cell 1 1,alignx left,growx 0");
|
||||
|
||||
//---- label3 ----
|
||||
label3.setText("*\u72b6\u6001");
|
||||
add(label3, "cell 0 2");
|
||||
add(statusComboBox, "cell 1 2");
|
||||
add(statusComboBox, "cell 1 2,alignx left,growx 0");
|
||||
|
||||
//---- label4 ----
|
||||
label4.setText("*\u516c\u544a\u5185\u5bb9");
|
||||
|
@ -29,7 +29,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||
name: "typeComboBox"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 1"
|
||||
"value": "cell 1 1,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label3"
|
||||
@ -40,7 +40,7 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||
name: "statusComboBox"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 2"
|
||||
"value": "cell 1 2,alignx left,growx 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label4"
|
||||
|
@ -0,0 +1,450 @@
|
||||
/*
|
||||
* Created by JFormDesigner on Thu Jun 13 19:52:21 CST 2024
|
||||
*/
|
||||
|
||||
package com.lw.swing.view.system.notice;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import com.lw.dillon.admin.framework.common.pojo.CommonResult;
|
||||
import com.lw.dillon.admin.framework.common.pojo.PageResult;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.dict.vo.data.DictDataSimpleRespVO;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.notify.vo.message.NotifyMessageRespVO;
|
||||
import com.lw.swing.components.*;
|
||||
import com.lw.swing.components.table.renderer.OptButtonTableCellEditor;
|
||||
import com.lw.swing.components.table.renderer.OptButtonTableCellRenderer;
|
||||
import com.lw.swing.request.Request;
|
||||
import com.lw.swing.store.AppStore;
|
||||
import com.lw.swing.utils.BadgeLabelUtil;
|
||||
import com.lw.ui.request.api.system.NotifyMessageFeign;
|
||||
import com.lw.ui.request.api.system.OperateLogFeign;
|
||||
import com.lw.ui.utils.DictTypeEnum;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.jdesktop.swingx.JXTable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import static com.lw.ui.utils.DictTypeEnum.*;
|
||||
import static javax.swing.JOptionPane.*;
|
||||
|
||||
/**
|
||||
* @author wenli
|
||||
*/
|
||||
public class NotifyMessagePane extends JPanel {
|
||||
private String[] COLUMN_ID = {"编号", "用户类型", "用户编号", "模板编码", "发送人名称", "模版内容", "模版类型", "是否已读", "阅读时间", "创建时间", "操作"};
|
||||
|
||||
private DefaultTableModel tableModel;
|
||||
|
||||
private WPaginationPane paginationPane;
|
||||
|
||||
public NotifyMessagePane() {
|
||||
initComponents();
|
||||
initListeners();
|
||||
updateData();
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
centerPane = new JPanel();
|
||||
scrollPane2 = new WScrollPane();
|
||||
table = new JXTable(tableModel = new DefaultTableModel());
|
||||
toolPane = new WPanel();
|
||||
label7 = new JLabel();
|
||||
userIdTextField = new JTextField(10);
|
||||
label8 = new JLabel();
|
||||
userTypeComboBox = new JComboBox();
|
||||
label9 = new JLabel();
|
||||
templateCodeTextField = new JTextField(10);
|
||||
label10 = new JLabel();
|
||||
startDateTextField = new WLocalDateCombo();
|
||||
label11 = new JLabel();
|
||||
endDateTextField = new WLocalDateCombo();
|
||||
label12 = new JLabel();
|
||||
templateTypeComboBox = new JComboBox();
|
||||
searchBut = new JButton();
|
||||
reseBut = new JButton();
|
||||
clearBut = new JButton();
|
||||
|
||||
//======== this ========
|
||||
setOpaque(false);
|
||||
setLayout(new BorderLayout(10, 10));
|
||||
|
||||
|
||||
//======== centerPane ========
|
||||
{
|
||||
centerPane.setOpaque(false);
|
||||
centerPane.setLayout(new BorderLayout(10, 10));
|
||||
|
||||
//======== scrollPane2 ========
|
||||
{
|
||||
tableModel.setColumnIdentifiers(COLUMN_ID);
|
||||
scrollPane2.setViewportView(table);
|
||||
}
|
||||
|
||||
JPanel panel = new WPanel();
|
||||
panel.setLayout(new BorderLayout());
|
||||
panel.add(scrollPane2);
|
||||
paginationPane = new WPaginationPane() {
|
||||
@Override
|
||||
public void setPageIndex(long pageIndex) {
|
||||
super.setPageIndex(pageIndex);
|
||||
updateData();
|
||||
}
|
||||
};
|
||||
paginationPane.setOpaque(false);
|
||||
panel.add(paginationPane, BorderLayout.SOUTH);
|
||||
centerPane.add(panel, BorderLayout.CENTER);
|
||||
|
||||
//======== toolPane ========
|
||||
{
|
||||
toolPane.setLayout(new MigLayout(
|
||||
"fill,insets 0,hidemode 3",
|
||||
// columns
|
||||
"[left]",
|
||||
// rows
|
||||
"[]"));
|
||||
toolPane.setBorder(new EmptyBorder(10, 10, 10, 10));
|
||||
//---- label7 ----
|
||||
label7.setText("用户编号");
|
||||
toolPane.add(label7, "cell 0 0");
|
||||
|
||||
//---- userNameTextField ----
|
||||
toolPane.add(userIdTextField, "cell 0 0");
|
||||
|
||||
//---- label8 ----
|
||||
label8.setText("用户类型");
|
||||
toolPane.add(label8, "cell 0 0");
|
||||
|
||||
//---- phoneTextField ----
|
||||
toolPane.add(userTypeComboBox, "cell 0 0");
|
||||
|
||||
//---- label9 ----
|
||||
label9.setText("模板编码");
|
||||
toolPane.add(label9, "cell 0 0");
|
||||
toolPane.add(templateCodeTextField, "cell 0 0");
|
||||
|
||||
//---- label12----
|
||||
label12.setText("模版类型");
|
||||
toolPane.add(label12, "cell 0 0");
|
||||
toolPane.add(templateTypeComboBox, "cell 0 0");
|
||||
|
||||
//---- label10 ----
|
||||
label10.setText("创建时间");
|
||||
toolPane.add(label10, "cell 0 0");
|
||||
|
||||
//---- startDateTextField ----
|
||||
toolPane.add(startDateTextField, "cell 0 0");
|
||||
|
||||
//---- label11 ----
|
||||
label11.setText("-");
|
||||
toolPane.add(label11, "cell 0 0");
|
||||
|
||||
//---- endDateTextField ----
|
||||
toolPane.add(endDateTextField, "cell 0 0");
|
||||
|
||||
//---- button1 ----
|
||||
searchBut.setText("\u641c\u7d22");
|
||||
toolPane.add(searchBut, "cell 0 0");
|
||||
|
||||
//---- reseBut ----
|
||||
reseBut.setText("\u91cd\u7f6e");
|
||||
toolPane.add(reseBut, "cell 0 0");
|
||||
|
||||
//---- newBut ----
|
||||
clearBut.setText("清空");
|
||||
toolPane.add(clearBut, "cell 0 0");
|
||||
}
|
||||
centerPane.add(toolPane, BorderLayout.NORTH);
|
||||
}
|
||||
add(centerPane, BorderLayout.CENTER);
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
||||
table.setRowHeight(40);
|
||||
|
||||
|
||||
startDateTextField.setValue(null);
|
||||
endDateTextField.setValue(null);
|
||||
table.setDefaultRenderer(Object.class, new CenterTableCellRenderer());
|
||||
|
||||
|
||||
AppStore.getDictDataList(USER_TYPE).forEach(dictDataSimpleRespVO -> {
|
||||
userTypeComboBox.addItem(dictDataSimpleRespVO);
|
||||
});
|
||||
AppStore.getDictDataList(SYSTEM_NOTIFY_TEMPLATE_TYPE).forEach(dictDataSimpleRespVO -> {
|
||||
templateTypeComboBox.addItem(dictDataSimpleRespVO);
|
||||
});
|
||||
userTypeComboBox.setSelectedItem(null);
|
||||
templateTypeComboBox.setSelectedItem(null);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUI() {
|
||||
super.updateUI();
|
||||
if (table != null) {
|
||||
table.setDefaultRenderer(Object.class, new CenterTableCellRenderer());
|
||||
}
|
||||
}
|
||||
|
||||
private JToolBar creatBar() {
|
||||
JToolBar optBar = new JToolBar();
|
||||
optBar.setOpaque(false);
|
||||
|
||||
JButton viewBut = new JButton("详情");
|
||||
viewBut.setForeground(UIManager.getColor("App.accentColor"));
|
||||
|
||||
viewBut.setIcon(new FlatSVGIcon("icons/chakan.svg", 15, 15));
|
||||
viewBut.addActionListener(e -> showDetailsDialog());
|
||||
|
||||
|
||||
JButton del = new JButton("删除");
|
||||
del.setIcon(new FlatSVGIcon("icons/delte.svg", 15, 15));
|
||||
del.addActionListener(e -> del());
|
||||
del.setForeground(UIManager.getColor("app-error-color-5"));
|
||||
|
||||
optBar.add(Box.createGlue());
|
||||
optBar.add(viewBut);
|
||||
optBar.add(del);
|
||||
optBar.add(Box.createGlue());
|
||||
return optBar;
|
||||
|
||||
}
|
||||
|
||||
private void initListeners() {
|
||||
|
||||
reseBut.addActionListener(e -> reset());
|
||||
searchBut.addActionListener(e -> updateData());
|
||||
clearBut.addActionListener(e -> clear());
|
||||
}
|
||||
|
||||
private void reset() {
|
||||
userIdTextField.setText("");
|
||||
userTypeComboBox.setSelectedItem(null);
|
||||
templateTypeComboBox.setSelectedItem(null);
|
||||
templateCodeTextField.setText("");
|
||||
startDateTextField.setValue(null);
|
||||
endDateTextField.setValue(null);
|
||||
}
|
||||
|
||||
private void showDetailsDialog() {
|
||||
|
||||
|
||||
int selRow = table.getSelectedRow();
|
||||
NotifyMessageRespVO noticeRespVO = null;
|
||||
if (selRow != -1) {
|
||||
noticeRespVO = (NotifyMessageRespVO) table.getValueAt(selRow, COLUMN_ID.length - 1);
|
||||
}
|
||||
|
||||
JPanel panel = new JPanel();
|
||||
panel.setLayout(new MigLayout(
|
||||
"fill,insets 0,hidemode 3",
|
||||
// columns
|
||||
"[fill][grow,fill]",
|
||||
// rows
|
||||
"[][][][][][][][][][][][]"));
|
||||
panel.setPreferredSize(new Dimension(450,600));
|
||||
addMessageInfo("编号", noticeRespVO.getId(), panel, 0);
|
||||
addMessageInfo("用户类型", USER_TYPE,noticeRespVO.getUserType(), panel, 1);
|
||||
addMessageInfo("用户编号", noticeRespVO.getUserId(), panel, 2);
|
||||
addMessageInfo("模版编号", noticeRespVO.getTemplateId(), panel, 3);
|
||||
addMessageInfo("模板编码", noticeRespVO.getTemplateCode(), panel, 4);
|
||||
addMessageInfo("发送人名称", noticeRespVO.getTemplateNickname(), panel, 5);
|
||||
addMessageInfo("模版内容", noticeRespVO.getTemplateContent(), panel, 6);
|
||||
addMessageInfo("模版参数", noticeRespVO.getTemplateParams(), panel, 7);
|
||||
addMessageInfo("模版类型", SYSTEM_NOTIFY_TEMPLATE_TYPE,noticeRespVO.getTemplateType(), panel, 8);
|
||||
addMessageInfo("是否已读", INFRA_BOOLEAN_STRING,noticeRespVO.getReadStatus(), panel, 9);
|
||||
addMessageInfo("阅读时间", DateUtil.format(noticeRespVO.getReadTime(), "yyyy-MM-dd HH:mm:ss"), panel, 10);
|
||||
addMessageInfo("创建时间", DateUtil.format(noticeRespVO.getCreateTime(), "yyyy-MM-dd HH:mm:ss"), panel, 11);
|
||||
WOptionPane.showOptionDialog(null, panel, "详情", OK_CANCEL_OPTION, PLAIN_MESSAGE, null, new Object[]{"确定", "取消"}, "确定");
|
||||
|
||||
}
|
||||
|
||||
private void addMessageInfo(String text, Object value, JPanel panel, int row) {
|
||||
JLabel label = new JLabel(text);
|
||||
JTextField textField = new JTextField(Convert.toStr(value));
|
||||
textField.setEditable(false);
|
||||
|
||||
panel.add(label, "cell 0 " + row);
|
||||
panel.add(textField, "cell 1 " + row);
|
||||
}
|
||||
|
||||
private void addMessageInfo(String text, DictTypeEnum dictType, Object value, JPanel panel, int row) {
|
||||
|
||||
|
||||
JLabel label = new JLabel(text);
|
||||
JLabel badge = BadgeLabelUtil.getBadgeLabel(dictType,value);
|
||||
|
||||
|
||||
panel.add(label, "cell 0 " + row);
|
||||
panel.add(badge, "cell 1 " + row+",alignx left,growx 0");
|
||||
}
|
||||
|
||||
|
||||
private void clear() {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void del() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void updateData() {
|
||||
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
queryMap.put("pageNo", paginationPane.getPageIndex());
|
||||
queryMap.put("pageSize", paginationPane.getPageSize());
|
||||
|
||||
queryMap.put("userId", userIdTextField.getText());
|
||||
queryMap.put("templateCode", templateCodeTextField.getText());
|
||||
|
||||
if (userTypeComboBox.getSelectedItem() != null) {
|
||||
DictDataSimpleRespVO userTypeComboBoxSelectedItem = (DictDataSimpleRespVO) userTypeComboBox.getSelectedItem();
|
||||
queryMap.put("userType", userTypeComboBoxSelectedItem.getValue());
|
||||
}
|
||||
if (templateTypeComboBox.getSelectedItem() != null) {
|
||||
DictDataSimpleRespVO templateTypeComboBoxSelectedItem = (DictDataSimpleRespVO) templateTypeComboBox.getSelectedItem();
|
||||
|
||||
queryMap.put("templateType", templateTypeComboBoxSelectedItem.getValue());
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (ObjectUtil.isAllNotEmpty(startDateTextField.getValue(), endDateTextField.getValue())) {
|
||||
String[] dateTimes = new String[2];
|
||||
dateTimes[0] = DateUtil.format(startDateTextField.getValue().atTime(0, 0, 0), "yyyy-MM-dd HH:mm:ss");
|
||||
dateTimes[1] = DateUtil.format(endDateTextField.getValue().atTime(23, 59, 59), "yyyy-MM-dd HH:mm:ss");
|
||||
queryMap.put("createTime", dateTimes);
|
||||
}
|
||||
|
||||
|
||||
SwingWorker<Vector<Vector>, Long> swingWorker = new SwingWorker<Vector<Vector>, Long>() {
|
||||
@Override
|
||||
protected Vector<Vector> doInBackground() throws Exception {
|
||||
CommonResult<PageResult<NotifyMessageRespVO>> result = Request.connector(NotifyMessageFeign.class).getNotifyMessagePage(queryMap);
|
||||
|
||||
Vector<Vector> tableData = new Vector<>();
|
||||
|
||||
|
||||
if (result.isSuccess()) {
|
||||
|
||||
result.getData().getList().forEach(roleRespVO -> {
|
||||
Vector rowV = new Vector();
|
||||
rowV.add(roleRespVO.getId());
|
||||
rowV.add(roleRespVO.getUserType());
|
||||
rowV.add(roleRespVO.getUserId());
|
||||
rowV.add(roleRespVO.getTemplateCode());
|
||||
rowV.add(roleRespVO.getTemplateNickname());
|
||||
rowV.add(roleRespVO.getTemplateContent());
|
||||
rowV.add(roleRespVO.getTemplateType());
|
||||
rowV.add(roleRespVO.getReadStatus());
|
||||
rowV.add(DateUtil.format(roleRespVO.getReadTime(), "yyyy-MM-dd HH:mm:ss"));
|
||||
rowV.add(DateUtil.format(roleRespVO.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
|
||||
rowV.add(roleRespVO);
|
||||
tableData.add(rowV);
|
||||
});
|
||||
|
||||
publish(result.getData().getTotal());
|
||||
}
|
||||
return tableData;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void process(List<Long> chunks) {
|
||||
chunks.forEach(total -> paginationPane.setTotal(total));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
|
||||
|
||||
tableModel.setDataVector(get(), new Vector<>(Arrays.asList(COLUMN_ID)));
|
||||
table.getColumn("操作").setCellRenderer(new OptButtonTableCellRenderer(creatBar()));
|
||||
table.getColumn("操作").setCellEditor(new OptButtonTableCellEditor(creatBar()));
|
||||
|
||||
table.getColumn("是否已读").setCellRenderer(new DefaultTableCellRenderer() {
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 10));
|
||||
JLabel label = BadgeLabelUtil.getBadgeLabel(INFRA_BOOLEAN_STRING, value);
|
||||
panel.add(label);
|
||||
panel.setBackground(component.getBackground());
|
||||
panel.setOpaque(isSelected);
|
||||
return panel;
|
||||
}
|
||||
});
|
||||
|
||||
table.getColumn("用户类型").setCellRenderer(new DefaultTableCellRenderer() {
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 10));
|
||||
JLabel label = BadgeLabelUtil.getBadgeLabel(USER_TYPE, value);
|
||||
panel.add(label);
|
||||
panel.setBackground(component.getBackground());
|
||||
panel.setOpaque(isSelected);
|
||||
return panel;
|
||||
}
|
||||
});
|
||||
table.getColumn("模版类型").setCellRenderer(new DefaultTableCellRenderer() {
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 10));
|
||||
JLabel label = BadgeLabelUtil.getBadgeLabel(SYSTEM_NOTIFY_TEMPLATE_TYPE, value);
|
||||
panel.add(label);
|
||||
panel.setBackground(component.getBackground());
|
||||
panel.setOpaque(isSelected);
|
||||
return panel;
|
||||
}
|
||||
});
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
swingWorker.execute();
|
||||
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||
// Generated using JFormDesigner non-commercial license
|
||||
private JPanel centerPane;
|
||||
private JScrollPane scrollPane2;
|
||||
private JTable table;
|
||||
private JPanel toolPane;
|
||||
private JLabel label7;
|
||||
private JTextField userIdTextField;
|
||||
private JLabel label8;
|
||||
private JComboBox userTypeComboBox;
|
||||
private JLabel label9;
|
||||
private JTextField templateCodeTextField;
|
||||
private JLabel label12;
|
||||
private JComboBox templateTypeComboBox;
|
||||
private JLabel label10;
|
||||
private WLocalDateCombo startDateTextField;
|
||||
private JLabel label11;
|
||||
private WLocalDateCombo endDateTextField;
|
||||
private JButton searchBut;
|
||||
private JButton reseBut;
|
||||
private JButton clearBut;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||
}
|
@ -0,0 +1,211 @@
|
||||
/*
|
||||
* Created by JFormDesigner on Thu Jul 25 16:52:21 CST 2024
|
||||
*/
|
||||
|
||||
package com.lw.swing.view.system.notice;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.lw.dillon.admin.framework.common.pojo.CommonResult;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.dict.vo.data.DictDataSimpleRespVO;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.notify.vo.template.NotifyTemplateRespVO;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.notify.vo.template.NotifyTemplateSaveReqVO;
|
||||
import com.lw.swing.request.Request;
|
||||
import com.lw.swing.store.AppStore;
|
||||
import com.lw.ui.request.api.system.NotifyTemplateFeign;
|
||||
import com.lw.ui.utils.DictTypeEnum;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
/**
|
||||
* @author wenli
|
||||
*/
|
||||
public class NotifyTemplateFromPane extends JPanel {
|
||||
private Long id;
|
||||
|
||||
public NotifyTemplateFromPane() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
|
||||
// Generated using JFormDesigner non-commercial license
|
||||
label1 = new JLabel();
|
||||
codeTield = new JTextField();
|
||||
label2 = new JLabel();
|
||||
nameField = new JTextField();
|
||||
label3 = new JLabel();
|
||||
nicknameField = new JTextField();
|
||||
label4 = new JLabel();
|
||||
typeComboBox = new JComboBox();
|
||||
label5 = new JLabel();
|
||||
statusComboBox = new JComboBox();
|
||||
label6 = new JLabel();
|
||||
scrollPane1 = new JScrollPane();
|
||||
contentArea = new JTextArea();
|
||||
label7 = new JLabel();
|
||||
remarkField = new JTextField();
|
||||
|
||||
//======== this ========
|
||||
setLayout(new MigLayout(
|
||||
"fill,hidemode 3",
|
||||
// columns
|
||||
"[right]" +
|
||||
"[400:480,grow,fill]",
|
||||
// rows
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[320,grow,fill]" +
|
||||
"[]"));
|
||||
|
||||
//---- label1 ----
|
||||
label1.setText("\u6a21\u7248\u7f16\u7801");
|
||||
add(label1, "cell 0 0");
|
||||
add(codeTield, "cell 1 0");
|
||||
|
||||
//---- label2 ----
|
||||
label2.setText("\u6a21\u677f\u540d\u79f0");
|
||||
add(label2, "cell 0 1");
|
||||
add(nameField, "cell 1 1");
|
||||
|
||||
//---- label3 ----
|
||||
label3.setText("\u53d1\u4ef6\u4eba\u540d\u79f0");
|
||||
add(label3, "cell 0 2");
|
||||
add(nicknameField, "cell 1 2");
|
||||
|
||||
//---- label4 ----
|
||||
label4.setText("\u7c7b\u578b");
|
||||
add(label4, "cell 0 3");
|
||||
add(typeComboBox, "cell 1 3");
|
||||
|
||||
//---- label5 ----
|
||||
label5.setText("\u5f00\u542f\u72b6\u6001");
|
||||
add(label5, "cell 0 4");
|
||||
add(statusComboBox, "cell 1 4");
|
||||
|
||||
//---- label6 ----
|
||||
label6.setText("\u6a21\u677f\u5185\u5bb9");
|
||||
add(label6, "cell 0 5,aligny top,growy 0");
|
||||
|
||||
//======== scrollPane1 ========
|
||||
{
|
||||
scrollPane1.setViewportView(contentArea);
|
||||
}
|
||||
add(scrollPane1, "cell 1 5,grow");
|
||||
|
||||
//---- label7 ----
|
||||
label7.setText("\u5907\u6ce8");
|
||||
add(label7, "cell 0 6");
|
||||
add(remarkField, "cell 1 6");
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
||||
statusComboBox.addItem("开启");
|
||||
statusComboBox.addItem("关闭");
|
||||
|
||||
List<DictDataSimpleRespVO> dictDataSimpleRespVOList = AppStore.getDictDataList(DictTypeEnum.SYSTEM_NOTICE_TYPE);
|
||||
typeComboBox.setRenderer(new DefaultListCellRenderer() {
|
||||
@Override
|
||||
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||
if (value instanceof DictDataSimpleRespVO) {
|
||||
value = ((DictDataSimpleRespVO) value).getLabel();
|
||||
}
|
||||
return super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
|
||||
}
|
||||
});
|
||||
for (DictDataSimpleRespVO dictDataSimpleRespVO : dictDataSimpleRespVOList) {
|
||||
typeComboBox.addItem(dictDataSimpleRespVO);
|
||||
}
|
||||
}
|
||||
|
||||
private void setValue(NotifyTemplateRespVO respVO) {
|
||||
nameField.setText(respVO.getName());
|
||||
nicknameField.setText(respVO.getNickname());
|
||||
remarkField.setText(respVO.getRemark());
|
||||
codeTield.setText(respVO.getCode());
|
||||
statusComboBox.setSelectedIndex(ObjectUtil.defaultIfNull(respVO.getStatus(), 0));
|
||||
typeComboBox.setSelectedIndex(ObjectUtil.defaultIfNull(respVO.getType(), 0));
|
||||
contentArea.setText(respVO.getContent());
|
||||
|
||||
|
||||
}
|
||||
|
||||
public NotifyTemplateSaveReqVO getValue() {
|
||||
NotifyTemplateSaveReqVO reqVO = new NotifyTemplateSaveReqVO();
|
||||
reqVO.setId(id);
|
||||
reqVO.setName(nameField.getText());
|
||||
reqVO.setNickname(nicknameField.getText());
|
||||
reqVO.setCode(codeTield.getText());
|
||||
reqVO.setRemark(remarkField.getText());
|
||||
reqVO.setContent(contentArea.getText());
|
||||
reqVO.setStatus(statusComboBox.getSelectedIndex());
|
||||
reqVO.setType(typeComboBox.getSelectedIndex());
|
||||
return reqVO;
|
||||
}
|
||||
|
||||
|
||||
public void updateData(NotifyTemplateRespVO respVO) {
|
||||
this.id = respVO.getId();
|
||||
List<DictDataSimpleRespVO> dictDataSimpleRespVOList = AppStore.getDictDataList(DictTypeEnum.SYSTEM_NOTICE_TYPE);
|
||||
|
||||
for (DictDataSimpleRespVO dictDataSimpleRespVO : dictDataSimpleRespVOList) {
|
||||
if (StrUtil.equals(dictDataSimpleRespVO.getValue(), respVO.getType() + "")) {
|
||||
typeComboBox.setSelectedItem(dictDataSimpleRespVO);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SwingWorker<NotifyTemplateRespVO, NotifyTemplateRespVO> swingWorker = new SwingWorker<NotifyTemplateRespVO, NotifyTemplateRespVO>() {
|
||||
@Override
|
||||
protected NotifyTemplateRespVO doInBackground() throws Exception {
|
||||
NotifyTemplateRespVO postRespVO = new NotifyTemplateRespVO();
|
||||
if (id != null) {
|
||||
CommonResult<NotifyTemplateRespVO> userResult = Request.connector(NotifyTemplateFeign.class).getNotifyTemplate(id);
|
||||
postRespVO = userResult.getData();
|
||||
}
|
||||
|
||||
return postRespVO;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
|
||||
try {
|
||||
setValue(get());
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
swingWorker.execute();
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||
// Generated using JFormDesigner non-commercial license
|
||||
private JLabel label1;
|
||||
private JTextField codeTield;
|
||||
private JLabel label2;
|
||||
private JTextField nameField;
|
||||
private JLabel label3;
|
||||
private JTextField nicknameField;
|
||||
private JLabel label4;
|
||||
private JComboBox typeComboBox;
|
||||
private JLabel label5;
|
||||
private JComboBox statusComboBox;
|
||||
private JLabel label6;
|
||||
private JScrollPane scrollPane1;
|
||||
private JTextArea contentArea;
|
||||
private JLabel label7;
|
||||
private JTextField remarkField;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
JFDML JFormDesigner: "8.2.3.0.386" Java: "17.0.11" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
root: new FormRoot {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "fill,hidemode 3"
|
||||
"$columnConstraints": "[right][400:480,grow,fill]"
|
||||
"$rowConstraints": "[][][][][][320,grow,fill][]"
|
||||
} ) {
|
||||
name: "this"
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label1"
|
||||
"text": "模版编码"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "codeTield"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 0"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label2"
|
||||
"text": "模板名称"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "nameField"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label3"
|
||||
"text": "发件人名称"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 2"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "nicknameField"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 2"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label4"
|
||||
"text": "类型"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 3"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||
name: "typeComboBox"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 3"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label5"
|
||||
"text": "开启状态"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 4"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||
name: "statusComboBox"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 4"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label6"
|
||||
"text": "模板内容"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 5,aligny top,growy 0"
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||
name: "scrollPane1"
|
||||
add( new FormComponent( "javax.swing.JTextArea" ) {
|
||||
name: "contentArea"
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 5,grow"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label7"
|
||||
"text": "备注"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 6"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "remarkField"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 6"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 555, 440 )
|
||||
} )
|
||||
}
|
||||
}
|
@ -0,0 +1,497 @@
|
||||
/*
|
||||
* Created by JFormDesigner on Thu Jun 13 19:52:21 CST 2024
|
||||
*/
|
||||
|
||||
package com.lw.swing.view.system.notice;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import com.lw.dillon.admin.framework.common.pojo.CommonResult;
|
||||
import com.lw.dillon.admin.framework.common.pojo.PageResult;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.notify.vo.template.NotifyTemplateRespVO;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.notify.vo.template.NotifyTemplateSaveReqVO;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.notify.vo.template.NotifyTemplateSendReqVO;
|
||||
import com.lw.swing.components.*;
|
||||
import com.lw.swing.components.notice.WMessage;
|
||||
import com.lw.swing.components.table.renderer.OptButtonTableCellEditor;
|
||||
import com.lw.swing.components.table.renderer.OptButtonTableCellRenderer;
|
||||
import com.lw.swing.request.Request;
|
||||
import com.lw.swing.utils.BadgeLabelUtil;
|
||||
import com.lw.swing.view.MainFrame;
|
||||
import com.lw.ui.request.api.system.NotifyTemplateFeign;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.jdesktop.swingx.JXTable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import static com.lw.ui.utils.DictTypeEnum.COMMON_STATUS;
|
||||
import static com.lw.ui.utils.DictTypeEnum.SYSTEM_NOTIFY_TEMPLATE_TYPE;
|
||||
import static javax.swing.JOptionPane.*;
|
||||
|
||||
/**
|
||||
* @author wenli
|
||||
*/
|
||||
public class NotifyTemplatePane extends JPanel {
|
||||
private final static String[] COLUMN_ID = {"模板编码", "模板名称", "类型", "发送人名称", "模板内容", "开启状态", "备注", "创建时间", "操作"};
|
||||
|
||||
|
||||
private DefaultTableModel tableModel;
|
||||
|
||||
private WPaginationPane paginationPane;
|
||||
|
||||
public NotifyTemplatePane() {
|
||||
initComponents();
|
||||
initListeners();
|
||||
updateData();
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
textField = new JTextField();
|
||||
scrollPane1 = new WScrollPane();
|
||||
centerPane = new JPanel();
|
||||
scrollPane2 = new WScrollPane();
|
||||
table = new JXTable(tableModel = new DefaultTableModel());
|
||||
toolPane = new WPanel();
|
||||
label7 = new JLabel();
|
||||
label8 = new JLabel();
|
||||
nameTextField = new JTextField();
|
||||
codeTextField = new JTextField();
|
||||
label9 = new JLabel();
|
||||
stautsComboBox = new JComboBox();
|
||||
searchBut = new JButton();
|
||||
reseBut = new JButton();
|
||||
newBut = new JButton();
|
||||
|
||||
//======== this ========
|
||||
setOpaque(false);
|
||||
setLayout(new BorderLayout(10, 10));
|
||||
|
||||
|
||||
//======== centerPane ========
|
||||
{
|
||||
centerPane.setOpaque(false);
|
||||
centerPane.setLayout(new BorderLayout(10, 10));
|
||||
|
||||
//======== scrollPane2 ========
|
||||
{
|
||||
tableModel.setColumnIdentifiers(COLUMN_ID);
|
||||
scrollPane2.setViewportView(table);
|
||||
}
|
||||
|
||||
JPanel panel = new WPanel();
|
||||
panel.setLayout(new BorderLayout());
|
||||
panel.add(scrollPane2);
|
||||
paginationPane = new WPaginationPane() {
|
||||
@Override
|
||||
public void setPageIndex(long pageIndex) {
|
||||
super.setPageIndex(pageIndex);
|
||||
updateData();
|
||||
}
|
||||
};
|
||||
paginationPane.setOpaque(false);
|
||||
panel.add(paginationPane, BorderLayout.SOUTH);
|
||||
centerPane.add(panel, BorderLayout.CENTER);
|
||||
|
||||
//======== toolPane ========
|
||||
{
|
||||
toolPane.setLayout(new MigLayout(
|
||||
"fill,insets 0,hidemode 3",
|
||||
// columns
|
||||
"[left]",
|
||||
// rows
|
||||
"[]"));
|
||||
toolPane.setBorder(new EmptyBorder(10, 10, 10, 10));
|
||||
//---- label7 ----
|
||||
label7.setText("模板名称");
|
||||
toolPane.add(label7, "cell 0 0");
|
||||
|
||||
//---- userNameTextField ----
|
||||
nameTextField.setColumns(15);
|
||||
toolPane.add(nameTextField, "cell 0 0");
|
||||
|
||||
//---- label7 ----
|
||||
label8.setText("模板编号");
|
||||
toolPane.add(label8, "cell 0 0");
|
||||
|
||||
//---- userNameTextField ----
|
||||
codeTextField.setColumns(15);
|
||||
toolPane.add(codeTextField, "cell 0 0");
|
||||
|
||||
|
||||
//---- label9 ----
|
||||
label9.setText("公告状态");
|
||||
toolPane.add(label9, "cell 0 0");
|
||||
toolPane.add(stautsComboBox, "cell 0 0");
|
||||
|
||||
//---- button1 ----
|
||||
searchBut.setText("\u641c\u7d22");
|
||||
toolPane.add(searchBut, "cell 0 0");
|
||||
|
||||
//---- reseBut ----
|
||||
reseBut.setText("\u91cd\u7f6e");
|
||||
toolPane.add(reseBut, "cell 0 0");
|
||||
|
||||
//---- newBut ----
|
||||
newBut.setText("\u65b0\u589e");
|
||||
toolPane.add(newBut, "cell 0 0");
|
||||
}
|
||||
centerPane.add(toolPane, BorderLayout.NORTH);
|
||||
}
|
||||
add(centerPane, BorderLayout.CENTER);
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
||||
table.setRowHeight(40);
|
||||
|
||||
|
||||
stautsComboBox.addItem("全部");
|
||||
stautsComboBox.addItem("开启");
|
||||
stautsComboBox.addItem("关闭");
|
||||
table.setDefaultRenderer(Object.class, new CenterTableCellRenderer());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUI() {
|
||||
super.updateUI();
|
||||
if (table != null) {
|
||||
table.setDefaultRenderer(Object.class, new CenterTableCellRenderer());
|
||||
}
|
||||
}
|
||||
|
||||
private JToolBar creatBar() {
|
||||
JToolBar optBar = new JToolBar();
|
||||
optBar.setOpaque(false);
|
||||
JButton edit = new JButton("修改");
|
||||
edit.setForeground(UIManager.getColor("App.accentColor"));
|
||||
edit.setIcon(new FlatSVGIcon("icons/xiugai.svg", 15, 15));
|
||||
edit.addActionListener(e -> showEditDialog());
|
||||
|
||||
JButton del = new JButton("删除");
|
||||
del.setIcon(new FlatSVGIcon("icons/delte.svg", 15, 15));
|
||||
del.addActionListener(e -> del());
|
||||
del.setForeground(UIManager.getColor("app-error-color-5"));
|
||||
|
||||
JButton push = new JButton("推送");
|
||||
push.setIcon(new FlatSVGIcon("icons/delte.svg", 15, 15));
|
||||
push.addActionListener(e -> showSendDialog());
|
||||
push.setForeground(UIManager.getColor("App.accentColor"));
|
||||
|
||||
|
||||
optBar.add(Box.createGlue());
|
||||
optBar.add(edit);
|
||||
optBar.add(del);
|
||||
optBar.add(push);
|
||||
optBar.add(Box.createGlue());
|
||||
return optBar;
|
||||
|
||||
}
|
||||
|
||||
private void initListeners() {
|
||||
|
||||
reseBut.addActionListener(e -> reset());
|
||||
searchBut.addActionListener(e -> updateData());
|
||||
newBut.addActionListener(e -> showAddDialog(null));
|
||||
}
|
||||
|
||||
private void reset() {
|
||||
nameTextField.setText("");
|
||||
stautsComboBox.setSelectedIndex(0);
|
||||
}
|
||||
|
||||
private void showAddDialog(Long id) {
|
||||
NotifyTemplateFromPane noticeFormPane = new NotifyTemplateFromPane();
|
||||
noticeFormPane.updateData(new NotifyTemplateRespVO());
|
||||
int opt = WOptionPane.showOptionDialog(null, noticeFormPane, "添加", OK_CANCEL_OPTION, PLAIN_MESSAGE, null, new Object[]{"确定", "取消"}, "确定");
|
||||
if (opt == 0) {
|
||||
add(noticeFormPane.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
private void showEditDialog() {
|
||||
|
||||
|
||||
int selRow = table.getSelectedRow();
|
||||
NotifyTemplateRespVO noticeRespVO = null;
|
||||
if (selRow != -1) {
|
||||
noticeRespVO = (NotifyTemplateRespVO) table.getValueAt(selRow, COLUMN_ID.length - 1);
|
||||
}
|
||||
|
||||
NotifyTemplateFromPane noticeFormPane = new NotifyTemplateFromPane();
|
||||
noticeFormPane.updateData(noticeRespVO);
|
||||
int opt = WOptionPane.showOptionDialog(null, noticeFormPane, "修改", OK_CANCEL_OPTION, PLAIN_MESSAGE, null, new Object[]{"确定", "取消"}, "确定");
|
||||
if (opt == 0) {
|
||||
edit(noticeFormPane.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void showSendDialog() {
|
||||
|
||||
|
||||
int selRow = table.getSelectedRow();
|
||||
NotifyTemplateRespVO noticeRespVO = null;
|
||||
if (selRow != -1) {
|
||||
noticeRespVO = (NotifyTemplateRespVO) table.getValueAt(selRow, COLUMN_ID.length - 1);
|
||||
}
|
||||
|
||||
NotifyTemplateSendPane noticeFormPane = new NotifyTemplateSendPane();
|
||||
noticeFormPane.updateData(noticeRespVO);
|
||||
int opt = WOptionPane.showOptionDialog(null, noticeFormPane, "消息发送", OK_CANCEL_OPTION, PLAIN_MESSAGE, null, new Object[]{"确定", "取消"}, "确定");
|
||||
if (opt == 0) {
|
||||
send(noticeFormPane.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
private void add(NotifyTemplateSaveReqVO saveReqVO) {
|
||||
|
||||
SwingWorker<CommonResult<Long>, Object> swingWorker = new SwingWorker<CommonResult<Long>, Object>() {
|
||||
@Override
|
||||
protected CommonResult<Long> doInBackground() throws Exception {
|
||||
return Request.connector(NotifyTemplateFeign.class).createNotifyTemplate(saveReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
if (get().isSuccess()) {
|
||||
WMessage.showMessageSuccess(MainFrame.getInstance(), "添加成功!");
|
||||
|
||||
updateData();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
swingWorker.execute();
|
||||
|
||||
}
|
||||
|
||||
private void edit(NotifyTemplateSaveReqVO saveReqVO) {
|
||||
|
||||
|
||||
SwingWorker<CommonResult<Boolean>, Object> swingWorker = new SwingWorker<CommonResult<Boolean>, Object>() {
|
||||
@Override
|
||||
protected CommonResult<Boolean> doInBackground() throws Exception {
|
||||
return Request.connector(NotifyTemplateFeign.class).updateNotifyTemplate(saveReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
if (get().isSuccess()) {
|
||||
WMessage.showMessageSuccess(MainFrame.getInstance(), "修改成功!");
|
||||
|
||||
updateData();
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
swingWorker.execute();
|
||||
|
||||
}
|
||||
|
||||
private void del() {
|
||||
Long id = null;
|
||||
String name = null;
|
||||
|
||||
int selRow = table.getSelectedRow();
|
||||
if (selRow != -1) {
|
||||
id = Convert.toLong(table.getValueAt(selRow, 0));
|
||||
name = Convert.toStr(table.getValueAt(selRow, 1));
|
||||
}
|
||||
|
||||
int opt = WOptionPane.showOptionDialog(this, "是否确定删除[" + name + "]?", "提示", OK_CANCEL_OPTION, WARNING_MESSAGE, null, null, null);
|
||||
|
||||
if (opt != 0) {
|
||||
return;
|
||||
}
|
||||
Long finaId = id;
|
||||
SwingWorker<CommonResult<Boolean>, Object> swingWorker = new SwingWorker<CommonResult<Boolean>, Object>() {
|
||||
@Override
|
||||
protected CommonResult<Boolean> doInBackground() throws Exception {
|
||||
return Request.connector(NotifyTemplateFeign.class).deleteNotifyTemplate(finaId);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
if (get().isSuccess()) {
|
||||
WMessage.showMessageSuccess(MainFrame.getInstance(), "删除成功!");
|
||||
|
||||
updateData();
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
swingWorker.execute();
|
||||
|
||||
}
|
||||
|
||||
private void send(NotifyTemplateSendReqVO sendReqVO) {
|
||||
|
||||
int selRow = table.getSelectedRow();
|
||||
Long id = Convert.toLong(table.getValueAt(selRow, 0));
|
||||
|
||||
|
||||
SwingWorker<CommonResult<Long>, Object> swingWorker = new SwingWorker<CommonResult<Long>, Object>() {
|
||||
@Override
|
||||
protected CommonResult<Long> doInBackground() throws Exception {
|
||||
return Request.connector(NotifyTemplateFeign.class).sendNotify(sendReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
if (get().isSuccess()) {
|
||||
WMessage.showMessageSuccess(MainFrame.getInstance(), "发送成功!");
|
||||
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
swingWorker.execute();
|
||||
|
||||
}
|
||||
|
||||
public void updateData() {
|
||||
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
queryMap.put("pageNo", paginationPane.getPageIndex());
|
||||
queryMap.put("pageSize", paginationPane.getPageSize());
|
||||
|
||||
if (StrUtil.isNotBlank(codeTextField.getText())) {
|
||||
queryMap.put("code", codeTextField.getText());
|
||||
}
|
||||
if (StrUtil.isNotBlank(nameTextField.getText())) {
|
||||
queryMap.put("name", nameTextField.getText());
|
||||
}
|
||||
|
||||
queryMap.put("status", stautsComboBox.getSelectedIndex() == 0 ? null : (stautsComboBox.getSelectedIndex() == 1 ? 0 : 1));
|
||||
|
||||
|
||||
SwingWorker<Vector<Vector>, Long> swingWorker = new SwingWorker<Vector<Vector>, Long>() {
|
||||
@Override
|
||||
protected Vector<Vector> doInBackground() throws Exception {
|
||||
CommonResult<PageResult<NotifyTemplateRespVO>> result = Request.connector(NotifyTemplateFeign.class).getNotifyTemplatePage(queryMap);
|
||||
|
||||
Vector<Vector> tableData = new Vector<>();
|
||||
|
||||
|
||||
if (result.isSuccess()) {
|
||||
|
||||
result.getData().getList().forEach(respVO -> {
|
||||
Vector rowV = new Vector();
|
||||
rowV.add(respVO.getId());
|
||||
rowV.add(respVO.getName());
|
||||
rowV.add(respVO.getType());
|
||||
rowV.add(respVO.getNickname());
|
||||
rowV.add(respVO.getContent());
|
||||
rowV.add(respVO.getStatus());
|
||||
rowV.add(respVO.getRemark());
|
||||
rowV.add(DateUtil.format(respVO.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
|
||||
rowV.add(respVO);
|
||||
tableData.add(rowV);
|
||||
});
|
||||
|
||||
publish(result.getData().getTotal());
|
||||
}
|
||||
return tableData;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void process(List<Long> chunks) {
|
||||
chunks.forEach(total -> paginationPane.setTotal(total));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
try {
|
||||
|
||||
|
||||
tableModel.setDataVector(get(), new Vector<>(Arrays.asList(COLUMN_ID)));
|
||||
table.getColumn("操作").setCellRenderer(new OptButtonTableCellRenderer(creatBar()));
|
||||
table.getColumn("操作").setCellEditor(new OptButtonTableCellEditor(creatBar()));
|
||||
|
||||
table.getColumn("开启状态").setCellRenderer(new DefaultTableCellRenderer() {
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 10));
|
||||
JLabel label = BadgeLabelUtil.getBadgeLabel(COMMON_STATUS, value);
|
||||
panel.add(label);
|
||||
panel.setBackground(component.getBackground());
|
||||
panel.setOpaque(isSelected);
|
||||
return panel;
|
||||
}
|
||||
});
|
||||
table.getColumn("类型").setCellRenderer(new DefaultTableCellRenderer() {
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 10));
|
||||
JLabel label = BadgeLabelUtil.getBadgeLabel(SYSTEM_NOTIFY_TEMPLATE_TYPE, value);
|
||||
panel.add(label);
|
||||
panel.setBackground(component.getBackground());
|
||||
panel.setOpaque(isSelected);
|
||||
return panel;
|
||||
}
|
||||
});
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
swingWorker.execute();
|
||||
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||
// Generated using JFormDesigner non-commercial license
|
||||
private JTextField textField;
|
||||
private JScrollPane scrollPane1;
|
||||
private JPanel centerPane;
|
||||
private JScrollPane scrollPane2;
|
||||
private JTable table;
|
||||
private JPanel toolPane;
|
||||
private JLabel label7;
|
||||
private JLabel label8;
|
||||
private JTextField nameTextField;
|
||||
private JTextField codeTextField;
|
||||
private JLabel label9;
|
||||
private JComboBox stautsComboBox;
|
||||
private JButton searchBut;
|
||||
private JButton reseBut;
|
||||
private JButton newBut;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||
}
|
@ -0,0 +1,212 @@
|
||||
/*
|
||||
* Created by JFormDesigner on Thu Jul 25 16:52:21 CST 2024
|
||||
*/
|
||||
|
||||
package com.lw.swing.view.system.notice;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.lw.dillon.admin.framework.common.pojo.CommonResult;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.dict.vo.data.DictDataSimpleRespVO;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.notify.vo.template.NotifyTemplateRespVO;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.notify.vo.template.NotifyTemplateSendReqVO;
|
||||
import com.lw.dillon.admin.module.system.controller.admin.user.vo.user.UserSimpleRespVO;
|
||||
import com.lw.swing.request.Request;
|
||||
import com.lw.swing.store.AppStore;
|
||||
import com.lw.ui.request.api.system.NotifyTemplateFeign;
|
||||
import com.lw.ui.request.api.system.UserFeign;
|
||||
import com.lw.ui.utils.DictTypeEnum;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
/**
|
||||
* @author wenli
|
||||
*/
|
||||
public class NotifyTemplateSendPane extends JPanel {
|
||||
private Long id;
|
||||
private String code;
|
||||
private Map<String, JTextField> paramTextFieldMap = new HashMap<>();
|
||||
|
||||
public NotifyTemplateSendPane() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
|
||||
// Generated using JFormDesigner non-commercial license
|
||||
label6 = new JLabel();
|
||||
scrollPane1 = new JScrollPane();
|
||||
contentArea = new JTextArea();
|
||||
label4 = new JLabel();
|
||||
userTypeComboBox = new JComboBox();
|
||||
label5 = new JLabel();
|
||||
userComboBox = new JComboBox();
|
||||
paramsPane = new JPanel();
|
||||
|
||||
//======== this ========
|
||||
setLayout(new MigLayout(
|
||||
"fill,hidemode 3",
|
||||
// columns
|
||||
"[right]" +
|
||||
"[400:480,grow,fill]",
|
||||
// rows
|
||||
"[240,fill]" +
|
||||
"[]" +
|
||||
"[]" +
|
||||
"[22,grow]"));
|
||||
|
||||
//---- label6 ----
|
||||
label6.setText("\u6a21\u677f\u5185\u5bb9");
|
||||
add(label6, "cell 0 0,aligny top,growy 0");
|
||||
|
||||
//======== scrollPane1 ========
|
||||
{
|
||||
scrollPane1.setViewportView(contentArea);
|
||||
}
|
||||
add(scrollPane1, "cell 1 0,grow");
|
||||
|
||||
//---- label4 ----
|
||||
label4.setText("*\u7528\u6237\u7c7b\u578b");
|
||||
add(label4, "cell 0 1");
|
||||
add(userTypeComboBox, "cell 1 1");
|
||||
|
||||
//---- label5 ----
|
||||
label5.setText("*\u63a5\u6536\u4eba");
|
||||
add(label5, "cell 0 2");
|
||||
add(userComboBox, "cell 1 2");
|
||||
|
||||
//======== paramsPane ========
|
||||
{
|
||||
paramsPane.setLayout(new MigLayout(
|
||||
"fill,insets 0,hidemode 3",
|
||||
// columns
|
||||
"[fill]" +
|
||||
"[grow,fill]",
|
||||
// rows
|
||||
"[]"));
|
||||
}
|
||||
add(paramsPane, "cell 0 3 2 1,grow");
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
||||
|
||||
List<DictDataSimpleRespVO> dictDataSimpleRespVOList = AppStore.getDictDataList(DictTypeEnum.USER_TYPE);
|
||||
userTypeComboBox.setRenderer(new DefaultListCellRenderer() {
|
||||
@Override
|
||||
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||
if (value instanceof DictDataSimpleRespVO) {
|
||||
value = ((DictDataSimpleRespVO) value).getLabel();
|
||||
}
|
||||
return super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
|
||||
}
|
||||
});
|
||||
for (DictDataSimpleRespVO dictDataSimpleRespVO : dictDataSimpleRespVOList) {
|
||||
userTypeComboBox.addItem(dictDataSimpleRespVO);
|
||||
}
|
||||
}
|
||||
|
||||
private void setValue(NotifyTemplateRespVO respVO) {
|
||||
contentArea.setText(respVO.getContent());
|
||||
userComboBox.setSelectedItem(null);
|
||||
userTypeComboBox.setSelectedItem(null);
|
||||
List<String> params = respVO.getParams();
|
||||
String rows = "";
|
||||
for (int i = 0; i < params.size(); i++) {
|
||||
rows += "[]";
|
||||
}
|
||||
paramsPane.setLayout(new MigLayout(
|
||||
"fill,insets 0,hidemode 3",
|
||||
// columns
|
||||
"[fill][grow,fill]",
|
||||
// rows
|
||||
rows));
|
||||
int row = 0;
|
||||
for (String param : params) {
|
||||
JLabel label = new JLabel("* 参数{" + param + "}");
|
||||
JTextField textField = new JTextField();
|
||||
paramsPane.add(label, "cell 0 " + row);
|
||||
paramsPane.add(textField, "cell 1 " + row);
|
||||
paramTextFieldMap.put(param, textField);
|
||||
row++;
|
||||
}
|
||||
}
|
||||
|
||||
public NotifyTemplateSendReqVO getValue() {
|
||||
NotifyTemplateSendReqVO reqVO = new NotifyTemplateSendReqVO();
|
||||
UserSimpleRespVO userSimpleRespVO = (UserSimpleRespVO) userComboBox.getSelectedItem();
|
||||
DictDataSimpleRespVO userTypeComboBoxSelectedItem = (DictDataSimpleRespVO) userTypeComboBox.getSelectedItem();
|
||||
reqVO.setUserId(Convert.toLong(userSimpleRespVO.getId(), null));
|
||||
reqVO.setUserType(Convert.toInt(userTypeComboBoxSelectedItem.getValue(), null));
|
||||
reqVO.setTemplateCode(code);
|
||||
|
||||
Map<String, Object> templateParams = new HashMap<>();
|
||||
paramTextFieldMap.forEach((param, textField) -> {
|
||||
templateParams.put(param, textField.getText());
|
||||
});
|
||||
reqVO.setTemplateParams(templateParams);
|
||||
|
||||
return reqVO;
|
||||
}
|
||||
|
||||
|
||||
public void updateData(NotifyTemplateRespVO respVO) {
|
||||
this.id = respVO.getId();
|
||||
this.code = respVO.getCode();
|
||||
|
||||
|
||||
SwingWorker<NotifyTemplateRespVO, List<UserSimpleRespVO>> swingWorker = new SwingWorker<NotifyTemplateRespVO, List<UserSimpleRespVO>>() {
|
||||
@Override
|
||||
protected NotifyTemplateRespVO doInBackground() throws Exception {
|
||||
|
||||
List<UserSimpleRespVO> userSimpleRespVOList = Request.connector(UserFeign.class).getSimpleUserList().getCheckedData();
|
||||
publish(userSimpleRespVOList);
|
||||
NotifyTemplateRespVO postRespVO = new NotifyTemplateRespVO();
|
||||
if (id != null) {
|
||||
CommonResult<NotifyTemplateRespVO> userResult = Request.connector(NotifyTemplateFeign.class).getNotifyTemplate(id);
|
||||
postRespVO = userResult.getData();
|
||||
}
|
||||
|
||||
return postRespVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void process(List<List<UserSimpleRespVO>> chunks) {
|
||||
super.process(chunks);
|
||||
chunks.forEach(chunk -> {
|
||||
for (UserSimpleRespVO userSimpleRespVO : chunk) {
|
||||
userComboBox.addItem(userSimpleRespVO);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void done() {
|
||||
|
||||
try {
|
||||
setValue(get());
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
swingWorker.execute();
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||
// Generated using JFormDesigner non-commercial license
|
||||
private JLabel label6;
|
||||
private JScrollPane scrollPane1;
|
||||
private JTextArea contentArea;
|
||||
private JLabel label4;
|
||||
private JComboBox userTypeComboBox;
|
||||
private JLabel label5;
|
||||
private JComboBox userComboBox;
|
||||
private JPanel paramsPane;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
JFDML JFormDesigner: "8.2.3.0.386" Java: "17.0.11" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
root: new FormRoot {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "fill,hidemode 3"
|
||||
"$columnConstraints": "[right][400:480,grow,fill]"
|
||||
"$rowConstraints": "[240,fill][][][22,grow]"
|
||||
} ) {
|
||||
name: "this"
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label6"
|
||||
"text": "模板内容"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 0,aligny top,growy 0"
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||
name: "scrollPane1"
|
||||
add( new FormComponent( "javax.swing.JTextArea" ) {
|
||||
name: "contentArea"
|
||||
} )
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 0,grow"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label4"
|
||||
"text": "*用户类型"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||
name: "userTypeComboBox"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 1"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label5"
|
||||
"text": "*接收人"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 2"
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JComboBox" ) {
|
||||
name: "userComboBox"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 1 2"
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
|
||||
"$layoutConstraints": "fill,insets 0,hidemode 3"
|
||||
"$columnConstraints": "[fill][grow,fill]"
|
||||
"$rowConstraints": "[]"
|
||||
} ) {
|
||||
name: "paramsPane"
|
||||
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
|
||||
"value": "cell 0 3 2 1,grow"
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 555, 440 )
|
||||
} )
|
||||
}
|
||||
}
|
@ -3,62 +3,57 @@
|
||||
@foreground=#FFFFFF
|
||||
@accentColor=#4880ff
|
||||
@selectionInactiveBackground=fade(@accentColor,74%,derived)
|
||||
|
||||
@componentMargin = 7,7,7,7
|
||||
|
||||
|
||||
app-brand-color-1: #e5ecff
|
||||
app-brand-color-2: #d1ddff
|
||||
app-brand-color-3: #bdcdff
|
||||
app-brand-color-4: #9eb6ff
|
||||
app-brand-color-5: #789aff
|
||||
app-brand-color-6: #4f7bff
|
||||
app-brand-color-7: #2d61fc
|
||||
app-brand-color-8: #1649e0
|
||||
app-brand-color-9: #0733bb
|
||||
app-brand-color-10: #06278a
|
||||
app-warning-color-1: #fcf1e3
|
||||
app-warning-color-2: #f9e0c7
|
||||
app-warning-color-3: #f7c797
|
||||
app-warning-color-4: #f2995f
|
||||
app-warning-color-5: #ed7b2f
|
||||
app-warning-color-6: #d35a21
|
||||
app-warning-color-7: #ba431b
|
||||
app-warning-color-8: #9e3610
|
||||
app-warning-color-9: #842b0b
|
||||
app-warning-color-10: #5a1907
|
||||
app-error-color-1: #fcebed
|
||||
app-error-color-2: #f9d7d9
|
||||
app-error-color-3: #f8b9be
|
||||
app-error-color-4: #f78d94
|
||||
app-error-color-5: #f36d78
|
||||
app-error-color-6: #de4753
|
||||
app-error-color-7: #c9353f
|
||||
app-error-color-8: #b11f26
|
||||
app-error-color-9: #951114
|
||||
app-error-color-10: #680506
|
||||
app-success-color-1: #e1faf0
|
||||
app-success-color-2: #bcebdc
|
||||
app-success-color-3: #85dbbe
|
||||
app-success-color-4: #48c79c
|
||||
app-success-color-5: #00a66e
|
||||
app-success-color-6: #078a5a
|
||||
app-success-color-7: #067543
|
||||
app-success-color-8: #056334
|
||||
app-success-color-9: #044f2a
|
||||
app-success-color-10: #033318
|
||||
app-gray-color-1: #f7f9fc
|
||||
app-gray-color-2: #eceff5
|
||||
app-gray-color-3: #dfe4ed
|
||||
app-gray-color-4: #d3d9e5
|
||||
app-gray-color-5: #c9ceda
|
||||
app-gray-color-6: #a9b1c2
|
||||
app-gray-color-7: #919aae
|
||||
app-gray-color-8: #737d92
|
||||
app-gray-color-9: #5a6477
|
||||
app-gray-color-10: #424b5e
|
||||
|
||||
|
||||
@componentMargin=7,7,7,7
|
||||
app-brand-color-1:#e5ecff
|
||||
app-brand-color-2:#d1ddff
|
||||
app-brand-color-3:#bdcdff
|
||||
app-brand-color-4:#9eb6ff
|
||||
app-brand-color-5:#789aff
|
||||
app-brand-color-6:#4f7bff
|
||||
app-brand-color-7:#2d61fc
|
||||
app-brand-color-8:#1649e0
|
||||
app-brand-color-9:#0733bb
|
||||
app-brand-color-10:#06278a
|
||||
app-warning-color-1:#fcf1e3
|
||||
app-warning-color-2:#f9e0c7
|
||||
app-warning-color-3:#f7c797
|
||||
app-warning-color-4:#f2995f
|
||||
app-warning-color-5:#ed7b2f
|
||||
app-warning-color-6:#d35a21
|
||||
app-warning-color-7:#ba431b
|
||||
app-warning-color-8:#9e3610
|
||||
app-warning-color-9:#842b0b
|
||||
app-warning-color-10:#5a1907
|
||||
app-error-color-1:#fcebed
|
||||
app-error-color-2:#f9d7d9
|
||||
app-error-color-3:#f8b9be
|
||||
app-error-color-4:#f78d94
|
||||
app-error-color-5:#f36d78
|
||||
app-error-color-6:#de4753
|
||||
app-error-color-7:#c9353f
|
||||
app-error-color-8:#b11f26
|
||||
app-error-color-9:#951114
|
||||
app-error-color-10:#680506
|
||||
app-success-color-1:#e1faf0
|
||||
app-success-color-2:#bcebdc
|
||||
app-success-color-3:#85dbbe
|
||||
app-success-color-4:#48c79c
|
||||
app-success-color-5:#00a66e
|
||||
app-success-color-6:#078a5a
|
||||
app-success-color-7:#067543
|
||||
app-success-color-8:#056334
|
||||
app-success-color-9:#044f2a
|
||||
app-success-color-10:#033318
|
||||
app-gray-color-1:#f7f9fc
|
||||
app-gray-color-2:#eceff5
|
||||
app-gray-color-3:#dfe4ed
|
||||
app-gray-color-4:#d3d9e5
|
||||
app-gray-color-5:#c9ceda
|
||||
app-gray-color-6:#a9b1c2
|
||||
app-gray-color-7:#919aae
|
||||
app-gray-color-8:#737d92
|
||||
app-gray-color-9:#5a6477
|
||||
app-gray-color-10:#424b5e
|
||||
App.background=darken(@background,5%)
|
||||
App.accentColor=@accentBaseColor
|
||||
App.titleBarBackground=@background
|
||||
@ -66,38 +61,24 @@ App.titleBarForeground=@foreground
|
||||
App.borderColor=#fff3
|
||||
App.tabbedPaneHeardBackground=@background
|
||||
App.hoverBackground=$Button.hoverBackground
|
||||
|
||||
|
||||
|
||||
|
||||
Button.margin = @componentMargin
|
||||
|
||||
|
||||
|
||||
TextComponent.arc = 10
|
||||
Component.arc = 10
|
||||
Button.arc = 10
|
||||
Button.margin=@componentMargin
|
||||
TextComponent.arc=10
|
||||
Component.arc=10
|
||||
Button.arc=10
|
||||
ProgressBar.arc=10
|
||||
Component.focusWidth = 0
|
||||
Component.focusColor = @accentColor
|
||||
|
||||
Component.focusWidth=0
|
||||
Component.focusColor=@accentColor
|
||||
#Button
|
||||
Button.background = @accentColor
|
||||
Button.borderColor = @accentColor
|
||||
Button.background=@accentColor
|
||||
Button.borderColor=@accentColor
|
||||
defaultFont=14
|
||||
|
||||
|
||||
TableHeader.height=40
|
||||
#TableHeader.separatorColor = #fff
|
||||
TableHeader.background = lighten(@background,6%,derived)
|
||||
|
||||
TableHeader.background=lighten(@background,6%,derived)
|
||||
Table.showHorizontalLines=true
|
||||
Table.showVerticalLines=true
|
||||
Table.rowHeight=35
|
||||
|
||||
|
||||
#Table.gridColor = $Component.borderColor
|
||||
|
||||
#Table.intercellSpacing = 1,1
|
||||
Table.background=@background
|
||||
Table.cellFocusColor=@accentColor
|
||||
@ -106,13 +87,35 @@ TabbedPane.hoverColor=fade(@accentColor,25%)
|
||||
TabbedPane.font=bold
|
||||
TabbedPane.tabSelectionHeight=4
|
||||
Tree.rowHeight=50
|
||||
|
||||
TabbedPane.selectedBackground=fade(@accentColor,40%)
|
||||
TabbedPane.showTabSeparators = false
|
||||
|
||||
|
||||
|
||||
|
||||
TabbedPane.showTabSeparators=false
|
||||
|
||||
|
||||
[style]Label.info=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#a9b1c2; \
|
||||
foreground: #919aae; \
|
||||
background: #eceff5
|
||||
[style]Label.success=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#48c79c; \
|
||||
foreground: #1f9669; \
|
||||
background: #abf6d3
|
||||
[style]Label.primary=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#789aff; \
|
||||
foreground: #2d61fc; \
|
||||
background: #d1ddff
|
||||
[style]Label.warning=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#fbbf23; \
|
||||
foreground: #d97707; \
|
||||
background: #fffbeb
|
||||
[style]Label.danger=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#f87171; \
|
||||
foreground: #dc2625; \
|
||||
background: #fef2f2
|
||||
|
||||
|
||||
|
||||
|
@ -118,4 +118,31 @@ TabbedPane.background = #0000
|
||||
|
||||
|
||||
TabbedPane.hoverColor = #0003
|
||||
#TabbedPane.contentAreaColor = #ffffff
|
||||
#TabbedPane.contentAreaColor = #ffffff
|
||||
|
||||
|
||||
[style]Label.info=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#a9b1c2; \
|
||||
foreground: #919aae; \
|
||||
background: #eceff5
|
||||
[style]Label.success=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#48c79c; \
|
||||
foreground: #1f9669; \
|
||||
background: #abf6d3
|
||||
[style]Label.primary=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#789aff; \
|
||||
foreground: #2d61fc; \
|
||||
background: #d1ddff
|
||||
[style]Label.warning=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#fbbf23; \
|
||||
foreground: #d97707; \
|
||||
background: #fffbeb
|
||||
[style]Label.danger=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#f87171; \
|
||||
foreground: #dc2625; \
|
||||
background: #fef2f2
|
||||
|
@ -113,11 +113,31 @@ TabbedPane.contentAreaColor = $MenuBar.borderColor
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[style]Label.info=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#a9b1c2; \
|
||||
foreground: #919aae; \
|
||||
background: #eceff5
|
||||
[style]Label.success=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#48c79c; \
|
||||
foreground: #1f9669; \
|
||||
background: #abf6d3
|
||||
[style]Label.primary=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#789aff; \
|
||||
foreground: #2d61fc; \
|
||||
background: #d1ddff
|
||||
[style]Label.warning=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#fbbf23; \
|
||||
foreground: #d97707; \
|
||||
background: #fffbeb
|
||||
[style]Label.danger=\
|
||||
arc: 10; \
|
||||
border: 2,8,2,8,#f87171; \
|
||||
foreground: #dc2625; \
|
||||
background: #fef2f2
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M942.78 724.58c-38.64-41.52-110.94-103.98-110.94-308.58 0-155.4-108.96-279.8-255.88-310.32V64c0-35.34-28.64-64-63.96-64s-63.96 28.66-63.96 64v41.68C301.12 136.2 192.16 260.6 192.16 416c0 204.6-72.3 267.06-110.94 308.58-12 12.9-17.32 28.32-17.22 43.42 0.22 32.8 25.96 64 64.2 64h767.6c38.24 0 64-31.2 64.2-64 0.1-15.1-5.22-30.54-17.22-43.42zM199.06 736c42.44-55.94 88.84-148.66 89.06-318.84 0-0.4-0.12-0.76-0.12-1.16 0-123.72 100.28-224 224-224s224 100.28 224 224c0 0.4-0.12 0.76-0.12 1.16 0.22 170.2 46.62 262.92 89.06 318.84H199.06zM512 1024c70.64 0 127.94-57.3 127.94-128H384.06c0 70.7 57.3 128 127.94 128z" fill="#6e6e6e" /></svg>
|
After Width: | Height: | Size: 900 B |
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M926.288 609.632C825.12 746.352 677.12 832.8 511.888 832.8c-165.232 0-313.232-86.448-414.4-223.168-44.64-60.368-44.64-150.08 0-210.464C198.672 262.448 346.672 176 511.904 176c165.248 0 313.248 86.448 414.4 223.168 44.656 60.384 44.656 150.096 0 210.464z m-44.928-160.88c-93.824-135.376-228.864-213.024-370.48-213.024-141.632 0-276.672 77.648-370.496 213.024-22.352 32.256-22.352 79.072 0 111.328C234.208 695.456 369.248 773.12 510.88 773.12c141.616 0 276.656-77.664 370.48-213.056 22.368-32.24 22.368-79.056 0-111.312zM512.192 713.296c-115.472 0-209.072-93.6-209.072-209.072 0-115.456 93.6-209.056 209.072-209.056 115.456 0 209.056 93.6 209.056 209.056 0 115.472-93.6 209.072-209.056 209.072z m0-358.4a149.328 149.328 0 0 0-149.328 149.328 149.328 149.328 0 0 0 149.328 149.344 149.328 149.328 0 0 0 149.328-149.344 149.328 149.328 0 0 0-149.328-149.328z"
|
||||
fill="#6e6e6e"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M891.136 667.904l-84.0704-116.3776V438.4768c0-111.6672-66.0992-211.8656-169.8816-260.096-11.4688-60.2112-66.7648-106.2912-132.0448-106.2912s-120.576 46.08-132.0448 106.2912c-103.7824 48.2304-169.8816 148.48-169.8816 260.096v127.1808l-70.2976 104.96c-18.944 28.3136-20.736 63.0784-4.7104 93.0304 16.5376 30.976 49.152 50.176 85.1456 50.176h139.4688c9.9328 73.3696 72.96 130.1504 149.0432 130.1504h22.2208c82.944 0 150.4256-67.4816 150.4256-150.4256 0-23.0912-18.7904-41.8304-41.8304-41.8304H393.3184c-2.5088 0-4.9664 0.256-7.3728 0.7168h-172.544c-13.4656 0-25.0368-6.6048-30.9248-17.664-2.4576-4.608-7.2192-16.7424 1.5872-29.9008l75.4688-112.7424c3.3792-5.0688 5.1712-11.008 5.1712-17.1008V438.4768c0-92.3136 58.2144-174.8992 148.2752-210.3808a30.75584 30.75584 0 0 0 19.456-27.9552c0.768-36.7616 33.4336-66.6624 72.7552-66.6624s71.9872 29.9008 72.7552 66.6624a30.75584 30.75584 0 0 0 19.456 27.9552c90.0608 35.4816 148.2752 118.0672 148.2752 210.3808v123.0336c0 6.4512 2.048 12.7488 5.8368 17.9712l89.856 124.416c9.5232 13.1584 4.9152 25.6 2.4576 30.3104-5.8368 11.3664-17.4592 18.176-31.1808 18.176h-30.5664c-16.9472 0-30.72 13.7728-30.72 30.72s13.7728 30.72 30.72 30.72h30.5664c36.7104 0 69.5808-19.7632 85.8624-51.6096 15.7696-30.8736 13.0048-66.0992-7.3728-94.3104z m-367.0016 214.6304h-22.2208c-42.1376 0-77.5168-29.44-86.6816-68.8128 1.3824-0.1024 2.7648-0.3072 4.096-0.5632h191.6416c-8.96 39.6288-44.4928 69.376-86.8352 69.376z" fill="#474747" /><path d="M362.5984 546.7136c-14.592 0-27.4944-10.3936-30.208-25.2416-17.152-94.8736 9.7792-152.8832 33.8944-183.9616 13.056-16.8448 39.0144-15.2064 50.2272 2.9184 6.7072 10.8032 6.144 24.576-1.5872 34.7136-15.0528 19.8144-35.1744 61.44-22.3232 134.1952 2.56 14.3872-4.4032 29.2352-17.8688 34.9184-3.9936 1.6896-8.1408 2.4576-12.1344 2.4576z" fill="#4F95FC" /></svg>
|
After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#6E6E6E"
|
||||
d="M804.565333 170.666667c44.757333 0 80.768 36.736 80.768 81.792V693.333333c0 45.013333-36.010667 81.792-80.768 81.792l-181.589333-0.042666L512 888.405333l-111.018667-113.322666H219.434667A81.194667 81.194667 0 0 1 138.922667 699.733333l-0.256-6.357333V252.458667C138.666667 207.36 174.677333 170.666667 219.434667 170.666667z m0 64H219.434667a17.28 17.28 0 0 0-16.768 17.792V693.333333c0 9.941333 7.68 17.792 16.768 17.792h208.512L512 796.928l84.053333-85.802667h208.512a17.28 17.28 0 0 0 16.768-17.792V252.458667a17.28 17.28 0 0 0-16.768-17.792zM469.333333 341.333333a32 32 0 0 1 31.701334 27.648l0.298666 4.352V512H640a32 32 0 0 1 31.701333 27.648l0.298667 4.352a32 32 0 0 1-27.648 31.701333L640 576h-202.666667V373.333333A32 32 0 0 1 469.333333 341.333333z"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#6E6E6E" d="M171.5 548.5h92v97h-92zM650.644 418.5c0-12.783-10.374-23-23.156-23H324.694c-12.783 0-23.156 10.217-23.156 23s10.375 23 23.156 23h302.794c12.781 0 23.156-10.217 23.156-23zM465.393 598c0-12.783-10.374-22.5-23.156-22.5H324.694c-12.783 0-23.156 9.717-23.156 22.5s10.375 22.5 23.156 22.5h117.542c12.829 0 23.157-9.717 23.157-22.5zM448.921 928.5H121.804c-30.072 0-55.304-23.508-55.304-53.58V292.244c0-30.073 25.231-54.744 55.304-54.744H776.042c30.072 0 55.459 24.673 55.459 54.744v255.559c0 15.036 11.936 27.288 26.973 27.288 15.036 0 27.027-12.196 27.027-27.288V292.244c0-60.2-49.259-109.744-109.459-109.744H121.804c-60.2 0-110.304 49.544-110.304 109.744v582.675c0 60.2 50.104 108.581 110.304 108.581h327.117c15.036 0 27.288-12.437 27.288-27.528 0-15.035-12.196-27.472-27.288-27.472zM324.694 755.5c-12.783 0-23.156 9.717-23.156 22.5s10.375 22.5 23.156 22.5h58.771c12.783 0 23.156-9.717 23.156-22.5s-10.374-22.5-23.156-22.5h-58.771zM171.5 368.5h92v98h-92zM171.5 728.5h92v98h-92zM846.43 782.7c-8.131-5.013-7.852-22.833-9.189-27.956-1.504-5.736 1.225-19.491 10.246-30.685 9.245-11.472 24.893-20.326 25.06-22.109 1.615-17.82-3.842-37.869-23.612-51.569-11.472-7.964-27.621 9.801-46.11 11.026-12.53 0.835-20.773-10.414-23.39-12.307-37.367-27.12-12.362-60.701-15.871-66.604-3.119-5.235-27.789-24.225-51.791-17.932-22.443 5.847-15.537 33.692-32.578 45.721-5.401 3.788-21.106 4.4-30.295 3.341-31.799-3.62-36.309-44.05-58.362-38.091-21.385 5.791-39.094 22.889-40.375 36.81-1.281 14.424 15.537 23.556 14.814 38.649-0.39 7.853-9.467 17.153-12.92 23.613-2.84 5.29-15.649 13.31-30.295 13.755-11.918 0.39-25.339-6.627-33.414-4.622-5.848 1.448-16.484 12.92-17.82 23.89-1.615 13.199-7.406 25.339 1.726 38.76 9.801 14.424 21.551 6.682 35.696 19.825 9.021 8.409 7.295 18.6 7.964 23 1.393 9.467-1.225 25.506-10.246 36.533-6.349 7.741-20.215 11.305-22.554 18.767-7.351 23.612 8.019 44.273 18.377 52.181 14.201 10.86 36.197-9.021 54.074-10.024 9.912-0.556 17.542 7.741 22.554 13.755 6.516 7.852 13.142 17.542 13.142 30.463 0 9.969-5.847 22.331-2.284 30.907 6.126 14.925 29.571 22.165 46.611 22.165 21.941 0 22.22-29.682 34.471-43.828 8.855-10.246 20.271-7.964 24.003-8.13 7.24-0.39 20.494 0.724 31.52 10.024 5.847 4.956 8.799 18.21 14.59 22.109 11.527 7.796 22.499 7.741 27.956 4.789 12.14-6.515 23.724-10.414 33.636-25.895 6.682-10.414-11.75-25.617-11.917-43.215-0.111-15.816 14.145-28.513 16.93-32.578s18.489-10.246 30.908-9.801c13.977 0.445 26.341 4.677 28.624 3.564 8.688-4.4 9.969-8.744 14.424-19.825 4.065-10.08 4.4-16.484 4.4-27.789-0.054-17.322-23.61-21.388-38.703-30.687z m-169.295 88.322c-53.071 0-96.064-42.992-96.064-96.064 0-53.016 42.992-96.007 96.064-96.007 53.016 0 96.007 42.992 96.007 96.008 0.002 53.071-42.991 96.063-96.007 96.063zM903.696 40.5H98.65c-32.959 0-44.18 33.503-34.597 53.556 8.564 17.922 37.402 19.444 50.504 1.444h789.14c30.072 0 53.804 23.038 53.804 53.11v255.557c0 15.036 11.936 27.287 26.973 27.287 15.036 0 27.027-12.196 27.027-27.287V148.61C1011.5 88.41 963.896 40.5 903.696 40.5z" /></svg>
|
After Width: | Height: | Size: 3.2 KiB |
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#6E6E6E" d="M298.666667 192c-29.44 0-53.333333 23.893333-53.333334 53.333333V746.666667c0 29.44 23.893333 53.333333 53.333334 53.333333h213.333333a32 32 0 0 1 0 64H298.666667a117.333333 117.333333 0 0 1-117.333334-117.333333V245.333333A117.333333 117.333333 0 0 1 298.666667 128h426.666666a117.333333 117.333333 0 0 1 117.333334 117.333333v234.666667a32 32 0 0 1-64 0v-234.666667c0-29.44-23.893333-53.333333-53.333334-53.333333H298.666667z" /><path fill="#6E6E6E" d="M330.666667 288a32 32 0 0 0 0 64h341.333333a32 32 0 0 0 0-64h-341.333333zM330.666667 437.333333h213.333333a32 32 0 0 1 0 64h-213.333333a32 32 0 0 1 0-64zM789.333333 820.266667v-170.538667l-46.165333 38.485333a85.333333 85.333333 0 0 1-54.613333 19.754667H640v64h51.072a85.333333 85.333333 0 0 1 47.36 14.336l50.901333 33.962667z m-10.410666 44.373333l-64.170667-42.837333a42.666667 42.666667 0 0 0-23.68-7.168H640a42.453333 42.453333 0 0 1-34.133333-17.066667 42.453333 42.453333 0 0 1-8.533334-25.6v-64a42.453333 42.453333 0 0 1 17.066667-34.133333 42.453333 42.453333 0 0 1 25.6-8.533334h48.554667a42.666667 42.666667 0 0 0 27.306666-9.856l60.16-50.133333a33.536 33.536 0 0 1 22.869334-7.936c9.386667 0.298667 18.346667 4.522667 24.576 11.52 5.205333 5.802667 8.533333 13.568 8.533333 22.613333V836.266667c0 8.96-3.285333 16.768-8.533333 22.613333a34.773333 34.773333 0 0 1-20.949334 11.221333 33.621333 33.621333 0 0 1-23.594666-5.461333z" /></svg>
|
After Width: | Height: | Size: 1.7 KiB |