Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
zyx.net
2022-08-26 17:59:39 +08:00
20 changed files with 223 additions and 142 deletions
@@ -966,3 +966,8 @@ ADD COLUMN `related_areas_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4
ADD COLUMN `source_cn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源中文' AFTER `related_areas_en`,
ADD COLUMN `time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期' AFTER `source_cn`,
ADD COLUMN `source_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源英文' AFTER `time`;
-- 法规技术评估 条款项评估结果表增加字段。 2022-08-26
ALTER TABLE `laws_weilai`.`laws_technology_evaluation_item_result`
ADD COLUMN `feedback_time` datetime NULL COMMENT '反馈时间' AFTER `laws_technology_evaluation_id`;
@@ -8,8 +8,8 @@ package com.jero.modules.document.enums;
public enum SearchEnum {
INDEX_NAME_DOCUMENT("文档库索引名称","documentLibrary"),
TYPE_NAME_DOCUMENT("文档库类型","document"),
INDEX_NAME_LAWS_MONTHLY_REPORT("法规月报索引名称","lawsMonthlyReportManage"),
TYPE_NAME_LAWS_MONTHLY_REPORT("法规月报类型名称","lawsMonthlyReport"),
INDEX_NAME_LAWS_MONTHLY_REPORT("法规月报索引名称","lawsmonthlyreportmanage"),
TYPE_NAME_LAWS_MONTHLY_REPORT("法规月报类型名称","lawsmonthlyreport"),
FULL_TEXT_SEARCH("全部中文","fulltextsearchcn"),
FULL_TEXT_SEARCH_CN("全部中文","fulltextsearchcn"),
FULL_TEXT_SEARCH_EN("全部英文","fulltextsearchen"),
@@ -135,6 +135,11 @@ public class LawsTechnologyEvaluationItemResultEO implements Serializable {
@ApiModelProperty(value = "发起人反馈")
private java.lang.String sponsorFeedback;
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "反馈时间")
private java.util.Date feedbackTime;
/**法规技术评估表id*/
@ApiModelProperty(value = "法规技术评估表id")
private java.lang.String lawsTechnologyEvaluationId;
@@ -222,7 +222,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
public void esFullText(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,StringBuilder sbCn,StringBuilder sbEn,String cut,String fileText,List<DictModel> targetMarketList){
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
/*if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
String textByValue = ShowPermissionsEnum.getTextByValue(problemKnowledgeBaseEO.getShowPermissions(), cut);
sbCn.append("展示权限" + ":" + textByValue + " ");
}else {
@@ -233,7 +233,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
sbCn.append("标题" + ":" + problemKnowledgeBaseEO.getTitle() + " ");
}else {
sbCn.append("标题" + ":" + "-- ");
}
}*/
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getProblemTypeName())){
sbCn.append("问题分类" + ":" + problemKnowledgeBaseEO.getProblemTypeName() + " ");
@@ -272,10 +272,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
sbCn.append("</br>");
sbCn.append("内容" + ":" + problemKnowledgeBaseEO.getContent() + " ");
sbCn.append("正文" + ":" + problemKnowledgeBaseEO.getContent() + " ");
}else {
sbCn.append("</br>");
sbCn.append("内容" + ":" + "-- ");
sbCn.append("正文" + ":" + "-- ");
}
if(StringUtils.isNotEmpty(fileText)){
@@ -285,7 +285,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
}
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
/*if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
String textByValue = ShowPermissionsEnum.getTextByValue(problemKnowledgeBaseEO.getShowPermissions(), cut);
sbEn.append("Display permission" + ":" + textByValue + " ");
}else {
@@ -296,7 +296,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
sbEn.append("Title" + ":" + problemKnowledgeBaseEO.getTitle() + " ");
}else {
sbEn.append("Title" + ":" + "-- ");
}
}*/
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getProblemTypeName())){
sbEn.append("Problem classification" + ":" + problemKnowledgeBaseEO.getProblemTypeName() + " ");
@@ -335,10 +335,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
sbEn.append("</br>");
sbEn.append("Content" + ":" + problemKnowledgeBaseEO.getContent() + " ");
sbEn.append("Text" + ":" + problemKnowledgeBaseEO.getContent() + " ");
}else {
sbEn.append("</br>");
sbEn.append("Content" + ":" + "-- ");
sbEn.append("Text" + ":" + "-- ");
}
if(StringUtils.isNotEmpty(fileText)){
@@ -191,20 +191,20 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
List<Map<String, Object>> mapListTempEn = new ArrayList<>();
//文件相关封装中文的全文内容(es) 非搜索条件下的:flag---SEARCH_FLAG
putMap(id, "法规月报",
fileText, monthlyReportManageEO.getName(), fileText,
fileText, monthlyReportManageEO.getName(),
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCn, SEARCH_FLAG);
//文件相关封装英文的全文内容(es) 搜索条件下的: flag---null
//文件相关封装英文的全文内容(es)
putMap(id, "monthly report",
fileText, monthlyReportManageEO.getName(), fileText,
fileText, monthlyReportManageEO.getName(),
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEn, SEARCH_FLAG);
//文件相关封装中文的全文内容(es)
//文件相关封装中文的全文内容(es) 搜索条件下的: flag---null
putMap(id + monthlyReportManageEO.getFileId(), "法规月报",
fileText, monthlyReportManageEO.getName(), fileText,
fileText, monthlyReportManageEO.getName(),
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCnForSearch, null);
//文件相关封装英文的全文内容(es)
putMap(id + monthlyReportManageEO.getFileId(), "monthly report",
fileText, monthlyReportManageEO.getName(), fileText,
fileText, monthlyReportManageEO.getName(),
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEnForSearch, null);
mapListTempCn.add(stringMapCn);
@@ -247,7 +247,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
}
}
private void putMap(String id, String moduleType,
String content, String title , String fileText,
String content, String title ,
String fileName, String fileId, Date issueTime, String cut,
Map<String, Object> stringMap,
String flag){
@@ -256,7 +256,6 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
stringMap.put("module_type_flag", ModuleTypeFlagEnum.LAWS_MONTHLY_REPORT.getValue()); // 默认法规月报标识
stringMap.put("content", content);
stringMap.put("title", title);
stringMap.put("file_text", fileText);
stringMap.put("file_name", fileName);
stringMap.put("file_id", fileId);
stringMap.put("create_time", issueTime);
@@ -33,6 +33,7 @@ import com.jero.modules.system.entity.SysCategory;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
@@ -49,6 +50,7 @@ import java.util.stream.Collectors;
* @date 2022/3/14 10:03
* @auth zhn
*/
@Slf4j
@Component
public class DocumentSearchServiceImpl implements IDocumentSearchService {
@Autowired
@@ -446,39 +448,23 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Map<String,Object> mapHighlight1 = new HashMap<>();
//封装首次的条件
if (StringUtils.isNotBlank(selectValue)) {
selectValue = selectValue.toLowerCase();
for (String field : fieldList) {
Map<String, Object> map2 = new HashMap<>();
Map<String, Object> map3 = new HashMap<>();
Map<String, Object> map4 = new HashMap<>();
if("serial_number".equals(field)){
map3.put("boost",1);
}else if("title".equals(field)){
map3.put("boost",1);
}else if("file_text".equals(field)){
map3.put("boost",0.01);
}else if("content".equals(field)){
map3.put("boost",0.01);
}else if("file_name".equals(field)){
map3.put("boost",1);
}
// 特殊处理编号字段
if (field.equals("serial_number")){
// map2放最内层
map2.put(field, "*" + selectValue + "*");
getQueryMapJsonFullText(queryMapJson, selectValue, field);
// map4放query
map4.put("wildcard",map2);
} else {
map3.put("query",selectValue);
// map3.put("minimum_should_match",2);
map2.put(field, map3);
map4.put("match",map2);
}
queryMapJson.add(map4);
//高亮
if(!"flag".equals(field)){
highlight(mapHighlight, field);
} else {
// query_string查询
Map<String, Object> map25 = new HashMap<>();
Map<String, Object> map45 = new HashMap<>();
map25.put("query", selectValue);
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
map45.put("query_string", map25);
queryMapJson.add(map45);
}
}
mapHighlight1.put("fields",mapHighlight);
@@ -489,39 +475,23 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
}
//封装二次的条件
if (StringUtils.isNotBlank(selectValueTwo)) {
selectValueTwo = selectValueTwo.toLowerCase();
for (String field : fieldList) {
Map<String, Object> queryMap = new HashMap<>();
Map<String, Object> map2 = new HashMap<>();
Map<String, Object> map3 = new HashMap<>();
if("serial_number".equals(field)){
map3.put("boost",1);
}else if("title".equals(field)){
map3.put("boost",1);
}else if("file_text".equals(field)){
map3.put("boost",0.01);
}else if("content".equals(field)){
map3.put("boost",0.01);
}else if("file_name".equals(field)){
map3.put("boost",1);
}
getQueryMapJsonFullText(queryMapJsonTwo, selectValueTwo, field);
//特殊处理编号字段
if (field.equals("serial_number")){
// map2放最内层
map2.put(field, "*" + selectValueTwo + "*");
// map4放query
queryMap.put("wildcard",map2);
} else {
map3.put("query",selectValueTwo);
// map3.put("minimum_should_match",2);
map2.put(field, map3);
queryMap.put("match", map2);
}
queryMapJsonTwo.add(queryMap);
//高亮
if(!"flag".equals(field)){
highlight(mapHighlight, field);
} else {
// query_string查询
Map<String, Object> map25 = new HashMap<>();
Map<String, Object> map45 = new HashMap<>();
map25.put("query", selectValue);
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
map45.put("query_string", map25);
queryMapJson.add(map45);
}
}
mapHighlight1.put("fields",mapHighlight);
@@ -546,7 +516,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
}
JSONObject sort = new JSONObject();
if(StringUtils.isEmpty(selectValue)){
if(StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue,SEARCH_FLAG)){
Map<String,Object> createTime = new HashMap<>();
Map<String,Object> createTime1 = new HashMap<>();
createTime.put("order","desc");
@@ -559,6 +529,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
score1.put("_score",score);
sort.putAll(score1);
}
log.info("搜索中心-全部索引,排序方式为:" + sort.toJSONString());
// Map<String,Object> mapSort = new HashMap<>();
// Map<String,Object> mapSortTemp = new HashMap<>();
@@ -573,6 +544,65 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
return page;
}
private void getQueryMapJsonFullText(JSONArray queryMapJson, String selectValue, String field) {
// 前缀匹配 缺点是前缀一定不能断开
//情况举例:用户只记得前面那段字
Map<String, Object> map21 = new HashMap<>();
Map<String, Object> map31 = new HashMap<>();
Map<String, Object> map41 = new HashMap<>();
if("serial_number".equals(field)){
map31.put("boost",1);
}else if("title".equals(field)){
map31.put("boost",1);
}else if("file_text".equals(field)){
map31.put("boost",0.01);
}else if("content".equals(field)){
map31.put("boost",0.01);
}else if("file_name".equals(field)){
map31.put("boost",1);
}
map31.put("value", selectValue);
map21.put(field + ".keyword", map31);
map41.put("prefix", map21);
queryMapJson.add(map41);
// match_phrase_prefix 词组匹配查询,允许最后词组与文中的任意分词前缀匹配
Map<String, Object> map22 = new HashMap<>();
Map<String, Object> map32 = new HashMap<>();
Map<String, Object> map42 = new HashMap<>();
if("serial_number".equals(field)){
map32.put("boost",1);
}else if("title".equals(field)){
map32.put("boost",1);
}else if("file_text".equals(field)){
map32.put("boost",0.01);
}else if("content".equals(field)){
map32.put("boost",0.01);
}else if("file_name".equals(field)){
map32.put("boost",1);
}
map32.put("query", selectValue);
map22.put(field, map32);
map42.put("match_phrase_prefix", map22);
queryMapJson.add(map42);
// match分词匹配查询
// 情况举例:用户可能他知道开头的前缀几个字,知道中间的几个字
Map<String, Object> map23 = new HashMap<>();
Map<String, Object> map43 = new HashMap<>();
map23.put(field, selectValue);
map43.put("match", map23);
queryMapJson.add(map43);
// wildcard模糊查询
//情况举例:用户只记得中间那段字
Map<String, Object> map24 = new HashMap<>();
Map<String, Object> map44 = new HashMap<>();
map24.put(field, "*" + selectValue + "*");
map44.put("wildcard",map24);
queryMapJson.add(map44);
}
@NotNull
private IPage getiPage(String selectValue, String selectValueTwo, JSONArray queryMapJson,Map<String,Object> highlightMap,
JSONArray should, Integer pageNo, Integer pageSize, String paragraphFlag,
@@ -1256,7 +1286,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
queryMapJsonAll.add(jsonObjectThree);
}
JSONObject sort = new JSONObject();
if(StringUtils.isEmpty(selectValue)){
if(StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue,SEARCH_FLAG)){
Map<String,Object> createTime = new HashMap<>();
Map<String,Object> createTime1 = new HashMap<>();
createTime.put("order","desc");
@@ -77,35 +77,28 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
Map<String,Object> mapHighlight1 = new HashMap<>();
//封装首次的条件
if (StringUtils.isNotBlank(selectValue)) {
selectValue = selectValue.toLowerCase();
for (String field : fieldList) {
Map<String, Object> map2 = new HashMap<>();
Map<String, Object> map3 = new HashMap<>();
Map<String, Object> map4 = new HashMap<>();
if("title".equals(field)){
map3.put("boost",1);
}else if("content".equals(field)){
map3.put("boost",0.01);
}
// 标题字段 通配符模糊匹配
if (field.equals("title")){
// map2放最内层
map2.put(field, "*" + selectValue + "*");
// map4放query
map4.put("wildcard",map2);
} else {
map3.put("query", selectValue);
map2.put(field, map3);
map4.put("match", map2);
}
queryMapJson.add(map4);
getQueryMapJson(queryMapJson, selectValue, field);
//高亮
if(!"flag".equals(field)){
highlight(mapHighlight, field);
} else {
// query_string查询
Map<String, Object> map25 = new HashMap<>();
Map<String, Object> map45 = new HashMap<>();
map25.put("query", selectValue);
map25.put("fields", fieldList.toArray());
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
map45.put("query_string", map25);
queryMapJson.add(map45);
}
}
mapHighlight1.put("fields",mapHighlight);
}
if(CollectionUtils.isNotEmpty(queryMapJson)){
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJson);
@@ -113,33 +106,22 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
}
//封装二次的条件
if (StringUtils.isNotBlank(selectValueTwo)) {
selectValueTwo = selectValueTwo.toLowerCase();
for (String field : fieldList) {
Map<String, Object> queryMap = new HashMap<>();
Map<String, Object> map2 = new HashMap<>();
Map<String, Object> map3 = new HashMap<>();
if("title".equals(field)){
map3.put("boost",1);
}else if("content".equals(field)){
map3.put("boost",0.01);
}
getQueryMapJson(queryMapJsonTwo, selectValueTwo, field);
// 标题字段 通配符模糊匹配
if (field.equals("title")){
// map2放最内层
map2.put(field, "*" + selectValueTwo + "*");
// map4放query
queryMap.put("wildcard",map2);
} else {
map3.put("query", selectValueTwo);
// map3.put("minimum_should_match",2);
map2.put(field, map3);
queryMap.put("match", map2);
}
queryMapJsonTwo.add(queryMap);
//高亮
if(!"flag".equals(field)){
highlight(mapHighlight, field);
} else {
// query_string查询
Map<String, Object> map25 = new HashMap<>();
Map<String, Object> map45 = new HashMap<>();
map25.put("query", selectValue);
map25.put("allow_leading_wildcard", false);
map45.put("query_string", map25);
queryMapJsonTwo.add(map45);
}
}
mapHighlight1.put("fields",mapHighlight);
@@ -227,11 +209,6 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
}
mapSource.put(key,fieldConyent);
}
//如果这一条数据中有高亮字段值,但是file_text中没有高亮值, 则赋空值,否则列表中会展示所有的文件内容, 赋空后,则展示基础数据
String fileText = (String) mapSource.get("file_text");
if(StringUtils.isNotBlank(fileText) && !fileText.contains("<text class='highlight-class'>")){
mapSource.put("file_text","");
}
}
mapList.add(mapSource);
}
@@ -258,10 +235,57 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
list1.add("</text>");
mapTemp.put("pre_tags", list);
mapTemp.put("post_tags", list1);
mapTemp.put("fragment_size", 550);//高亮字段内容长度,去除html样式标签,统计字数,设置为200
mapTemp.put("fragment_size", 500);//高亮字段内容长度,去除html样式标签,统计字数,设置为200
mapTemp.put("number_of_fragments", 1);//高亮内容默认分为5段, 此处设置为一段
mapTemp.put("type", "plain");
mapHighlight.put(key, mapTemp);
}
private void getQueryMapJson(JSONArray queryMapJson, String selectValue, String field) {
// 前缀匹配 缺点是前缀一定不能断开
//情况举例:用户只记得前面那段字
Map<String, Object> map21 = new HashMap<>();
Map<String, Object> map31 = new HashMap<>();
Map<String, Object> map41 = new HashMap<>();
if("title".equals(field)){
map31.put("boost",1);
}else if("content".equals(field)){
map31.put("boost",0.01);
}
map31.put("value", selectValue);
map21.put(field + ".keyword", map31);
map41.put("prefix", map21);
queryMapJson.add(map41);
// match_phrase_prefix 词组匹配查询,允许最后词组与文中的任意分词前缀匹配
Map<String, Object> map22 = new HashMap<>();
Map<String, Object> map32 = new HashMap<>();
Map<String, Object> map42 = new HashMap<>();
if("title".equals(field)){
map32.put("boost",1);
}else if("content".equals(field)){
map32.put("boost",0.01);
}
map32.put("query", selectValue);
map22.put(field, map32);
map42.put("match_phrase_prefix", map22);
queryMapJson.add(map42);
// match分词匹配查询
// 情况举例:用户可能他知道开头的前缀几个字,知道中间的几个字
Map<String, Object> map23 = new HashMap<>();
Map<String, Object> map43 = new HashMap<>();
map23.put(field, selectValue);
map43.put("match", map23);
queryMapJson.add(map43);
// wildcard模糊查询
//情况举例:用户只记得中间那段字
Map<String, Object> map24 = new HashMap<>();
Map<String, Object> map44 = new HashMap<>();
map24.put(field, "*" + selectValue + "*");
map44.put("wildcard",map24);
queryMapJson.add(map44);
}
}
@@ -332,7 +332,12 @@
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
if (this.formInline.id) {
eventBUs.$emit('searchGetData')
} else {
eventBUs.$emit('searchReset')
}
this.$emit('addFormClick')
} else {
this.confirmLoading = false
@@ -115,7 +115,7 @@
this.visible = false
this.visibleTree = false
this.$emit('clearSelected')
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
} else {
this.$message.warning(this.$t('operationFailed'))
}
@@ -188,7 +188,7 @@
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index:100;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
@@ -333,7 +333,7 @@
value.id = this.getUUID()
value.currentUserName = this.userInfo().username
Object.keys(value).forEach(res => {
if (value[res] && value[res] instanceof String) {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}
@@ -364,7 +364,7 @@
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
value.handlingTime = handlingTime
Object.keys(value).forEach(res => {
if (value[res] && value[res] instanceof String) {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}
@@ -217,7 +217,7 @@
},
{
title: this.$t('feedbackTime'),
dataIndex: 'updateTime',
dataIndex: 'feedbackTime',
align: 'center',
ellipsis: true,
width: 160
@@ -537,7 +537,7 @@
if (value[res] && value[res] instanceof Array) {
value[res] = value[res].join(',')
}
if (value[res] && value[res] instanceof String) {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}
@@ -579,7 +579,7 @@
},
completeTask(value, taskId) {
Object.keys(value).forEach(res => {
if (value[res] && value[res] instanceof String) {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}
@@ -184,7 +184,7 @@
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.idList = []
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
@@ -233,7 +233,7 @@
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
eventBUs.$emit('searchReset')
eventBUs.$emit('searchGetData')
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
@@ -21,7 +21,7 @@
</template>
<span style="cursor: pointer"
class="text-header-text"
v-if="item.serial_number && !item.module_type_flag"
v-if="item.serial_number && item.module_type_flag == 'WDK'"
v-html="item.serial_number"></span>
<template slot="title">
<span v-html="item.title"></span>
@@ -30,7 +30,7 @@
<template slot="title">
<span v-html="item.file_name"></span>
</template>
<span class="text-header-text" v-if="item.file_name && !item.module_type_flag" style="cursor: pointer"
<span class="text-header-text" v-if="item.file_name && item.module_type_flag == 'WDK'" style="cursor: pointer"
v-html="item.file_name"></span>
</a-tooltip>
<!-- <a-tooltip placement="topLeft" :mouseEnterDelay="0.5">-->
@@ -98,6 +98,7 @@
import { getAction, postAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
import viewFileModel from '@/components/viewFileModel/index'
import moment from 'moment'
export default {
name: 'evaluatorFeedback',
@@ -345,9 +346,21 @@
return
}
}
if (this.$route.query.taskDefinitionKey == 'pgrqr'){
let feedbackTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
for (let i = 0; i < this.dataSource.length; i++) {
this.dataSource[i].feedbackTime = feedbackTime
}
}
callBack && callBack(this.dataSource)
},
preservationData(callBack) {
if (this.$route.query.taskDefinitionKey == 'pgrqr'){
let feedbackTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
for (let i = 0; i < this.dataSource.length; i++) {
this.dataSource[i].feedbackTime = feedbackTime
}
}
callBack && callBack(this.dataSource)
},
accessoryFileClick(item) {
@@ -313,7 +313,7 @@
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
value.handlingTime = handlingTime
Object.keys(value).forEach(res => {
if (value[res] && value[res] instanceof String) {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}
@@ -267,7 +267,7 @@
let operatorTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
value.operatorTime = operatorTime
Object.keys(value).forEach(res => {
if (value[res] && value[res] instanceof String) {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}
@@ -176,7 +176,7 @@
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
value.handlingTime = handlingTime
Object.keys(value).forEach(res => {
if (value[res] && value[res] instanceof String) {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}
@@ -346,7 +346,7 @@
let json = Object.assign(this.queryBy, value)
let data = JSON.stringify(json).replace(/\"/g, '\'')
Object.keys(value).forEach(res => {
if (value[res] && value[res] instanceof String) {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}
@@ -1787,7 +1787,7 @@
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
value.handlingTime = handlingTime
Object.keys(value).forEach(res => {
if (value[res] && value[res] instanceof String) {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}