Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
@@ -1179,4 +1179,10 @@ update onl_cgform_field set is_query = '1', is_read_only = '1' where id = '09fa6
|
|||||||
-- 配置表,增加问题知识库预览图片配置 2022-09-27 已同步生产环境
|
-- 配置表,增加问题知识库预览图片配置 2022-09-27 已同步生产环境
|
||||||
INSERT INTO `laws_weilai`.`sys_config` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `config`, `config_name`) VALUES ('4', 'admin', '2022-09-28 14:35:30', NULL, NULL, 'A01', 'http://grp.nioint.com/', 'domianWebImgURL');
|
INSERT INTO `laws_weilai`.`sys_config` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `config`, `config_name`) VALUES ('4', 'admin', '2022-09-28 14:35:30', NULL, NULL, 'A01', 'http://grp.nioint.com/', 'domianWebImgURL');
|
||||||
|
|
||||||
|
--问题知识库,增加字段 发布状态 2022-10-13 未同步生产环境
|
||||||
|
ALTER TABLE `laws_weilai`.`problem_knowledge_base`
|
||||||
|
ADD COLUMN `release_status` varchar(50) NULL COMMENT '发布状态' AFTER `release_time`;
|
||||||
|
|
||||||
|
--处理问题知识库数据,发布人,发布时间,发布状态数据sql 2022-10-13 未同步生产环境
|
||||||
|
update problem_knowledge_base pkd set pkd.release_status = 'Have released',pkd.release_time = pkd.create_time,pkd.release_user_id = (select su.id from sys_user su where su.username = pkd.create_by)
|
||||||
|
|
||||||
|
|||||||
+62
@@ -0,0 +1,62 @@
|
|||||||
|
package com.jero.modules.system.enums;
|
||||||
|
|
||||||
|
public enum RoleEnum {
|
||||||
|
ADMIN_ID("R&H Manager","R&H Manager","manager","1534020391015444481",2),
|
||||||
|
MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3),
|
||||||
|
COUNTRU_CARD_MANAGE("countryCard管理员","countryCardManage","countryCardManage","1564916346120916993",4),
|
||||||
|
;
|
||||||
|
|
||||||
|
String name;
|
||||||
|
String enName;
|
||||||
|
String value;
|
||||||
|
String id;
|
||||||
|
Integer order;
|
||||||
|
|
||||||
|
RoleEnum(String name, String enName, String value, String id, Integer order) {
|
||||||
|
this.name = name;
|
||||||
|
this.enName = enName;
|
||||||
|
this.value = value;
|
||||||
|
this.id = id;
|
||||||
|
this.order = order;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnName() {
|
||||||
|
return enName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnName(String enName) {
|
||||||
|
this.enName = enName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrder() {
|
||||||
|
return order;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrder(Integer order) {
|
||||||
|
this.order = order;
|
||||||
|
}
|
||||||
|
}
|
||||||
+6
@@ -270,4 +270,10 @@ public interface ISysUserService extends IService<SysUser> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SysRole> queryUserRoleListInfoByUserId(String userId);
|
List<SysRole> queryUserRoleListInfoByUserId(String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证当前登录用户是否是超级管理员。
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean isAdministrator();
|
||||||
}
|
}
|
||||||
|
|||||||
+28
@@ -17,6 +17,7 @@ import com.jero.common.util.oConvertUtils;
|
|||||||
import com.jero.modules.base.service.BaseCommonService;
|
import com.jero.modules.base.service.BaseCommonService;
|
||||||
import com.jero.modules.system.entity.*;
|
import com.jero.modules.system.entity.*;
|
||||||
import com.jero.modules.system.enums.PPSyncEnum;
|
import com.jero.modules.system.enums.PPSyncEnum;
|
||||||
|
import com.jero.modules.system.enums.RoleEnum;
|
||||||
import com.jero.modules.system.mapper.*;
|
import com.jero.modules.system.mapper.*;
|
||||||
import com.jero.modules.system.model.SysUserSysDepartModel;
|
import com.jero.modules.system.model.SysUserSysDepartModel;
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
@@ -24,6 +25,7 @@ import com.jero.modules.system.vo.SysUserDepVo;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.cache.annotation.CacheEvict;
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -586,4 +588,30 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证当前登录用户是否是超级管理员
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean isAdministrator() {
|
||||||
|
boolean result = false;
|
||||||
|
RoleEnum administrator = RoleEnum.MANAGER_ID;
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
List<SysUserRole> userRoleList = this.sysUserRoleMapper.selectList(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, currentUser.getId())); // 查询用户所有角色
|
||||||
|
if(CollectionUtils.isNotEmpty(userRoleList)){
|
||||||
|
List<SysUserRole> userRoles = userRoleList.stream().filter(userRole -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if(StringUtils.equals(userRole.getRoleId(),administrator.getId())){
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if(CollectionUtils.isNotEmpty(userRoles)){
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-1
@@ -1,6 +1,7 @@
|
|||||||
package com.jero.modules.problemKnowledgeBase.entity;
|
package com.jero.modules.problemKnowledgeBase.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
@@ -156,7 +157,7 @@ public class ProblemKnowledgeBaseEO implements Serializable {
|
|||||||
/**发布日期*/
|
/**发布日期*/
|
||||||
@Excel(name = "发布日期", width = 15)
|
@Excel(name = "发布日期", width = 15)
|
||||||
@ApiModelProperty(value = "发布日期")
|
@ApiModelProperty(value = "发布日期")
|
||||||
private java.lang.String releaseTime;
|
private Date releaseTime;
|
||||||
|
|
||||||
/**点赞总数量*/
|
/**点赞总数量*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@@ -195,4 +196,9 @@ public class ProblemKnowledgeBaseEO implements Serializable {
|
|||||||
/**附件展示数组*/
|
/**附件展示数组*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<OSSFile> accessoryFileNameList;
|
private List<OSSFile> accessoryFileNameList;
|
||||||
|
|
||||||
|
/**发布状态*/
|
||||||
|
@Excel(name = "发布状态", width = 15)
|
||||||
|
@ApiModelProperty(value = "发布状态")
|
||||||
|
private String releaseStatus;
|
||||||
}
|
}
|
||||||
|
|||||||
+36
-19
@@ -24,6 +24,7 @@ import com.jero.modules.oss.service.IOSSFileService;
|
|||||||
import com.jero.modules.problemKnowledgeBase.entity.*;
|
import com.jero.modules.problemKnowledgeBase.entity.*;
|
||||||
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
|
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
|
||||||
import com.jero.modules.problemKnowledgeBase.enums.PraiseStatusEnum;
|
import com.jero.modules.problemKnowledgeBase.enums.PraiseStatusEnum;
|
||||||
|
import com.jero.modules.problemKnowledgeBase.enums.ReleaseStatusEnum;
|
||||||
import com.jero.modules.problemKnowledgeBase.enums.ShowPermissionsEnum;
|
import com.jero.modules.problemKnowledgeBase.enums.ShowPermissionsEnum;
|
||||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseEOMapper;
|
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseEOMapper;
|
||||||
import com.jero.modules.problemKnowledgeBase.service.*;
|
import com.jero.modules.problemKnowledgeBase.service.*;
|
||||||
@@ -114,17 +115,19 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
problemKnowledgeBaseEO.setCreateTime(now);
|
problemKnowledgeBaseEO.setCreateTime(now);
|
||||||
problemKnowledgeBaseEO.setUpdateTime(now);
|
problemKnowledgeBaseEO.setUpdateTime(now);
|
||||||
save(problemKnowledgeBaseEO);
|
|
||||||
|
|
||||||
//如果该条问题知识库的展示权限为私密,则创建权限表数据
|
//如果该条问题知识库的展示权限为私密,则创建权限表数据
|
||||||
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
|
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
|
||||||
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
||||||
}
|
}
|
||||||
/*else {
|
//如果是已发布,将数据更新到es中。
|
||||||
//如果展示权限是公开,则把该数据插入到搜索中心中。
|
if(StringUtils.equals(problemKnowledgeBaseEO.getReleaseStatus(), ReleaseStatusEnum.HAVE_RELEASED.getValue())){
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
problemKnowledgeBaseEO.setReleaseUserId(currentUser.getId());
|
||||||
|
problemKnowledgeBaseEO.setReleaseTime(now);
|
||||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||||
}*/
|
}
|
||||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
save(problemKnowledgeBaseEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -435,15 +438,23 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
public void editById(ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
public void editById(ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
problemKnowledgeBaseEO.setUpdateTime(now);
|
problemKnowledgeBaseEO.setUpdateTime(now);
|
||||||
saveOrUpdate(problemKnowledgeBaseEO);
|
|
||||||
|
|
||||||
//如果该条问题知识库的展示权限为私密,则创建权限表数据
|
//如果该条问题知识库的展示权限为私密,则创建权限表数据
|
||||||
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
|
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
|
||||||
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
||||||
//this.deleteElasticsearchData(problemKnowledgeBaseEO.getId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
//如果是已发布,将数据更新到es中。
|
||||||
|
if(StringUtils.equals(problemKnowledgeBaseEO.getReleaseStatus(), ReleaseStatusEnum.HAVE_RELEASED.getValue())){
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
problemKnowledgeBaseEO.setReleaseUserId(currentUser.getId());
|
||||||
|
problemKnowledgeBaseEO.setReleaseTime(now);
|
||||||
|
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||||
|
}else if(StringUtils.equals(problemKnowledgeBaseEO.getReleaseStatus(), ReleaseStatusEnum.DRAFT.getValue())){
|
||||||
|
//如果是草稿,将es中的数据删掉。
|
||||||
|
this.deleteElasticsearchData(problemKnowledgeBaseEO.getId());
|
||||||
|
}
|
||||||
|
saveOrUpdate(problemKnowledgeBaseEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -750,26 +761,32 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
@Override
|
@Override
|
||||||
public void createQueryPermission(QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper,ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
public void createQueryPermission(QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper,ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||||
/**
|
/**
|
||||||
* 查询权限
|
* 2022-10-13增加权限,超级管理员可以看到所有的问题知识库数据。
|
||||||
* 公开:所有人都可以看到。
|
|
||||||
* 私密:只有配置了的权限用户可以看到。
|
|
||||||
*/
|
*/
|
||||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
boolean administrator = this.sysUserService.isAdministrator();
|
||||||
QueryWrapper<ProblemKnowledgeBaseUserEO> userPermissionQueryWrapper = new QueryWrapper<>();
|
if(!administrator){
|
||||||
userPermissionQueryWrapper.lambda().eq(ProblemKnowledgeBaseUserEO::getUserId,currentUser.getId());
|
/**
|
||||||
List<ProblemKnowledgeBaseUserEO> problemKnowledgeBaseUserEOList = problemKnowledgeBaseUserEOService.list(userPermissionQueryWrapper);
|
* 查询权限
|
||||||
|
* 公开:所有人都可以看到。
|
||||||
|
* 私密:只有配置了的权限用户可以看到。
|
||||||
|
*/
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
QueryWrapper<ProblemKnowledgeBaseUserEO> userPermissionQueryWrapper = new QueryWrapper<>();
|
||||||
|
userPermissionQueryWrapper.lambda().eq(ProblemKnowledgeBaseUserEO::getUserId,currentUser.getId());
|
||||||
|
List<ProblemKnowledgeBaseUserEO> problemKnowledgeBaseUserEOList = problemKnowledgeBaseUserEOService.list(userPermissionQueryWrapper);
|
||||||
|
|
||||||
List<String> problemKnowledgeBaseIdList = problemKnowledgeBaseUserEOList.stream().map(ProblemKnowledgeBaseUserEO::getProblemKnowledgeBaseId).distinct().collect(Collectors.toList());
|
List<String> problemKnowledgeBaseIdList = problemKnowledgeBaseUserEOList.stream().map(ProblemKnowledgeBaseUserEO::getProblemKnowledgeBaseId).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
queryWrapper.lambda().and(query -> {
|
queryWrapper.lambda().and(query -> {
|
||||||
query.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.OPEN.getValue());
|
query.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.OPEN.getValue());
|
||||||
if(CollectionUtils.isNotEmpty(problemKnowledgeBaseIdList)){
|
if(CollectionUtils.isNotEmpty(problemKnowledgeBaseIdList)){
|
||||||
query.or(o -> {
|
query.or(o -> {
|
||||||
o.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.PRIVACY.getValue());
|
o.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.PRIVACY.getValue());
|
||||||
o.in(ProblemKnowledgeBaseEO::getId,problemKnowledgeBaseIdList);
|
o.in(ProblemKnowledgeBaseEO::getId,problemKnowledgeBaseIdList);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
String searchStr = problemKnowledgeBaseEO.getSearchStr();
|
String searchStr = problemKnowledgeBaseEO.getSearchStr();
|
||||||
if(StringUtils.isNotEmpty(searchStr)){
|
if(StringUtils.isNotEmpty(searchStr)){
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ module.exports = {
|
|||||||
entertitle:'Please enter Title',
|
entertitle:'Please enter Title',
|
||||||
OperationType: 'Operation Type',
|
OperationType: 'Operation Type',
|
||||||
selectOperationType: 'Please select Operation type',
|
selectOperationType: 'Please select Operation type',
|
||||||
selectProblemClassification:'Please select Classification',
|
selectProblemClassification:'Please select Problem Classification',
|
||||||
selectMarket:'Please select Market',
|
selectMarket:'Please select Market',
|
||||||
RequestMethod: 'Request Method',
|
RequestMethod: 'Request Method',
|
||||||
RequestParameters: 'Request Parameters',
|
RequestParameters: 'Request Parameters',
|
||||||
|
|||||||
+10
-2
@@ -179,7 +179,10 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
<div class="submit-button">
|
<div class="submit-button">
|
||||||
<a-button class="box-button" type="primary" @click="submit">{{$t('submit')}}</a-button>
|
<a-button class="box-button" type="primary" @click="submit('Draft')">
|
||||||
|
{{$t('tempSave')}}
|
||||||
|
</a-button>
|
||||||
|
<a-button class="box-button" type="primary" @click="submit('Have released')">{{$t('release')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -601,7 +604,10 @@
|
|||||||
this.formInline[this.uploadName] = attIdList.join(',')
|
this.formInline[this.uploadName] = attIdList.join(',')
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
},
|
},
|
||||||
submit() {
|
tempSaveClick(){
|
||||||
|
|
||||||
|
},
|
||||||
|
submit(releaseStatus) {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
@@ -633,6 +639,7 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
formInline.releaseStatus = releaseStatus
|
||||||
Action(url, formInline).then((res) => {
|
Action(url, formInline).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
@@ -784,6 +791,7 @@
|
|||||||
.box-button {
|
.box-button {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-button-index {
|
.box-button-index {
|
||||||
|
|||||||
+2
-1
@@ -344,7 +344,8 @@
|
|||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
searchStr: this.searchStr,
|
searchStr: this.searchStr,
|
||||||
problemTypes: selectedTags.join(',')
|
problemTypes: selectedTags.join(','),
|
||||||
|
releaseStatus:'Have released'
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.getInfoList, query).then((res) => {
|
getAction(this.url.getInfoList, query).then((res) => {
|
||||||
|
|||||||
+62
-18
@@ -12,16 +12,40 @@
|
|||||||
<div style="padding-top: 68px;background: #fff">
|
<div style="padding-top: 68px;background: #fff">
|
||||||
<div class="detail-content" style="padding: 30px">
|
<div class="detail-content" style="padding: 30px">
|
||||||
<div class="search-detail-wrap">
|
<div class="search-detail-wrap">
|
||||||
<a-form layout="inline" @keyup.enter.native="onSearch">
|
<a-form layout="inline" style="width: 1200px;margin: 0 auto" @keyup.enter.native="onSearch">
|
||||||
<div class="box-title-text">
|
<a-row :gutter="24">
|
||||||
<div class="title-text" :title="$t('searchContent')">
|
<a-col :span="10">
|
||||||
<span>{{$t('searchContent')}}</span>
|
<div class="box-title-text">
|
||||||
|
<div class="title-text" :title="$t('searchContent')">
|
||||||
|
<span>{{$t('searchContent')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('searchContent')"
|
||||||
|
v-model="queryParam.searchStr"></a-input>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="10">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text" :title="$t('releaseStatus')">
|
||||||
|
<span>{{$t('releaseStatus')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-select :placeholder="$t('PleaseSelect')+$t('releaseStatus')"
|
||||||
|
v-model="queryParam.releaseStatus">
|
||||||
|
<a-select-option v-for="(item, key) in releaseStatusList"
|
||||||
|
:key="key"
|
||||||
|
:value="item.value">
|
||||||
|
<span class="selectText" :title=" item.name ">
|
||||||
|
{{ item.name}}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<a-button class="box-button" type="primary" @click="onSearch">{{$t('query')}}</a-button>
|
||||||
|
<a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('searchContent')"
|
</a-row>
|
||||||
v-model="searchStr"></a-input>
|
|
||||||
<a-button class="box-button" type="primary" @click="onSearch">{{$t('query')}}</a-button>
|
|
||||||
<a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}</a-button>
|
|
||||||
</div>
|
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="conList.length > 0" style="height: calc(100vh - 240px);overflow:auto;">
|
<div v-if="conList.length > 0" style="height: calc(100vh - 240px);overflow:auto;">
|
||||||
@@ -41,6 +65,9 @@
|
|||||||
<div class="text-content">
|
<div class="text-content">
|
||||||
{{item.contentOne}}
|
{{item.contentOne}}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-text-right-text-One">
|
||||||
|
{{item.releaseStatus == 'Draft'?$t('draft'):$t('HaveReleased')}}
|
||||||
|
</div>
|
||||||
<div class="text-text-right-text">
|
<div class="text-text-right-text">
|
||||||
<a style="margin-right: 10px" @click="edit(item)"
|
<a style="margin-right: 10px" @click="edit(item)"
|
||||||
v-if="userInfoQuery.username == item.createBy || administrators">{{$t('edit')}}</a>
|
v-if="userInfoQuery.username == item.createBy || administrators">{{$t('edit')}}</a>
|
||||||
@@ -85,7 +112,17 @@
|
|||||||
conList: [],
|
conList: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
searchStr: '',
|
queryParam: {},
|
||||||
|
releaseStatusList: [
|
||||||
|
{
|
||||||
|
name: this.$t('draft'),
|
||||||
|
value: 'Draft'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: this.$t('HaveReleased'),
|
||||||
|
value: 'Have released'
|
||||||
|
}
|
||||||
|
],
|
||||||
loading: false,
|
loading: false,
|
||||||
administrators: false,
|
administrators: false,
|
||||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||||
@@ -126,7 +163,7 @@
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
ResetSearch() {
|
ResetSearch() {
|
||||||
this.searchStr = ''
|
this.queryParam = {}
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
@@ -140,7 +177,7 @@
|
|||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
createBy: this.userInfo().username,
|
createBy: this.userInfo().username,
|
||||||
searchStr: this.searchStr
|
...this.queryParam
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.getInfoList, query).then((res) => {
|
getAction(this.url.getInfoList, query).then((res) => {
|
||||||
@@ -285,11 +322,21 @@
|
|||||||
|
|
||||||
.text-text-right {
|
.text-text-right {
|
||||||
padding: 19px 19px;
|
padding: 19px 19px;
|
||||||
width: calc(100% - 180px);
|
width: calc(100% - 300px);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
/*margin-left: 38px;*/
|
/*margin-left: 38px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-text-right-text-One {
|
||||||
|
width: 120px;
|
||||||
|
height: 100%;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
right: 180px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate-Y(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
.text-text-right-text {
|
.text-text-right-text {
|
||||||
width: 180px;
|
width: 180px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -365,16 +412,13 @@
|
|||||||
|
|
||||||
.search-detail-wrap {
|
.search-detail-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-title-text {
|
.box-title-text {
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 10px;
|
|
||||||
text-align: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
@@ -394,7 +438,7 @@
|
|||||||
.box-input {
|
.box-input {
|
||||||
/*min-width: 200px;*/
|
/*min-width: 200px;*/
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 50%;
|
width: 100%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
|
|||||||
+2
-1
@@ -60,7 +60,7 @@
|
|||||||
<span style="cursor: pointer"
|
<span style="cursor: pointer"
|
||||||
@click="fileClick(resultData.fileNameRight,resultData.fileIdRight)">{{resultData.fileNameRight}}</span>
|
@click="fileClick(resultData.fileNameRight,resultData.fileIdRight)">{{resultData.fileNameRight}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-content-header-content-rightOne">
|
<div class="detail-content-header-content-rightOne" :title="$t('comparisonDifferenceComment')">
|
||||||
{{$t('comparisonDifferenceComment')}}
|
{{$t('comparisonDifferenceComment')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-content-header-content-right" v-if="!isDisplay">
|
<div class="detail-content-header-content-right" v-if="!isDisplay">
|
||||||
@@ -494,6 +494,7 @@
|
|||||||
.operator-text-text {
|
.operator-text-text {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-right: 53px;
|
margin-right: 53px;
|
||||||
|
max-width: 138px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #040B29;
|
color: #040B29;
|
||||||
|
|||||||
@@ -42,11 +42,11 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<div @click="initiatingProcessClick" class="operator-text">
|
<div @click="initiatingProcessClick" v-has="'documentComparison:Initiate'" class="operator-text">
|
||||||
<a-icon type="apartment"/>
|
<a-icon type="apartment"/>
|
||||||
{{$t('initiateComparison')}}
|
{{$t('initiateComparison')}}
|
||||||
</div>
|
</div>
|
||||||
<div @click="BatchDelete" class="operator-text">
|
<div @click="BatchDelete" v-has="'documentComparison:batchDelete'" class="operator-text">
|
||||||
<a-icon type="delete"/>
|
<a-icon type="delete"/>
|
||||||
{{$t('BatchDelete')}}
|
{{$t('BatchDelete')}}
|
||||||
</div>
|
</div>
|
||||||
@@ -67,15 +67,15 @@
|
|||||||
<span slot="operation" slot-scope="text,record">
|
<span slot="operation" slot-scope="text,record">
|
||||||
<a class="text-operation" @click="comparisonResultsClick(record)">{{$t('comparisonResults')}}</a>
|
<a class="text-operation" @click="comparisonResultsClick(record)">{{$t('comparisonResults')}}</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-if="record.createBy == userInfoQuery.username"
|
v-if="record.createBy == userInfoQuery.username || administrators"
|
||||||
@click="subscribe(record)">
|
@click="subscribe(record)">
|
||||||
{{!record.releaseState || record.releaseState == 'draft' ? $t('release') :$t('withdraw')}}
|
{{!record.releaseState || record.releaseState == 'draft' ? $t('release') :$t('withdraw')}}
|
||||||
</a>
|
</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-if="record.createBy == userInfoQuery.username && record.releaseState == 'draft'"
|
v-if="(record.createBy == userInfoQuery.username || administrators) && record.releaseState == 'draft'"
|
||||||
@click="edit(record)">{{$t('edit')}}</a>
|
@click="edit(record)">{{$t('edit')}}</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-if="record.createBy == userInfoQuery.username && record.releaseState == 'draft'"
|
v-if="(record.createBy == userInfoQuery.username || administrators) && record.releaseState == 'draft'"
|
||||||
@click="deleteData(record)">{{$t('delete')}}</a>
|
@click="deleteData(record)">{{$t('delete')}}</a>
|
||||||
</span>
|
</span>
|
||||||
<span slot="serialNumberRight" :title="text" slot-scope="text,record">
|
<span slot="serialNumberRight" :title="text" slot-scope="text,record">
|
||||||
@@ -132,6 +132,7 @@
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
userInfoQuery: {},
|
userInfoQuery: {},
|
||||||
|
administrators:false,
|
||||||
selectedRowKeysRecord: [],
|
selectedRowKeysRecord: [],
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -233,6 +234,14 @@
|
|||||||
this.queryParam = { ...this.queryParam }
|
this.queryParam = { ...this.queryParam }
|
||||||
}
|
}
|
||||||
this.userInfoQuery = this.userInfo()
|
this.userInfoQuery = this.userInfo()
|
||||||
|
this.administrators = false
|
||||||
|
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||||
|
this.userInfo().userRoleList.forEach(res => {
|
||||||
|
if (res.roleCode == 'admin') {
|
||||||
|
this.administrators = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -59,15 +59,15 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<div @click="uploadClick" class="operator-text">
|
<div @click="uploadClick" v-has="'documentTranslation:upload'" class="operator-text">
|
||||||
<a-icon type="cloud-upload"/>
|
<a-icon type="cloud-upload"/>
|
||||||
{{$t('upload1')}}
|
{{$t('upload1')}}
|
||||||
</div>
|
</div>
|
||||||
<div @click="RetrieveFilesClick" class="operator-text">
|
<div @click="RetrieveFilesClick" v-has="'documentTranslation:retrieval'" class="operator-text">
|
||||||
<a-icon type="database"/>
|
<a-icon type="database"/>
|
||||||
{{$t('RetrieveFiles')}}
|
{{$t('RetrieveFiles')}}
|
||||||
</div>
|
</div>
|
||||||
<div @click="BatchDelete" class="operator-text">
|
<div @click="BatchDelete" v-has="'documentTranslation:batchDeletion'" class="operator-text">
|
||||||
<a-icon type="delete"/>
|
<a-icon type="delete"/>
|
||||||
{{$t('BatchDelete')}}
|
{{$t('BatchDelete')}}
|
||||||
</div>
|
</div>
|
||||||
@@ -86,18 +86,22 @@
|
|||||||
>
|
>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<span slot="operation" slot-scope="text,record">
|
<span slot="operation" slot-scope="text,record">
|
||||||
<a class="text-operation" @click="viewClick(record)">{{$t('view')}}</a>
|
<a class="text-operation"
|
||||||
|
v-has="'documentTranslation:view'"
|
||||||
|
@click="viewClick(record)">{{$t('view')}}</a>
|
||||||
<!-- <a class="text-operation" @click="checkClick(record)">{{$t('check')}}</a>-->
|
<!-- <a class="text-operation" @click="checkClick(record)">{{$t('check')}}</a>-->
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-if="record.createBy == userInfoQuery.username"
|
v-if="record.createBy == userInfoQuery.username || administrators"
|
||||||
@click="subscribe(record)">
|
@click="subscribe(record)">
|
||||||
{{!record.releaseCondition || record.releaseCondition == 'draft' ? $t('release') :$t('withdraw')}}
|
{{!record.releaseCondition || record.releaseCondition == 'draft' ? $t('release') :$t('withdraw')}}
|
||||||
</a>
|
</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
|
v-has="'documentTranslation:download'"
|
||||||
v-if="record.translationResult == 'Translation done'"
|
v-if="record.translationResult == 'Translation done'"
|
||||||
@click="downloadData(record)">{{$t('download')}}</a>
|
@click="downloadData(record)">{{$t('download')}}</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-if="record.createBy == userInfoQuery.username && record.releaseCondition == 'draft'"
|
v-has="'documentTranslation:delete'"
|
||||||
|
v-if="(record.createBy == userInfoQuery.username || administrators) && record.releaseCondition == 'draft'"
|
||||||
@click="deleteData(record)">{{$t('delete')}}</a>
|
@click="deleteData(record)">{{$t('delete')}}</a>
|
||||||
</span>
|
</span>
|
||||||
<span slot="standardTitle" slot-scope="text,record" :title="text">
|
<span slot="standardTitle" slot-scope="text,record" :title="text">
|
||||||
@@ -158,6 +162,7 @@
|
|||||||
queryParam: {},
|
queryParam: {},
|
||||||
userInfoQuery: {},
|
userInfoQuery: {},
|
||||||
selectedRowKeysRecord: [],
|
selectedRowKeysRecord: [],
|
||||||
|
administrators:false,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('standard'),
|
title: this.$t('standard'),
|
||||||
@@ -233,6 +238,14 @@
|
|||||||
}
|
}
|
||||||
this.getList()
|
this.getList()
|
||||||
this.userInfoQuery = this.userInfo()
|
this.userInfoQuery = this.userInfo()
|
||||||
|
this.administrators = false
|
||||||
|
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||||
|
this.userInfo().userRoleList.forEach(res => {
|
||||||
|
if (res.roleCode == 'admin') {
|
||||||
|
this.administrators = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
|
|||||||
@@ -8,11 +8,14 @@
|
|||||||
:url="url"/>
|
:url="url"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<div @click="handleCompare" class="operator-text">
|
<div @click="handleCompare" v-has="'regulatoryEarlyWarning:push'"
|
||||||
|
class="operator-text">
|
||||||
<a-icon type="rocket" :rotate="45"/>
|
<a-icon type="rocket" :rotate="45"/>
|
||||||
{{$t('Push')}}
|
{{$t('Push')}}
|
||||||
</div>
|
</div>
|
||||||
<div @click="handleExport" class="operator-text">
|
<div @click="handleExport"
|
||||||
|
v-has="'regulatoryEarlyWarning:export'"
|
||||||
|
class="operator-text">
|
||||||
<a-icon type="export" :rotate="-90"/>
|
<a-icon type="export" :rotate="-90"/>
|
||||||
{{$t('export')}}
|
{{$t('export')}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user