| | |
| | | if(userInfo.identity === 0){ |
| | | isAmin.value = true; |
| | | } |
| | | if(props.projectId){ |
| | | getDetail(props.projectId) |
| | | } |
| | | |
| | | }); |
| | | |
| | | const riskOpen = async (type,val) => { |
| | | state.formData.projectId = val |
| | | state.projectId = val |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | const getDetail = async (val) => { |
| | | const res = await getSiteCheckDetail({projectId: val}); |
| | | if(res.code == 200){ |
| | | state.formData = res.data; |
| | |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | |
| | | |
| | | const riskOpen = async (type,val) => { |
| | | state.formData.projectId = val |
| | | state.projectId = val |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | // await getDetail(val) |
| | | } |
| | | if(type === 'add' || type === 'clickEdit') { |
| | | const valid = await formRef.value.validate(); |
| | | if(valid){ |
| | |
| | | } |
| | | } |
| | | formRef.value.clearValidate(); |
| | | emit('getNextStatus', res.data); |
| | | emit('getNextStatus', state.projectId); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |