Merge remote-tracking branch 'origin/master'
This commit is contained in:
+6
-6
@@ -81,7 +81,7 @@ public class SysCategoryController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresPermissions("sys:category:list")
|
// @RequiresPermissions("sys:category:list")
|
||||||
@GetMapping(value = "/childList")
|
@GetMapping(value = "/childList")
|
||||||
public Result<List<SysCategory>> queryPageList(SysCategory sysCategory,HttpServletRequest req) {
|
public Result<List<SysCategory>> queryPageList(SysCategory sysCategory,HttpServletRequest req) {
|
||||||
Result<List<SysCategory>> result = new Result<List<SysCategory>>();
|
Result<List<SysCategory>> result = new Result<List<SysCategory>>();
|
||||||
@@ -113,7 +113,7 @@ public class SysCategoryController {
|
|||||||
* @param sysCategory
|
* @param sysCategory
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("sys:category:add")
|
// @RequiresPermissions("sys:category:add")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<SysCategory> add(@RequestBody SysCategory sysCategory) {
|
public Result<SysCategory> add(@RequestBody SysCategory sysCategory) {
|
||||||
Result<SysCategory> result = new Result<SysCategory>();
|
Result<SysCategory> result = new Result<SysCategory>();
|
||||||
@@ -132,7 +132,7 @@ public class SysCategoryController {
|
|||||||
* @param sysCategory
|
* @param sysCategory
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("sys:category:edit")
|
// @RequiresPermissions("sys:category:edit")
|
||||||
@PutMapping(value = "/edit")
|
@PutMapping(value = "/edit")
|
||||||
public Result<SysCategory> edit(@RequestBody SysCategory sysCategory) {
|
public Result<SysCategory> edit(@RequestBody SysCategory sysCategory) {
|
||||||
Result<SysCategory> result = new Result<SysCategory>();
|
Result<SysCategory> result = new Result<SysCategory>();
|
||||||
@@ -151,7 +151,7 @@ public class SysCategoryController {
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("sys:category:list")
|
// @RequiresPermissions("sys:category:list")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<SysCategory> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<SysCategory> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
Result<SysCategory> result = new Result<SysCategory>();
|
Result<SysCategory> result = new Result<SysCategory>();
|
||||||
@@ -171,7 +171,7 @@ public class SysCategoryController {
|
|||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("sys:category:del")
|
// @RequiresPermissions("sys:category:del")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<SysCategory> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<SysCategory> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
Result<SysCategory> result = new Result<SysCategory>();
|
Result<SysCategory> result = new Result<SysCategory>();
|
||||||
@@ -189,7 +189,7 @@ public class SysCategoryController {
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("sys:category:list")
|
// @RequiresPermissions("sys:category:list")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<SysCategory> queryById(@RequestParam(name="id",required=true) String id) {
|
public Result<SysCategory> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
Result<SysCategory> result = new Result<SysCategory>();
|
Result<SysCategory> result = new Result<SysCategory>();
|
||||||
|
|||||||
+11
-20
@@ -7,11 +7,13 @@ import com.jero.common.api.vo.Result;
|
|||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.system.service.ISysDictItemService;
|
||||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||||
import com.jero.modules.tag.service.IOnlCgformAreaService;
|
import com.jero.modules.tag.service.IOnlCgformAreaService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -37,8 +39,8 @@ import java.util.Map;
|
|||||||
public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlCgformAreaService> {
|
public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlCgformAreaService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOnlCgformAreaService onlCgformAreaService;
|
private IOnlCgformAreaService onlCgformAreaService;
|
||||||
//TODO 这里不允许定义变量
|
@Autowired
|
||||||
|
private ISysDictItemService sysDictItemService;
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
@@ -57,6 +59,9 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
|||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
QueryWrapper<OnlCgformArea> queryWrapper = QueryGenerator.initQueryWrapper(onlCgformArea, req.getParameterMap());
|
QueryWrapper<OnlCgformArea> queryWrapper = QueryGenerator.initQueryWrapper(onlCgformArea, req.getParameterMap());
|
||||||
Page<OnlCgformArea> page = new Page<OnlCgformArea>(pageNo, pageSize);
|
Page<OnlCgformArea> page = new Page<OnlCgformArea>(pageNo, pageSize);
|
||||||
|
if(StringUtils.isNotBlank("create_time")) {
|
||||||
|
queryWrapper.orderByDesc("create_time");
|
||||||
|
}
|
||||||
IPage<OnlCgformArea> pageList = onlCgformAreaService.page(page, queryWrapper);
|
IPage<OnlCgformArea> pageList = onlCgformAreaService.page(page, queryWrapper);
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
@@ -66,8 +71,8 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "标签管理-表头中英文切换")
|
@AutoLog(value = "区域管理表-表头中英文切换")
|
||||||
@ApiOperation(value="标签管理-表头中英文切换", notes="标签管理-表头中英文切换")
|
@ApiOperation(value="区域管理表-表头中英文切换", notes="区域管理表-表头中英文切换")
|
||||||
@GetMapping(value = "/getHeader")
|
@GetMapping(value = "/getHeader")
|
||||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||||
@RequestParam(name = "cut") String cut) {
|
@RequestParam(name = "cut") String cut) {
|
||||||
@@ -75,20 +80,6 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
|||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询条件中英文切换
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@AutoLog(value = "OCR识别转换记录表-查询条件中英文切换")
|
|
||||||
@ApiOperation(value="OCR识别转换记录表-查询条件中英文切换", notes="OCR识别转换记录表-查询条件中英文切换")
|
|
||||||
@GetMapping(value = "/queryCondition")
|
|
||||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
|
||||||
@RequestParam(name = "cut") String cut) {
|
|
||||||
List<Map<String, Object>> list = onlCgformAreaService.queryCondition(flag, cut);
|
|
||||||
return Result.OK(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
@@ -107,8 +98,8 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "查询展示区域")
|
@AutoLog(value = "区域管理表-查询展示区域")
|
||||||
@ApiOperation(value="查询展示区域", notes="查询展示区域")
|
@ApiOperation(value="区域管理表-查询展示区域", notes="区域管理表-查询展示区域")
|
||||||
@GetMapping(value = "/queryShowArea")
|
@GetMapping(value = "/queryShowArea")
|
||||||
public Result<List<OnlCgformArea>> queryShowArea(OnlCgformArea onlCgformArea){
|
public Result<List<OnlCgformArea>> queryShowArea(OnlCgformArea onlCgformArea){
|
||||||
List<OnlCgformArea> list = onlCgformAreaService.queryShowArea(onlCgformArea);
|
List<OnlCgformArea> list = onlCgformAreaService.queryShowArea(onlCgformArea);
|
||||||
|
|||||||
+5
-7
@@ -78,9 +78,8 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
|||||||
@AutoLog(value = "标签管理-表头中英文切换")
|
@AutoLog(value = "标签管理-表头中英文切换")
|
||||||
@ApiOperation(value="标签管理-表头中英文切换", notes="标签管理-表头中英文切换")
|
@ApiOperation(value="标签管理-表头中英文切换", notes="标签管理-表头中英文切换")
|
||||||
@GetMapping(value = "/getHeader")
|
@GetMapping(value = "/getHeader")
|
||||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "cut") String cut) {
|
||||||
@RequestParam(name = "cut") String cut) {
|
List<Map<String, Object>> list =onlCgformTagService.getHeader(cut);
|
||||||
List<Map<String, Object>> list =onlCgformTagService.getHeader(flag, cut);
|
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,11 +89,10 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "标签管理-查询条件中英文切换")
|
@AutoLog(value = "标签管理-查询条件中英文切换")
|
||||||
@ApiOperation(value="标签管理-查询条件中英文切换", notes="OCR识别转换记录表-查询条件中英文切换")
|
@ApiOperation(value="标签管理-查询条件中英文切换", notes="标签管理-查询条件中英文切换")
|
||||||
@GetMapping(value = "/queryCondition")
|
@GetMapping(value = "/queryCondition")
|
||||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "cut") String cut) {
|
||||||
@RequestParam(name = "cut") String cut) {
|
List<Map<String, Object>> list = onlCgformTagService.queryCondition(cut);
|
||||||
List<Map<String, Object>> list = onlCgformTagService.queryCondition(flag, cut);
|
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-8
@@ -68,7 +68,9 @@ public interface IOnlCgformAreaService extends IService<OnlCgformArea> {
|
|||||||
*/
|
*/
|
||||||
List<OnlCgformArea> queryShowArea(OnlCgformArea onlCgformArea);
|
List<OnlCgformArea> queryShowArea(OnlCgformArea onlCgformArea);
|
||||||
|
|
||||||
/**
|
List<OnlCgformArea> queryShowAreaEnName(OnlCgformArea onlCgformArea);
|
||||||
|
|
||||||
|
/**
|
||||||
* 展示区域查询
|
* 展示区域查询
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
@@ -84,11 +86,4 @@ public interface IOnlCgformAreaService extends IService<OnlCgformArea> {
|
|||||||
*/
|
*/
|
||||||
public List<Map<String, Object>> getHeader(String flag, String cut);
|
public List<Map<String, Object>> getHeader(String flag, String cut);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询条件中英文切换
|
|
||||||
* @param flag
|
|
||||||
* @param cut
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<Map<String, Object>> queryCondition(String flag, String cut);
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-11
@@ -72,25 +72,17 @@ public interface IOnlCgformTagService extends IService<OnlCgformTag> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表表头中英文切换
|
* 列表表头中英文切换
|
||||||
* @param flag
|
|
||||||
* @param cut
|
* @param cut
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Map<String, Object>> getHeader(String flag, String cut);
|
List<Map<String, Object>> getHeader(String cut);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询条件中英文切换
|
* 查询条件中英文切换
|
||||||
* @param flag
|
|
||||||
* @param cut
|
* @param cut
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Map<String, Object>> queryCondition(String flag, String cut);
|
List<Map<String, Object>> queryCondition(String cut);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 表单中英文切换
|
|
||||||
* @param flag
|
|
||||||
* @param cut
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<Map<String, Object>> getForm(String flag, String cut);
|
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-38
@@ -116,7 +116,14 @@ public class OnlCgformAreaServiceImpl extends ServiceImpl<OnlCgformAreaMapper, O
|
|||||||
}
|
}
|
||||||
return list(QueryWrapper);
|
return list(QueryWrapper);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public List<OnlCgformArea> queryShowAreaEnName(OnlCgformArea onlCgformArea) {
|
||||||
|
QueryWrapper<OnlCgformArea> QueryWrapper = new QueryWrapper<>();
|
||||||
|
if(StringUtils.isNotBlank(onlCgformArea.getIsModel())){
|
||||||
|
QueryWrapper.select("id","en_name").orderByAsc("sort");
|
||||||
|
}
|
||||||
|
return list(QueryWrapper);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 展示区域查询
|
* 展示区域查询
|
||||||
*
|
*
|
||||||
@@ -136,20 +143,18 @@ public class OnlCgformAreaServiceImpl extends ServiceImpl<OnlCgformAreaMapper, O
|
|||||||
public List<Map<String, Object>> getHeader(String flag, String cut) {
|
public List<Map<String, Object>> getHeader(String flag, String cut) {
|
||||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||||
if (fieldList.size() != 0) {
|
if (fieldList.size() != 0) {
|
||||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
fieldList = fieldList.stream().filter(
|
||||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))
|
||||||
|
&& (
|
||||||
|
e.getDbFieldEnName().equals("display area")||e.getDbFieldEnName().equals("belonging module")
|
||||||
|
||e.getDbFieldEnName().equals("sort number")||e.getDbFieldEnName().equals("state")
|
||||||
|
)
|
||||||
|
).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
List<Map<String, Object>> list = new ArrayList<>();
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
for (OnlCgformField onlCgformField : fieldList) {
|
for (OnlCgformField onlCgformField : fieldList) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
if ("file_name".equals(onlCgformField.getDbFieldName())) {
|
|
||||||
//跳转详情的标识
|
|
||||||
map.put("click", "true");
|
|
||||||
}
|
|
||||||
//单独处理发布日期和标准实施日期
|
|
||||||
if ("update_time".equals(onlCgformField.getDbFieldName())) {
|
|
||||||
map.put("sort", "true");//列表排序标识
|
|
||||||
}
|
|
||||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||||
@@ -161,31 +166,4 @@ public class OnlCgformAreaServiceImpl extends ServiceImpl<OnlCgformAreaMapper, O
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询条件中英文切换
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Map<String, Object>> queryCondition(String flag, String cut) {
|
|
||||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
|
||||||
if (fieldList.size() != 0) {
|
|
||||||
//过滤出搜索条件()
|
|
||||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
List<Map<String, Object>> list = new ArrayList<>();
|
|
||||||
for (OnlCgformField onlCgformField : fieldList) {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
|
||||||
map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
|
||||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
|
||||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
|
||||||
} else {
|
|
||||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
|
||||||
}
|
|
||||||
list.add(map);
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+82
-84
@@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
|
||||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
|
||||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
|
||||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||||
import com.jero.modules.tag.entity.OnlCgformTag;
|
import com.jero.modules.tag.entity.OnlCgformTag;
|
||||||
import com.jero.modules.tag.mapper.OnlCgformTagMapper;
|
import com.jero.modules.tag.mapper.OnlCgformTagMapper;
|
||||||
@@ -17,7 +14,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 标签管理
|
* @Description: 标签管理
|
||||||
@@ -31,6 +27,8 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
|
|||||||
private OnlCgformTagMapper onlCgformTagMapper;
|
private OnlCgformTagMapper onlCgformTagMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||||
|
private OnlCgformArea onlCgformArea;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -114,8 +112,9 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
|
|||||||
@Override
|
@Override
|
||||||
public Integer queryExitData(OnlCgformTag onlCgformTag) {
|
public Integer queryExitData(OnlCgformTag onlCgformTag) {
|
||||||
LambdaQueryWrapper<OnlCgformTag> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<OnlCgformTag> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
if (StringUtils.isNotBlank(onlCgformTag.getIsModel())) {// && StringUtils.isNotBlank(onlCgformTag.getDbFieldName())) {
|
if (StringUtils.isNotBlank(onlCgformTag.getIsModel())) {
|
||||||
queryWrapper.eq(OnlCgformTag::getIsModel, onlCgformTag.getIsModel()).and(wq -> wq.eq(OnlCgformTag::getDbFieldTxt, onlCgformTag.getDbFieldTxt()));
|
queryWrapper.eq(OnlCgformTag::getIsModel, onlCgformTag.getIsModel()).eq(OnlCgformTag::getDbFieldTxt, onlCgformTag.getDbFieldTxt())
|
||||||
|
.eq(OnlCgformTag::getDbFieldEnName, onlCgformTag.getDbFieldEnName());
|
||||||
}
|
}
|
||||||
Integer count = onlCgformTagMapper.selectCount(queryWrapper);
|
Integer count = onlCgformTagMapper.selectCount(queryWrapper);
|
||||||
return count;
|
return count;
|
||||||
@@ -127,95 +126,94 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> getHeader(String flag, String cut) {
|
public List<Map<String, Object>> getHeader(String cut) {
|
||||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
|
||||||
if (fieldList.size() != 0) {
|
|
||||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
|
||||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
List<Map<String, Object>> list = new ArrayList<>();
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
for (OnlCgformField onlCgformField : fieldList) {
|
Map<String, Object> map1 = new HashMap<>();
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map2 = new HashMap<>();
|
||||||
if("file_name".equals(onlCgformField.getDbFieldName())){
|
Map<String, Object> map3 = new HashMap<>();
|
||||||
//跳转详情的标识
|
Map<String, Object> map4 = new HashMap<>();
|
||||||
map.put("click","true");
|
Map<String, Object> map5 = new HashMap<>();
|
||||||
|
Map<String, Object> map6 = new HashMap<>();
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
//中文名称
|
||||||
|
map1.put("db_field_name", "db_field_txt");//字段
|
||||||
|
map1.put("db_field_txt", "中文名称");//字段中文名
|
||||||
|
list.add(map1);
|
||||||
|
//英文名称
|
||||||
|
map2.put("db_field_name", "db_field_en_name");//字段
|
||||||
|
map2.put("db_field_txt", "英文名称");//字段中文名
|
||||||
|
list.add(map2);
|
||||||
|
//属性类型
|
||||||
|
map3.put("db_field_name", "field_show_type");//字段
|
||||||
|
map3.put("db_field_txt", "属性类型");//字段中文名
|
||||||
|
list.add(map3);
|
||||||
|
//字段长度
|
||||||
|
map4.put("db_field_name", "db_length");//字段
|
||||||
|
map4.put("db_field_txt", "字段长度");//字段中文名
|
||||||
|
list.add(map4);
|
||||||
|
//展示顺序
|
||||||
|
map5.put("db_field_name", "order_num");//字段
|
||||||
|
map5.put("db_field_txt", "展示顺序");//字段中文名
|
||||||
|
list.add(map5);
|
||||||
|
//展示区域
|
||||||
|
map6.put("db_field_name", "show_area");//字段
|
||||||
|
map6.put("db_field_txt", "展示区域");//字段中文名
|
||||||
|
list.add(map6);
|
||||||
|
} else {
|
||||||
|
//中文名称
|
||||||
|
map1.put("db_field_name", "db_field_txt");//字段
|
||||||
|
map1.put("db_field_txt", "chinese name");//字段英文名
|
||||||
|
list.add(map1);
|
||||||
|
//英文名称
|
||||||
|
map2.put("db_field_name", "db_field_en_name");//字段
|
||||||
|
map2.put("db_field_txt", "english name");//字段英文名
|
||||||
|
list.add(map2);
|
||||||
|
//属性类型
|
||||||
|
map3.put("db_field_name", "field_show_type");//字段
|
||||||
|
map3.put("db_field_txt", "attribute type");//字段英文名
|
||||||
|
list.add(map3);
|
||||||
|
//字段长度
|
||||||
|
map4.put("db_field_name", "db_length");//字段
|
||||||
|
map4.put("db_field_txt", "field length");//字段英文名
|
||||||
|
list.add(map4);
|
||||||
|
//展示顺序
|
||||||
|
map5.put("db_field_name", "order_num");//字段
|
||||||
|
map5.put("db_field_txt", "display order");//字段英文名
|
||||||
|
list.add(map5);
|
||||||
|
//展示区域
|
||||||
|
map6.put("db_field_name", "show_area");//字段
|
||||||
|
map6.put("db_field_txt", "display area");//字段英文名
|
||||||
|
list.add(map6);
|
||||||
}
|
}
|
||||||
//单独处理发布日期和标准实施日期
|
return list;
|
||||||
if ("update_time".equals(onlCgformField.getDbFieldName())) {
|
|
||||||
map.put("sort", "true");//列表排序标识
|
|
||||||
}
|
|
||||||
|
|
||||||
String dbFieldName = onlCgformField.getDbFieldName();
|
|
||||||
if (org.apache.commons.lang.StringUtils.isNotBlank(onlCgformField.getDictField())) {
|
|
||||||
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName)+ "_dictText");//配置了数据字典的字段,需要特殊处理
|
|
||||||
}else{
|
|
||||||
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName));//字段
|
|
||||||
}
|
|
||||||
|
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
|
||||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
|
||||||
}else{
|
|
||||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
|
||||||
}
|
|
||||||
list.add(map);
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询条件中英文切换
|
* 查询条件中英文切换
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/@Autowired
|
||||||
|
OnlCgformAreaServiceImpl onlCgformAreaService;
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> queryCondition(String flag, String cut) {
|
public List<Map<String, Object>> queryCondition(String cut) {
|
||||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
|
||||||
if (fieldList.size() != 0) {
|
|
||||||
//过滤出搜索条件()
|
|
||||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
List<Map<String, Object>> list = new ArrayList<>();
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
for (OnlCgformField onlCgformField : fieldList) {
|
Map<String, Object> map1 = new HashMap<>();
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map2 = new HashMap<>();
|
||||||
map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
map2= (Map<String, Object>) onlCgformAreaService.queryShowArea(onlCgformArea);
|
||||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
map1.put("db_field_name", "show_area");//字段
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
map1.put("db_field_txt", "展示区域");//字段中文名
|
||||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
map1.put("value", map2);
|
||||||
} else {
|
map1.put("field_show_type", "1");
|
||||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
list.add(map1);
|
||||||
}
|
|
||||||
list.add(map);
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
} else {
|
||||||
* 表单中英文切换
|
map2= (Map<String, Object>) onlCgformAreaService.queryShowAreaEnName(onlCgformArea);
|
||||||
*
|
map1.put("db_field_name", "show_area");//字段
|
||||||
* @return
|
map1.put("db_field_txt", "display area");//字段英文名
|
||||||
*/
|
map1.put("value", map2);
|
||||||
@Override
|
map1.put("field_show_type", "1");
|
||||||
public List<Map<String, Object>> getForm(String flag, String cut) {
|
list.add(map1);
|
||||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
|
||||||
if (fieldList.size() != 0) {
|
|
||||||
//过滤出搜索条件()
|
|
||||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowForm()))).collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
List<Map<String, Object>> list = new ArrayList<>();
|
|
||||||
for (OnlCgformField onlCgformField : fieldList) {
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
|
||||||
map.put("area", null);//展示区域。没用到
|
|
||||||
map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
|
||||||
map.put("field_must_input", onlCgformField.getFieldMustInput());//是否必填
|
|
||||||
map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
|
||||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
|
||||||
if (CutEnum.CN.getValue().equals(cut)) {
|
|
||||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
|
||||||
} else {
|
|
||||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
|
||||||
}
|
|
||||||
list.add(map);
|
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
import enquireScreen from '@/utils/device'
|
import enquireScreen from '@/utils/device'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import 'moment/locale/zh-cn'
|
import 'moment/locale/zh-cn'
|
||||||
|
import store from './store'
|
||||||
|
|
||||||
moment.locale('zh-cn')
|
moment.locale('zh-cn')
|
||||||
|
|
||||||
@@ -57,16 +58,8 @@
|
|||||||
// 自己配置多语言适配
|
// 自己配置多语言适配
|
||||||
this.$root.Bus.$on('switchLanguage', value => {
|
this.$root.Bus.$on('switchLanguage', value => {
|
||||||
let router_path = this.$route.path
|
let router_path = this.$route.path
|
||||||
switch (value) {
|
|
||||||
case 'zh-cn':
|
|
||||||
localStorage.setItem('language', 'zh-cn')
|
|
||||||
break
|
|
||||||
case 'en-us':
|
|
||||||
localStorage.setItem('language', 'en-us')
|
|
||||||
break
|
|
||||||
}
|
|
||||||
// 刷新页面
|
|
||||||
this.isRouterAlive = false //先关闭,
|
this.isRouterAlive = false //先关闭,
|
||||||
|
// 刷新页面
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
this.isRouterAlive = true //再打开
|
this.isRouterAlive = true //再打开
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,11 +9,12 @@
|
|||||||
@change="onChange"
|
@change="onChange"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
|
:maxTagCount="1"
|
||||||
|
:maxTagTextLength="2"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:getPopupContainer="getParentContainer"
|
:getPopupContainer="getParentContainer"
|
||||||
optionFilterProp="children"
|
optionFilterProp="children"
|
||||||
:filterOption="filterOption"
|
:filterOption="filterOption">
|
||||||
allowClear>
|
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="(item,index) in dictOptions"
|
v-for="(item,index) in dictOptions"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -130,3 +131,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
.ant-select-selection__choice{
|
||||||
|
max-width: 50% !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -444,7 +444,7 @@
|
|||||||
rules[res.db_field_name] = rule
|
rules[res.db_field_name] = rule
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// this.$set(this, 'rules', rules)
|
this.$set(this, 'rules', rules)
|
||||||
this.isFormInline = true
|
this.isFormInline = true
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<a-drawer
|
<a-drawer
|
||||||
:title="'推送'"
|
:title="$t('Push')"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
:width="600"
|
:width="600"
|
||||||
placement="right"
|
placement="right"
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
:loading="loading"
|
:loading="loading"
|
||||||
:tree-data="gData"
|
:tree-data="gData"
|
||||||
@select="onSelect"
|
@select="onSelect"
|
||||||
@check="onCheck"
|
|
||||||
>
|
>
|
||||||
</a-tree>
|
</a-tree>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,10 +31,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
import eventBUs from '../../common/event'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
props: {
|
props: {
|
||||||
url:{
|
url: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: {}
|
||||||
}
|
}
|
||||||
@@ -60,121 +61,9 @@
|
|||||||
{
|
{
|
||||||
title: 'parent 1-1',
|
title: 'parent 1-1',
|
||||||
key: '0-0-1',
|
key: '0-0-1',
|
||||||
children: [{ key: '0-0-1-0', title: 'zcvc' }]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
title: 'parent 1',
|
|
||||||
key: '0-0',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '张晨成',
|
|
||||||
key: '0-0-0',
|
|
||||||
disabled: true,
|
|
||||||
children: [
|
children: [
|
||||||
{ title: 'leaf', key: '0-0-0-0' },
|
{ key: '0-0-1-0', title: 'zcvc' }
|
||||||
{ title: 'leaf', key: '0-0-0-1' }
|
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'parent 1-1',
|
|
||||||
key: '0-0-1',
|
|
||||||
children: [{ key: '0-0-1-0', title: 'zcvc' }]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
title: 'parent 1',
|
|
||||||
key: '0-0',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '张晨成',
|
|
||||||
key: '0-0-0',
|
|
||||||
disabled: true,
|
|
||||||
children: [
|
|
||||||
{ title: 'leaf', key: '0-0-0-0' },
|
|
||||||
{ title: 'leaf', key: '0-0-0-1' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'parent 1-1',
|
|
||||||
key: '0-0-1',
|
|
||||||
children: [{ key: '0-0-1-0', title: 'zcvc' }]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
title: 'parent 1',
|
|
||||||
key: '0-0',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '张晨成',
|
|
||||||
key: '0-0-0',
|
|
||||||
disabled: true,
|
|
||||||
children: [
|
|
||||||
{ title: 'leaf', key: '0-0-0-0' },
|
|
||||||
{ title: 'leaf', key: '0-0-0-1' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'parent 1-1',
|
|
||||||
key: '0-0-1',
|
|
||||||
children: [{ key: '0-0-1-0', title: 'zcvc' }]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
title: 'parent 1',
|
|
||||||
key: '0-0',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '张晨成',
|
|
||||||
key: '0-0-0',
|
|
||||||
disabled: true,
|
|
||||||
children: [
|
|
||||||
{ title: 'leaf', key: '0-0-0-0' },
|
|
||||||
{ title: 'leaf', key: '0-0-0-1' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'parent 1-1',
|
|
||||||
key: '0-0-1',
|
|
||||||
children: [{ key: '0-0-1-0', title: 'zcvc' }]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
title: 'parent 1',
|
|
||||||
key: '0-0',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '张晨成',
|
|
||||||
key: '0-0-0',
|
|
||||||
disabled: true,
|
|
||||||
children: [
|
|
||||||
{ title: 'leaf', key: '0-0-0-0' },
|
|
||||||
{ title: 'leaf', key: '0-0-0-1' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'parent 1-1',
|
|
||||||
key: '0-0-1',
|
|
||||||
children: [{ key: '0-0-1-0', title: 'zcvc' }]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}, {
|
|
||||||
title: 'parent 1',
|
|
||||||
key: '0-0',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '张晨成',
|
|
||||||
key: '0-0-0',
|
|
||||||
disabled: true,
|
|
||||||
children: [
|
|
||||||
{ title: 'leaf', key: '0-0-0-0' },
|
|
||||||
{ title: 'leaf', key: '0-0-0-1' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'parent 1-1',
|
|
||||||
key: '0-0-1',
|
|
||||||
children: [{ key: '0-0-1-0', title: 'zcvc' }]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -182,33 +71,32 @@
|
|||||||
autoExpandParent: true,
|
autoExpandParent: true,
|
||||||
expandedKeys: [],
|
expandedKeys: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false
|
confirmLoading: false,
|
||||||
|
selectedKey: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSelect(selectedKeys, info) {
|
onSelect(selectedKeys) {
|
||||||
console.log('selected', selectedKeys, info)
|
this.selectedKey = selectedKeys
|
||||||
},
|
|
||||||
onCheck(checkedKeys, info) {
|
|
||||||
console.log('onCheck', checkedKeys, info)
|
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
getAction(this.url.pullMessage,{}).then((res)=>{
|
getAction(this.url.pullMessage, {}).then((res) => {
|
||||||
if (res.success){
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
this.visible = false
|
this.visible = false
|
||||||
}else{
|
eventBUs.$emit('searchReset')
|
||||||
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onChange() {
|
onChange(e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
<a-input class="box-input" v-model="formInline[item.db_field_name]"
|
<a-input class="box-input" v-model="formInline[item.db_field_name]"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:placeholder="item.placeholder"/>
|
:placeholder="$t('PleaseEnter')+item.db_field_txt"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|||||||
@@ -141,6 +141,9 @@
|
|||||||
//console.log(this.permissionMenuList)
|
//console.log(this.permissionMenuList)
|
||||||
//console.log('----navTheme------'+this.navTheme)
|
//console.log('----navTheme------'+this.navTheme)
|
||||||
//--update-end----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
|
//--update-end----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['setSidebar']),
|
...mapActions(['setSidebar']),
|
||||||
|
|||||||
@@ -33,8 +33,14 @@
|
|||||||
<!-- </span>-->
|
<!-- </span>-->
|
||||||
<header-notice class="action"/>
|
<header-notice class="action"/>
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<span @click="changeLocale('en-us')" v-show="localeval=='zh-cn'">English</span>
|
<span v-show="localeval=='zh-cn'">
|
||||||
<span @click="changeLocale('zh-cn')" v-show="localeval=='en-us'">中文</span>
|
<span @click="changeLocale('en-us')" v-if="!isLoading">English</span>
|
||||||
|
<a-icon v-else type="sync" spin/>
|
||||||
|
</span>
|
||||||
|
<span v-show="localeval=='en-us'">
|
||||||
|
<span @click="changeLocale('zh-cn')" v-if="!isLoading">中文</span>
|
||||||
|
<a-icon v-else type="sync" spin/>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-dropdown>
|
<a-dropdown>
|
||||||
<span class="action action-full ant-dropdown-link user-dropdown-menu">
|
<span class="action action-full ant-dropdown-link user-dropdown-menu">
|
||||||
@@ -42,34 +48,34 @@
|
|||||||
<!-- <span v-if="isDesktop()">欢迎您,{{ nickname() }}</span>-->
|
<!-- <span v-if="isDesktop()">欢迎您,{{ nickname() }}</span>-->
|
||||||
</span>
|
</span>
|
||||||
<a-menu slot="overlay" class="user-dropdown-menu-wrapper">
|
<a-menu slot="overlay" class="user-dropdown-menu-wrapper">
|
||||||
<a-menu-item key="0">
|
<!-- <a-menu-item key="0">-->
|
||||||
<router-link :to="{ name: 'account-center' }">
|
<!-- <router-link :to="{ name: 'account-center' }">-->
|
||||||
<a-icon type="user"/>
|
<!-- <a-icon type="user"/>-->
|
||||||
<span>个人中心</span>
|
<!-- <span>个人中心</span>-->
|
||||||
</router-link>
|
<!-- </router-link>-->
|
||||||
</a-menu-item>
|
<!-- </a-menu-item>-->
|
||||||
<a-menu-item key="1">
|
<!-- <a-menu-item key="1">-->
|
||||||
<router-link :to="{ name: 'account-settings-base' }">
|
<!-- <router-link :to="{ name: 'account-settings-base' }">-->
|
||||||
<a-icon type="setting"/>
|
<!-- <a-icon type="setting"/>-->
|
||||||
<span>账户设置</span>
|
<!-- <span>账户设置</span>-->
|
||||||
</router-link>
|
<!-- </router-link>-->
|
||||||
</a-menu-item>
|
<!-- </a-menu-item>-->
|
||||||
<a-menu-item key="3" @click="systemSetting">
|
<!-- <a-menu-item key="3" @click="systemSetting">-->
|
||||||
<a-icon type="tool"/>
|
<!-- <a-icon type="tool"/>-->
|
||||||
<span>系统设置</span>
|
<!-- <span>系统设置</span>-->
|
||||||
</a-menu-item>
|
<!-- </a-menu-item>-->
|
||||||
<a-menu-item key="4" @click="updatePassword">
|
<!-- <a-menu-item key="4" @click="updatePassword">-->
|
||||||
<a-icon type="setting"/>
|
<!-- <a-icon type="setting"/>-->
|
||||||
<span>密码修改</span>
|
<!-- <span>密码修改</span>-->
|
||||||
</a-menu-item>
|
<!-- </a-menu-item>-->
|
||||||
<a-menu-item key="5" @click="updateCurrentDepart">
|
<!-- <a-menu-item key="5" @click="updateCurrentDepart">-->
|
||||||
<a-icon type="cluster"/>
|
<!-- <a-icon type="cluster"/>-->
|
||||||
<span>切换部门</span>
|
<!-- <span>切换部门</span>-->
|
||||||
</a-menu-item>
|
<!-- </a-menu-item>-->
|
||||||
<a-menu-item key="6" @click="clearCache">
|
<!-- <a-menu-item key="6" @click="clearCache">-->
|
||||||
<a-icon type="sync"/>
|
<!-- <a-icon type="sync"/>-->
|
||||||
<span>清理缓存</span>
|
<!-- <span>清理缓存</span>-->
|
||||||
</a-menu-item>
|
<!-- </a-menu-item>-->
|
||||||
<a-menu-item key="6" @click="handleLogout">
|
<a-menu-item key="6" @click="handleLogout">
|
||||||
<a-icon type="logout"/>
|
<a-icon type="logout"/>
|
||||||
<span>退出登录</span>
|
<span>退出登录</span>
|
||||||
@@ -113,6 +119,8 @@
|
|||||||
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
||||||
import enUS from 'ant-design-vue/es/locale/en_US'
|
import enUS from 'ant-design-vue/es/locale/en_US'
|
||||||
import 'moment/locale/zh-cn'
|
import 'moment/locale/zh-cn'
|
||||||
|
import store from '../../store'
|
||||||
|
import router from '../../router'
|
||||||
|
|
||||||
moment.locale('zh-cn')
|
moment.locale('zh-cn')
|
||||||
const EN = 'en-us'
|
const EN = 'en-us'
|
||||||
@@ -127,6 +135,7 @@
|
|||||||
searchMenuOptions: [],
|
searchMenuOptions: [],
|
||||||
searchMenuComp: 'span',
|
searchMenuComp: 'span',
|
||||||
searchMenuVisible: false,
|
searchMenuVisible: false,
|
||||||
|
isLoading: false,
|
||||||
locale: zhCN,
|
locale: zhCN,
|
||||||
localeval: 'zh-cn'
|
localeval: 'zh-cn'
|
||||||
// update-begin author:sunjianlei date:20200219 for: 头部菜单搜索规范命名 --------------
|
// update-begin author:sunjianlei date:20200219 for: 头部菜单搜索规范命名 --------------
|
||||||
@@ -282,23 +291,31 @@
|
|||||||
/*update_end author:liushaoqian date:20200507 for: 刷新缓存*/
|
/*update_end author:liushaoqian date:20200507 for: 刷新缓存*/
|
||||||
moment,
|
moment,
|
||||||
changeLocale(localeval) {
|
changeLocale(localeval) {
|
||||||
this.$root.Bus.$emit('switchLanguage', localeval)
|
this.isLoading = true
|
||||||
this.localeval = localeval
|
switch (localeval) {
|
||||||
if (localeval === EN) {
|
case 'zh-cn':
|
||||||
moment.locale(EN)
|
localStorage.setItem('language', 'zh-cn')
|
||||||
this.$i18n.locale = EN
|
break
|
||||||
this.locale = enUS
|
case 'en-us':
|
||||||
this.queryAllDictItemsByCut()
|
localStorage.setItem('language', 'en-us')
|
||||||
// localStorage.setItem('language', EN)
|
break
|
||||||
// location.reload();
|
|
||||||
} else {
|
|
||||||
moment.locale(ZH)
|
|
||||||
this.$i18n.locale = ZH
|
|
||||||
this.locale = zhCN
|
|
||||||
this.queryAllDictItemsByCut()
|
|
||||||
// localStorage.setItem('language', ZH)
|
|
||||||
// location.reload();
|
|
||||||
}
|
}
|
||||||
|
store.dispatch('GetPermissionList').then(res => {
|
||||||
|
this.$root.Bus.$emit('switchLanguage', localeval)
|
||||||
|
this.isLoading = false
|
||||||
|
this.localeval = localeval
|
||||||
|
if (localeval === EN) {
|
||||||
|
moment.locale(EN)
|
||||||
|
this.$i18n.locale = EN
|
||||||
|
this.locale = enUS
|
||||||
|
this.queryAllDictItemsByCut()
|
||||||
|
} else {
|
||||||
|
moment.locale(ZH)
|
||||||
|
this.$i18n.locale = ZH
|
||||||
|
this.locale = zhCN
|
||||||
|
this.queryAllDictItemsByCut()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,9 +228,9 @@
|
|||||||
},
|
},
|
||||||
//下载
|
//下载
|
||||||
actionDown(val){
|
actionDown(val){
|
||||||
// console.log()
|
// downloadFile('/sys/common/download', val.docRealName, { id: val.attId })
|
||||||
// downloadFile('/sys/common/download', val.fileName, { id: val.id })
|
// downloadFile(val.docRealFile)
|
||||||
downloadFile(val.docRealFile)
|
window.open(val.docRealFile)
|
||||||
},
|
},
|
||||||
//删除
|
//删除
|
||||||
actionDelete(record){
|
actionDelete(record){
|
||||||
|
|||||||
@@ -46,40 +46,7 @@
|
|||||||
selectedKeys: [],
|
selectedKeys: [],
|
||||||
expandedKeys: [],
|
expandedKeys: [],
|
||||||
autoExpandParent: true,
|
autoExpandParent: true,
|
||||||
treeData: [
|
treeData: [],
|
||||||
{
|
|
||||||
title: '车身结构',
|
|
||||||
key: '0-0',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '车身',
|
|
||||||
key: '0-0-0',
|
|
||||||
children: [
|
|
||||||
{ title: '前窗', key: '0-0-0-0' },
|
|
||||||
{ title: '挡风', key: '0-0-0-1' },
|
|
||||||
{ title: '车门', key: '0-0-0-2' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '底盘',
|
|
||||||
key: '0-0-1',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '车机系统',
|
|
||||||
key: '0-0-2',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '软件中心',
|
|
||||||
key: '0-1',
|
|
||||||
children: [
|
|
||||||
{ title: '软件一', key: '0-1-0-0' },
|
|
||||||
{ title: '软件二', key: '0-1-0-1' },
|
|
||||||
{ title: '软件三', key: '0-1-0-2' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
dataList:[],
|
dataList:[],
|
||||||
searchValue:''
|
searchValue:''
|
||||||
}
|
}
|
||||||
@@ -106,7 +73,7 @@
|
|||||||
if(res.success){
|
if(res.success){
|
||||||
let data=res.result
|
let data=res.result
|
||||||
this.treeData=this.addAttr(data)
|
this.treeData=this.addAttr(data)
|
||||||
console.log('treeData',this.treeData)
|
// console.log('treeData',this.treeData)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <a-button type="primary" @click="showModal">新增</a-button>-->
|
<!-- <a-button type="primary" @click="showModal">新增</a-button>-->
|
||||||
<a-modal class="area-module" v-model="newVisible" :title="$t('add')" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="newVisible">
|
<a-modal class="area-module" v-model="newVisible" :title="title" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="newVisible">
|
||||||
<a-form-model
|
<a-form-model
|
||||||
class="tag-module"
|
class="tag-module"
|
||||||
ref="ruleForm"
|
ref="ruleForm"
|
||||||
@@ -99,6 +99,7 @@
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
title:this.$t('add'),
|
||||||
queryParams:{
|
queryParams:{
|
||||||
pageNo:1,
|
pageNo:1,
|
||||||
pageSize:10
|
pageSize:10
|
||||||
@@ -197,6 +198,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
showModal() {
|
showModal() {
|
||||||
|
this.title=this.$t('add')
|
||||||
this.newVisible = true;
|
this.newVisible = true;
|
||||||
},
|
},
|
||||||
//新增
|
//新增
|
||||||
@@ -265,6 +267,7 @@
|
|||||||
},
|
},
|
||||||
//编辑按钮
|
//编辑按钮
|
||||||
editArea(val){
|
editArea(val){
|
||||||
|
this.title=this.$t('edit')
|
||||||
this.newVisible = true;
|
this.newVisible = true;
|
||||||
let params={
|
let params={
|
||||||
id:val
|
id:val
|
||||||
|
|||||||
@@ -17,16 +17,16 @@
|
|||||||
<a-icon type="plus" />
|
<a-icon type="plus" />
|
||||||
{{$t('add')}}
|
{{$t('add')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text" @click="batDelete">
|
<div class="operator-text" v-if="dictVal=='tree'" @click="batDelete">
|
||||||
<a-icon type="delete" />
|
<a-icon type="delete" />
|
||||||
{{$t('BatchDelete')}}
|
{{$t('BatchDelete')}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dic-list-table">
|
<div class="dic-list-table">
|
||||||
<list-table v-if="dictVal=='list'&&dataFlag" :tableData="tableData" @editDict="editDict" @deleteDict="deleteDict" :total="total"></list-table>
|
<list-table v-if="dictVal=='list'&&dataFlag" :tableData="tableData" @editDict="editDict" @deleteDict="deleteDict" :total="total"></list-table>
|
||||||
<tree-table v-if="dictVal=='tree'&&dataFlag" :tabletreeData="tabletreeData" :record="record" @editDict="editTreeDict" @ok="ok" :total="total"></tree-table>
|
<tree-table v-if="dictVal=='tree'&&dataFlag" :tabletreeData="tabletreeData" :record="record" @editDict="editTreeDict" @selectedKeys="selectedKeys" @ok="ok" :total="total"></tree-table>
|
||||||
</div>
|
</div>
|
||||||
<a-modal class="dict-module" v-model="newVisible" :title="titleDict" ok-text="保存" cancel-text="取消" @ok="hideModal" @cancel="cancelModel" v-if="newVisible">
|
<a-modal class="dict-module" v-model="newVisible" :title="title" ok-text="保存" cancel-text="取消" @ok="hideModal" @cancel="cancelModel" v-if="newVisible">
|
||||||
<a-form-model
|
<a-form-model
|
||||||
v-if="newVisible"
|
v-if="newVisible"
|
||||||
class="dic-form-module"
|
class="dic-form-module"
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
titleDict:'新增',
|
title:this.$t('add'),
|
||||||
labelCol: { span: 4 },
|
labelCol: { span: 4 },
|
||||||
wrapperCol: { span: 18 },
|
wrapperCol: { span: 18 },
|
||||||
queryParams:{
|
queryParams:{
|
||||||
@@ -158,7 +158,8 @@
|
|||||||
parentVisible:false,
|
parentVisible:false,
|
||||||
dataFlag:false,
|
dataFlag:false,
|
||||||
total:0,
|
total:0,
|
||||||
isEdit:false
|
isEdit:false,
|
||||||
|
selectedIds:[], //树形选中的id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -194,6 +195,7 @@
|
|||||||
})
|
})
|
||||||
}else if(this.dictVal=='tree'){
|
}else if(this.dictVal=='tree'){
|
||||||
getAction(`sys/category/queryBySysDictId`,{
|
getAction(`sys/category/queryBySysDictId`,{
|
||||||
|
...this.queryParams,
|
||||||
id:this.record.id,
|
id:this.record.id,
|
||||||
isTagDict:1
|
isTagDict:1
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
@@ -249,8 +251,10 @@
|
|||||||
},
|
},
|
||||||
//新增
|
//新增
|
||||||
dicAdd(){
|
dicAdd(){
|
||||||
|
this.title=this.$t('add')
|
||||||
this.isEdit=false
|
this.isEdit=false
|
||||||
this.newVisible=true;
|
this.newVisible=true;
|
||||||
|
this.form={}
|
||||||
if(this.dictVal=='list'){
|
if(this.dictVal=='list'){
|
||||||
this.parentVisible=false
|
this.parentVisible=false
|
||||||
|
|
||||||
@@ -280,6 +284,7 @@
|
|||||||
postAction(`sys/dictItem/add`, params).then(res => {
|
postAction(`sys/dictItem/add`, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
this.form={}
|
||||||
this.loadData()
|
this.loadData()
|
||||||
this.newVisible = false
|
this.newVisible = false
|
||||||
} else {
|
} else {
|
||||||
@@ -308,6 +313,7 @@
|
|||||||
postAction(`sys/category/add`, params).then(res => {
|
postAction(`sys/category/add`, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
this.form={}
|
||||||
this.loadData()
|
this.loadData()
|
||||||
this.newVisible = false
|
this.newVisible = false
|
||||||
} else {
|
} else {
|
||||||
@@ -323,6 +329,7 @@
|
|||||||
},
|
},
|
||||||
//列表编辑
|
//列表编辑
|
||||||
editDict(rec,val){
|
editDict(rec,val){
|
||||||
|
this.title=this.$t('edit')
|
||||||
this.isEdit=true
|
this.isEdit=true
|
||||||
this.form={...rec}
|
this.form={...rec}
|
||||||
this.newVisible=val
|
this.newVisible=val
|
||||||
@@ -330,6 +337,7 @@
|
|||||||
},
|
},
|
||||||
//树状编辑
|
//树状编辑
|
||||||
editTreeDict(val,form){
|
editTreeDict(val,form){
|
||||||
|
this.title=this.$t('edit')
|
||||||
this.isEdit=true
|
this.isEdit=true
|
||||||
this.form={...form}
|
this.form={...form}
|
||||||
this.newVisible=val
|
this.newVisible=val
|
||||||
@@ -356,14 +364,37 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleChange(){
|
||||||
|
|
||||||
|
},
|
||||||
|
//树形选中行
|
||||||
|
selectedKeys(val){
|
||||||
|
this.selectedIds=val
|
||||||
|
},
|
||||||
//批量删除
|
//批量删除
|
||||||
batDelete(){
|
batDelete(){
|
||||||
let params={
|
let params={
|
||||||
|
ids:this.selectedIds.join(',')
|
||||||
|
}
|
||||||
|
if(this.selectedIds && this.selectedIds.length>0){
|
||||||
|
this.$confirm({
|
||||||
|
title: this.$t('ConfirmDelete'),
|
||||||
|
content: '',
|
||||||
|
onOk:
|
||||||
|
async () => {
|
||||||
|
deleteAction(`sys/category/deleteBatch`, params).then(res => {
|
||||||
|
if(res.success){
|
||||||
|
this.loadData()
|
||||||
|
this.$message.success(res.message)
|
||||||
|
}else{
|
||||||
|
this.$message.warning((res.message))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}
|
}
|
||||||
deleteAction(`sys/category/deleteBatch`,params).then(res=>{
|
|
||||||
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
ok(){
|
ok(){
|
||||||
this.loadData()
|
this.loadData()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="new-tag-drawer">
|
<div class="new-tag-drawer">
|
||||||
<onl-cgform-tag-form ref="realForm" @ok="submitCallback" :isTagContent="isTagContent" :editData="editData" :editId=editId :submitEdit="submitEdit" :disabled="disableSubmit" normal> </onl-cgform-tag-form>
|
<onl-cgform-tag-form ref="realForm" @ok="submitCallback" :isTagContent="isTagContent" :editData="editData" :editId=editId :submitEdit="submitEdit" :disabled="disableSubmit" normal v-if="drawerVisible"> </onl-cgform-tag-form>
|
||||||
|
|
||||||
<div class="drawer-footer">
|
<div class="drawer-footer">
|
||||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">{{$t('preservation')}}</a-button>
|
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">{{$t('preservation')}}</a-button>
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
:data-source="tabData"
|
:data-source="tabData"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:row-selection="{selectedRowKeys: selectedRowKeys, onSelectAll: onSelectAll, onSelect: onSelect}"
|
:rowClassName='setRowClassName'
|
||||||
|
:row-selection="{selectedRowKeys: selectedRowKeys,onChange: onSelectChange, onSelectAll: onSelectAll, onSelect: onSelect, }"
|
||||||
>
|
>
|
||||||
<template slot="action" slot-scope="text, record">
|
<template slot="action" slot-scope="text, record">
|
||||||
<a class="action-edit" href="javascript:;" @click="actionEdit(record)">编辑</a>
|
<a class="action-edit" href="javascript:;" @click="actionEdit(record)">编辑</a>
|
||||||
@@ -34,27 +35,21 @@
|
|||||||
title: '名称',
|
title: '名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
key: 'name',
|
key: 'name',
|
||||||
align: "center",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '英文名称',
|
title: '英文名称',
|
||||||
dataIndex: 'enName',
|
dataIndex: 'enName',
|
||||||
key: 'enName',
|
key: 'enName',
|
||||||
width: '12%',
|
|
||||||
align: "center",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '描述',
|
title: '描述',
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
width: '30%',
|
|
||||||
key: 'description',
|
key: 'description',
|
||||||
align: "center",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
scopedSlots: {customRender: 'action'},
|
scopedSlots: {customRender: 'action'},
|
||||||
align: "center",
|
|
||||||
width: 170
|
width: 170
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -78,7 +73,7 @@
|
|||||||
let data = this.toTree(treeData)
|
let data = this.toTree(treeData)
|
||||||
this.tabData=data
|
this.tabData=data
|
||||||
this.loading=false
|
this.loading=false
|
||||||
console.log('treedata',data)
|
// console.log('treedata',data)
|
||||||
// this.dataFlag=true
|
// this.dataFlag=true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -91,7 +86,6 @@
|
|||||||
// 将数据存储为 以 id 为 KEY 的 map 索引数据列
|
// 将数据存储为 以 id 为 KEY 的 map 索引数据列
|
||||||
let map = {};
|
let map = {};
|
||||||
config.forEach((item) => {
|
config.forEach((item) => {
|
||||||
// 树 的label
|
|
||||||
item.label = item.name;
|
item.label = item.name;
|
||||||
item.key=item.id;
|
item.key=item.id;
|
||||||
map[item.id] = item;
|
map[item.id] = item;
|
||||||
@@ -132,6 +126,15 @@
|
|||||||
actionEdit(val){
|
actionEdit(val){
|
||||||
this.$emit('editDict',true,val)
|
this.$emit('editDict',true,val)
|
||||||
},
|
},
|
||||||
|
//设置行属性
|
||||||
|
setRowClassName(record){
|
||||||
|
if(record.pid != 0){
|
||||||
|
return 'rowStyle'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSelectChange(keys){
|
||||||
|
// console.log('keys',keys,this.selectedRowKeys)
|
||||||
|
},
|
||||||
onSelectAll(selected) {
|
onSelectAll(selected) {
|
||||||
if (selected) {
|
if (selected) {
|
||||||
const tabData = this.tabData;
|
const tabData = this.tabData;
|
||||||
@@ -164,6 +167,8 @@
|
|||||||
setParentUncheck(key);
|
setParentUncheck(key);
|
||||||
}
|
}
|
||||||
this.selectedRowKeys = Array.from(set);
|
this.selectedRowKeys = Array.from(set);
|
||||||
|
// console.log('keyssssss',this.selectedRowKeys)
|
||||||
|
this.$emit('selectedKeys',this.selectedRowKeys)
|
||||||
// 设置父级选择
|
// 设置父级选择
|
||||||
function setParentCheck(key) {
|
function setParentCheck(key) {
|
||||||
let parent = getParent(key);
|
let parent = getParent(key);
|
||||||
@@ -219,6 +224,7 @@
|
|||||||
set.add(v.key);
|
set.add(v.key);
|
||||||
v.children && setChildCheck(v.children);
|
v.children && setChildCheck(v.children);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
// 设置child取消
|
// 设置child取消
|
||||||
function setChildUncheck(list) {
|
function setChildUncheck(list) {
|
||||||
@@ -245,4 +251,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.rowStyle{
|
||||||
|
background-color:#fafafa;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
{{$t('add')}}
|
{{$t('add')}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-modal class="show-content" v-model="contentVisible" :visible="contentVisible" :title="$t('add')" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="contentVisible">
|
<a-modal class="show-content" v-model="contentVisible" :visible="contentVisible" :title="title" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="contentVisible">
|
||||||
<a-form-model
|
<a-form-model
|
||||||
class="tag-content"
|
class="tag-content"
|
||||||
ref="ruleForm"
|
ref="ruleForm"
|
||||||
@@ -99,6 +99,7 @@
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
title: this.$t('add'),
|
||||||
total:0,
|
total:0,
|
||||||
queryParams:{
|
queryParams:{
|
||||||
pageNo:1,
|
pageNo:1,
|
||||||
@@ -199,12 +200,12 @@
|
|||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
handleAdd(){
|
handleAdd(){
|
||||||
|
this.title=this.$t('add')
|
||||||
this.isEdit=1
|
this.isEdit=1
|
||||||
this.contentVisible=true
|
this.contentVisible=true
|
||||||
this.form={}
|
this.form={}
|
||||||
},
|
},
|
||||||
hideModal(){
|
hideModal(){
|
||||||
|
|
||||||
let params={
|
let params={
|
||||||
...this.form,
|
...this.form,
|
||||||
}
|
}
|
||||||
@@ -272,11 +273,12 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onSelectChange(selectedRowKeys) {
|
onSelectChange(selectedRowKeys) {
|
||||||
console.log('selectedRowKeys changed: ', selectedRowKeys);
|
// console.log('selectedRowKeys changed: ', selectedRowKeys);
|
||||||
this.selectedRowKeys = selectedRowKeys;
|
this.selectedRowKeys = selectedRowKeys;
|
||||||
},
|
},
|
||||||
//编辑
|
//编辑
|
||||||
actionEdit(val){
|
actionEdit(val){
|
||||||
|
this.title=this.$t('edit')
|
||||||
this.isEdit=0
|
this.isEdit=0
|
||||||
this.form={...val}
|
this.form={...val}
|
||||||
this.contentVisible=true
|
this.contentVisible=true
|
||||||
@@ -285,7 +287,7 @@
|
|||||||
handleDicPop(record){
|
handleDicPop(record){
|
||||||
this.record=record
|
this.record=record
|
||||||
if(record.attributeType=='1'){
|
if(record.attributeType=='1'){
|
||||||
console.log('attribu',record.attributeType,record.attributeType=='1')
|
// console.log('attribu',record.attributeType,record.attributeType=='1')
|
||||||
// this.typeVisible[record.id]=false
|
// this.typeVisible[record.id]=false
|
||||||
this.dictVal='list'
|
this.dictVal='list'
|
||||||
this.dicVisible=true
|
this.dicVisible=true
|
||||||
@@ -297,8 +299,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
afterDicVisibleChange(val) {
|
afterDicVisibleChange(val) {
|
||||||
console.log('dicVisible',this.dicVisible)
|
// console.log('dicVisible',this.dicVisible)
|
||||||
console.log('visible', val);
|
// console.log('visible', val);
|
||||||
},
|
},
|
||||||
//字典列表关闭
|
//字典列表关闭
|
||||||
onDicClose() {
|
onDicClose() {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="tag-item">
|
<div class="tag-item">
|
||||||
|
|
||||||
<div class="table-page-search-wrapper">
|
<div class="table-page-search-wrapper">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
@@ -253,6 +252,7 @@
|
|||||||
...this.queryParam,
|
...this.queryParam,
|
||||||
isModel:1
|
isModel:1
|
||||||
}
|
}
|
||||||
|
console.log('params',params)
|
||||||
if(val==1){
|
if(val==1){
|
||||||
params.isModel=1
|
params.isModel=1
|
||||||
}else if(val==0){
|
}else if(val==0){
|
||||||
@@ -355,6 +355,7 @@
|
|||||||
// console.log('val',val)
|
// console.log('val',val)
|
||||||
},
|
},
|
||||||
handleAddPop(val){
|
handleAddPop(val){
|
||||||
|
this.editData={}
|
||||||
this.drawerVisible=true
|
this.drawerVisible=true
|
||||||
this.titleTag=this.$t('NewLabelItem')
|
this.titleTag=this.$t('NewLabelItem')
|
||||||
this.submitEdit='add'
|
this.submitEdit='add'
|
||||||
|
|||||||
@@ -127,7 +127,7 @@
|
|||||||
list: '/sys/sysAnnouncementSend/getMyAnnouncementSend',
|
list: '/sys/sysAnnouncementSend/getMyAnnouncementSend',
|
||||||
editCementSend: 'sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
editCementSend: 'sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
||||||
readAllMsg: 'sys/sysAnnouncementSend/read',
|
readAllMsg: 'sys/sysAnnouncementSend/read',
|
||||||
deleteUrl: ''
|
deleteUrl: 'sys/sysAnnouncementSend/deleteBatch'
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
openPath: '',
|
openPath: '',
|
||||||
|
|||||||
@@ -329,6 +329,11 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
loginSuccess () {
|
loginSuccess () {
|
||||||
|
let langCn = localStorage.language
|
||||||
|
// 默认中文
|
||||||
|
if (!langCn) {
|
||||||
|
localStorage.setItem('language', 'zh-cn')
|
||||||
|
}
|
||||||
this.$router.push({ path: "/dashboard/analysis" }).catch((res)=>{})
|
this.$router.push({ path: "/dashboard/analysis" }).catch((res)=>{})
|
||||||
this.$notification.success({
|
this.$notification.success({
|
||||||
message: '欢迎',
|
message: '欢迎',
|
||||||
|
|||||||
Reference in New Issue
Block a user