Quellcode durchsuchen

前端页面更新

sr vor 4 Jahren
Ursprung
Commit
b37100f58c
3 geänderte Dateien mit 167 neuen und 32 gelöschten Zeilen
  1. 46 0
      ruoyi-ui/src/api/index.js
  2. 22 4
      ruoyi-ui/src/components/Echarts/index.vue
  3. 99 28
      ruoyi-ui/src/views/index.vue

+ 46 - 0
ruoyi-ui/src/api/index.js

@@ -0,0 +1,46 @@
+import request  from '@/utils/request'
+
+// 首页-柱状图
+export function getIndexEharts(query) {
+  return request({
+    url: '/constructionPay/pay/indexEharts',
+    method: 'get',
+    params: query
+  })
+}
+// 获取用户详细信息
+export function toBeReviewedList() {
+  return request({
+    url: '/bmProject/project/toBeReviewedList',
+    method: 'get'
+  })
+}
+// 审核/提交
+export function setExamine() {
+  return request({
+    url: '/bmProject/project/examine',
+    method: 'post'
+  })
+}
+// 驳回项目
+export function setReject() {
+  return request({
+    url: '/bmProject/project/reject',
+    method: 'post'
+  })
+}
+
+// 首页-单位榜单-资金
+export function getUnitAmountList() {
+  return request({
+    url: '/deptPlan/plan/unitAmountList',
+    method: 'post'
+  })
+}
+// 首页-单位榜单-任务
+export function getUnitList() {
+  return request({
+    url: '/deptPlan/plan/unitList',
+    method: 'post'
+  })
+}

+ 22 - 4
ruoyi-ui/src/components/Echarts/index.vue

@@ -7,9 +7,27 @@
 <script>
   require('echarts/lib/component/legend')
   export default {
-    name: 'Echarts',
+    name: 'Echarts',
+    props:{
+      ehaersList: {
+        type: Object,
+        default: function() {
+          return {}
+        }
+      }
+    },
+    watch: {
+        ehaersLists() {
+          this.myEcharts()
+        }
+    },
+    computed: {
+      ehaersLists() {
+        return this.ehaersList
+      }
+    },
     methods: {
-      myEcharts() {
+      myEcharts(datas={x:'',y:''}) {
         // 基于准备好的dom,初始化echarts实例
         var myChart = this.$echarts.init(document.getElementById('main'));
 
@@ -31,13 +49,13 @@
             top: 25,
           },
           xAxis: {
-            data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"],
+            data: this.ehaersLists.x,
           },
           yAxis: {},
           series: [{
             name: '到账金额',
             type: 'bar',
-            data: [5, 20, 36, 10, 10, 20],
+            data: this.ehaersLists.y,
             itemStyle: {
               normal: {
                 color: '#1C84C6', //设置柱子颜色

+ 99 - 28
ruoyi-ui/src/views/index.vue

@@ -9,14 +9,14 @@
             </div>
             <el-table v-loading="loading" :data="infoList">
               <el-table-column label="项目名称" align="center" prop="name" />
-              <el-table-column label="当前状态" align="center" prop="totAmt" />
-              <el-table-column label="时间" align="center" prop="deptName" />
+              <el-table-column label="当前状态" align="center" prop="dictLabel" />
+              <el-table-column label="时间" align="center" prop="createTime" />
               <el-table-column label="操作" width="280" align="center" class-name="small-padding fixed-width">
                 <template slot-scope="scope">
-                  <el-button size="mini" type="text" style="background: #F5A40C;color: #FFF;padding: 7px;" v-hasPermi="['projectInfo:info:edit']">查看详情</el-button>
+                  <el-button size="mini" type="text" style="background: #F5A40C;color: #FFF;padding: 7px;" v-hasPermi="['projectInfo:info:edit']" @click="dec_btn(scope.row)">查看详情</el-button>
                   <el-button size="mini" type="text" style="background: #DE1939;color: #FFF;padding: 7px;" v-hasPermi="['projectInfo:info:edit']"
                     @click="infoBtn(scope.row)">确认审核</el-button>
-                  <el-button size="mini" type="text" style="background: #1C84C6;color: #FFF;padding: 7px;" v-hasPermi="['projectInfo:info:edit']">驳回</el-button>
+                  <el-button size="mini" type="text" style="background: #1C84C6;color: #FFF;padding: 7px;" v-hasPermi="['projectInfo:info:edit']" @click="bh_brn(scope.row)">驳回</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -24,12 +24,16 @@
           <div class="exl_box">
             <div class="exl_title">
               <span>招资引资项目到资金额</span>
-              <el-select width="80" v-model="lb_value" placeholder="请选择">
-                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-                </el-option>
-              </el-select>
+              <el-date-picker
+                    v-model="lb_value"
+                    style="width: 100px;"
+                    type="year"
+                    value-format="yyyy"
+                    @change="picher_fn"
+                    placeholder="选择年">
+                  </el-date-picker>
             </div>
-            <echarts></echarts>
+            <echarts :ehaersList="ehaersList" v-if="flags"></echarts>
           </div>
         </div>
       </el-col>
@@ -50,10 +54,10 @@
             </div>
           </div>
           <div class="rig_cont">
-            <div class="rig_items">
-              <span>招商局</span>
-              <span>2个</span>
-              <span>1个</span>
+            <div class="rig_items" v-for="(item,index) in unitList" :key="index">
+              <span>{{item.deptName}}</span>
+              <span>{{item.targetInvestmentNum?item.targetInvestmentNum:0}}个</span>
+              <span>{{item.successMission?item.successMission:0}}个</span>
             </div>
           </div>
           <div class="rig_tab_top" style="background-color: #1C84C6;">
@@ -61,17 +65,17 @@
               单位名称
             </div>
             <div class="rig_tab_item">
-              目标任务
+              目标到资
             </div>
             <div class="rig_tab_item">
-              已完成任务
+              实际到资
             </div>
           </div>
           <div class="rig_cont">
-            <div class="rig_items">
-              <span>招商局</span>
-              <span>2个</span>
-              <span>1个</span>
+            <div class="rig_items" v-for="(item,index) in zjList" :key="index">
+              <span>{{item.deptName}}</span>
+              <span>{{item.targetArrivalAmount}}万</span>
+              <span>{{item.payForMoney}}万</span>
             </div>
           </div>
         </div>
@@ -81,28 +85,93 @@
 </template>
 <script>
   import echarts from '@/components/Echarts/index.vue'
+  import {toBeReviewedList,setExamine,setReject,getUnitList,getUnitAmountList,getIndexEharts} from '@/api/index.js'
   export default {
     data() {
       return {
-        infoList: [1],
+        infoList: [],
+        zjList: [],
+        ehaersList: {},
         loading: false,
-        options: [{
-            value: '2020'
-          },
-          {
-            value: '2021'
-          },
-        ],
+        unitList: [],
+        flags: false,
         lb_value: '2021', // 柱状图类别
       }
     },
     components: {
       echarts
     },
+    mounted() {
+      this.getList()
+      this.bd_btn()
+      this.zj_btn()
+      this.zht_fn()
+      this.eharts_fn()
+    },
     methods: {
-      infoBtn() {
+      picher_fn() {
+        this.eharts_fn()
+      },
+      eharts_fn(val) {
+        getIndexEharts({
+          year: this.lb_value
+        }).then(res => {
+          this.ehaersList = res.data
+          this.flags = true
+        })
+      },
+      zht_fn() {
 
       },
+      zj_btn() {
+        getUnitAmountList().then(res => {
+          this.zjList = res.rows
+        })
+      },
+      bd_btn() {
+        getUnitList().then(res =>{
+          this.unitList = res.rows
+        })
+      },
+      dec_btn(){
+
+      },
+      bh_brn(scope) {
+        this.$confirm('是否确认驳回审核', "提醒", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return setReject({
+            code: 2,
+            bmProjectId: scrop.id
+          });
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("提交成功");
+        })
+      },
+      infoBtn(scope) {
+        this.$confirm('是否确认提交审核', "提醒", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return setExamine({
+            code: 1,
+            bmProjectId: scrop.id
+          });
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("提交成功");
+        })
+        },
+      getList() {
+        toBeReviewedList().then(res => {
+          console.log(res)
+          this.infoList = res.rows
+        })
+      },
     }
   }
 </script>
@@ -122,6 +191,8 @@
     border: 1px solid #CDCDCD;
     box-sizing: border-box;
     margin-bottom: 31px;
+    max-height: 270px;
+    overflow-y: auto;
     .rig_items{
       line-height: 36px;
       color: #343434;