|
|
|
@ -56,6 +56,22 @@ |
|
|
|
|
<el-button v-if="permission.inspectionroute_delete" @click="rowDel(row)" type="text">删除</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
<el-dialog title="失效" |
|
|
|
|
append-to-body |
|
|
|
|
:visible.sync="cancelBox" |
|
|
|
|
width="555px"> |
|
|
|
|
<avue-form :option="cancelOption" v-model="cancelForm" ref="cancelForm"> |
|
|
|
|
</avue-form> |
|
|
|
|
<div class="container"> |
|
|
|
|
<span> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
size="small" |
|
|
|
|
plain |
|
|
|
|
@click="handleDetailCancel">失效 |
|
|
|
|
</el-button> |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -72,6 +88,7 @@ |
|
|
|
|
search:{}, |
|
|
|
|
query: {}, |
|
|
|
|
loading: true, |
|
|
|
|
cancelBox: false, |
|
|
|
|
page: { |
|
|
|
|
pageSize: 10, |
|
|
|
|
currentPage: 1, |
|
|
|
@ -136,6 +153,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: [] |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
@ -197,6 +233,8 @@ |
|
|
|
|
return remove(row.id); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
const cancelReason = this.findObject(this.cancelOption.column, "cancelReason"); |
|
|
|
|
cancelReason.value = ' '; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
@ -271,21 +309,25 @@ |
|
|
|
|
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.cancelBox = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
|
this.$refs.crud.toggleSelection() |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleExport() { |
|
|
|
@ -350,4 +392,8 @@ |
|
|
|
|
background-color: #3366cc !important; |
|
|
|
|
color: #FFFFFF !important; |
|
|
|
|
} |
|
|
|
|
.container { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: flex-end; /* 将子元素推到容器的末端 */ |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|