Merge branch 'v2' of https://e.coding.net/ctcdevteam/ehs/ehs_web into v2
This commit is contained in:
commit
6b6d5b1266
|
@ -82,6 +82,12 @@ export default {
|
|||
data);
|
||||
}
|
||||
},
|
||||
delete:{
|
||||
name: "删除",
|
||||
req: async function(id){
|
||||
return await http.delete(`${config.API_URL}/ecm/event/${id}/`);
|
||||
}
|
||||
},
|
||||
cateAgg: {
|
||||
name: "时间分类聚合",
|
||||
req: async function(data){
|
||||
|
|
|
@ -294,12 +294,12 @@
|
|||
mounted() {
|
||||
let that = this;
|
||||
that.oplId = that.id; //许可证ID
|
||||
that.operationId = that.wfId; //zuoyeID
|
||||
|
||||
this.$nextTick(()=>{
|
||||
that.getOplData();
|
||||
that.getworkerList();
|
||||
that.getgasList();
|
||||
that.getOperation();
|
||||
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
@ -325,6 +325,8 @@
|
|||
that.form = res;
|
||||
that.oplcateCode = res.cate_code;
|
||||
that.ticketId = res.ticket;
|
||||
that.operationId = res.operation; //zuoyeID
|
||||
that.getOperation();
|
||||
res.create_imgs_.forEach(item=>{
|
||||
console.log(item)
|
||||
that.create_imgs_list.push({
|
||||
|
|
|
@ -13,9 +13,10 @@ export default {
|
|||
return
|
||||
}
|
||||
let permissions = tool.data.get("PERMISSIONS");
|
||||
if (permissions.indexOf('superuser') > -1){
|
||||
return
|
||||
}
|
||||
|
||||
// if (permissions.indexOf('superuser') > -1){
|
||||
// return
|
||||
// }
|
||||
if (!permissions.some((v) => v === binding.value)) el.parentNode.removeChild(el);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,9 +13,9 @@ export default {
|
|||
return
|
||||
}
|
||||
let permissions = tool.data.get("PERMISSIONS");
|
||||
if (permissions.indexOf('superuser') > -1){
|
||||
return
|
||||
}
|
||||
// if (permissions.indexOf('superuser') > -1){
|
||||
// return
|
||||
// }
|
||||
let flag = false;
|
||||
permissions.map((val) => {
|
||||
binding.value.map((v) => {
|
||||
|
|
|
@ -13,9 +13,9 @@ export default {
|
|||
return
|
||||
}
|
||||
let permissions = tool.data.get("PERMISSIONS");
|
||||
if (permissions.indexOf('superuser') > -1){
|
||||
return
|
||||
}
|
||||
// if (permissions.indexOf('superuser') > -1){
|
||||
// return
|
||||
// }
|
||||
const flag = judementSameArr(binding.value, permissions);
|
||||
if (!flag) el.parentNode.removeChild(el);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
</template>
|
||||
</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">
|
||||
{{objCateOptions[scope.row.obj_cate]}}
|
||||
</template>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="scope.row.opl">{{scope.row.operation_name}}</span>
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -96,8 +96,6 @@
|
|||
label="处理人"
|
||||
prop="handle_user_name"
|
||||
></el-table-column>
|
||||
|
||||
<!-- <el-table-column label="处理时间" prop="handle_time"></el-table-column> -->
|
||||
<el-table-column label="事件标记" prop="mark">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.mark == 20" type="warning" effect="plain">误报</el-tag>
|
||||
|
@ -128,12 +126,11 @@
|
|||
@click="table_handle(scope.row, scope.$index)"
|
||||
>处理</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, scope.$index)">
|
||||
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row)">
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm> -->
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
@ -142,9 +139,13 @@
|
|||
v-if="dialog.handle"
|
||||
ref="handleDialog"
|
||||
:eventID="eventID"
|
||||
@oplDetail="oplDetail"
|
||||
@success="handleSuccess"
|
||||
@closed="dialog.handle = false"
|
||||
></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>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -160,6 +161,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
dLoading: false,
|
||||
showLimited:false,
|
||||
defaultTime: ['00:00:00', '23:59:59'],
|
||||
timeRange: [],
|
||||
objCateOptions: {
|
||||
|
@ -187,6 +189,7 @@ export default {
|
|||
keyword: null,
|
||||
},
|
||||
eventID:'',
|
||||
oplId:null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
@ -202,6 +205,11 @@ export default {
|
|||
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) {
|
||||
this.eventID = row.id;
|
||||
|
@ -223,7 +231,12 @@ export default {
|
|||
handleSuccess(){
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
|
||||
oplDetail(data){
|
||||
debugger;
|
||||
console.log(data)
|
||||
this.oplId = data;
|
||||
this.showLimited = true;
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {
|
||||
if(this.timeRange){
|
||||
|
@ -249,11 +262,11 @@ export default {
|
|||
exportList() {
|
||||
this.dLoading = true;
|
||||
this.$API.ecm.event.export_excel
|
||||
.req(this.query)
|
||||
.then(res=>{
|
||||
window.open(res.path, "_blank");
|
||||
this.dLoading = false;
|
||||
}).catch(e=>{this.dLoading = false;})
|
||||
.req(this.query)
|
||||
.then(res=>{
|
||||
window.open(res.path, "_blank");
|
||||
this.dLoading = false;
|
||||
}).catch(e=>{this.dLoading = false;})
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<el-form-item v-if="form.obj_cate=='people'" label="触发人:">
|
||||
<span v-if="form.employee_">{{ form.employee_.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.obj_cate=='opl'" label="触发作业:"><span>{{ form.operation_name }}</span></el-form-item>
|
||||
<el-form-item v-if="form.obj_cate=='opl'" label="触发作业:"><span @click="oplClick(form.opl)">{{ form.operation_name }}</span></el-form-item>
|
||||
<el-form-item v-if="form.obj_cate=='area'" label="触发区域:"><span v-if="form.area_">{{ form.area_.name }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
|
@ -271,6 +271,9 @@ export default {
|
|||
return res;
|
||||
});
|
||||
},
|
||||
oplClick(opl){
|
||||
this.$emit("oplDetail",opl);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
</scTable>
|
||||
</el-card>
|
||||
<el-drawer :size="'50%'" v-model="showLimited" class="scOplDrawer" :show-close="showClose" id="scOplDrawer">
|
||||
<sc-fire :id="oplId" :wfId="operationId"></sc-fire>
|
||||
<sc-fire :id="oplId"></sc-fire>
|
||||
</el-drawer>
|
||||
</el-main>
|
||||
</template>
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
<el-drawer :size="'50%'" v-model="showLimited" title="作业许可证详情" :close-on-click-modal="false">
|
||||
<sc-fire :id="projectId" :wfId="operationId"></sc-fire>
|
||||
<sc-fire :id="projectId"></sc-fire>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
|
|
Loading…
Reference in New Issue