浏览代码

月报周报选择时间

TANGSHIZHE 4 年之前
父节点
当前提交
40974f66b0

+ 9 - 8
src/components/forecast/ForLimit.vue

@@ -162,14 +162,15 @@ export default {
     // 回显采购内容
     getBuyContent (data) {
       console.log(data)
-      const arr = []
-      data.forEach(function (item) {
-        item.key.forEach(function (iitem) {
-          console.log(iitem)
-          arr.push(iitem)
-        })
-      })
-      return arr
+      // const arr = []
+      // data.forEach(function (item) {
+      //   debugger
+      //   item.key.forEach(function (iitem) {
+      //     console.log(iitem)
+      //     arr.push(iitem)
+      //   })
+      // })
+      return data
     },
     // 添加采购内容
     addCon () {

+ 17 - 7
src/components/report-data/SelectMonth.vue

@@ -8,7 +8,8 @@
         </div>
         <ul class="week_many">
           <li class="option_week" v-for="(item, index) in listWeek" :key="index">
-            <span class="list_span" v-for="(data, i) in item" :class='{active:i==isActive&&index==isIndexActive, getlastmonth:i==lastIndex}' :key="i" @click="getWeek(index, i, data)">{{data}}月</span>
+            <!-- <span class="list_span" v-for="(data, i) in item" :class='{active:i==isActive&&index==isIndexActive, getlastmonth:i==lastIndex}' :key="i" @click="getWeek(index, i, data)">{{data}}月</span> -->
+            <span class="list_span" v-for="(data, i) in item" :class='{active:i==isActive&&index==isIndexActive}' :key="i" @click="getWeek(index, i, data)">{{data}}月</span>
           </li>
         </ul>
         <div class="putaway" @click="getManyTimes()" v-if="isMany">
@@ -84,10 +85,11 @@ export default {
         week = date.slice(4, 6)
       }
       console.log(week)
-      for (let a = week; a <= Number(nowweek); a++) {
+      for (let a = week; a <= 12; a++) {
         var weeks = a
         aloneWeek.push(weeks + '')
       }
+      console.log(aloneWeek)
       if (this.getTypeTime.judgeTime === 'month') {
         this.isActive = aloneWeek.length - 2
       } else {
@@ -101,7 +103,6 @@ export default {
           _this.lastIndex = i
         }
       })
-      this.listWeek.push(aloneWeek)
       // 处理年份、添加12月
       const nowyear = dateFormatter(new Date(), 'yyyy')
       let year = date.slice(0, 4)
@@ -111,11 +112,11 @@ export default {
       } else {
         this.isMany = true
       }
-      this.listYear.push(Number(year))
+      this.listYear.push(nowyear)
       var newArr = []
       for (var i = year; i < nowyear; i++) {
-        year = year - 1
-        this.listYear.push(year + '')
+        // year = year - 1
+        this.listYear.push(year)
         for (var tw = 1; tw <= 12; tw++) {
           var twM = tw
           twM = '' + twM
@@ -123,6 +124,13 @@ export default {
         }
         this.listWeek.push(newArr)
       }
+      this.listWeek.push(aloneWeek)
+      this.listWeek[0].forEach(function (item, index) {
+        console.log(item)
+        if (item === nowweek) {
+          _this.listWeek[0] = _this.listWeek[0].splice(0, index + 1)
+        }
+      })
     },
     getWeek (index, i, month) {
       console.log(index, i, month)
@@ -180,6 +188,7 @@ export default {
         display: flex;
         margin-bottom: 16px;
         width: 44px;
+        height: 30px;
         opacity: 1;
         font-size: 13px;
         font-weight: 400;
@@ -192,6 +201,7 @@ export default {
         flex-direction: column;
         margin-left: 32px;
         .option_week{
+          height: 30px;
           margin-bottom: 16px;
           .list_span{
             margin-right: 24px;
@@ -213,7 +223,7 @@ export default {
 }
 .putaway{
   position: absolute;
-  right: 0;
+  right: 40px;
   bottom: 16px;
   color: #2cb7ca;
   cursor: pointer;

+ 12 - 10
src/views/bid-forecast/BidForecastLimit.vue

@@ -140,6 +140,7 @@ export default {
       if (res.error_code === 0 && res.data) {
         console.log(res.data)
         if (res.data.buyerContent && res.data.buyerContent.length > 0) {
+          debugger
           const newKeyArr = []
           res.data.buyerContent.forEach(function (item, i) {
             console.log(item)
@@ -151,18 +152,19 @@ export default {
         }
         const bidListPC = this.$store.state.forcast.detailBaseList
         if (bidListPC.filter(v => v.id === res.data.id).length) {
-          const newKeyArr = []
+          // const newKeyArr = []
           bidListPC.forEach(function (v) {
             if (v.id === res.data.id) {
-              v.buyerContent.forEach(function (item, i) {
-                // const conList = {
-                // key: [item]
-                // appendkey: [],
-                // notkey: []
-                // }
-                newKeyArr.push(item)
-              })
-              v.buyerContent = newKeyArr
+              console.log(v)
+              // v.buyerContent.forEach(function (item, i) {
+              //   // const conList = {
+              //   // key: [item]
+              //   // appendkey: [],
+              //   // notkey: []
+              //   // }
+              //   newKeyArr.push(item)
+              // })
+              // v.buyerContent = newKeyArr
               _this.baseInfo = v
             }
           })

+ 5 - 3
src/views/bid-policy/components/PolicyLimit.vue

@@ -106,6 +106,11 @@ export default {
       })
     }
   },
+  created () {
+    if (!this.baseInfo.buyerContent) {
+      this.$store.dispatch('user/getKeywordsList')
+    }
+  },
   mounted () {
     this.initData(this.buyClass)
   },
@@ -130,9 +135,6 @@ export default {
   methods: {
     initData (data) {
       console.log(data)
-      if (!this.baseInfo.buyerContent) {
-        this.$store.dispatch('user/getKeywordsList')
-      }
       this.baseInfo.buyerContent = data
     },
     // 判断省市

+ 2 - 1
src/views/portrayal/components/AnalysisDetailList.vue

@@ -23,7 +23,7 @@
           <div class="infone_type">
             <span class="infone_type_label">中标企业:</span>
             <div class="infone_type_list">
-              <span class="infone_type_after" v-for="(s_winner, index) in data.s_winner" :key="index">{{s_winner}}</span>
+              <span class="infone_type_after" v-for="(s_winner, index) in data.s_winner" :key="index">{{data.s_winner}}</span>
             </div>
           </div>
         </div>
@@ -103,6 +103,7 @@ export default {
     initData (list) {
       list.forEach(function (item, index) {
         let entBid = []
+        console.log(item)
         if (!item.s_winner) {
           entBid = item.s_winner.split(',')
           list[index].s_winner = entBid

+ 0 - 1
vue.config.js

@@ -66,7 +66,6 @@ module.exports = {
           'vue-router',
           'vuex',
           'axios',
-          'echarts',
           'lodash',
           'moment'
         ])