Merge remote-tracking branch 'origin/master'
This commit is contained in:
+5
@@ -229,6 +229,11 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String translateDictEn(String code, String key, String cut) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysPermissionDataRuleModel> queryPermissionDataRule(String component, String requestPath, String username) {
|
||||
return null;
|
||||
|
||||
+8
@@ -64,6 +64,14 @@ public interface CommonAPI {
|
||||
*/
|
||||
String translateDict(String code, String key);
|
||||
|
||||
/**
|
||||
* 数据字典英文
|
||||
* @param code
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
String translateDictEn(String code, String key,String cut);
|
||||
|
||||
/**
|
||||
* 8查询数据权限
|
||||
* @return
|
||||
|
||||
+17
-7
@@ -3,6 +3,7 @@ package com.jero.common.api.vo;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
@@ -31,18 +32,24 @@ public class Result<T> implements Serializable {
|
||||
@ApiModelProperty(value = "返回处理消息")
|
||||
private String message = "操作成功!";
|
||||
|
||||
/**
|
||||
* 返回处理消息
|
||||
*/
|
||||
@ApiModelProperty(value = "中英文切换标识")
|
||||
private String cut = CutEnum.CN.getValue();
|
||||
|
||||
/**
|
||||
* 返回代码
|
||||
*/
|
||||
@ApiModelProperty(value = "返回代码")
|
||||
private Integer code = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 返回数据对象 data
|
||||
*/
|
||||
@ApiModelProperty(value = "返回数据对象")
|
||||
private T result;
|
||||
|
||||
|
||||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
@@ -50,9 +57,9 @@ public class Result<T> implements Serializable {
|
||||
private long timestamp = System.currentTimeMillis();
|
||||
|
||||
public Result() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Result<T> success(String message) {
|
||||
this.message = message;
|
||||
this.code = CommonConstant.SC_OK_200;
|
||||
@@ -108,14 +115,17 @@ public class Result<T> implements Serializable {
|
||||
r.setSuccess(true);
|
||||
r.setCode(CommonConstant.SC_OK_200);
|
||||
r.setMessage(msg);
|
||||
if(CutEnum.CN.getValue().equals(msg) || CutEnum.EN.getValue().equals(msg)){
|
||||
r.setCut(msg);
|
||||
}
|
||||
r.setResult(data);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
public static Result<Object> error(String msg) {
|
||||
return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg);
|
||||
}
|
||||
|
||||
|
||||
public static Result<Object> error(int code, String msg) {
|
||||
Result<Object> r = new Result<Object>();
|
||||
r.setCode(code);
|
||||
@@ -140,4 +150,4 @@ public class Result<T> implements Serializable {
|
||||
@JsonIgnore
|
||||
private String onlTable;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+29
-11
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
@@ -82,24 +83,34 @@ public class DictAspect {
|
||||
private void parseDictText(Object result) {
|
||||
if (result instanceof Result) {
|
||||
if (((Result) result).getResult() instanceof IPage) {
|
||||
String cut = ((Result) result).getCut();
|
||||
List<JSONObject> items = new ArrayList<>();
|
||||
for (Object record : ((IPage) ((Result) result).getResult()).getRecords()) {
|
||||
JSONObject item = getJsonObject(record);
|
||||
JSONObject item = getJsonObject(record,cut);
|
||||
items.add(item);
|
||||
}
|
||||
((IPage) ((Result) result).getResult()).setRecords(items);
|
||||
}else if(((Result) result).getResult() instanceof List){
|
||||
// List<JSONObject> items = new ArrayList<>();
|
||||
// for (Object record : (List)((Result) result).getResult()) {
|
||||
// JSONObject item = getJsonObject(record);
|
||||
// items.add(item);
|
||||
// }
|
||||
// ((Result) result).setResult(items);
|
||||
String cut = ((Result) result).getCut();
|
||||
//返回结果中只处理实体对象的不处理其他类型
|
||||
if(((List) ((Result) result).getResult()).size() != 0){
|
||||
String name = ((ArrayList) ((Result) result).getResult()).get(0).getClass().getName();
|
||||
if(!"java.util.LinkedHashMap".equals(name) && !"java.util.HashMap".equals(name) && !"java.lang.String".equals(name)){
|
||||
List<JSONObject> items = new ArrayList<>();
|
||||
for (Object record : (List)((Result) result).getResult()) {
|
||||
JSONObject item = getJsonObject(record,cut);
|
||||
items.add(item);
|
||||
}
|
||||
((Result) result).setResult(items);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private JSONObject getJsonObject(Object record) {
|
||||
private JSONObject getJsonObject(Object record,String cut) {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String json = "{}";
|
||||
try {
|
||||
@@ -120,7 +131,7 @@ public class DictAspect {
|
||||
String key = String.valueOf(item.get(field.getName()));
|
||||
|
||||
//翻译字典值对应的txt
|
||||
String textValue = translateDictValue(code, text, table, key);
|
||||
String textValue = translateDictValue(code, text, table, key,cut);
|
||||
|
||||
log.debug(" 字典Val : " + textValue);
|
||||
log.debug(" __翻译字典字段__ " + field.getName() + CommonConstant.DICT_TEXT_SUFFIX + ": " + textValue);
|
||||
@@ -143,7 +154,7 @@ public class DictAspect {
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
private String translateDictValue(String code, String text, String table, String key) {
|
||||
private String translateDictValue(String code, String text, String table, String key,String cut) {
|
||||
if(oConvertUtils.isEmpty(key)) {
|
||||
return null;
|
||||
}
|
||||
@@ -159,13 +170,20 @@ public class DictAspect {
|
||||
log.debug("--DictAspect------dicTable="+ table+" ,dicText= "+text+" ,dicCode="+code);
|
||||
tmpValue= commonAPI.translateDictFromTable(table,text,code,k.trim());
|
||||
}else {
|
||||
tmpValue = commonAPI.translateDict(code, k.trim());
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
tmpValue = commonAPI.translateDict(code, k.trim());
|
||||
}else if(CutEnum.EN.getValue().equals(cut)){
|
||||
tmpValue = commonAPI.translateDictEn(code, k.trim(),cut);
|
||||
}
|
||||
|
||||
}
|
||||
if (tmpValue != null) {
|
||||
if (!"".equals(textValue.toString())) {
|
||||
textValue.append(",");
|
||||
}
|
||||
textValue.append(tmpValue);
|
||||
}else{
|
||||
tmpValue = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-5
@@ -430,7 +430,7 @@ public class SysDictController {
|
||||
result.error500("未找到对应实体");
|
||||
}else {
|
||||
if (StringUtils.isNotBlank(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(sysDict.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
result.error500("固定字段,不可修改");
|
||||
}else{
|
||||
sysDict.setUpdateTime(new Date());
|
||||
@@ -460,7 +460,7 @@ public class SysDictController {
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
SysDict sysDict = sysDictService.queryById(id);
|
||||
if (StringUtils.isNotBlank(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(sysDict.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
result.error500("固定字段,不可删除");
|
||||
} else {
|
||||
boolean ok = sysDictService.removeById(id);
|
||||
@@ -489,7 +489,7 @@ public class SysDictController {
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
try{
|
||||
SysDict sysDict = sysDictService.queryById(id);
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(sysDict.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly()))) {
|
||||
result.error500("固定字段,不可删除");
|
||||
} else {
|
||||
sysDictService.updateDictDelFlag(CommonConstant.DEL_FLAG_1,id);
|
||||
@@ -519,7 +519,7 @@ public class SysDictController {
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
for (String list : idList) {
|
||||
SysDict midDict = sysDictService.getById(list);
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(sysDict.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(midDict.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(sysDict.getIsReadOnly())) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(String.valueOf(midDict.getIsReadOnly()))) {
|
||||
return result.error500("包含固定字段,不可删除");
|
||||
} else {
|
||||
sysDictService.removeByIds(idList);
|
||||
@@ -547,7 +547,7 @@ public class SysDictController {
|
||||
result.error500("参数不识别!");
|
||||
}else {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(String.valueOf(joinSystem.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(joinSystem.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(joinSystem.getIsReadOnly()))) {
|
||||
result.error500("包含固定字段,不可删除");
|
||||
} else {
|
||||
sysDictService.updateDictDelFlag(CommonConstant.DEL_FLAG_1,joinSystem.getId());
|
||||
|
||||
+3
@@ -1467,6 +1467,9 @@ public class SysUserController {
|
||||
@ApiOperation(value="文档库推送部门和人员的模糊搜索", notes="文档库推送部门和人员的模糊搜索")
|
||||
@GetMapping(value = "/getUserAndDepart")
|
||||
public List<SysUserDepartVO> getUserAndDepart(String name){
|
||||
if("%".equals(name)){
|
||||
name = "/%";
|
||||
}
|
||||
LambdaQueryWrapper<SysUser> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.like(SysUser::getRealname,name);
|
||||
List<SysUser> sysUserList = sysUserService.list(lambdaQueryWrapper);
|
||||
|
||||
+6
-4
@@ -24,7 +24,7 @@ import java.util.Map;
|
||||
* @since 2018-12-28
|
||||
*/
|
||||
public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||
|
||||
|
||||
/**
|
||||
* 重复检查SQL
|
||||
* @return
|
||||
@@ -32,7 +32,7 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||
public Long duplicateCheckCountSql(DuplicateCheckVo duplicateCheckVo);
|
||||
|
||||
public Long duplicateCheckCountSqlNoDataId(DuplicateCheckVo duplicateCheckVo);
|
||||
|
||||
|
||||
public List<DictModel> queryDictItemsByCode(@Param("code") String code);
|
||||
|
||||
@Deprecated
|
||||
@@ -47,6 +47,8 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||
|
||||
public String queryDictTextByKey(@Param("code") String code,@Param("key") String key);
|
||||
|
||||
public String queryDictTextByKeyEn(@Param("code") String code,@Param("key") String key);
|
||||
|
||||
public String queryDictKeyByText(@Param("code") String code,@Param("text") String key);
|
||||
|
||||
@Deprecated
|
||||
@@ -60,13 +62,13 @@ public interface SysDictMapper extends BaseMapper<SysDict> {
|
||||
* @return
|
||||
*/
|
||||
public List<DictModel> queryAllDepartBackDictModel();
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有用户 作为字典信息 username -->value,realname -->text
|
||||
* @return
|
||||
*/
|
||||
public List<DictModel> queryAllUserBackDictModel();
|
||||
|
||||
|
||||
/**
|
||||
* 通过关键字查询出字典表
|
||||
* @param table
|
||||
|
||||
+6
@@ -15,6 +15,12 @@
|
||||
where s.dict_id = (select id from sys_dict where dict_code = #{code})
|
||||
and s.item_value = #{key}
|
||||
</select>
|
||||
<!-- 通过字典code获取字典数据(英文) -->
|
||||
<select id="queryDictTextByKeyEn" parameterType="String" resultType="String">
|
||||
select s.en_name from sys_dict_item s
|
||||
where s.dict_id = (select id from sys_dict where dict_code = #{code})
|
||||
and s.item_value = #{key}
|
||||
</select>
|
||||
|
||||
<!-- 通过字典code获取字典数据 -->
|
||||
<select id="queryDictKeyByText" parameterType="String" resultType="String">
|
||||
|
||||
+1
@@ -33,6 +33,7 @@ public interface ISysDictService extends IService<SysDict> {
|
||||
public List<DictModel> queryTableDictItemsByCodeAndFilter(String table, String text, String code, String filterSql);
|
||||
|
||||
public String queryDictTextByKey(String code, String key);
|
||||
public String queryDictTextByKeyEn(String code, String key,String cut);
|
||||
|
||||
@Deprecated
|
||||
String queryTableDictTextByKey(String table, String text, String code, String key);
|
||||
|
||||
+7
-2
@@ -51,7 +51,7 @@ import java.util.*;
|
||||
/**
|
||||
* @Description: 底层共通业务API,提供其他独立模块调用
|
||||
* @Author: scott
|
||||
* @Date:2019-4-20
|
||||
* @Date:2019-4-20
|
||||
* @Version:V1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@@ -118,6 +118,11 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
return sysDictService.queryDictTextByKey(code, key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String translateDictEn(String code, String key, String cut) {
|
||||
return sysDictService.queryDictTextByKeyEn(code, key,cut);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysPermissionDataRuleModel> queryPermissionDataRule(String component, String requestPath, String username) {
|
||||
List<SysPermission> currentSyspermission = null;
|
||||
@@ -1015,4 +1020,4 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
public List<SysDepartTreeModel> listSonDepartsByDepId(String departId) {
|
||||
return sysDepartService.listSonDepartsByDepId(departId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -123,6 +123,12 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
||||
log.debug("无缓存dictText的时候调用这里!");
|
||||
return sysDictMapper.queryDictTextByKey(code, key);
|
||||
}
|
||||
@Override
|
||||
@Cacheable(value = CacheConstant.SYS_DICT_CACHE,key = "#code+':'+#key+#cut")
|
||||
public String queryDictTextByKeyEn(String code, String key,String cut) {
|
||||
log.debug("无缓存dictText的时候调用这里!");
|
||||
return sysDictMapper.queryDictTextByKeyEn(code, key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过查询指定table的 text code 获取字典
|
||||
|
||||
+7
-7
@@ -49,7 +49,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@ApiOperation(value="分页查询", notes="分页查询")
|
||||
@PostMapping(value = "/queryPageInfo")
|
||||
@ResponseBody
|
||||
// @RequiresPermissions("document:queryPageInfo")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public JSONObject queryPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.getInfoPage(parameter);
|
||||
Result<IPage> ok = Result.OK(infoPage);
|
||||
@@ -66,7 +66,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@ApiOperation(value="代替标准分页列表查询", notes="代替标准分页列表查询")
|
||||
@PostMapping(value = "/replacePageInfo")
|
||||
@ResponseBody
|
||||
// @RequiresPermissions("document:replacePageInfo")
|
||||
@RequiresPermissions("document:getInfoById")
|
||||
public Result<?> replacePageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.replacePageInfo(parameter);
|
||||
// Result<IPage> ok = Result.OK(infoPage);
|
||||
@@ -161,7 +161,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@AutoLog(value = "文档库信息表-查询条件")
|
||||
@ApiOperation(value="文档库信息表-查询条件", notes="文档库信息表-查询条件")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
// @RequiresPermissions("document:queryCondition")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> queryCondition(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String,Object>> list = bussDocumentLibraryEOService.queryCondition(flag,cut,null);
|
||||
@@ -176,7 +176,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@AutoLog(value = "文档库信息表-列表表头")
|
||||
@ApiOperation(value="文档库信息表-列表表头", notes="文档库信息表-列表表头")
|
||||
@GetMapping(value = "/getHeader")
|
||||
// @RequiresPermissions("document:getHeader")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> getHeader(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String,Object>> list = bussDocumentLibraryEOService.getHeader(flag,cut,null);
|
||||
@@ -191,7 +191,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@AutoLog(value = "文档库信息表-新增表单")
|
||||
@ApiOperation(value="文档库信息表-新增表单", notes="文档库信息表-新增表单")
|
||||
@GetMapping(value = "/getAddForm")
|
||||
// @RequiresPermissions("document:getAddForm")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> getAddForm(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut,
|
||||
@RequestParam(name="type",required=true) String type) {
|
||||
@@ -237,7 +237,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@AutoLog(value = "编辑数据查询")
|
||||
@ApiOperation(value="编辑数据查询", notes="编辑数据查询")
|
||||
@GetMapping(value = "/getDocumentInfoById")
|
||||
// @RequiresPermissions("document:getDocumentInfoById")
|
||||
@RequiresPermissions("document:updateInfo")
|
||||
public Result<List<Map<String,Object>>> getDocumentInfoById(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getDocumentInfoById(id,cut);
|
||||
@@ -251,7 +251,7 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
@AutoLog(value = "详情数据查询")
|
||||
@ApiOperation(value="详情数据查询", notes="详情数据查询")
|
||||
@GetMapping(value = "/getInfoById")
|
||||
// @RequiresPermissions("document:getInfoById")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> getInfoById(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getInfoById(id,cut);
|
||||
|
||||
-2
@@ -588,8 +588,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getDocumentInfoById(String id, String cut) {
|
||||
LambdaQueryWrapper<BussDocumentLibraryEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BussDocumentLibraryEO::getId, id);
|
||||
//字段属性
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList("1");
|
||||
List<OnlCgformField> treeOnlCgformFieldList = fieldList.stream().filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public class DummyInventoryBaseEOController extends JeroController<DummyInventor
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<DummyInventoryBaseEO> page = new Page<DummyInventoryBaseEO>(pageNo, pageSize);
|
||||
IPage<DummyInventoryBaseEO> pageList = dummyInventoryBaseEOService.getPageInfo(page,queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
return Result.OK(dummyInventoryBaseEO.getCut(),pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
@@ -8,6 +8,7 @@ import com.jero.modules.searchcenter.vo.SearchVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -43,6 +44,7 @@ public class DocumentSearchController {
|
||||
@AutoLog(value = "文档库信息表-查询条件")
|
||||
@ApiOperation(value="文档库信息表-查询条件", notes="文档库信息表-查询条件")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<List<Map<String,Object>>> queryCondition(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut,
|
||||
@RequestParam(name="searchFlag",required=true) String searchFlag) {
|
||||
@@ -66,6 +68,7 @@ public class DocumentSearchController {
|
||||
|
||||
@ApiOperation(value="列表查询", notes="列表查询")
|
||||
@PostMapping(value = "/getInfoList")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> getInfoList(@RequestBody Map<String,Object> map) {
|
||||
IPage infoList = iDocumentSearchService.getInfoList(map);
|
||||
return Result.OK(infoList);
|
||||
@@ -73,6 +76,7 @@ public class DocumentSearchController {
|
||||
|
||||
@ApiOperation(value="全部查询", notes="全部查询")
|
||||
@PostMapping(value = "/getFullTextInfoList")
|
||||
@RequiresPermissions("/search:search")
|
||||
public Result<?> getFullTextInfoList(@RequestBody SearchVO searchVO) {
|
||||
IPage pageInfo = iDocumentSearchService.getFullTextInfoList(searchVO);
|
||||
return Result.OK(pageInfo);
|
||||
@@ -80,6 +84,7 @@ public class DocumentSearchController {
|
||||
|
||||
@ApiOperation(value="文档库查询段落", notes="文档库查询段落")
|
||||
@PostMapping(value = "/getParagraphInfoList")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> getParagraphInfoList(@RequestBody Map<String,Object> map) {
|
||||
IPage pageInfo = iDocumentSearchService.getParagraphInfoList(map);
|
||||
return Result.OK(pageInfo);
|
||||
|
||||
+4
-4
@@ -95,7 +95,7 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
int count=onlCgformAreaService.queryExitAreaName(onlCgformArea);
|
||||
if (count > 0) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformArea.getCut())) {
|
||||
return Result.error("同一所属模块下,展示区域名称不能重复!");
|
||||
}else{
|
||||
return Result.error("Under the same module, the display area name cannot be duplicate!");
|
||||
@@ -121,7 +121,7 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
int count=onlCgformAreaService.queryExitAreaName(onlCgformArea);
|
||||
if (count > 0) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformArea.getCut())) {
|
||||
return Result.error("同一所属模块下,展示区域名称不能重复!");
|
||||
}else{
|
||||
return Result.error("Under the same module, the display area name cannot be duplicate!");
|
||||
@@ -187,7 +187,7 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
OnlCgformArea onlCgformArea = onlCgformAreaService.queryById(id);
|
||||
if(onlCgformArea==null) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformArea.getCut())) {
|
||||
return Result.error("未找到对应数据");
|
||||
}else{
|
||||
return Result.error("No corresponding data was found.");
|
||||
@@ -232,7 +232,7 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
OnlCgformArea onlCgformArea = (OnlCgformArea) onlCgformAreaService.selectShowAreaById(id);
|
||||
if(onlCgformArea==null) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformArea.getCut())) {
|
||||
return Result.error("未找到对应数据");
|
||||
}else{
|
||||
return Result.error("No corresponding data was found.");
|
||||
|
||||
+9
-9
@@ -127,7 +127,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
}
|
||||
}else{
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformTag.getCut())) {
|
||||
throw new JeroBootException("属性已存在,请检查");
|
||||
}else{
|
||||
throw new JeroBootException("Attribute already exists, please check!");
|
||||
@@ -159,7 +159,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
checkData();
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(onlCgformTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(onlCgformTag.getIsReadOnly())) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformTag.getCut())) {
|
||||
return Result.error("固定字段,不可修改");
|
||||
}else{
|
||||
return Result.error("Fixed field, which cannot be modified.");
|
||||
@@ -191,7 +191,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
}
|
||||
}else {//有未删数据,报错
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformTag.getCut())) {
|
||||
return Result.error("属性已存在,请检查");
|
||||
}else{
|
||||
return Result.error("Attribute already exists, please check!");
|
||||
@@ -252,7 +252,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
if(StringUtils.isNotBlank(String.valueOf(onlCgformTag.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(onlCgformTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(onlCgformTag.getIsReadOnly())) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(onlCgformTag.getCut())) {
|
||||
result.error500("固定字段,不可删除");
|
||||
}else{
|
||||
result.error500("Fixed field, cannot be deleted.");
|
||||
@@ -307,18 +307,18 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
for(String list:idList){
|
||||
OnlCgformTag midTag=onlCgformTagService.getById(list);
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(midTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(midTag.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(midTag.getIsReadOnly())) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(String.valueOf(midTag.getIsReadOnly()))) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(midTag.getCut())) {
|
||||
result.error500("包含固定字段,不可删除");
|
||||
}else{
|
||||
result.error500("It contains fixed fields and cannot be deleted.");
|
||||
}
|
||||
}else {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(String.valueOf(midTag.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(midTag.getIsReadOnly())) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(String.valueOf(midTag.getIsReadOnly()))) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(midTag.getCut())) {
|
||||
result.error500("包含固定字段,不可删除");
|
||||
}else{
|
||||
result.error500("It contains fixed fields and cannot be deleted.");
|
||||
@@ -327,7 +327,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
onlCgformTagService.updateDictDelFlag(CommonConstant.DEL_FLAG_1, midTag.getId());
|
||||
//onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");//逻辑删除-->改变状态,数据库不删
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
if(CutEnum.CN.getValue().equals(midTag.getCut())) {
|
||||
result.success("批量删除成功!");
|
||||
}else{
|
||||
result.success("Batch deletion succeeded!");
|
||||
|
||||
@@ -390,7 +390,7 @@ module.exports = {
|
||||
check: 'check',
|
||||
enName: 'English name',
|
||||
selectLeastOne: 'Please select at least one piece of data',
|
||||
selectFileType:'Please select a file type',
|
||||
selectFileType: 'Please select a file type',
|
||||
sureVerified: 'Are you sure this file is not verified?',
|
||||
sureSynchronize: 'The file has not been verified. Are you sure you want to synchronize to the document library?',
|
||||
UploadFile: 'Upload file',
|
||||
@@ -591,69 +591,75 @@ module.exports = {
|
||||
confirmationOfDesignConformity: 'Confirmation of design conformity',
|
||||
Deliverables: 'Deliverables',
|
||||
personLiable: 'person liable',
|
||||
PrehomoConfirmation:'Prehomo confirmation',
|
||||
verificationAndConformityconfirmation:'Verification and conformity confirmation',
|
||||
StandardImplementationDate:'Standard implementation date',
|
||||
regulatoryEngineer:'Regulatory Engineer',
|
||||
certifiedEngineer:'Certified Engineer',
|
||||
engineeringInterfacePerson:'Engineering interface person',
|
||||
typeOfDeliverables:'Type of deliverables',
|
||||
deliverableTemplate:'Deliverable template',
|
||||
entryName:'entry name',
|
||||
targetMarket:'target market',
|
||||
projectStatus:'Project status',
|
||||
StudioEngineer:'Studio engineer',
|
||||
CertificationTime:'Certification time',
|
||||
NTplatform:'NT platform',
|
||||
NPplatform:'NP platform',
|
||||
IPDInformation:'IPD information',
|
||||
certificationProgramInformation:'Certification program information',
|
||||
taskReleaseStatus:'Task release status',
|
||||
task:'task',
|
||||
TaskCutOffTime:'Task cut-off time',
|
||||
Transfer:'Transfer',
|
||||
CertificationDirectory:'Certification directory',
|
||||
TaskRequirements:'Task requirements',
|
||||
CertificationProgress:'Certification progress',
|
||||
CurrentProjectStatusEvaluation:'Current project status evaluation',
|
||||
NiONumber:'NiO number',
|
||||
ParameterName:'Parameter name',
|
||||
ParameterDescription:'Parameter description',
|
||||
Version:'Version',
|
||||
certificationProgramTime:'Certification program time',
|
||||
ArchitecturePlatform:'Architecture platform',
|
||||
ModelPlatform:'Model platform',
|
||||
ListOfRelevantPersonnel:'List of relevant personnel',
|
||||
DeliverableStatus:'Deliverable status',
|
||||
CurrentStatusOfTheProject:'Current status of the project',
|
||||
NonConformance:'Non conformance',
|
||||
listSubclauses:'list subclauses',
|
||||
fileType:'file type',
|
||||
view:'view',
|
||||
KMVSS_Table:'KMVSS Table',
|
||||
KMVSS_Article:'KMVSS Article',
|
||||
America:'America',
|
||||
Europe:'Europe',
|
||||
Japan_one:'Japan Attachment',
|
||||
Japan_two:'Japan Article',
|
||||
China:'China',
|
||||
onlyOnefileUploaded:'only one file can be uploaded',
|
||||
typeCannotUploaded:'this type of file cannot be uploaded',
|
||||
confirmWithdraw:'confirm Withdraw ?',
|
||||
OperationDetails:'Operation details',
|
||||
OperationTime:'Operation time',
|
||||
oneTableAdded:'only one table can be added',
|
||||
addATable:'please add a table',
|
||||
pleaseUploadSplitFile:'please upload split file',
|
||||
release:'release',
|
||||
confirmRelease:'confirm Release ?',
|
||||
UploadMost:'You can only upload 20 at most',
|
||||
FileUploadFailed:'File upload failed',
|
||||
FileUploadedSuccessfully:'File uploaded successfully',
|
||||
DeletedSuccessfully:'Deleted successfully',
|
||||
confirmCopy:'confirm Copy ?',
|
||||
DigitalPlatform:'Digital platform',
|
||||
dehicleDevelopmentPlan:'Vehicle development plan',
|
||||
certificationProgram:'certificationProgram',
|
||||
DocumentStandard:'Document standard',
|
||||
PrehomoConfirmation: 'Prehomo confirmation',
|
||||
verificationAndConformityconfirmation: 'Verification and conformity confirmation',
|
||||
StandardImplementationDate: 'Standard implementation date',
|
||||
regulatoryEngineer: 'Regulatory Engineer',
|
||||
certifiedEngineer: 'Certified Engineer',
|
||||
engineeringInterfacePerson: 'Engineering interface person',
|
||||
typeOfDeliverables: 'Type of deliverables',
|
||||
deliverableTemplate: 'Deliverable template',
|
||||
entryName: 'entry name',
|
||||
targetMarket: 'target market',
|
||||
projectStatus: 'Project status',
|
||||
StudioEngineer: 'Studio engineer',
|
||||
CertificationTime: 'Certification time',
|
||||
NTplatform: 'NT platform',
|
||||
NPplatform: 'NP platform',
|
||||
IPDInformation: 'IPD information',
|
||||
certificationProgramInformation: 'Certification program information',
|
||||
taskReleaseStatus: 'Task release status',
|
||||
task: 'task',
|
||||
TaskCutOffTime: 'Task cut-off time',
|
||||
Transfer: 'Transfer',
|
||||
CertificationDirectory: 'Certification directory',
|
||||
TaskRequirements: 'Task requirements',
|
||||
CertificationProgress: 'Certification progress',
|
||||
CurrentProjectStatusEvaluation: 'Current project status evaluation',
|
||||
NiONumber: 'NiO number',
|
||||
ParameterName: 'Parameter name',
|
||||
ParameterDescription: 'Parameter description',
|
||||
Version: 'Version',
|
||||
certificationProgramTime: 'Certification program time',
|
||||
ArchitecturePlatform: 'Architecture platform',
|
||||
ModelPlatform: 'Model platform',
|
||||
ListOfRelevantPersonnel: 'List of relevant personnel',
|
||||
DeliverableStatus: 'Deliverable status',
|
||||
CurrentStatusOfTheProject: 'Current status of the project',
|
||||
NonConformance: 'Non conformance',
|
||||
listSubclauses: 'list subclauses',
|
||||
fileType: 'file type',
|
||||
view: 'view',
|
||||
KMVSS_Table: 'KMVSS Table',
|
||||
KMVSS_Article: 'KMVSS Article',
|
||||
America: 'America',
|
||||
Europe: 'Europe',
|
||||
Japan_one: 'Japan Attachment',
|
||||
Japan_two: 'Japan Article',
|
||||
China: 'China',
|
||||
onlyOnefileUploaded: 'only one file can be uploaded',
|
||||
typeCannotUploaded: 'this type of file cannot be uploaded',
|
||||
confirmWithdraw: 'confirm Withdraw ?',
|
||||
OperationDetails: 'Operation details',
|
||||
OperationTime: 'Operation time',
|
||||
oneTableAdded: 'only one table can be added',
|
||||
addATable: 'please add a table',
|
||||
pleaseUploadSplitFile: 'please upload split file',
|
||||
release: 'release',
|
||||
confirmRelease: 'confirm Release ?',
|
||||
UploadMost: 'You can only upload 20 at most',
|
||||
FileUploadFailed: 'File upload failed',
|
||||
FileUploadedSuccessfully: 'File uploaded successfully',
|
||||
DeletedSuccessfully: 'Deleted successfully',
|
||||
confirmCopy: 'confirm Copy ?',
|
||||
DigitalPlatform: 'Digital platform',
|
||||
dehicleDevelopmentPlan: 'Vehicle development plan',
|
||||
certificationProgram: 'certificationProgram',
|
||||
DocumentStandard: 'Document standard',
|
||||
standardName: 'standard Name',
|
||||
initiateListConfirmation: 'Initiate list confirmation',
|
||||
initiateTaskConfirmation: 'Initiate task confirmation',
|
||||
alteration: 'alteration',
|
||||
fixedPlate: 'Fixed plate',
|
||||
taskAffirmStatus: 'task Affirm Status'
|
||||
}
|
||||
@@ -652,12 +652,18 @@ module.exports = {
|
||||
release: '发布',
|
||||
confirmRelease: '确认发布?',
|
||||
UploadMost: '最多只能上传二十个',
|
||||
FileUploadFailed:'文件上传失败',
|
||||
FileUploadedSuccessfully:'文件上传成功',
|
||||
DeletedSuccessfully:'删除成功',
|
||||
FileUploadFailed: '文件上传失败',
|
||||
FileUploadedSuccessfully: '文件上传成功',
|
||||
DeletedSuccessfully: '删除成功',
|
||||
confirmCopy: '确定复制?',
|
||||
DigitalPlatform:'数字平台',
|
||||
dehicleDevelopmentPlan:'整车开发计划',
|
||||
certificationProgram:'认证计划',
|
||||
DocumentStandard:'文档标准',
|
||||
DigitalPlatform: '数字平台',
|
||||
dehicleDevelopmentPlan: '整车开发计划',
|
||||
certificationProgram: '认证计划',
|
||||
DocumentStandard: '文档标准',
|
||||
standardName: '标准名称',
|
||||
initiateListConfirmation: '发起清单确认',
|
||||
initiateTaskConfirmation:'发起任务确认',
|
||||
alteration:'变更',
|
||||
fixedPlate:'定版',
|
||||
taskAffirmStatus:'任务发布状态',
|
||||
}
|
||||
@@ -222,6 +222,35 @@
|
||||
</span>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
<a-modal
|
||||
:title="'查看文件'"
|
||||
:width="600"
|
||||
:visible="visibleFile"
|
||||
:maskClosable="false"
|
||||
@ok="visibleFile = false"
|
||||
@cancel="visibleFile = false"
|
||||
>
|
||||
<a-table
|
||||
class="table"
|
||||
:columns="columnsFile"
|
||||
:pagination="false"
|
||||
:scroll="{x:500,y: 400}"
|
||||
:data-source="dataSourceFile"
|
||||
:loading="loading"
|
||||
>
|
||||
<span slot="fileOperation" slot-scope="record">
|
||||
<a class="text" @click="pdfPreview(record)">
|
||||
{{$t('See')}}
|
||||
</a>
|
||||
<a class="text" @click="download(record)">
|
||||
{{$t('download')}}
|
||||
</a>
|
||||
<a class="text" @click="breakdown(record)">
|
||||
{{$t('StandardBreakdown')}}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
<uploadFile ref="uploadFile" :isUploadFile="true" :disabled="true"></uploadFile>
|
||||
</div>
|
||||
</template>
|
||||
@@ -241,15 +270,31 @@
|
||||
getInfo: 'document/bussDocumentLibraryEO/getInfoById',
|
||||
list: 'log/bussLogEO/page'
|
||||
},
|
||||
visibleFile: false,
|
||||
columnsRelated: [
|
||||
{
|
||||
title: '标准名称',
|
||||
title: this.$t('standardName'),
|
||||
dataIndex: 'title',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
columnsFile: [
|
||||
{
|
||||
title: this.$t('fileName'),
|
||||
dataIndex: 'fileName',
|
||||
align: 'center',
|
||||
width: 260,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
width: 130,
|
||||
scopedSlots: { customRender: 'fileOperation' }
|
||||
}
|
||||
],
|
||||
dataSourceRelated: [],
|
||||
detailList: [],
|
||||
visible: false,
|
||||
@@ -261,6 +306,7 @@
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
visibleRelated: false,
|
||||
dataSourceFile: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('ModificationContent'),
|
||||
@@ -300,13 +346,15 @@
|
||||
})
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.loading = true
|
||||
this.visibleFile = true
|
||||
getAction('sys/common/getFileInfos', { id: item.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||
this.dataSourceFile = res.result
|
||||
this.loading = false
|
||||
} else {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.dataSourceFile = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -272,11 +272,11 @@
|
||||
align: 'center',
|
||||
dataIndex: 'region'
|
||||
},
|
||||
{
|
||||
title: this.$t('functionalAreas'),
|
||||
align: 'center',
|
||||
dataIndex: 'function_territory'
|
||||
},
|
||||
// {
|
||||
// title: this.$t('functionalAreas'),
|
||||
// align: 'center',
|
||||
// dataIndex: 'function_territory'
|
||||
// },
|
||||
{
|
||||
title: this.$t('technicalField'),
|
||||
align: 'center',
|
||||
|
||||
@@ -29,10 +29,20 @@
|
||||
:placeholder="$t('pleaseEnter')+$t('searchContent')"
|
||||
@search="wholeOnSearch"
|
||||
></a-input-search>
|
||||
<span v-if="active === $t('whole') || active === $t('DocumentLibrary')" class="textSearch"
|
||||
@click="wholeTextSearch(selectValueTwo)">{{$t('searchInResults')}}</span>
|
||||
<span v-if="active === $t('whole') || active === $t('DocumentLibrary')" class="textSearch"
|
||||
@click="ResetSearch()">{{$t('reset')}}</span>
|
||||
<a-button class="textSearch"
|
||||
v-if="active === $t('whole') || active === $t('DocumentLibrary')"
|
||||
@click="wholeTextSearch(selectValueTwo)"
|
||||
>{{$t('searchInResults')}}
|
||||
</a-button>
|
||||
<a-button class="textSearch"
|
||||
v-if="active === $t('whole') || active === $t('DocumentLibrary')"
|
||||
@click="ResetSearch()"
|
||||
>{{$t('reset')}}
|
||||
</a-button>
|
||||
<!-- <span v-if="active === $t('whole') || active === $t('DocumentLibrary')" class="textSearch"-->
|
||||
<!-- @click="wholeTextSearch(selectValueTwo)">{{$t('searchInResults')}}</span>-->
|
||||
<!-- <span v-if="active === $t('whole') || active === $t('DocumentLibrary')" class="textSearch"-->
|
||||
<!-- @click="ResetSearch()">{{$t('reset')}}</span>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-center-content">
|
||||
@@ -174,10 +184,12 @@
|
||||
|
||||
.search-detail {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
//justify-content: center;
|
||||
.search-detail-wrap {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.search-detail-title {
|
||||
width: 120px;
|
||||
@@ -208,11 +220,12 @@
|
||||
}
|
||||
|
||||
.inputSearch {
|
||||
width: 400px;
|
||||
width: 608px;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
width: 488px;
|
||||
width: 608px;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
@@ -250,7 +263,20 @@
|
||||
line-height: 40px;
|
||||
display: inline-block;
|
||||
margin-left: 8px;
|
||||
color: #21c9cc;
|
||||
/*color: #21c9cc;*/
|
||||
cursor: pointer;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.textSearch .ant-btn {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.search-header-left .ant-tabs-nav-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -29,6 +29,10 @@
|
||||
<a-icon type="container"/>
|
||||
任务参数收集
|
||||
</div>
|
||||
<div class="Virtual-detail-left-text" @click="textClick(4,'未符合项')">
|
||||
<a-icon type="container"/>
|
||||
未符合项
|
||||
</div>
|
||||
</div>
|
||||
<div class="Virtual-detail-right">
|
||||
<ProjectDetailsName v-if="textTitle === '项目详情'"/>
|
||||
|
||||
@@ -63,12 +63,12 @@
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('StudioEngineer')">{{$t('StudioEngineer')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'StudioEngineer'">
|
||||
<a-form-model-item class="itemModel" :prop="'studioEngineerName'">
|
||||
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('StudioEngineer')}"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.studioEngineer"/>
|
||||
v-model="formInline.studioEngineerName"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -79,13 +79,13 @@
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'certificationEngineer'">
|
||||
<a-form-model-item class="itemModel" :prop="'certificationEngineerName'">
|
||||
<PersonnelSelection
|
||||
:query="{db_field_name:'certificationEngineer',db_field_txt:$t('certifiedEngineer')}"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.certificationEngineer"/>
|
||||
v-model="formInline.certificationEngineerName"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -245,7 +245,7 @@
|
||||
})
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.formInline[value + '_id'] = id
|
||||
this.formInline[value] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('subtitle')">
|
||||
<div class="title-text" style="width: 44px" :title="$t('subtitle')">
|
||||
<span>{{$t('subtitle')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('subtitle')"
|
||||
@@ -41,13 +41,25 @@
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div style="float: left;margin-bottom: 19px">
|
||||
<a-icon type="solution" title="发起清单确认" class="operator-text-left"/>
|
||||
<a-icon type="file-protect" title="发起任务确认" class="operator-text-left"/>
|
||||
<a-icon type="file-search" title="变更" class="operator-text-left"/>
|
||||
<a-icon type="bulb" title="定板" class="operator-text-left"/>
|
||||
<div style="float: left;margin-bottom: 19px;margin-left: 20px">
|
||||
<div class="operator-text">
|
||||
<a-icon type="solution"/>
|
||||
{{$t('initiateListConfirmation')}}
|
||||
</div>
|
||||
<div class="operator-text">
|
||||
<a-icon type="file-protect"/>
|
||||
{{$t('initiateTaskConfirmation')}}
|
||||
</div>
|
||||
<div class="operator-text">
|
||||
<a-icon type="file-search"/>
|
||||
{{$t('alteration')}}
|
||||
</div>
|
||||
<div class="operator-text">
|
||||
<a-icon type="bulb"/>
|
||||
{{$t('fixedPlate')}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: right;margin-top: 4px">
|
||||
<div style="float: right;margin-top: 1px">
|
||||
<div class="operator-text" v-has="'document:importZip'">
|
||||
<ImportFile :url="url"/>
|
||||
</div>
|
||||
@@ -95,8 +107,8 @@
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<listAddModel ref="addModelRef"/>
|
||||
<listEditModel ref="editModelRef"/>
|
||||
<listAddModel :url="url" ref="addModelRef"/>
|
||||
<listEditModel :url="url" ref="editModelRef"/>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@@ -104,6 +116,7 @@
|
||||
import ImportFile from '@/components/ImportFile/index'
|
||||
import listAddModel from './listAddModel'
|
||||
import listEditModel from './listEditModel'
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'listOfRegulations',
|
||||
@@ -118,14 +131,17 @@
|
||||
{
|
||||
title: 'WVTA ID',
|
||||
align: 'center',
|
||||
dataIndex: 'WVTAID',
|
||||
dataIndex: 'wvtaId',
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
fixed: 'left'
|
||||
},
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
align: 'center',
|
||||
dataIndex: 'standard',
|
||||
dataIndex: 'serialNumber',
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
fixed: 'left'
|
||||
},
|
||||
{
|
||||
@@ -133,6 +149,7 @@
|
||||
align: 'center',
|
||||
dataIndex: 'title',
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
fixed: 'left'
|
||||
},
|
||||
{
|
||||
@@ -140,84 +157,102 @@
|
||||
align: 'center',
|
||||
dataIndex: 'subtitle',
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
fixed: 'left'
|
||||
},
|
||||
{
|
||||
title: this.$t('taskReleaseStatus'),
|
||||
align: 'center',
|
||||
dataIndex: 'taskReleaseStatus'
|
||||
},
|
||||
// {
|
||||
// title: this.$t('taskReleaseStatus'),
|
||||
// align: 'center',
|
||||
// dataIndex: 'taskReleaseStatus'
|
||||
// },
|
||||
{
|
||||
title: this.$t('correspondingStandard'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'correspondingStandard'
|
||||
},
|
||||
{
|
||||
title: this.$t('implementationCategory'),
|
||||
align: 'center',
|
||||
dataIndex: 'implementationCategory'
|
||||
ellipsis: true,
|
||||
dataIndex: 'implementType'
|
||||
},
|
||||
{
|
||||
title: this.$t('ImplementationDate'),
|
||||
align: 'center',
|
||||
dataIndex: 'ImplementationDate'
|
||||
ellipsis: true,
|
||||
dataIndex: 'xin1Che1Xing2Shi2Shi1Ri4Qi1'
|
||||
},
|
||||
{
|
||||
title: this.$t('vehicleInProductionDate'),
|
||||
align: 'center',
|
||||
dataIndex: 'vehicleInProductionDate'
|
||||
ellipsis: true,
|
||||
dataIndex: 'implementTime'
|
||||
},
|
||||
{
|
||||
title: this.$t('certificationType'),
|
||||
align: 'center',
|
||||
dataIndex: 'certificationType'
|
||||
ellipsis: true,
|
||||
dataIndex: 'attestationType_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('certificationLevel'),
|
||||
align: 'center',
|
||||
dataIndex: 'certificationLevel'
|
||||
ellipsis: true,
|
||||
dataIndex: 'attestationRank_dictText'
|
||||
},
|
||||
//
|
||||
{
|
||||
title: this.$t('areaOfResponsibility'),
|
||||
align: 'center',
|
||||
dataIndex: 'areaOfResponsibility'
|
||||
ellipsis: true,
|
||||
dataIndex: 'dutyTerritory_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('regulatoryEngineer'),
|
||||
align: 'center',
|
||||
dataIndex: 'regulatoryEngineer'
|
||||
ellipsis: true,
|
||||
dataIndex: 'regulationOwnerName'
|
||||
},
|
||||
{
|
||||
title: this.$t('certifiedEngineer'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'homologationEngineerName'
|
||||
},
|
||||
{
|
||||
title: this.$t('engineeringInterfacePerson'),
|
||||
align: 'center',
|
||||
dataIndex: 'engineeringInterfacePerson'
|
||||
ellipsis: true,
|
||||
dataIndex: 'engineeringInterfacePersonName'
|
||||
},
|
||||
{
|
||||
title: this.$t('remarks'),
|
||||
align: 'center',
|
||||
dataIndex: 'remarks'
|
||||
ellipsis: true,
|
||||
dataIndex: 'remark'
|
||||
},
|
||||
{
|
||||
title: this.$t('confirmationOfDesignConformity'),
|
||||
children: [
|
||||
{
|
||||
title: this.$t('task'),
|
||||
dataIndex: 'task',
|
||||
title: this.$t('Deliverables'),
|
||||
dataIndex: 'designDeliverableTemplate',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
dataIndex: 'Sponsor',
|
||||
dataIndex: 'designInitiator',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('personLiable'),
|
||||
dataIndex: 'personLiable',
|
||||
dataIndex: 'designDuty',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('TaskCutOffTime'),
|
||||
dataIndex: 'TaskCutOffTime',
|
||||
dataIndex: 'designDueDate',
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
@@ -226,23 +261,23 @@
|
||||
title: this.$t('PrehomoConfirmation'),
|
||||
children: [
|
||||
{
|
||||
title: this.$t('task'),
|
||||
dataIndex: 'task',
|
||||
title: this.$t('Deliverables'),
|
||||
dataIndex: 'prehomoDeliverableTemplate',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
dataIndex: 'Sponsor',
|
||||
dataIndex: 'prehomoInitiator',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('personLiable'),
|
||||
dataIndex: 'personLiable',
|
||||
dataIndex: 'prehomoDuty',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('TaskCutOffTime'),
|
||||
dataIndex: 'TaskCutOffTime',
|
||||
dataIndex: 'prehomoDueDate',
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
@@ -251,27 +286,33 @@
|
||||
title: this.$t('verificationAndConformityconfirmation'),
|
||||
children: [
|
||||
{
|
||||
title: this.$t('task'),
|
||||
dataIndex: 'task',
|
||||
title: this.$t('Deliverables'),
|
||||
dataIndex: 'verifyDeliverableTemplate',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
dataIndex: 'Sponsor',
|
||||
dataIndex: 'verifyInitiator',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('personLiable'),
|
||||
dataIndex: 'personLiable',
|
||||
dataIndex: 'verifyDuty',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: this.$t('TaskCutOffTime'),
|
||||
dataIndex: 'TaskCutOffTime',
|
||||
dataIndex: 'verifyDueDate',
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('taskAffirmStatus'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'taskAffirmStatusName'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
@@ -282,12 +323,19 @@
|
||||
],
|
||||
selectedRowKeys: [],
|
||||
queryParam: {},
|
||||
url: {},
|
||||
url: {
|
||||
list: '/project/projectLawsInventoryEO/list',
|
||||
add: 'project/projectLawsInventoryEO/add',
|
||||
edit: '/project/projectLawsInventoryEO/edit',
|
||||
deleteBatch: '/project/projectLawsInventoryEO/deleteBatch',
|
||||
deleteOne: '/project/projectLawsInventoryEO/delete'
|
||||
},
|
||||
loading: false,
|
||||
dataSource: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
handleModule() {
|
||||
@@ -306,22 +354,70 @@
|
||||
this.$refs.addModelRef.addModel()
|
||||
},
|
||||
handleDel() {
|
||||
this.$refs.editModelRef.editModel()
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||||
deleteAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
edit() {
|
||||
|
||||
edit(item) {
|
||||
this.$refs.editModelRef.editModel(JSON.parse(JSON.stringify(item)))
|
||||
},
|
||||
deleteLib() {
|
||||
|
||||
deleteLib(val) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
deleteAction(_this.url.deleteOne, { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange() {
|
||||
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
},
|
||||
searchQuery() {
|
||||
|
||||
this.getList()
|
||||
},
|
||||
searchReset() {
|
||||
|
||||
this.queryParam = {}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
let query = {
|
||||
...this.queryParam,
|
||||
projectLibraryId: this.$route.query.id
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -398,15 +494,14 @@
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 20%;
|
||||
min-width: 110px;
|
||||
width: 32px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
|
||||
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||
<a class="text-operation" @click="entryNameClick(record)">{{$t('see')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
@@ -7,170 +7,179 @@
|
||||
:confirmLoading="confirmLoading">
|
||||
|
||||
<div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
|
||||
<a-form-item :label="$t('MenuType')" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
||||
<a-radio-group @change="onChangeMenuType" v-decorator="['menuType',{'initialValue':localMenuType}]">
|
||||
<a-radio :value="0">{{$t('FirstLevelMenu')}}</a-radio>
|
||||
<a-radio :value="1">{{$t('Submenu')}}</a-radio>
|
||||
<a-radio :value="2">{{$t('ButtonsPermissions')}}</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('MenuType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-radio-group @change="onChangeMenuType" v-decorator="['menuType',{'initialValue':localMenuType}]">
|
||||
<a-radio :value="0">{{$t('FirstLevelMenu')}}</a-radio>
|
||||
<a-radio :value="1">{{$t('Submenu')}}</a-radio>
|
||||
<a-radio :value="2">{{$t('ButtonsPermissions')}}</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="menuLabel"
|
||||
hasFeedback >
|
||||
<a-input :placeholder="$t('enterMenuName')" v-decorator="[ 'name', validatorRules.name]" :readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="menuLabel"
|
||||
hasFeedback>
|
||||
<a-input :placeholder="$t('enterMenuName')" v-decorator="[ 'name', validatorRules.name]"
|
||||
:readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('MenuEnName')"
|
||||
hasFeedback >
|
||||
<a-input :placeholder="$t('enterMenuEnName')" v-decorator="[ 'menuEn', validatorRules.menuEn]" :readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('MenuEnName')"
|
||||
hasFeedback>
|
||||
<a-input :placeholder="$t('enterMenuEnName')" v-decorator="[ 'menuEn', validatorRules.menuEn]"
|
||||
:readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
|
||||
|
||||
<a-form-item
|
||||
v-show="localMenuType!=0"
|
||||
:label="$t('SuperiorMenu')"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:validate-status="validateStatus"
|
||||
:hasFeedback="true"
|
||||
:required="true">
|
||||
<span slot="help">{{ validateStatus=='error'? $t('selectSuperiorMenu'):' ' }}</span>
|
||||
<a-tree-select
|
||||
style="width:100%"
|
||||
:dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
|
||||
:treeData="treeData"
|
||||
v-model="model.parentId"
|
||||
:placeholder="$t('selectParentMenu')"
|
||||
:disabled="disableSubmit"
|
||||
@change="handleParentIdChange">
|
||||
</a-tree-select>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-show="localMenuType!=0"
|
||||
:label="$t('SuperiorMenu')"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:validate-status="validateStatus"
|
||||
:hasFeedback="true"
|
||||
:required="true">
|
||||
<span slot="help">{{ validateStatus=='error'? $t('selectSuperiorMenu'):' ' }}</span>
|
||||
<a-tree-select
|
||||
style="width:100%"
|
||||
:dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
|
||||
:treeData="treeData"
|
||||
v-model="model.parentId"
|
||||
:placeholder="$t('selectParentMenu')"
|
||||
:disabled="disableSubmit"
|
||||
@change="handleParentIdChange">
|
||||
</a-tree-select>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('MenuPath')">
|
||||
<a-input :placeholder="$t('enterMenuPath')" v-decorator="[ 'url',validatorRules.url]" :readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('MenuPath')">
|
||||
<a-input :placeholder="$t('enterMenuPath')" v-decorator="[ 'url',validatorRules.url]"
|
||||
:readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('FrontAssembly')">
|
||||
<a-input :placeholder="$t('enterFrontComponents')" v-decorator="[ 'component',validatorRules.component]" :readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('FrontAssembly')">
|
||||
<a-input :placeholder="$t('enterFrontComponents')" v-decorator="[ 'component',validatorRules.component]"
|
||||
:readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
v-show="localMenuType==0"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('DefaultJumpAddress')">
|
||||
<a-input :placeholder="$t('enterRoutingParameters')+' redirect'" v-decorator="[ 'redirect',{}]" :readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-show="localMenuType==0"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('DefaultJumpAddress')">
|
||||
<a-input :placeholder="$t('enterRoutingParameters')+' redirect'" v-decorator="[ 'redirect',{}]"
|
||||
:readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
<!-- v-show="!show"-->
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('AuthorizationID')">
|
||||
<a-input :placeholder="$t('enterAuthorizationID')+' user:list'"
|
||||
v-decorator="[ 'perms', {rules:[{ required: false, message: $t('PleaseEnterAuthorizationID') },{validator: this.validatePerms }]}]"
|
||||
:readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
v-show="!show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('AuthorizationID')">
|
||||
<a-input :placeholder="$t('enterAuthorizationID')+' user:list'" v-decorator="[ 'perms', {rules:[{ required: false, message: $t('PleaseEnterAuthorizationID') },{validator: this.validatePerms }]}]" :readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
v-show="!show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('AuthorizationPolicy')">
|
||||
<j-dict-select-tag v-decorator="['permsType', {}]" :placeholder="$t('selectAuthorizationPolicy')" :type="'radio'" :triggerChange="true" dictCode="global_perms_type"/>
|
||||
<a-form-item
|
||||
v-show="!show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('AuthorizationPolicy')">
|
||||
<j-dict-select-tag v-decorator="['permsType', {}]" :placeholder="$t('selectAuthorizationPolicy')"
|
||||
:type="'radio'" :triggerChange="true" dictCode="global_perms_type"/>
|
||||
|
||||
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-show="!show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('status')">
|
||||
<j-dict-select-tag v-decorator="['status', {}]" :placeholder="$t('selectStatus')" :type="'radio'" :triggerChange="true" dictCode="valid_status"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-show="!show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('status')">
|
||||
<j-dict-select-tag v-decorator="['status', {}]" :placeholder="$t('selectStatus')" :type="'radio'"
|
||||
:triggerChange="true" dictCode="valid_status"/>
|
||||
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('MenuIcon')">
|
||||
<a-input :placeholder="$t('ClickSelectIcon')" v-model="model.icon" :readOnly="disableSubmit">
|
||||
<a-icon slot="addonAfter" type="setting" @click="selectIcons" />
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('MenuIcon')">
|
||||
<a-input :placeholder="$t('ClickSelectIcon')" v-model="model.icon" :readOnly="disableSubmit">
|
||||
<a-icon slot="addonAfter" type="setting" @click="selectIcons"/>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('sort')">
|
||||
<a-input-number :placeholder="$t('enterMenuSort')" style="width: 200px" v-decorator="[ 'sortNo',validatorRules.sortNo]" :readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('sort')">
|
||||
<a-input-number :placeholder="$t('enterMenuSort')" style="width: 200px"
|
||||
v-decorator="[ 'sortNo',validatorRules.sortNo]" :readOnly="disableSubmit"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('RouteMenu')">
|
||||
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="routeSwitch"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('RouteMenu')">
|
||||
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="routeSwitch"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('HideRoute')">
|
||||
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="menuHidden"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('HideRoute')">
|
||||
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="menuHidden"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('CacheRoute')">
|
||||
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="isKeepalive"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('CacheRoute')">
|
||||
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="isKeepalive"/>
|
||||
</a-form-item>
|
||||
|
||||
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('AggregateRouting')">
|
||||
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="alwaysShow"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('AggregateRouting')">
|
||||
<a-switch :checkedChildren="$t('yes')" :unCheckedChildren="$t('not')" v-model="alwaysShow"/>
|
||||
</a-form-item>
|
||||
|
||||
<!--update_begin author:wuxianquan date:20190908 for:增加组件,外链打开方式可选 -->
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('OpenMode')">
|
||||
<a-switch :checkedChildren="$t('external')" :unCheckedChildren="$t('inside')" v-model="internalOrExternal"/>
|
||||
</a-form-item>
|
||||
<!--update_end author:wuxianquan date:20190908 for:增加组件,外链打开方式可选 -->
|
||||
<!--update_begin author:wuxianquan date:20190908 for:增加组件,外链打开方式可选 -->
|
||||
<a-form-item
|
||||
v-show="show"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('OpenMode')">
|
||||
<a-switch :checkedChildren="$t('external')" :unCheckedChildren="$t('inside')" v-model="internalOrExternal"/>
|
||||
</a-form-item>
|
||||
<!--update_end author:wuxianquan date:20190908 for:增加组件,外链打开方式可选 -->
|
||||
|
||||
|
||||
</a-form>
|
||||
</a-form>
|
||||
|
||||
<!-- 选择图标 -->
|
||||
<icons @choose="handleIconChoose" @close="handleIconCancel" :iconChooseVisible="iconChooseVisible"></icons>
|
||||
</a-spin>
|
||||
<!-- 选择图标 -->
|
||||
<icons @choose="handleIconChoose" @close="handleIconCancel" :iconChooseVisible="iconChooseVisible"></icons>
|
||||
</a-spin>
|
||||
<a-row :style="{textAlign:'right'}">
|
||||
<a-button :style="{marginRight: '8px'}" @click="handleCancel">
|
||||
{{$t('close')}}
|
||||
@@ -182,194 +191,194 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addPermission,editPermission,queryTreeList, duplicateCheck} from '@/api/api'
|
||||
import { addPermission, editPermission, queryTreeList, duplicateCheck } from '@/api/api'
|
||||
import Icons from './icon/Icons'
|
||||
import pick from 'lodash.pick'
|
||||
|
||||
export default {
|
||||
name: "PermissionModal",
|
||||
components: {Icons},
|
||||
data () {
|
||||
name: 'PermissionModal',
|
||||
components: { Icons },
|
||||
data() {
|
||||
return {
|
||||
drawerWidth:700,
|
||||
treeData:[],
|
||||
drawerWidth: 700,
|
||||
treeData: [],
|
||||
treeValue: '0-0-4',
|
||||
title:this.$t('operation'),
|
||||
title: this.$t('operation'),
|
||||
visible: false,
|
||||
disableSubmit:false,
|
||||
disableSubmit: false,
|
||||
model: {},
|
||||
localMenuType:0,
|
||||
alwaysShow:false,//表单元素-聚合路由
|
||||
menuHidden:false,//表单元素-隐藏路由
|
||||
routeSwitch:true, //是否路由菜单
|
||||
localMenuType: 0,
|
||||
alwaysShow: false,//表单元素-聚合路由
|
||||
menuHidden: false,//表单元素-隐藏路由
|
||||
routeSwitch: true, //是否路由菜单
|
||||
/*update_begin author:wuxianquan date:20190908 for:定义变量,初始值代表内部打开*/
|
||||
internalOrExternal:false,//菜单打开方式
|
||||
internalOrExternal: false,//菜单打开方式
|
||||
/*update_end author:wuxianquan date:20190908 for:定义变量,初始值代表内部打开*/
|
||||
isKeepalive:true, //是否缓存路由
|
||||
show:true,//根据菜单类型,动态显示隐藏表单元素
|
||||
menuLabel:this.$t('MenuName'),
|
||||
isRequrie:true, // 是否需要验证
|
||||
isKeepalive: true, //是否缓存路由
|
||||
show: true,//根据菜单类型,动态显示隐藏表单元素
|
||||
menuLabel: this.$t('MenuName'),
|
||||
isRequrie: true, // 是否需要验证
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
sm: { span: 5 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
|
||||
iconChooseVisible: false,
|
||||
validateStatus:""
|
||||
validateStatus: ''
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
validatorRules:function() {
|
||||
computed: {
|
||||
validatorRules: function() {
|
||||
return {
|
||||
name:{rules: [{ required: true, message: this.$t('enterMenuTitle') }]},
|
||||
menuEn:{rules: [{ required: true, message: this.$t('enterMenuEnName') }]},
|
||||
component:{rules: [{ required: this.show, message: this.$t('enterFrontComponents') }]},
|
||||
url:{rules: [{ required: this.show, message: this.$t('enterMenuPath') }]},
|
||||
permsType:{rules: [{ required: true, message: this.$t('enterAuthorizationPolicy') }]},
|
||||
sortNo:{initialValue:1.0},
|
||||
name: { rules: [{ required: true, message: this.$t('enterMenuTitle') }] },
|
||||
menuEn: { rules: [{ required: true, message: this.$t('enterMenuEnName') }] },
|
||||
component: { rules: [{ required: this.show, message: this.$t('enterFrontComponents') }] },
|
||||
url: { rules: [{ required: this.show, message: this.$t('enterMenuPath') }] },
|
||||
permsType: { rules: [{ required: true, message: this.$t('enterAuthorizationPolicy') }] },
|
||||
sortNo: { initialValue: 1.0 }
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.initDictConfig();
|
||||
created() {
|
||||
this.initDictConfig()
|
||||
},
|
||||
methods: {
|
||||
loadTree(){
|
||||
var that = this;
|
||||
queryTreeList().then((res)=>{
|
||||
if(res.success){
|
||||
that.treeData = [];
|
||||
loadTree() {
|
||||
var that = this
|
||||
queryTreeList().then((res) => {
|
||||
if (res.success) {
|
||||
that.treeData = []
|
||||
let treeList = res.result.treeList
|
||||
for(let a=0;a<treeList.length;a++){
|
||||
let temp = treeList[a];
|
||||
temp.isLeaf = temp.leaf;
|
||||
that.treeData.push(temp);
|
||||
for (let a = 0; a < treeList.length; a++) {
|
||||
let temp = treeList[a]
|
||||
temp.isLeaf = temp.leaf
|
||||
that.treeData.push(temp)
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
add () {
|
||||
add() {
|
||||
// 默认值
|
||||
this.edit({status:'1',permsType:'1',route:true});
|
||||
this.edit({ status: '1', permsType: '1', route: true })
|
||||
},
|
||||
edit (record) {
|
||||
this.resetScreenSize(); // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
|
||||
this.form.resetFields();
|
||||
this.model = Object.assign({}, record);
|
||||
edit(record) {
|
||||
this.resetScreenSize() // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
|
||||
this.form.resetFields()
|
||||
this.model = Object.assign({}, record)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
//根据菜单类型,动态展示页面字段
|
||||
this.alwaysShow = !record.alwaysShow?false:true;
|
||||
this.menuHidden = !record.hidden?false:true;
|
||||
this.alwaysShow = !record.alwaysShow ? false : true
|
||||
this.menuHidden = !record.hidden ? false : true
|
||||
|
||||
if(record.route!=null){
|
||||
this.routeSwitch = record.route?true:false;
|
||||
if (record.route != null) {
|
||||
this.routeSwitch = record.route ? true : false
|
||||
}
|
||||
|
||||
if(record.keepAlive!=null){
|
||||
this.isKeepalive = record.keepAlive?true:false;
|
||||
}else{
|
||||
this.isKeepalive = false; // 升级兼容 如果没有(后台没有传过来、或者是新建)默认为false
|
||||
if (record.keepAlive != null) {
|
||||
this.isKeepalive = record.keepAlive ? true : false
|
||||
} else {
|
||||
this.isKeepalive = false // 升级兼容 如果没有(后台没有传过来、或者是新建)默认为false
|
||||
}
|
||||
|
||||
/*update_begin author:wuxianquan date:20190908 for:编辑初始化数据*/
|
||||
if(record.internalOrExternal!=null){
|
||||
this.internalOrExternal = record.internalOrExternal?true:false;
|
||||
}else{
|
||||
this.internalOrExternal = false;
|
||||
if (record.internalOrExternal != null) {
|
||||
this.internalOrExternal = record.internalOrExternal ? true : false
|
||||
} else {
|
||||
this.internalOrExternal = false
|
||||
}
|
||||
/*update_end author:wuxianquan date:20190908 for:编辑初始化数据*/
|
||||
|
||||
|
||||
this.show = record.menuType==2?false:true;
|
||||
this.menuLabel = record.menuType==2?this.$t('ButtonsPermissions'):this.$t('MenuName');
|
||||
this.show = record.menuType == 2 ? false : true
|
||||
this.menuLabel = record.menuType == 2 ? this.$t('ButtonsPermissions') : this.$t('MenuName')
|
||||
|
||||
if(this.model.parentId){
|
||||
this.localMenuType = 1;
|
||||
}else{
|
||||
this.localMenuType = 0;
|
||||
if (this.model.parentId) {
|
||||
this.localMenuType = 1
|
||||
} else {
|
||||
this.localMenuType = 0
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------
|
||||
|
||||
this.visible = true;
|
||||
this.loadTree();
|
||||
let fieldsVal = pick(this.model,'name','menuEn','perms','permsType','component','redirect','url','sortNo','menuType','status');
|
||||
this.visible = true
|
||||
this.loadTree()
|
||||
let fieldsVal = pick(this.model, 'name', 'menuEn', 'perms', 'permsType', 'component', 'redirect', 'url', 'sortNo', 'menuType', 'status')
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(fieldsVal)
|
||||
});
|
||||
})
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.disableSubmit = false;
|
||||
this.visible = false;
|
||||
close() {
|
||||
this.$emit('close')
|
||||
this.disableSubmit = false
|
||||
this.visible = false
|
||||
},
|
||||
handleOk () {
|
||||
const that = this;
|
||||
handleOk() {
|
||||
const that = this
|
||||
// 触发表单验证
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.model.alwaysShow = this.alwaysShow;
|
||||
this.model.hidden = this.menuHidden;
|
||||
this.model.route = this.routeSwitch;
|
||||
this.model.keepAlive = this.isKeepalive;
|
||||
this.model.alwaysShow = this.alwaysShow
|
||||
this.model.hidden = this.menuHidden
|
||||
this.model.route = this.routeSwitch
|
||||
this.model.keepAlive = this.isKeepalive
|
||||
/*update_begin author:wuxianquan date:20190908 for:获取值*/
|
||||
this.model.internalOrExternal = this.internalOrExternal;
|
||||
this.model.internalOrExternal = this.internalOrExternal
|
||||
/*update_end author:wuxianquan date:20190908 for:获取值*/
|
||||
|
||||
let formData = Object.assign(this.model, values);
|
||||
let formData = Object.assign(this.model, values)
|
||||
if ((formData.menuType == 1 || formData.menuType == 2) && !formData.parentId) {
|
||||
that.validateStatus = 'error';
|
||||
that.$message.error("请检查你填的类型以及信息是否正确!");
|
||||
return;
|
||||
that.validateStatus = 'error'
|
||||
that.$message.error('请检查你填的类型以及信息是否正确!')
|
||||
return
|
||||
} else {
|
||||
that.validateStatus = 'success';
|
||||
that.validateStatus = 'success'
|
||||
}
|
||||
that.confirmLoading = true;
|
||||
let obj;
|
||||
that.confirmLoading = true
|
||||
let obj
|
||||
if (!this.model.id) {
|
||||
obj = addPermission(formData);
|
||||
obj = addPermission(formData)
|
||||
} else {
|
||||
obj = editPermission(formData);
|
||||
obj = editPermission(formData)
|
||||
}
|
||||
obj.then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message);
|
||||
that.$emit('ok');
|
||||
that.$message.success(res.message)
|
||||
that.$emit('ok')
|
||||
} else {
|
||||
that.$message.warning(res.message);
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false;
|
||||
that.close();
|
||||
});
|
||||
that.confirmLoading = false
|
||||
that.close()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
validateNumber(rule, value, callback){
|
||||
if(!value || new RegExp(/^[0-9]*[1-9][0-9]*$/).test(value)){
|
||||
callback();
|
||||
}else{
|
||||
callback(this.$t('enterPositiveInteger'));
|
||||
validateNumber(rule, value, callback) {
|
||||
if (!value || new RegExp(/^[0-9]*[1-9][0-9]*$/).test(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback(this.$t('enterPositiveInteger'))
|
||||
}
|
||||
},
|
||||
validatePerms(rule, value, callback){
|
||||
if(value && value.length>0){
|
||||
validatePerms(rule, value, callback) {
|
||||
if (value && value.length > 0) {
|
||||
//校验授权标识是否存在
|
||||
var params = {
|
||||
tableName: 'sys_permission',
|
||||
fieldName: 'perms',
|
||||
fieldVal: value,
|
||||
dataId: this.model.id
|
||||
};
|
||||
}
|
||||
duplicateCheck(params).then((res) => {
|
||||
if (res.success) {
|
||||
callback()
|
||||
@@ -377,50 +386,50 @@
|
||||
callback(this.$t('AuthorizationIDExists'))
|
||||
}
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
onChangeMenuType(e) {
|
||||
this.localMenuType=e.target.value
|
||||
if(e.target.value == 2){
|
||||
this.show = false;
|
||||
this.menuLabel = this.$t('ButtonsPermissions');
|
||||
}else{
|
||||
this.show = true;
|
||||
this.menuLabel = this.$t('MenuName');
|
||||
this.localMenuType = e.target.value
|
||||
if (e.target.value == 2) {
|
||||
this.show = false
|
||||
this.menuLabel = this.$t('ButtonsPermissions')
|
||||
} else {
|
||||
this.show = true
|
||||
this.menuLabel = this.$t('MenuName')
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.form.validateFields(['url','component'], { force: true });
|
||||
});
|
||||
this.form.validateFields(['url', 'component'], { force: true })
|
||||
})
|
||||
},
|
||||
selectIcons(){
|
||||
selectIcons() {
|
||||
this.iconChooseVisible = true
|
||||
},
|
||||
handleIconCancel () {
|
||||
handleIconCancel() {
|
||||
this.iconChooseVisible = false
|
||||
},
|
||||
handleIconChoose (value) {
|
||||
handleIconChoose(value) {
|
||||
this.model.icon = value
|
||||
this.form.icon = value
|
||||
this.iconChooseVisible = false
|
||||
},
|
||||
// 根据屏幕变化,设置抽屉尺寸
|
||||
resetScreenSize(){
|
||||
let screenWidth = document.body.clientWidth;
|
||||
if(screenWidth < 500){
|
||||
this.drawerWidth = screenWidth;
|
||||
}else{
|
||||
this.drawerWidth = 700;
|
||||
resetScreenSize() {
|
||||
let screenWidth = document.body.clientWidth
|
||||
if (screenWidth < 500) {
|
||||
this.drawerWidth = screenWidth
|
||||
} else {
|
||||
this.drawerWidth = 700
|
||||
}
|
||||
},
|
||||
initDictConfig() {
|
||||
},
|
||||
handleParentIdChange(value){
|
||||
if(!value){
|
||||
this.validateStatus="error"
|
||||
}else{
|
||||
this.validateStatus="success"
|
||||
handleParentIdChange(value) {
|
||||
if (!value) {
|
||||
this.validateStatus = 'error'
|
||||
} else {
|
||||
this.validateStatus = 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user