diff --git a/src/pages/searchCenter/pages/standardSearch.vue b/src/pages/searchCenter/pages/standardSearch.vue
index b4d0b82af..df7562c04 100644
--- a/src/pages/searchCenter/pages/standardSearch.vue
+++ b/src/pages/searchCenter/pages/standardSearch.vue
@@ -9,7 +9,7 @@
@@ -207,8 +207,115 @@ export default {
};
},
methods: {
- searchSarByInputKeyByCondition() {
+ dateFormat2(str){
+ return dateFormat(str)
},
+ searchSarByInputKey (status) {
+ if (status === 'All') {
+ this.AllCheck = true
+ }
+ if (this.AllCheck) {
+ if (this.keywords === undefined) {
+ this.keywords = ''
+ }
+ const Alllist = {
+ selectIndex: 'fulltextserch',
+ selectValue: this.keywords,
+ page: this.pageAll,
+ pageSize: this.$store.getters.userInfo.configContent
+ }
+ this.$http.post('search/searchCenter/searchSarBykey', Alllist, {
+ _this: this,
+ loading: 'resultLoading'
+ }, res => {
+ if (res.ok) {
+ this.Allitems = res.data.list.map((item) => {
+ if (item.textContent) {
+ this.str = item.textContent
+ }
+ return {
+ ...item,
+ textContent: this.str.replace(/null/g, '- -')
+ }
+ })
+ this.totalAll = res.data.count
+ this.AllCheck = true
+ } else {
+ }
+ }, e => {
+ })
+ } else {
+ this.searchSarBykey()
+ }
+ },
+ searchSarBykey () {
+ let searchCondition = this.searchCondition
+ let condition = {}
+ let searchKeys = Object.keys(this.searchOptions)
+ for (let key in searchCondition) {
+ if (searchKeys.indexOf(key) !== -1) {
+ if (condition.selectIndex === 'laws') {
+ condition.SYCLLX = condition.CLLX
+ condition.WSSFCY = condition.CYSD
+ }
+ condition[key] = searchCondition[key].join(',') === 'all' ? '' : searchCondition[key].join(',')
+ }
+ }
+ if (this.resultKeyword != null && this.resultKeyword !== '') {
+ condition.resultKeyword = this.resultKeyword
+ }
+ condition.page = this.page
+ condition.pageSize = this.$store.getters.userInfo.configContent
+ condition.selectValue = this.keywords
+ if (condition.selectIndex === 'bussstand') {
+ condition.selectIndex = 'stand'
+ condition.standType = 'FOREIGN'
+ } else if (condition.selectIndex === 'stand') {
+ condition.standType = 'INLAND'
+ }
+ if(condition.selectIndex === 'enterprise'){
+ condition.selectIndex='bussstand'
+ condition.standState = condition.BUSSSTATE
+ condition.ZQCBM = condition.ORGLIST
+ }
+ // 查询为国内外政策时,改变查询参数名
+ if (condition.selectIndex === 'laws') {
+ condition.SYCLLX = condition.CLLX
+ condition.WSSFCY = condition.CYSD
+ delete condition.CLLX
+ delete condition.CYSD
+ }
+ if(condition.selectValue === undefined){
+ condition.selectValue = ''
+ }
+ this.$http.post('search/searchCenter/searchSarBykey', condition, {
+ _this: this,
+ loading: 'resultLoading'
+ }, res => {
+ if (res.ok) {
+ this.total = res.data.count
+ this.resultData = res.data.list
+ this.selectGroupdata(res.data)
+ } else {
+ this.total = 0
+ this.resultData = []
+ this.selectGroupdata(res.data)
+ // this.getSearchHistoty()
+ }
+ }, e => {
+ this.total = 0
+ this.resultData = []
+ console.error(e)
+ // this.getSearchHistoty()
+ })
+ },
+ searchSarByInputKeyByCondition() {
+ console.log(11111111111111111111111111)
+ this.pageAll = 1
+ this.page = 1
+ this.searchSarByInputKey()
+ },
+
//查询选项
queryOptions() {
let _this = this;
@@ -342,12 +449,6 @@ export default {
cancelCollectStandard() {
},
- //条件检索
- searchSarByInputKey(status) {
- if (status === "All") {
- this.AllCheck = true;
- }
- }
},
components: {
PersonalCenter
@@ -367,6 +468,12 @@ export default {
if (globalInputSearch !== 'allvalue') {
this.keywords = globalInputSearch
}
+ if (this.$route.params.selectKey === 'All') {
+ // 从首页进入一般检索-资源类型查询全部
+ this.searchSarByInputKey('All')
+ } else {
+ this.searchSarBykey()
+ }
},
unmounted() {