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);
|
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){
|
||||||
|
|
|
@ -294,12 +294,12 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.oplId = that.id; //许可证ID
|
that.oplId = that.id; //许可证ID
|
||||||
that.operationId = that.wfId; //zuoyeID
|
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
that.getOplData();
|
that.getOplData();
|
||||||
that.getworkerList();
|
that.getworkerList();
|
||||||
that.getgasList();
|
that.getgasList();
|
||||||
that.getOperation();
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -325,6 +325,8 @@
|
||||||
that.form = res;
|
that.form = res;
|
||||||
that.oplcateCode = res.cate_code;
|
that.oplcateCode = res.cate_code;
|
||||||
that.ticketId = res.ticket;
|
that.ticketId = res.ticket;
|
||||||
|
that.operationId = res.operation; //zuoyeID
|
||||||
|
that.getOperation();
|
||||||
res.create_imgs_.forEach(item=>{
|
res.create_imgs_.forEach(item=>{
|
||||||
console.log(item)
|
console.log(item)
|
||||||
that.create_imgs_list.push({
|
that.create_imgs_list.push({
|
||||||
|
|
|
@ -13,9 +13,10 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let permissions = tool.data.get("PERMISSIONS");
|
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);
|
if (!permissions.some((v) => v === binding.value)) el.parentNode.removeChild(el);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,9 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let permissions = tool.data.get("PERMISSIONS");
|
let permissions = tool.data.get("PERMISSIONS");
|
||||||
if (permissions.indexOf('superuser') > -1){
|
// if (permissions.indexOf('superuser') > -1){
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
let flag = false;
|
let flag = false;
|
||||||
permissions.map((val) => {
|
permissions.map((val) => {
|
||||||
binding.value.map((v) => {
|
binding.value.map((v) => {
|
||||||
|
|
|
@ -13,9 +13,9 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let permissions = tool.data.get("PERMISSIONS");
|
let permissions = tool.data.get("PERMISSIONS");
|
||||||
if (permissions.indexOf('superuser') > -1){
|
// if (permissions.indexOf('superuser') > -1){
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
const flag = judementSameArr(binding.value, permissions);
|
const flag = judementSameArr(binding.value, permissions);
|
||||||
if (!flag) el.parentNode.removeChild(el);
|
if (!flag) el.parentNode.removeChild(el);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,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 +82,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 +96,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 +126,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 +139,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 +161,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 +189,7 @@ export default {
|
||||||
keyword: null,
|
keyword: null,
|
||||||
},
|
},
|
||||||
eventID:'',
|
eventID:'',
|
||||||
|
oplId:null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -202,6 +205,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 +231,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 +262,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;})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<el-form-item v-if="form.obj_cate=='people'" label="触发人:">
|
<el-form-item v-if="form.obj_cate=='people'" label="触发人:">
|
||||||
<span v-if="form.employee_">{{ form.employee_.name }}</span>
|
<span v-if="form.employee_">{{ form.employee_.name }}</span>
|
||||||
</el-form-item>
|
</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-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>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
|
@ -271,6 +271,9 @@ export default {
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
oplClick(opl){
|
||||||
|
this.$emit("oplDetail",opl);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-drawer :size="'50%'" v-model="showLimited" class="scOplDrawer" :show-close="showClose" id="scOplDrawer">
|
<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-drawer>
|
||||||
</el-main>
|
</el-main>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -211,7 +211,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-drawer :size="'50%'" v-model="showLimited" title="作业许可证详情" :close-on-click-modal="false">
|
<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>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue