|
@@ -83,18 +83,44 @@
|
|
|
<el-table-column :label="$t('证书有效期')" align="center" width="300" prop="validity" />
|
|
|
<el-table-column :label="$t('是否需要跟进')" align="center" prop="follow" :formatter="followFormat"/>
|
|
|
<el-table-column :label="$t('使用/储存/废物最大量')" align="center" prop="allowance" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column :label="$t('排放/监控要求')" align="center" prop="requirementsUrl" :show-overflow-tooltip="true">
|
|
|
+ <el-table-column :label="$t('排放/监控要求')" align="center" width="300" :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.reqPic === 'false'">{{ scope.row.requirements }}</span>
|
|
|
- <el-image
|
|
|
- style="width: 100px; height: 100px"
|
|
|
- v-if="scope.row.reqPic === 'true'"
|
|
|
- :src="scope.row.requirementsUrl"
|
|
|
- :preview-src-list="scope.row.srcList">
|
|
|
+ <span v-if="scope.row.reqPic === 'true'">
|
|
|
+ 废水
|
|
|
+ <el-image
|
|
|
+ style="width: 100px; height: 100px"
|
|
|
+ :src="scope.row.reqWater"
|
|
|
+ :preview-src-list="scope.row.srcWaterList">
|
|
|
+ </el-image>
|
|
|
+ 废气
|
|
|
+ <el-image
|
|
|
+ style="width: 100px; height: 100px"
|
|
|
+ :src="scope.row.reqExhaust"
|
|
|
+ :preview-src-list="scope.row.srcExhaustList">
|
|
|
</el-image>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="$t('主要内容')" align="center" width="300" prop="content">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.conPic === 'false'">{{ scope.row.content }}</span>
|
|
|
+ <span v-if="scope.row.conPic === 'true'">
|
|
|
+ 废水
|
|
|
+ <el-image
|
|
|
+ style="width: 100px; height: 100px"
|
|
|
+ :src="scope.row.conWater"
|
|
|
+ :preview-src-list="scope.row.conWaterList">
|
|
|
+ </el-image>
|
|
|
+ 废气
|
|
|
+ <el-image
|
|
|
+ style="width: 100px; height: 100px"
|
|
|
+ :src="scope.row.conExhaust"
|
|
|
+ :preview-src-list="scope.row.conExhaustList">
|
|
|
+ </el-image>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :label="$t('主要内容')" align="center" width="250" prop="content"/>
|
|
|
<el-table-column :label="$t('负责人')" align="center" prop="owner" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column :label="$t('回顾人')" align="center" prop="reviewerName" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column :label="$t('本次回顾日期')" align="center" prop="reviewdate" width="100">
|
|
@@ -243,20 +269,64 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="$t('排放/监控要求')" prop="requirements">
|
|
|
<el-input v-if="form.reqPic === false" v-model="form.requirements" :placeholder="$t('请输入') + $t('排放/监控要求')" />
|
|
|
- <el-upload
|
|
|
- ref="requirements"
|
|
|
- :headers="requirements.headers"
|
|
|
- :action="requirements.url + '?pType=' + requirements.pType + '&pId=' + requirements.pId"
|
|
|
- v-if="form.reqPic === true"
|
|
|
- :show-file-list="false"
|
|
|
- :on-success="handleAvatarSuccess"
|
|
|
- list-type="picture-card">
|
|
|
- <img v-if="requirementsUrl" :src="requirementsUrl" class="avatar">
|
|
|
- <i v-else class="el-icon-plus "></i>
|
|
|
- </el-upload>
|
|
|
+ <span v-if="form.reqPic === true">
|
|
|
+ 废水
|
|
|
+ <el-upload
|
|
|
+ ref="picture"
|
|
|
+ :headers="picture.headers"
|
|
|
+ :action="picture.url + '?pType=requirementsWaterPic&pId=' + picture.pId"
|
|
|
+ :show-file-list="false"
|
|
|
+ :on-success="handleWaterAvatarSuccess"
|
|
|
+ list-type="picture-card"
|
|
|
+ style="display: inline-block">
|
|
|
+ <img v-if="picWaterUrl" :src="picWaterUrl" class="avatar">
|
|
|
+ <i v-else class="el-icon-plus "></i>
|
|
|
+ </el-upload>
|
|
|
+ 废气
|
|
|
+ <el-upload
|
|
|
+ ref="picture"
|
|
|
+ :headers="picture.headers"
|
|
|
+ :action="picture.url + '?pType=requirementsExhaustPic&pId=' + picture.pId"
|
|
|
+ :show-file-list="false"
|
|
|
+ :on-success="handleExhaustAvatarSuccess"
|
|
|
+ list-type="picture-card"
|
|
|
+ style="display: inline-block">
|
|
|
+ <img v-if="picExhaustUrl" :src="picExhaustUrl" class="avatar">
|
|
|
+ <i v-else class="el-icon-plus "></i>
|
|
|
+ </el-upload>
|
|
|
+ </span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="主要内容为图表" prop="conPic">
|
|
|
+ <el-checkbox v-model="form.conPic"></el-checkbox>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="$t('主要内容')" prop="content">
|
|
|
- <el-input v-model="form.content" type="textarea" :placeholder="$t('请输入') + $t('主要内容')" />
|
|
|
+ <el-input v-if="form.conPic === false" v-model="form.content" type="textarea" :placeholder="$t('请输入') + $t('主要内容')" />
|
|
|
+ <span v-if="form.conPic === true">
|
|
|
+ 废水
|
|
|
+ <el-upload
|
|
|
+ ref="picture"
|
|
|
+ :headers="picture.headers"
|
|
|
+ :action="picture.url + '?pType=contentWaterPic&pId=' + picture.pId"
|
|
|
+ :show-file-list="false"
|
|
|
+ :on-success="handleWaterConSuccess"
|
|
|
+ list-type="picture-card"
|
|
|
+ style="display: inline-block">
|
|
|
+ <img v-if="conWaterUrl" :src="conWaterUrl" class="avatar">
|
|
|
+ <i v-else class="el-icon-plus "></i>
|
|
|
+ </el-upload>
|
|
|
+ 废气
|
|
|
+ <el-upload
|
|
|
+ ref="picture"
|
|
|
+ :headers="picture.headers"
|
|
|
+ :action="picture.url + '?pType=contentExhaustPic&pId=' + picture.pId"
|
|
|
+ :show-file-list="false"
|
|
|
+ :on-success="handleExhaustConSuccess"
|
|
|
+ list-type="picture-card"
|
|
|
+ style="display: inline-block">
|
|
|
+ <img v-if="conExhaustUrl" :src="conExhaustUrl" class="avatar">
|
|
|
+ <i v-else class="el-icon-plus "></i>
|
|
|
+ </el-upload>
|
|
|
+ </span>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="$t('负责人')" prop="owner">
|
|
|
<el-input v-model="form.owner" :placeholder="$t('请选择') + $t('负责人')" />
|
|
@@ -534,7 +604,7 @@ export default {
|
|
|
pageTotalNum: 1,
|
|
|
loadedRatio: 0,
|
|
|
},
|
|
|
- requirements: {
|
|
|
+ picture: {
|
|
|
file: "",
|
|
|
// 报告附件上传位置编号
|
|
|
ids: 0,
|
|
@@ -542,11 +612,14 @@ export default {
|
|
|
headers: { Authorization: "Bearer " + getToken() },
|
|
|
// 上传的地址
|
|
|
url: process.env.VUE_APP_BASE_API + "/ehs/environapproval/uploadPic",
|
|
|
- pType: 'requirementsPic',
|
|
|
+ pType: '',
|
|
|
pId: null
|
|
|
},
|
|
|
//图片url
|
|
|
- requirementsUrl: '',
|
|
|
+ picWaterUrl: '',
|
|
|
+ picExhaustUrl: '',
|
|
|
+ conWaterUrl: '',
|
|
|
+ conExhaustUrl: '',
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
@@ -601,9 +674,6 @@ export default {
|
|
|
follow: [
|
|
|
{ required: true, message: this.$t('是否需要跟进') + this.$t('不能为空'), trigger: "change" }
|
|
|
],
|
|
|
- requirements: [
|
|
|
- { required: true, message: this.$t('排放/监控要求') + this.$t('不能为空'), trigger: "blur" }
|
|
|
- ],
|
|
|
reviewer: [
|
|
|
{ required: true, message: this.$t('回顾人') + this.$t('不能为空'), trigger: "blur" }
|
|
|
],
|
|
@@ -648,10 +718,30 @@ export default {
|
|
|
this.environapprovalList = response.rows;
|
|
|
this.environapprovalList.forEach(function (item) {
|
|
|
if (item.reqPic === 'true') {
|
|
|
- item.requirementsUrl = process.env.VUE_APP_BASE_API + item.requirements;
|
|
|
- var srcList = [];
|
|
|
- srcList.push(process.env.VUE_APP_BASE_API + item.requirements);
|
|
|
- item.srcList = srcList;
|
|
|
+ if (item.reqWater) {
|
|
|
+ var srcWaterList = [];
|
|
|
+ srcWaterList.push(process.env.VUE_APP_BASE_API + item.reqWater);
|
|
|
+ item.srcWaterList = srcWaterList;
|
|
|
+ item.reqWater = process.env.VUE_APP_BASE_API + item.reqWater;
|
|
|
+ }
|
|
|
+ if (item.reqExhaust) {
|
|
|
+ var srcExhaustList = [];
|
|
|
+ srcExhaustList.push(process.env.VUE_APP_BASE_API + item.reqExhaust);
|
|
|
+ item.srcExhaustList = srcExhaustList;
|
|
|
+ item.reqExhaust = process.env.VUE_APP_BASE_API + item.reqExhaust;
|
|
|
+ }
|
|
|
+ if (item.conWater) {
|
|
|
+ var conWaterList = [];
|
|
|
+ conWaterList.push(process.env.VUE_APP_BASE_API + item.conWater);
|
|
|
+ item.conWaterList = conWaterList;
|
|
|
+ item.conWater = process.env.VUE_APP_BASE_API + item.conWater;
|
|
|
+ }
|
|
|
+ if (item.conExhaust) {
|
|
|
+ var conExhaustList = [];
|
|
|
+ conExhaustList.push(process.env.VUE_APP_BASE_API + item.conExhaust);
|
|
|
+ item.conExhaustList = conExhaustList;
|
|
|
+ item.conExhaust = process.env.VUE_APP_BASE_API + item.conExhaust;
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
this.total = response.total;
|
|
@@ -688,7 +778,10 @@ export default {
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
- this.requirementsUrl = '';
|
|
|
+ this.picWaterUrl = '';
|
|
|
+ this.picExhaustUrl = '';
|
|
|
+ this.conWaterUrl = '';
|
|
|
+ this.conExhaustUrl = '';
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
plantCode: null,
|
|
@@ -719,7 +812,11 @@ export default {
|
|
|
validityAfter: null,
|
|
|
content: null,
|
|
|
reqPic: null,
|
|
|
- requirementsUrl: null
|
|
|
+ reqWater: null,
|
|
|
+ reqExhaust: null,
|
|
|
+ conPic: null,
|
|
|
+ conWater: null,
|
|
|
+ conExhaust: null
|
|
|
};
|
|
|
this.chooseDate = []
|
|
|
this.resetForm("form");
|
|
@@ -778,10 +875,24 @@ export default {
|
|
|
}else {
|
|
|
this.form.reqPic = false
|
|
|
}
|
|
|
- if(response.data.requirements) {
|
|
|
- this.requirementsUrl = process.env.VUE_APP_BASE_API + response.data.requirements;
|
|
|
+ if (this.form.conPic === 'true') {
|
|
|
+ this.form.conPic = true
|
|
|
+ }else {
|
|
|
+ this.form.conPic = false
|
|
|
+ }
|
|
|
+ if(response.data.reqWater) {
|
|
|
+ this.picWaterUrl = process.env.VUE_APP_BASE_API + response.data.reqWater;
|
|
|
+ }
|
|
|
+ if(response.data.reqExhaust) {
|
|
|
+ this.picExhaustUrl = process.env.VUE_APP_BASE_API + response.data.reqExhaust;
|
|
|
+ }
|
|
|
+ if(response.data.conWater) {
|
|
|
+ this.conWaterUrl = process.env.VUE_APP_BASE_API + response.data.conWater;
|
|
|
}
|
|
|
- this.requirements.pId = row.id;
|
|
|
+ if(response.data.conExhaust) {
|
|
|
+ this.conExhaustUrl = process.env.VUE_APP_BASE_API + response.data.conExhaust;
|
|
|
+ }
|
|
|
+ this.picture.pId = row.id;
|
|
|
this.open = true;
|
|
|
this.title = this.$t('修改') + this.$t('环保批文清单');
|
|
|
});
|
|
@@ -946,8 +1057,20 @@ export default {
|
|
|
this.msgError(this.$t('pdf加载失败'))
|
|
|
})
|
|
|
},
|
|
|
- handleAvatarSuccess (res, file, fileList) {
|
|
|
- this.requirementsUrl = URL.createObjectURL(file.raw);
|
|
|
+ handleWaterAvatarSuccess (res, file, fileList) {
|
|
|
+ this.picWaterUrl = URL.createObjectURL(file.raw);
|
|
|
+ this.$alert(res.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
+ },
|
|
|
+ handleExhaustAvatarSuccess (res, file, fileList) {
|
|
|
+ this.picExhaustUrl = URL.createObjectURL(file.raw);
|
|
|
+ this.$alert(res.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
+ },
|
|
|
+ handleWaterConSuccess (res, file, fileList) {
|
|
|
+ this.conWaterUrl = URL.createObjectURL(file.raw);
|
|
|
+ this.$alert(res.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
+ },
|
|
|
+ handleExhaustConSuccess (res, file, fileList) {
|
|
|
+ this.conExhaustUrl = URL.createObjectURL(file.raw);
|
|
|
this.$alert(res.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
},
|
|
|
// pdf上一页
|
|
@@ -970,4 +1093,9 @@ export default {
|
|
|
.el-table .cell {
|
|
|
white-space: pre-line;
|
|
|
}
|
|
|
+
|
|
|
+ .avatar {
|
|
|
+ width: 120px;
|
|
|
+ height: 140px;
|
|
|
+ }
|
|
|
</style>
|