Commit 0937891a authored by 王晓倩's avatar 王晓倩

台账管理详情bug修复

parent 48b21ea8
......@@ -116,112 +116,113 @@
/>
<!-- 添加或修改用户加装安全装置台账对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @cancel="cancel">
<el-dialog :title="title1" :visible.sync="open1" width="800px" append-to-body @cancel="cancel1">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<div v-if="title != '用户加装安全装置台账详情'">
<el-row>
<el-col :span="11">
<el-form-item label="用户名称" prop="userName">
<el-input v-model="form.userName" placeholder="请输入用户名称"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户编号" prop="userNo">
<el-input v-model="form.userNo" placeholder="请输入用户编号"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="form.idCard" placeholder="请输入身份证号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="linkMobile">
<el-input v-model="form.linkMobile" placeholder="请输入联系电话" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="详细地址" prop="userAddress">
<el-input type="textarea" v-model="form.userAddress" placeholder="请输入详细地址"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="品牌名称" prop="brandName">
<el-input v-model="form.brandName" placeholder="请输入品牌名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="安装时间" prop="installTime">
<el-date-picker clearable size="small"
v-model="form.installTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择安装时间"
style="width: 100%">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="form.remarks" placeholder="请输入备注信息" />
</el-form-item>
</el-col>
</el-row>
</div>
<div v-else>
<el-row>
<el-col :span="11">
<el-form-item label="用户名称:">
<font>{{form.userName}}</font>
</el-form-item>
<el-form-item label="身份证号:">
<font>{{form.idCard}}</font>
</el-form-item>
<el-form-item label="品牌名称:">
<font v-if="form.brandName != '' && form.brandName != null">{{form.brandName}}</font>
<font v-else> - </font>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户编号:">
<font v-if="form.userNo != '' && form.userNo != null">{{form.userNo}}</font>
<font v-else> - </font>
</el-form-item>
<el-form-item label="联系电话:">
<font>{{form.linkMobile}}</font>
</el-form-item>
<el-form-item label="安装时间:">
<font>{{form.installTime}}</font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="详细地址:">
<font>{{form.userAddress}}</font>
<el-row>
<el-col :span="11">
<el-form-item label="用户名称" prop="userName">
<el-input v-model="form.userName" placeholder="请输入用户名称"/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="备注信息:">
<font v-if="form.remarks != '' && form.remarks != null">{{form.remarks}}</font>
<font v-else> - </font>
</el-col>
<el-col :span="12">
<el-form-item label="用户编号" prop="userNo">
<el-input v-model="form.userNo" placeholder="请输入用户编号"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="form.idCard" placeholder="请输入身份证号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="linkMobile">
<el-input v-model="form.linkMobile" placeholder="请输入联系电话" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="详细地址" prop="userAddress">
<el-input type="textarea" v-model="form.userAddress" placeholder="请输入详细地址"/>
</el-form-item>
</el-row>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="品牌名称" prop="brandName">
<el-input v-model="form.brandName" placeholder="请输入品牌名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="安装时间" prop="installTime">
<el-date-picker clearable size="small"
v-model="form.installTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择安装时间"
style="width: 100%">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="form.remarks" placeholder="请输入备注信息" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if="title != '用户加装安全装置台账详情'" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel1">取 消</el-button>
</div>
</el-dialog>
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @cancel="cancel2">
<el-form ref="detailForm" :model="detailForm" label-width="120px">
<el-row>
<el-col :span="11">
<el-form-item label="用户名称:">
<font>{{detailForm.userName}}</font>
</el-form-item>
<el-form-item label="身份证号:">
<font>{{detailForm.idCard}}</font>
</el-form-item>
<el-form-item label="品牌名称:">
<font v-if="detailForm.brandName != '' && detailForm.brandName != null">{{detailForm.brandName}}</font>
<font v-else> - </font>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户编号:">
<font v-if="detailForm.userNo != '' && detailForm.userNo != null">{{detailForm.userNo}}</font>
<font v-else> - </font>
</el-form-item>
<el-form-item label="联系电话:">
<font>{{detailForm.linkMobile}}</font>
</el-form-item>
<el-form-item label="安装时间:">
<font>{{detailForm.installTime}}</font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="详细地址:">
<font>{{detailForm.userAddress}}</font>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="备注信息:">
<font v-if="detailForm.remarks != '' && detailForm.remarks != null">{{detailForm.remarks}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
</el-form>
</el-dialog>
</div>
</template>
......@@ -251,9 +252,11 @@ export default {
// 用户加装安全装置台账表格数据
equipmentList: [],
// 弹出层标题
title: "",
title1: "",
title2: "",
// 是否显示弹出层
open: false,
open1: false,
open2: false,
// 查询参数
queryParams: {
pageNum: 1,
......@@ -266,6 +269,7 @@ export default {
},
// 表单参数
form: {},
detailForm: {},
// 表单校验
rules: {
userName: [
......@@ -302,12 +306,16 @@ export default {
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
cancel1() {
this.open1 = false;
this.reset1();
},
cancel2() {
this.open2 = false;
this.reset2();
},
// 表单重置
reset() {
reset1() {
this.form = {
safeEquipmentId: null,
userName: null,
......@@ -326,6 +334,25 @@ export default {
};
this.resetForm("form");
},
reset2() {
this.detailForm = {
safeEquipmentId: null,
userName: null,
userNo: null,
userAddress: null,
idCard: null,
linkMobile: null,
installTime: null,
brandName: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
};
this.resetForm("detailForm");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
......@@ -338,18 +365,17 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加用户加装安全装置台账";
this.reset1();
this.open1 = true;
this.title1 = "添加用户加装安全装置台账";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.reset1();
getEquipment(row.safeEquipmentId).then(response => {
console.log("data",response.data);
this.form = response.data;
this.open = true;
this.title = "修改用户加装安全装置台账";
this.open1 = true;
this.title1 = "修改用户加装安全装置台账";
});
},
/** 提交按钮 */
......@@ -404,12 +430,11 @@ export default {
},
/** 详细信息跳转 */
showDetail(row) {
this.reset();
this.reset2();
getEquipment(row.safeEquipmentId).then(response => {
console.log("data",response.data);
this.form = response.data;
this.open = true;
this.title = "用户加装安全装置台账详情";
this.detailForm = response.data;
this.open2 = true;
this.title2 = "用户加装安全装置台账详情";
});
},
}
......
......@@ -131,9 +131,8 @@
/>
<!-- 添加或修改隐患整治台账对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @cancel="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<div v-if="title != '隐患整治台账详情'">
<el-dialog :title="title1" :visible.sync="open1" width="800px" append-to-body @cancel="cancel1">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="11">
<el-form-item label="隐患名称" prop="hiddenTitle">
......@@ -227,35 +226,41 @@
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel1">取 消</el-button>
</div>
</el-dialog>
<div v-else>
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @cancel="cancel2">
<el-form ref="detailForm" :model="detailForm" label-width="120px">
<el-row>
<el-col :span="11">
<el-form-item label="隐患名称:">
<font>{{form.hiddenTitle}}</font>
<font>{{detailForm.hiddenTitle}}</font>
</el-form-item>
<el-form-item label="隐患发现人员:">
<font>{{form.hiddenFindPeople}}</font>
<font>{{detailForm.hiddenFindPeople}}</font>
</el-form-item>
<el-form-item label="隐患位置:">
<font>{{form.hiddenLocation}}</font>
<font>{{detailForm.hiddenLocation}}</font>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患等级:">
<font v-if="form.hiddenType == '1'">一级隐患</font>
<font v-if="form.hiddenType == '2'">二级隐患</font>
<font v-if="form.hiddenType == '3'">三级隐患</font>
<font v-if="detailForm.hiddenType == '1'">一级隐患</font>
<font v-if="detailForm.hiddenType == '2'">二级隐患</font>
<font v-if="detailForm.hiddenType == '3'">三级隐患</font>
</el-form-item>
<el-form-item label="发现时间:">
<font>{{form.hiddenFindDate}}</font>
<font>{{detailForm.hiddenFindDate}}</font>
</el-form-item>
<el-form-item label="处理方案:">
<span
class="dbtn"
@click="checkFile(form.dealPlanUrl)"
v-if="form.dealPlan != ''"
@click="checkFile(detailForm.dealPlanUrl)"
v-if="detailForm.dealPlan != ''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
......@@ -265,27 +270,22 @@
</el-row>
<el-row>
<el-form-item label="隐患内容:">
<font>{{form.hiddenContent}}</font>
<font>{{detailForm.hiddenContent}}</font>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="整治情况:">
<font v-if="form.remediation != '' && form.remediation != null">{{form.remediation}}</font>
<font v-if="detailForm.remediation != '' && detailForm.remediation != null">{{detailForm.remediation}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="备注信息:">
<font v-if="form.remarks != '' && form.remarks != null">{{form.remarks}}</font>
<font v-if="detailForm.remarks != '' && detailForm.remarks != null">{{detailForm.remarks}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if="title != '隐患整治台账详情'" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<GetPos
......@@ -332,9 +332,11 @@ export default {
// 隐患整治台账表格数据
hiddenList: [],
// 弹出层标题
title: "",
title1: "",
title2: "",
// 是否显示弹出层
open: false,
open1: false,
open2: false,
// 隐患类型字典
typeOptions: [],
// 上传文件列表
......@@ -353,6 +355,7 @@ export default {
},
// 表单参数
form: {},
detailForm: {},
// 表单校验
rules: {
hiddenTitle: [
......@@ -368,7 +371,7 @@ export default {
{ required: true, message: "请输入隐患位置", trigger: "blur" },
],
longitude: [
{ required: true, message: "请输入经纬度", trigger: ["blur","change"] },
{ required: true, message: "请输入经纬度", trigger: "blur" },
],
hiddenFindPeople: [
{ required: true, message: "请输入隐患发现人员", trigger: "blur" },
......@@ -399,14 +402,18 @@ export default {
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
cancel1() {
this.open1 = false;
this.reset1();
this.fileList = [];
this.devicePos = [];
},
cancel2() {
this.open2 = false;
this.reset2();
},
// 表单重置
reset() {
reset1() {
this.form = {
hiddenId: null,
hiddenTitle: null,
......@@ -430,6 +437,28 @@ export default {
this.fileList = [];
this.devicePos = [];
},
reset2() {
this.detailForm = {
hiddenId: null,
hiddenTitle: null,
hiddenContent: null,
hiddenLocation: null,
longitude:null,
latitude: null,
hiddenType: null,
hiddenFindPeople: null,
hiddenFindDate: null,
dealPlan: null,
remediation: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
};
this.resetForm("detailForm");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
......@@ -442,13 +471,13 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加隐患整治台账";
this.reset1();
this.open1 = true;
this.title1 = "添加隐患整治台账";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.reset1();
getHidden(row.hiddenId).then(response => {
this.form = response.data;
if (this.form.dealPlan) {
......@@ -458,8 +487,8 @@ export default {
});
}
this.devicePos = [this.form.longitude, this.form.latitude];
this.open = true;
this.title = "修改隐患整治台账";
this.open1 = true;
this.title1 = "修改隐患整治台账";
});
},
/** 提交按钮 */
......@@ -469,13 +498,13 @@ export default {
if (this.form.hiddenId != null) {
updateHidden(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.open1 = false;
this.getList();
});
} else {
addHidden(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.open1 = false;
this.getList();
});
}
......@@ -514,18 +543,11 @@ export default {
},
/** 详细信息跳转 */
showDetail(row) {
this.reset();
this.reset2();
getHidden(row.hiddenId).then(response => {
this.form = response.data;
if (this.form.dealPlan) {
this.fileList.push({
name: this.form.dealPlan,
url: uploadfile,
});
}
this.devicePos = [this.form.longitude, this.form.latitude];
this.open = true;
this.title = "隐患整治台账详情";
this.detailForm = response.data;
this.open2 = true;
this.title2 = "隐患整治台账详情";
});
},
checkFile(url) {
......
......@@ -130,9 +130,8 @@
/>
<!-- 添加或修改事故台账对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @cancel="cancel">
<el-dialog :title="title1" :visible.sync="open1" width="800px" append-to-body @cancel="cancel1">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<div v-if="title != '燃气事故台账详情'">
<el-row>
<el-col :span="11">
<el-form-item label="事故名称" prop="troubleName">
......@@ -235,68 +234,69 @@
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel1">取 消</el-button>
</div>
</el-dialog>
<div v-else>
<el-dialog :title="title2" :visible.sync="open2" width="800px" append-to-body @cancel="cancel2">
<el-form ref="detailForm" :model="detailForm" label-width="120px">
<el-row>
<el-col :span="11">
<el-form-item label="事故名称:">
<font>{{form.troubleName}}</font>
<font>{{detailForm.troubleName}}</font>
</el-form-item>
<el-form-item label="事故原因:">
<font>{{form.troubleReason}}</font>
<font>{{detailForm.troubleReason}}</font>
</el-form-item>
<el-form-item label="责任单位:">
<font v-if="form.responsibleUnit != '' && form.responsibleUnit != null">{{form.responsibleUnit}}</font>
<font v-if="detailForm.responsibleUnit != '' && detailForm.responsibleUnit != null">{{detailForm.responsibleUnit}}</font>
<font v-else> - </font>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="事故类型:">
<font v-if="form.troubleType == '1'">安全生产事故</font>
<font v-if="form.troubleType == '2'">非生产安全事故</font>
<font v-if="detailForm.troubleType == '1'">安全生产事故</font>
<font v-if="detailForm.troubleType == '2'">非生产安全事故</font>
</el-form-item>
<el-form-item label="事故地点:">
<font>{{form.troubleLocation}}</font>
<font>{{detailForm.troubleLocation}}</font>
</el-form-item>
<el-form-item label="责任人员:">
<font v-if="form.responsiblePeople != '' && form.responsiblePeople != null">{{form.responsiblePeople}}</font>
<font v-if="detailForm.responsiblePeople != '' && detailForm.responsiblePeople != null">{{detailForm.responsiblePeople}}</font>
<font v-else> - </font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="简要经过:">
<font v-if="form.briefProcess != '' && form.briefProcess != null">{{form.briefProcess}}</font>
<font v-if="detailForm.briefProcess != '' && detailForm.briefProcess != null">{{detailForm.briefProcess}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="是否处理:">
<font v-if="form.isDeal == '1'">已处理</font>
<font v-if="form.isDeal == '2'">未处理</font>
<font v-if="detailForm.isDeal == '1'">已处理</font>
<font v-if="detailForm.isDeal == '2'">未处理</font>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="处理完成时间:">
<font>{{form.dealDate}}</font>
<font>{{detailForm.dealDate}}</font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="备注信息:">
<font v-if="form.remarks != '' && form.remarks != null">{{form.remarks}}</font>
<font v-if="detailForm.remarks != '' && detailForm.remarks != null">{{detailForm.remarks}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if="title != '燃气事故台账详情'" type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<GetPos
......@@ -344,9 +344,11 @@ export default {
dialogTableVisible: false,
devicePos: [],
// 弹出层标题
title: "",
title1: "",
title2: "",
// 是否显示弹出层
open: false,
open1: false,
open2: false,
// 查询参数
queryParams: {
pageNum: 1,
......@@ -361,6 +363,7 @@ export default {
},
// 表单参数
form: {},
detailForm: {},
// 表单校验
rules: {
troubleName: [
......@@ -373,7 +376,7 @@ export default {
{ required: true, message: "请输入事故地点", trigger: "blur" },
],
longitude: [
{ required: true, message: "请输入经纬度", trigger: ["blur","change"] },
{ required: true, message: "请输入经纬度", trigger: "blur" },
],
happenDate: [
{ required: true, message: "请选择事故发生时间", trigger: "blur" },
......@@ -410,13 +413,17 @@ export default {
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
cancel1() {
this.open1 = false;
this.reset1();
this.devicePos = [];
},
cancel2() {
this.open2 = false;
this.reset2();
},
// 表单重置
reset() {
reset1() {
this.form = {
troubleId: null,
troubleName: null,
......@@ -441,6 +448,30 @@ export default {
this.resetForm("form");
this.devicePos = [];
},
reset2() {
this.detailForm = {
troubleId: null,
troubleName: null,
troubleLocation: null,
longitude: null,
latitude: null,
troubleType: null,
briefProcess: null,
troubleReason: null,
responsibleUnit: null,
responsiblePeople: null,
isDeal: null,
happenDate: null,
dealDate: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
};
this.resetForm("detailForm");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
......@@ -453,18 +484,18 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加燃气事故台账";
this.reset1();
this.open1 = true;
this.title1 = "添加燃气事故台账";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.reset1();
getTrouble(row.troubleId).then(response => {
this.form = response.data;
this.devicePos = [this.form.longitude, this.form.latitude];
this.open = true;
this.title = "修改燃气事故台账";
this.open1 = true;
this.title1 = "修改燃气事故台账";
});
},
/** 提交按钮 */
......@@ -519,12 +550,11 @@ export default {
},
/** 详细信息跳转 */
showDetail(row) {
this.reset();
this.reset2();
getTrouble(row.troubleId).then(response => {
this.form = response.data;
this.devicePos = [this.form.longitude, this.form.latitude];
this.open = true;
this.title = "燃气事故台账详情";
this.detailForm = response.data;
this.open2 = true;
this.title2 = "燃气事故台账详情";
});
},
MapdialogFun() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment