新增待办信息
This commit is contained in:
@@ -45,6 +45,7 @@ import java.io.Serial;
|
||||
@Column(name = "extra", attrName = "extra", label = "待办状态"),
|
||||
@Column(name = "extra_desc", attrName = "extraDesc", label = "待办意见"),
|
||||
@Column(name = "color", attrName = "color", label = "颜色值", isQuery = false),
|
||||
@Column(name = "ustatus", attrName = "ustatus", label = "发布状态"),
|
||||
@Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false),
|
||||
@Column(name = "login_user", attrName = "loginUser", label = "接收用户"),
|
||||
@Column(name = "user_name", attrName = "userName", label = "接收用户"),
|
||||
@@ -72,6 +73,7 @@ public class BizListItem extends DataEntity<BizListItem> implements Serializable
|
||||
private String extra; // 待办状态
|
||||
private String extraDesc; //待办意见
|
||||
private String color; // 颜色值
|
||||
private String ustatus;
|
||||
private Date updateTime; // 更新时间
|
||||
private String loginUser;
|
||||
private String userName;
|
||||
@@ -93,6 +95,7 @@ public class BizListItem extends DataEntity<BizListItem> implements Serializable
|
||||
@ExcelField(title = "是否关闭", attrName = "clickClose", dictType = "is_open", align = Align.CENTER, sort = 100),
|
||||
@ExcelField(title = "待办状态", attrName = "extra", align = Align.CENTER, sort = 110),
|
||||
@ExcelField(title = "待办意见", attrName = "extraDesc", align = Align.CENTER, sort = 120),
|
||||
@ExcelField(title = "发布状态", attrName = "ustatus", dictType = "release_status", align = Align.CENTER, sort = 130),
|
||||
})
|
||||
public BizListItem() {
|
||||
this(null);
|
||||
|
||||
@@ -35,7 +35,7 @@ import com.jeesite.modules.biz.entity.BizListItem;
|
||||
import com.jeesite.modules.biz.service.BizListItemService;
|
||||
|
||||
/**
|
||||
* 通知列表项表Controller
|
||||
* 通知表Controller
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2025-11-26
|
||||
@@ -105,7 +105,7 @@ public class BizListItemController extends BaseController {
|
||||
bizListItem.setCreateUser(user.getLoginCode());
|
||||
bizListItem.setAvatar(IpUtils.getServerHttp() + user.getAvatar());
|
||||
bizListItemService.save(bizListItem);
|
||||
return renderResult(Global.TRUE, text("保存通知列表项成功!"));
|
||||
return renderResult(Global.TRUE, text("保存通知成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,8 +115,8 @@ public class BizListItemController extends BaseController {
|
||||
@RequestMapping(value = "exportData")
|
||||
public void exportData(BizListItem bizListItem, HttpServletResponse response) {
|
||||
List<BizListItem> list = bizListItemService.findList(bizListItem);
|
||||
String fileName = "通知列表项表" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
||||
try (ExcelExport ee = new ExcelExport("通知列表项", BizListItem.class)) {
|
||||
String fileName = "通知表" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
||||
try (ExcelExport ee = new ExcelExport("通知", BizListItem.class)) {
|
||||
ee.setDataList(list).write(response, fileName);
|
||||
}
|
||||
}
|
||||
@@ -129,8 +129,8 @@ public class BizListItemController extends BaseController {
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
BizListItem bizListItem = new BizListItem();
|
||||
List<BizListItem> list = ListUtils.newArrayList(bizListItem);
|
||||
String fileName = "通知列表项表模板.xlsx";
|
||||
try (ExcelExport ee = new ExcelExport("通知列表项", BizListItem.class, Type.IMPORT)) {
|
||||
String fileName = "通知表模板.xlsx";
|
||||
try (ExcelExport ee = new ExcelExport("通知", BizListItem.class, Type.IMPORT)) {
|
||||
ee.setDataList(list).write(response, fileName);
|
||||
}
|
||||
}
|
||||
@@ -158,14 +158,26 @@ public class BizListItemController extends BaseController {
|
||||
@ResponseBody
|
||||
public String delete(BizListItem bizListItem) {
|
||||
bizListItemService.delete(bizListItem);
|
||||
return renderResult(Global.TRUE, text("删除通知列表项成功!"));
|
||||
return renderResult(Global.TRUE, text("删除通知成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布数据
|
||||
*/
|
||||
@RequiresPermissions("biz:listItem:edit")
|
||||
@RequestMapping(value = "release")
|
||||
@ResponseBody
|
||||
public String release(BizListItem bizListItem) {
|
||||
bizListItem.setUstatus("1");
|
||||
bizListItemService.update(bizListItem);
|
||||
return renderResult(Global.TRUE, text("发布通知成功!"));
|
||||
}
|
||||
|
||||
@RequestMapping(value = "sflow")
|
||||
@ResponseBody
|
||||
public String sflow(BizListItem bizListItem) {
|
||||
bizListItemService.update(bizListItem);
|
||||
return renderResult(Global.TRUE, text("操作通知列表项成功!"));
|
||||
return renderResult(Global.TRUE, text("操作通知成功!"));
|
||||
}
|
||||
|
||||
|
||||
@@ -178,6 +190,7 @@ public class BizListItemController extends BaseController {
|
||||
BizListItem listItem = new BizListItem();
|
||||
listItem.setClickClose("0");
|
||||
listItem.setTitleDelete("0");
|
||||
listItem.setUstatus("1");
|
||||
listItem.setType(type.getCode());
|
||||
listItem.setDateTime_gte(new Date());
|
||||
if (type.getCode().equals("3")) {
|
||||
|
||||
@@ -75,4 +75,5 @@ export const bizListItemSflow = (params?: BizListItem | any) =>
|
||||
export const bizListItemDelete = (params?: BizListItem | any) =>
|
||||
defHttp.get<BizListItem>({ url: adminPath + '/biz/listItem/delete', params });
|
||||
|
||||
|
||||
export const bizListItemRelease = (params?: BizListItem | any) =>
|
||||
defHttp.get<BizListItem>({ url: adminPath + '/biz/listItem/release', params });
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
format: 'YYYY-MM-DD HH:mm',
|
||||
showTime: { format: 'HH:mm' },
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
label: t('所属类型'),
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { BasicTable, BasicColumn, useTable } from '@jeesite/core/components/Table';
|
||||
import { BizListItem, bizListItemList } from '@jeesite/biz/api/biz/listItem';
|
||||
import { bizListItemDelete, bizListItemListData } from '@jeesite/biz/api/biz/listItem';
|
||||
import { bizListItemDelete, bizListItemRelease, bizListItemListData } from '@jeesite/biz/api/biz/listItem';
|
||||
import { useModal } from '@jeesite/core/components/Modal';
|
||||
import { FormProps } from '@jeesite/core/components/Form';
|
||||
import InputForm from './form.vue';
|
||||
@@ -98,7 +98,7 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('待办状态'),
|
||||
label: t('待办描述'),
|
||||
field: 'extra',
|
||||
component: 'Input',
|
||||
},
|
||||
@@ -204,7 +204,7 @@
|
||||
dictType: 'is_open',
|
||||
},
|
||||
{
|
||||
title: t('待办状态'),
|
||||
title: t('待办描述'),
|
||||
dataIndex: 'extra',
|
||||
key: 'a.extra',
|
||||
sorter: true,
|
||||
@@ -219,6 +219,15 @@
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('发布状态'),
|
||||
dataIndex: 'ustatus',
|
||||
key: 'a.ustatus',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'release_status',
|
||||
},
|
||||
{
|
||||
title: t('更新时间'),
|
||||
dataIndex: 'updateTime',
|
||||
@@ -248,7 +257,19 @@
|
||||
confirm: handleDelete.bind(this, record),
|
||||
},
|
||||
auth: 'biz:listItem:edit',
|
||||
ifShow: record.titleDelete == '1'
|
||||
},
|
||||
{
|
||||
icon: 'simple-line-icons:arrow-right-circle',
|
||||
color: 'error',
|
||||
title: t('发布'),
|
||||
popConfirm: {
|
||||
title: t('是否确认发布信息?'),
|
||||
confirm: handleRelease.bind(this, record),
|
||||
},
|
||||
auth: 'biz:listItem:edit',
|
||||
ifShow: record.ustatus == '0'
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -305,6 +326,13 @@
|
||||
showMessage(res.message);
|
||||
await handleSuccess(record);
|
||||
}
|
||||
|
||||
async function handleRelease(record: Recordable){
|
||||
const params = { id: record.id };
|
||||
const res = await bizListItemRelease(params);
|
||||
showMessage(res.message);
|
||||
await handleSuccess(record);
|
||||
}
|
||||
|
||||
async function handleSuccess(record: Recordable) {
|
||||
await reload({ record });
|
||||
|
||||
@@ -60,21 +60,15 @@
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('待办状态'),
|
||||
label: t('待办描述'),
|
||||
field: 'extra',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
maxlength: 8,
|
||||
},
|
||||
required: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('待办意见'),
|
||||
field: 'extraDesc',
|
||||
component: 'InputTextArea',
|
||||
required: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('是否关闭'),
|
||||
field: 'clickClose',
|
||||
@@ -95,13 +89,13 @@
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
label: t('内容信息'),
|
||||
field: 'description',
|
||||
component: 'InputTextArea',
|
||||
required: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('待办意见'),
|
||||
field: 'extraDesc',
|
||||
component: 'InputTextArea',
|
||||
required: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
];
|
||||
|
||||
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizListItem>({
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('待办状态'),
|
||||
label: t('待办描述'),
|
||||
field: 'extra',
|
||||
component: 'Input',
|
||||
},
|
||||
@@ -179,7 +179,7 @@
|
||||
dictType: 'is_open',
|
||||
},
|
||||
{
|
||||
title: t('待办状态'),
|
||||
title: t('待办描述'),
|
||||
dataIndex: 'extra',
|
||||
key: 'a.extra',
|
||||
sorter: true,
|
||||
@@ -226,6 +226,7 @@
|
||||
return {
|
||||
...params,
|
||||
type : '3',
|
||||
ustatus: '1',
|
||||
loginUser : userinfo.value.loginCode ,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user