fix:修改养护通知单数据

This commit is contained in:
SunTao 2025-02-27 15:16:07 +08:00
parent aaac983ecf
commit 53255bfc53
6 changed files with 46 additions and 12 deletions

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-11-27 10:58:33 * @Date: 2024-11-27 10:58:33
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2025-02-27 11:51:25 * @LastEditTime: 2025-02-27 14:40:14
* @FilePath: \znxjxt-ui\src\api\xj\document.js * @FilePath: \znxjxt-ui\src\api\xj\document.js
* @Description: 查看养护通知单相关接口 * @Description: 查看养护通知单相关接口
*/ */
@ -222,3 +222,11 @@ export function deleteNoticeDefect(params) {
params, params,
}); });
} }
// 删除已退回工单
export function deleteNotice(id) {
return request({
url: `/maintenance-notice/${id}`,
method: "delete",
});
}

View File

@ -326,6 +326,7 @@ export default {
this.$refs.diseaseTable.toggleRowSelection(item, true); this.$refs.diseaseTable.toggleRowSelection(item, true);
} }
}); });
this.checkList = JSON.parse(JSON.stringify(this.checkedDiseaseList))
}); });
this.loading = false; this.loading = false;
@ -352,6 +353,8 @@ export default {
*/ */
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.checkList = selection; this.checkList = selection;
console.log(this.checkList, 'sdsds');
}, },
/** /**

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-27 13:33:13 * @LastEditTime: 2025-02-27 15:02:06
* @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: 养护通知单编辑弹窗
--> -->
@ -211,7 +211,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" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">

View File

@ -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:27:02 * @LastEditTime: 2025-02-27 15:02:24
* @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: 生成通知单-新增弹窗-选择病害
--> -->
@ -108,7 +108,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>
@ -325,6 +325,7 @@ export default {
this.$refs.diseaseTable.toggleRowSelection(item, true); this.$refs.diseaseTable.toggleRowSelection(item, true);
} }
}); });
this.checkList = JSON.parse(JSON.stringify(this.checkedDiseaseList))
}); });
this.loading = false; this.loading = false;
} }

View File

@ -228,7 +228,8 @@
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width"
v-if="dialogItem.title === 'edit'">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row, scope.$index)">删除 <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row, scope.$index)">删除
</el-button> </el-button>

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2025-02-10 11:02:50 * @Date: 2025-02-10 11:02:50
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2025-02-27 09:44:59 * @LastEditTime: 2025-02-27 15:07:15
* @FilePath: \znxjxt-ui\src\views\xj\document\view-notification\index.vue * @FilePath: \znxjxt-ui\src\views\xj\document\view-notification\index.vue
* @Description: 单据-查看通知单页面 * @Description: 单据-查看通知单页面
--> -->
@ -154,7 +154,7 @@
<el-button v-if="scope.row.urgentFlag === 2" type="warning" plain disabled>不紧急</el-button> <el-button v-if="scope.row.urgentFlag === 2" type="warning" plain disabled>不紧急</el-button>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column fixed="right" label="操作" width="150" align="center" class-name="small-padding fixed-width"> <el-table-column fixed="right" label="操作" width="200" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)">查看 <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)">查看
</el-button> </el-button>
@ -168,8 +168,9 @@
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>生成通知单 >生成通知单
</el-button> --> </el-button> -->
<!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除 <el-button v-if="activeName === '已退回'" size="mini" type="text" icon="el-icon-delete"
</el-button> --> @click="handleDelete(scope.row)">删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -185,7 +186,7 @@
<!-- 编辑/详情弹窗 --> <!-- 编辑/详情弹窗 -->
<el-dialog title="生成表单" :visible.sync="dialogVisible" width="90%" append-to-body :close-on-click-modal="false" <el-dialog title="生成表单" :visible.sync="dialogVisible" width="90%" append-to-body :close-on-click-modal="false"
destroy-on-close @close="viewCancel"> destroy-on-close>
<view-dialog v-if="dialogVisible" :segmentList="segmentList" :tableDefect="tableDefect" :causesList="causesList" <view-dialog v-if="dialogVisible" :segmentList="segmentList" :tableDefect="tableDefect" :causesList="causesList"
:rampTypeList="rampTypeList" :diseFirstType="diseFirstType" :stationLocationList="stationLocationList" :rampTypeList="rampTypeList" :diseFirstType="diseFirstType" :stationLocationList="stationLocationList"
:roadDirectionList="roadDirectionList" :segmentTypeList="segmentTypeList" :dialogItem="dialogItem" :roadDirectionList="roadDirectionList" :segmentTypeList="segmentTypeList" :dialogItem="dialogItem"
@ -214,7 +215,7 @@ import {
getCrossDropDown, getCrossDropDown,
getRampDropDown, getRampDropDown,
} from "@/api/xj/document"; } from "@/api/xj/document";
import { getNoticeList } from "@/api/xj/document-view" import { getNoticeList, deleteNotice } from "@/api/xj/document-view"
import ViewDialog from "./components/view-dialog.vue"; import ViewDialog from "./components/view-dialog.vue";
export default { export default {
name: "MaintenanceNotice", name: "MaintenanceNotice",
@ -696,6 +697,25 @@ export default {
this.dialogVisible = true this.dialogVisible = true
}, },
/**
* @description: 点击列表删除事件
* @param {*}
* @return {*}
*/
handleDelete(row) {
this.$modal
.confirm(`是否确认删除选中的1条记录`)
.then(() => {
return deleteNotice(row.id);
})
.then(() => {
this.getList();
// this.$refs.defectTable.clearSelection();
this.$modal.msgSuccess("删除成功");
})
.catch(() => { });
},
/** /**
* @description: 列表选择改变事件 * @description: 列表选择改变事件
* @param {*} selection * @param {*} selection
@ -733,6 +753,7 @@ export default {
viewCancel() { viewCancel() {
this.dialogVisible = false; this.dialogVisible = false;
this.dialogItem = { title: "" } this.dialogItem = { title: "" }
this.getList();
} }
}, },