From 08953ff36d216248e3e16b4a316b1a6e5dd94a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Mon, 30 May 2022 16:03:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E7=AB=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/navMenu/index.vue | 10 +- .../personal/pages/my-questions/index.vue | 95 +++++++-- src/pages/phone/databaseSearch.vue | 43 ++-- src/pages/phone/domesticDetails.vue | 14 ++ src/pages/phone/domesticStand.vue | 191 +++++++++++++----- src/pages/phone/phoneHome.vue | 27 ++- src/router/index.js | 8 +- 7 files changed, 287 insertions(+), 101 deletions(-) create mode 100644 src/pages/phone/domesticDetails.vue diff --git a/src/components/navMenu/index.vue b/src/components/navMenu/index.vue index 8f723900c..36144e893 100644 --- a/src/components/navMenu/index.vue +++ b/src/components/navMenu/index.vue @@ -471,11 +471,11 @@ // path: '/forward', // menuId: 'K45Y9TGKZV2K4XP4CETD' // }, - // { - // title: '我的问答', - // path: '/questions', - // menuId: '' - // }, + { + title: '我的问答', + path: '/questions', + menuId: '' + }, { title: '我的板块', path: '/plate', diff --git a/src/pages/personal/pages/my-questions/index.vue b/src/pages/personal/pages/my-questions/index.vue index 32711a849..a17b81c72 100644 --- a/src/pages/personal/pages/my-questions/index.vue +++ b/src/pages/personal/pages/my-questions/index.vue @@ -1,6 +1,28 @@ @@ -44,6 +83,11 @@ export default { }, data(){ return{ + questionSerach:{ + standNumber: '', + standName: '', + keyCode: '', + }, questionList: [{ title: '问题1', name: '1', @@ -69,15 +113,33 @@ export default { height: 100%; background: #F5F7FA; margin-bottom: 10px; - .type-tabs{ + .type-tabs { /deep/.el-tabs__header { margin-right: 0; } + /deep/.el-tabs__content { + padding: 0; + .el-tab-pane { + height: 100%; + } + } } - .question-tabs{ + .question-tabs { height: 100%; - /deep/.el-tabs__item{ - height: 100%; + border-top: none; + border-bottom: none; + /deep/.el-tabs__nav { + height: calc(~'100% - 50px'); + overflow: auto; + } + /deep/ &.el-tabs--border-card .el-tabs__item { + height: 65px; + border-color: #d1dbe5 transparent; + text-align: left; + border-top-color: transparent; + &.is-active { + border-top-color: #d1dbe5; + } } } /deep/.el-tabs__content{ @@ -87,5 +149,10 @@ export default { /deep/.el-tab-pane{ height: 100%; } + .com-box{ + /deep/.el-tabs__item .is-left{ + height: auto; + } + } } diff --git a/src/pages/phone/databaseSearch.vue b/src/pages/phone/databaseSearch.vue index f475e0050..fb21954d2 100644 --- a/src/pages/phone/databaseSearch.vue +++ b/src/pages/phone/databaseSearch.vue @@ -17,24 +17,26 @@ -
- 加载中... -
-
-
-
{{item.title}}
+
+
+ 加载中...
-
-
标准类别: - 国内标准 - 海外标准 - 企业标准 +
+
+
{{item.title}}
+
+
+
标准类别: + 国内标准 + 海外标准 + 企业标准 +
+
发布日期: {{item.issue_time}}
-
发布日期: {{item.issue_time}}
-
-
- +
+ +
@@ -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%; } } diff --git a/src/pages/phone/domesticDetails.vue b/src/pages/phone/domesticDetails.vue new file mode 100644 index 000000000..f42e31f8c --- /dev/null +++ b/src/pages/phone/domesticDetails.vue @@ -0,0 +1,14 @@ + + + + + + diff --git a/src/pages/phone/domesticStand.vue b/src/pages/phone/domesticStand.vue index 75357e688..d06bfed97 100644 --- a/src/pages/phone/domesticStand.vue +++ b/src/pages/phone/domesticStand.vue @@ -4,7 +4,7 @@
< - 国内标准法规库 + {{titleName}}
-
- 加载中... -
-
-
-
{{item.standSortShow + '  ' + item.standNumber + '-' + item.standYear }}
+
+
+ 加载中...
-
-
{{item.standName}}
-
标准性质: - - +
+
+
{{item.lawsNumber}}
+
{{item.standSortShow + '  ' + item.standNumber + '-' + item.standYear }}
+
+
+
{{item.standName}}
+
标准性质: + {{ natureMap[item.standNature] }} - + {{ natureMap[item.standNature] }} -
-
标准状态: - +
+
标准状态: + + {{ lawsMap[item.lawsTextState] }} + + + {{ lawsMap[item.lawsTextState] }} + + + {{ lawsMap[item.lawsTextState] }} + +
+
标准状态: + {{ textStatusMap[item.textStatus] }} - + {{ textStatusMap[item.textStatus] }} - + {{ textStatusMap[item.textStatus] }} +
-
-
-
- 发布日期: {{item.issueTime}} - 实施日期: {{item.putTime}} -
+
+
+ 发布日期: + {{ item.issueTime ? $moment(item.issueTime).format("YYYY-MM-DD") : "" }} + 实施日期: {{item.XCXSSRQLAWS}} + 实施日期: {{item.putTime}} +
+
+
+
+
-
-
-
@@ -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%; } } diff --git a/src/pages/phone/phoneHome.vue b/src/pages/phone/phoneHome.vue index d8df30607..ce9f54a05 100644 --- a/src/pages/phone/phoneHome.vue +++ b/src/pages/phone/phoneHome.vue @@ -19,19 +19,19 @@
-
+
国内标准法规
-
+
海外标准法规
-
+
国内外政策
-
+
标准化动态
@@ -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, + } + }) }, } }; diff --git a/src/router/index.js b/src/router/index.js index 3c8d2d028..3610e796e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -78,6 +78,12 @@ const routes = [ component: () => import('@/pages/phone/domesticStand') }, + { + path: '/domesticDetails', + name: 'domesticDetails', + component: () => + import('@/pages/phone/domesticDetails') + }, { path: '/loginVerify', name: 'LoginVerify', @@ -274,7 +280,7 @@ const routes = [ title: '我的问答', menuId: '' } - } + }, // { // path: '/questionsAndAnswers', // name: 'QuestionsAndAnswers', From 5cc225d5a2c653154b475e170c850152d7c0bece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Tue, 31 May 2022 09:30:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E7=AB=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 1 + src/pages/phone/databaseSearch.vue | 46 +- src/pages/phone/domesticDetails.vue | 4205 ++++++++++++++++++++++++++- 3 files changed, 4241 insertions(+), 11 deletions(-) diff --git a/src/App.vue b/src/App.vue index 1743c2d93..a35f61126 100644 --- a/src/App.vue +++ b/src/App.vue @@ -221,6 +221,7 @@ export default { && this.$route.name !== 'loginStandDetails' && this.$route.name !== 'error' && this.$route.name !== 'phoneHome'&& this.$route.name !== 'databaseSearch' && this.$route.name !== 'standDynamics' && this.$route.name !== 'domesticStand' + && this.$route.name !== 'domesticDetails' && this.$route.name !== 'OtherStandardExternalDetails' && this.$route.name !== 'OtherStandardExternalDetails') { this.isBoolean = true } else { diff --git a/src/pages/phone/databaseSearch.vue b/src/pages/phone/databaseSearch.vue index fb21954d2..71bb66fae 100644 --- a/src/pages/phone/databaseSearch.vue +++ b/src/pages/phone/databaseSearch.vue @@ -17,11 +17,11 @@
-
+
加载中...
-
+
{{item.title}}
@@ -46,23 +46,45 @@ export default { name: "databaseSearch", data(){ return{ + scrolled: '', + moreFlag: false, searchKey: '', standList: [], loading: true, + page: 1, } }, methods: { + scrool(){ + let scrolled = this.$refs.cardBox.scrollTop + //获得可视区的高度 + const windowHeight = this.$refs.cardBox.clientHeight + //获取滚动条的总高度 + const scrollHeight = this.$refs.cardBox.scrollHeight + let windowScrolled = scrolled + windowHeight + this.scrolled = scrolled + if(scrollHeight - windowScrolled < 600 ){ + //把距离顶部的距离加上可视区域的高度 等于或者大于滚动条的总高度就是到达底部 + this.moreFlag = true + this.page++ + } + }, onSearch(){ + this.moreFlag = false this.$http.post('search/searchCenter/searchSarBykey',{ selectIndex: 'fulltextserch', selectValue: this.searchKey, selectType: 'titleSearch', - page: 1, + page: this.page, pageSize: 20 },{ _this: this, }, res => { - this.standList = res.data.list + if(this.standList.length){ + this.standList = this.standList.concat(res.data.list) + }else{ + this.standList = res.data.list + } console.log(this.standList); this.loading = false }, e => { @@ -73,11 +95,21 @@ export default { back(){ this.$router.push('/phoneHome') }, + jumpDetails(item){ + this.$router.push({ + name: 'domesticDetails', + query: { + id: item.id, + pageType: 'INLAND_STAND' + } + }) + }, }, mounted(){ this.searchKey = this.$route.query.searchKey this.onSearch() - } + this.$refs.cardBox.addEventListener('scroll', this.scrool); + }, }; @@ -85,7 +117,6 @@ export default { #database-search{ width: 100%; height: 100%; - overflow: auto; margin: 0; padding: 0; background: #F6F6F6; @@ -130,8 +161,9 @@ export default { } } .card-box{ - height: 100%; + height: 85%; position: relative; + overflow-y: scroll; top: 100px; } .card-content{ diff --git a/src/pages/phone/domesticDetails.vue b/src/pages/phone/domesticDetails.vue index f42e31f8c..cfcf218d3 100644 --- a/src/pages/phone/domesticDetails.vue +++ b/src/pages/phone/domesticDetails.vue @@ -1,14 +1,4211 @@ - + - From 449b202f6d6d187fd446d117c03084927d2bdd86 Mon Sep 17 00:00:00 2001 From: super_liu <396572590@qq.com> Date: Tue, 31 May 2022 14:10:33 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20There=20is=20no=20way=20the,=20es?= =?UTF-8?q?=20=E6=A0=87=E5=87=86=E8=B5=84=E6=BA=90=E6=9F=A5=E8=AF=A2=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E6=A3=80=E7=B4=A2=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/home2/components/searchGroup/index.vue | 1 - src/pages/searchCenter/pages/advancedSearch.vue | 2 +- src/pages/searchCenter/pages/standardSearch.vue | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/home2/components/searchGroup/index.vue b/src/pages/home2/components/searchGroup/index.vue index 952a5ca66..4c1023c35 100644 --- a/src/pages/home2/components/searchGroup/index.vue +++ b/src/pages/home2/components/searchGroup/index.vue @@ -16,7 +16,6 @@