From 572d7f03efbb9514848f80aa2da53687f8f32a9c Mon Sep 17 00:00:00 2001
From: weitingdong <2480899115@qq.com>
Date: Fri, 12 Jul 2024 14:04:41 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E5=AF=B9=E8=B1=A1=20?=
=?UTF-8?q?=E8=AF=A6=E7=BB=86=E8=BF=BD=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/inspection/inspectionobject.js | 10 +-
src/views/inspection/inspectionobject.vue | 57 ++-
.../inspection/inspectionobjectDetail.vue | 373 ++++++++++--------
3 files changed, 275 insertions(+), 165 deletions(-)
diff --git a/src/api/inspection/inspectionobject.js b/src/api/inspection/inspectionobject.js
index 1b3c27e..01499fd 100644
--- a/src/api/inspection/inspectionobject.js
+++ b/src/api/inspection/inspectionobject.js
@@ -42,7 +42,7 @@ export const add = (row) => {
export const update = (row) => {
return request({
- url: '/api/inspection/inspectionobject/submit',
+ url: '/api/inspection/inspectionobject/update',
method: 'post',
data: row
})
@@ -50,20 +50,20 @@ export const update = (row) => {
export const takeEffect = (ids) => {
return request({
- url: '/api/inspection/inspectionRoute/takeEffect',
+ url: '/api/inspection/inspectionobject/takeEffect',
method: 'post',
params: {
ids,
}
})
}
-export const lapse = (ids) => {
+export const lapse = (ids, reason) => {
return request({
- url: '/api/inspection/inspectionRoute/lapse',
+ url: '/api/inspection/inspectionobject/lapse',
method: 'post',
params: {
ids,
+ reason,
}
})
}
-
diff --git a/src/views/inspection/inspectionobject.vue b/src/views/inspection/inspectionobject.vue
index 0c07501..768af95 100644
--- a/src/views/inspection/inspectionobject.vue
+++ b/src/views/inspection/inspectionobject.vue
@@ -56,6 +56,22 @@
删除
+
+
+
+
+
+ 失效
+
+
+
+
@@ -72,6 +88,7 @@
search:{},
query: {},
loading: true,
+ cancelBox: false,
page: {
pageSize: 10,
currentPage: 1,
@@ -157,12 +174,18 @@
label: "对象状态",
prop: "istatus",
search:true,
+ type: "select",
span:4.5,
rules: [{
required: true,
message: "请输入对象状态",
trigger: "blur"
- }]
+ }],
+ dicUrl: "/api/daf-system/dict/dictionary?code=istatus",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ }
},
{
label: "KKS编号",
@@ -185,6 +208,25 @@
},
]
},
+ cancelForm: {},
+ cancelOption: {
+ height: 'auto',
+ calcHeight: 210,
+ emptyBtn:false,
+ submitBtn:false,
+ tip: false,
+ border: true,
+ index: false,
+ selection: true,
+ column: [
+ {
+ label: "取消原因",
+ type: "textarea",
+ prop: "cancelReason",
+ span: 24
+ },
+ ]
+ },
data: []
};
},
@@ -246,6 +288,8 @@
return remove(row.id);
})
.then(() => {
+ const cancelReason = this.findObject(this.cancelOption.column, "cancelReason");
+ cancelReason.value = ' ';
this.onLoad(this.page);
this.$message({
type: "success",
@@ -342,21 +386,26 @@
this.$message.warning("请选择至少一条数据");
return;
}
+ this.cancelBox = true;
+ },
+ handleDetailCancel() {
this.$confirm("是否将选择数据改为失效状态?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
- return lapse(this.ids);
+ return lapse(this.ids, this.cancelForm.cancelReason);
})
.then(() => {
+ this.cancelForm.cancelReason = '';
+ this.cancelBox = false;
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
- this.$refs.crud.toggleSelection();
+ this.$refs.crud.toggleSelection()
});
},
handleExport() {
@@ -365,7 +414,7 @@
cancelButtonText: "取消",
type: "warning"
}).then(() => {
- expUtil.excelExport(`/api/inspection/inspectionRoute/export?daf-auth=${getToken()}`, this.search, ['stations', "istatus"]);
+ expUtil.excelExport(`/api/inspection/inspectionobject/export?daf-auth=${getToken()}`, this.search, ['stations', "istatus", "objectName"]);
});
},
beforeOpen(done, type) {
diff --git a/src/views/inspection/inspectionobjectDetail.vue b/src/views/inspection/inspectionobjectDetail.vue
index a9fcdb4..07f111f 100644
--- a/src/views/inspection/inspectionobjectDetail.vue
+++ b/src/views/inspection/inspectionobjectDetail.vue
@@ -11,171 +11,198 @@
+ v-if="addUpdateShowButton">
确定
+
+ 修改