fix:修改养护通知单非空处理,选择病害弹窗带入参数
This commit is contained in:
parent
bbc20309db
commit
e23ed1c708
@ -213,3 +213,12 @@ export function getCrossDropDown(params) {
|
|||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据所在路段返回道路名称id
|
||||||
|
export function getSegmentId(params) {
|
||||||
|
return request({
|
||||||
|
url: "/hxsection/getSectionBySectionCode",
|
||||||
|
method: "get",
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
* @Author: SunTao 328867980@qq.com
|
* @Author: SunTao 328867980@qq.com
|
||||||
* @Date: 2025-02-10 13:46:51
|
* @Date: 2025-02-10 13:46:51
|
||||||
* @LastEditors: SunTao 328867980@qq.com
|
* @LastEditors: SunTao 328867980@qq.com
|
||||||
* @LastEditTime: 2025-02-27 10:14:30
|
* @LastEditTime: 2025-03-10 09:24:42
|
||||||
* @FilePath: \znxjxt-ui\src\views\xj\document\maintenance-notice\components\disease-dialog.vue
|
* @FilePath: \znxjxt-ui\src\views\xj\document\maintenance-notice\components\disease-dialog.vue
|
||||||
* @Description: 生成通知单-新增弹窗-选择病害
|
* @Description: 生成通知单-新增弹窗-选择病害
|
||||||
-->
|
-->
|
||||||
@ -145,7 +145,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getMaintenanceNoticeList, } from "@/api/xj/document";
|
import { getMaintenanceNoticeList, getSegmentId } from "@/api/xj/document";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DiseaseDialog",
|
name: "DiseaseDialog",
|
||||||
@ -162,6 +162,11 @@ export default {
|
|||||||
checkedDiseaseList: {
|
checkedDiseaseList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
|
},
|
||||||
|
// 传过来需要回显的数据
|
||||||
|
diseaseData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -243,6 +248,23 @@ export default {
|
|||||||
rects: [],
|
rects: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
diseaseData: {
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
handler(val) {
|
||||||
|
this.diseaseForm.stakeStart = val.diseStartStake;
|
||||||
|
this.diseaseForm.stakeEnd = val.diseEndStake;
|
||||||
|
if (val.diseRoadPart) {
|
||||||
|
getSegmentId({ code: val.diseRoadPart }).then(({ code, data }) => {
|
||||||
|
if (code === 200) {
|
||||||
|
this.diseaseForm.segmentId = data ? data : "";
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDiseaseList();
|
this.getDiseaseList();
|
||||||
},
|
},
|
||||||
|
|||||||
@ -2,13 +2,13 @@
|
|||||||
* @Author: SunTao 328867980@qq.com
|
* @Author: SunTao 328867980@qq.com
|
||||||
* @Date: 2024-11-20 11:58:33
|
* @Date: 2024-11-20 11:58:33
|
||||||
* @LastEditors: SunTao 328867980@qq.com
|
* @LastEditors: SunTao 328867980@qq.com
|
||||||
* @LastEditTime: 2025-03-03 13:41:16
|
* @LastEditTime: 2025-03-10 09:23:25
|
||||||
* @FilePath: \znxjxt-ui\src\views\xj\document\maintenance-notice\components\edit-dialog.vue
|
* @FilePath: \znxjxt-ui\src\views\xj\document\maintenance-notice\components\edit-dialog.vue
|
||||||
* @Description: 养护通知单编辑弹窗
|
* @Description: 养护通知单编辑弹窗
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-dialog">
|
<div class="edit-dialog">
|
||||||
<el-form class="editForm" ref="editForm" :model="editForm" :rules="rules" label-width="7rem">
|
<el-form class="editForm" ref="editForm" :model="editForm" :rules="rules" label-width="8rem">
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="路段类型:" prop="diseRoadPosiType">
|
<el-form-item label="路段类型:" prop="diseRoadPosiType">
|
||||||
@ -251,8 +251,8 @@
|
|||||||
<!-- 选择病害弹窗 -->
|
<!-- 选择病害弹窗 -->
|
||||||
<el-dialog title="选择病害" :visible.sync="diseaseVisible" width="90%" append-to-body :close-on-click-modal="false"
|
<el-dialog title="选择病害" :visible.sync="diseaseVisible" width="90%" append-to-body :close-on-click-modal="false"
|
||||||
destroy-on-close @close="diseaseCancel">
|
destroy-on-close @close="diseaseCancel">
|
||||||
<disease-dialog :checkedDiseaseList="checkedDiseaseList" :segmentList="segmentList" :tableDefect="tableDefect"
|
<disease-dialog v-if="diseaseVisible" :diseaseData="diseaseData" :checkedDiseaseList="checkedDiseaseList"
|
||||||
v-if="diseaseVisible" @cancel="diseaseCancel" @checkedList="getCheckedList" />
|
:segmentList="segmentList" :tableDefect="tableDefect" @cancel="diseaseCancel" @checkedList="getCheckedList" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -426,6 +426,8 @@ export default {
|
|||||||
|
|
||||||
// 选择病害弹窗显隐控制
|
// 选择病害弹窗显隐控制
|
||||||
diseaseVisible: false,
|
diseaseVisible: false,
|
||||||
|
// 传选择病害弹窗数据
|
||||||
|
diseaseData: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -987,6 +989,11 @@ export default {
|
|||||||
* @return {*}
|
* @return {*}
|
||||||
*/
|
*/
|
||||||
viewSelected() {
|
viewSelected() {
|
||||||
|
this.diseaseData = {
|
||||||
|
diseRoadPart: this.editForm.diseRoadPart,
|
||||||
|
diseStartStake: this.editForm.diseStartStake,
|
||||||
|
diseEndStake: this.editForm.diseEndStake,
|
||||||
|
}
|
||||||
this.diseaseVisible = true;
|
this.diseaseVisible = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1007,6 +1014,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
diseaseCancel() {
|
diseaseCancel() {
|
||||||
this.diseaseVisible = false;
|
this.diseaseVisible = false;
|
||||||
|
this.diseaseData = {}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
* @Author: SunTao 328867980@qq.com
|
* @Author: SunTao 328867980@qq.com
|
||||||
* @Date: 2024-11-20 11:58:33
|
* @Date: 2024-11-20 11:58:33
|
||||||
* @LastEditors: SunTao 328867980@qq.com
|
* @LastEditors: SunTao 328867980@qq.com
|
||||||
* @LastEditTime: 2025-03-03 13:39:18
|
* @LastEditTime: 2025-03-10 09:10:59
|
||||||
* @FilePath: \znxjxt-ui\src\views\xj\document\maintenance-notice\index.vue
|
* @FilePath: \znxjxt-ui\src\views\xj\document\maintenance-notice\index.vue
|
||||||
* @Description: 养护通知单
|
* @Description: 养护通知单
|
||||||
-->
|
-->
|
||||||
@ -107,7 +107,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{
|
<span>{{
|
||||||
scope.row.inspectDirection === "0" ? "上行" : "下行"
|
scope.row.inspectDirection === "0" ? "上行" : "下行"
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否紧急" align="center" prop="urgentFlag">
|
<el-table-column label="是否紧急" align="center" prop="urgentFlag">
|
||||||
@ -512,7 +512,7 @@ export default {
|
|||||||
handleAdd() {
|
handleAdd() {
|
||||||
getMaintenanceDetail(this.checkIds).then(({ code, data, msg }) => {
|
getMaintenanceDetail(this.checkIds).then(({ code, data, msg }) => {
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
this.dialogItemObj = data;
|
this.dialogItemObj = data ? data : {};
|
||||||
this.dialogMsg = msg;
|
this.dialogMsg = msg;
|
||||||
this.addVisible = true;
|
this.addVisible = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user