代码生成
This commit is contained in:
parent
9747306aeb
commit
eddd2c12ab
@ -0,0 +1,112 @@
|
||||
package com.ruoyi.base.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.base.domain.BaseCalendar;
|
||||
import com.ruoyi.base.service.IBaseCalendarService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 日历Controller
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/calendar")
|
||||
public class BaseCalendarController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBaseCalendarService baseCalendarService;
|
||||
|
||||
/**
|
||||
* 查询日历列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:list')")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(BaseCalendar baseCalendar,
|
||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
||||
{
|
||||
Page<BaseCalendar> page = new Page<>(pageNum, pageSize);
|
||||
IPage<BaseCalendar> list = baseCalendarService.queryListPage(baseCalendar,page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出日历列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:export')")
|
||||
@Log(title = "日历", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseCalendar baseCalendar)
|
||||
{
|
||||
List<BaseCalendar> list = baseCalendarService.list();
|
||||
ExcelUtil<BaseCalendar> util = new ExcelUtil<BaseCalendar>(BaseCalendar.class);
|
||||
util.exportExcel(response, list, "日历数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取日历详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(baseCalendarService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增日历
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:add')")
|
||||
@Log(title = "日历", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseCalendar baseCalendar)
|
||||
{
|
||||
return toAjax(baseCalendarService.save(baseCalendar));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改日历
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:edit')")
|
||||
@Log(title = "日历", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseCalendar baseCalendar)
|
||||
{
|
||||
return toAjax(baseCalendarService.updateById(baseCalendar));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除日历
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:calendar:remove')")
|
||||
@Log(title = "日历", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
return toAjax(baseCalendarService.removeByIds(list));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,112 @@
|
||||
package com.ruoyi.base.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.base.domain.BaseCalendarEvent;
|
||||
import com.ruoyi.base.service.IBaseCalendarEventService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 节日Controller
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/event")
|
||||
public class BaseCalendarEventController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBaseCalendarEventService baseCalendarEventService;
|
||||
|
||||
/**
|
||||
* 查询节日列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:event:list')")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(BaseCalendarEvent baseCalendarEvent,
|
||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
||||
{
|
||||
Page<BaseCalendarEvent> page = new Page<>(pageNum, pageSize);
|
||||
IPage<BaseCalendarEvent> list = baseCalendarEventService.queryListPage(baseCalendarEvent,page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出节日列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:event:export')")
|
||||
@Log(title = "节日", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseCalendarEvent baseCalendarEvent)
|
||||
{
|
||||
List<BaseCalendarEvent> list = baseCalendarEventService.list();
|
||||
ExcelUtil<BaseCalendarEvent> util = new ExcelUtil<BaseCalendarEvent>(BaseCalendarEvent.class);
|
||||
util.exportExcel(response, list, "节日数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取节日详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:event:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(baseCalendarEventService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增节日
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:event:add')")
|
||||
@Log(title = "节日", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseCalendarEvent baseCalendarEvent)
|
||||
{
|
||||
return toAjax(baseCalendarEventService.save(baseCalendarEvent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改节日
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:event:edit')")
|
||||
@Log(title = "节日", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseCalendarEvent baseCalendarEvent)
|
||||
{
|
||||
return toAjax(baseCalendarEventService.updateById(baseCalendarEvent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除节日
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:event:remove')")
|
||||
@Log(title = "节日", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
return toAjax(baseCalendarEventService.removeByIds(list));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,112 @@
|
||||
package com.ruoyi.base.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.base.domain.BaseCountry;
|
||||
import com.ruoyi.base.service.IBaseCountryService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 国家地区Controller
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/country")
|
||||
public class BaseCountryController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBaseCountryService baseCountryService;
|
||||
|
||||
/**
|
||||
* 查询国家地区列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:country:list')")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(BaseCountry baseCountry,
|
||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
||||
{
|
||||
Page<BaseCountry> page = new Page<>(pageNum, pageSize);
|
||||
IPage<BaseCountry> list = baseCountryService.queryListPage(baseCountry,page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出国家地区列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:country:export')")
|
||||
@Log(title = "国家地区", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseCountry baseCountry)
|
||||
{
|
||||
List<BaseCountry> list = baseCountryService.list();
|
||||
ExcelUtil<BaseCountry> util = new ExcelUtil<BaseCountry>(BaseCountry.class);
|
||||
util.exportExcel(response, list, "国家地区数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取国家地区详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:country:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(baseCountryService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增国家地区
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:country:add')")
|
||||
@Log(title = "国家地区", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseCountry baseCountry)
|
||||
{
|
||||
return toAjax(baseCountryService.save(baseCountry));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改国家地区
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:country:edit')")
|
||||
@Log(title = "国家地区", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseCountry baseCountry)
|
||||
{
|
||||
return toAjax(baseCountryService.updateById(baseCountry));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除国家地区
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:country:remove')")
|
||||
@Log(title = "国家地区", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
return toAjax(baseCountryService.removeByIds(list));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,112 @@
|
||||
package com.ruoyi.base.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.base.domain.BaseDynamicField;
|
||||
import com.ruoyi.base.service.IBaseDynamicFieldService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 动态单字段Controller
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/field")
|
||||
public class BaseDynamicFieldController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBaseDynamicFieldService baseDynamicFieldService;
|
||||
|
||||
/**
|
||||
* 查询动态单字段列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:field:list')")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(BaseDynamicField baseDynamicField,
|
||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
||||
{
|
||||
Page<BaseDynamicField> page = new Page<>(pageNum, pageSize);
|
||||
IPage<BaseDynamicField> list = baseDynamicFieldService.queryListPage(baseDynamicField,page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出动态单字段列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:field:export')")
|
||||
@Log(title = "动态单字段", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseDynamicField baseDynamicField)
|
||||
{
|
||||
List<BaseDynamicField> list = baseDynamicFieldService.list();
|
||||
ExcelUtil<BaseDynamicField> util = new ExcelUtil<BaseDynamicField>(BaseDynamicField.class);
|
||||
util.exportExcel(response, list, "动态单字段数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取动态单字段详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:field:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(baseDynamicFieldService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增动态单字段
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:field:add')")
|
||||
@Log(title = "动态单字段", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseDynamicField baseDynamicField)
|
||||
{
|
||||
return toAjax(baseDynamicFieldService.save(baseDynamicField));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改动态单字段
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:field:edit')")
|
||||
@Log(title = "动态单字段", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseDynamicField baseDynamicField)
|
||||
{
|
||||
return toAjax(baseDynamicFieldService.updateById(baseDynamicField));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除动态单字段
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:field:remove')")
|
||||
@Log(title = "动态单字段", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
return toAjax(baseDynamicFieldService.removeByIds(list));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.ruoyi.base.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||
|
||||
/**
|
||||
* 日历对象 base_calendar
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@TableName("base_calendar")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BaseCalendar extends DlBaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/** 公历年份(如2025) */
|
||||
@Excel(name = "公历年份(如2025)")
|
||||
private Long year;
|
||||
|
||||
/** 公历月份(1-12) */
|
||||
@Excel(name = "公历月份(1-12)")
|
||||
private Long month;
|
||||
|
||||
/** 公历日期(1-31) */
|
||||
@Excel(name = "公历日期(1-31)")
|
||||
private Long day;
|
||||
|
||||
/** 农历日期(“初八”“十二”“九月”) */
|
||||
@Excel(name = "农历日期", readConverterExp = "“=初八”“十二”“九月”")
|
||||
private String lunarDate;
|
||||
|
||||
/** 星期(1 = 周一,2 = 周二,...,7 = 周日) */
|
||||
@Excel(name = "星期", readConverterExp = "1=,==,周=一,2,==,周=二,...,7,==,周=日")
|
||||
private Long weekday;
|
||||
|
||||
/** 第几周(全年) */
|
||||
@Excel(name = "第几周", readConverterExp = "全=年")
|
||||
private Long week;
|
||||
|
||||
/** 法定作息状态(休-休息、班-加班、空-正常) */
|
||||
@Excel(name = "法定作息状态", readConverterExp = "休=-休息、班-加班、空-正常")
|
||||
private String workStatus;
|
||||
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.ruoyi.base.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||
|
||||
/**
|
||||
* 节日对象 base_calendar_event
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@TableName("base_calendar_event")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BaseCalendarEvent extends DlBaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/** 日期ID(base_calendar表ID) */
|
||||
@Excel(name = "日期ID(base_calendar表ID)")
|
||||
private String dateId;
|
||||
|
||||
/** 国家名称 */
|
||||
@Excel(name = "国家名称")
|
||||
private String country;
|
||||
|
||||
/** 节日名称 */
|
||||
@Excel(name = "节日名称")
|
||||
private String eventName;
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.ruoyi.base.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||
|
||||
/**
|
||||
* 国家地区对象 base_country
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@TableName("base_country")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BaseCountry extends DlBaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/** 国家名称(英文标准名称) */
|
||||
@Excel(name = "国家名称", readConverterExp = "英=文标准名称")
|
||||
private String nameEn;
|
||||
|
||||
/** 国家名称(中文) */
|
||||
@Excel(name = "国家名称", readConverterExp = "中=文")
|
||||
private String nameCn;
|
||||
|
||||
/** 国旗 */
|
||||
@Excel(name = "国旗")
|
||||
private String img;
|
||||
|
||||
/** 所属大洲(中文) */
|
||||
@Excel(name = "所属大洲(中文)")
|
||||
private String continent;
|
||||
|
||||
/** 所用时区 */
|
||||
@Excel(name = "所用时区")
|
||||
private String zoneId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.base.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||
|
||||
/**
|
||||
* 动态单字段对象 base_dynamic_field
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@TableName("base_dynamic_field")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BaseDynamicField extends DlBaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/** 所属对象 */
|
||||
@Excel(name = "所属对象")
|
||||
private String belongEntity;
|
||||
|
||||
/** 所属类目 */
|
||||
@Excel(name = "所属类目")
|
||||
private String category;
|
||||
|
||||
/** 字段类型 */
|
||||
@Excel(name = "字段类型")
|
||||
private String fieldType;
|
||||
|
||||
/** 字段编码 */
|
||||
@Excel(name = "字段编码")
|
||||
private String fieldCode;
|
||||
|
||||
/** 字段显示名称 */
|
||||
@Excel(name = "字段显示名称")
|
||||
private String fieldLabel;
|
||||
|
||||
/** 显示顺序 */
|
||||
@Excel(name = "显示顺序")
|
||||
private Long sort;
|
||||
|
||||
/** 是否必填 */
|
||||
@Excel(name = "是否必填")
|
||||
private Integer ifRequired;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新时间 */
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.base.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.base.domain.BaseCalendarEvent;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 节日Mapper接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseCalendarEventMapper extends BaseMapper<BaseCalendarEvent>
|
||||
{
|
||||
IPage<BaseCalendarEvent> queryListPage(@Param("entity") BaseCalendarEvent entity, Page<BaseCalendarEvent> page);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.base.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.base.domain.BaseCalendar;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 日历Mapper接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseCalendarMapper extends BaseMapper<BaseCalendar>
|
||||
{
|
||||
IPage<BaseCalendar> queryListPage(@Param("entity") BaseCalendar entity, Page<BaseCalendar> page);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.base.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.base.domain.BaseCountry;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 国家地区Mapper接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseCountryMapper extends BaseMapper<BaseCountry>
|
||||
{
|
||||
IPage<BaseCountry> queryListPage(@Param("entity") BaseCountry entity, Page<BaseCountry> page);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.base.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.base.domain.BaseDynamicField;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 动态单字段Mapper接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseDynamicFieldMapper extends BaseMapper<BaseDynamicField>
|
||||
{
|
||||
IPage<BaseDynamicField> queryListPage(@Param("entity") BaseDynamicField entity, Page<BaseDynamicField> page);
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.base.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.base.domain.BaseCalendarEvent;
|
||||
|
||||
/**
|
||||
* 节日Service接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
public interface IBaseCalendarEventService extends IService<BaseCalendarEvent>
|
||||
{
|
||||
IPage<BaseCalendarEvent> queryListPage(BaseCalendarEvent pageReqVO, Page<BaseCalendarEvent> page);
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.base.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.base.domain.BaseCalendar;
|
||||
|
||||
/**
|
||||
* 日历Service接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
public interface IBaseCalendarService extends IService<BaseCalendar>
|
||||
{
|
||||
IPage<BaseCalendar> queryListPage(BaseCalendar pageReqVO, Page<BaseCalendar> page);
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.base.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.base.domain.BaseCountry;
|
||||
|
||||
/**
|
||||
* 国家地区Service接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
public interface IBaseCountryService extends IService<BaseCountry>
|
||||
{
|
||||
IPage<BaseCountry> queryListPage(BaseCountry pageReqVO, Page<BaseCountry> page);
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.base.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.base.domain.BaseDynamicField;
|
||||
|
||||
/**
|
||||
* 动态单字段Service接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
public interface IBaseDynamicFieldService extends IService<BaseDynamicField>
|
||||
{
|
||||
IPage<BaseDynamicField> queryListPage(BaseDynamicField pageReqVO, Page<BaseDynamicField> page);
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.ruoyi.base.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.base.mapper.BaseCalendarEventMapper;
|
||||
import com.ruoyi.base.domain.BaseCalendarEvent;
|
||||
import com.ruoyi.base.service.IBaseCalendarEventService;
|
||||
|
||||
/**
|
||||
* 节日Service业务层处理
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@Service
|
||||
public class BaseCalendarEventServiceImpl extends ServiceImpl<BaseCalendarEventMapper,BaseCalendarEvent> implements IBaseCalendarEventService
|
||||
{
|
||||
@Autowired
|
||||
private BaseCalendarEventMapper baseCalendarEventMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BaseCalendarEvent> queryListPage(BaseCalendarEvent pageReqVO, Page<BaseCalendarEvent> page) {
|
||||
return baseCalendarEventMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.ruoyi.base.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.base.mapper.BaseCalendarMapper;
|
||||
import com.ruoyi.base.domain.BaseCalendar;
|
||||
import com.ruoyi.base.service.IBaseCalendarService;
|
||||
|
||||
/**
|
||||
* 日历Service业务层处理
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@Service
|
||||
public class BaseCalendarServiceImpl extends ServiceImpl<BaseCalendarMapper,BaseCalendar> implements IBaseCalendarService
|
||||
{
|
||||
@Autowired
|
||||
private BaseCalendarMapper baseCalendarMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BaseCalendar> queryListPage(BaseCalendar pageReqVO, Page<BaseCalendar> page) {
|
||||
return baseCalendarMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.ruoyi.base.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.base.mapper.BaseCountryMapper;
|
||||
import com.ruoyi.base.domain.BaseCountry;
|
||||
import com.ruoyi.base.service.IBaseCountryService;
|
||||
|
||||
/**
|
||||
* 国家地区Service业务层处理
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@Service
|
||||
public class BaseCountryServiceImpl extends ServiceImpl<BaseCountryMapper,BaseCountry> implements IBaseCountryService
|
||||
{
|
||||
@Autowired
|
||||
private BaseCountryMapper baseCountryMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BaseCountry> queryListPage(BaseCountry pageReqVO, Page<BaseCountry> page) {
|
||||
return baseCountryMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.ruoyi.base.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.base.mapper.BaseDynamicFieldMapper;
|
||||
import com.ruoyi.base.domain.BaseDynamicField;
|
||||
import com.ruoyi.base.service.IBaseDynamicFieldService;
|
||||
|
||||
/**
|
||||
* 动态单字段Service业务层处理
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@Service
|
||||
public class BaseDynamicFieldServiceImpl extends ServiceImpl<BaseDynamicFieldMapper,BaseDynamicField> implements IBaseDynamicFieldService
|
||||
{
|
||||
@Autowired
|
||||
private BaseDynamicFieldMapper baseDynamicFieldMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BaseDynamicField> queryListPage(BaseDynamicField pageReqVO, Page<BaseDynamicField> page) {
|
||||
return baseDynamicFieldMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.base.mapper.BaseCalendarEventMapper">
|
||||
|
||||
<resultMap type="BaseCalendarEvent" id="BaseCalendarEventResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="dateId" column="date_id" />
|
||||
<result property="country" column="country" />
|
||||
<result property="eventName" column="event_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseCalendarEventVo">
|
||||
select id, date_id, country, event_name from base_calendar_event
|
||||
</sql>
|
||||
|
||||
<select id="queryListPage" parameterType="BaseCalendarEvent" resultMap="BaseCalendarEventResult">
|
||||
<include refid="selectBaseCalendarEventVo"/>
|
||||
<where>
|
||||
<if test="entity.dateId != null and entity.dateId != ''"> and date_id = #{entity.dateId}</if>
|
||||
<if test="entity.country != null and entity.country != ''"> and country = #{entity.country}</if>
|
||||
<if test="entity.eventName != null and entity.eventName != ''"> and event_name like concat('%', #{entity.eventName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.base.mapper.BaseCalendarMapper">
|
||||
|
||||
<resultMap type="BaseCalendar" id="BaseCalendarResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="year" column="year" />
|
||||
<result property="month" column="month" />
|
||||
<result property="day" column="day" />
|
||||
<result property="lunarDate" column="lunar_date" />
|
||||
<result property="weekday" column="weekday" />
|
||||
<result property="week" column="week" />
|
||||
<result property="workStatus" column="work_status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseCalendarVo">
|
||||
select id, year, month, day, lunar_date, weekday, week, work_status from base_calendar
|
||||
</sql>
|
||||
|
||||
<select id="queryListPage" parameterType="BaseCalendar" resultMap="BaseCalendarResult">
|
||||
<include refid="selectBaseCalendarVo"/>
|
||||
<where>
|
||||
<if test="entity.year != null "> and year = #{entity.year}</if>
|
||||
<if test="entity.month != null "> and month = #{entity.month}</if>
|
||||
<if test="entity.day != null "> and day = #{entity.day}</if>
|
||||
<if test="entity.lunarDate != null and entity.lunarDate != ''"> and lunar_date = #{entity.lunarDate}</if>
|
||||
<if test="entity.weekday != null "> and weekday = #{entity.weekday}</if>
|
||||
<if test="entity.week != null "> and week = #{entity.week}</if>
|
||||
<if test="entity.workStatus != null and entity.workStatus != ''"> and work_status = #{entity.workStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.base.mapper.BaseCountryMapper">
|
||||
|
||||
<resultMap type="BaseCountry" id="BaseCountryResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="nameEn" column="name_en" />
|
||||
<result property="nameCn" column="name_cn" />
|
||||
<result property="img" column="img" />
|
||||
<result property="continent" column="continent" />
|
||||
<result property="zoneId" column="zone_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseCountryVo">
|
||||
select id, name_en, name_cn, img, continent, zone_id from base_country
|
||||
</sql>
|
||||
|
||||
<select id="queryListPage" parameterType="BaseCountry" resultMap="BaseCountryResult">
|
||||
<include refid="selectBaseCountryVo"/>
|
||||
<where>
|
||||
<if test="entity.nameEn != null and entity.nameEn != ''"> and name_en = #{entity.nameEn}</if>
|
||||
<if test="entity.nameCn != null and entity.nameCn != ''"> and name_cn = #{entity.nameCn}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.base.mapper.BaseDynamicFieldMapper">
|
||||
|
||||
<resultMap type="BaseDynamicField" id="BaseDynamicFieldResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="belongEntity" column="belong_entity" />
|
||||
<result property="category" column="category" />
|
||||
<result property="fieldType" column="field_type" />
|
||||
<result property="fieldCode" column="field_code" />
|
||||
<result property="fieldLabel" column="field_label" />
|
||||
<result property="sort" column="sort" />
|
||||
<result property="ifRequired" column="if_required" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="createdTime" column="created_time" />
|
||||
<result property="updater" column="updater" />
|
||||
<result property="updatedTime" column="updated_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseDynamicFieldVo">
|
||||
select id, belong_entity, category, field_type, field_code, field_label, sort, if_required, del_flag, creator, created_time, updater, updated_time from base_dynamic_field
|
||||
</sql>
|
||||
|
||||
<select id="queryListPage" parameterType="BaseDynamicField" resultMap="BaseDynamicFieldResult">
|
||||
<include refid="selectBaseDynamicFieldVo"/>
|
||||
<where>
|
||||
<if test="entity.belongEntity != null and entity.belongEntity != ''"> and belong_entity = #{entity.belongEntity}</if>
|
||||
<if test="entity.category != null and entity.category != ''"> and category = #{entity.category}</if>
|
||||
<if test="entity.fieldType != null and entity.fieldType != ''"> and field_type = #{entity.fieldType}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
44
dl_vue/src/api/base/calendar.js
Normal file
44
dl_vue/src/api/base/calendar.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询日历列表
|
||||
export function listCalendar(query) {
|
||||
return request({
|
||||
url: '/base/calendar/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询日历详细
|
||||
export function getCalendar(id) {
|
||||
return request({
|
||||
url: '/base/calendar/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增日历
|
||||
export function addCalendar(data) {
|
||||
return request({
|
||||
url: '/base/calendar',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改日历
|
||||
export function updateCalendar(data) {
|
||||
return request({
|
||||
url: '/base/calendar',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除日历
|
||||
export function delCalendar(id) {
|
||||
return request({
|
||||
url: '/base/calendar/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
dl_vue/src/api/base/country.js
Normal file
44
dl_vue/src/api/base/country.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询国家地区列表
|
||||
export function listCountry(query) {
|
||||
return request({
|
||||
url: '/base/country/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询国家地区详细
|
||||
export function getCountry(id) {
|
||||
return request({
|
||||
url: '/base/country/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增国家地区
|
||||
export function addCountry(data) {
|
||||
return request({
|
||||
url: '/base/country',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改国家地区
|
||||
export function updateCountry(data) {
|
||||
return request({
|
||||
url: '/base/country',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除国家地区
|
||||
export function delCountry(id) {
|
||||
return request({
|
||||
url: '/base/country/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
dl_vue/src/api/base/event.js
Normal file
44
dl_vue/src/api/base/event.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询节日列表
|
||||
export function listEvent(query) {
|
||||
return request({
|
||||
url: '/base/event/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询节日详细
|
||||
export function getEvent(id) {
|
||||
return request({
|
||||
url: '/base/event/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增节日
|
||||
export function addEvent(data) {
|
||||
return request({
|
||||
url: '/base/event',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改节日
|
||||
export function updateEvent(data) {
|
||||
return request({
|
||||
url: '/base/event',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除节日
|
||||
export function delEvent(id) {
|
||||
return request({
|
||||
url: '/base/event/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
dl_vue/src/api/base/field.js
Normal file
44
dl_vue/src/api/base/field.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询动态单字段列表
|
||||
export function listField(query) {
|
||||
return request({
|
||||
url: '/base/field/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询动态单字段详细
|
||||
export function getField(id) {
|
||||
return request({
|
||||
url: '/base/field/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增动态单字段
|
||||
export function addField(data) {
|
||||
return request({
|
||||
url: '/base/field',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改动态单字段
|
||||
export function updateField(data) {
|
||||
return request({
|
||||
url: '/base/field',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除动态单字段
|
||||
export function delField(id) {
|
||||
return request({
|
||||
url: '/base/field/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
dl_vue/src/api/base/zone.js
Normal file
44
dl_vue/src/api/base/zone.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询时区列表
|
||||
export function listZone(query) {
|
||||
return request({
|
||||
url: '/base/zone/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询时区详细
|
||||
export function getZone(id) {
|
||||
return request({
|
||||
url: '/base/zone/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增时区
|
||||
export function addZone(data) {
|
||||
return request({
|
||||
url: '/base/zone',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改时区
|
||||
export function updateZone(data) {
|
||||
return request({
|
||||
url: '/base/zone',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除时区
|
||||
export function delZone(id) {
|
||||
return request({
|
||||
url: '/base/zone/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
318
dl_vue/src/views/base/calendar/index.vue
Normal file
318
dl_vue/src/views/base/calendar/index.vue
Normal file
@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="公历年份(如2025)" prop="year">
|
||||
<el-input
|
||||
v-model="queryParams.year"
|
||||
placeholder="请输入公历年份(如2025)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="公历月份(1-12)" prop="month">
|
||||
<el-input
|
||||
v-model="queryParams.month"
|
||||
placeholder="请输入公历月份(1-12)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="公历日期(1-31)" prop="day">
|
||||
<el-input
|
||||
v-model="queryParams.day"
|
||||
placeholder="请输入公历日期(1-31)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="农历日期" prop="lunarDate">
|
||||
<el-input
|
||||
v-model="queryParams.lunarDate"
|
||||
placeholder="请输入农历日期"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="星期" prop="weekday">
|
||||
<el-input
|
||||
v-model="queryParams.weekday"
|
||||
placeholder="请输入星期"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="第几周" prop="week">
|
||||
<el-input
|
||||
v-model="queryParams.week"
|
||||
placeholder="请输入第几周"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['base:calendar:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['base:calendar:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['base:calendar:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['base:calendar:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="calendarList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="公历年份(如2025)" align="center" prop="year" />
|
||||
<el-table-column label="公历月份(1-12)" align="center" prop="month" />
|
||||
<el-table-column label="公历日期(1-31)" align="center" prop="day" />
|
||||
<el-table-column label="农历日期" align="center" prop="lunarDate" />
|
||||
<el-table-column label="星期" align="center" prop="weekday" />
|
||||
<el-table-column label="第几周" align="center" prop="week" />
|
||||
<el-table-column label="法定作息状态" align="center" prop="workStatus" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['base:calendar:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:calendar:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改日历对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="公历年份(如2025)" prop="year">
|
||||
<el-input v-model="form.year" placeholder="请输入公历年份(如2025)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公历月份(1-12)" prop="month">
|
||||
<el-input v-model="form.month" placeholder="请输入公历月份(1-12)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公历日期(1-31)" prop="day">
|
||||
<el-input v-model="form.day" placeholder="请输入公历日期(1-31)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="农历日期" prop="lunarDate">
|
||||
<el-input v-model="form.lunarDate" placeholder="请输入农历日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="星期" prop="weekday">
|
||||
<el-input v-model="form.weekday" placeholder="请输入星期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="第几周" prop="week">
|
||||
<el-input v-model="form.week" placeholder="请输入第几周" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCalendar, getCalendar, delCalendar, addCalendar, updateCalendar } from "@/api/base/calendar";
|
||||
|
||||
export default {
|
||||
name: "Calendar",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 日历表格数据
|
||||
calendarList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
year: null,
|
||||
month: null,
|
||||
day: null,
|
||||
lunarDate: null,
|
||||
weekday: null,
|
||||
week: null,
|
||||
workStatus: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询日历列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCalendar(this.queryParams).then(response => {
|
||||
this.calendarList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
year: null,
|
||||
month: null,
|
||||
day: null,
|
||||
lunarDate: null,
|
||||
weekday: null,
|
||||
week: null,
|
||||
workStatus: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加日历";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getCalendar(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改日历";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateCalendar(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCalendar(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除日历编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delCalendar(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('base/calendar/export', {
|
||||
...this.queryParams
|
||||
}, `calendar_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
274
dl_vue/src/views/base/country/index.vue
Normal file
274
dl_vue/src/views/base/country/index.vue
Normal file
@ -0,0 +1,274 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="国家名称" prop="nameEn">
|
||||
<el-input
|
||||
v-model="queryParams.nameEn"
|
||||
placeholder="请输入国家名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="国家名称" prop="nameCn">
|
||||
<el-input
|
||||
v-model="queryParams.nameCn"
|
||||
placeholder="请输入国家名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['base:country:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['base:country:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['base:country:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['base:country:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="countryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="国家名称" align="center" prop="nameEn" />
|
||||
<el-table-column label="国家名称" align="center" prop="nameCn" />
|
||||
<el-table-column label="国旗" align="center" prop="img" />
|
||||
<el-table-column label="所属大洲(中文)" align="center" prop="continent" />
|
||||
<el-table-column label="所用时区" align="center" prop="zoneId" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['base:country:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:country:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改国家地区对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="国家名称" prop="nameEn">
|
||||
<el-input v-model="form.nameEn" placeholder="请输入国家名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="国家名称" prop="nameCn">
|
||||
<el-input v-model="form.nameCn" placeholder="请输入国家名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="国旗" prop="img">
|
||||
<el-input v-model="form.img" placeholder="请输入国旗" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属大洲(中文)" prop="continent">
|
||||
<el-input v-model="form.continent" placeholder="请输入所属大洲(中文)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所用时区" prop="zoneId">
|
||||
<el-input v-model="form.zoneId" placeholder="请输入所用时区" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCountry, getCountry, delCountry, addCountry, updateCountry } from "@/api/base/country";
|
||||
|
||||
export default {
|
||||
name: "Country",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 国家地区表格数据
|
||||
countryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nameEn: null,
|
||||
nameCn: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询国家地区列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCountry(this.queryParams).then(response => {
|
||||
this.countryList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
nameEn: null,
|
||||
nameCn: null,
|
||||
img: null,
|
||||
continent: null,
|
||||
zoneId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加国家地区";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getCountry(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改国家地区";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateCountry(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCountry(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除国家地区编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delCountry(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('base/country/export', {
|
||||
...this.queryParams
|
||||
}, `country_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
273
dl_vue/src/views/base/event/index.vue
Normal file
273
dl_vue/src/views/base/event/index.vue
Normal file
@ -0,0 +1,273 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="日期ID(base_calendar表ID)" prop="dateId">
|
||||
<el-input
|
||||
v-model="queryParams.dateId"
|
||||
placeholder="请输入日期ID(base_calendar表ID)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="国家名称" prop="country">
|
||||
<el-input
|
||||
v-model="queryParams.country"
|
||||
placeholder="请输入国家名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="节日名称" prop="eventName">
|
||||
<el-input
|
||||
v-model="queryParams.eventName"
|
||||
placeholder="请输入节日名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['base:event:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['base:event:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['base:event:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['base:event:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="eventList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="日期ID(base_calendar表ID)" align="center" prop="dateId" />
|
||||
<el-table-column label="国家名称" align="center" prop="country" />
|
||||
<el-table-column label="节日名称" align="center" prop="eventName" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['base:event:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:event:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改节日对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="日期ID(base_calendar表ID)" prop="dateId">
|
||||
<el-input v-model="form.dateId" placeholder="请输入日期ID(base_calendar表ID)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="国家名称" prop="country">
|
||||
<el-input v-model="form.country" placeholder="请输入国家名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="节日名称" prop="eventName">
|
||||
<el-input v-model="form.eventName" placeholder="请输入节日名称" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEvent, getEvent, delEvent, addEvent, updateEvent } from "@/api/base/event";
|
||||
|
||||
export default {
|
||||
name: "Event",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 节日表格数据
|
||||
eventList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
dateId: null,
|
||||
country: null,
|
||||
eventName: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询节日列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listEvent(this.queryParams).then(response => {
|
||||
this.eventList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
dateId: null,
|
||||
country: null,
|
||||
eventName: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加节日";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getEvent(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改节日";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateEvent(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addEvent(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除节日编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delEvent(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('base/event/export', {
|
||||
...this.queryParams
|
||||
}, `event_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
308
dl_vue/src/views/base/field/index.vue
Normal file
308
dl_vue/src/views/base/field/index.vue
Normal file
@ -0,0 +1,308 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="所属对象" prop="belongEntity">
|
||||
<el-input
|
||||
v-model="queryParams.belongEntity"
|
||||
placeholder="请输入所属对象"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属类目" prop="category">
|
||||
<el-input
|
||||
v-model="queryParams.category"
|
||||
placeholder="请输入所属类目"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['base:field:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['base:field:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['base:field:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['base:field:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="fieldList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="所属对象" align="center" prop="belongEntity" />
|
||||
<el-table-column label="所属类目" align="center" prop="category" />
|
||||
<el-table-column label="字段类型" align="center" prop="fieldType" />
|
||||
<el-table-column label="字段编码" align="center" prop="fieldCode" />
|
||||
<el-table-column label="字段显示名称" align="center" prop="fieldLabel" />
|
||||
<el-table-column label="显示顺序" align="center" prop="sort" />
|
||||
<el-table-column label="是否必填" align="center" prop="ifRequired" />
|
||||
<el-table-column label="创建时间" align="center" prop="createdTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['base:field:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:field:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改动态单字段对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="所属对象" prop="belongEntity">
|
||||
<el-input v-model="form.belongEntity" placeholder="请输入所属对象" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属类目" prop="category">
|
||||
<el-input v-model="form.category" placeholder="请输入所属类目" />
|
||||
</el-form-item>
|
||||
<el-form-item label="字段编码" prop="fieldCode">
|
||||
<el-input v-model="form.fieldCode" placeholder="请输入字段编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="字段显示名称" prop="fieldLabel">
|
||||
<el-input v-model="form.fieldLabel" placeholder="请输入字段显示名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="请输入显示顺序" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否必填" prop="ifRequired">
|
||||
<el-input v-model="form.ifRequired" placeholder="请输入是否必填" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createdTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.createdTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updatedTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.updatedTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择更新时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listField, getField, delField, addField, updateField } from "@/api/base/field";
|
||||
|
||||
export default {
|
||||
name: "Field",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 动态单字段表格数据
|
||||
fieldList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
belongEntity: null,
|
||||
category: null,
|
||||
fieldType: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询动态单字段列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listField(this.queryParams).then(response => {
|
||||
this.fieldList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
belongEntity: null,
|
||||
category: null,
|
||||
fieldType: null,
|
||||
fieldCode: null,
|
||||
fieldLabel: null,
|
||||
sort: null,
|
||||
ifRequired: null,
|
||||
delFlag: null,
|
||||
creator: null,
|
||||
createdTime: null,
|
||||
updater: null,
|
||||
updatedTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加动态单字段";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getField(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改动态单字段";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateField(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addField(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除动态单字段编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delField(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('base/field/export', {
|
||||
...this.queryParams
|
||||
}, `field_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
270
dl_vue/src/views/base/zone/index.vue
Normal file
270
dl_vue/src/views/base/zone/index.vue
Normal file
@ -0,0 +1,270 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="时区标准名称" prop="zoneName">
|
||||
<el-input
|
||||
v-model="queryParams.zoneName"
|
||||
placeholder="请输入时区标准名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['base:zone:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['base:zone:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['base:zone:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['base:zone:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="zoneList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="时区标准名称" align="center" prop="zoneName" />
|
||||
<el-table-column label="UTC 偏移量" align="center" prop="utcOffset" />
|
||||
<el-table-column label="时区缩写" align="center" prop="abbreviation" />
|
||||
<el-table-column label="是否使用夏令时" align="center" prop="usesDst" />
|
||||
<el-table-column label="夏令时偏移量" align="center" prop="dstOffset" />
|
||||
<el-table-column label="时区描述" align="center" prop="description" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['base:zone:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:zone:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改时区对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="时区标准名称" prop="zoneName">
|
||||
<el-input v-model="form.zoneName" placeholder="请输入时区标准名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="UTC 偏移量" prop="utcOffset">
|
||||
<el-input v-model="form.utcOffset" placeholder="请输入UTC 偏移量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="时区缩写" prop="abbreviation">
|
||||
<el-input v-model="form.abbreviation" placeholder="请输入时区缩写" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否使用夏令时" prop="usesDst">
|
||||
<el-input v-model="form.usesDst" placeholder="请输入是否使用夏令时" />
|
||||
</el-form-item>
|
||||
<el-form-item label="夏令时偏移量" prop="dstOffset">
|
||||
<el-input v-model="form.dstOffset" placeholder="请输入夏令时偏移量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="时区描述" prop="description">
|
||||
<el-input v-model="form.description" placeholder="请输入时区描述" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listZone, getZone, delZone, addZone, updateZone } from "@/api/base/zone";
|
||||
|
||||
export default {
|
||||
name: "Zone",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 时区表格数据
|
||||
zoneList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
zoneName: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询时区列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listZone(this.queryParams).then(response => {
|
||||
this.zoneList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
zoneName: null,
|
||||
utcOffset: null,
|
||||
abbreviation: null,
|
||||
usesDst: null,
|
||||
dstOffset: null,
|
||||
description: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加时区";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getZone(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改时区";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateZone(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addZone(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除时区编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delZone(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('base/zone/export', {
|
||||
...this.queryParams
|
||||
}, `zone_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user