085bfe00 by 杨威

按钮展示判断

1 parent 5d813b73
......@@ -192,8 +192,10 @@ export default {
// 退回
rollback(data){
rollbackProcess(data).then((res) => {
this.sprList = res[0].masterActors;
this.spr = res[0].masterActors[0].accountNo;
this.$message.success("操作成功!")
this.$router.push({
path: '/dbx'
})
});
},
//终止
......
......@@ -198,8 +198,8 @@
<el-button type="primary" @click="registerCall">登记调用</el-button>
</div>
<div class="sh-btn">
<el-button type="primary" @click="lczz" v-if="workFlowData.properties.phase == 'modify'">终止</el-button>
<el-button type="primary" @click="thdz" v-if="workFlowData.rollbackDetails.length>0">退回</el-button>
<el-button type="primary" @click="lczz" v-show="workFlowphase == 'modify'">终止</el-button>
<el-button type="primary" @click="thzd" v-show="rollbackDetails.length>0">退回</el-button>
<el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button>
<el-button type="primary" @click="shdz" v-if="workFlowState">审核</el-button>
</div>
......@@ -293,11 +293,11 @@
value: '',
ytTitleRowspan:1, //用途的单元格垂直合并数量
mainBoxWidth: 0,
rules:[],
workFlowState:false,
workFlowData:{}
workFlowData:{},
workFlowphase:'',
rollbackDetails:[]
}
},
created() {
......@@ -327,6 +327,9 @@
"workitemInstanceId": this.$route.query.workitemInstanceId
}
getActivityDetail(params).then(res => {
this.workFlowData= res;
this.workFlowphase = res.properties.phase;
this.rollbackDetails = res.rollbackDetails;
this.workFlowState = res.workitemInstance.apps.some(function(item) {
return item == 'shenpibiao';
});
......
......@@ -369,8 +369,8 @@
</div>
</div>
<div class="sh-btn">
<el-button type="primary" @click="lczz" v-if="workFlowData.properties.phase == 'modify'">终止</el-button>
<el-button type="primary" @click="thzd" v-if="workFlowData.rollbackDetails.length>0">退回</el-button>
<el-button type="primary" @click="lczz" v-show="workFlowphase == 'modify'">终止</el-button>
<el-button type="primary" @click="thzd" v-show="rollbackDetails.length>0">退回</el-button>
<el-button type="primary" @click="submitZDxx" :disabled="disabled" v-if="!workFlowState">提交</el-button>
<el-button type="primary" @click="shzd" v-if="workFlowState">审核</el-button>
</div>
......@@ -484,7 +484,9 @@
SYQLXID: "",
},
workFlowState:false,
workFlowData:{}
workFlowData:{},
workFlowphase:'',
rollbackDetails:[]
};
},
mixins: [geoUtils],
......@@ -507,6 +509,8 @@
}
getActivityDetail(params).then(res => {
this.workFlowData= res;
this.workFlowphase = res.properties.phase;
this.rollbackDetails = res.rollbackDetails;
this.workFlowState = res.workitemInstance.apps.some(function(item) {
return item == 'shenpibiao';
});
......
......@@ -279,8 +279,8 @@
</div>
</div>
<div class="sh-btn">
<el-button type="primary" @click="lczz" v-if="workFlowData.properties.phase == 'modify'">终止</el-button>
<el-button type="primary" @click="thzrz" v-if="workFlowData.rollbackDetails.length>0">退回</el-button>
<el-button type="primary" @click="lczz" v-show="workFlowphase == 'modify'">终止</el-button>
<el-button type="primary" @click="thzd" v-show="rollbackDetails.length>0">退回</el-button>
<el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button>
<el-button type="primary" @click="shzrz" v-if="workFlowState">审核</el-button>
</div>
......@@ -417,7 +417,9 @@
rules:[],
mainBoxWidth:0,
workFlowState:false,
workFlowData:{}
workFlowData:{},
workFlowphase:'',
rollbackDetails:[]
}
},
mixins:[geoUtils],
......@@ -430,6 +432,9 @@
"workitemInstanceId": this.$route.query.workitemInstanceId
}
getActivityDetail(params).then(res => {
this.workFlowData= res;
this.workFlowphase = res.properties.phase;
this.rollbackDetails = res.rollbackDetails;
this.workFlowState = res.workitemInstance.apps.some(function(item) {
return item == 'shenpibiao';
});
......