1
This commit is contained in:
parent
2de3dbfca3
commit
aa38cbd31a
@ -0,0 +1,119 @@
|
||||
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.BaseSite;
|
||||
import com.ruoyi.base.service.IBaseSiteService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 站点管理Controller
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/site")
|
||||
public class BaseSiteController extends BaseController {
|
||||
@Autowired
|
||||
private IBaseSiteService baseSiteService;
|
||||
|
||||
/**
|
||||
* 查询站点管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:site:list')")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(BaseSite baseSite,
|
||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<BaseSite> page = new Page<>(pageNum, pageSize);
|
||||
IPage<BaseSite> list = baseSiteService.queryListPage(baseSite, page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查所有站点-不分页
|
||||
*
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* @author vinjor-M
|
||||
* @date 14:40 2025/6/19
|
||||
**/
|
||||
@GetMapping("/listAll")
|
||||
public AjaxResult list() {
|
||||
return success(baseSiteService.list());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出站点管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:site:export')")
|
||||
@Log(title = "站点管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseSite baseSite) {
|
||||
List<BaseSite> list = baseSiteService.list();
|
||||
ExcelUtil<BaseSite> util = new ExcelUtil<BaseSite>(BaseSite.class);
|
||||
util.exportExcel(response, list, "站点管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取站点管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:site:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
System.out.println(baseSiteService.getById(id));
|
||||
return success(baseSiteService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增站点管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:site:add')")
|
||||
@Log(title = "站点管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseSite baseSite) {
|
||||
return toAjax(baseSiteService.saveOrUpdate(baseSite));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改站点管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:site:edit')")
|
||||
@Log(title = "站点管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseSite baseSite) {
|
||||
return toAjax(baseSiteService.saveOrUpdate(baseSite));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除站点管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:site:remove')")
|
||||
@Log(title = "站点管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
return toAjax(baseSiteService.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.BaseSiteInfo;
|
||||
import com.ruoyi.base.service.IBaseSiteInfoService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 站点基础信息Controller
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/info")
|
||||
public class BaseSiteInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBaseSiteInfoService baseSiteInfoService;
|
||||
|
||||
/**
|
||||
* 查询站点基础信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:info:list')")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(BaseSiteInfo baseSiteInfo,
|
||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
||||
{
|
||||
Page<BaseSiteInfo> page = new Page<>(pageNum, pageSize);
|
||||
IPage<BaseSiteInfo> list = baseSiteInfoService.queryListPage(baseSiteInfo,page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出站点基础信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:info:export')")
|
||||
@Log(title = "站点基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BaseSiteInfo baseSiteInfo)
|
||||
{
|
||||
List<BaseSiteInfo> list = baseSiteInfoService.list();
|
||||
ExcelUtil<BaseSiteInfo> util = new ExcelUtil<BaseSiteInfo>(BaseSiteInfo.class);
|
||||
util.exportExcel(response, list, "站点基础信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取站点基础信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(baseSiteInfoService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增站点基础信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:info:add')")
|
||||
@Log(title = "站点基础信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseSiteInfo baseSiteInfo)
|
||||
{
|
||||
return toAjax(baseSiteInfoService.save(baseSiteInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改站点基础信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:info:edit')")
|
||||
@Log(title = "站点基础信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseSiteInfo baseSiteInfo)
|
||||
{
|
||||
return toAjax(baseSiteInfoService.updateById(baseSiteInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除站点基础信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:info:remove')")
|
||||
@Log(title = "站点基础信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
return toAjax(baseSiteInfoService.removeByIds(list));
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 站点管理对象 dl_base_site
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@TableName("dl_base_site")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BaseSite extends DlBaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 站点唯一编码 */
|
||||
private String id;
|
||||
|
||||
/** 站点名称 */
|
||||
@Excel(name = "站点名称")
|
||||
private String siteName;
|
||||
|
||||
/** 站点网址 */
|
||||
@Excel(name = "站点网址")
|
||||
private String siteUrl;
|
||||
|
||||
/** 站点描述 */
|
||||
@Excel(name = "站点描述")
|
||||
private String siteContent;
|
||||
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 站点基础信息对象 dl_base_site_info
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@TableName("dl_base_site_info")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BaseSiteInfo extends DlBaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
/** 传真号码 */
|
||||
@Excel(name = "传真号码")
|
||||
private String faxNumber;
|
||||
|
||||
/** 品牌名称 */
|
||||
@Excel(name = "品牌名称")
|
||||
private String brandName;
|
||||
|
||||
/** 手机号码(发询盘短信要用到,格式:+8618612345678 或者 +886970123456) */
|
||||
@Excel(name = "手机号码(发询盘短信要用到,格式:+8618612345678 或者 +886970123456)")
|
||||
private String tel;
|
||||
|
||||
/** Email(询盘用) */
|
||||
@Excel(name = "Email", readConverterExp = "询=盘用")
|
||||
private String email;
|
||||
|
||||
/** Teams账号(询盘用) */
|
||||
@Excel(name = "Teams账号", readConverterExp = "询=盘用")
|
||||
private String teams;
|
||||
|
||||
/** 版权文字 */
|
||||
@Excel(name = "版权文字")
|
||||
private String copyright;
|
||||
|
||||
/** 联系地址 */
|
||||
@Excel(name = "联系地址")
|
||||
private String address;
|
||||
|
||||
/** 站点icon */
|
||||
@Excel(name = "站点icon")
|
||||
private String icon;
|
||||
|
||||
/** 站点logo */
|
||||
@Excel(name = "站点logo")
|
||||
private String logo;
|
||||
|
||||
/** 站点二维码(或手机访问二维码) */
|
||||
@Excel(name = "站点二维码", readConverterExp = "或=手机访问二维码")
|
||||
private String qrCode;
|
||||
|
||||
/** 站点联系方式html */
|
||||
@Excel(name = "站点联系方式html")
|
||||
private String contactUs;
|
||||
|
||||
/** 站点唯一编码(租户id) */
|
||||
@Excel(name = "站点唯一编码", readConverterExp = "租=户id")
|
||||
private String tenantId;
|
||||
|
||||
}
|
@ -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.BaseSiteInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 站点基础信息Mapper接口
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseSiteInfoMapper extends BaseMapper<BaseSiteInfo>
|
||||
{
|
||||
IPage<BaseSiteInfo> queryListPage(@Param("entity") BaseSiteInfo entity, Page<BaseSiteInfo> 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.BaseSite;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 站点管理Mapper接口
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseSiteMapper extends BaseMapper<BaseSite>
|
||||
{
|
||||
IPage<BaseSite> queryListPage(@Param("entity") BaseSite entity, Page<BaseSite> 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.BaseSiteInfo;
|
||||
|
||||
/**
|
||||
* 站点基础信息Service接口
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
public interface IBaseSiteInfoService extends IService<BaseSiteInfo>
|
||||
{
|
||||
IPage<BaseSiteInfo> queryListPage(BaseSiteInfo pageReqVO, Page<BaseSiteInfo> 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.BaseSite;
|
||||
|
||||
/**
|
||||
* 站点管理Service接口
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
public interface IBaseSiteService extends IService<BaseSite>
|
||||
{
|
||||
IPage<BaseSite> queryListPage(BaseSite pageReqVO, Page<BaseSite> page);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.ruoyi.base.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
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.BaseSiteInfoMapper;
|
||||
import com.ruoyi.base.domain.BaseSiteInfo;
|
||||
import com.ruoyi.base.service.IBaseSiteInfoService;
|
||||
|
||||
/**
|
||||
* 站点基础信息Service业务层处理
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@Service
|
||||
public class BaseSiteInfoServiceImpl extends ServiceImpl<BaseSiteInfoMapper,BaseSiteInfo> implements IBaseSiteInfoService
|
||||
{
|
||||
@Autowired
|
||||
private BaseSiteInfoMapper baseSiteInfoMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BaseSiteInfo> queryListPage(BaseSiteInfo pageReqVO, Page<BaseSiteInfo> page) {
|
||||
return baseSiteInfoMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.ruoyi.base.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
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.BaseSiteMapper;
|
||||
import com.ruoyi.base.domain.BaseSite;
|
||||
import com.ruoyi.base.service.IBaseSiteService;
|
||||
|
||||
/**
|
||||
* 站点管理Service业务层处理
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@Service
|
||||
public class BaseSiteServiceImpl extends ServiceImpl<BaseSiteMapper,BaseSite> implements IBaseSiteService
|
||||
{
|
||||
@Autowired
|
||||
private BaseSiteMapper baseSiteMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BaseSite> queryListPage(BaseSite pageReqVO, Page<BaseSite> page) {
|
||||
return baseSiteMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
package com.ruoyi.busi.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.busi.domain.BusiCategory;
|
||||
import com.ruoyi.busi.service.IBusiCategoryService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 网站栏目Controller
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/busi/category")
|
||||
public class BusiCategoryController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBusiCategoryService busiCategoryService;
|
||||
|
||||
/**
|
||||
* 查询网站栏目列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('busi:category:list')")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(BusiCategory busiCategory,
|
||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
||||
{
|
||||
Page<BusiCategory> page = new Page<>(pageNum, pageSize);
|
||||
IPage<BusiCategory> list = busiCategoryService.queryListPage(busiCategory,page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出网站栏目列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('busi:category:export')")
|
||||
@Log(title = "网站栏目", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BusiCategory busiCategory)
|
||||
{
|
||||
List<BusiCategory> list = busiCategoryService.list();
|
||||
ExcelUtil<BusiCategory> util = new ExcelUtil<BusiCategory>(BusiCategory.class);
|
||||
util.exportExcel(response, list, "网站栏目数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网站栏目详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('busi:category:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(busiCategoryService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增网站栏目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('busi:category:add')")
|
||||
@Log(title = "网站栏目", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BusiCategory busiCategory)
|
||||
{
|
||||
return toAjax(busiCategoryService.save(busiCategory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网站栏目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('busi:category:edit')")
|
||||
@Log(title = "网站栏目", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BusiCategory busiCategory)
|
||||
{
|
||||
return toAjax(busiCategoryService.updateById(busiCategory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网站栏目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('busi:category:remove')")
|
||||
@Log(title = "网站栏目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
return toAjax(busiCategoryService.removeByIds(list));
|
||||
}
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package com.ruoyi.busi.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;
|
||||
|
||||
/**
|
||||
* 网站栏目对象 dl_busi_category
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@TableName("dl_busi_category")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BusiCategory extends DlBaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/** 栏目code */
|
||||
@Excel(name = "栏目code")
|
||||
private String code;
|
||||
|
||||
/** 栏目名称 */
|
||||
@Excel(name = "栏目名称")
|
||||
private String catgName;
|
||||
|
||||
/** 栏目级别 */
|
||||
@Excel(name = "栏目级别")
|
||||
private Long catgLevel;
|
||||
|
||||
/** 栏目类型(一级才栏目才设置) */
|
||||
@Excel(name = "栏目类型(一级才栏目才设置)")
|
||||
private String catgType;
|
||||
|
||||
/** 上级栏目id */
|
||||
@Excel(name = "上级栏目id")
|
||||
private String parentId;
|
||||
|
||||
/** 直接下级产品数 */
|
||||
@Excel(name = "直接下级产品数")
|
||||
private Long prodsJunior;
|
||||
|
||||
/** 递归产品数 */
|
||||
@Excel(name = "递归产品数")
|
||||
private Long prodsAll;
|
||||
|
||||
/** 页面title */
|
||||
@Excel(name = "页面title")
|
||||
private String title;
|
||||
|
||||
/** 页面keyword */
|
||||
@Excel(name = "页面keyword")
|
||||
private String keyword;
|
||||
|
||||
/** 页面description */
|
||||
@Excel(name = "页面description")
|
||||
private String description;
|
||||
|
||||
/** 排序 */
|
||||
@Excel(name = "排序")
|
||||
private Long sort;
|
||||
|
||||
/** 内容html(适用于单页面+询盘) */
|
||||
@Excel(name = "内容html", readConverterExp = "适=用于单页面+询盘")
|
||||
private String content;
|
||||
|
||||
/** 产品上方内容html(适用于产品) */
|
||||
@Excel(name = "产品上方内容html", readConverterExp = "适=用于产品")
|
||||
private String prodUp;
|
||||
|
||||
/** 产品下方内容html(适用于产品) */
|
||||
@Excel(name = "产品下方内容html", readConverterExp = "适=用于产品")
|
||||
private String prodDown;
|
||||
|
||||
/** 站点唯一编码(租户id) */
|
||||
@Excel(name = "站点唯一编码", readConverterExp = "租=户id")
|
||||
private String tenantId;
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.busi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.busi.domain.BusiCategory;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 网站栏目Mapper接口
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusiCategoryMapper extends BaseMapper<BusiCategory>
|
||||
{
|
||||
IPage<BusiCategory> queryListPage(@Param("entity") BusiCategory entity, Page<BusiCategory> page);
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.busi.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.busi.domain.BusiCategory;
|
||||
|
||||
/**
|
||||
* 网站栏目Service接口
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
public interface IBusiCategoryService extends IService<BusiCategory>
|
||||
{
|
||||
IPage<BusiCategory> queryListPage(BusiCategory pageReqVO, Page<BusiCategory> page);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.ruoyi.busi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
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.busi.mapper.BusiCategoryMapper;
|
||||
import com.ruoyi.busi.domain.BusiCategory;
|
||||
import com.ruoyi.busi.service.IBusiCategoryService;
|
||||
|
||||
/**
|
||||
* 网站栏目Service业务层处理
|
||||
*
|
||||
* @author vinjor-m
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
@Service
|
||||
public class BusiCategoryServiceImpl extends ServiceImpl<BusiCategoryMapper,BusiCategory> implements IBusiCategoryService
|
||||
{
|
||||
@Autowired
|
||||
private BusiCategoryMapper busiCategoryMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BusiCategory> queryListPage(BusiCategory pageReqVO, Page<BusiCategory> page) {
|
||||
return busiCategoryMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
<?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.BaseSiteInfoMapper">
|
||||
|
||||
<resultMap type="BaseSiteInfo" id="BaseSiteInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="companyName" column="company_name" />
|
||||
<result property="faxNumber" column="fax_number" />
|
||||
<result property="brandName" column="brand_name" />
|
||||
<result property="tel" column="tel" />
|
||||
<result property="email" column="email" />
|
||||
<result property="teams" column="teams" />
|
||||
<result property="copyright" column="copyright" />
|
||||
<result property="address" column="address" />
|
||||
<result property="icon" column="icon" />
|
||||
<result property="logo" column="logo" />
|
||||
<result property="qrCode" column="qr_code" />
|
||||
<result property="contactUs" column="contact_us" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updater" column="updater" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseSiteInfoVo">
|
||||
select id, company_name, fax_number, brand_name, tel, email, teams, copyright, address, icon, logo, qr_code, contact_us, tenant_id, creator, create_time, updater, update_time, del_flag from dl_base_site_info
|
||||
</sql>
|
||||
|
||||
<select id="queryListPage" parameterType="BaseSiteInfo" resultMap="BaseSiteInfoResult">
|
||||
<include refid="selectBaseSiteInfoVo"/>
|
||||
<where>
|
||||
<if test="entity.companyName != null and entity.companyName != ''"> and company_name like concat('%', #{entity.companyName}, '%')</if>
|
||||
<if test="entity.faxNumber != null and entity.faxNumber != ''"> and fax_number = #{entity.faxNumber}</if>
|
||||
<if test="entity.brandName != null and entity.brandName != ''"> and brand_name like concat('%', #{entity.brandName}, '%')</if>
|
||||
<if test="entity.tel != null and entity.tel != ''"> and tel = #{entity.tel}</if>
|
||||
<if test="entity.email != null and entity.email != ''"> and email = #{entity.email}</if>
|
||||
<if test="entity.teams != null and entity.teams != ''"> and teams = #{entity.teams}</if>
|
||||
<if test="entity.copyright != null and entity.copyright != ''"> and copyright = #{entity.copyright}</if>
|
||||
<if test="entity.address != null and entity.address != ''"> and address = #{entity.address}</if>
|
||||
<if test="entity.icon != null and entity.icon != ''"> and icon = #{entity.icon}</if>
|
||||
<if test="entity.logo != null and entity.logo != ''"> and logo = #{entity.logo}</if>
|
||||
<if test="entity.qrCode != null and entity.qrCode != ''"> and qr_code = #{entity.qrCode}</if>
|
||||
<if test="entity.contactUs != null and entity.contactUs != ''"> and contact_us = #{entity.contactUs}</if>
|
||||
<if test="entity.tenantId != null and entity.tenantId != ''"> and tenant_id = #{entity.tenantId}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,32 @@
|
||||
<?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.BaseSiteMapper">
|
||||
|
||||
<resultMap type="BaseSite" id="BaseSiteResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="siteName" column="site_name" />
|
||||
<result property="siteUrl" column="site_url" />
|
||||
<result property="siteContent" column="site_content" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updater" column="updater" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseSiteVo">
|
||||
select id, site_name, site_url, site_content, creator, create_time, updater, update_time, del_flag from dl_base_site
|
||||
</sql>
|
||||
|
||||
<select id="queryListPage" parameterType="BaseSite" resultMap="BaseSiteResult">
|
||||
<include refid="selectBaseSiteVo"/>
|
||||
<where>
|
||||
and del_flag='0'
|
||||
<if test="entity.siteName != null and entity.siteName != ''"> and site_name like concat('%', #{entity.siteName}, '%')</if>
|
||||
<if test="entity.siteUrl != null and entity.siteUrl != ''"> and site_url = #{entity.siteUrl}</if>
|
||||
<if test="entity.siteContent != null and entity.siteContent != ''"> and site_content = #{entity.siteContent}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,55 @@
|
||||
<?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.busi.mapper.BusiCategoryMapper">
|
||||
|
||||
<resultMap type="BusiCategory" id="BusiCategoryResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="catgName" column="catg_name" />
|
||||
<result property="catgLevel" column="catg_level" />
|
||||
<result property="catgType" column="catg_type" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="prodsJunior" column="prods_junior" />
|
||||
<result property="prodsAll" column="prods_all" />
|
||||
<result property="title" column="title" />
|
||||
<result property="keyword" column="keyword" />
|
||||
<result property="description" column="description" />
|
||||
<result property="sort" column="sort" />
|
||||
<result property="content" column="content" />
|
||||
<result property="prodUp" column="prod_up" />
|
||||
<result property="prodDown" column="prod_down" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updater" column="updater" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBusiCategoryVo">
|
||||
select id, code, catg_name, catg_level, catg_type, parent_id, prods_junior, prods_all, title, keyword, description, sort, content, prod_up, prod_down, tenant_id, creator, create_time, updater, update_time, del_flag from dl_busi_category
|
||||
</sql>
|
||||
|
||||
<select id="queryListPage" parameterType="BusiCategory" resultMap="BusiCategoryResult">
|
||||
<include refid="selectBusiCategoryVo"/>
|
||||
<where>
|
||||
<if test="entity.code != null and entity.code != ''"> and code = #{entity.code}</if>
|
||||
<if test="entity.catgName != null and entity.catgName != ''"> and catg_name like concat('%', #{entity.catgName}, '%')</if>
|
||||
<if test="entity.catgLevel != null "> and catg_level = #{entity.catgLevel}</if>
|
||||
<if test="entity.catgType != null and entity.catgType != ''"> and catg_type = #{entity.catgType}</if>
|
||||
<if test="entity.parentId != null and entity.parentId != ''"> and parent_id = #{entity.parentId}</if>
|
||||
<if test="entity.prodsJunior != null "> and prods_junior = #{entity.prodsJunior}</if>
|
||||
<if test="entity.prodsAll != null "> and prods_all = #{entity.prodsAll}</if>
|
||||
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
|
||||
<if test="entity.keyword != null and entity.keyword != ''"> and keyword = #{entity.keyword}</if>
|
||||
<if test="entity.description != null and entity.description != ''"> and description = #{entity.description}</if>
|
||||
<if test="entity.sort != null "> and sort = #{entity.sort}</if>
|
||||
<if test="entity.content != null and entity.content != ''"> and content = #{entity.content}</if>
|
||||
<if test="entity.prodUp != null and entity.prodUp != ''"> and prod_up = #{entity.prodUp}</if>
|
||||
<if test="entity.prodDown != null and entity.prodDown != ''"> and prod_down = #{entity.prodDown}</if>
|
||||
<if test="entity.tenantId != null and entity.tenantId != ''"> and tenant_id = #{entity.tenantId}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
44
dl_vue/src/api/base/info.js
Normal file
44
dl_vue/src/api/base/info.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询站点基础信息列表
|
||||
export function listInfo(query) {
|
||||
return request({
|
||||
url: '/base/info/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询站点基础信息详细
|
||||
export function getInfo(id) {
|
||||
return request({
|
||||
url: '/base/info/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增站点基础信息
|
||||
export function addInfo(data) {
|
||||
return request({
|
||||
url: '/base/info',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改站点基础信息
|
||||
export function updateInfo(data) {
|
||||
return request({
|
||||
url: '/base/info',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除站点基础信息
|
||||
export function delInfo(id) {
|
||||
return request({
|
||||
url: '/base/info/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
52
dl_vue/src/api/base/site.js
Normal file
52
dl_vue/src/api/base/site.js
Normal file
@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询站点管理列表
|
||||
export function listSite(query) {
|
||||
return request({
|
||||
url: '/base/site/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询站点管理列表
|
||||
export function listAllSite() {
|
||||
return request({
|
||||
url: '/base/site/listAll',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询站点管理详细
|
||||
export function getSite(id) {
|
||||
return request({
|
||||
url: '/base/site/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增站点管理
|
||||
export function addSite(data) {
|
||||
return request({
|
||||
url: '/base/site',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改站点管理
|
||||
export function updateSite(data) {
|
||||
return request({
|
||||
url: '/base/site',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除站点管理
|
||||
export function delSite(id) {
|
||||
return request({
|
||||
url: '/base/site/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
dl_vue/src/api/busi/category.js
Normal file
44
dl_vue/src/api/busi/category.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询网站栏目列表
|
||||
export function listCategory(query) {
|
||||
return request({
|
||||
url: '/busi/category/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询网站栏目详细
|
||||
export function getCategory(id) {
|
||||
return request({
|
||||
url: '/busi/category/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增网站栏目
|
||||
export function addCategory(data) {
|
||||
return request({
|
||||
url: '/busi/category',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改网站栏目
|
||||
export function updateCategory(data) {
|
||||
return request({
|
||||
url: '/busi/category',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除网站栏目
|
||||
export function delCategory(id) {
|
||||
return request({
|
||||
url: '/busi/category/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -2,6 +2,8 @@ import Cookies from 'js-cookie'
|
||||
|
||||
const TokenKey = 'Admin-Token'
|
||||
|
||||
const TenantIdKey = 'tenantId'
|
||||
|
||||
export function getToken() {
|
||||
return Cookies.get(TokenKey)
|
||||
}
|
||||
@ -13,3 +15,15 @@ export function setToken(token) {
|
||||
export function removeToken() {
|
||||
return Cookies.remove(TokenKey)
|
||||
}
|
||||
|
||||
export function getTenantId() {
|
||||
return Cookies.get(TenantIdKey)
|
||||
}
|
||||
|
||||
export function setTenantId(tenantId) {
|
||||
return Cookies.set(TenantIdKey, tenantId)
|
||||
}
|
||||
|
||||
export function removeTenantId() {
|
||||
return Cookies.remove(TenantIdKey)
|
||||
}
|
||||
|
183
dl_vue/src/views/base/info/index.vue
Normal file
183
dl_vue/src/views/base/info/index.vue
Normal file
@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<h1>公司信息</h1>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公司名称" prop="companyName">
|
||||
<el-input v-model="form.companyName" placeholder="请输入公司名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="传真号码" prop="faxNumber">
|
||||
<el-input v-model="form.faxNumber" placeholder="请输入传真号码"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="品牌名称" prop="brandName">
|
||||
<el-input v-model="form.brandName" placeholder="请输入品牌名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<h1>询盘联系方式</h1>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="手机号码" prop="tel">
|
||||
<div style="display: flex;justify-content: start;align-items: center">
|
||||
<el-input v-model="form.tel" placeholder="请输入手机号码"/>
|
||||
<el-tooltip class="item" effect="dark" content="发询盘短信要用到,格式:+8618612345678 或者 +886970123456" placement="bottom">
|
||||
<i class="el-icon-question"></i>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="Email" prop="email">
|
||||
<el-input v-model="form.email" placeholder="请输入Email"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="Teams账号" prop="teams">
|
||||
<el-input v-model="form.teams" placeholder="请输入Teams账号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<h1>站点信息</h1>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="站点icon" prop="icon">
|
||||
<image-upload v-model="form.icon"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="站点logo" prop="logo">
|
||||
<image-upload v-model="form.logo"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="站点二维码" prop="qrCode">
|
||||
<image-upload v-model="form.qrCode"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="版权文字" prop="copyright">
|
||||
<el-input v-model="form.copyright" placeholder="请输入版权文字"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系地址" prop="address">
|
||||
<el-input v-model="form.address" placeholder="请输入联系地址"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="站点联系方式html" prop="contactUs">
|
||||
<editor v-model="form.contactUs" :min-height="192"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from '@/api/base/info'
|
||||
|
||||
export default {
|
||||
name: 'Info',
|
||||
data() {
|
||||
return {
|
||||
// 表单参数
|
||||
form: {
|
||||
id: null,
|
||||
companyName: null,
|
||||
faxNumber: null,
|
||||
brandName: null,
|
||||
tel: null,
|
||||
email: null,
|
||||
teams: null,
|
||||
copyright: null,
|
||||
address: null,
|
||||
icon: null,
|
||||
logo: null,
|
||||
qrCode: null,
|
||||
contactUs: null,
|
||||
tenantId: null,
|
||||
creator: null,
|
||||
createTime: null,
|
||||
updater: null,
|
||||
updateTime: null,
|
||||
delFlag: null
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
companyName: [
|
||||
{ required: true, message: '请输入公司名称', trigger: 'blur' },
|
||||
],
|
||||
tel: [
|
||||
{ required: true, message: '请输入手机号码', trigger: 'blur' },
|
||||
],
|
||||
email: [
|
||||
{ required: true, message: '请输入Email账号', trigger: 'blur' },
|
||||
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
|
||||
],
|
||||
teams: [
|
||||
{ required: true, message: '请输入Teams账号', trigger: 'blur' },
|
||||
],
|
||||
icon: [
|
||||
{ required: true, message: '请上传站点icon', trigger: 'blur' },
|
||||
],
|
||||
logo: [
|
||||
{ required: true, message: '请上传站点logo', trigger: 'blur' },
|
||||
],
|
||||
qrCode: [
|
||||
{ required: true, message: '请上传站点二维码', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
/** 查询站点基础信息列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listInfo(this.queryParams).then(response => {
|
||||
this.infoList = response.data.records
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
274
dl_vue/src/views/base/site/index.vue
Normal file
274
dl_vue/src/views/base/site/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="siteName">
|
||||
<el-input
|
||||
v-model="queryParams.siteName"
|
||||
placeholder="请输入站点名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="站点网址" prop="siteUrl">
|
||||
<el-input
|
||||
v-model="queryParams.siteUrl"
|
||||
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:site: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:site: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:site: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:site:export']"-->
|
||||
<!-- >导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="siteList" @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="siteName" />
|
||||
<el-table-column label="站点网址" align="center" prop="siteUrl" />
|
||||
<el-table-column label="站点描述" align="center" prop="siteContent" />
|
||||
<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:site:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:site: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="siteName">
|
||||
<el-input v-model="form.id" placeholder="请输入站点编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="站点名称" prop="siteName">
|
||||
<el-input v-model="form.siteName" placeholder="请输入站点名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="站点网址" prop="siteUrl">
|
||||
<el-input v-model="form.siteUrl" placeholder="请输入站点网址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="站点描述">
|
||||
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入站点描述" v-model="form.siteContent" :min-height="192"/>
|
||||
</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 { listSite, getSite, delSite, addSite, updateSite } from "@/api/base/site";
|
||||
|
||||
export default {
|
||||
name: "Site",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 站点管理表格数据
|
||||
siteList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
siteName: null,
|
||||
siteUrl: null,
|
||||
siteContent: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询站点管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSite(this.queryParams).then(response => {
|
||||
this.siteList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
siteName: null,
|
||||
siteUrl: null,
|
||||
siteContent: null,
|
||||
creator: null,
|
||||
createTime: null,
|
||||
updater: null,
|
||||
updateTime: null,
|
||||
delFlag: 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
|
||||
getSite(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) {
|
||||
updateSite(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSite(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 delSite(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('base/site/export', {
|
||||
...this.queryParams
|
||||
}, `site_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
403
dl_vue/src/views/busi/category/index.vue
Normal file
403
dl_vue/src/views/busi/category/index.vue
Normal file
@ -0,0 +1,403 @@
|
||||
<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="栏目code" prop="code">
|
||||
<el-input
|
||||
v-model="queryParams.code"
|
||||
placeholder="请输入栏目code"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="栏目名称" prop="catgName">
|
||||
<el-input
|
||||
v-model="queryParams.catgName"
|
||||
placeholder="请输入栏目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="栏目级别" prop="catgLevel">
|
||||
<el-input
|
||||
v-model="queryParams.catgLevel"
|
||||
placeholder="请输入栏目级别"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="上级栏目id" prop="parentId">
|
||||
<el-input
|
||||
v-model="queryParams.parentId"
|
||||
placeholder="请输入上级栏目id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="直接下级产品数" prop="prodsJunior">
|
||||
<el-input
|
||||
v-model="queryParams.prodsJunior"
|
||||
placeholder="请输入直接下级产品数"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="递归产品数" prop="prodsAll">
|
||||
<el-input
|
||||
v-model="queryParams.prodsAll"
|
||||
placeholder="请输入递归产品数"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="页面title" prop="title">
|
||||
<el-input
|
||||
v-model="queryParams.title"
|
||||
placeholder="请输入页面title"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="页面keyword" prop="keyword">
|
||||
<el-input
|
||||
v-model="queryParams.keyword"
|
||||
placeholder="请输入页面keyword"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
v-model="queryParams.sort"
|
||||
placeholder="请输入排序"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="站点唯一编码" prop="tenantId">
|
||||
<el-input
|
||||
v-model="queryParams.tenantId"
|
||||
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="['busi:category: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="['busi:category: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="['busi:category: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="['busi:category:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="categoryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="栏目code" align="center" prop="code" />
|
||||
<el-table-column label="栏目名称" align="center" prop="catgName" />
|
||||
<el-table-column label="栏目级别" align="center" prop="catgLevel" />
|
||||
<el-table-column label="栏目类型(一级才栏目才设置)" align="center" prop="catgType" />
|
||||
<el-table-column label="上级栏目id" align="center" prop="parentId" />
|
||||
<el-table-column label="直接下级产品数" align="center" prop="prodsJunior" />
|
||||
<el-table-column label="递归产品数" align="center" prop="prodsAll" />
|
||||
<el-table-column label="页面title" align="center" prop="title" />
|
||||
<el-table-column label="页面keyword" align="center" prop="keyword" />
|
||||
<el-table-column label="页面description" align="center" prop="description" />
|
||||
<el-table-column label="排序" align="center" prop="sort" />
|
||||
<el-table-column label="内容html" align="center" prop="content" />
|
||||
<el-table-column label="产品上方内容html" align="center" prop="prodUp" />
|
||||
<el-table-column label="产品下方内容html" align="center" prop="prodDown" />
|
||||
<el-table-column label="站点唯一编码" align="center" prop="tenantId" />
|
||||
<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="['busi:category:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['busi:category: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="栏目code" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入栏目code" />
|
||||
</el-form-item>
|
||||
<el-form-item label="栏目名称" prop="catgName">
|
||||
<el-input v-model="form.catgName" placeholder="请输入栏目名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="栏目级别" prop="catgLevel">
|
||||
<el-input v-model="form.catgLevel" placeholder="请输入栏目级别" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上级栏目id" prop="parentId">
|
||||
<el-input v-model="form.parentId" placeholder="请输入上级栏目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="直接下级产品数" prop="prodsJunior">
|
||||
<el-input v-model="form.prodsJunior" placeholder="请输入直接下级产品数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="递归产品数" prop="prodsAll">
|
||||
<el-input v-model="form.prodsAll" placeholder="请输入递归产品数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="页面title" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入页面title" />
|
||||
</el-form-item>
|
||||
<el-form-item label="页面keyword" prop="keyword">
|
||||
<el-input v-model="form.keyword" placeholder="请输入页面keyword" />
|
||||
</el-form-item>
|
||||
<el-form-item label="页面description" prop="description">
|
||||
<el-input v-model="form.description" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="请输入排序" />
|
||||
</el-form-item>
|
||||
<el-form-item label="内容html">
|
||||
<editor v-model="form.content" :min-height="192"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品上方内容html" prop="prodUp">
|
||||
<el-input v-model="form.prodUp" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品下方内容html" prop="prodDown">
|
||||
<el-input v-model="form.prodDown" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="站点唯一编码" prop="tenantId">
|
||||
<el-input v-model="form.tenantId" 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 { listCategory, getCategory, delCategory, addCategory, updateCategory } from "@/api/busi/category";
|
||||
|
||||
export default {
|
||||
name: "Category",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 网站栏目表格数据
|
||||
categoryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
code: null,
|
||||
catgName: null,
|
||||
catgLevel: null,
|
||||
catgType: null,
|
||||
parentId: null,
|
||||
prodsJunior: null,
|
||||
prodsAll: null,
|
||||
title: null,
|
||||
keyword: null,
|
||||
description: null,
|
||||
sort: null,
|
||||
content: null,
|
||||
prodUp: null,
|
||||
prodDown: null,
|
||||
tenantId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询网站栏目列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCategory(this.queryParams).then(response => {
|
||||
this.categoryList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
code: null,
|
||||
catgName: null,
|
||||
catgLevel: null,
|
||||
catgType: null,
|
||||
parentId: null,
|
||||
prodsJunior: null,
|
||||
prodsAll: null,
|
||||
title: null,
|
||||
keyword: null,
|
||||
description: null,
|
||||
sort: null,
|
||||
content: null,
|
||||
prodUp: null,
|
||||
prodDown: null,
|
||||
tenantId: null,
|
||||
creator: null,
|
||||
createTime: null,
|
||||
updater: null,
|
||||
updateTime: null,
|
||||
delFlag: 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
|
||||
getCategory(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) {
|
||||
updateCategory(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCategory(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 delCategory(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('busi/category/export', {
|
||||
...this.queryParams
|
||||
}, `category_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -61,7 +61,24 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
title="请选择管理的站点"
|
||||
:visible.sync="centerDialogVisible"
|
||||
width="30%"
|
||||
center>
|
||||
<el-select v-model="chooseSiteCode" placeholder="请选择" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="chooseSiteCodeFun">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 底部 -->
|
||||
<!-- <div class="el-login-footer">-->
|
||||
<!-- <span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span>-->
|
||||
@ -71,13 +88,18 @@
|
||||
|
||||
<script>
|
||||
import { getCodeImg } from "@/api/login";
|
||||
import { setTenantId } from '@/utils/auth'
|
||||
import Cookies from "js-cookie";
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
||||
import { listAllSite } from "@/api/base/site";
|
||||
|
||||
export default {
|
||||
name: "Login",
|
||||
data() {
|
||||
return {
|
||||
options: [],
|
||||
chooseSiteCode: '',
|
||||
centerDialogVisible: false,
|
||||
codeUrl: "",
|
||||
loginForm: {
|
||||
username: "",
|
||||
@ -119,6 +141,15 @@ export default {
|
||||
|
||||
|
||||
methods: {
|
||||
chooseSiteCodeFun(){
|
||||
if(this.chooseSiteCode){
|
||||
this.centerDialogVisible=false
|
||||
setTenantId(this.chooseSiteCode)
|
||||
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||
}else{
|
||||
this.$modal.msgWarning("请选择管理的站点");
|
||||
}
|
||||
},
|
||||
getCode() {
|
||||
getCodeImg().then(res => {
|
||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
|
||||
@ -152,8 +183,32 @@ export default {
|
||||
Cookies.remove('rememberMe');
|
||||
}
|
||||
this.$store.dispatch("Login", this.loginForm).then(() => {
|
||||
|
||||
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||
listAllSite().then(response => {
|
||||
if(response.data && response.data.length>0){
|
||||
response.data.map((item)=>{
|
||||
this.options.push({
|
||||
value:item.id,
|
||||
label: item.siteName
|
||||
})
|
||||
})
|
||||
if(this.options.length>1){
|
||||
//需要用户自行选择管理的站点
|
||||
this.centerDialogVisible=true
|
||||
}else{
|
||||
//默认选中唯一站点
|
||||
this.chooseSiteCode = this.options[0].value
|
||||
setTenantId(this.chooseSiteCode)
|
||||
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||
}
|
||||
}else{
|
||||
this.$modal.msgWarning("暂无可管理站点,请联系服务提供商");
|
||||
setTimeout(()=>{
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = '/index'
|
||||
})
|
||||
},1000)
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
if (this.captchaEnabled) {
|
||||
|
Loading…
Reference in New Issue
Block a user