scorpioyq hace 2 años
padre
commit
344c846172
Se han modificado 1 ficheros con 48 adiciones y 48 borrados
  1. 48 48
      src/views/home/component/pro_left.vue

+ 48 - 48
src/views/home/component/pro_left.vue

@@ -1,33 +1,33 @@
 <template>
   <div>
     <el-card
-      class="top full-height flex flex-col hide-scrollbar"
-      style="overflow-y: auto"
+        class="top full-height flex flex-col hide-scrollbar"
+        style="overflow-y: auto"
     >
       <div class="flex flex-col flex-center mt-15 padding">
         <span class="font-15 bold mb-10">{{ data.name }}</span>
         <span class="font-15 bold mt-5" style="color: #787c90"
-          >项目总投资额</span
+        >项目总投资额</span
         >
         <span class="mt-5 font-15 bold main-color"
-          >{{
+        >{{
             data.total_amount ? data.total_amount.toLocaleString() : '0'
           }}万元</span
         >
         <div class="flex flex-center mt-10">
           <!--          <span class="bold mr-15" style="color:#787C90;">{{ currentSituation.dictValue }}</span>-->
           <el-select
-            v-model="keyWords"
-            class="bold"
-            :placeholder="currentSituation.dictValue"
-            size="small"
-            @change="result"
+              v-model="keyWords"
+              class="bold"
+              :placeholder="currentSituation.dictValue"
+              size="small"
+              @change="result"
           >
             <el-option
-              v-for="item in dicList"
-              :key="item.dictKey"
-              :label="item.dictValue"
-              :value="item.dictKey"
+                v-for="item in dicList"
+                :key="item.dictKey"
+                :label="item.dictValue"
+                :value="item.dictKey"
             >
             </el-option>
           </el-select>
@@ -35,22 +35,22 @@
         <el-divider></el-divider>
         <div class="flex flex-center full-width">
           <span class="title pointer" @click="showRelation = !showRelation"
-            >已关联子项目<span class="bold blue font-16">{{ data.lot }}</span
-            >个</span
+          >已关联子项目<span class="bold blue font-16">{{ data.lot }}</span
+          >个</span
           >
         </div>
       </div>
       <div
-        class="flex flex-center flex-justify-between flex-col mt-15 hide-scrollbar"
-        style="height: 55vh; overflow-x: auto"
+          class="flex flex-center flex-justify-between flex-col mt-15 hide-scrollbar"
+          style="height: 55vh; overflow-x: auto"
       >
         <div v-if="dicList1 && dicList1.length > 0">
           <div
-            class="flex flex-center grey-9 font-15 bold pointer"
-            :class="active === index ? 'box-s' : 'box'"
-            v-for="(item, index) in dicList1"
-            :key="item.id"
-            @click="change(index)"
+              class="flex flex-center grey-9 font-15 bold pointer"
+              :class="active === index ? 'box-s' : 'box'"
+              v-for="(item, index) in dicList1"
+              :key="item.id"
+              @click="change(index)"
           >
             {{ item.dictValue }}
           </div>
@@ -58,25 +58,25 @@
         <div v-else>
           <div>
             <el-select
-              v-model="year"
-              placeholder="选择年份"
-              clearable
-              @change="yearSelect"
+                v-model="year"
+                placeholder="选择年份"
+                clearable
+                @change="yearSelect"
             >
               <el-option
-                v-for="item in years"
-                :key="item.value"
-                :label="item.value"
-                :value="item.value"
+                  v-for="item in years"
+                  :key="item.value"
+                  :label="item.value"
+                  :value="item.value"
               />
             </el-select>
           </div>
           <div
-            class="flex flex-center grey-9 font-15 bold pointer mt-5"
-            :class="active === index ? 'box-s' : 'box'"
-            v-for="(item, index) in month"
-            :key="item"
-            @click="change(index)"
+              class="flex flex-center grey-9 font-15 bold pointer mt-5"
+              :class="active === index ? 'box-s' : 'box'"
+              v-for="(item, index) in month"
+              :key="item"
+              @click="change(index)"
           >
             {{ item.value }}
           </div>
@@ -84,10 +84,10 @@
       </div>
     </el-card>
     <pro-relation
-      :showRelation="showRelation"
-      :projectId="data.id"
-      @close="showRelation = false"
-      @success="updateLot"
+        :showRelation="showRelation"
+        :projectId="data.id"
+        @close="showRelation = false"
+        @success="updateLot"
     />
   </div>
 </template>
@@ -97,7 +97,7 @@ import proRelation from '@/views/home/component/pro_relation.vue'
 
 export default {
   name: 'pro_left',
-  components: { proRelation },
+  components: {proRelation},
   props: {
     data: Object,
     code: {
@@ -203,8 +203,8 @@ export default {
     initYear() {
       this.years.length = 0
       this.year = new Date().getFullYear()
-      for (let i = 2017; i <= this.year; i++) {
-        const item = { label: i, value: i }
+      for (let i = 2015; i <= this.year; i++) {
+        const item = {label: i, value: i}
         this.years.push(item)
       }
       this.years.reverse()
@@ -216,7 +216,7 @@ export default {
       this.$bus.on('scorll', e => {
         const scrollTop = e
         const index = this.scorllTopList.findIndex(
-          e => scrollTop >= e.start && scrollTop < e.end
+            e => scrollTop >= e.start && scrollTop < e.end
         )
         if (this.code === 'project_dispatch') {
           return
@@ -228,12 +228,12 @@ export default {
       })
     },
     getDic(code) {
-      this.$api.common.dicList({ code }).then(res => {
+      this.$api.common.dicList({code}).then(res => {
         if (res.code === 200) {
           if (code === 'project-situation') {
             this.dicList = res.data
             const local = this.dicList.filter(
-              e => e.dictKey === this.projectStage
+                e => e.dictKey === this.projectStage
             )
             if (local.length > 0) {
               this.currentSituation = local[0]
@@ -247,9 +247,9 @@ export default {
             setTimeout(() => {
               for (let i = 0; i < this.resultList.length; i++) {
                 const start =
-                  i === 0 ? 0 : document.getElementById('header' + i).offsetTop
+                    i === 0 ? 0 : document.getElementById('header' + i).offsetTop
                 const end = document.getElementById(
-                  'header' + (i + 1)
+                    'header' + (i + 1)
                 ).offsetTop
                 const data = {
                   index: i,
@@ -270,7 +270,7 @@ export default {
       this.$emit('typeChange1')
     },
     result(item) {
-      const data = { id: this.data.id, project_stage: Number.parseInt(item) }
+      const data = {id: this.data.id, project_stage: Number.parseInt(item)}
       this.$api.project.proUpdate(data).then(res => {
         if (res.code === 200) {
           this.$message.success(res.msg)