diff --git a/src/pages/phone/domesticStand/index.vue b/src/pages/phone/domesticStand/index.vue index 7020af7aa..82d943727 100644 --- a/src/pages/phone/domesticStand/index.vue +++ b/src/pages/phone/domesticStand/index.vue @@ -8,7 +8,7 @@
-
{{item.lawsNumber}}
-
{{ item.stand_code || item.numbershow }}
+
{{ convertTitle(item.standSort, item.standNumber, item.standYear) }}
+
{{ item.standCode || convertTitle(item.standSort, item.standNumber, item.standYear) }}
-
{{(item.nameshow && item.nameshow !== '') ? item.nameshow : (item.standName && item.standName !== '') ? item.standName : item.standEnName }}
-
标准状态: - - {{ lawsMap[item.lawsTextState] }} - - - {{ lawsMap[item.lawsTextState] }} - - - {{ lawsMap[item.lawsTextState] }} - -
-
标准状态: - {{ item.textStatusBussName }} - {{ item.textStatusBussName }} - {{ item.textStatusBussName }} -
-
标准状态: - - {{ textStatusMap[item.textStatus] }} - - - {{ textStatusMap[item.textStatus] }} - - - {{ textStatusMap[item.textStatus] }} - -
+
{{ item.standName || item.standEnName || '-' }}
+ +
-
- - 发布日期: {{ item.issueTime ? (item.issueTime !== '' ? $moment(item.issueTime).format("YYYY-MM-DD") : " ") : " " }} - - 实施日期: {{item.XCXSSRQLAWS}} - 实施日期: {{item.putTime}} - 实施日期: {{item.SSRQ}} -
+
发布日期: {{ convertTime(item.issueTime) }}
+
- + @@ -109,12 +93,10 @@ export default { }, data () { const searchQuery = { - selectIndex: 'stand', - selectValue: '', - standSystem: [], - textStatus: '全部', - selectType: 'titleSearch', standType: 'INLAND', + findValue: '', + textState: '全部', + menuId: '', page: 1, pageSize: 20 } @@ -126,7 +108,9 @@ export default { loading: false, list: [], url: { - searchSarBykey: 'search/searchCenter/searchSarBykey' + searchSarBykey: 'search/searchCenter/searchSarBykey', + getSarStandardsInfoPageForPhone: 'sarStandardsInfo/sar-standards-info/getSarStandardsInfoPageForPhone', + getSarBussionStandPageForPhone: 'lawss/sarBussionessStand/getSarBussionStandPageForPhone' }, textStatusMap: {}, natureMap:{}, @@ -147,9 +131,6 @@ export default { case 'bussstand': vm.titleName = '企业标准' break - case 'POLICY': - vm.titleName = '国内外政策库' - break } vm.searchQuery = { ...vm.initSearQuery } vm.$refs.standardSystemPopupRef.initOpen() @@ -183,6 +164,31 @@ export default { // this.getData() }, methods: { + convertTitle (standSort, standName, standYear) { + if (!standYear || standYear === '') { + return standSort + ' ' + standName + } else { + return standSort + ' ' + standName + '-' + standYear + } + }, + convertTime (time) { + if (!time || time === '') { + return '-' + } else { + const timeArr = time.split(',') + if (timeArr.length === 1) { + return this.$moment(time).format('YYYY-MM-DD') + } else { + return this.$moment(timeArr[0]).format('YYYY-MM-DD') + ',...' + } + } + }, + convertId (idArr) { + if (idArr === '') { + return [] + } + return idArr.split(',') + }, onSearch () { this.list = [] // this.searchQuery.page = 1 @@ -193,21 +199,14 @@ export default { getData (page) { switch (this.$route.query.standType) { case 'INLAND': - this.searchQuery.selectIndex = 'stand' this.searchQuery.standType = 'INLAND' break case 'FOREIGN': - this.searchQuery.selectIndex = 'stand' this.searchQuery.standType = 'FOREIGN' break case 'bussstand': - this.searchQuery.selectIndex = 'bussstand' this.searchQuery.standType = 'bussstand' break - case 'POLICY': - this.searchQuery.selectIndex = 'laws' - this.searchQuery.standType = 'laws' - break } return new Promise((resolve, reject) => { const config = { @@ -217,7 +216,11 @@ export default { if (page) { this.searchQuery.page = page } - this.$http._post("search/searchCenter/searchSarBykey", this.searchQuery, config).then(res => { + let url = this.url.getSarStandardsInfoPageForPhone + if (this.$route.query.standType === 'bussstand') { + url = this.url.getSarBussionStandPageForPhone + } + this.$http._getData(url, this.searchQuery, config).then(res => { if (res.ok) { this.total = res.data.count @@ -236,8 +239,8 @@ export default { this.$refs.standardSystemPopupRef.open() }, setSearchQuery (searchQuery) { - this.searchQuery.standSystem = searchQuery.checkedKeys - this.searchQuery.textStatus = searchQuery.textStatusName + this.searchQuery.menuId = searchQuery.checkedKeys.join(',') + this.searchQuery.textState = searchQuery.textStatusName this.onSearch() }, getDicTypeListCode () { @@ -371,8 +374,10 @@ export default { font-size: 3.4vw; width: 100%; height: 35px; - margin-top: 5px; + line-height: 35px; + padding: 0 10px; border-top: 1px solid #cccccc; + display: flex; } } .card-content:first-child{ diff --git a/src/pages/phone/standDynamics/components/Standard.vue b/src/pages/phone/standDynamics/components/Standard.vue index 9b68a6ee2..e39938bd6 100644 --- a/src/pages/phone/standDynamics/components/Standard.vue +++ b/src/pages/phone/standDynamics/components/Standard.vue @@ -65,7 +65,17 @@ export default { }, methods: { convertTime (time) { - return time !== '' ? this.$moment(time).format('YYYY-MM-DD') : '-' + // return (time && time !== '') ? this.$moment(time).format('YYYY-MM-DD') : '-' + if (!time || time === '') { + return '-' + } else { + const timeArr = time.split(',') + if (timeArr.length === 1) { + return this.$moment(time).format('YYYY-MM-DD') + } else { + return this.$moment(timeArr[0]).format('YYYY-MM-DD') + ',...' + } + } }, getData (page) { return new Promise((resolve, reject) => { diff --git a/src/pages/phone/standDynamics/index.vue b/src/pages/phone/standDynamics/index.vue index 0c8c10fb1..3dbd3e743 100644 --- a/src/pages/phone/standDynamics/index.vue +++ b/src/pages/phone/standDynamics/index.vue @@ -19,9 +19,9 @@ - - - + + +