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