Browse Source

安全鉴定清单审核页面

master_tdsql
xzt 1 year ago
parent
commit
764266a2ab
  1. 502
      src/views/safetyManage/safetyAppraisal/sluice/components/listBaseInfo_em.vue
  2. 424
      src/views/safetyManage/safetyAppraisal/sluice/components/listSafetyDetection_em.vue
  3. 51
      src/views/safetyManage/safetyAppraisal/sluice/list.vue

502
src/views/safetyManage/safetyAppraisal/sluice/components/listBaseInfo_em.vue

@ -0,0 +1,502 @@
<template>
<div>
<el-descriptions
class="margin-top"
:column="2"
border
:labelStyle="{
'text-align': 'left',
width: '180px',
height: '50px',
}"
:contentStyle="{}"
>
<el-descriptions-item>
<template slot="label"> 水闸名称 </template>
{{ this.wagaName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 鉴定日期 </template>
{{ this.form.identifyTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 下次鉴定日期 </template>
{{ this.form.nextIdentifyTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 安全评价单位 </template>
{{ this.form.safetyEvaluationUnit }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 单位资质 </template>
{{ this.form.unitQualification }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 审定部门 </template>
{{ this.form.approvalDepartment }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 审定部门级别 </template>
{{ approvalDepartmentLevelFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 安全类别 </template>
{{ securityCategoryFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 防洪安全鉴定意见 </template>
{{ this.form.floodControlOpinions }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 结构安全鉴定意见 </template>
{{ this.form.structuralOpinion }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 渗流安全鉴定意见 </template>
{{ this.form.seepageOpinion }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 抗震安全鉴定意见 </template>
{{ this.form.seismicOpinion }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 金属结构安全鉴定意见 </template>
{{ this.form.metalStructuralOpinion }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 鉴定工程存在主要问题 </template>
{{ this.form.mainIssues }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 其他工程问题 </template>
{{ this.form.otherEngineerIssues }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 水闸安全评价报告 </template>
<template v-if="this.form.safetyEvaluationReport">
<div
v-for="(item, index) in JSON.parse(
this.form.safetyEvaluationReport
)"
:key="item + index"
>
{{ item.name }}
<i
class="el-icon-download"
@click="downloadFile2(item, index)"
style="cursor: pointer"
></i>
</div>
</template>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 安全鉴定报告 </template>
<template v-if="this.form.safetyAppraisalReport">
<div
v-for="(item, index) in JSON.parse(this.form.safetyAppraisalReport)"
:key="item + index"
>
{{ item.name }}
<i
class="el-icon-download"
@click="downloadFile2(item, index)"
style="cursor: pointer"
></i>
</div>
</template>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 安全鉴定意见 </template>
<template v-if="this.form.safetyAppraisalOpinion">
<div
v-for="(item, index) in JSON.parse(
this.form.safetyAppraisalOpinion
)"
:key="item + index"
>
{{ item.name }}
<i
class="el-icon-download"
@click="downloadFile2(item, index)"
style="cursor: pointer"
></i>
</div>
</template>
</el-descriptions-item>
</el-descriptions>
<!-- <div class="btnList">
<el-button type="primary">通过</el-button>
<el-button>不通过</el-button>
</div> -->
</div>
</template>
<script>
import {
listAqjdxx,
getAqjdxx,
delAqjdxx,
addAqjdxx,
updateAqjdxx,
exportAqjdxx,
} from "@/api/yg/aqjdxx";
import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload";
export default {
name: "Aqjdxx",
props: ["wagaName", "szrwId"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
aqjdxxList: [],
//
title: "",
//
open: false,
//
approvalDepartmentLevelOptions: [],
//
securityCategoryOptions: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
szrwId: null,
identifyTime: null,
nextIdentifyTime: null,
safetyEvaluationUnit: null,
unitQualification: null,
approvalDepartment: null,
approvalDepartmentLevel: null,
securityCategory: null,
floodControlOpinions: null,
structuralOpinion: null,
seepageOpinion: null,
seismicOpinion: null,
metalStructuralOpinion: null,
otherEngineerIssues: null,
mainIssues: null,
safetyEvaluationReport: null,
safetyAppraisalReport: null,
safetyAppraisalOpinion: null,
createUid: null,
updateUid: null,
owerDept: null,
relation: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {},
//
headers: {
shuili: "water " + getToken(),
},
fileList1: [],
fileList2: [],
fileList3: [],
};
},
created() {
this.getList();
this.getDicts("approval_department_levels").then((response) => {
this.approvalDepartmentLevelOptions = response.data;
});
this.getDicts("security_category").then((response) => {
this.securityCategoryOptions = response.data;
});
},
methods: {
/** 查询水闸安全鉴定信息列表 */
getList() {
// this.loading = true;
this.queryParams.data.szrwId = this.szrwId;
listAqjdxx(this.queryParams).then((response) => {
if (response.records[0]) {
this.form = response.records[0];
if (this.form.safetyEvaluationReport) {
this.fileList1 = JSON.parse(this.form.safetyEvaluationReport);
}
if (this.form.safetyAppraisalReport) {
this.fileList2 = JSON.parse(this.form.safetyAppraisalReport);
}
if (this.form.safetyAppraisalOpinion) {
this.fileList3 = JSON.parse(this.form.safetyAppraisalOpinion);
}
}
// this.total = response.total;
// this.loading = false;
});
},
//
approvalDepartmentLevelFormat(row, column) {
return this.selectDictLabel(
this.approvalDepartmentLevelOptions,
row.approvalDepartmentLevel
);
},
//
securityCategoryFormat(row, column) {
return this.selectDictLabel(
this.securityCategoryOptions,
row.securityCategory
);
},
//
cancel() {
// this.open = false;
// this.reset();
this.$emit("cancelParent");
},
//
reset() {
this.form = {
id: null,
szrwId: null,
identifyTime: null,
nextIdentifyTime: null,
safetyEvaluationUnit: null,
unitQualification: null,
approvalDepartment: null,
approvalDepartmentLevel: null,
securityCategory: null,
floodControlOpinions: null,
structuralOpinion: null,
seepageOpinion: null,
seismicOpinion: null,
metalStructuralOpinion: null,
otherEngineerIssues: null,
mainIssues: null,
safetyEvaluationReport: null,
safetyAppraisalReport: null,
safetyAppraisalOpinion: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
owerDept: null,
remark: null,
relation: null,
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {
id: null,
szrwId: null,
identifyTime: null,
nextIdentifyTime: null,
safetyEvaluationUnit: null,
unitQualification: null,
approvalDepartment: null,
approvalDepartmentLevel: null,
securityCategory: null,
floodControlOpinions: null,
structuralOpinion: null,
seepageOpinion: null,
seismicOpinion: null,
metalStructuralOpinion: null,
otherEngineerIssues: null,
mainIssues: null,
safetyEvaluationReport: null,
safetyAppraisalReport: null,
safetyAppraisalOpinion: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
owerDept: null,
remark: null,
relation: null,
},
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加水闸安全鉴定信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getAqjdxx(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改水闸安全鉴定信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.safetyEvaluationReport = JSON.stringify(this.fileList1);
this.form.safetyAppraisalReport = JSON.stringify(this.fileList2);
this.form.safetyAppraisalOpinion = JSON.stringify(this.fileList3);
if (this.form.id != null) {
updateAqjdxx(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.szrwId = this.szrwId;
addAqjdxx(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delAqjdxx(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
//
submitUpload(fileList, name) {
console.log(name, fileList);
this[name].push({
name: fileList.name,
fileName: fileList.response.fileName,
url: fileList.response.url,
uid: fileList.uid,
});
console.log(name, this[name]);
},
handleRemove(file, name) {
// console.log(file, fileList1);
let index = this[name].findIndex((item) => item.uid === file.uid);
//
this[name].splice(index, 1);
},
downloadFile2(info, index) {
console.log(info);
this.handlePreview(info);
},
//
handlePreview(file) {
// console.log(file);
getFileStream({ fileName: file.fileName }).then((res) => {
const blob = new Blob([res], {
// type
// application/xlsx application/zip
type: "application/xlsx",
}); //excel,pdf
const href = URL.createObjectURL(blob); //URLblob
const a = document.createElement("a"); //a
a.style.display = "none";
a.href = href; //
a.download = file.name; //
a.click(); //
URL.revokeObjectURL(a.href); //URL
});
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
// ::v-deep {
// .el-dialog {
// margin-top: 2vh !important;
// }
// }
.btnList {
margin-top: 20px;
text-align: right;
// position: fixed;
// bottom: 20px;
// right: 20px;
// z-index: 1;
}
</style>

424
src/views/safetyManage/safetyAppraisal/sluice/components/listSafetyDetection_em.vue

@ -0,0 +1,424 @@
<template>
<div>
<el-descriptions
class="margin-top"
:column="2"
border
:labelStyle="{
'text-align': 'left',
width: '180px',
height: '50px',
}"
:contentStyle="{}"
>
<el-descriptions-item :span="2">
<template slot="label"> 水闸名称 </template>
{{ this.wagaName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 闸门数量 </template>
{{ this.form.holesNumber }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 启闭机数量 </template>
{{ this.form.hoistNumber }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 闸门型式 </template>
{{ gateTypeFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 启闭机型式 </template>
{{ hoistTypeFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :span="2">
<template slot="label"> 安全评价 </template>
{{ this.form.evaluate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 现场检测成果 </template>
<template v-if="this.form.testingResults">
<div
v-for="(item, index) in JSON.parse(this.form.testingResults)"
:key="item + index"
>
{{ item.name }}
<i
class="el-icon-download"
@click="downloadFile2(item, index)"
style="cursor: pointer"
></i>
</div>
</template>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 复核计算成果 </template>
<template v-if="this.form.calculationResults">
<div
v-for="(item, index) in JSON.parse(this.form.calculationResults)"
:key="item + index"
>
{{ item.name }}
<i
class="el-icon-download"
@click="downloadFile2(item, index)"
style="cursor: pointer"
></i>
</div>
</template>
</el-descriptions-item>
</el-descriptions>
<!-- <div class="btnList">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div> -->
</div>
</template>
<script>
import {
listAqjc,
getAqjc,
delAqjc,
addAqjc,
updateAqjc,
exportAqjc,
} from "@/api/yg/aqjc";
import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload";
export default {
name: "Aqjc",
props: ["wagaName", "szrwId"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
aqjcList: [],
//
title: "",
//
open: false,
//
gateTypeOptions: [],
//
hoistTypeOptions: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
szrwId: null,
sluiceCode: null,
sluiceName: null,
holesNumber: null,
hoistNumber: null,
gateType: null,
hoistType: null,
evaluate: null,
testingResults: null,
calculationResults: null,
createUid: null,
updateUid: null,
owerDept: null,
relation: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
//
form: {},
//
rules: {
holesNumber: [
{
pattern: /^[0-9]\d*$/,
message: "请输入正整数,包含0",
trigger: "blur",
},
],
hoistNumber: [
{
pattern: /^[0-9]\d*$/,
message: "请输入正整数,包含0",
trigger: "blur",
},
],
},
//
headers: {
shuili: "water " + getToken(),
},
fileList1: [],
fileList2: [],
};
},
created() {
this.getList();
this.getDicts("gate_type").then((response) => {
this.gateTypeOptions = response.data;
});
this.getDicts("machine_form").then((response) => {
this.hoistTypeOptions = response.data;
});
},
methods: {
//
gateTypeFormat(row, column) {
return this.selectDictLabel(this.gateTypeOptions, row.gateType);
},
//
hoistTypeFormat(row, column) {
return this.selectDictLabel(this.hoistTypeOptions, row.hoistType);
},
/** 查询水闸安全检测列表 */
getList() {
// this.loading = true;
this.queryParams.data.szrwId = this.szrwId;
listAqjc(this.queryParams).then((response) => {
// this.aqjcList = response.records;
if (response.records[0]) {
this.form = response.records[0];
if (this.form.testingResults) {
this.fileList1 = JSON.parse(this.form.testingResults);
}
if (this.form.calculationResults) {
this.fileList2 = JSON.parse(this.form.calculationResults);
}
}
// this.total = response.total;
// this.loading = false;
});
},
//
cancel() {
// this.open = false;
// this.reset();
this.$emit("cancelParent");
},
//
reset() {
this.form = {
id: null,
szrwId: null,
sluiceCode: null,
sluiceName: null,
holesNumber: null,
hoistNumber: null,
gateType: null,
hoistType: null,
evaluate: null,
testingResults: null,
calculationResults: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
owerDept: null,
remark: null,
relation: null,
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {
id: null,
szrwId: null,
sluiceCode: null,
sluiceName: null,
holesNumber: null,
hoistNumber: null,
gateType: null,
hoistType: null,
evaluate: null,
testingResults: null,
calculationResults: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
owerDept: null,
remark: null,
relation: null,
},
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加水闸安全检测";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getAqjc(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改水闸安全检测";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.testingResults = JSON.stringify(this.fileList1);
this.form.calculationResults = JSON.stringify(this.fileList2);
if (this.form.id != null) {
updateAqjc(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.szrwId = this.szrwId;
addAqjc(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delAqjc(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
//
submitUpload(fileList, name) {
console.log(name, fileList);
this[name].push({
name: fileList.name,
fileName: fileList.response.fileName,
url: fileList.response.url,
uid: fileList.uid,
});
console.log(name, this[name]);
},
handleRemove(file, name) {
// console.log(file, fileList1);
let index = this[name].findIndex((item) => item.uid === file.uid);
//
this[name].splice(index, 1);
},
downloadFile2(info, index) {
console.log(info);
this.handlePreview(info);
},
//
handlePreview(file) {
// console.log(file);
getFileStream({ fileName: file.fileName }).then((res) => {
const blob = new Blob([res], {
// type
// application/xlsx application/zip
type: "application/xlsx",
}); //excel,pdf
const href = URL.createObjectURL(blob); //URLblob
const a = document.createElement("a"); //a
a.style.display = "none";
a.href = href; //
a.download = file.name; //
a.click(); //
URL.revokeObjectURL(a.href); //URL
});
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
// ::v-deep {
// .el-dialog {
// margin-top: 2vh !important;
// }
// }
.btnList {
text-align: right;
// position: fixed;
// bottom: 20px;
// right: 20px;
// z-index: 1;
}
</style>

51
src/views/safetyManage/safetyAppraisal/sluice/list.vue

@ -222,6 +222,39 @@
<el-button @click="cancel"> </el-button>
</div> -->
</el-dialog>
<!-- 审核 -->
<el-dialog
:title="emTitle"
:visible.sync="emOpen"
width="1200px"
append-to-body
:close-on-click-modal="false"
@close="close"
>
<el-tabs v-model="emActiveName" style="margin-bottom: 20px" v-if="emOpen">
<el-tab-pane label="安全鉴定信息" name="listBaseInfoEm" :lazy="true">
<listBaseInfoEm
ref="listBaseInfoEm"
:szrwId="szrwId"
:wagaName="wagaName"
@cancelParent="cancel"
/>
</el-tab-pane>
<el-tab-pane label="安全检测" name="listSafetyDetectionEm" :lazy="true">
<listSafetyDetectionEm
:szrwId="szrwId"
:wagaName="wagaName"
@cancelParent="cancel"
/>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer">
<el-button type="primary"> 过66</el-button>
<el-button>不通过</el-button>
</div>
</el-dialog>
</div>
</template>
@ -231,15 +264,21 @@ import { listJbxx, getJbxx } from "@/api/yg/jbxx";
import listBaseInfo from "./components/listBaseInfo.vue";
import listSafetyDetection from "./components/listSafetyDetection.vue";
import listBaseInfoEm from "./components/listBaseInfo_em.vue";
import listSafetyDetectionEm from "./components/listSafetyDetection_em.vue";
export default {
name: "Szrw",
components: {
listBaseInfo,
listSafetyDetection,
listBaseInfoEm,
listSafetyDetectionEm,
},
data() {
return {
activeName: "listBaseInfo",
emActiveName: "listBaseInfoEm",
//
loading: true,
//
@ -256,8 +295,10 @@ export default {
szrwList: [],
//
title: "",
emTitle: "",
//
open: false,
emOpen: false,
//
sluiceTypeOptions: [],
//
@ -305,6 +346,7 @@ export default {
methods: {
close() {
this.activeName = "listBaseInfo";
this.emActiveName = "listBaseInfoEm";
},
//
sluiceTypeFormat(row, column) {
@ -377,7 +419,7 @@ export default {
/** 填按钮操作 */
fillOut(row) {
this.reset();
// this.reset();
this.szrwId = row.id;
this.wagaName = row.wagaName;
this.open = true;
@ -388,7 +430,12 @@ export default {
// this.title = "";
// });
},
examine(row) {},
examine(row) {
this.szrwId = row.id;
this.wagaName = row.wagaName;
this.emOpen = true;
this.emTitle = "审核安全鉴定信息";
},
},
};
</script>

Loading…
Cancel
Save