|
@@ -31,87 +31,89 @@
|
|
|
currentType:this.type,//当前类型
|
|
|
selectedPlanID:'',//选择的计划id
|
|
|
showModalStatus:false,//查核计划选择弹框
|
|
|
- flag:0,//是否为进行中计划,判断下一个未开始的查核计划
|
|
|
+ flag:-3,//是否为进行中计划,判断下一个未开始的查核计划
|
|
|
+ planList:[],//查核计划列表
|
|
|
+ arrUnstarted:[],//未开始计划数组
|
|
|
// isCompeleted:false,//计划进行状态,是否已完成,状态的显示
|
|
|
// isContinued:true,//是否进行中
|
|
|
- planList:[
|
|
|
- {
|
|
|
- id:'1',
|
|
|
- name:'第1次查核',
|
|
|
- startDate:'2021-02-05',
|
|
|
- endDate:'2021-02-10',
|
|
|
- status:3,
|
|
|
- },
|
|
|
- {
|
|
|
- id:'2',
|
|
|
- name:'第2次查核',
|
|
|
- startDate:'2021-02-05',
|
|
|
- endDate:'2021-02-10',
|
|
|
- status:2
|
|
|
- },
|
|
|
- {
|
|
|
- id:'3',
|
|
|
- name:'第3次查核',
|
|
|
- startDate:'2021-02-05',
|
|
|
- endDate:'2021-02-10',
|
|
|
- status:1
|
|
|
- },
|
|
|
- {
|
|
|
- id:'4',
|
|
|
- name:'第4次查核',
|
|
|
- startDate:'2021-02-05',
|
|
|
- endDate:'2021-02-10',
|
|
|
- status:1
|
|
|
- },
|
|
|
- ],//查核计划列表
|
|
|
+ // planList:[
|
|
|
+ // {
|
|
|
+ // id:'1',
|
|
|
+ // name:'第1次查核',
|
|
|
+ // startDate:'2021-02-05',
|
|
|
+ // endDate:'2021-02-10',
|
|
|
+ // status:3,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id:'2',
|
|
|
+ // name:'第2次查核',
|
|
|
+ // startDate:'2021-02-05',
|
|
|
+ // endDate:'2021-02-10',
|
|
|
+ // status:2
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id:'3',
|
|
|
+ // name:'第3次查核',
|
|
|
+ // startDate:'2021-02-05',
|
|
|
+ // endDate:'2021-02-10',
|
|
|
+ // status:1
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id:'4',
|
|
|
+ // name:'第4次查核',
|
|
|
+ // startDate:'2021-02-05',
|
|
|
+ // endDate:'2021-02-10',
|
|
|
+ // status:1
|
|
|
+ // },
|
|
|
+ // ],//查核计划列表
|
|
|
}
|
|
|
},
|
|
|
created: function() {
|
|
|
- // this.$store.dispatch({
|
|
|
- // type: 'situationDetail/commActions',
|
|
|
- // payload: {
|
|
|
- // key: 'planlList',
|
|
|
- // data:{
|
|
|
- // situationId:this.situationID
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }).then((data) => {
|
|
|
- // console.log(data);
|
|
|
- // if (data) {
|
|
|
- // this.planList=data.map((item,index)=>{
|
|
|
- // if(item.status==2){
|
|
|
- // this.flag=index;
|
|
|
- // }
|
|
|
- // return {
|
|
|
- // id:item.id,
|
|
|
- // name:item.name,
|
|
|
- // startDate:item.startDate,
|
|
|
- // endDate:item.endDate,
|
|
|
- // status:item.status,
|
|
|
- // isCompeleted:item.status==3?true:false,
|
|
|
- // isContinued:item.status==2?true:false,
|
|
|
- // isChecked:false,
|
|
|
- // nameClass:index==this.flag+1?'item-text':'disable-text',
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
- // });
|
|
|
- this.planList=this.planList.map((item,index)=>{
|
|
|
- if(item.status==2){
|
|
|
- this.flag=index;
|
|
|
+ this.$store.dispatch({
|
|
|
+ type: 'situationDetail/commActions',
|
|
|
+ payload: {
|
|
|
+ key: 'planlList',
|
|
|
+ data:{
|
|
|
+ situationId:this.situationID
|
|
|
+ }
|
|
|
}
|
|
|
- return {
|
|
|
- id:item.id,
|
|
|
- name:item.name,
|
|
|
- startDate:item.startDate,
|
|
|
- endDate:item.endDate,
|
|
|
- status:item.status,
|
|
|
- isCompeleted:item.status==3?true:false,
|
|
|
- isContinued:item.status==2?true:false,
|
|
|
- isChecked:false,
|
|
|
- nameClass:index==this.flag+1?'item-text':'disable-text',
|
|
|
+ }).then((data) => {
|
|
|
+ if (data) {
|
|
|
+ this.planList=data.map((item,index)=>{
|
|
|
+ if(item.status==1){
|
|
|
+ this.arrUnstarted.push(item);
|
|
|
+ this.flag=this.arrUnstarted[0].id;
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ id:item.id,
|
|
|
+ name:item.name,
|
|
|
+ startDate:item.startDate,
|
|
|
+ endDate:item.endDate,
|
|
|
+ status:item.status,
|
|
|
+ isCompeleted:item.status==3?true:false,
|
|
|
+ isContinued:item.status==2?true:false,
|
|
|
+ isChecked:false,
|
|
|
+ nameClass:item.id==this.flag?'item-text':'disable-text',
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
+ // this.planList=this.planList.map((item,index)=>{
|
|
|
+ // if(item.status==2){
|
|
|
+ // this.flag=index;
|
|
|
+ // }
|
|
|
+ // return {
|
|
|
+ // id:item.id,
|
|
|
+ // name:item.name,
|
|
|
+ // startDate:item.startDate,
|
|
|
+ // endDate:item.endDate,
|
|
|
+ // status:item.status,
|
|
|
+ // isCompeleted:item.status==3?true:false,
|
|
|
+ // isContinued:item.status==2?true:false,
|
|
|
+ // isChecked:false,
|
|
|
+ // nameClass:index==this.flag+1?'item-text':'disable-text',
|
|
|
+ // }
|
|
|
+ // });
|
|
|
},
|
|
|
methods: {
|
|
|
show(){
|
|
@@ -127,7 +129,7 @@
|
|
|
this.planList.map((item,index)=>{
|
|
|
item.isChecked=false;
|
|
|
});
|
|
|
- if(index==this.flag+1){
|
|
|
+ if(item.id==this.flag){
|
|
|
this.planList[index].isChecked=true;
|
|
|
this.selectedPlanID=item.id;
|
|
|
}
|