|
@@ -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{
|