|
@@ -309,18 +309,32 @@ var entSearch = new Vue({
|
|
|
this.inIframe = goTemplateData.inIframe
|
|
|
this.isLogin = !!params.isLogin
|
|
|
if (this.isLogin) {
|
|
|
- this.getPower()
|
|
|
+ this.getPower()
|
|
|
} else {
|
|
|
- this.doSearch()
|
|
|
+ this.doSearch()
|
|
|
}
|
|
|
- this.getQuery()
|
|
|
- this.initPageData()
|
|
|
- this.initProvinceMapList()
|
|
|
},
|
|
|
mounted: function () {
|
|
|
+ const entdata = sessionStorage.getItem('entdata')
|
|
|
+ if(entdata) {
|
|
|
+ const {filterState, listState, searchContent} = JSON.parse(entdata)
|
|
|
+ this.filterState = filterState
|
|
|
+ this.listState = listState
|
|
|
+ this.searchContent = searchContent
|
|
|
+ const proviceCity = {
|
|
|
+ province: this.filterState.entArea,
|
|
|
+ city: this.filterState.entCity,
|
|
|
+ }
|
|
|
+ this.$refs.areaCityFilter.setStateData(proviceCity)
|
|
|
+ sessionStorage.removeItem('entdata')
|
|
|
+ } else {
|
|
|
+ this.getQuery()
|
|
|
+ this.initPageData()
|
|
|
+ this.initProvinceMapList()
|
|
|
+ }
|
|
|
this.initDOMEvents()
|
|
|
- // 默认选中搜索范围
|
|
|
- this.$refs.searchType.setState(this.filterState.searchType)
|
|
|
+ this.filterEcho(this.filterState)
|
|
|
+
|
|
|
// 全选按钮逻辑
|
|
|
// this.searchTypeChange([], true)
|
|
|
this.industryTab()
|
|
@@ -340,7 +354,76 @@ var entSearch = new Vue({
|
|
|
// }
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 筛选条件回显
|
|
|
+ filterEcho: function (data) {
|
|
|
+ const filterLabel = [
|
|
|
+ 'searchType',
|
|
|
+ 'entCapital',
|
|
|
+ 'entType',
|
|
|
+ 'entState',
|
|
|
+ 'entTime',
|
|
|
+ ]
|
|
|
+ filterLabel.forEach(item => {
|
|
|
+ if (data[item] && data[item].length) {
|
|
|
+ if(item ==='entCapital') {
|
|
|
+ // 注册资本输入框是否有值
|
|
|
+ const writePrice = this.priceList.filter(f => {
|
|
|
+ return data[item].some(v => f.value === v);
|
|
|
+ });
|
|
|
+ if(!writePrice.length) {
|
|
|
+ console.info(data[item][0])
|
|
|
+ const priceData = data[item][0].split('-')
|
|
|
+ priceData.sort((a, b) => a - b)
|
|
|
+ const min = priceData[0]
|
|
|
+ const max = priceData[1]
|
|
|
+ this.$refs.priceRef.setState(min, max)
|
|
|
+ this.inputStatus = true
|
|
|
+ this.$refs[item].setState([0])
|
|
|
+ } else {
|
|
|
+ this.$refs[item].setState(data[item])
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$refs[item].setState(data[item])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(item === 'entTime') {
|
|
|
+ const thisList = []
|
|
|
+ data['establish'].forEach(item => {
|
|
|
+ if (item === '-1y') {
|
|
|
+ thisList.push('A');
|
|
|
+ } else if (item === '1y-3y') {
|
|
|
+ thisList.push('B');
|
|
|
+ } else if (item === '3y-5y') {
|
|
|
+ thisList.push('C');
|
|
|
+ } else if (item === '5y-10y') {
|
|
|
+ thisList.push('D');
|
|
|
+ } else if (item === '10y-') {
|
|
|
+ thisList.push('E');
|
|
|
+ } else {
|
|
|
+ // 回显时间输入框
|
|
|
+ this.focusColor = true;
|
|
|
+ thisList.push('0')
|
|
|
+ const timeData = item.split('-')
|
|
|
+ timeData[0] = timeData[0] + '000'
|
|
|
+ timeData[1] = timeData[1] + '000'
|
|
|
+ this.startTimeChange(parseInt(timeData[0]))
|
|
|
+ this.endTimeChange(parseInt(timeData[1]))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$refs[item].setState(thisList)
|
|
|
+ }
|
|
|
+ if(item === 'entState') {
|
|
|
+ this.$refs[item].setState(data['entStatus'])
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
goWorkSpace: function () {
|
|
|
+ const saveData = {
|
|
|
+ filterState: this.filterState,
|
|
|
+ listState: this.listState,
|
|
|
+ searchContent: this.searchContent
|
|
|
+ }
|
|
|
+ sessionStorage.setItem('entdata', JSON.stringify(saveData))
|
|
|
var goHref = location.origin + '/jylab/entSearch/index.html'
|
|
|
window.location.replace('/page_workDesktop/work-bench/page?link=' + encodeURIComponent(goHref))
|
|
|
},
|
|
@@ -844,7 +927,6 @@ var entSearch = new Vue({
|
|
|
|
|
|
this.listState.loading = true
|
|
|
this.listState.loaded = false
|
|
|
-
|
|
|
$.ajax({
|
|
|
url: '/publicapply/enterpriseSearch/doQuery',
|
|
|
method: 'POST',
|