@@ -157,7 +130,26 @@ export default {
loadIng:false,
tabsValue:"",
+ //
+ approvalType:"all",
+ approvalList:[
+ {value:"all",label:"全部审批"},
+ {value:"请假",label:"请假"},
+ {value:"加班",label:"加班"},
+ ],
+ searchState:"all",
+ searchStateList:[
+ {value:"all",label:"全部状态"},
+ {value:0,label:"待审批"},
+ {value:1,label:"审批中"},
+ {value:2,label:"已通过"},
+ {value:3,label:"已拒绝"},
+ {value:4,label:"已撤回"}
+ ],
+ //
backlogList: [],
+ doneList:[],
+ notifyList:[],
initiatedList: [],
details:{}
}
@@ -168,15 +160,6 @@ export default {
},
methods:{
- tabsClick(){
- if(this.tabsValue == 'backlog'){
- this.getBacklogList();
- }
- if(this.tabsValue == 'initiated'){
- this.getInitiatedList();
- }
- },
-
changeTime(e){
switch (e) {
case 'all':
@@ -197,11 +180,29 @@ export default {
}
},
+ // tab切换事件
+ tabsClick(val){
+ this.tabsValue = val || this.tabsValue
+ // if(this.tabsValue == 'backlog'){
+ this.getBacklogList();
+ // }
+ if(this.tabsValue == 'done'){
+ this.getDoneList();
+ }
+ if(this.tabsValue == 'notify'){
+ this.getNotifyList();
+ }
+ if(this.tabsValue == 'initiated'){
+ this.getInitiatedList();
+ }
+ },
+
// 列表点击事件
clickList(item){
- this.initiatedList.map(h=>{
- h._active = false;
- })
+ this.backlogList.map(h=>{ h._active = false; })
+ this.doneList.map(h=>{ h._active = false; })
+ this.notifyList.map(h=>{ h._active = false; })
+ this.initiatedList.map(h=>{ h._active = false; })
item._active = true;
this.details = item
},
@@ -210,13 +211,73 @@ export default {
getBacklogList(){
this.$store.dispatch("call", {
method: 'get',
- url: 'workflow/process/startByMyself',
+ url: 'workflow/process/findTask',
data: {
page:this.page,
page_size: this.pageSize,
}
}).then(({data}) => {
- this.backlogList = []
+ this.backlogList = data.rows.map((h,index)=>{
+ h._active = index == 0;
+ return h;
+ })
+ if(this.tabsValue == 'backlog'){
+ this.$nextTick(()=>{
+ this.details = this.backlogList[0] || {}
+ })
+ }
+ }).catch(({msg}) => {
+ $A.modalError(msg);
+ }).finally(_ => {
+ this.loadIng--;
+ });
+ },
+
+ // 获取已办列表
+ getDoneList(){
+ this.$store.dispatch("call", {
+ method: 'get',
+ url: 'workflow/procHistory/findTask',
+ data: {
+ page:this.page,
+ page_size: this.pageSize,
+ }
+ }).then(({data}) => {
+ this.doneList = data.rows.map((h,index)=>{
+ h._active = index == 0;
+ return h;
+ })
+ if(this.tabsValue == 'done'){
+ this.$nextTick(()=>{
+ this.details = this.doneList[0] || {}
+ })
+ }
+ }).catch(({msg}) => {
+ $A.modalError(msg);
+ }).finally(_ => {
+ this.loadIng--;
+ });
+ },
+
+ // 获取抄送列表
+ getNotifyList(){
+ this.$store.dispatch("call", {
+ method: 'get',
+ url: 'workflow/procHistory/findProcNotify',
+ data: {
+ page:this.page,
+ page_size: this.pageSize,
+ }
+ }).then(({data}) => {
+ this.notifyList = data.rows.map((h,index)=>{
+ h._active = index == 0;
+ return h;
+ })
+ if(this.tabsValue == 'notify'){
+ this.$nextTick(()=>{
+ this.details = this.notifyList[0] || {}
+ })
+ }
}).catch(({msg}) => {
$A.modalError(msg);
}).finally(_ => {
@@ -238,7 +299,11 @@ export default {
h._active = index == 0;
return h;
})
- this.details = this.initiatedList[0]
+ if(this.tabsValue == 'initiated'){
+ this.$nextTick(()=>{
+ this.details = this.initiatedList[0] || {}
+ })
+ }
}).catch(({msg}) => {
$A.modalError(msg);
}).finally(_ => {
diff --git a/resources/assets/sass/pages/page-review.scss b/resources/assets/sass/pages/page-review.scss
index ca0d4d9d6..fcac04dc2 100644
--- a/resources/assets/sass/pages/page-review.scss
+++ b/resources/assets/sass/pages/page-review.scss
@@ -13,7 +13,8 @@
display: flex;
align-items: center;
padding-bottom: 16px;
- margin: 32px 32px 16px;
+ margin: 32px 20px 16px;
+ margin-bottom: 5px;
border-bottom: 1px solid #F4F4F5;
.review-nav{
flex: 1;
@@ -29,7 +30,7 @@
.review-main-search{
display: flex;
justify-content: space-between;
- margin: 0 10px;
+ margin:0 5px;
margin-bottom: 10px;
> div{
.ivu-dropdown{
@@ -37,6 +38,10 @@
}
}
}
+ .noData{
+ text-align: center;
+ line-height: 150px;
+ }
.review-mains{
display: flex;
flex: 1 1 auto;
@@ -46,7 +51,8 @@
display: flex;
flex-direction: column;
flex: 0 0 auto;
- width: 360px;
+ max-width: 360px;
+ width: 100%;
position: absolute;
left: 0;
top: 0;
@@ -78,7 +84,7 @@
}
> p{
font-size: 14px;
- margin-top: 8px;
+ margin-top: 5px;
> span{
color: #303133;
}