diff --git a/ruoyi-ui/src/views/kaohe/pingce/index.vue b/ruoyi-ui/src/views/kaohe/pingce/index.vue index 2c3127c..cfb8583 100644 --- a/ruoyi-ui/src/views/kaohe/pingce/index.vue +++ b/ruoyi-ui/src/views/kaohe/pingce/index.vue @@ -820,30 +820,37 @@ export default { this.reset() const id = row.id || this.ids getPingce(id).then(response => { - this.form = response.data; - if(this.form.bkhdxType==='1'){ - this.form.pcBkhdxs.forEach(item=>{ - this.form_bkh_zg.push({ - id: item.bkhdxId, - empName: item.bkhdxName, - deptId: item.deptId, - deptName: item.deptName, + + if(response.data.state==='0'){ + this.form = response.data; + if(this.form.bkhdxType==='1'){ + this.form.pcBkhdxs.forEach(item=>{ + this.form_bkh_zg.push({ + id: item.bkhdxId, + empName: item.bkhdxName, + deptId: item.deptId, + deptName: item.deptName, + }) }) - }) - } + } - if(this.form.bkhdxType==='0'){ - let Keys = []; - this.form.pcBkhdxs.forEach(item=>{ - Keys.push(item.bkhdxId); - }) - this.$nextTick(() => { - this.$refs.dept.setCheckedKeys(Keys) + if(this.form.bkhdxType==='0'){ + let Keys = []; + this.form.pcBkhdxs.forEach(item=>{ + Keys.push(item.bkhdxId); + }) + this.$nextTick(() => { + this.$refs.dept.setCheckedKeys(Keys) + }) + } + this.form.pcBkhdxs = []; + this.open = true; + this.title = "修改考核任务"; + }else { + this.$alert(`当前状态不可修改,只有未开始状态下可执行修改操作!`, `提示`, { + type: 'Danger' }) } - this.form.pcBkhdxs = []; - this.open = true; - this.title = "修改考核任务"; }) }, /** 提交按钮 */