Merge branch 'dev_test' into dev_20230829_change
This commit is contained in:
@@ -17,17 +17,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 除上拉和下拉之外的loading -->
|
|
||||||
<van-loading
|
|
||||||
v-if="loading && !pullDownLoading && !pullUpLoading"
|
|
||||||
class="pageLoading"
|
|
||||||
type="spinner"
|
|
||||||
size="16px"
|
|
||||||
text-size="12px"
|
|
||||||
color="#3170A8"
|
|
||||||
style="text-align: center"
|
|
||||||
>加载中...</van-loading>
|
|
||||||
|
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
|
||||||
<!-- 上拉加载 -->
|
<!-- 上拉加载 -->
|
||||||
@@ -40,12 +29,23 @@
|
|||||||
color="#3170A8"
|
color="#3170A8"
|
||||||
style="text-align: center"
|
style="text-align: center"
|
||||||
>加载中...</van-loading>
|
>加载中...</van-loading>
|
||||||
<template v-else>
|
<template v-else-if="!loading">
|
||||||
<div v-if="isShowAll" style="font-size: 12px;text-align: center;color: #999">已加载全部数据</div>
|
<div v-if="isShowAll" style="font-size: 12px;text-align: center;color: #999">已加载全部数据</div>
|
||||||
<van-empty v-if="isEmpty" description="暂无数据" />
|
<van-empty v-if="isEmpty" description="暂无数据" />
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 除上拉和下拉之外的loading -->
|
||||||
|
<van-loading
|
||||||
|
v-if="loading && !pullDownLoading && !pullUpLoading"
|
||||||
|
class="pageLoading"
|
||||||
|
type="spinner"
|
||||||
|
size="16px"
|
||||||
|
text-size="12px"
|
||||||
|
color="#3170A8"
|
||||||
|
style="text-align: center"
|
||||||
|
>加载中...</van-loading>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -129,6 +129,10 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
data() {
|
data() {
|
||||||
|
if (this.data.length === 0) {
|
||||||
|
this.scrollTo(0,0)
|
||||||
|
this.isEmpty = true
|
||||||
|
}
|
||||||
this.refreshScroll()
|
this.refreshScroll()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -191,6 +195,7 @@ export default {
|
|||||||
// 下拉刷新回调
|
// 下拉刷新回调
|
||||||
async pullingDownHandler () {
|
async pullingDownHandler () {
|
||||||
this.showPullDownText('pullDownLoading')
|
this.showPullDownText('pullDownLoading')
|
||||||
|
this.hidePullUpText()
|
||||||
|
|
||||||
// 从第一页获取数据
|
// 从第一页获取数据
|
||||||
await this.getDataHandler(1)
|
await this.getDataHandler(1)
|
||||||
@@ -201,8 +206,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
showPullUpText () {
|
showPullUpText () {
|
||||||
this.isEmpty = false
|
this.hidePullUpText()
|
||||||
this.isShowAll = false
|
|
||||||
if (this.data.length === 0) {
|
if (this.data.length === 0) {
|
||||||
this.isEmpty = true
|
this.isEmpty = true
|
||||||
} else {
|
} else {
|
||||||
@@ -211,6 +215,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
hidePullUpText () {
|
||||||
|
this.isEmpty = false
|
||||||
|
this.isShowAll = false
|
||||||
|
},
|
||||||
showPullDownText (key) {
|
showPullDownText (key) {
|
||||||
this.isEnterThreshold = false
|
this.isEnterThreshold = false
|
||||||
this.isLeaveThreshold = false
|
this.isLeaveThreshold = false
|
||||||
|
|||||||
@@ -0,0 +1,241 @@
|
|||||||
|
<template>
|
||||||
|
<div id="database-search">
|
||||||
|
<div class="search-head">
|
||||||
|
<div class="head-title">
|
||||||
|
<span class="left-title" @click="back"> < </span>
|
||||||
|
<span class="right-title">全库搜索</span>
|
||||||
|
</div>
|
||||||
|
<van-search
|
||||||
|
v-model="searchQuery.selectValue"
|
||||||
|
show-action
|
||||||
|
placeholder="请输入搜索关键词"
|
||||||
|
@search="onSearch"
|
||||||
|
>
|
||||||
|
<template #action>
|
||||||
|
<div @click="onSearch">搜索</div>
|
||||||
|
</template>
|
||||||
|
</van-search>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<PhoneScroll
|
||||||
|
ref="scroll"
|
||||||
|
height="calc(100vh - 100px)"
|
||||||
|
:data="list"
|
||||||
|
:page="searchQuery.page"
|
||||||
|
:pageSize="searchQuery.pageSize"
|
||||||
|
:total="total"
|
||||||
|
:loading="loading"
|
||||||
|
pullUpLoad
|
||||||
|
pullDownRefresh
|
||||||
|
:getDataHandler="getData">
|
||||||
|
<div style="padding-top: 10px">
|
||||||
|
<div class="card-content" v-for="item in list" :key="item.id" @click="jumpDetails(item) ">
|
||||||
|
<div class="standTitle">
|
||||||
|
<div class="title">
|
||||||
|
<span v-html="item.title"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="standContent">
|
||||||
|
<div class="standState">标准类别:
|
||||||
|
<span v-if="item.indexType === 'stand'">国内标准</span>
|
||||||
|
<span v-if="item.indexType === 'FOREIGN'">海外标准</span>
|
||||||
|
<span v-if="item.indexType === 'bussstand'">企业标准</span>
|
||||||
|
</div>
|
||||||
|
<div class="standSubTime">发布日期: {{item.issue_time}} </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</PhoneScroll>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PhoneScroll from "@/components/hzwlComponents/phone/PhoneScroll";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "index",
|
||||||
|
components: {
|
||||||
|
PhoneScroll
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
searchQuery: {
|
||||||
|
selectIndex: 'fulltextserch',
|
||||||
|
selectValue: '',
|
||||||
|
selectType: 'titleSearch',
|
||||||
|
clientType:2,
|
||||||
|
page: 1,
|
||||||
|
pageSize: 20
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
list: [],
|
||||||
|
loading: false,
|
||||||
|
url: {
|
||||||
|
searchSarBykey: 'search/searchCenter/searchSarBykey'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// this.searchQuery.selectValue = this.$route.query.searchKey
|
||||||
|
// this.getData()
|
||||||
|
},
|
||||||
|
beforeRouteEnter (to, from, next) {
|
||||||
|
next(vm => {
|
||||||
|
if (from.name === 'phoneHome') {
|
||||||
|
vm.searchQuery.selectValue = vm.$route.query.searchKey
|
||||||
|
vm.onSearch()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onSearch () {
|
||||||
|
this.list = []
|
||||||
|
this.getData(1)
|
||||||
|
},
|
||||||
|
getData (page) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const config = {
|
||||||
|
_this: this,
|
||||||
|
loading: 'loading'
|
||||||
|
}
|
||||||
|
if (page) {
|
||||||
|
this.searchQuery.page = page
|
||||||
|
}
|
||||||
|
this.$http._postData(this.url.searchSarBykey, this.searchQuery, config).then(res => {
|
||||||
|
if (res.ok) {
|
||||||
|
this.total = res.data.count
|
||||||
|
if (this.searchQuery.page === 1) {
|
||||||
|
this.list = res.data.list
|
||||||
|
} else {
|
||||||
|
this.list = [...this.list, ...res.data.list]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
back(){
|
||||||
|
this.$router.push('/phoneHome')
|
||||||
|
},
|
||||||
|
jumpDetails(item){
|
||||||
|
if(item.indexType === 'stand' ){
|
||||||
|
this.$router.push({
|
||||||
|
name: 'domesticDetails',
|
||||||
|
query: {
|
||||||
|
id: item.id,
|
||||||
|
pageType: 'INLAND_STAND'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else if(item.indexType === 'FOREIGN'){
|
||||||
|
this.$router.push({
|
||||||
|
name: 'domesticDetails',
|
||||||
|
query: {
|
||||||
|
id: item.id,
|
||||||
|
pageType: 'FOREIGN_STAND'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (item.indexType === 'bussstand') {
|
||||||
|
this.$router.push({
|
||||||
|
name: 'domesticDetails',
|
||||||
|
query: {
|
||||||
|
id: item.id,
|
||||||
|
pageType: 'BUSS'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
#database-search {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background: #F6F6F6;
|
||||||
|
|
||||||
|
.search-head {
|
||||||
|
width: 100%;
|
||||||
|
height: 100px;
|
||||||
|
background: #3170A8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-title {
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 18px;
|
||||||
|
|
||||||
|
.left-title {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-title {
|
||||||
|
float: right;
|
||||||
|
margin-right: 40%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.van-search {
|
||||||
|
background: #3170A8;
|
||||||
|
padding: 10px 12px 0 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.van-search__content {
|
||||||
|
background: #8DB2D0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.van-search__action {
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-content {
|
||||||
|
width: 95%;
|
||||||
|
height: auto;
|
||||||
|
margin: 10px;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
|
.standTitle {
|
||||||
|
.title {
|
||||||
|
font-size: 3.4vw;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 600;
|
||||||
|
height: auto;
|
||||||
|
line-height: 20px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
text-align: left;
|
||||||
|
border-bottom: 1px solid #cccccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.standContent {
|
||||||
|
font-size: 3.4vw;
|
||||||
|
color: #555555;
|
||||||
|
font-weight: 450;
|
||||||
|
margin-top: 5px;
|
||||||
|
|
||||||
|
.standState {
|
||||||
|
padding-left: 10px;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.standSubTime {
|
||||||
|
font-size: 3.4vw;
|
||||||
|
padding-left: 10px;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-content:first-child{
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -183,10 +183,10 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
onSearch () {
|
onSearch () {
|
||||||
this.list = []
|
this.list = []
|
||||||
this.searchQuery.page = 1
|
// this.searchQuery.page = 1
|
||||||
// 返回顶部
|
// // 返回顶部
|
||||||
this.$refs.scroll.scrollTo(0, 0)
|
// this.$refs.scroll.scrollTo(0, 0)
|
||||||
this.getData()
|
this.getData(1)
|
||||||
},
|
},
|
||||||
getData (page) {
|
getData (page) {
|
||||||
switch (this.$route.query.standType) {
|
switch (this.$route.query.standType) {
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ export default {
|
|||||||
setChecked (currentData) {
|
setChecked (currentData) {
|
||||||
this.currentSearch = currentData
|
this.currentSearch = currentData
|
||||||
this.searchQuery.treeId = currentData.id || ''
|
this.searchQuery.treeId = currentData.id || ''
|
||||||
this.searchQuery.page = 1
|
this.list = []
|
||||||
this.getData()
|
this.getData(1)
|
||||||
},
|
},
|
||||||
getData (page) {
|
getData (page) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
:style="{ height: '100%', width: '90%' }"
|
:style="{ height: '100%', width: '90%' }"
|
||||||
round
|
round
|
||||||
:close-on-click-overlay="false"
|
:close-on-click-overlay="false"
|
||||||
@click-overlay="handleCancel">
|
@click-overlay="handleCancel"
|
||||||
|
get-container="body">
|
||||||
<h3 class="popup-title">
|
<h3 class="popup-title">
|
||||||
<span>体系结构</span>
|
<span>体系结构</span>
|
||||||
<van-icon name="cross" size="22px" @click="handleCancel" />
|
<van-icon name="cross" size="22px" @click="handleCancel" />
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<span style="font-size:18px"> {{ node.label }} </span>
|
<span style="font-size:18px"> {{ node.label }} </span>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
<loading :loading="loading">加载中...</loading>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -31,7 +32,8 @@ export default {
|
|||||||
label: 'name',
|
label: 'name',
|
||||||
children: 'children'
|
children: 'children'
|
||||||
},
|
},
|
||||||
currentKey: ''
|
currentKey: '',
|
||||||
|
loading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -39,10 +41,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getTreeData () {
|
getTreeData () {
|
||||||
|
this.loading = true
|
||||||
this.$http._getData('fileMaterialCenter/zlTree').then(res => {
|
this.$http._getData('fileMaterialCenter/zlTree').then(res => {
|
||||||
if (res.ok && res.data) {
|
if (res.ok && res.data) {
|
||||||
this.treeList = res.data
|
this.treeList = res.data
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
filterNode (value, data) {
|
filterNode (value, data) {
|
||||||
|
|||||||
@@ -96,12 +96,22 @@ const routes = [
|
|||||||
component: () =>
|
component: () =>
|
||||||
import('@/pages/phone/phoneHome')
|
import('@/pages/phone/phoneHome')
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
path: '/databaseSearch',
|
path: '/databaseSearch',
|
||||||
name: 'databaseSearch',
|
name: 'databaseSearch',
|
||||||
component: () =>
|
component: () =>
|
||||||
import('@/pages/phone/databaseSearch')
|
import('@/pages/phone/databaseSearch')
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
path: '/databaseSearch',
|
||||||
|
name: 'databaseSearch',
|
||||||
|
component: () => import('@/pages/phone/databaseSearch/index'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/standDynamics',
|
path: '/standDynamics',
|
||||||
name: 'standDynamics',
|
name: 'standDynamics',
|
||||||
|
|||||||
Reference in New Issue
Block a user