对接手机端

This commit is contained in:
范强强
2023-06-08 13:42:57 +08:00
parent 94adfa0b1a
commit 629f916db3
2 changed files with 30 additions and 19 deletions
-3
View File
@@ -1,8 +1,6 @@
import { Base64 } from 'js-base64'
import { Toast } from 'vant'
window._CONFIG['domianPreviewURL'] = 'http://localhost:8082/jero-boot'
window._CONFIG['domianWebImgURL'] = 'http://localhost:8082/jero-boot'
let downLoadFileUrl = window._CONFIG['domianPreviewURL'] + '/sys/common/download'
let downLoadImgUrl = window._CONFIG['domianWebImgURL'] + '/sys/common/download'
@@ -10,7 +8,6 @@ export function kkFileView(fileName, fileId) {
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
window._CONFIG['onlinePreviewDomainURL'] = 'http://localhost:8012/onlinePreview'
if (fileSuffix == '.docx' || fileSuffix == '.doc' || fileSuffix == '.pdf' || fileSuffix == '.xlsx' || fileSuffix == '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadFileUrl + '/' + fileId + fileSuffix)
window.open(url)
+30 -16
View File
@@ -5,6 +5,7 @@
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
<van-search v-model="value"
show-action
@search="onSearch"
:action-text="$t('reset')"
:placeholder="$t('phoneSearch')"/>
</div>
@@ -19,7 +20,7 @@
</div>
<div class="content-box">
<div class="search-top">
{{$t('searchScope')}}<span>{{value}}</span>
{{$t('searchScope')}}<span>{{searchValue}}</span>
</div>
<div v-if="activeTab == 'whole'">
@@ -39,7 +40,7 @@
<span class="content-box-left"
:class="{'content-box-left-En-WDK':language == 'en-us' ? true : false}"
>{{$t('title')}}</span>
<span class="content-box-text">{{item.title || '--'}}</span>
<span class="content-box-text" v-html="item.title || '--'"></span>
</div>
<div class="content-box-type">
<span class="content-box-left"
@@ -53,8 +54,7 @@
</div>
</div>
<div v-else-if="item.module_type_flag == 'WTZSK' || item.module_type_flag == 'ZSFX'">
<div class="content-box-title">
{{item.title || '--'}}
<div class="content-box-title" v-html="item.title || '--'">
</div>
<div class="content-box-type">
<span class="content-box-left-problemKnow"
@@ -76,8 +76,7 @@
</div>
</div>
<div v-else-if="item.module_type_flag == 'FGYB'">
<div class="content-box-title">
{{item.title || '--'}}
<div class="content-box-title" v-html="item.title || '--'">
</div>
<div class="content-box-type">
<span class="content-box-left-monthly"
@@ -109,13 +108,11 @@
>
<div class="content-box-content" @click="dataClick(item)" v-for="(item,index) in documentLibraryList"
:key="index">
<div class="content-box-title">
{{item.serial_number || '--'}}
</div>
<div class="content-box-title" v-html="item.serial_number || '--'"></div>
<div class="content-box-type">
<span class="content-box-left"
:class="{'content-box-left-En':language == 'en-us' ? true : false}">{{$t('title')}}</span>
<span class="content-box-text">{{item.title || '--'}}</span>
<span class="content-box-text" v-html="item.title || '--'"></span>
</div>
<div class="content-box-type">
<span class="content-box-left"
@@ -136,9 +133,7 @@
>
<div class="content-box-content" @click="dataClick(item)" v-for="(item,index) in problemKnowledgeBaseList"
:key="index">
<div class="content-box-title">
{{item.title || '--'}}
</div>
<div class="content-box-title" v-html="item.title || '--'"></div>
<div class="content-box-type">
<span class="content-box-left-problemKnow"
:class="{'content-box-left-problemKnow-En':language == 'en-us' ? true : false}"
@@ -166,9 +161,7 @@
>
<div class="content-box-content" @click="dataClick(item)" v-for="(item,index) in monthlyReportRegulationsList"
:key="index">
<div class="content-box-title">
{{item.title || '--'}}
</div>
<div class="content-box-title" v-html="item.title || '--'"></div>
<div class="content-box-type">
<span class="content-box-left-monthly"
:class="{'content-box-left-monthly-En':language == 'en-us' ? true : false}">{{$t('uploadedBy')}}</span>
@@ -205,6 +198,7 @@
finished: false,
language: localStorage.getItem('language'),
pageNo: 0,
searchValue: '',
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
url: {
@@ -219,6 +213,7 @@
document.title = 'NIO GRP'
if (this.$route.query.searchValue) {
this.value = this.$route.query.searchValue
this.searchValue = this.$route.query.searchValue
}
if (this.$route.query.activeTab) {
this.activeTab = this.$route.query.activeTab
@@ -228,6 +223,21 @@
iconClick() {
this.$router.go(-1)
},
onSearch() {
if (this.activeTab == 'whole') {
this.list = []
} else if (this.activeTab == 'documentLibrary') {
this.documentLibraryList = []
} else if (this.activeTab == 'problemKnowledgeBase') {
this.problemKnowledgeBaseList = []
} else if (this.activeTab == 'monthlyReportRegulations') {
this.monthlyReportRegulationsList = []
}
this.loading = true
this.finished = false
this.pageNo = 1
this.getList()
},
activeChange() {
if (this.activeTab == 'whole') {
this.list = []
@@ -276,6 +286,7 @@
let params = {
pageNo: this.pageNo,
pageSize: 10,
selectValue: this.value,
mapOne: {},
mapTwo: {}
}
@@ -577,4 +588,7 @@
.content-box-left-monthly-En {
width: 2.11rem;
}
::v-deep .highlight-class {
color: #21c9cc!important;
}
</style>