Bläddra i källkod

一些细节还没写

yuanyiming 2 år sedan
förälder
incheckning
98c860f044

+ 7 - 0
src/App.vue

@@ -230,6 +230,13 @@
           .inpBlock{    //一个个输入框小方块
             display: flex;
             margin-bottom: 15px;
+            input::-webkit-outer-spin-button,
+            input::-webkit-inner-spin-button {
+              -webkit-appearance: none !important;
+            }
+            input[type='number'] {
+              -moz-appearance: textfield;
+            }
           }
 
           .selectTop{

+ 92 - 56
src/views/projectApply/projectApplication.vue

@@ -12,18 +12,20 @@
       <div class="selectsBlock">
         <div class="selectLabel">项目筛选</div>
         <el-select v-model="selectInp.filter" placeholder="我的项目">
+          <el-option label="所有项目" :value="0"></el-option>
           <el-option
             v-for="item in options.projectFilter"
             :key="item.value"
             :label="item.label"
             :value="item.value">
-          </el-option>z
+          </el-option>
         </el-select>
       </div>
 
       <div class="selectsBlock">
         <div class="selectLabel">部门</div>
         <el-select v-model="selectInp.department" placeholder="请选择">
+          <el-option label="所有部门" :value="0"></el-option>
           <el-option
             v-for="item in options.department"
             :key="item.value"
@@ -36,6 +38,7 @@
       <div class="selectsBlock">
         <div class="selectLabel">分类</div>
         <el-select v-model="selectInp.sort" placeholder="请选择">
+          <el-option label="所有分类" :value="0"></el-option>
           <el-option
             v-for="item in options.sort"
             :key="item.value"
@@ -48,6 +51,7 @@
       <div class="selectsBlock">
         <div class="selectLabel">负责人</div>
         <el-select v-model="selectInp.person" placeholder="请选择">
+          <el-option label="所有负责人" :value="''"></el-option>
           <el-option
             v-for="item in options.person"
             :key="item.value"
@@ -60,6 +64,7 @@
       <div class="selectsBlock">
         <div class="selectLabel">状态</div>
         <el-select v-model="selectInp.state" placeholder="请选择">
+          <el-option label="全部状态" :value="99"></el-option>
           <el-option
             v-for="item in options.state"
             :key="item.value"
@@ -78,6 +83,7 @@
         tooltip-effect="dark"
         stripe
         class="fontSize"
+        style="height: 500px;"
         :header-cell-style="{ background: '#f2f2f2',color:'#000' }"
         @selection-change="handleSelectionChange">
         <!-- selection-change批量选择功能后续可能用到 -->
@@ -89,37 +95,37 @@
 
         </el-table-column> -->
         <el-table-column
-          prop="projectName"
+          prop="title"
           label="项目名称"
           align="center"
           min-width="8%">
         </el-table-column>
         <el-table-column
-          prop="projectPerson"
+          prop="pro_leader"
           align="center"
           label="项目负责人"
           min-width="9%">
         </el-table-column>
         <el-table-column
-          prop="dept"
+          prop="name"
           align="center"
           label="所在部门"
           min-width="6%">
         </el-table-column>
         <el-table-column
-          prop="budget"
+          prop="money"
           label="预算"
           align="center"
           min-width="6%">
         </el-table-column>
         <el-table-column
-          prop="date"
+          prop="time"
           align="center"
           label="开始时间"
           min-width="10%">
         </el-table-column>
         <el-table-column
-          prop="tel"
+          prop="phone"
           align="center"
           label="联系电话"
           min-width="10%">
@@ -158,6 +164,17 @@
       </el-table>
     </div>
 <!-- 表格结束 -->
+        <!-- 分页 -->
+        <el-pagination
+            @current-change="handleCurrentChange"
+            :current-page="table.currentPage"
+            :page-size="table.packageSize"
+            layout=" prev, pager, next"
+            background
+            class="pagination"
+            :total="table.total">
+          </el-pagination>
+        <!-- 分页结束 -->
 
 <!-- 立项撤回对话框开始 -->
       <el-dialog
@@ -282,7 +299,12 @@
           dialogVisible:false,//立项审核
           dialogVisible1:false,//立项撤回提交
           dialogVisible2:false,//删除
-         
+          // 分页数据
+          table:{
+            total:0,
+            packageSize:10,
+            currentPage:1
+          },
           options:{
             projectFilter:[],//项目筛选
             department:[],//部门
@@ -290,23 +312,14 @@
             person:[],//负责人
             state:[],//状态
           },
-          tableData:[{
-            projectName:'陆地游泳辅助器',
-            projectPerson:'王多鱼',
-            dept:'西虹市',
-            budget:'200万',
-            date:'2022年11月12日',
-            tel:'16625153432',
-            state:'已审核',
-          },
-          ],
+          tableData:[],    //列表数据
           
           selectInp:{  // 头部搜索框的内容
-            filter:'',
-            department:'',
-            sort:'',
+            filter:0,
+            department:0,
+            sort:0,
             person:'',
-            state:'',
+            state:99,
           }
         }
       },
@@ -348,16 +361,16 @@
           this.multipleSelection = val;
         },
         getOption(){    //获取下拉框的值
-          let param={
-            uid:this.$store.state.userid
-          }
-          this.ajax
-              .get(this.$store.state.api+'',param)
-              .then(res=>{
-                  console.log(res);
-              },err=>{
-                console.log(err);
-              })
+          // let param={
+          //   uid:this.$store.state.userid
+          // }
+          // this.ajax
+          //     .get(this.$store.state.api+'',param)
+          //     .then(res=>{
+          //         console.log(res);
+          //     },err=>{
+          //       console.log(err);
+          //     })
         },
         paApply(val){    //查看详情按钮
           console.log(val);
@@ -369,11 +382,26 @@
         getData(){    //获取表格数据
           let param={
             uid:this.$store.state.userInfo.userid,
+            pid:this.selectInp.filter,
+            did:this.selectInp.department,
+            tid:this.selectInp.sort,
+            leader:this.selectInp.person,
+            st:this.selectInp.state,
+            page:this.table.currentPage,
+            lim:this.table.packageSize
           }
+          // return console.log(param);
           this.ajax    
-            .get(this.$store.state.api+'',param)
+            .get(this.$store.state.api+'/SelectAllProject',param)
               .then(res=>{
-                const p=res.data
+                console.log(res.data);
+                let data=res.data
+                let a=this.options
+                this.tableData=data[0]
+                a.projectFilter=data[1];
+                a.department=data[2];
+                a.sort=data[3]
+                a.person=data[4]
               },err=>{
                 console.log(err);
               })  
@@ -383,32 +411,37 @@
           thsi.iid=val    //将要删除的id进行存储供删除对话框使用
         },
         dialogDel(val){   //确定删除这个项目
-          let param={
-            uid:this.$store.state.userInfo.userid,
-            nid:this.iid
-          }
-          this.ajax
-              .get(this.$store.state.api+"",param)
-              .then(res=>{
-                  console.log(res);
-                  this.dialogVisible2=false
-              },err=>{
-                console.log(err);
-              })
-        }
+          // let param={
+          //   uid:this.$store.state.userInfo.userid,
+          //   nid:this.iid
+          // }
+          // this.ajax
+          //     .get(this.$store.state.api+"",param)
+          //     .then(res=>{
+          //         console.log(res);
+          //         this.dialogVisible2=false
+          //     },err=>{
+          //       console.log(err);
+          //     })
+        },
+        handleCurrentChange(val) {   //当页数发生改变的时候调用获取列表数据请求
+          // console.log(`当前页: ${val}`);
+          this.table.currentPage=val
+          this.getCourseManagement()
+        },
       },
       watch:{    //监视选择框的变化,实施刷新表格数据
-          options:{
-            handler(){
-              immediate:true
-              deep:true
-              this.getData()
-            }
-          }
+          // options:{
+          //   handler(){
+          //     immediate:true
+          //     deep:true
+          //     this.getData()
+          //   }
+          // }
       },
       mounted(){      //跳转到此页面立刻获取数据
         this.getData();     //获取表格数据
-        this.getOption();   //获取下拉框数据}
+        // this.getOption();   //获取下拉框数据}
       }
 
     }
@@ -417,7 +450,10 @@
 <style lang="less">
 .projectApplication{
 
-
+  .pagination{
+    float: right;
+    margin: 20px 35px 10px;
+  }
   .addDialog{   //删除框
   font-size: 18px;
   .el-dialog{

+ 8 - 13
src/views/projectApply/projectApplicationApplyMain.vue

@@ -93,7 +93,7 @@
                   contentFive:'55',
             },
             projectApplicationApply3:{  //预算经费页面
-                tableData:  // 经费月支出计划列表数据
+                tableData:  // 经费月支出计划列表数据默认显示数据
                 [
                   {
                     one:'-',
@@ -111,15 +111,7 @@
                     remark:'-'
                   }
                 ],
-                 
-                tableData2:[{  // 经费明细列表数据
-                  sort:'人工智能设备购买',
-                  Fund:'20000.00',
-                  projectName:'项目协作费用',
-                  remark:'拨款多多益善'
-                  },      
-                ],
-                items:{   //经费月支出计划dialog对话框
+                items:{   //经费月支出计划dialog对话框要提交的数据
                     one:'',
                     two:'',
                     three:'',
@@ -134,6 +126,8 @@
                     twelve:'',
                     remark:''
                 },
+                tableData2:[],// 经费明细列表数据
+               
                 dialog:{     //经费明细添加对话框
                   fund:'300000',  //金额
                   type:'填海',  //支出类别
@@ -216,7 +210,7 @@
 
 
 
-            confirmSetFund(){   //预算经费设置经费对话框
+            confirmSetFund(){   //预算经费设置经费对话框提交
               let data=this.projectApplicationApply3
               for(let key in data.items){
                 if (data.items[key]=='') {
@@ -224,6 +218,9 @@
                 }
               }
               data.tableData.splice(0,1,data.items)
+              // for(let key in data.items){
+              //     data.items[key]=''
+              // }
             },
             addFundDetail(){    //预算经费页面经费添加按钮
               let p=this.projectApplicationApply3;
@@ -279,8 +276,6 @@
                         if(res.data==1){
                           this.$message.success("创建成功")
                         }
-                          // console.log(res.data==1);
-
                       },err=>{
                         console.log(err);
                       })