| | |
| | | status: null |
| | | }, |
| | | listQuery:{ |
| | | eid:'', |
| | | status:0, |
| | | }, |
| | | } |
| | |
| | | async getSafetyRiskSpaceData(){ |
| | | this.listLoading = true |
| | | let params = {} |
| | | params["eid"] = (this.listQuery.eid === '' ? Cookies.get('companyid') : this.listQuery.eid) |
| | | params["status"] = this.listQuery.status |
| | | let res = await getSafetyRiskSpaceList(params) |
| | | if(res.data.code === '200'){ |
| | |
| | | if(type === '新增'){ |
| | | this.title = '新增' |
| | | this.safetyRiskSpaceForm = { |
| | | createUid: Cookies.get('userId'), |
| | | createUid: parseInt(Cookies.get('userId')), |
| | | descInfo: null, |
| | | img: null, |
| | | } |
| | | this.fileList = [] |
| | | }else{ |
| | | this.title = '查看' |
| | | this.safetyRiskSpaceForm = value |
| | | this.fileList = [] |
| | | this.fileList.push({url:value.img}) |
| | | } |
| | | }, |
| | | submitSafetyRiskSpace(){ |
| | | this.$refs["safetyRiskSpaceForm"].validate((valid) =>{ |
| | | if(valid){ |
| | | debugger |
| | | addSafetyRiskSpace(this.safetyRiskSpaceForm).then((res)=>{ |
| | | if(res.data.code === '200'){ |
| | | this.safetyRiskSpaceVisible = false |
| | |
| | | }, |
| | | onFileSuccess(response){ |
| | | if(response.code === '200'){ |
| | | debugger |
| | | this.safetyRiskSpaceForm.img = response.result.path |
| | | this.fileList = [] |
| | | this.fileList.push({url:process.env.IMG_API + response.result.path}) |
| | | this.$notify({ |
| | | type:'success', |
| | |
| | | } |
| | | }, |
| | | handleFile(file){ |
| | | debugger |
| | | this.dialogImageUrl = file.url; |
| | | this.dialogVisible = true; |
| | | }, |