对接手机端

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