Merge remote-tracking branch 'origin/master'

This commit is contained in:
wangzhijiang
2022-03-10 18:14:16 +08:00
36 changed files with 1004 additions and 367 deletions
@@ -8,8 +8,6 @@ package com.jero.common.constant.enums;
public enum ModuleEnum { public enum ModuleEnum {
DOCUMENT_LIBRARY("文档管理","1"), DOCUMENT_LIBRARY("文档管理","1"),
OCR_RECORD("OCR识别转换记录表","2"), OCR_RECORD("OCR识别转换记录表","2"),
ONL_CGFORM_TAG("标签项管理","3"),
ONL_CGFORM_AREA("展示区域管理","4"),
ONL_CGFORM_COLLECTION("我的收藏","5"), ONL_CGFORM_COLLECTION("我的收藏","5"),
ONL_CGFORM_SUBSCRIBE("我的订阅","6"); ONL_CGFORM_SUBSCRIBE("我的订阅","6");
@@ -119,12 +119,13 @@
</otherwise> </otherwise>
</choose> </choose>
</select> </select>
<!-- 查询新增表单数据,并且按照展示区域的"排序号"和字段的"展示顺序"排序 -->
<select id="getFieldList" resultType="com.jero.generater.modules.online.cgform.entity.OnlCgformField"> <select id="getFieldList" resultType="com.jero.generater.modules.online.cgform.entity.OnlCgformField">
select * from onl_cgform_field ocf select * from onl_cgform_field ocf
left join onl_cgform_head och on ocf.cgform_head_id = och.id left join onl_cgform_head och on ocf.cgform_head_id = och.id
left join onl_cgform_area oca on ocf.show_area=oca.id
where table_name =#{tableName} and ocf.is_delete = 0 where table_name =#{tableName} and ocf.is_delete = 0
order by order_num asc order by oca.sort asc,order_num asc
</select> </select>
</mapper> </mapper>
@@ -818,10 +818,6 @@ public class OnlCgformFieldServiceImpl extends ServiceImpl<OnlCgformFieldMapper,
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.BUSS_DOCUMENT_LIBRARY.getTable()+" "); fieldList = onlCgformFieldMapper.getFieldList(TableEnum.BUSS_DOCUMENT_LIBRARY.getTable()+" ");
}else if(ModuleEnum.OCR_RECORD.getValue().equals(flag)){ }else if(ModuleEnum.OCR_RECORD.getValue().equals(flag)){
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.OCR_RECORD.getTable()); fieldList = onlCgformFieldMapper.getFieldList(TableEnum.OCR_RECORD.getTable());
}else if(ModuleEnum.ONL_CGFORM_TAG.getValue().equals(flag)){
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.TAG.getTable());
}else if(ModuleEnum.ONL_CGFORM_AREA.getValue().equals(flag)){
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.TAG_AREA.getTable());
}else if(ModuleEnum.ONL_CGFORM_COLLECTION.getValue().equals(flag)){ }else if(ModuleEnum.ONL_CGFORM_COLLECTION.getValue().equals(flag)){
fieldList = onlCgformFieldMapper.getFieldList(TableEnum.ONL_CGFORM_COLLECTION.getTable()); fieldList = onlCgformFieldMapper.getFieldList(TableEnum.ONL_CGFORM_COLLECTION.getTable());
}else if(ModuleEnum.ONL_CGFORM_SUBSCRIBE.getValue().equals(flag)){ }else if(ModuleEnum.ONL_CGFORM_SUBSCRIBE.getValue().equals(flag)){
@@ -116,8 +116,8 @@ public class SysCategoryController {
* @param * @param
* @return * @return
*/ */
@AutoLog(value = "标签内容-树形结构-通过sysDictId查询") @AutoLog(value = "标签内容-树形结构-通过名称查询")
@ApiOperation(value="标签内容-树形结构-通过sysDictId查询", notes="标签内容-树形结构-通过sysDictId查询") @ApiOperation(value="标签内容-树形结构-通过名称查询", notes="标签内容-树形结构-通过名称查询")
@GetMapping(value = "/queryBySysName") @GetMapping(value = "/queryBySysName")
public Result<?> queryBySysName(@RequestParam(name="id",required=true) String sysName) { public Result<?> queryBySysName(@RequestParam(name="id",required=true) String sysName) {
List<SysCategory> sysCategory = sysCategoryService.queryBySysName(sysName); List<SysCategory> sysCategory = sysCategoryService.queryBySysName(sysName);
@@ -136,7 +136,6 @@ public class SysCategoryController {
public Result<SysCategory> add(@RequestBody SysCategory sysCategory) { public Result<SysCategory> add(@RequestBody SysCategory sysCategory) {
Result<SysCategory> result = new Result<SysCategory>(); Result<SysCategory> result = new Result<SysCategory>();
try { try {
sysCategory.setDelFlag(CommonConstant.DEL_FLAG_0);
sysCategoryService.addSysCategory(sysCategory); sysCategoryService.addSysCategory(sysCategory);
result.success("添加成功!"); result.success("添加成功!");
} catch (Exception e) { } catch (Exception e) {
@@ -76,6 +76,7 @@ public class SysDictController {
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) {
Result<IPage<SysDict>> result = new Result<IPage<SysDict>>(); Result<IPage<SysDict>> result = new Result<IPage<SysDict>>();
QueryWrapper<SysDict> queryWrapper = QueryGenerator.initQueryWrapper(sysDict, req.getParameterMap()); QueryWrapper<SysDict> queryWrapper = QueryGenerator.initQueryWrapper(sysDict, req.getParameterMap());
queryWrapper.eq("del_flag",CommonConstant.DEL_FLAG_0);
Page<SysDict> page = new Page<SysDict>(pageNo, pageSize); Page<SysDict> page = new Page<SysDict>(pageNo, pageSize);
IPage<SysDict> pageList = sysDictService.page(page, queryWrapper); IPage<SysDict> pageList = sysDictService.page(page, queryWrapper);
log.debug("查询当前页:"+pageList.getCurrent()); log.debug("查询当前页:"+pageList.getCurrent());
@@ -55,7 +55,7 @@ public class SysDictItemController {
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,HttpServletRequest req) { @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,HttpServletRequest req) {
Result<IPage<SysDictItem>> result = new Result<IPage<SysDictItem>>(); Result<IPage<SysDictItem>> result = new Result<IPage<SysDictItem>>();
QueryWrapper<SysDictItem> queryWrapper = QueryGenerator.initQueryWrapper(sysDictItem, req.getParameterMap()); QueryWrapper<SysDictItem> queryWrapper = QueryGenerator.initQueryWrapper(sysDictItem, req.getParameterMap());
queryWrapper.orderByAsc("sort_order"); queryWrapper.orderByAsc("sort_order").eq("del_flag",CommonConstant.DEL_FLAG_0);
Page<SysDictItem> page = new Page<SysDictItem>(pageNo, pageSize); Page<SysDictItem> page = new Page<SysDictItem>(pageNo, pageSize);
IPage<SysDictItem> pageList = sysDictItemService.page(page, queryWrapper); IPage<SysDictItem> pageList = sysDictItemService.page(page, queryWrapper);
result.setSuccess(true); result.setSuccess(true);
@@ -151,7 +151,7 @@ public class SysDictItemController {
* @return * @return
*/ */
//@RequiresRoles({"admin"}) //@RequiresRoles({"admin"})
@RequiresPermissions("sys:dict:list") //@RequiresPermissions("sys:dict:list")未改
@RequestMapping(value = "/logicDelete", method = RequestMethod.DELETE) @RequestMapping(value = "/logicDelete", method = RequestMethod.DELETE)
@CacheEvict(value=CacheConstant.SYS_DICT_CACHE, allEntries=true) @CacheEvict(value=CacheConstant.SYS_DICT_CACHE, allEntries=true)
public Result<SysDictItem> logicDelete(@RequestParam(name="id",required=true) String id) { public Result<SysDictItem> logicDelete(@RequestParam(name="id",required=true) String id) {
@@ -72,5 +72,5 @@ public interface ISysCategoryService extends IService<SysCategory> {
*/ */
List<SysCategoryTreeVO> getSysCategoryTree(); List<SysCategoryTreeVO> getSysCategoryTree();
List<SysCategory> queryBySysName(String sysName); List<SysCategory> queryBySysName(String sysDictId);
} }
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.constant.CommonConstant;
import com.jero.common.constant.FillRuleConstant; import com.jero.common.constant.FillRuleConstant;
import com.jero.common.exception.JeroBootException; import com.jero.common.exception.JeroBootException;
import com.jero.common.util.FillRuleUtil; import com.jero.common.util.FillRuleUtil;
@@ -59,6 +60,7 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
//update-end--Author:baihailong Date:20191209 for:分类字典编码规则生成器做成公用配置 //update-end--Author:baihailong Date:20191209 for:分类字典编码规则生成器做成公用配置
sysCategory.setCode(categoryCode); sysCategory.setCode(categoryCode);
sysCategory.setPid(categoryPid); sysCategory.setPid(categoryPid);
sysCategory.setDelFlag(CommonConstant.DEL_FLAG_0);
baseMapper.insert(sysCategory); baseMapper.insert(sysCategory);
} }
@@ -215,14 +217,14 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
@Override @Override
public List<SysCategory> queryBySysDictId(String sysDictId) { public List<SysCategory> queryBySysDictId(String sysDictId) {
QueryWrapper<SysCategory> queryWrapper=new QueryWrapper<>(); QueryWrapper<SysCategory> queryWrapper=new QueryWrapper<>();
queryWrapper.eq("sys_dict_id",sysDictId); queryWrapper.eq("sys_dict_id",sysDictId).eq("del_flag", CommonConstant.DEL_FLAG_0);
return list(queryWrapper); return list(queryWrapper);
} }
/**搜索条件*/
@Override @Override
public List<SysCategory> queryBySysName(String sysName) { public List<SysCategory> queryBySysName(String sysName) {
QueryWrapper<SysCategory> queryWrapper=new QueryWrapper<>(); QueryWrapper<SysCategory> queryWrapper=new QueryWrapper<>();
queryWrapper.like("name",sysName); queryWrapper.like("name",sysName).eq("del_flag", CommonConstant.DEL_FLAG_0);
return list(queryWrapper); return list(queryWrapper);
} }
@Override @Override
@@ -62,7 +62,7 @@ public class HttpRequestUtil {
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(20000000).setSocketTimeout(200000000).build(); RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(20000000).setSocketTimeout(200000000).build();
HttpPost httpPost = new HttpPost(url); HttpPost httpPost = new HttpPost(url);
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
httpPost.setEntity(new StringEntity(body)); httpPost.setEntity(new StringEntity(body,"utf-8"));
if (headerMap != null) { if (headerMap != null) {
Iterator var38 = headerMap.entrySet().iterator(); Iterator var38 = headerMap.entrySet().iterator();
@@ -0,0 +1,29 @@
package com.jero.modules.feishu.service;
import java.io.IOException;
/**
* @Author: liyawei
* @Description:
* @Date: Created in 13:40 2022/3/10
*/
public interface IFeishuService {
/**
* 获取token
* @return
* @throws IOException
*/
String getTenantAccessToken() throws IOException;
/**
* 批量发送消息
* @param userIds 用户域账号,对应数据库字段:third_id
* @param message 消息内容
* @param title 消息类型
* @param backUrl 消息内容中的跳转链接
* @return
* @throws IOException
*/
String batchSendMessage(String[] userIds, String message, String title, String backUrl) throws IOException;
}
@@ -0,0 +1,114 @@
package com.jero.modules.feishu.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.system.util.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author: liyawei
* @Description:
* @Date: Created in 13:41 2022/3/10
*/
@Slf4j
@Service
public class FeishuServiceImpl implements IFeishuService {
@Value("${Feishu.appId}")
private String appId;
@Value("${Feishu.appSecret}")
private String appSecret;
@Value("${Feishu.getTenantAccessTokenUrl}")
private String getTenantAccessTokenUrl;
@Value("${Feishu.batchSendMessageUrl}")
private String batchSendMessageUrl;
/**
* 获取token
* @return
* @throws IOException
*/
public String getTenantAccessToken() throws IOException {
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Content-Type", "application/json; charset=utf-8");
Map<String, String> paramsMap = new HashMap<>();
paramsMap.put("app_id", appId);
paramsMap.put("app_secret", appSecret);
String response = HttpRequestUtil.getResponseOfPOST(getTenantAccessTokenUrl, headerMap, JSON.toJSONString(paramsMap));
//返回结果样例: {"code":0,"expire":7167,"msg":"ok","tenant_access_token":"t-3c05f981f36a8a92050718c6875e3c8b02c62304"}
JSONObject tokenJson = JSONObject.parseObject(response);
if(!tokenJson.get("code").toString().equals("0")) {
log.error("请求出现异常:" + tokenJson.get("msg") + " " + tokenJson);
return null;
}
String tenantAccessToken = tokenJson.get("tenant_access_token").toString();
return tenantAccessToken;
}
/**
* 批量发送消息
* @param userIds 用户域账号,对应数据库字段:third_id
* @param message 消息内容
* @param title 消息类型
* @param backUrl 消息内容中的跳转链接
* @return
* @throws IOException
*/
public String batchSendMessage(String[] userIds, String message, String title, String backUrl) throws IOException {
String token = getTenantAccessToken();
// 设置请求头
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Authorization", "Bearer " + token);
headerMap.put("Content-Type", "application/json; charset=utf-8");
// 设置消息标题
JSONObject zh_cn = new JSONObject();
zh_cn.put("title", title);
// 设置消息内容
// 第一行
JSONObject contentOne = new JSONObject();
contentOne.put("tag", "text");
contentOne.put("text", message);
// 第二行
JSONObject contentTwo = new JSONObject();
contentTwo.put("tag", "a");
contentTwo.put("text", "跳转链接");
contentTwo.put("href", backUrl);
List<JSONObject> contentList = new ArrayList<>();
contentList.add(contentOne);
contentList.add(contentTwo);
List<List<JSONObject>> list = new ArrayList<>();
list.add(contentList);
zh_cn.put("content", list);
JSONObject post = new JSONObject();
post.put("zh_cn", zh_cn);
JSONObject contentObj = new JSONObject();
contentObj.put("post", post);
// 设置请求参数
JSONObject paramsMap = new JSONObject();
paramsMap.put("user_ids", userIds);
paramsMap.put("msg_type", "post");
paramsMap.put("content", contentObj);
// 发送请求给飞书
String response = HttpRequestUtil.getResponseOfPOST(batchSendMessageUrl, headerMap, paramsMap.toJSONString());
// 返回结果样例:{"code":0,"data":{"invalid_department_ids":[],"invalid_open_ids":[],"invalid_union_ids":[],"invalid_user_ids":[],"message_id":"bm-d595567e4f448fafe397bc916f0be646"},"msg":"ok"}
// 获取返回结果
JSONObject tokenJson = JSONObject.parseObject(response);
if(!tokenJson.get("code").toString().equals("0")) {
log.error("请求出现异常:" + tokenJson.get("msg") + " " + tokenJson);
}
return tokenJson.get("msg").toString();
}
}
@@ -9,6 +9,7 @@ import com.jero.modules.enums.FixedFieldEnum;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.tag.entity.OnlCgformArea; import com.jero.modules.tag.entity.OnlCgformArea;
import com.jero.modules.tag.entity.OnlCgformTag; import com.jero.modules.tag.entity.OnlCgformTag;
import com.jero.modules.tag.enums.FileTableIdEnum;
import com.jero.modules.tag.service.IOnlCgformTagService; import com.jero.modules.tag.service.IOnlCgformTagService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@@ -84,7 +85,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
//@RequiresPermissions("tag:add") //@RequiresPermissions("tag:add")
public Result<?> add(@Validated @RequestBody OnlCgformTag onlCgformTag) { public Result<?> add(@Validated @RequestBody OnlCgformTag onlCgformTag) {
onlCgformTagService.add(onlCgformTag); onlCgformTagService.add(onlCgformTag);
onlCgformApiController.h("48308196e7b04761b533dc31bc899707","normal"); onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }
@@ -103,8 +104,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
return Result.error("固定字段,不可修改"); return Result.error("固定字段,不可修改");
}else { }else {
onlCgformTagService.editById(onlCgformTag); onlCgformTagService.editById(onlCgformTag);
//TODO 统一定义枚举或者统一常量形式并且加注释说明,不然ID写的太乱后期不好修改 onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");
onlCgformApiController.h("48308196e7b04761b533dc31bc899707","normal");
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
} }
@@ -127,8 +127,7 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
result.error500("固定字段,不可删除"); result.error500("固定字段,不可删除");
} else { } else {
onlCgformTagService.deleteById(id); onlCgformTagService.deleteById(id);
//TODO 统一定义枚举或者统一常量形式并且加注释说明,不然ID写的太乱后期不好修改 onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");
onlCgformApiController.h("48308196e7b04761b533dc31bc899707","normal");
result.OK("删除成功!"); result.OK("删除成功!");
} }
} }
@@ -148,11 +147,10 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
OnlCgformTag onlCgformTag = onlCgformTagService.queryById(ids); OnlCgformTag onlCgformTag = onlCgformTagService.queryById(ids);
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(onlCgformTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(onlCgformTag.getIsReadOnly())) { if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(onlCgformTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(onlCgformTag.getIsReadOnly())) {
return Result.error("固定字段,不可删除"); return Result.error("包含固定字段,不可删除");
}else { }else {
this.onlCgformTagService.deleteByIds(Arrays.asList(ids.split(","))); this.onlCgformTagService.deleteByIds(Arrays.asList(ids.split(",")));
//TODO 统一定义枚举或者统一常量形式并且加注释说明,不然ID写的太乱后期不好修改 onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");
onlCgformApiController.h("48308196e7b04761b533dc31bc899707","normal");
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
} }
@@ -86,10 +86,10 @@ public class OnlCgformTag implements Serializable {
@ApiModelProperty(value = "字段英文名称描述") @ApiModelProperty(value = "字段英文名称描述")
private java.lang.String dbFieldEnName; private java.lang.String dbFieldEnName;
/**表单控件类型*/ /**属性类型*/
@Excel(name = "表单控件类型", width = 15,dicCode ="field_show_type") @Excel(name = "属性类型", width = 15,dicCode ="field_show_type")
@Dict(dicCode ="field_show_type") @Dict(dicCode ="field_show_type")
@ApiModelProperty(value = "表单控件类型") @ApiModelProperty(value = "属性类型")
private java.lang.String fieldShowType; private java.lang.String fieldShowType;
@TableField(exist = false) @TableField(exist = false)
@@ -0,0 +1,30 @@
package com.jero.modules.tag.enums;
public enum FileTableIdEnum {
FILE_TABLE_ID("文档库表id","48308196e7b04761b533dc31bc899707"),
;
String name;
String value;
FileTableIdEnum(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
@@ -27,6 +27,7 @@ public interface OnlCgformTagMapper extends BaseMapper<OnlCgformTag> {
"left join sys_dict_item as i on f.field_show_type=i.item_value\n" + "left join sys_dict_item as i on f.field_show_type=i.item_value\n" +
"left join onl_cgform_area as a on f.show_area=a.id\n" + "left join onl_cgform_area as a on f.show_area=a.id\n" +
"where f.cgform_head_id=\"48308196e7b04761b533dc31bc899707\"\n" + "where f.cgform_head_id=\"48308196e7b04761b533dc31bc899707\"\n" +
"and f.is_delete=0\n" +
"and i.dict_id=1493098515761917954 \n" + "and i.dict_id=1493098515761917954 \n" +
"order by f.create_time desc ") "order by f.create_time desc ")
IPage<OnlCgformTag> queryPageList(IPage page,@Param("params") Map<String,Object> params); IPage<OnlCgformTag> queryPageList(IPage page,@Param("params") Map<String,Object> params);
@@ -119,7 +119,6 @@ public class OnlCgformAreaServiceImpl extends ServiceImpl<OnlCgformAreaMapper, O
QueryWrapper<OnlCgformArea> queryWrapper = new QueryWrapper<>(); QueryWrapper<OnlCgformArea> queryWrapper = new QueryWrapper<>();
if (CutEnum.CN.getValue().equals(cut)) { if (CutEnum.CN.getValue().equals(cut)) {
queryWrapper.select("id","show_area").orderByAsc("sort"); queryWrapper.select("id","show_area").orderByAsc("sort");
System.out.println("QueryWrapper数据:"+queryWrapper);
return list(queryWrapper); return list(queryWrapper);
}else{ }else{
queryWrapper.select("id","en_name").orderByAsc("sort"); queryWrapper.select("id","en_name").orderByAsc("sort");
@@ -8,13 +8,16 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.constant.CommonConstant; import com.jero.common.constant.CommonConstant;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.vo.LoginUser;
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
import com.jero.modules.document.enums.FieldTypeEnum;
import com.jero.modules.tag.entity.OnlCgformArea; import com.jero.modules.tag.entity.OnlCgformArea;
import com.jero.modules.tag.entity.OnlCgformTag; import com.jero.modules.tag.entity.OnlCgformTag;
import com.jero.modules.tag.mapper.OnlCgformTagMapper; import com.jero.modules.tag.mapper.OnlCgformTagMapper;
import com.jero.modules.tag.service.IOnlCgformTagService; import com.jero.modules.tag.service.IOnlCgformTagService;
import com.jero.modules.utils.HanYuPinYinUtil; import com.jero.modules.utils.HanYuPinYinUtil;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -55,21 +58,24 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
onlCgformTag.setDbIsNull(1); onlCgformTag.setDbIsNull(1);
onlCgformTag.setDbPointLength(0); onlCgformTag.setDbPointLength(0);
onlCgformTag.setIsReadOnly(0); onlCgformTag.setIsReadOnly(0);
Date now = new Date();
onlCgformTag.setCreateTime(now);
onlCgformTag.setUpdateTime(now);
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
onlCgformTag.setCreateBy(sysUser.getRealname());
onlCgformTag.setUpdateBy(sysUser.getRealname());
String pinYin = HanYuPinYinUtil.changeToNumberPinYin(onlCgformTag.getDbFieldTxt()); String pinYin = HanYuPinYinUtil.changeToNumberPinYin(onlCgformTag.getDbFieldTxt());
onlCgformTag.setDbFieldName(pinYin.replace(" ","_")); onlCgformTag.setDbFieldName(pinYin.replace(" ","_"));
onlCgformTag.setDbFieldEnName(onlCgformTag.getDbFieldEnName().replace(" ","_")); onlCgformTag.setDbFieldEnName(onlCgformTag.getDbFieldEnName().replace(" ","_"));
//TODO 使用枚举形式,不能直接使用字符串定义,看不出代表什么含义 //设置标签存入数据库的字段类型
if(onlCgformTag.getFieldShowType()=="2"){ if(onlCgformTag.getFieldShowType().equals(FieldTypeEnum.TEXT_NUMBER)){
onlCgformTag.setDbType("int"); onlCgformTag.setDbType("int");
}else if(onlCgformTag.getFieldShowType()=="5" && onlCgformTag.getFieldShowType()=="6"){ }else if(onlCgformTag.getFieldShowType().equals(FieldTypeEnum.DATE_SINGLE) && onlCgformTag.equals(FieldTypeEnum.DATE_MORE)){
onlCgformTag.setDbType("Date"); onlCgformTag.setDbType("Date");
}else{ }else{
onlCgformTag.setDbType("String"); onlCgformTag.setDbType("String");
} }
} }
Date now = new Date();
onlCgformTag.setCreateTime(now);
onlCgformTag.setUpdateTime(now);
save(onlCgformTag); save(onlCgformTag);
} }
@@ -81,10 +87,13 @@ public class OnlCgformTagServiceImpl extends ServiceImpl<OnlCgformTagMapper, Onl
*/ */
@Override @Override
public void editById(OnlCgformTag onlCgformTag) { public void editById(OnlCgformTag onlCgformTag) {
Date now = new Date();
String pinYin = HanYuPinYinUtil.changeToNumberPinYin(onlCgformTag.getDbFieldTxt()); String pinYin = HanYuPinYinUtil.changeToNumberPinYin(onlCgformTag.getDbFieldTxt());
onlCgformTag.setDbFieldName(pinYin.replace(" ","_")); onlCgformTag.setDbFieldName(pinYin.replace(" ","_"));
Date now = new Date();
onlCgformTag.setUpdateTime(now); onlCgformTag.setUpdateTime(now);
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
onlCgformTag.setUpdateBy(sysUser.getRealname());
saveOrUpdate(onlCgformTag); saveOrUpdate(onlCgformTag);
} }
@@ -132,13 +132,14 @@ spring:
datasource: datasource:
master: master:
# url: jdbc:mysql://10.0.3.44:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai # url: jdbc:mysql://10.0.3.44:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
# username: root url: jdbc:mysql://10.10.10.44:3306/laws_weilai_test?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
# password: 123456
# driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://121.36.69.172:3307/laws_weilai?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
# url: jdbc:mysql://121.36.69.172:3307/laws_weilai?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root username: root
password: hzwlsoft.com password: 123456
# driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://121.36.69.172:3307/laws_weilai?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
# url: jdbc:mysql://121.36.69.172:3307/laws_weilai?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
# username: root
# password: hzwlsoft.com
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置 # 多数据源配置
#multi-datasource1: #multi-datasource1:
@@ -185,7 +186,7 @@ jero :
uploadType: local uploadType: local
path : path :
#文件上传根目录 设置 #文件上传根目录 设置
upload: E://opt//upFiles upload: D://opt//upFiles
#webapp文件路径 #webapp文件路径
webapp: D://opt//webapp webapp: D://opt//webapp
shiro: shiro:
@@ -359,3 +360,9 @@ people:
secret: CDf2D9404C6ac1B0f7c3e3845ae0282a secret: CDf2D9404C6ac1B0f7c3e3845ae0282a
# appSecret CN PROD版 # appSecret CN PROD版
# secret: 7C3F03170E3ea489df04Ce8DEC7Df4f7 # secret: 7C3F03170E3ea489df04Ce8DEC7Df4f7
## Feishu
Feishu:
appId: cli_a16d47ca9f381013
appSecret: DSfCrj70xku2VUjqwHBIuuY6HZnz7ppe
getTenantAccessTokenUrl: https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal
batchSendMessageUrl: https://open.feishu.cn/open-apis/message/v4/batch_send/
+5 -2
View File
@@ -30,8 +30,8 @@ See https://github.com/adobe-type-tools/cmap-resources
<link rel="stylesheet" href="viewer.css"> <link rel="stylesheet" href="viewer.css">
<!-- This snippet is used in production (included from viewer.html) --> <!-- This snippet is used in production (included from viewer.html) -->
<link rel="resource" type="application/l10n" href="locale/locale.properties"> <link rel="resource" type="application/l10n" href="locale/locale.properties">
<link rel="stylesheet" href="../../zTree/css/demo.css" type="text/css"> <!-- <link rel="stylesheet" href="../../zTree/css/demo.css" type="text/css">-->
<link rel="stylesheet" href="../../zTree/css/zTreeStyle/zTreeStyle.css" type="text/css"> <!-- <link rel="stylesheet" href="../../zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">-->
<style> <style>
/*.pdfViewer .page{*/ /*.pdfViewer .page{*/
/* margin: 1px auto -8px 232px;*/ /* margin: 1px auto -8px 232px;*/
@@ -205,6 +205,9 @@ See https://github.com/adobe-type-tools/cmap-resources
<body tabindex="1" class="loadingInProgress"> <body tabindex="1" class="loadingInProgress">
<!--遮罩层--> <!--遮罩层-->
<div class="mask"></div> <div class="mask"></div>
<!-- <a href="/pdf/web/viewer.html?file=http://10.0.1.31:3000/file/demo.pdf">-->
<!-- 预览文件-->
<!-- </a>-->
<!-- <ul id="treeDemo" class="ztree"></ul>--> <!-- <ul id="treeDemo" class="ztree"></ul>-->
<!-- <div id="rMenu">--> <!-- <div id="rMenu">-->
<!-- &lt;!&ndash; 不需要权限 &ndash;&gt;--> <!-- &lt;!&ndash; 不需要权限 &ndash;&gt;-->
+25
View File
@@ -508,5 +508,30 @@ module.exports = {
labelNameCannotDuplicate:'Label name cannot be duplicate', labelNameCannotDuplicate:'Label name cannot be duplicate',
list:'list', list:'list',
paragraph:'paragraph', paragraph:'paragraph',
enterNumber:'please enter the number',
enterTitle:'Please enter a title',
backDocument:'back to document library',
fileName:'file name',
splitTime:'split time',
splitResult:'split result',
collectionTime:'collection time',
split:'split',
splitFile:'split file',
clauseName:'clause name',
clauseContent:'clause content',
newClause:'new clause',
clauseNo:'clause No.',
functionalAreas:'functional areas',
technicalField:'technical field',
informationCategory:'information category',
contentValidity:'content validity',
content:'content',
Add:'add',
subscriptionTime:'subscription time',
confirmBulkUnsubscribe:'Confirm bulk unsubscribe?',
BatchCancelCollection:'Confirm batch cancel collection?',
unsubscribeConfirm:'unsubscribe confirm?',
confirmCancelCollection:'confirm to cancel collection?',
theRelease:'The release date should not exceed the standard implementation date' theRelease:'The release date should not exceed the standard implementation date'
} }
+24
View File
@@ -512,5 +512,29 @@ module.exports = {
labelNameCannotDuplicate:'标签名称不能重复', labelNameCannotDuplicate:'标签名称不能重复',
list:'列表', list:'列表',
paragraph:'段落', paragraph:'段落',
enterNumber:'请输入编号',
enterTitle:'请输入标题',
backDocument:'回传至文档库',
fileName:'文件名称',
splitTime:'拆分时间',
splitResult:'拆分结果',
collectionTime:'收藏时间',
split:'拆分',
splitFile:'拆分文件',
clauseName:'条款名称',
clauseContent:'条款内容',
newClause:'新增条款',
clauseNo:'条款号',
functionalAreas:'功能领域',
technicalField:'技术领域',
informationCategory:'信息类别',
contentValidity:'内容简介',
content:'内容',
Add:'增加',
subscriptionTime:'订阅时间',
confirmBulkUnsubscribe:'确认批量取消订阅?',
BatchCancelCollection:'确认批量取消收藏?',
unsubscribeConfirm:'确认取消订阅?',
confirmCancelCollection:'确认取消收藏?',
theRelease:'发布日期不能大于标准实施日期' theRelease:'发布日期不能大于标准实施日期'
} }
@@ -44,35 +44,38 @@
</div> </div>
</div> </div>
<div class="colloction-table"> <div class="colloction-table">
<tableData <a-table
:url="url" ref="table"
:flag="'1'" size="middle"
:OperationList="OperationList" rowKey="id"
showAction :columns="columns"
@titleClick="titleClick" :dataSource="tableData"
@onCancel="onCancel" :pagination="false"
@onSelectChange="onSelectChange" :loading="loading"
@detailClick="detailClick" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
></tableData> >
<!-- <a-table bordered :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table">--> <span slot="serialNumber" slot-scope="text, record">
<!-- <a slot="serialNumber" slot-scope="text, record" @click="numberClick(record)">{{ text }}</a>--> <a class="table-del" @click="onDetail(record)">{{record.serialNumber}}</a>
<!--&lt;!&ndash; <a slot="title" slot-scope="text, record" @click="titleClick(record)">{{ text }}</a>&ndash;&gt;--> </span>
<!-- <template slot="action" slot-scope="text, record">--> <span slot="serialtitle" slot-scope="text, record">
<!-- <a class="action-delete" href="javascript:;" @click="onCancel(record)">取消收藏</a>--> <a class="table-del" @click="onDetail(record)">{{record.title}}</a>
<!-- </template>--> </span>
<!-- </a-table>--> <span slot="action" slot-scope="text, record">
<!-- <div class="page" v-if="tableData.length > 0">--> <a class="table-del" @click="onCancel(record)">{{$t('CancelCollection')}}</a>
<!-- <a-pagination--> </span>
<!-- :show-total="total => ` ${total} `"--> </a-table>
<!-- show-quick-jumper--> <div class="page" v-if="tableData.length > 0">
<!-- show-size-changer--> <a-pagination
<!-- :current="queryParams.pageNo"--> :show-total="total => $t('total')+` ${total} `+ $t('strip')"
<!-- :page-size.sync="queryParams.pageSize"--> show-quick-jumper
<!-- :total="total"--> show-size-changer
<!-- @change="onChangePage"--> :current="queryParams.pageNo"
<!-- @showSizeChange="SizeChange"--> :page-size.sync="queryParams.pageSize"
<!-- />--> :total="total"
<!-- </div>--> @change="onChangePage"
@showSizeChange="SizeChange"
/>
</div>
</div> </div>
</a-card> </a-card>
</div> </div>
@@ -81,12 +84,12 @@
import { getAction, postAction, deleteAction, putAction } from '@/api/manage' import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
import eventBUs from '../../../common/event' import eventBUs from '../../../common/event'
import search from '@/components/search/index' import search from '@/components/search/index'
import tableData from '@/components/coTable/index' // import tableData from '@/components/coTable/index'
export default { export default {
name:'collection', name:'collection',
components:{ components:{
search, search,
tableData // tableData
}, },
data(){ data(){
return{ return{
@@ -99,33 +102,31 @@
//列表表头 //列表表头
columns: [ columns: [
{ {
title: '编号', title: this.$t('standard'),
dataIndex: 'serialNumber', dataIndex: 'serialNumber',
key: 'serialNumber', key: 'serialNumber',
scopedSlots: {customRender: 'serialNumber'},
align: "center", align: "center",
width: 100, width: 100,
ellipsis: true,
}, },
{ {
title: '标题', title: this.$t('title'),
align: "center", align: "center",
scopedSlots: {customRender: 'serialtitle'},
width: 100, width: 100,
dataIndex: 'title', dataIndex: 'title',
ellipsis: true,
}, },
{ {
title: '状态', title: this.$t('status'),
align: "center", align: "center",
width: 100, width: 100,
dataIndex: 'state', dataIndex: 'state',
ellipsis: true,
}, },
{ {
title: '收藏时间', title: this.$t('collectionTime'),
align: "center", align: "center",
width: 100, width: 100,
dataIndex: 'createTime', dataIndex: 'createTime',
ellipsis: true,
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
@@ -136,7 +137,7 @@
} }
], ],
tableData:[], //列表数据 tableData:[], //列表数据
selecIds:'', selecIds:[],
loading:false, loading:false,
url:{ url:{
tableHeader: 'collection/onlCgformCollection/getHeader', //表格头部字段 tableHeader: 'collection/onlCgformCollection/getHeader', //表格头部字段
@@ -152,7 +153,7 @@
} }
}, },
mounted() { mounted() {
// this.loadData() this.loadData()
}, },
methods:{ methods:{
//获取列表数据 //获取列表数据
@@ -161,7 +162,7 @@
...this.queryParams ...this.queryParams
} }
this.loading=true this.loading=true
getAction(`collection/onlCgformCollection/page`,params).then(res=>{ postAction(`collection/onlCgformCollection/page`,params).then(res=>{
if(res.success){ if(res.success){
this.tableData= [ ...res.result.records ] this.tableData= [ ...res.result.records ]
this.loading=false this.loading=false
@@ -174,20 +175,21 @@
//批量取消收藏 //批量取消收藏
handleBatCancel(){ handleBatCancel(){
let params={ let params={
ids:this.selecIds ids:this.selecIds.join(',')
} }
if(this.selecIds){ if(this.selecIds&&this.selecIds.length>0){
this.$confirm({ this.$confirm({
title: '确认批量取消收藏?', title: this.$t('BatchCancelCollection'),
content: '', content: '',
onOk: onOk:
async () => { async () => {
deleteAction(`collection/onlCgformCollection/deleteBatch`,params).then(res=> { deleteAction(`collection/onlCgformCollection/deleteBatch`,params).then(res=> {
if(res.success){ if(res.success){
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset') if(this.selecIds.length==this.tableData.length&&this.queryParams.pageNo!==1){
// this.selectedRowKeys = [] this.queryParams.pageNo=this.queryParams.pageNo-1
// this.loadData() }
this.loadData()
}else{ }else{
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
@@ -196,7 +198,7 @@
onCancel() {}, onCancel() {},
}); });
}else{ }else{
this.$message.warning('请选择至少一条数据') this.$message.warning(this.$t('selectLeastOne'))
} }
}, },
//取消收藏 //取消收藏
@@ -205,15 +207,17 @@
id:record.id id:record.id
} }
this.$confirm({ this.$confirm({
title: '确认取消收藏?', title: this.$t('confirmCancelCollection'),
content: '', content: '',
onOk: onOk:
async () => { async () => {
deleteAction(`collection/onlCgformCollection/delete`,params).then(res=> { deleteAction(`collection/onlCgformCollection/delete`,params).then(res=> {
if(res.success){ if(res.success){
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset') if(this.tableData.length==1&&this.queryParams.pageNo!==1){
// this.loadData() this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{ }else{
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
@@ -242,7 +246,7 @@
}, },
//选择框 //选择框
onSelectChange(rows) { onSelectChange(rows) {
console.log('rows',rows) // console.log('rows',rows)
// this.selectedRowKeys = selectedRowKeys // this.selectedRowKeys = selectedRowKeys
// let ids=[] // let ids=[]
// if(rows && rows.length>0){ // if(rows && rows.length>0){
@@ -250,7 +254,7 @@
// ids.push(item.id) // ids.push(item.id)
// }) // })
// } // }
this.selecIds=rows.join(',') this.selecIds=rows
// console.log('selectedRowKeys changed: ', ids); // console.log('selectedRowKeys changed: ', ids);
}, },
//点击编号 //点击编号
@@ -261,7 +265,7 @@
titleClick(records){ titleClick(records){
}, },
detailClick(item) { onDetail(item) {
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
path: '/docManage/library/detail', path: '/docManage/library/detail',
query: item query: item
@@ -280,6 +284,7 @@
.colloction-table{ .colloction-table{
.page{ .page{
margin-top: 20px; margin-top: 20px;
text-align: right;
} }
} }
} }
@@ -297,4 +302,5 @@
float: none!important; float: none!important;
} }
} }
</style> </style>
@@ -2,7 +2,26 @@
<div class="splitting"> <div class="splitting">
<a-card :bordered="false"> <a-card :bordered="false">
<div class="splitting-search-wrapper"> <div class="splitting-search-wrapper">
<search :flag="'1'" :url="url"/> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item :label="$t('standard')">
<j-input :placeholder="$t('enterNumber')" v-model="queryParams.attId"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item :label="$t('title')">
<j-input :placeholder="$t('enterTitle')" v-model="queryParams.title"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div> </div>
<div class="table-operator"> <div class="table-operator">
<div class="operator-text" @click="handleModule"> <div class="operator-text" @click="handleModule">
@@ -19,15 +38,34 @@
</div> </div>
</div> </div>
<div class="splitting-table"> <div class="splitting-table">
<tableData <a-table
:flag="'1'" ref="table"
:OperationList="OperationList" size="middle"
@editTable="seeTable" rowKey="id"
@deleteTable="deleteTable" :columns="columns"
:url="url" :dataSource="tableData"
showAction :pagination="false"
@returnBack="returnBack" :loading="loading"
/> :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a class="action-margin" @click="backDocument(record)">{{$t('backDocument')}}</a>
<a class="action-margin" @click="detail(record)">{{$t('See')}}</a>
<a class="table-del" @click="deleteDetail(record)">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page" v-if="tableData.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
show-quick-jumper
show-size-changer
:current="queryParams.pageNo"
:page-size.sync="queryParams.pageSize"
:total="total"
@change="onChangePage"
@showSizeChange="SizeChange"
/>
</div>
</div> </div>
<split v-if="splitVisible" :splitVisible="splitVisible" @visible="sVisible"></split> <split v-if="splitVisible" :splitVisible="splitVisible" @visible="sVisible"></split>
<imports v-if="importsVisible" :importsVisible="importsVisible" @visible="iVisible"></imports> <imports v-if="importsVisible" :importsVisible="importsVisible" @visible="iVisible"></imports>
@@ -57,29 +95,62 @@
return{ return{
splitVisible:false, splitVisible:false,
importsVisible:false, importsVisible:false,
OperationList: [ selectedRowKeys:[],
loading:false,
total:0,
ids:[],
tableData:[
{ {
text: '回传至文档库', dbFieldTxt_dictText:'11111',
ClickEvent: 'returnBack' dbFieldEnName_dictText:'aaaaa',
}, fieldShowType_dictText:'345435435',
{ dbLength_dictText:'et435344354',
text: '查看', orderNum_dictText:'dfgdrgd',
ClickEvent: 'seeTable' showAreaName:'sdfsdfsd',
},
{
text: '删除',
ClickEvent: 'deleteTable'
} }
], ],
url: { columns:[
// tableHeader: 'document/bussDocumentLibraryEO/getHeader', //表格头部字段 {
// seachList: 'document/bussDocumentLibraryEO/queryCondition', //搜索字段 title: this.$t('standard'),
// tableList: 'document/bussDocumentLibraryEO/queryPageInfo', //表格数据 align: "center",
// getAddForm: 'document/bussDocumentLibraryEO/getAddForm', // 表单的字段 dataIndex: 'dbFieldTxt_dictText',
// addInfo: 'document/bussDocumentLibraryEO/addInfo', //新增 },
// updateInfo: 'document/bussDocumentLibraryEO/updateInfo', //编辑 {
// getDocumentInfo: 'document/bussDocumentLibraryEO/getDocumentInfoById', //查看 title: this.$t('title'),
// deleteBatch: 'document/bussDocumentLibraryEO/deleteBatch' //删除 align: "center",
dataIndex: 'dbFieldEnName_dictText',
},
{
title: this.$t('TextStatus'),
align: "center",
dataIndex: 'fieldShowType_dictText',
},
{
title: this.$t('fileName'),
align: "center",
dataIndex: 'dbLength_dictText'
},
{
title: this.$t('splitTime'),
align: "center",
dataIndex: 'orderNum_dictText'
},
{
title: this.$t('splitResult'),
align: "center",
dataIndex: 'showAreaName'
},
{
title: this.$t('operation'),
dataIndex: 'action',
scopedSlots: {customRender: 'action'},
align: "center",
width: 170
}
],
queryParams:{
pageNo:1,
pageSize:10
} }
} }
}, },
@@ -90,9 +161,26 @@
}, },
mounted() { mounted() {
this.loadData()
}, },
methods:{ methods:{
//获取列表数据
loadData(){
this.loading=true
let params={
...this.queryParams
}
getAction(``,params).then(res=>{
if(res.success){
this.tableData=[...res.result.records]
this.loading=false
this.total=res.result.total
}else{
this.loading=false
}
})
},
//拆分已入库文本 //拆分已入库文本
handleModule(){ handleModule(){
this.splitVisible=true this.splitVisible=true
@@ -103,28 +191,46 @@
}, },
//批量删除 //批量删除
handleDel(){ handleDel(){
let params={
ids:this.selectedRowKeys.join(',')
}
if(this.selectedRowKeys&&this.selectedRowKeys.length>0){
this.$confirm({
title: this.$t('ConfirmDelete'),
content: '',
onOk:
async () => {
deleteAction(``, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if(this.selectedRowKeys&&this.selectedRowKeys.length==this.tableData.length){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
}
}, })
//回传至文档库 }
returnBack(val){ else{
console.log('val',val) this.$message.warning(this.$t('selectLeastOne'))
}, }
//查看
seeTable(){
this.$router.push({
path:'/docManage/splitting/splitDetail'
})
}, },
//删除 //删除
deleteTable(val){ deleteDetail(val){
let _this = this
this.$confirm({ this.$confirm({
content: '确认删除?', content: this.$t('confirmDeletion'),
onOk() { onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => { deleteAction(``, { id: val.id }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(res.message) this.$message.success(res.message)
eventBUs.$emit('searchReset') if(this.tableData&&this.tableData.length==1&&this.queryParams.pageNo!=1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
@@ -137,7 +243,55 @@
}, },
iVisible(val){ iVisible(val){
this.importsVisible=val this.importsVisible=val
} },
//查询
searchQuery(){
},
//清空
searchReset(){
},
onSelectChange(selKeys){
this.selectedRowKeys=selKeys
},
handleTableChange(){
},
//点击页数
onChangePage(page,pageSize){
this.queryParams.pageNo = page
this.$emit('queryParams',this.queryParams)
},
//一页显示条数
SizeChange(page,pageSize){
this.queryParams.pageSize = pageSize
this.$emit('queryParams',this.queryParams)
},
//回传至文档库
backDocument(val){
this.$confirm({
content: this.$t('backDocument'),
onOk() {
deleteAction(``, { id: val.id }).then((res) => {
if (res.success) {
this.$message.success(res.message)
this.loadData()
} else {
this.$message.warning(res.message)
}
})
}
})
},
//查看
detail(val){
this.$router.push({
path:'/docManage/splitting/splitDetail',
query:val
})
},
} }
} }
</script> </script>
@@ -146,12 +300,26 @@
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
</style> </style>
<style lang="less"> <style lang="less" scoped>
.splitting{ .splitting{
.splitting-search-wrapper{ .splitting-search-wrapper{
margin-bottom: 20px;
.table-page-search-submitButtons{ .table-page-search-submitButtons{
float: none!important; float: none!important;
} }
}
.splitting-table{
.action-margin{
margin-right: 10px;
}
} }
} }
.splitting-table{
.page{
margin-top: 20px;
text-align: right;
}
}
</style> </style>
@@ -2,7 +2,7 @@
<div class="imports"> <div class="imports">
<a-drawer <a-drawer
class="imports-table-drawer" class="imports-table-drawer"
title="拆分已入库文本" :title="$t('ImportResults')"
placement="right" placement="right"
:visible="visible" :visible="visible"
:after-visible-change="afterVisibleChange" :after-visible-change="afterVisibleChange"
@@ -14,19 +14,19 @@
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)"> <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="12">
<a-form-item :label="'编号'"> <a-form-item :label="$t('standard')">
<j-input :placeholder="'请输入编号'" v-model="queryParams.standNumber"></j-input> <j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="12">
<a-form-item :label="'标题'"> <a-form-item :label="$t('title')">
<j-input :placeholder="'请输入标题'" v-model="queryParams.standName"></j-input> <j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button> <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">清空</a-button> <a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
</span> </span>
</a-col> </a-col>
</a-row> </a-row>
@@ -38,7 +38,7 @@
</a-table> </a-table>
<div class="page" v-if="tableSource.length > 0"> <div class="page" v-if="tableSource.length > 0">
<a-pagination <a-pagination
:show-total="total => ` ${total} `" :show-total="total => $t('total')+` ${total} `+ $t('strip')"
show-quick-jumper show-quick-jumper
show-size-changer show-size-changer
:page-size.sync="queryParams.pageSize" :page-size.sync="queryParams.pageSize"
@@ -57,21 +57,21 @@
:label-col="labelCol" :label-col="labelCol"
:wrapper-col="wrapperCol" :wrapper-col="wrapperCol"
> >
<a-form-model-item ref="file" label="拆分文件" prop="file"> <a-form-model-item ref="file" :label="$t('splitFile')" prop="file">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
@click="fileUpload()"> @click="fileUpload()">
{{ (form.file === 'null' || form.file === '' || {{ (form.file === 'null' || form.file === '' ||
form.file == null) ? '上传' : '查看已上传文件' form.file == null) ? $t('upload1') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<a-button class="file-down" type="primary">模板下载</a-button> <a-button class="file-down" type="primary" @click="downLoad">{{$t('templateDownload')}}</a-button>
</div> </div>
<div class="imports-footer"> <div class="imports-footer">
<div class="imports-footer-wrap"> <div class="imports-footer-wrap">
<a-button class="imports-btn imports-chai" type="primary">保存</a-button> <a-button class="imports-btn imports-chai" type="primary">{{$t('preservation')}}</a-button>
<a-button class="imports-btn" type="primary" @click="cancleImports">取消</a-button> <a-button class="imports-btn" type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
</div> </div>
</div> </div>
<ocr-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></ocr-upload> <ocr-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></ocr-upload>
@@ -80,7 +80,7 @@
</template> </template>
<script> <script>
import { getAction, postAction, deleteAction } from '@/api/manage' import { getAction, postAction, deleteAction, downFile } from '@/api/manage'
import ocrUpload from '@/components/ocrUpload/index' import ocrUpload from '@/components/ocrUpload/index'
export default { export default {
name: 'import', name: 'import',
@@ -103,28 +103,28 @@
total:0, total:0,
columns: [ columns: [
{ {
title:'编号', title:this.$t('standard'),
key: 'standNumber', key: 'standNumber',
align:"center", align:"center",
dataIndex: 'standNumber', dataIndex: 'standNumber',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'标题', title:this.$t('title'),
key: 'standName', key: 'standName',
align:"center", align:"center",
dataIndex: 'standName', dataIndex: 'standName',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'文件名称', title:this.$t('fileName'),
key: 'fileName', key: 'fileName',
align:"center", align:"center",
dataIndex: 'fileName', dataIndex: 'fileName',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'文本状态', title:this.$t('TextStatus'),
key: 'fileType_dictText', key: 'fileType_dictText',
align:"center", align:"center",
dataIndex: 'fileType_dictText', dataIndex: 'fileType_dictText',
@@ -136,7 +136,7 @@
form:{}, form:{},
rules:{ rules:{
file:[ file:[
{ required: true, message: '请选择文件', trigger: 'change' }, { required: true, message: this.$t('noFile'), trigger: 'change' },
], ],
}, },
} }
@@ -198,6 +198,10 @@
// /** 赋值给当前对应的表单文件 */ // /** 赋值给当前对应的表单文件 */
this.form.file = attIdList.join(',') this.form.file = attIdList.join(',')
}, },
//模板下载
downLoad(){
}
} }
} }
</script> </script>
@@ -2,7 +2,7 @@
<div class="split"> <div class="split">
<a-drawer <a-drawer
class="split-table-drawer" class="split-table-drawer"
title="拆分已入库文本" :title="$t('SplitText')"
placement="right" placement="right"
:visible="visible" :visible="visible"
:after-visible-change="afterVisibleChange" :after-visible-change="afterVisibleChange"
@@ -13,20 +13,20 @@
<div class="split-header"> <div class="split-header">
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)"> <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="8">
<a-form-item :label="'编号'"> <a-form-item :label="$t('standard')" class="split-item">
<j-input :placeholder="'请输入编号'" v-model="queryParams.standNumber"></j-input> <j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :label="'标题'">
<j-input :placeholder="'请输入标题'" v-model="queryParams.standName"></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<a-form-item :label="$t('title')" class="split-item">
<j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="6">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button> <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">清空</a-button> <a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
</span> </span>
</a-col> </a-col>
</a-row> </a-row>
@@ -34,11 +34,11 @@
</div> </div>
</div> </div>
<div class="split-table-detail"> <div class="split-table-detail">
<a-table bordered :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" > <a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >
</a-table> </a-table>
<div class="page" v-if="tableSource.length > 0"> <div class="page" v-if="tableSource.length > 0">
<a-pagination <a-pagination
:show-total="total => ` ${total} `" :show-total="total => $t('total')+` ${total} `+ $t('strip')"
show-quick-jumper show-quick-jumper
show-size-changer show-size-changer
:page-size.sync="queryParams.pageSize" :page-size.sync="queryParams.pageSize"
@@ -50,8 +50,8 @@
</div> </div>
<div class="split-footer"> <div class="split-footer">
<div class="split-footer-wrap"> <div class="split-footer-wrap">
<a-button class="split-btn split-chai" type="primary">拆分</a-button> <a-button class="split-btn split-chai" type="primary">{{$t('split')}}</a-button>
<a-button class="split-btn" type="primary" @click="cancelSplit">取消</a-button> <a-button class="split-btn" type="primary" @click="cancelSplit">{{$t('cancel')}}</a-button>
</div> </div>
</div> </div>
</a-drawer> </a-drawer>
@@ -64,7 +64,14 @@
data(){ data(){
return{ return{
visible:false, visible:false,
tableSource:[], //列表数据 tableSource:[
{
standNumber:'aaaa',
standName:'11111',
fileName:'234323',
fileType_dictText:'ewre',
}
], //列表数据
selectedRowKeys:[], selectedRowKeys:[],
queryParams:{ queryParams:{
pageNo:1, pageNo:1,
@@ -73,35 +80,33 @@
total:0, total:0,
columns: [ columns: [
{ {
title:'编号', title:this.$t('standard'),
key: 'standNumber', key: 'standNumber',
align:"center", align:"center",
dataIndex: 'standNumber', dataIndex: 'standNumber',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'标题', title:this.$t('title'),
key: 'standName', key: 'standName',
align:"center", align:"center",
dataIndex: 'standName', dataIndex: 'standName',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'文件名称', title:this.$t('fileName'),
key: 'fileName', key: 'fileName',
align:"center", align:"center",
dataIndex: 'fileName', dataIndex: 'fileName',
ellipsis: true, ellipsis: true,
}, },
{ {
title:'文本状态', title:this.$t('TextStatus'),
key: 'fileType_dictText', key: 'fileType_dictText',
align:"center", align:"center",
dataIndex: 'fileType_dictText', dataIndex: 'fileType_dictText',
ellipsis: true, ellipsis: true,
}, },
] ]
} }
}, },
@@ -158,6 +163,9 @@
.split-table-content{ .split-table-content{
.split-header{ .split-header{
margin-bottom: 20px; margin-bottom: 20px;
.split-item{
display: flex;
}
} }
} }
@@ -3,7 +3,7 @@
<div class="split-add-form-wrapper"> <div class="split-add-form-wrapper">
<a-drawer <a-drawer
class="split-table-drawer" class="split-table-drawer"
title="新增条款" :title="title"
placement="right" placement="right"
:visible="visible" :visible="visible"
:after-visible-change="afterVisibleChange" :after-visible-change="afterVisibleChange"
@@ -19,55 +19,61 @@
:label-col="labelCol" :label-col="labelCol"
:wrapper-col="wrapperCol" :wrapper-col="wrapperCol"
> >
<!-- 条款号-->
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="条款号" prop="number"> <a-form-model-item :label="$t('clauseNo')" prop="number">
<a-input v-model="form.number" placeholder="请输入条款号" /> <a-input v-model="form.number" :placeholder="$t('pleaseEnter')+$t('clauseNo')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- 条款名称-->
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="条款名称" prop="name"> <a-form-model-item :label="$t('clauseName')" prop="name">
<a-input v-model="form.name" placeholder="请输入条款名称" /> <a-input v-model="form.name" :placeholder="$t('pleaseEnter')+$t('clauseName')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<!-- 功能领域-->
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="功能领域" prop="funArea"> <a-form-model-item :label="$t('functionalAreas')" prop="funArea">
<j-dict-select-tag type="list" v-model="form.funArea" dictCode="function_territory" placeholder="请选择功能领域" /> <j-dict-select-tag type="list" v-model="form.funArea" dictCode="function_territory" :placeholder="$t('pleaseSelect')+$t('functionalAreas')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- 技术领域-->
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="技术领域" prop="tecArea"> <a-form-model-item :label="$t('technicalField')" prop="tecArea">
<j-dict-select-tag type="list" v-model="form.tecArea" dictCode="technology_territory" placeholder="请选择技术领域" /> <j-dict-select-tag type="list" v-model="form.tecArea" dictCode="technology_territory" :placeholder="$t('pleaseSelect')+$t('technicalField')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<!-- 信息类别-->
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="信息类别" prop="infoType"> <a-form-model-item :label="$t('informationCategory')" prop="infoType">
<j-dict-select-tag type="list" v-model="form.infoType" dictCode="xxx" placeholder="请选择信息类别" /> <j-dict-select-tag type="list" v-model="form.infoType" dictCode="xxx" :placeholder="$t('pleaseSelect')+$t('informationCategory')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<span class="con-divider">内容简介</span> <!-- 内容简介-->
<span class="con-divider">{{$t('contentValidity')}}</span>
<a-divider dashed /> <a-divider dashed />
<a-row :gutter="24" class="split-content" id="split-content" v-for="(item, index) in contentList" :key="item.id"> <a-row :gutter="24" class="split-content" id="split-content" v-for="(item, index) in contentList" :key="item.id">
<div class="split-row"> <div class="split-row">
<div class="row-left"> <div class="row-left">
<a-textarea v-if="item.type=='TEXT'" v-model="item.textContent" placeholder="请输入内容" auto-size /> <a-textarea v-if="item.type=='TEXT'" v-model="item.textContent" placeholder="$t('pleaseEnter')+$t('content')" auto-size />
</div> </div>
<div class="row-right"> <div class="row-right">
<a-button class="row-btn-add" @click="splitAdd">增加</a-button> <a-button class="row-btn-add" @click="splitAdd">{{$t('Add')}}</a-button>
<a-button @click="splitDelete">删除</a-button> <a-button @click="splitDelete">{{$t('delete')}}</a-button>
</div> </div>
</div> </div>
</a-row> </a-row>
</a-form-model> </a-form-model>
</a-form> </a-form>
<div class="split-form-footer"> <div class="split-form-footer">
<a-button type="primary" class="footer-btn-save" @click="splitSave">保存</a-button> <a-button type="primary" class="footer-btn-save" @click="splitSave">{{$t('preservation')}}</a-button>
<a-button type="primary" @click="splitCancel">取消</a-button> <a-button type="primary" @click="splitCancel">{{$t('cancel')}}</a-button>
</div> </div>
<!-- 类型选择弹框--> <!-- 类型选择弹框-->
<a-modal <a-modal
@@ -101,6 +107,7 @@
name: 'splitAddForm', name: 'splitAddForm',
data(){ data(){
return{ return{
title:this.$t('newClause'),
contentList:[ contentList:[
{ {
id:'001', id:'001',
@@ -117,7 +124,7 @@
selected:1, selected:1,
selectedNum:true, selectedNum:true,
textNumber:1, textNumber:1,
Title:'新增', Title:this.$t('add'),
confirmLoading: false, confirmLoading: false,
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@@ -33,18 +33,18 @@
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
> >
<a-row :gutter="44"> <a-row :gutter="24">
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="8">
<a-form-model-item :label="'条款名称'"> <a-form-model-item :label="$t('clauseName')" class="split-item">
<j-input :placeholder="'请输入条款名称'" v-model="queryParams.serialNumber"></j-input> <j-input :placeholder="$t('pleaseEnter') + $t('clauseName')" v-model="queryParams.serialNumber"></j-input>
</a-form-model-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-model-item :label="'条款内容'">
<j-input :placeholder="'请输入条款内容'" v-model="queryParams.title"></j-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
<a-form-model-item :label="$t('clauseContent')" class="split-item">
<j-input :placeholder="$t('pleaseEnter')+$t('clauseContent')" v-model="queryParams.title"></j-input>
</a-form-model-item>
</a-col>
<a-col :md="6" :sm="6">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button> <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button> <a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
@@ -89,10 +89,10 @@
</div> </div>
</div> </div>
<div class="split-detail-table"> <div class="split-detail-table">
<a-table bordered :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table"> <a-table bordered :data-source="tableData" :columns="columns" rowKey="id" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table">
<template slot="action" slot-scope="text, record"> <template slot="action" slot-scope="text, record">
<a class="action-edit" href="javascript:;" @click="onEdit(record)">编辑</a> <a class="action-edit" href="javascript:;" @click="onEdit(record)">{{$t('edit')}}</a>
<a class="action-delete" href="javascript:;" @click="onCancel(record)">删除</a> <a class="action-delete" href="javascript:;" @click="onCancel(record)">{{$t('delete')}}</a>
</template> </template>
</a-table> </a-table>
<div class="page" v-if="tableData.length > 0"> <div class="page" v-if="tableData.length > 0">
@@ -110,18 +110,22 @@
</div> </div>
</div> </div>
</div> </div>
<splitAddForm v-if="addVisible" :addVisible="addVisible" @closeVisible="closeVisible"></splitAddForm> <splitAddForm v-if="addVisible" :addVisible="addVisible" @closeVisible="closeVisible"></splitAddForm>
<upload ref="uploadSplit" @uploadSuccess="uploadSuccess"></upload>
</div> </div>
</a-card> </a-card>
</div> </div>
</template> </template>
<script> <script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import upload from '@/components/uploadFile/file.vue'
import splitAddForm from './splitAddForm' import splitAddForm from './splitAddForm'
export default { export default {
name: 'splitDetail', name: 'splitDetail',
components:{ components:{
splitAddForm splitAddForm,
upload
}, },
data() { data() {
return { return {
@@ -170,27 +174,23 @@
], ],
} }
], ],
selecIds:'', selecIds:[],
loading:false, loading:false,
columns: [ columns: [
{ {
title: '条款号', title: this.$t('clauseNo'),
dataIndex: 'serialNumber', dataIndex: 'serialNumber',
key: 'serialNumber', key: 'serialNumber',
align: "center", align: "center",
width: 80,
ellipsis: true,
}, },
{ {
title: '条款名称', title: this.$t('clauseName'),
dataIndex: 'serialName', dataIndex: 'serialName',
key: 'serialName', key: 'serialName',
align: "center", align: "center",
width: 80,
ellipsis: true,
}, },
{ {
title: '条款内容', title: this.$t('clauseContent'),
dataIndex: 'serialContent', dataIndex: 'serialContent',
key: 'serialContent', key: 'serialContent',
align: "center", align: "center",
@@ -198,30 +198,28 @@
ellipsis: true, ellipsis: true,
}, },
{ {
title: '功能领域', title: this.$t('functionalAreas'),
dataIndex: 'functionArea', dataIndex: 'functionArea',
key: 'functionArea', key: 'functionArea',
align: "center", align: "center",
width: 80,
ellipsis: true,
}, },
{ {
title: '技术领域', title: this.$t('technicalField'),
dataIndex: 'tecArea', dataIndex: 'tecArea',
key: 'tecArea', key: 'tecArea',
align: "center", align: "center",
width: 80,
ellipsis: true,
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
dataIndex: 'action', dataIndex: 'action',
scopedSlots: {customRender: 'action'}, scopedSlots: {customRender: 'action'},
align: "center", align: "center",
width: 80 width: 120
} }
], ],
addVisible:false addVisible:false,
attId:'',
} }
}, },
mounted() { mounted() {
@@ -301,22 +299,22 @@
} }
this.loadData() this.loadData()
}, },
//删除 //复制按钮
handleCopyManage(record){ handleCopyManage(record){
let params={ let params={
id:record.id id:record.id
} }
this.$confirm({ this.$confirm({
title: '确认删除?', title: this.$t('ConfirmReplication'),
content: '', content: '',
onOk: onOk:
async () => { async () => {
deleteAction(``,params).then(res=> { deleteAction(``,params).then(res=> {
if(res.success){ if(res.success){
this.$message.success(res.message) this.$message.success(this.$t('OperationSuccessful'))
this.loadData() this.loadData()
}else{ }else{
this.$message.warning(res.message) this.$message.warning(this.$t('operationFailed'))
} }
}) })
}, },
@@ -332,7 +330,17 @@
}, },
//导入 //导入
handleImportManage(){ handleImportManage(){
this.$refs.uploadSplit.visible=true
},
//上传成功
uploadSuccess(data){
let attIdList = []
if(data && data.length > 0){
data.forEach(item => {
attIdList.push(item.id || data.name)
})
this.attId = attIdList.join(',')
}
}, },
//导出 //导出
handleExportManage(){ handleExportManage(){
@@ -340,7 +348,7 @@
}, },
//模板下载 //模板下载
handleDownManage(){ handleDownManage(){
// downloadFile('', fileName, { fileName: val.docRealName })
}, },
//合并条款 //合并条款
handleMergeManage(){ handleMergeManage(){
@@ -352,11 +360,32 @@
}, },
//批量删除 //批量删除
handleBatCancel(){ handleBatCancel(){
let params={
id:this.selecIds.join(',')
}
this.$confirm({
title: this.$t('ConfirmBatchDeletion'),
content: '',
onOk:
async () => {
deleteAction(``,params).then(res=> {
if(res.success){
this.$message.success(this.$t('OperationSuccessful'))
if(this.selecIds.length==this.tableData.length&&this.queryParams.pageNo!=1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
},
onCancel() {},
});
}, },
//编辑 //编辑
onEdit(val){ onEdit(val){
this.addVisible=true
}, },
//删除 //删除
onCancel(val){ onCancel(val){
@@ -365,13 +394,7 @@
//选择框 //选择框
onSelectChange(selectedRowKeys,rows) { onSelectChange(selectedRowKeys,rows) {
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
let ids=[] this.selecIds=selectedRowKeys
if(rows && rows.length>0){
rows.forEach(item=>{
ids.push(item.id)
})
}
this.selecIds=ids.join(',')
}, },
//点击页数 //点击页数
onChangePage(page,pageSize){ onChangePage(page,pageSize){
@@ -403,11 +426,20 @@
flex: 1; flex: 1;
.split-detail-search-header{ .split-detail-search-header{
margin-bottom: 20px; margin-bottom: 20px;
.table-page-search-submitButtons{
display: flex;
}
} }
.split-detail-table{ .split-detail-table{
.action-edit{ .action-edit{
margin-right: 20px; margin-right: 20px;
} }
.page{
text-align: right;
}
}
.split-item{
display: flex;
} }
} }
.page{ .page{
@@ -415,4 +447,12 @@
} }
} }
} }
</style>
<style lang="less">
.split-item{
.ant-form-item-label{
min-width: 100px;
}
}
</style> </style>
@@ -17,16 +17,38 @@
</div> </div>
</div> </div>
<div class="colloction-table"> <div class="colloction-table">
<tableData <a-table
:url="url" ref="table"
:flag="'1'" size="middle"
:OperationList="OperationList" rowKey="id"
showAction :columns="columns"
@titleClick="titleClick" :dataSource="tableData"
@onCancel="onCancel" :pagination="false"
@onSelectChange="onSelectChange" :loading="loading"
@detailClick="detailClick" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
></tableData> >
<span slot="serialNumber" slot-scope="text, record">
<a class="table-del" @click="onDetail(record)">{{record.serialNumber}}</a>
</span>
<span slot="serialtitle" slot-scope="text, record">
<a class="table-del" @click="onDetail(record)">{{record.title}}</a>
</span>
<span slot="action" slot-scope="text, record">
<a class="table-del" @click="onCancel(record)">{{$t('CancelCollection')}}</a>
</span>
</a-table>
<div class="page" v-if="tableData.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
show-quick-jumper
show-size-changer
:current="queryParams.pageNo"
:page-size.sync="queryParams.pageSize"
:total="total"
@change="onChangePage"
@showSizeChange="SizeChange"
/>
</div>
</div> </div>
<sub-area v-if="visible" :subVisible="visible" @visible="areaVisible"></sub-area> <sub-area v-if="visible" :subVisible="visible" @visible="areaVisible"></sub-area>
</a-card> </a-card>
@@ -56,29 +78,31 @@
//列表表头 //列表表头
columns: [ columns: [
{ {
title: '编号', title: this.$t('standard'),
dataIndex: 'serialNumber', dataIndex: 'serialNumber',
key: 'serialNumber', key: 'serialNumber',
align: "center", align: "center",
width: 100, width: 100,
scopedSlots: {customRender: 'serialNumber'},
ellipsis: true, ellipsis: true,
}, },
{ {
title: '标题', title: this.$t('title'),
align: "center", align: "center",
width: 100, width: 100,
dataIndex: 'title', dataIndex: 'title',
scopedSlots: {customRender: 'serialtitle'},
ellipsis: true, ellipsis: true,
}, },
{ {
title: '状态', title: this.$t('status'),
align: "center", align: "center",
width: 100, width: 100,
dataIndex: 'state', dataIndex: 'state',
ellipsis: true, ellipsis: true,
}, },
{ {
title: '订阅时间', title: this.$t('subscriptionTime'),
align: "center", align: "center",
width: 100, width: 100,
dataIndex: 'createTime', dataIndex: 'createTime',
@@ -94,7 +118,7 @@
], ],
tableData:[], //列表数据 tableData:[], //列表数据
visible:false, visible:false,
selecIds:'', selecIds:[],
loading:false, loading:false,
url:{ url:{
tableHeader: 'subscribe/onlCgformSubscribe/getHeader', //表格头部字段 tableHeader: 'subscribe/onlCgformSubscribe/getHeader', //表格头部字段
@@ -136,20 +160,21 @@
//批量取消收藏 //批量取消收藏
handleBatCancel(){ handleBatCancel(){
let params={ let params={
ids:this.selecIds ids:this.selecIds.join(',')
} }
if(this.selecIds){ if(this.selecIds&&this.selecIds.length>0){
this.$confirm({ this.$confirm({
title: '确认批量取消订阅?', title: this.$t('confirmBulkUnsubscribe'),
content: '', content: '',
onOk: onOk:
async () => { async () => {
deleteAction(`subscribe/onlCgformSubscribe/deleteBatch`,params).then(res=> { deleteAction(`subscribe/onlCgformSubscribe/deleteBatch`,params).then(res=> {
if(res.success){ if(res.success){
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset') if(this.selecIds.length==this.tableData.length&&this.queryParams.pageNo!==1){
// this.selectedRowKeys = [] this.queryParams.pageNo=this.queryParams.pageNo-1
// this.loadData() }
this.loadData()
}else{ }else{
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
@@ -158,24 +183,26 @@
onCancel() {}, onCancel() {},
}); });
}else{ }else{
this.$message.warning('请选择至少一条数据') this.$message.warning(this.$t('selectLeastOne'))
} }
}, },
//取消收藏 //取消订阅
onCancel(record){ onCancel(record){
let params={ let params={
id:record.id id:record.id
} }
this.$confirm({ this.$confirm({
title: '确认取消订阅?', title: this.$t('unsubscribeConfirm'),
content: '', content: '',
onOk: onOk:
async () => { async () => {
deleteAction(`subscribe/onlCgformSubscribe/delete`,params).then(res=> { deleteAction(`subscribe/onlCgformSubscribe/delete`,params).then(res=> {
if(res.success){ if(res.success){
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset') if(this.tableData.length==1&&this.queryParams.pageNo!==1){
// this.loadData() this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
}else{ }else{
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
@@ -211,7 +238,7 @@
// ids.push(item.id) // ids.push(item.id)
// }) // })
// } // }
this.selecIds=rows.join(',') this.selecIds=rows
}, },
//点击编号 //点击编号
numberClick(records){ numberClick(records){
@@ -224,7 +251,8 @@
areaVisible(val){ areaVisible(val){
this.visible=val this.visible=val
}, },
detailClick(item) { //跳转详情
onDetail(item) {
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
path: '/docManage/library/detail', path: '/docManage/library/detail',
query: item query: item
@@ -242,6 +270,7 @@
} }
.page{ .page{
margin-top: 20px; margin-top: 20px;
text-align: right;
} }
} }
@@ -76,13 +76,14 @@
getAction(`sys/category/getSysCategoryTree`,params).then(res=> { getAction(`sys/category/getSysCategoryTree`,params).then(res=> {
if(res.success){ if(res.success){
this.data=[...res.result] this.data=[...res.result]
this.treeData=this.addAttr(this.data) this.treeData=[...this.addAttr(this.data)]
// console.log('treeData',this.treeData) // console.log('treeData',this.treeData)
} }
}) })
}, },
onSearch(){ onSearch(){
this.loadData() // this.treeData=[]
// this.treeData=this.getSearch(this.data)
}, },
//获取用户的订阅 //获取用户的订阅
getSubscribtion(){ getSubscribtion(){
@@ -95,7 +96,7 @@
}) })
this.checkedKeys=[...ids] this.checkedKeys=[...ids]
// this.selectedKeys=this.checkedKeys // this.selectedKeys=this.checkedKeys
console.log('checkKeys',this.checkedKeys) // console.log('checkKeys',this.checkedKeys)
} }
}) })
}, },
@@ -103,9 +104,6 @@
if((Array.isArray(dataI)) && dataI.length>0){ if((Array.isArray(dataI)) && dataI.length>0){
dataI.forEach((item,index)=>{ dataI.forEach((item,index)=>{
this.$set(item,'key',item.id) this.$set(item,'key',item.id)
// if(item.title.indexOf(this.searchValue)!==-1){
// console.log('item.title',item.title)
// }
let arr = []; let arr = [];
this.addAttr(item.children,arr); this.addAttr(item.children,arr);
}); });
@@ -113,8 +111,24 @@
// console.log('dataI',dataI) // console.log('dataI',dataI)
return dataI return dataI
}, },
getSearch(dataI){
let dataSearch=[]
console.log('tree',this.treeData,this.data)
if((Array.isArray(dataI)) && dataI.length>0){
dataI.forEach((item,index)=>{
this.$set(item,'key',item.id)
if(item.title.indexOf(this.searchValue)>-1){
dataSearch.push(item)
}
let arr = [];
this.addAttr(item.children,arr);
});
}
console.log('dataSearch',dataSearch)
return dataSearch
},
afterVisibleChange(val) { afterVisibleChange(val) {
console.log('visible', val); // console.log('visible', val);
}, },
handleOk(e) { handleOk(e) {
this.confirmLoading = true; this.confirmLoading = true;
@@ -175,7 +189,7 @@
return null; return null;
}) })
.filter((item, i, self) => item && self.indexOf(item) === i); .filter((item, i, self) => item && self.indexOf(item) === i);
console.log('item',item)
Object.assign(this, { Object.assign(this, {
expandedKeys, expandedKeys,
searchValue: value, searchValue: value,
@@ -36,8 +36,6 @@
<a-col :span="24"> <a-col :span="24">
<a-form-model-item :label="$t('AttributeType')" prop="fieldShowType" > <a-form-model-item :label="$t('AttributeType')" prop="fieldShowType" >
<j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="field_show_type" :placeholder="$t('PleaseSelectAttributeType')" /> <j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="field_show_type" :placeholder="$t('PleaseSelectAttributeType')" />
<!-- <j-dict-select-tag type="list" v-if="type=='input'" v-model="form.fieldShowType" dictCode="sys_dict_item,item_text,item_value,dict_id='1493098515761917954' and (item_text = '输入框(字符串)' or item_text = '输入框(数字)' or item_text = '单日期选择' or item_text = '多日期选择' or item_text = '文件' or item_text = '文本框' or item_text='标准选择' or item_text = '输入框(链接)' or item_text = '人员选择') " placeholder="请选择属性类型" />-->
<!-- <j-dict-select-tag type="list" v-if="type=='select'" v-model="form.fieldShowType" dictCode="sys_dict_item,item_text,item_value,dict_id='1493098515761917954' and (item_text = '单选下拉框' or item_text = '多选下拉框' or item_text = '树形结构')" placeholder="请选择属性类型" />-->
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24" v-if="isTagContent"> <a-col :span="24" v-if="isTagContent">
@@ -65,8 +63,6 @@
<j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn" :placeholder="$t('selectWhetherRequired')" /> <j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn" :placeholder="$t('selectWhetherRequired')" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<p class="tag-info">{{$t('DocumentLibraryModuleDisplay')}}</p> <p class="tag-info">{{$t('DocumentLibraryModuleDisplay')}}</p>
<a-divider dashed /> <a-divider dashed />
<a-col :span="24"> <a-col :span="24">
@@ -85,7 +81,7 @@
<!-- <j-dict-select-tag type="list" v-model="form.showArea" dictCode="" placeholder="请选择展示区域" />--> <!-- <j-dict-select-tag type="list" v-model="form.showArea" dictCode="" placeholder="请选择展示区域" />-->
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24" v-if="isSearch">
<a-form-model-item :label="$t('Search')" prop="isQuery"> <a-form-model-item :label="$t('Search')" prop="isQuery">
<j-dict-select-tag type="list" v-model="form.isQuery" dictCode="yn" :placeholder="$t('SelectWhetherToSearch')" /> <j-dict-select-tag type="list" v-model="form.isQuery" dictCode="yn" :placeholder="$t('SelectWhetherToSearch')" />
</a-form-model-item> </a-form-model-item>
@@ -230,6 +226,8 @@
contentOption1:[], contentOption1:[],
contentOption2:[], contentOption2:[],
isTagContent:false, isTagContent:false,
isSearch:true,
} }
}, },
watch:{ watch:{
@@ -241,8 +239,11 @@
}else if(val==3||val==4){ }else if(val==3||val==4){
this.contentOption=[...this.contentOption1] this.contentOption=[...this.contentOption1]
this.isTagContent=true this.isTagContent=true
}else if(val==7) {
this.isSearch=false
}else{ }else{
this.isTagContent=false this.isTagContent=false
this.isSearch=true
} }
}, },
contentOption(){ contentOption(){
@@ -196,7 +196,7 @@
}) })
}, },
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {
console.log('selectedRowKeys changed: ', selectedRowKeys); // console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
}, },
handleTableChange(){ handleTableChange(){
@@ -267,7 +267,9 @@
deleteAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => { deleteAction(`tag/onlCgformArea/delete`, { id: val }).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')); this.$message.success(this.$t('OperationSuccessful'));
this.queryParams.pageNo=1 if(this.areaTable.length==1&&this.queryParams.pageNo!=1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData() this.loadData()
}else{ }else{
this.$message.warning(this.$t('operationFailed')); this.$message.warning(this.$t('operationFailed'));
@@ -17,13 +17,13 @@
<a-icon type="plus" /> <a-icon type="plus" />
{{$t('add')}} {{$t('add')}}
</div> </div>
<div class="operator-text" v-if="dictVal=='tree'" @click="batDelete"> <div class="operator-text" @click="batDelete">
<a-icon type="delete" /> <a-icon type="delete" />
{{$t('BatchDelete')}} {{$t('BatchDelete')}}
</div> </div>
</div> </div>
<div class="dic-list-table"> <div class="dic-list-table">
<list-table v-if="dictVal=='list'&&dataFlag" :tableData="tableData" @editDict="editDict" @deleteDict="deleteDict" :total="total" @ok="ok"></list-table> <list-table v-if="dictVal=='list'&&dataFlag" :tableData="tableData" @editDict="editDict" @deleteDict="deleteDict" :total="total" @selected="selectedKeys" @ok="ok"></list-table>
<tree-table v-if="dictVal=='tree'&&dataFlag" :tabletreeData="tabletreeData" :record="record" @editDict="editTreeDict" @selectedKeys="selectedKeys" @ok="ok" :total="total"></tree-table> <tree-table v-if="dictVal=='tree'&&dataFlag" :tabletreeData="tabletreeData" :record="record" @editDict="editTreeDict" @selectedKeys="selectedKeys" @ok="ok" :total="total"></tree-table>
</div> </div>
<a-modal class="dict-module" v-model="newVisible" :title="title" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="newVisible"> <a-modal class="dict-module" v-model="newVisible" :title="title" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="newVisible">
@@ -94,6 +94,7 @@
}, },
data(){ data(){
return{ return{
selected:[],
title:this.$t('add'), title:this.$t('add'),
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 16 }, wrapperCol: { span: 16 },
@@ -256,64 +257,68 @@
}, },
//保存 //保存
hideModal(){ hideModal(){
if(this.dictVal=='list') { this.$refs.ruleForm.validate(valid => {
let params = { if (valid) {
...this.form, if(this.dictVal=='list') {
dictId: this.record.id let params = {
} ...this.form,
if (this.isEdit) { dictId: this.record.id
putAction(`sys/dictItem/edit`, params).then(res => { }
if (res.success) { if (this.isEdit) {
this.$message.success(this.$t('OperationSuccessful')) putAction(`sys/dictItem/edit`, params).then(res => {
this.form={} if (res.success) {
this.loadData() this.$message.success(this.$t('OperationSuccessful'))
this.newVisible = false this.form = {}
this.loadData()
this.newVisible = false
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
} else { } else {
this.$message.warning(this.$t('operationFailed')) postAction(`sys/dictItem/add`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.form = {}
this.loadData()
this.newVisible = false
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
} }
}) } else if (this.dictVal == 'tree') {
} else { let params = {
postAction(`sys/dictItem/add`, params).then(res => { ...this.form,
if (res.success) { sysDictId: this.record.id
this.$message.success(this.$t('OperationSuccessful')) }
this.form={} if (this.isEdit) {
this.loadData() putAction(`sys/category/edit`, params).then(res => {
this.newVisible = false if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.form = {}
this.loadData()
this.newVisible = false
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
} else { } else {
this.$message.warning(this.$t('operationFailed')) //新增
postAction(`sys/category/add`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.form = {}
this.loadData()
this.newVisible = false
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
} }
}) }
} }
}else if(this.dictVal=='tree'){ })
let params = {
...this.form,
sysDictId: this.record.id
}
if (this.isEdit) {
putAction(`sys/category/edit`,params).then(res=>{
if(res.success){
this.$message.success(this.$t('OperationSuccessful'))
this.form={}
this.loadData()
this.newVisible = false
}else {
this.$message.warning(this.$t('operationFailed'))
}
})
}else{
//新增
postAction(`sys/category/add`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.form={}
this.loadData()
this.newVisible = false
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
}
}
}, },
//取消 //取消
cancelModel(){ cancelModel(){
@@ -345,6 +350,7 @@
let params={ let params={
id:val id:val
} }
this.$confirm({ this.$confirm({
title: this.$t('ConfirmDelete'), title: this.$t('ConfirmDelete'),
content: '', content: '',
@@ -353,7 +359,9 @@
deleteAction(`sys/dictItem/delete`, params).then(res => { deleteAction(`sys/dictItem/delete`, params).then(res => {
if(res.success) { if(res.success) {
this.$message.success(this.$t('OperationSuccessful')); this.$message.success(this.$t('OperationSuccessful'));
this.queryParams.pageNo=1 if(this.tableData&&this.tableData.length==1&&this.queryParams.pageNo!=1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData() this.loadData()
}else{ }else{
this.$message.warning(this.$t('operationFailed')); this.$message.warning(this.$t('operationFailed'));
@@ -380,15 +388,30 @@
content: '', content: '',
onOk: onOk:
async () => { async () => {
deleteAction(`sys/category/deleteBatch`, params).then(res => { if(this.dictVal=='list'){
if(res.success){ deleteAction(`sys/dictItem/logicDeleteBatch`, params).then(res => {
this.queryParams.pageNo=1 if(res.success){
this.loadData() this.$message.success(this.$t('OperationSuccessful'))
this.$message.success(this.$t('OperationSuccessful')) if(this.selectedIds.length==this.tableData.length&&this.queryParams.pageNo!=1){
}else{ this.queryParams.pageNo=this.queryParams.pageNo-1
this.$message.warning(this.$t('operationFailed')) }
} this.loadData()
})
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
}else if(this.dictVal=='tree'){
deleteAction(`sys/category/deleteBatch`, params).then(res => {
if(res.success){
this.queryParams.pageNo=1
this.loadData()
this.$message.success(this.$t('OperationSuccessful'))
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
}
} }
}) })
}else{ }else{
@@ -1,6 +1,6 @@
<template> <template>
<div class="list-table"> <div class="list-table">
<a-table :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" class="tag-con-table"> <a-table :data-source="tableData" :columns="columns" rowKey="id" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" class="tag-con-table">
<template slot="action" slot-scope="text, record"> <template slot="action" slot-scope="text, record">
<a class="action-edit" href="javascript:;" @click="actionEdit(record)">{{$t('edit')}}</a> <a class="action-edit" href="javascript:;" @click="actionEdit(record)">{{$t('edit')}}</a>
@@ -27,7 +27,7 @@
name: 'listTable', name: 'listTable',
props:{ props:{
tableData:Array, tableData:Array,
total:Number total:Number,
}, },
data(){ data(){
return{ return{
@@ -96,9 +96,10 @@
this.$emit('deleteDict',val.id,true) this.$emit('deleteDict',val.id,true)
}, },
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {
console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
this.$emit('selected',this.selectedRowKeys)
}, },
//点击页数 //点击页数
onChangePage(page,pageSize){ onChangePage(page,pageSize){
this.queryParams.pageNo = page this.queryParams.pageNo = page
@@ -63,6 +63,7 @@
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {
// console.log('selectedRowKeys changed: ', selectedRowKeys); // console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
this.$emit('selecteds',selectedRowKeys)
}, },
handleTableChange(){ handleTableChange(){
@@ -22,6 +22,10 @@
<a-icon type="plus" /> <a-icon type="plus" />
{{$t('add')}} {{$t('add')}}
</div> </div>
<div class="operator-text" @click="batDelete">
<a-icon type="delete" />
{{$t('BatchDelete')}}
</div>
</div> </div>
<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-modal class="show-content" v-model="contentVisible" :visible="contentVisible" :title="title" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="contentVisible">
<a-form-model <a-form-model
@@ -51,7 +55,7 @@
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<a-table :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" class="tag-con-table"> <a-table :data-source="tableData" rowKey="id" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" class="tag-con-table">
<template slot="action" slot-scope="text, record"> <template slot="action" slot-scope="text, record">
<a class="action-dict" @click="handleDicPop(record)">{{$t('DictionaryConfiguration')}}</a> <a class="action-dict" @click="handleDicPop(record)">{{$t('DictionaryConfiguration')}}</a>
@@ -105,6 +109,7 @@
pageNo:1, pageNo:1,
pageSize:10 pageSize:10
}, },
ids:[],
selectedRowKeys: [], selectedRowKeys: [],
contentVisible:false, contentVisible:false,
tableData:[], tableData:[],
@@ -259,6 +264,9 @@
deleteAction(`sys/dict/logicDelete`, param).then(res => { deleteAction(`sys/dict/logicDelete`, param).then(res => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
if(this.tableData&&this.tableData.length==1&&this.queryParams.pageNo!=1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData() this.loadData()
}else{ }else{
this.$message.warning(this.$t('operationFailed')); this.$message.warning(this.$t('operationFailed'));
@@ -270,6 +278,41 @@
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {
// console.log('selectedRowKeys changed: ', selectedRowKeys); // console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
this.ids = this.selectedRowKeys;
},
//批量删除
batDelete(){
let params={
ids:this.ids.join(',')
}
if(this.ids&&this.ids.length>0){
this.$confirm({
title: this.$t('ConfirmDelete'),
content: '',
onOk:
async () => {
deleteAction(`sys/dict/logicDeleteBatch`, params).then(res => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if(this.ids.length==this.tableData.length&&this.queryParams.pageNo!=1){
this.queryParams.pageNo=this.queryParams.pageNo-1
}
this.loadData()
postAction(`online/cgform/api/doDbSynch/48308196e7b04761b533dc31bc899707/normal
`,{}).then(res=>{
})
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
}
else{
this.$message.warning(this.$t('selectLeastOne'))
}
}, },
//编辑 //编辑
actionEdit(val){ actionEdit(val){
@@ -33,6 +33,10 @@
<a-icon type="rocket" :rotate="45" /> <a-icon type="rocket" :rotate="45" />
{{$t('ExhibitionAreaManagement')}} {{$t('ExhibitionAreaManagement')}}
</div> </div>
<div class="operator-text" @click="batDelete">
<a-icon type="delete" />
{{$t('BatchDelete')}}
</div>
</div> </div>
<a-drawer class="show-drawer" :title="titleTag" placement="right" width="1000px" @close="close" :visible="drawerVisible" :after-visible-change="afterVisibleChange" > <a-drawer class="show-drawer" :title="titleTag" placement="right" width="1000px" @close="close" :visible="drawerVisible" :after-visible-change="afterVisibleChange" >
<new-drawer v-if="drawerVisible&&editFlag" :drawerVisible="drawerVisible" :isTagContent="isTagContent" :editData="editData" :editId="editId" :submitEdit="submitEdit" @closeTag="closeTag" ></new-drawer> <new-drawer v-if="drawerVisible&&editFlag" :drawerVisible="drawerVisible" :isTagContent="isTagContent" :editData="editData" :editId="editId" :submitEdit="submitEdit" @closeTag="closeTag" ></new-drawer>
@@ -44,7 +48,7 @@
<a-spin :spinning="spinning" tip="Loading..."> <a-spin :spinning="spinning" tip="Loading...">
<a-tabs default-active-key="1" @change="callbackTab"> <a-tabs default-active-key="1" @change="callbackTab">
<a-tab-pane key="1" :tab="$t('DocumentLibrary')"> <a-tab-pane key="1" :tab="$t('DocumentLibrary')">
<tabTable v-if="spinning==false" :tableData="tableData" :columns="taglabColumns" :parm="queryParam" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable> <tabTable v-if="spinning==false" :tableData="tableData" :columns="taglabColumns" :parm="queryParam" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" @selecteds="selecteds" :total="total"></tabTable>
</a-tab-pane> </a-tab-pane>
<!-- <a-tab-pane key="2" :tab="$t('DocumentSplitting')" force-render>--> <!-- <a-tab-pane key="2" :tab="$t('DocumentSplitting')" force-render>-->
<!-- <tabTable :tableData="tableData" :columns="taglabColumns" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable>--> <!-- <tabTable :tableData="tableData" :columns="taglabColumns" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable>-->
@@ -138,7 +142,8 @@
submitEdit:'add', submitEdit:'add',
key:1, key:1,
total:0, total:0,
type:'input' type:'input',
ids:[]
} }
}, },
mounted() { mounted() {
@@ -282,10 +287,15 @@
if (res.success) { if (res.success) {
if (this.key == 1) { if (this.key == 1) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.queryParam.pageNo=1 if(this.tableData&&this.tableData.length==1&&this.queryParam.pageNo!=1){
this.queryParam.pageNo=this.queryParam.pageNo-1
}
this.loadData(1) this.loadData(1)
} else if (this.key == 2) { } else if (this.key == 2) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
if(this.tableData&&this.tableData.length==1&&this.queryParam.pageNo!=1){
this.queryParam.pageNo=this.queryParam.pageNo-1
}
this.loadData(0) this.loadData(0)
} }
postAction(`online/cgform/api/doDbSynch/48308196e7b04761b533dc31bc899707/normal postAction(`online/cgform/api/doDbSynch/48308196e7b04761b533dc31bc899707/normal
@@ -298,6 +308,50 @@
} }
}) })
}, },
selecteds(val){
this.ids=val
},
//批量删除
batDelete(val){
let params={
ids:this.ids.join(',')
}
if(this.ids){
this.$confirm({
title: this.$t('ConfirmDelete'),
content: '',
onOk:
async () => {
deleteAction(`tag/onlCgformTag/deleteBatch`, params).then(res => {
if (res.success) {
if (this.key == 1) {
this.$message.success(this.$t('OperationSuccessful'))
if(this.ids&&this.ids.length==this.tableData.length){
this.queryParam.pageNo=this.queryParam.pageNo-1
}
this.loadData(1)
} else if (this.key == 2) {
this.$message.success(this.$t('OperationSuccessful'))
if(this.ids&&this.ids.length==this.tableData.length){
this.queryParam.pageNo=this.queryParam.pageNo-1
}
this.loadData(0)
}
postAction(`online/cgform/api/doDbSynch/48308196e7b04761b533dc31bc899707/normal
`,{}).then(res=>{
})
}else{
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
}
else{
this.$message.warning(this.$t('selectLeastOne'))
}
},
//新增关闭 //新增关闭
closeTag(val){ closeTag(val){
this.drawerVisible=val this.drawerVisible=val