fix:修改养护通知单点击新增

This commit is contained in:
SunTao 2025-02-26 14:57:33 +08:00
parent 21f1bea009
commit ca417bd01e
4 changed files with 40 additions and 14 deletions

View File

@ -43,6 +43,15 @@ export function getMaintenanceNoticeList(params) {
}); });
} }
// 获取工单推测数据
export function getMaintenanceDetail(data) {
return request({
url: "/maintenance-notice/getInferredData",
method: "post",
data,
});
}
// 生成养护通知单 // 生成养护通知单
export function addMaintenanceNotice(data) { export function addMaintenanceNotice(data) {
return request({ return request({

View File

@ -143,7 +143,7 @@ export function getNoticeList(params) {
//获取大屏工单信息 //获取大屏工单信息
export function getWorkOrderList(params) { export function getWorkOrderList(params) {
return request({ return request({
url: "/bigscreen/v2/getMaintenanceCount", url: "/maintenance-notice/getMaintenanceCount",
method: "get", method: "get",
params, params,
}); });

View File

@ -275,6 +275,10 @@ export default {
name: "EditDialog", name: "EditDialog",
components: { FssmScroll, DiseaseDialog, FssmMap }, components: { FssmScroll, DiseaseDialog, FssmMap },
props: { props: {
dialogItemObj:{
type: Object,
default: () => {},
},
dialogItem: { dialogItem: {
type: Array, type: Array,
default: () => [], default: () => [],
@ -489,6 +493,15 @@ export default {
deep: true, deep: true,
immediate: true, immediate: true,
}, },
dialogItemObj:{
handler(val) {
this.changeDetailed(val.diseFirstType);
this.changeRampIntOrientation(val.rampInterchangeCode);
this.editForm = Object.assign(this.editForm, val);
},
deep: true,
immediate: true,
}
}, },
mounted() { mounted() {
this.handleDiseRoadPart() this.handleDiseRoadPart()

View File

@ -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-02-25 10:51:19 * @LastEditTime: 2025-02-26 14:47: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: 养护通知单
--> -->
@ -282,6 +282,7 @@
:segmentList="segmentList" :segmentList="segmentList"
:tableDefect="tableDefect" :tableDefect="tableDefect"
:dialogItem="dialogItem" :dialogItem="dialogItem"
:dialogItemObj="dialogItemObj"
@cancel="addCancel" @cancel="addCancel"
/> />
</el-dialog> </el-dialog>
@ -338,6 +339,7 @@ import {
getRoadDirectionList, getRoadDirectionList,
getStationLocation, getStationLocation,
getDiseFirstType, getDiseFirstType,
getMaintenanceDetail,
} from "@/api/xj/document"; } from "@/api/xj/document";
export default { export default {
name: "MaintenanceNotice", name: "MaintenanceNotice",
@ -426,8 +428,10 @@ export default {
// //
checkIds: [], checkIds: [],
// //
dialogItem: [], dialogItem: [],
//
dialogItemObj: {},
// //
addVisible: false, addVisible: false,
// //
@ -672,7 +676,16 @@ export default {
* @return {*} * @return {*}
*/ */
handleAdd() { handleAdd() {
this.addVisible = true; getMaintenanceDetail(this.checkIds)
.then(({ code, data, msg }) => {
if (code === 200) {
this.dialogItemObj = data;
$modal.msgWarning(msg);
}
})
.finally(() => {
this.addVisible = true;
});
}, },
/** /**
@ -731,19 +744,10 @@ export default {
addCancel() { addCancel() {
this.addVisible = false; this.addVisible = false;
this.dialogItem = []; this.dialogItem = [];
this.dialogItemObj = {};
this.getList(); this.getList();
}, },
/**
* @description: 查看弹窗关闭事件
* @param {*}
* @return {*}
*/
viewCancel() {
this.dialogItem = [];
this.viewVisible = false;
},
/** /**
* @description: 打开查看图片弹窗 * @description: 打开查看图片弹窗
* @param {*} item * @param {*} item