对接手机端
This commit is contained in:
@@ -3,9 +3,25 @@
|
|||||||
<div class="fixed">
|
<div class="fixed">
|
||||||
<div class="header-search">
|
<div class="header-search">
|
||||||
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
|
<van-icon @click="iconClick" class="icon" name="arrow-left"/>
|
||||||
|
<van-dropdown-menu v-if="activeTab == 'documentLibrary'">
|
||||||
|
<van-dropdown-item @change="selectModelChange" v-model="selectModel" :options="option"/>
|
||||||
|
</van-dropdown-menu>
|
||||||
|
<van-search v-model="value"
|
||||||
|
class="search-text"
|
||||||
|
v-if="activeTab == 'documentLibrary'"
|
||||||
|
show-action
|
||||||
|
left-icon="none"
|
||||||
|
@search="onSearch"
|
||||||
|
@clear="onClear"
|
||||||
|
@cancel="onClear"
|
||||||
|
:action-text="$t('reset')"
|
||||||
|
:placeholder="$t('phoneSearch')"/>
|
||||||
<van-search v-model="value"
|
<van-search v-model="value"
|
||||||
show-action
|
show-action
|
||||||
|
v-else
|
||||||
@search="onSearch"
|
@search="onSearch"
|
||||||
|
@clear="onClear"
|
||||||
|
@cancel="onClear"
|
||||||
:action-text="$t('reset')"
|
:action-text="$t('reset')"
|
||||||
:placeholder="$t('phoneSearch')"/>
|
:placeholder="$t('phoneSearch')"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -20,7 +36,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content-box">
|
<div class="content-box">
|
||||||
<div class="search-top">
|
<div class="search-top">
|
||||||
{{$t('searchScope')}}:<span>{{searchValue}}</span>
|
{{$t('searchScope')}}:
|
||||||
|
<span v-if="activeTab == 'documentLibrary' && searchValue">
|
||||||
|
{{selectModelName}}:</span>
|
||||||
|
<span>{{searchValue}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="activeTab == 'whole'">
|
<div v-if="activeTab == 'whole'">
|
||||||
@@ -33,8 +52,7 @@
|
|||||||
>
|
>
|
||||||
<div class="content-box-content" @click="dataClick(item)" v-for="(item,index) in list" :key="index">
|
<div class="content-box-content" @click="dataClick(item)" v-for="(item,index) in list" :key="index">
|
||||||
<div v-if="item.module_type_flag == 'WDK'">
|
<div v-if="item.module_type_flag == 'WDK'">
|
||||||
<div class="content-box-title">
|
<div class="content-box-title" v-html="item.serial_number || '--'">
|
||||||
{{item.serial_number || '--'}}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content-box-type">
|
<div class="content-box-type">
|
||||||
<span class="content-box-left"
|
<span class="content-box-left"
|
||||||
@@ -50,7 +68,7 @@
|
|||||||
<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-WDK':language == 'en-us' ? true : false}">{{$t('category')}}</span>
|
:class="{'content-box-left-En-WDK':language == 'en-us' ? true : false}">{{$t('category')}}</span>
|
||||||
<span class="content-box-text">{{item.module_type || '--'}}</span>
|
<span class="content-box-text" v-html="item.module_type || '--'"></span>
|
||||||
</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'">
|
||||||
@@ -72,7 +90,7 @@
|
|||||||
<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}">{{$t('category')}}</span>
|
:class="{'content-box-left-problemKnow-En':language == 'en-us' ? true : false}">{{$t('category')}}</span>
|
||||||
<span class="content-box-text">{{item.module_type || '--'}}</span>
|
<span class="content-box-text" v-html="item.module_type || '--'"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="item.module_type_flag == 'FGYB'">
|
<div v-else-if="item.module_type_flag == 'FGYB'">
|
||||||
@@ -91,7 +109,7 @@
|
|||||||
<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('category')}}</span>
|
:class="{'content-box-left-monthly-En':language == 'en-us' ? true : false}">{{$t('category')}}</span>
|
||||||
<span class="content-box-text">{{item.module_type || '--'}}</span>
|
<span class="content-box-text" v-html="item.module_type || '--'"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -205,12 +223,18 @@
|
|||||||
wholeUrl: 'search/document/getFullTextInfoList',
|
wholeUrl: 'search/document/getFullTextInfoList',
|
||||||
documentLibraryUrl: 'search/document/getParagraphInfoList',
|
documentLibraryUrl: 'search/document/getParagraphInfoList',
|
||||||
problemKnowledgeBaseUrl: '/search/document/getProblemKnowledgeBasePage',
|
problemKnowledgeBaseUrl: '/search/document/getProblemKnowledgeBasePage',
|
||||||
monthlyReportRegulationsUrl: '/search/lawsMonthlyReport/page'
|
monthlyReportRegulationsUrl: '/search/lawsMonthlyReport/page',
|
||||||
}
|
queryCondition: 'search/document/queryCondition'
|
||||||
|
},
|
||||||
|
selectModel: '',
|
||||||
|
option: [],
|
||||||
|
searchOption: [],
|
||||||
|
selectModelNameSearch: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = 'NIO GRP'
|
document.title = 'NIO GRP'
|
||||||
|
this.getCondition()
|
||||||
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
|
this.searchValue = this.$route.query.searchValue
|
||||||
@@ -220,10 +244,63 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
selectModelChange(event) {
|
||||||
|
let content = this.option.filter((res) => {
|
||||||
|
return res.value === event
|
||||||
|
})
|
||||||
|
if (content && content.length > 0) {
|
||||||
|
this.selectModelNameSearch = content[0].text
|
||||||
|
} else {
|
||||||
|
this.selectModelNameSearch = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getCondition() {
|
||||||
|
let query = {
|
||||||
|
flag: 1,
|
||||||
|
searchFlag: 1
|
||||||
|
}
|
||||||
|
getAction(this.url.queryCondition, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
let searchOption = res.result || []
|
||||||
|
if (searchOption.length > 0) {
|
||||||
|
this.selectModel = searchOption[0].db_field_name
|
||||||
|
this.selectModelNameSearch = searchOption[0].db_field_txt
|
||||||
|
for (let i = 0; i < searchOption.length; i++) {
|
||||||
|
this.option.push({
|
||||||
|
text: searchOption[i].db_field_txt,
|
||||||
|
value: searchOption[i].db_field_name
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.searchOption = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
iconClick() {
|
iconClick() {
|
||||||
this.$router.go(-1)
|
this.$router.go(-1)
|
||||||
},
|
},
|
||||||
onSearch() {
|
onSearch() {
|
||||||
|
this.searchValue = this.value
|
||||||
|
this.selectModelName = this.selectModelNameSearch
|
||||||
|
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()
|
||||||
|
},
|
||||||
|
onClear() {
|
||||||
|
this.searchValue = ''
|
||||||
|
this.value = ''
|
||||||
|
this.selectModelName = ''
|
||||||
if (this.activeTab == 'whole') {
|
if (this.activeTab == 'whole') {
|
||||||
this.list = []
|
this.list = []
|
||||||
} else if (this.activeTab == 'documentLibrary') {
|
} else if (this.activeTab == 'documentLibrary') {
|
||||||
@@ -239,6 +316,9 @@
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
activeChange() {
|
activeChange() {
|
||||||
|
this.searchValue = ''
|
||||||
|
this.value = ''
|
||||||
|
this.selectModelName = ''
|
||||||
if (this.activeTab == 'whole') {
|
if (this.activeTab == 'whole') {
|
||||||
this.list = []
|
this.list = []
|
||||||
} else if (this.activeTab == 'documentLibrary') {
|
} else if (this.activeTab == 'documentLibrary') {
|
||||||
@@ -310,6 +390,8 @@
|
|||||||
})
|
})
|
||||||
} else if (this.activeTab == 'documentLibrary') {
|
} else if (this.activeTab == 'documentLibrary') {
|
||||||
url = this.url.documentLibraryUrl
|
url = this.url.documentLibraryUrl
|
||||||
|
params.mapOne[this.selectModel] = this.value
|
||||||
|
params.selectValue = ''
|
||||||
this.getDocumentLibrary(url, params)
|
this.getDocumentLibrary(url, params)
|
||||||
} else if (this.activeTab == 'problemKnowledgeBase') {
|
} else if (this.activeTab == 'problemKnowledgeBase') {
|
||||||
url = this.url.problemKnowledgeBaseUrl
|
url = this.url.problemKnowledgeBaseUrl
|
||||||
@@ -588,7 +670,49 @@
|
|||||||
.content-box-left-monthly-En {
|
.content-box-left-monthly-En {
|
||||||
width: 2.11rem;
|
width: 2.11rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .highlight-class {
|
::v-deep .highlight-class {
|
||||||
color: #21c9cc!important;
|
color: #21c9cc !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .van-dropdown-menu {
|
||||||
|
height: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .van-dropdown-menu__title--active {
|
||||||
|
color: #21c9cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .van-dropdown-item__option--active {
|
||||||
|
color: #21c9cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .van-dropdown-item__option--active .van-dropdown-item__icon {
|
||||||
|
color: #21c9cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .van-dropdown-menu .van-dropdown-menu__bar {
|
||||||
|
height: 1.1rem;
|
||||||
|
background: #F5F6F7;
|
||||||
|
font-size: 0.38rem;
|
||||||
|
box-shadow: none;
|
||||||
|
width: 2rem;
|
||||||
|
border-top-left-radius: 0.2rem;
|
||||||
|
border-bottom-left-radius: 0.2rem;
|
||||||
|
border-right: 0.02rem #E6E7EC solid;
|
||||||
|
margin-left: 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .van-dropdown-menu__title::after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-text {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-text .van-search__content {
|
||||||
|
border-top-left-radius: 0 !important;
|
||||||
|
border-bottom-left-radius: 0 !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="fixed">
|
<div class="fixed">
|
||||||
<div class="header-search">
|
<div class="header-search">
|
||||||
<van-icon class="icon" name="arrow-left"/>
|
<!-- <van-icon class="icon" name="arrow-left"/>-->
|
||||||
<van-search v-model="value"
|
<van-search v-model="value"
|
||||||
show-action
|
@search="onSearch"
|
||||||
:action-text="$t('reset')"
|
@clear="onClear"
|
||||||
:placeholder="$t('phoneSearch')"/>
|
:placeholder="$t('phoneSearch')"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -237,6 +237,12 @@
|
|||||||
// this.getToDoProcess()
|
// this.getToDoProcess()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onSearch(){
|
||||||
|
|
||||||
|
},
|
||||||
|
onClear(){
|
||||||
|
|
||||||
|
},
|
||||||
onChange(value) {
|
onChange(value) {
|
||||||
if (value == 'search') {
|
if (value == 'search') {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
@@ -500,7 +506,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .van-search {
|
::v-deep .van-search {
|
||||||
padding: 0 0 0 0.2rem;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .van-search__action {
|
::v-deep .van-search__action {
|
||||||
|
|||||||
Reference in New Issue
Block a user