|
@@ -3,7 +3,7 @@
|
|
<div class="tabBody">
|
|
<div class="tabBody">
|
|
<a-tabs v-model="tabKey" @change="tabChange">
|
|
<a-tabs v-model="tabKey" @change="tabChange">
|
|
<a-tab-pane key="1" tab="规则管理"></a-tab-pane>
|
|
<a-tab-pane key="1" tab="规则管理"></a-tab-pane>
|
|
- <!-- <a-tab-pane key="2" tab="运行记录" ></a-tab-pane> -->
|
|
|
|
|
|
+ <a-tab-pane key="2" tab="运行记录" ></a-tab-pane>
|
|
</a-tabs>
|
|
</a-tabs>
|
|
</div>
|
|
</div>
|
|
<div class="tableBody">
|
|
<div class="tableBody">
|
|
@@ -92,11 +92,10 @@ let existColumns=[
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '创建者',
|
|
title: '创建者',
|
|
- dataIndex: 'userName',
|
|
|
|
- align: 'center',
|
|
|
|
-
|
|
|
|
- key: 'userName',
|
|
|
|
- scopedSlots: { customRender: 'userName' }
|
|
|
|
|
|
+ dataIndex: 'createrName',
|
|
|
|
+ align: 'center',
|
|
|
|
+ key: 'createrName',
|
|
|
|
+ scopedSlots: { customRender: 'createrName' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '操作',
|
|
title: '操作',
|
|
@@ -113,39 +112,39 @@ let recordsColumns=[
|
|
|
|
|
|
{
|
|
{
|
|
title: '规则名称',
|
|
title: '规则名称',
|
|
- dataIndex: 'name',
|
|
|
|
|
|
+ dataIndex: 'eventRuleName',
|
|
align: 'center',
|
|
align: 'center',
|
|
|
|
|
|
- key: 'name',
|
|
|
|
- scopedSlots: { customRender: 'name' }
|
|
|
|
|
|
+ key: 'eventRuleName',
|
|
|
|
+ scopedSlots: { customRender: 'eventRuleName' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '运行时间',
|
|
title: '运行时间',
|
|
- dataIndex: 'time',
|
|
|
|
|
|
+ dataIndex: 'runningTime',
|
|
align: 'center',
|
|
align: 'center',
|
|
- key: 'time',
|
|
|
|
- scopedSlots: { customRender: 'time' }
|
|
|
|
|
|
+ key: 'runningTime',
|
|
|
|
+ scopedSlots: { customRender: 'runningTime' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '运行对象',
|
|
title: '运行对象',
|
|
- dataIndex: 'runObject',
|
|
|
|
|
|
+ dataIndex: 'accountName',
|
|
align: 'center',
|
|
align: 'center',
|
|
- key: 'runObject',
|
|
|
|
- scopedSlots: { customRender: 'runObject' }
|
|
|
|
|
|
+ key: 'accountName',
|
|
|
|
+ scopedSlots: { customRender: 'accountName' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '满足条件',
|
|
title: '满足条件',
|
|
- dataIndex: 'meetCondition',
|
|
|
|
|
|
+ dataIndex: 'alarmCondition',
|
|
align: 'center',
|
|
align: 'center',
|
|
- key: 'meetCondition',
|
|
|
|
- scopedSlots: { customRender: 'meetCondition' }
|
|
|
|
|
|
+ key: 'alarmCondition',
|
|
|
|
+ scopedSlots: { customRender: 'alarmCondition' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '运行结果',
|
|
title: '运行结果',
|
|
- dataIndex: 'result',
|
|
|
|
|
|
+ dataIndex: 'processMethod',
|
|
align: 'center',
|
|
align: 'center',
|
|
- key: 'result',
|
|
|
|
- scopedSlots: { customRender: 'result' }
|
|
|
|
|
|
+ key: 'processMethod',
|
|
|
|
+ scopedSlots: { customRender: 'processMethod' }
|
|
},
|
|
},
|
|
]
|
|
]
|
|
|
|
|
|
@@ -179,9 +178,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
url:{
|
|
url:{
|
|
- OverTime:'/oa/wechatNoList/selectOverTimePage',
|
|
|
|
- abnormal:'/oa/wechatNoList/selectNoListPage',
|
|
|
|
- allData:'/oa/wechatCheckinData/queryPageList'
|
|
|
|
|
|
+
|
|
|
|
+ existUrl:'/alarm/alarmEventRule/list',
|
|
|
|
+ resultRecordUrl:'/alarm/alarmEventRule/getRunningRecords'
|
|
},
|
|
},
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -192,11 +191,15 @@ export default {
|
|
},
|
|
},
|
|
tabChange(key){
|
|
tabChange(key){
|
|
console.log(key);
|
|
console.log(key);
|
|
|
|
+ let url=''
|
|
if(key=='1'){
|
|
if(key=='1'){
|
|
this.columns=[...existColumns]
|
|
this.columns=[...existColumns]
|
|
|
|
+ url=this.url.existUrl
|
|
}else{
|
|
}else{
|
|
this.columns=[...recordsColumns]
|
|
this.columns=[...recordsColumns]
|
|
|
|
+ url=this.url.resultRecordUrl
|
|
}
|
|
}
|
|
|
|
+ this.getTableListHttp(url)
|
|
},
|
|
},
|
|
createNewRule(){
|
|
createNewRule(){
|
|
this.$router.push('/newBlankRule')
|
|
this.$router.push('/newBlankRule')
|
|
@@ -206,7 +209,9 @@ export default {
|
|
this.ipagination.current=pagination.current;
|
|
this.ipagination.current=pagination.current;
|
|
|
|
|
|
this.ipagination.pageSize=pagination.pageSize;
|
|
this.ipagination.pageSize=pagination.pageSize;
|
|
- this.search()
|
|
|
|
|
|
+ let url=this.tabKey=='1'?this.url.existUrl:this.url.resultRecordUrl
|
|
|
|
+
|
|
|
|
+ this.getTableListHttp(url)
|
|
},
|
|
},
|
|
editRule(record){
|
|
editRule(record){
|
|
console.log(record);
|
|
console.log(record);
|
|
@@ -223,7 +228,7 @@ export default {
|
|
}).then(res=>{
|
|
}).then(res=>{
|
|
console.log(res);
|
|
console.log(res);
|
|
if(res.success){
|
|
if(res.success){
|
|
- this.getTableListHttp()
|
|
|
|
|
|
+ this.getTableListHttp(this.url.existUrl)
|
|
}else{
|
|
}else{
|
|
this.$message.error('删除失败')
|
|
this.$message.error('删除失败')
|
|
}
|
|
}
|
|
@@ -262,10 +267,10 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
- getTableListHttp(){
|
|
|
|
|
|
+ getTableListHttp(url){
|
|
this.data=[];
|
|
this.data=[];
|
|
this.loading=true;
|
|
this.loading=true;
|
|
- let url='/alarm/alarmEventRule/list'
|
|
|
|
|
|
+ // let url='/alarm/alarmEventRule/list'
|
|
getAction(url,{
|
|
getAction(url,{
|
|
pageNo:this.ipagination.current,
|
|
pageNo:this.ipagination.current,
|
|
pageSize:this.ipagination.pageSize
|
|
pageSize:this.ipagination.pageSize
|
|
@@ -287,10 +292,10 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
mounted(){
|
|
mounted(){
|
|
- this.getTableListHttp()
|
|
|
|
|
|
+ this.getTableListHttp(this.url.existUrl)
|
|
},
|
|
},
|
|
activated(){
|
|
activated(){
|
|
- this.getTableListHttp()
|
|
|
|
|
|
+ this.getTableListHttp(this.url.existUrl)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|