diff --git a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue index b32812f46..7dfb8c9e8 100644 --- a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue +++ b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue @@ -3365,7 +3365,7 @@ export default { } break case 'textStatus' : - this.orderBy = 5; + this.orderBy = 4; this.nowOrder = sortObj.column.order if (this.nowOrder === 'ascending') { this.nowOrder = 2 diff --git a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue index aabb2621b..32e461b03 100644 --- a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue +++ b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue @@ -279,6 +279,7 @@ border class="drag-table" :row-class-name="dragRowClassName" + @sort-change="sortChange" :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', fontWeight: 'bold', height: '48px'}" @selection-change="standSelectChange" @@ -793,6 +794,7 @@ height="100%" border :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}" + @sort-change="sortChangeConfig" @selection-change="selectConfigStandChange"> { for (let i = 0; i < res.data.list.length; i++) { @@ -3583,6 +3628,48 @@ export default { dragRowClassName (row, index) { return 'drag-row' + ' ' + 'id=' + row.row.id }, + // 表格排序 + sortChange(sortObj) { + if (sortObj.column.order !== 'normal') { + this.nowOrder = '' + this.orderBy = '' + switch (sortObj.column.property) { + case 'issueTime' : + // 后台联调 + this.orderBy = 1; + this.nowOrder = sortObj.column.order + if (this.nowOrder === 'ascending') { + this.nowOrder = 2 + } else if (this.nowOrder === 'descending') { + this.nowOrder = 1 + } + break + case 'putTime' : + // 后台联调 + this.orderBy = 2; + this.nowOrder = sortObj.column.order + if (this.nowOrder === 'ascending') { + this.nowOrder = 2 + } else if (this.nowOrder === 'descending') { + this.nowOrder = 1 + } + break + case 'standStatusShow' : + this.orderBy = 3; + this.nowOrder = sortObj.column.order + if (this.nowOrder === 'ascending') { + this.nowOrder = 2 + } else if (this.nowOrder === 'descending') { + this.nowOrder = 1 + } + break + } + } + // this.getDomesticStandardTable(this.tableFlag) + //搜索后排序,应该以被搜索后的数据排序 + this.getBussionStandTable(this.sarBussionessSearch) + + }, // 修改成表格样式后,选择项勾选改变 standSelectChange (data) { this.selectedList = [] @@ -3895,7 +3982,6 @@ export default { applyArctic: formData.applyArctic } formData['attrSearchStr'] = JSON.stringify(attrSearchMap) - this.SarExportSearchEo = item || this.sarBussionessSearch this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', formData, { _this: this, loading: 'loading' }, res => { diff --git a/src/pages/regulatoryRepository/foreignRegulationsDatabase/index.vue b/src/pages/regulatoryRepository/foreignRegulationsDatabase/index.vue index 3daffecb8..ee97c48cd 100644 --- a/src/pages/regulatoryRepository/foreignRegulationsDatabase/index.vue +++ b/src/pages/regulatoryRepository/foreignRegulationsDatabase/index.vue @@ -177,6 +177,7 @@ border class="drag-table" :row-class-name="dragRowClassName" + @sort-change="sortChange" :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', fontWeight: 'bold', height: '48px'}" @selection-change="standSelectChange" @@ -766,6 +767,7 @@ height="100%" border :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}" + @sort-change="sortChangeConfig" @selection-change="selectConfigStandChange"> { for (let i = 0; i < res.data.list.length; i++) { @@ -3715,6 +3717,83 @@ dragRowClassName (row, index) { return 'drag-row' + ' ' + 'id=' + row.row.id }, + // 配置标准-表格排序 + sortChangeConfig(sortObj) { + if (sortObj.column.order !== 'normal') { + switch (sortObj.prop) { + case 'issueTime' : + // 后台联调 + if (sortObj.order === null) { + this.sarConfigStandSearch.nowOrderBy = '' + } else { + this.sarConfigStandSearch.nowOrderBy = '1' + } + break; + case 'XCXSSRQLAWS' : + // 后台联调 + if (sortObj.order === null) { + this.sarConfigStandSearch.nowOrderBy = '' + } else { + this.sarConfigStandSearch.nowOrderBy = '2' + } + break; + } + switch (sortObj.order) { + case 'ascending' : + this.sarConfigStandSearch.nowOrder = '2' + break; + case 'descending' : + this.sarConfigStandSearch.nowOrder = '1' + break; + default: + this.sarConfigStandSearch.nowOrder = '' + break; + } + } + this.selectConfiguraStand() + }, + // 表格排序 + sortChange(sortObj) { + if (sortObj.column.order !== 'normal') { + this.nowOrder = '' + this.orderBy = '' + switch (sortObj.column.property) { + case 'issueTime' : + // 后台联调 + this.orderBy = 1; + this.nowOrder = sortObj.column.order + if (this.nowOrder === 'ascending') { + this.nowOrder = 2 + } else if (this.nowOrder === 'descending') { + this.nowOrder = 1 + } + break + case 'putTime' : + // 后台联调 + this.orderBy = 2; + this.nowOrder = sortObj.column.order + if (this.nowOrder === 'ascending') { + this.nowOrder = 2 + } else if (this.nowOrder === 'descending') { + this.nowOrder = 1 + } + break + case 'standStatusShow' : + this.orderBy = 3; + this.nowOrder = sortObj.column.order + if (this.nowOrder === 'ascending') { + this.nowOrder = 2 + } else if (this.nowOrder === 'descending') { + this.nowOrder = 1 + } + break + } + } + // this.getDomesticStandardTable(this.tableFlag) + //搜索后排序,应该以被搜索后的数据排序 + this.getDomesticStandardTable(this.lawsStandInfoSearch) + + }, // 修改成表格样式后,选择项勾选改变 standSelectChange (data) { this.selectedList = [] @@ -4009,6 +4088,11 @@ this.lawsStandInfoSearch.pageSize = this.$store.getters.userInfo.configContent const data = item || this.lawsStandInfoSearch const formData = {...data} + if (!item) { + formData.menuId = this.sarBussionessSearch.menuId + } else { + formData.menuId = this.selectSarMenu.id + } formData.menuId = this.selectSarMenu.id // 处理我的收藏和个性化标签传参 if (this.selectSarMenu.id === 'wdsc') { @@ -4027,7 +4111,10 @@ applyArctic: formData.applyArctic } formData['attrSearchStr'] = JSON.stringify(attrSearchMap) - this.SarExportSearchEo = item || this.lawsStandInfoSearch + // 排序 + formData.nowOrderBy = this.nowOrder ? this.orderBy : '' + formData.nowOrder = this.nowOrder + this.SarExportSearchEo = formData this.$http.get('lawss/sarLawsInfo/page', formData, { _this: this, loading: 'loading' }, res => {