瀏覽代碼

fix: 关键词页面新增自定义状态查询

cuiyalong 3 年之前
父節點
當前提交
e66d0eddac

+ 5 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/components/marketTimeScatter.js

@@ -222,7 +222,11 @@ var marketTimeScatter = {
             params[i].value = 0
           }
           if (i === 0) {
-            const unit = params[i].seriesName.match(/((.*))$/g).join('').replace(/[()]/g, '')
+            const match = params[i].seriesName.match(/((.*))$/g)
+            let unit = ''
+            if (Array.isArray(match)) {
+              unit = match.join('').replace(/[()]/g, '')
+            }
             tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + unit + '<br/>'
           } else if (i === 1) {
             tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '%' + '<br/>'

+ 13 - 7
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/report_analysis.js

@@ -310,6 +310,9 @@ var vm = new Vue({
         }
       } else {
         this.$nextTick(this.calcOffsetTop)
+        if (utils.isIos) {
+          setTimeout(this.calcOffsetTop, 1000)
+        }
       }
     }, 0)
     this.addEventListeners()
@@ -673,6 +676,7 @@ var vm = new Vue({
             this.analysis.loaded = true
             // location.replace('./report_analysis?id=' + res.data)
             this.rid = res.data
+            history.replaceState({}, null, '?id=' + this.rid)
             this.getReportResult()
           } else {
             this.$toast(res.error_msg)
@@ -868,12 +872,13 @@ var vm = new Vue({
         this.filters.rangeTime.start = arr[0] * 1000
         this.filters.rangeTime.end = arr[1] * 1000
       }
-      if (data.s_rangeTimeExtra) {
-        this.reportFilters.selectTimeExtra = data.s_rangeTimeExtra
-        this.filters.rangeTime.exact = this.reportFilters.selectTimeExtra
-      } else {
-        this.filters.rangeTime.exact = 'exact'
-      }
+      // if (data.s_rangeTimeExtra) {
+      //   this.reportFilters.selectTimeExtra = data.s_rangeTimeExtra
+      //   this.filters.rangeTime.exact = this.reportFilters.selectTimeExtra
+      // } else {
+      //   this.filters.rangeTime.exact = 'exact'
+      // }
+      this.filters.rangeTime.exact = 'exact'
       this.$refs.dateSelector.setState(this.filters.rangeTime)
       if (data.area && data.area !== '{}') {
         this.reportFilters.area = JSON.parse(data.area)
@@ -1128,6 +1133,7 @@ var vm = new Vue({
       }
 
       if (total) {
+        scaleData.rows.reverse()
         this.$set(this.sections.projectScatter, 'chartData', scaleData)
         if (this.sections.projectScatter.tableData.length) {
           this.sections.projectScatter.dataAlready = true
@@ -1776,7 +1782,7 @@ var vm = new Vue({
       }
     },
     toSubManage: function () {
-      location.href = '/jyapp/vipsubscribe/toSetKeyWordPage'
+      location.href = '/jyapp/vipsubscribe/toSetKeyWordPage?vSwitch=m'
     },
     toArticleContent (item) {
       this.saveState()

+ 19 - 9
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyWord.js

@@ -131,14 +131,19 @@ var vm = new Vue({
       }
     },
     getSwitchType: function () {
-      $.ajax({
-        type: 'POST',
-        url: '/publicapply/subscribe/vipSwitch',
-        async: false,
-        success: function (res) {
-          this.vSwitch = res.data.vt || 'f'
-        }.bind(this)
-      })
+      var vSwitch = utils.getParam('vSwitch')
+      if (vSwitch) {
+        this.vSwitch = vSwitch
+      } else{
+        $.ajax({
+          type: 'POST',
+          url: '/publicapply/subscribe/vipSwitch',
+          async: false,
+          success: function (res) {
+            this.vSwitch = res.data.vt || 'f'
+          }.bind(this)
+        })
+      }
     },
     getKeywordsGroupList: function (needLoading) {
       var _this = this
@@ -352,7 +357,12 @@ var vm = new Vue({
         // gIndex: groupIndex 该关键词所在分类 在分类列表中的索引
         // kIndex: keyIndex 该关键词在其所在分类中的索引
         this.savePageState()
-        location.href = `/jyapp/vipsubscribe/toSetinfoPage?type=edit&gIndex=${item.groupIndex}&kIndex=${item.keyIndex}`
+        var vSwitch = utils.getParam('vSwitch')
+        var href = `/jyapp/vipsubscribe/toSetinfoPage?type=edit&gIndex=${item.groupIndex}&kIndex=${item.keyIndex}`
+        if (vSwitch) {
+          href += `&vSwitch=${vSwitch}`
+        }
+        location.href = href
       }
     },
     batchDeleteStateChange: function () {

+ 13 - 8
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyword-info.js

@@ -188,14 +188,19 @@ var vm = new Vue({
       })
     },
     getSwitchType: function () {
-      $.ajax({
-        type: 'POST',
-        url: '/publicapply/subscribe/vipSwitch',
-        async: false,
-        success: function (res) {
-          this.vSwitch = res.data.vt || 'f'
-        }.bind(this)
-      })
+      var vSwitch = utils.getParam('vSwitch')
+      if (vSwitch) {
+        this.vSwitch = vSwitch
+      } else{
+        $.ajax({
+          type: 'POST',
+          url: '/publicapply/subscribe/vipSwitch',
+          async: false,
+          success: function (res) {
+            this.vSwitch = res.data.vt || 'f'
+          }.bind(this)
+        })
+      }
     },
     getKeywordsGroupList: function (options) {
       var defaultOptions = {

+ 13 - 8
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyword-manage.js

@@ -88,14 +88,19 @@ var vm = new Vue({
       return this.$dialog.confirm(defaultConf)
     },
     getSwitchType: function () {
-      $.ajax({
-        type: 'POST',
-        url: '/publicapply/subscribe/vipSwitch',
-        async: false,
-        success: function (res) {
-          this.vSwitch = res.data.vt || 'v'
-        }.bind(this)
-      })
+      var vSwitch = utils.getParam('vSwitch')
+      if (vSwitch) {
+        this.vSwitch = vSwitch
+      } else{
+        $.ajax({
+          type: 'POST',
+          url: '/publicapply/subscribe/vipSwitch',
+          async: false,
+          success: function (res) {
+            this.vSwitch = res.data.vt || 'f'
+          }.bind(this)
+        })
+      }
     },
     getKeywordsGroupList: function (needLoading) {
       var _this = this

+ 9 - 8
src/web/staticres/common-module/collection/js/cate-mobile.js

@@ -1,4 +1,12 @@
 // 采购单位类型
+var cateSimpleList = [
+  {
+    '党政机关事业单位': ['人大', '政协', '党委办','组织', '宣传', '统战', '纪委', '政府办', '发改委','财政','教育','科技','工信','民政', '民宗', '人社', '公安', '检察院','法院', '司法', '应急管理', '军队', '自然资源', '生态环境','住建', '市政',  '城管', '交通', '水利','农业','气象','文旅', '卫健委','医疗','学校','档案', '体育', '政务中心', '机关事务', '国资委','海关','税务', '市场监管', '商务','人行', '银保监', '证监', '审计', '出版广电','统计', '公共资源交易', '社会团体','气象'],
+  },
+  {
+    "企业": ['传媒','采矿业', '电信行业', '金融业', '建筑业', '能源化工', '农林牧渔','批发零售', '信息技术', '运输物流', '制造业', '住宿餐饮']
+  }
+]
 var cateComponentTemplate = `<div class="j-container">
 <div class="j-main">
   <div class="unitTab">
@@ -77,14 +85,7 @@ var cateComponent = {
   data:function () {
     return {
       active: 1,
-      tablist: [
-        {
-          '党政机关事业单位': ['人大', '政协', '党委办','组织', '宣传', '统战', '纪委', '政府办', '发改委','财政','教育','科技','工信','民政', '民宗', '人社', '公安', '检察院','法院', '司法', '应急管理', '军队', '自然资源', '生态环境','住建', '市政',  '城管', '交通', '水利','农业','气象','文旅', '卫健委','医疗','学校','档案', '体育', '政务中心', '机关事务', '国资委','海关','税务', '市场监管', '商务','人行', '银保监', '证监', '审计', '出版广电','统计', '公共资源交易', '社会团体','气象'],
-        },
-        {
-          "企业": ['传媒','采矿业', '电信行业', '金融业', '建筑业', '能源化工', '农林牧渔','批发零售', '信息技术', '运输物流', '制造业', '住宿餐饮']
-        }
-      ],
+      tablist: cateSimpleList,
       checkedAll: false,
       canClick: true
     }