feat:添加触发人部门,添加事件删除添和关联的作业票详情

This commit is contained in:
shijing 2023-05-25 13:53:40 +08:00
parent 12f60e490b
commit 5a910c67d1
2 changed files with 33 additions and 13 deletions

View File

@ -82,6 +82,12 @@ export default {
data); data);
} }
}, },
delete:{
name: "删除",
req: async function(id){
return await http.delete(`${config.API_URL}/ecm/event/${id}/`);
}
},
cateAgg: { cateAgg: {
name: "时间分类聚合", name: "时间分类聚合",
req: async function(data){ req: async function(data){

View File

@ -60,6 +60,7 @@
stripe stripe
@resetQuery="resetQuery" @resetQuery="resetQuery"
> >
<el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column label="#" type="index" width="50"></el-table-column> <el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column label="事件种类" width="240" :show-overflow-tooltip="true"> <el-table-column label="事件种类" width="240" :show-overflow-tooltip="true">
<template #default="scope"> <template #default="scope">
@ -73,7 +74,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发生区域" prop="area_.name"></el-table-column> <el-table-column label="发生区域" prop="area_.name"></el-table-column>
<el-table-column label="事件类型" prop="obj_cate"> <el-table-column label="事件类型" prop="obj_cate" width="100">
<template #default="scope"> <template #default="scope">
{{objCateOptions[scope.row.obj_cate]}} {{objCateOptions[scope.row.obj_cate]}}
</template> </template>
@ -82,7 +83,7 @@
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.opl">{{scope.row.operation_name}}</span> <span v-if="scope.row.opl">{{scope.row.operation_name}}</span>
<span v-else-if="scope.row.employee"> <span v-else-if="scope.row.employee">
{{eTypeOptions[scope.row.employee_.type]}}-{{scope.row.employee_.name}} {{eTypeOptions[scope.row.employee_.type]}}-{{scope.row.employee_.name}}-{{ scope.row.employee_.belong_dept_name }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -96,8 +97,6 @@
label="处理人" label="处理人"
prop="handle_user_name" prop="handle_user_name"
></el-table-column> ></el-table-column>
<!-- <el-table-column label="处理时间" prop="handle_time"></el-table-column> -->
<el-table-column label="事件标记" prop="mark"> <el-table-column label="事件标记" prop="mark">
<template #default="scope"> <template #default="scope">
<el-tag v-if="scope.row.mark == 20" type="warning" effect="plain">误报</el-tag> <el-tag v-if="scope.row.mark == 20" type="warning" effect="plain">误报</el-tag>
@ -128,12 +127,11 @@
@click="table_handle(scope.row, scope.$index)" @click="table_handle(scope.row, scope.$index)"
>处理</el-button >处理</el-button
> >
<!-- <el-button text type="warning" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button> --> <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row)">
<!-- <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
<template #reference> <template #reference>
<el-button text type="danger" size="small">删除</el-button> <el-button text type="danger" size="small">删除</el-button>
</template> </template>
</el-popconfirm> --> </el-popconfirm>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
@ -142,9 +140,13 @@
v-if="dialog.handle" v-if="dialog.handle"
ref="handleDialog" ref="handleDialog"
:eventID="eventID" :eventID="eventID"
@oplDetail="oplDetail"
@success="handleSuccess" @success="handleSuccess"
@closed="dialog.handle = false" @closed="dialog.handle = false"
></detail-dialog> ></detail-dialog>
<el-drawer :size="'50%'" v-model="showLimited" title="作业许可证详情" :close-on-click-modal="false">
<sc-fire :id="oplId"></sc-fire>
</el-drawer>
</el-container> </el-container>
</template> </template>
<script> <script>
@ -160,6 +162,7 @@ export default {
data() { data() {
return { return {
dLoading: false, dLoading: false,
showLimited:false,
defaultTime: ['00:00:00', '23:59:59'], defaultTime: ['00:00:00', '23:59:59'],
timeRange: [], timeRange: [],
objCateOptions: { objCateOptions: {
@ -187,6 +190,7 @@ export default {
keyword: null, keyword: null,
}, },
eventID:'', eventID:'',
oplId:null,
}; };
}, },
created() { created() {
@ -202,6 +206,11 @@ export default {
this.$refs.handleDialog.open("edit").setData(row); this.$refs.handleDialog.open("edit").setData(row);
}); });
}, },
table_del(row){
this.$API.ecm.event.delete.req(row.id).then(res=>{
this.$refs.table.refresh();
})
},
// //
table_show(row) { table_show(row) {
this.eventID = row.id; this.eventID = row.id;
@ -223,7 +232,12 @@ export default {
handleSuccess(){ handleSuccess(){
this.$refs.table.refresh(); this.$refs.table.refresh();
}, },
oplDetail(data){
debugger;
console.log(data)
this.oplId = data;
this.showLimited = true;
},
// //
handleQuery() { handleQuery() {
if(this.timeRange){ if(this.timeRange){
@ -249,11 +263,11 @@ export default {
exportList() { exportList() {
this.dLoading = true; this.dLoading = true;
this.$API.ecm.event.export_excel this.$API.ecm.event.export_excel
.req(this.query) .req(this.query)
.then(res=>{ .then(res=>{
window.open(res.path, "_blank"); window.open(res.path, "_blank");
this.dLoading = false; this.dLoading = false;
}).catch(e=>{this.dLoading = false;}) }).catch(e=>{this.dLoading = false;})
} }
}, },
}; };