scorpio 2 жил өмнө
parent
commit
0c360f261c

+ 6 - 4
src/components/basic-container/main.vue

@@ -1,7 +1,9 @@
 <template>
-  <div class="basic-container"
-       :style="styleName"
-       :class="{'basic-container--block':block}">
+  <div
+    class="basic-container"
+    :style="styleName"
+    :class="{ 'basic-container--block': block }"
+  >
     <el-card class="basic-container__card">
       <slot></slot>
     </el-card>
@@ -25,7 +27,7 @@ export default {
     }
   },
   computed: {
-    styleName () {
+    styleName() {
       return {
         borderRadius: this.setPx(this.radius),
         background: this.background

+ 16 - 2
src/views/home/component/dash.vue

@@ -89,6 +89,8 @@
         <el-button
           v-if="!row.hasOwnProperty('report_type') || row.report_type === 1"
           text
+          type="primary"
+          icon="el-icon-upload"
           @click="projectReport(row)"
           >上报</el-button
         >
@@ -98,14 +100,17 @@
             permissions.vaildPermission('projectApprovalBtn') &&
             row.report_type === 2
           "
+          type="primary"
           @click="projectApproval(row)"
           >审批</el-button
         >
         <el-button
           v-if="row.hasOwnProperty('report_type') && row.report_type === 3"
           text
+          type="primary"
+          icon="el-icon-upload"
           @click="projectReportFormal(row)"
-          >上报</el-button
+          >上报固定资产</el-button
         >
       </template>
       <template #plan_storage_time-header="{ column }">
@@ -303,7 +308,6 @@ export default {
       data: [],
       form: {},
       option: {
-        menuType: 'menu',
         menuBtnTitle: '操作',
         refreshBtn: false,
         tip: false,
@@ -419,6 +423,16 @@ export default {
             prop: 'year',
             width: 160
           },
+          {
+            label: '存在问题',
+            prop: 'year',
+            width: 80
+          },
+          {
+            label: '数据更新时间',
+            prop: 'year',
+            width: 160
+          },
           {
             label: '状态',
             prop: 'report_type',

+ 13 - 0
src/views/home/component/dispatch.vue

@@ -0,0 +1,13 @@
+<template>
+  <basic-container>项目调度</basic-container>
+</template>
+
+<script>
+import BasicContainer from '@/components/basic-container/main.vue'
+export default {
+  name: 'dispatch',
+  components: { BasicContainer }
+}
+</script>
+
+<style scoped></style>

+ 11 - 0
src/views/home/component/month.vue

@@ -0,0 +1,11 @@
+<template>
+  <div>时间</div>
+</template>
+
+<script>
+export default {
+  name: 'month'
+}
+</script>
+
+<style scoped></style>

+ 85 - 52
src/views/home/component/pro_left.vue

@@ -1,57 +1,81 @@
 <template>
   <div>
-    <div class="white-bg top full-height flex flex-col hide-scrollbar" style='overflow-y: auto;'>
+    <div
+      class="white-bg 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 class="mt-5 font-15 bold main-color">{{
+        <span class="font-15 bold mb-10">{{ data.name }}</span>
+        <span class="font-15 bold mt-5" style="color: #787c90"
+          >项目总投资额</span
+        >
+        <span class="mt-5 font-15 bold main-color"
+          >{{
             data.total_amount ? data.total_amount.toLocaleString() : '0'
-          }}万元</span>
+          }}万元</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>
         </div>
         <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="title pointer" @click="showRelation = !showRelation"
+            >已关联子项目<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: 50vh;overflow-x: auto;">
-        <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)">{{
-            item.dictValue
-          }}
+      <div
+        class="flex flex-center flex-justify-between flex-col mt-15 hide-scrollbar"
+        style="height: 50vh; 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)"
+          >
+            {{ item.dictValue }}
+          </div>
         </div>
-        <div>
+        <div v-else>
+          <month />
         </div>
       </div>
     </div>
-    <pro-relation :showRelation="showRelation" :projectId="data.id" @close="showRelation = false" @success='updateLot'/>
+    <pro-relation
+      :showRelation="showRelation"
+      :projectId="data.id"
+      @close="showRelation = false"
+      @success="updateLot"
+    />
   </div>
 </template>
 
 <script>
 import proRelation from '@/views/home/component/pro_relation.vue'
+import month from '@/views/home/component/month.vue'
 
 export default {
   name: 'pro_left',
-  components: { proRelation },
+  components: { proRelation, month },
   props: {
     data: Object,
     code: {
@@ -61,7 +85,7 @@ export default {
   },
   watch: {
     data: {
-      handler (val) {
+      handler(val) {
         if (val) {
           this.getDic('project-situation')
         }
@@ -69,7 +93,7 @@ export default {
       immediate: false
     },
     code: {
-      handler (val) {
+      handler(val) {
         if (val) {
           this.getDic(val)
         }
@@ -77,7 +101,7 @@ export default {
       immediate: false
     }
   },
-  data () {
+  data() {
     return {
       height: 0,
       dicList: [],
@@ -90,28 +114,32 @@ export default {
       projectStage: ''
     }
   },
-  created () {
+  created() {
     this.projectStage = this.$route.query.projectStage
     this.getDic(this.code)
     this.onScroll()
   },
   methods: {
-    onScroll (event) {
-      this.$bus.on('scorll', (e) => {
+    onScroll(event) {
+      this.$bus.on('scorll', e => {
         const scrollTop = e.target.scrollTop
-        const index = this.scorllTopList.findIndex(e => scrollTop >= e.start && scrollTop < e.end)
+        const index = this.scorllTopList.findIndex(
+          e => scrollTop >= e.start && scrollTop < e.end
+        )
         this.active = index
         if (e.target.scrollTop === 0) {
           this.active = 0
         }
       })
     },
-    getDic (code) {
+    getDic(code) {
       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)
+            const local = this.dicList.filter(
+              e => e.dictKey === this.projectStage
+            )
             if (local.length > 0) {
               this.currentSituation = local[0]
             }
@@ -122,10 +150,15 @@ export default {
             this.scorllTopList = []
             setTimeout(() => {
               for (let i = 0; i < this.resultList.length; i++) {
-                const start = i === 0 ? 0 : document.getElementById('header' + i).offsetTop
-                const end = document.getElementById('header' + (i + 1)).offsetTop
+                const start =
+                  i === 0 ? 0 : document.getElementById('header' + i).offsetTop
+                const end = document.getElementById(
+                  'header' + (i + 1)
+                ).offsetTop
                 const data = {
-                  index: i, start, end
+                  index: i,
+                  start,
+                  end
                 }
                 this.scorllTopList.push(data)
               }
@@ -134,13 +167,13 @@ export default {
         }
       })
     },
-    proInfo () {
+    proInfo() {
       this.$emit('typeChange')
     },
-    record () {
+    record() {
       this.$emit('typeChange1')
     },
-    result (item) {
+    result(item) {
       const data = { id: this.data.id, project_stage: Number.parseInt(item) }
       this.$api.project.proUpdate(data).then(res => {
         if (res.code === 200) {
@@ -152,10 +185,10 @@ export default {
         }
       })
     },
-    updateLot (count) {
+    updateLot(count) {
       this.data.lot = count
     },
-    change (index) {
+    change(index) {
       this.active = index
       this.$emit('change', index)
     }
@@ -167,7 +200,7 @@ export default {
 .top {
   width: 300px;
   position: fixed;
-  background-color: #FAF9FA
+  background-color: #faf9fa;
 }
 
 .down {
@@ -175,14 +208,14 @@ export default {
   position: fixed;
   bottom: 0;
   padding-bottom: 20px;
-  background-color: #FAF9FA
+  background-color: #faf9fa;
 }
 
 .tip {
   border-radius: 10px;
-  background-color: #F4F4F1;
+  background-color: #f4f4f1;
   height: 75px;
-  width: 240px
+  width: 240px;
 }
 
 .middle {
@@ -191,28 +224,28 @@ export default {
   bottom: 175px;
   top: 280px;
   padding-left: 30px;
-  background-color: #FAF9FA
+  background-color: #faf9fa;
 }
 
 .title {
-  color: #ECAB56;
+  color: #ecab56;
   font-size: 16px;
   font-weight: 500;
 }
 
 .box {
-  border-bottom: 1px dashed #AFAFAF;
+  border-bottom: 1px dashed #afafaf;
   width: 180px;
   padding-top: 32px;
   padding-bottom: 32px;
 }
 
 .box-s {
-  background-image: url("../../../assets/svg/box.svg");
+  background-image: url('../../../assets/svg/box.svg');
   background-size: 100% 100%;
   width: 180px;
   color: white;
   padding-top: 32px;
-  padding-bottom: 32px
+  padding-bottom: 32px;
 }
 </style>

+ 8 - 5
src/views/home/pro_detail.vue

@@ -38,7 +38,9 @@
           </div>
         </basic-container>
       </div>
-      <div v-else-if="currentTab.value === 3">tab3</div>
+      <div v-else-if="currentTab.value === 3">
+        <dispatch />
+      </div>
     </div>
   </div>
 </template>
@@ -55,12 +57,12 @@ import BasicContainer from '@/components/basic-container/main.vue'
 import BasicTab from '@/components/basic-tab/index.vue'
 import params1 from '@/views/home/component/params/params1.vue'
 import params2 from '@/views/home/component/params/params2.vue'
-import params3 from '@/views/home/component/params/params3.vue'
 import params4 from '@/views/home/component/params/params4.vue'
 import params5 from '@/views/home/component/params/params5.vue'
 import params6 from '@/views/home/component/params/params6.vue'
 import params7 from '@/views/home/component/params/params7.vue'
 import inspect1 from '@/views/home/component/inspect/Inspect1.vue'
+import dispatch from '@/views/home/component/dispatch.vue'
 
 export default {
   name: 'pro_detail',
@@ -71,11 +73,11 @@ export default {
     params1,
     inspect1,
     params2,
-    params3,
     params4,
     params5,
     params6,
-    params7
+    params7,
+    dispatch
   },
   data() {
     return {
@@ -83,7 +85,8 @@ export default {
       data: {},
       tabs: [
         { name: '项目信息管理', value: 1, code: 'params_type' },
-        { name: '项目督查情况', value: 2, code: 'inspect_type' }
+        { name: '项目督查情况', value: 2, code: 'inspect_type' },
+        { name: '项目调度', value: 3, code: 'project_dispatch' }
         // { name: '项目数据明细管理', value: 3 }
       ],
       currentTab: null,