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

台账管理详情bug修复

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