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

This commit is contained in:
wangzhijiang
2022-09-29 11:04:22 +08:00
3 changed files with 53 additions and 20 deletions
@@ -350,11 +350,17 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
String key = entry.getKey();
String value = (String) entry.getValue();
if("technology_territory".equals(key) && ObjectUtils.isNotEmpty(value)){
Map<String, Object> queryMapNew = new HashMap<>();
Map<String, Object> queryMapTempNew = new HashMap<>();
queryMapTempNew.put(key, "*"+value.replaceAll(",","*")+"*");
queryMapNew.put("wildcard", queryMapTempNew);
must.add(queryMapNew);
JSONArray should = new JSONArray();
List<Map<String,Object>> mapList = new ArrayList<>();
for (String s : value.split(",")) {
Map<String,Object> map = new HashMap();
map.put(key,"*"+s+"*");
Map<String,Object> map1 = new HashMap<>();
map1.put("wildcard",map);
should.add(map1);
}
must.add(should);
}else{
Map<String, Object> map = new HashMap<>();
Map<String, Object> queryMap = new HashMap<>();
@@ -53,11 +53,14 @@
:class="{'content-box-box-text-admin':!item2.lableName || item2.lableName == 'null' || item2.lableName == 'undefined'? true : false}"
class="content-box-box-text content-box-box-text-index"
v-else-if="item2.lableType == 7 && item2.lableName && index2 != 0">
<!-- <span v-if="item2.lableName && item2.lableName.split(',').length == 1">-->
<!-- <span class="file-text">{{item2.lableName}}</span>-->
<!-- <a-icon @click="download(item2)" type="download" class="icon-text"/>-->
<!-- </span>-->
<span @click="viewFileClick(item2.lableName)">
<span v-if="item2.lableName && item2.lableName.split(',').length == 1">
<span class="file-text" @click="pdfPreview(item2)" :title="item2.contentFileName">
{{item2.contentFileName}}
</span>
<a-icon @click="download(item2)" type="download" class="icon-text"/>
</span>
<span v-else :title="$t('viewFile')"
@click="viewFileClick(item2.lableName)">
{{$t('viewFile')}}
</span>
</span>
@@ -102,6 +105,7 @@
import countryCardViewAdd from './countryCardViewAdd'
import viewFileModel from '@/components/viewFileModel/index'
import { mapGetters } from 'vuex'
import { Base64 } from 'js-base64'
export default {
name: 'countryCardView',
@@ -122,6 +126,7 @@
countryCardViewList: [],
applyMarkets: '',
header_text: '',
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
url: {
list: '/problemKnowledgeBase/countryCardTempEO/list',
deleteOne: ''
@@ -137,6 +142,25 @@
},
methods: {
...mapGetters(['userInfo']),
pdfPreview(fileQuery) {
let fileName = fileQuery.contentFileName
fileQuery.id = fileQuery.lableName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls'
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.contentFileName, { id: fileQuery.id })
}
},
displayInformationClick() {
this.$refs.displayInformationModelRef.getData(JSON.parse(JSON.stringify(this.displayList)))
},
@@ -149,7 +173,7 @@
this.$refs.countryCardViewAddRef.add(this.countryCardViewList)
},
download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
downloadFile('/sys/common/downLoadFile', item.contentFileName, { id: item.lableName, userName: this.userInfo().username })
},
countryCardViewAddForm(val) {
this.countryCardViewList = JSON.parse(JSON.stringify(val))
@@ -222,12 +246,14 @@
if (val.lableType == 3) {
res1.list.push({
lableName: val.contentDropDownValue,
lableType: val.lableType
lableType: val.lableType,
contentFileName:val.contentFileName || ''
})
} else {
res1.list.push({
lableName: val.content,
lableType: val.lableType
lableType: val.lableType,
contentFileName:val.contentFileName || ''
})
}
}
@@ -490,6 +516,7 @@
text-overflow: ellipsis;
white-space: nowrap;
float: left;
color: #040B29
}
.icon-text {
@@ -158,13 +158,13 @@
})
},
titleClick(item) {
let newUrl = this.$router.resolve({
path: '/problemKnowledgeBaseView',
query: {
id: item.id
}
})
window.open(newUrl.href, '_blank')
// let newUrl = this.$router.resolve({
// path: '/problemKnowledgeBaseView',
// query: {
// id: item.id
// }
// })
// window.open(newUrl.href, '_blank')
},
edit(val) {
this.$router.push({