手机端页面
This commit is contained in:
@@ -17,24 +17,26 @@
|
||||
</template>
|
||||
</van-search>
|
||||
</div>
|
||||
<div v-if="loading">
|
||||
<van-loading size="24px" color="#3170A8">加载中...</van-loading>
|
||||
</div>
|
||||
<div v-else-if="!loading && standList.length" class="card-content" v-for="item in standList" :key="item.id">
|
||||
<div class="standTitle">
|
||||
<div class="title">{{item.title}}</div>
|
||||
<div class="card-box">
|
||||
<div v-if="loading">
|
||||
<van-loading size="24px" color="#3170A8">加载中...</van-loading>
|
||||
</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 v-else-if="!loading && standList.length" class="card-content" v-for="item in standList" :key="item.id">
|
||||
<div class="standTitle">
|
||||
<div class="title">{{item.title}}</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 class="standSubTime">发布日期: {{item.issue_time}} </div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="!loading && !standList.length">
|
||||
<van-empty description="暂无数据" />
|
||||
<div v-else-if="!loading && !standList.length">
|
||||
<van-empty description="暂无数据" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -83,12 +85,16 @@ export default {
|
||||
#database-search{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #F6F6F6;
|
||||
.search-head{
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
background: #3170A8;
|
||||
}
|
||||
.head-title{
|
||||
@@ -123,6 +129,11 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.card-box{
|
||||
height: 100%;
|
||||
position: relative;
|
||||
top: 100px;
|
||||
}
|
||||
.card-content{
|
||||
width: 95%;
|
||||
height: auto;
|
||||
@@ -159,7 +170,7 @@ export default {
|
||||
}
|
||||
.van-loading {
|
||||
position: absolute;
|
||||
top: 52%;
|
||||
top: 40%;
|
||||
left: 37%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<!--详情页-->
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "domesticDetails"
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="search-head">
|
||||
<div class="head-title">
|
||||
<span class="left-title" @click="back"> < </span>
|
||||
<span class="right-title">国内标准法规库</span>
|
||||
<span class="right-title">{{titleName}}</span>
|
||||
</div>
|
||||
<van-search
|
||||
v-model="searchKey"
|
||||
@@ -17,50 +17,67 @@
|
||||
</template>
|
||||
</van-search>
|
||||
</div>
|
||||
<div v-if="loading">
|
||||
<van-loading size="24px" color="#3170A8">加载中...</van-loading>
|
||||
</div>
|
||||
<div v-else-if="!loading && standList.length" class="card-content" v-for="item in standList" :key="item.id">
|
||||
<div class="standTitle">
|
||||
<div class="title">{{item.standSortShow + '  ' + item.standNumber + '-' + item.standYear }}</div>
|
||||
<div class="card-box">
|
||||
<div v-if="loading">
|
||||
<van-loading size="24px" color="#3170A8">加载中...</van-loading>
|
||||
</div>
|
||||
<div class="standContent">
|
||||
<div class="standState">{{item.standName}}</div>
|
||||
<div class="standSubTime">标准性质:
|
||||
<!-- {{ natureMap[item.standNature] }}-->
|
||||
<span v-if="natureMap[item.standNature] === '强制性' "
|
||||
style="color: #F56C6C; padding-left: 5px;">
|
||||
<div v-else-if="!loading && standList.length" class="card-content" v-for="item in standList" :key="item.id">
|
||||
<div class="standTitle">
|
||||
<div v-if="titleType === 'POLICY'" class="title">{{item.lawsNumber}}</div>
|
||||
<div v-else class="title">{{item.standSortShow + '  ' + item.standNumber + '-' + item.standYear }}</div>
|
||||
</div>
|
||||
<div class="standContent">
|
||||
<div class="standState">{{item.standName}}</div>
|
||||
<div class="standSubTime">标准性质:
|
||||
<span v-if="natureMap[item.standNature] === '强制性' "
|
||||
style="color: #F56C6C; padding-left: 5px;">
|
||||
{{ natureMap[item.standNature] }}
|
||||
</span>
|
||||
<span v-if="natureMap[item.standNature] === '推荐性' "
|
||||
style="color: #E57800; padding-left: 5px;">
|
||||
<span v-if="natureMap[item.standNature] === '推荐性' "
|
||||
style="color: #E57800; padding-left: 5px;">
|
||||
{{ natureMap[item.standNature] }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="standSubTime">标准状态:
|
||||
<span v-if="textStatusMap[item.textStatus] === '废止' || textStatusMap[item.textStatus] === '被代替'"
|
||||
style="color: #F56C6C; padding-left: 5px;">
|
||||
</div>
|
||||
<div class="standSubTime" v-if="titleType === 'POLICY'">标准状态:
|
||||
<span v-if="lawsMap[item.lawsTextState] === '作废' || lawsMap[item.lawsTextState] === '被代替'"
|
||||
style="color: #F56C6C; padding-left: 5px;">
|
||||
{{ lawsMap[item.lawsTextState] }}
|
||||
</span>
|
||||
<span v-else-if="lawsMap[item.lawsTextState] === '参考' || lawsMap[item.lawsTextState] === '现行有效'"
|
||||
style="color: #98E165; padding-left: 5px;">
|
||||
{{ lawsMap[item.lawsTextState] }}
|
||||
</span>
|
||||
<span v-else style=" padding-left: 5px;">
|
||||
{{ lawsMap[item.lawsTextState] }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="standSubTime" v-else >标准状态:
|
||||
<span v-if="textStatusMap[item.textStatus] === '废止' || textStatusMap[item.textStatus] === '被代替'"
|
||||
style="color: #F56C6C; padding-left: 5px;">
|
||||
{{ textStatusMap[item.textStatus] }}
|
||||
</span>
|
||||
<span v-else-if="textStatusMap[item.textStatus] === '参考' || textStatusMap[item.textStatus] === '现行有效'"
|
||||
style="color: #98E165; padding-left: 5px;">
|
||||
<span v-else-if="textStatusMap[item.textStatus] === '参考' || textStatusMap[item.textStatus] === '现行有效'"
|
||||
style="color: #98E165; padding-left: 5px;">
|
||||
{{ textStatusMap[item.textStatus] }}
|
||||
</span>
|
||||
<span v-else style=" padding-left: 5px;">
|
||||
<span v-else style=" padding-left: 5px;">
|
||||
{{ textStatusMap[item.textStatus] }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-time">
|
||||
<div style="margin-top: 10px">
|
||||
<span style="padding: 20px;">发布日期: {{item.issueTime}}</span>
|
||||
<span style="padding: 20px;">实施日期: {{item.putTime}}</span>
|
||||
</div>
|
||||
<div class="content-time">
|
||||
<div style="margin-top: 10px">
|
||||
<span style="padding: 20px;">发布日期:
|
||||
{{ item.issueTime ? $moment(item.issueTime).format("YYYY-MM-DD") : "" }}</span>
|
||||
<span style="padding: 20px;" v-if="titleType === 'POLICY'">实施日期: {{item.XCXSSRQLAWS}}</span>
|
||||
<span style="padding: 20px;" v-else>实施日期: {{item.putTime}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="!loading && !standList.length">
|
||||
<van-empty description="暂无数据" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="!loading && !standList.length">
|
||||
<van-empty description="暂无数据" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -71,31 +88,86 @@ export default {
|
||||
data(){
|
||||
return{
|
||||
searchKey: '',
|
||||
titleType: '',
|
||||
titleName: '',
|
||||
loading: true,
|
||||
standList: [],
|
||||
standStateOptions: [], //存放文本状态
|
||||
standStateOptions: [], //标准文本状态
|
||||
lawsTextStateOptions: [], //政策文本状态
|
||||
standNatureOptions: [],
|
||||
textStatusMap: {},// 文本状态id与name对应
|
||||
natureMap:{},
|
||||
lawsMap:{},
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
onSearch(){
|
||||
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',{
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
standType: 'INLAND'
|
||||
},{
|
||||
_this: this
|
||||
},res=>{
|
||||
if (res.ok){
|
||||
this.standList = res.data.list
|
||||
this.loading = false
|
||||
}else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
},e=>{
|
||||
})
|
||||
if(this.titleType === 'INLAND'){
|
||||
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',{
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
standType: 'INLAND'
|
||||
},{
|
||||
_this: this
|
||||
},res=>{
|
||||
if (res.ok){
|
||||
this.standList = res.data.list
|
||||
this.loading = false
|
||||
}else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
},e=>{
|
||||
})
|
||||
}else if(this.titleType === 'FOREIGN'){
|
||||
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',{
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
standType: 'FOREIGN'
|
||||
},{
|
||||
_this: this
|
||||
},res=>{
|
||||
if (res.ok){
|
||||
this.standList = res.data.list
|
||||
this.loading = false
|
||||
}else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
},e=>{
|
||||
})
|
||||
}else if(this.titleType === 'POLICY'){
|
||||
this.$http.get('lawss/sarLawsInfo/page',{
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
},{
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok){
|
||||
this.standList = res.data.list
|
||||
this.loading = false
|
||||
}else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}, e =>{
|
||||
console.log(e);
|
||||
})
|
||||
}else{
|
||||
this.$http.get("/lawss/NewsFeed/getNewsFeed", {
|
||||
messageType: 'ZYBZFG',
|
||||
page: 1,
|
||||
paeSize: 10
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok){
|
||||
this.standList = res.data
|
||||
this.loading = false
|
||||
}else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}, e => {
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
},
|
||||
//返回上一个页面
|
||||
back(){
|
||||
@@ -111,17 +183,27 @@ export default {
|
||||
data.forEach(item => {
|
||||
this.$set(this.natureMap, item.value, item.label);
|
||||
});
|
||||
}
|
||||
},
|
||||
setLaws(data) {
|
||||
data.forEach(item => {
|
||||
this.$set(this.lawsMap, item.value, item.label);
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.titleType = this.$route.query.standType
|
||||
this.titleName = this.titleType === 'INLAND' ? '国内标准法规库' : (this.titleType === 'FOREIGN' ? '海外标准法规库' : this.titleType === 'POLICY' ? '国内外政策库' : '标准化动态库' )
|
||||
this.onSearch()
|
||||
//从数据库中查询下拉框数据
|
||||
this.$http.get("sys/dictype/getDicTypeListCode", {}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.standStateOptions = res.data.WBZTCLASS; // 文本状态
|
||||
this.standStateOptions = res.data.WBZTCLASS; // 标准文本状态
|
||||
this.lawsTextStateOptions = res.data.lawsTextState //政策文本状态
|
||||
console.log(this.lawsTextStateOptions);
|
||||
this.standNatureOptions = res.data.SARPROPERTY // 标准性质
|
||||
this.setMap(this.standStateOptions);
|
||||
this.setLaws(this.lawsTextStateOptions);
|
||||
this.setNature(this.standNatureOptions)
|
||||
});
|
||||
}
|
||||
@@ -132,12 +214,16 @@ export default {
|
||||
#domestic-stand{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #F6F6F6;
|
||||
.search-head{
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
background: #3170A8;
|
||||
}
|
||||
.head-title{
|
||||
@@ -162,6 +248,11 @@ export default {
|
||||
.van-search__action{
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.card-box{
|
||||
height: 100%;
|
||||
position: relative;
|
||||
top: 100px;
|
||||
}
|
||||
.card-content{
|
||||
width: 95%;
|
||||
height: auto;
|
||||
@@ -204,7 +295,7 @@ export default {
|
||||
}
|
||||
.van-loading {
|
||||
position: absolute;
|
||||
top: 52%;
|
||||
top: 40%;
|
||||
left: 37%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,19 +19,19 @@
|
||||
</van-search>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content-top" style="margin-top: 10px">
|
||||
<div class="content-top" style="margin-top: 10px" @click="standChange('INLAND')">
|
||||
<div class="content-box content-box1"></div>
|
||||
<span class="content-span">国内标准法规</span>
|
||||
</div>
|
||||
<div class="content-top" style="margin-top: 10px">
|
||||
<div class="content-top" style="margin-top: 10px" @click="standChange('FOREIGN')">
|
||||
<div class="content-box content-box2"></div>
|
||||
<span class="content-span">海外标准法规</span>
|
||||
</div>
|
||||
<div class="content-top">
|
||||
<div class="content-top" @click="standChange('POLICY')">
|
||||
<div class="content-box content-box3"></div>
|
||||
<span class="content-span">国内外政策</span>
|
||||
</div>
|
||||
<div class="content-top">
|
||||
<div class="content-top" @click="standChange('DYNAMIC')">
|
||||
<div class="content-box content-box4"></div>
|
||||
<span class="content-span">标准化动态</span>
|
||||
</div>
|
||||
@@ -55,17 +55,14 @@ export default {
|
||||
searchKey: this.searchKey
|
||||
},
|
||||
})
|
||||
// this.$http.post('search/searchCenter/searchSarBykey',{
|
||||
// selectIndex: 'fulltextserch',
|
||||
// selectValue: this.searchKey,
|
||||
// selectType: 'titleSearch',
|
||||
// page: 1,
|
||||
// pageSize: 20
|
||||
// },{
|
||||
// _this: this,
|
||||
// }, res => {
|
||||
// console.log(res.data);
|
||||
// })
|
||||
},
|
||||
standChange(type){
|
||||
this.$router.push({
|
||||
name: 'domesticStand',
|
||||
query:{
|
||||
standType: type,
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user