| | |
| | | <div class="app-container"> |
| | | <div class="filter-container"> |
| | | <div class="basic_search"> |
| | | <span>企业名称:</span> |
| | | <el-select v-model="listQuery.eid" class="analyseUnit_input"> |
| | | <el-option |
| | | v-for="item in companyList" |
| | | :key="item.id" |
| | | :label="item.company" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>状态:</span> |
| | | <el-select v-model="listQuery.status" class="analyseUnit_input"> |
| | | <el-option |
| | |
| | | </el-table-column> |
| | | <el-table-column label="安全风险空间分布图" prop="img" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-popover placement="top-start" trigger="click"> |
| | | <!-- <a href="http://192.168.0.7:8100/upload/enterprise/20210327184751998.png" target="_blank" title="查看最大化图片"><img src="http://192.168.0.7:8100/upload/enterprise/20210327184751998.png" style="width: 300px;height: 300px" /></a>--> |
| | | <!-- <img slot="reference" src="http://192.168.0.7:8100/upload/enterprise/20210327184751998.png" style="width:40px;height:40px;margin-left:10px;cursor:pointer" ></img>--> |
| | | <!-- <a :href="scope.row.enterpriseResources.url" target="_blank" title="查看最大化图片"><img v-for="(item,index) in scope.row.enterpriseResources" :src="item.url" style="width: 300px;height: 300px" /></a>--> |
| | | <img slot="reference" :src="scope.row.img" style="width:40px;height:40px;margin-left:10px;cursor:pointer" @click="showImg(scope.row.img)"></img> |
| | | </el-popover> |
| | | <el-button type="text" @click="downloadPic(scope.row)">下载</el-button> |
| | | <!-- <el-popover placement="top-start" trigger="click">--> |
| | | <!-- <!– <a href="http://192.168.0.7:8100/upload/enterprise/20210327184751998.png" target="_blank" title="查看最大化图片"><img src="http://192.168.0.7:8100/upload/enterprise/20210327184751998.png" style="width: 300px;height: 300px" /></a>–>--> |
| | | <!-- <!– <img slot="reference" src="http://192.168.0.7:8100/upload/enterprise/20210327184751998.png" style="width:40px;height:40px;margin-left:10px;cursor:pointer" ></img>–>--> |
| | | <!-- <!– <a :href="scope.row.enterpriseResources.url" target="_blank" title="查看最大化图片"><img v-for="(item,index) in scope.row.enterpriseResources" :src="item.url" style="width: 300px;height: 300px" /></a>–>--> |
| | | <!-- <img slot="reference" :src="scope.row.img" style="width:40px;height:40px;margin-left:10px;cursor:pointer" @click="showImg(scope.row.img)"></img>--> |
| | | <!-- </el-popover>--> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="创建人" prop="createUname" align="center"> |
| | |
| | | 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'){ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | downloadPic(val){ |
| | | window.open( val.img, '_blank') |
| | | }, |
| | | showSafetyRiskSpace(value,type){ |
| | | this.safetyRiskSpaceVisible = true |
| | | this.$nextTick(() =>{ |
| | |
| | | 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 |
| | |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(()=> { |
| | | deleteSafetyRiskSpace(val.id).then( ()=>{ |
| | | this.getSafetyRiskSpaceData() |
| | | this.$notify({ |
| | | title:'成功', |
| | | message:'删除成功', |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | deleteSafetyRiskSpace(val.id).then( (res)=>{ |
| | | if(res.data.code === '200'){ |
| | | this.getSafetyRiskSpaceData() |
| | | this.$notify({ |
| | | title:'成功', |
| | | message:'删除成功', |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | 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; |
| | | }, |