- {{item.content}}
+ {{item.content}}
@@ -126,10 +126,12 @@
{content: '修改', fnCode: 'edit', type: 'text', showName: 'policyStatus', showVal: '0', icon: 'el-icon-edit', hasPermi: 'resource:serverScriptStrat:edit'},
{content: '详情', fnCode: 'details', type: 'text', icon: 'el-icon-view', hasPermi: 'resource:serverScriptStrat:details'},
{content: '删除', fnCode: 'delete', type: 'text', showName: 'policyStatus', showVal: '0', icon: 'el-icon-delete', hasPermi: 'resource:serverScriptStrat:detele'},
+ {content: '执行结果查看', fnCode: 'resultView', type: 'text', showName: 'policyStatus', showVal: '1', icon: 'el-icon-help', hasPermi: 'resource:serverScriptStrat:resultView'},
]
}
},
open: false,
+ statusNum: null,
checkboxGroup: '',
title: '',
dialogData: {
@@ -182,6 +184,7 @@
this.checkboxGroup = '';
this.changeRowData = row;
this.clientList = [];
+ this.statusNum = null;
this.open = true;
if (num === 1) {
this.title = '不在线设备';
@@ -193,6 +196,7 @@
this.clientList = row.sucessClientIds;
if (this.clientList && this.clientList.length > 0) {
this.checkboxGroup = this.clientList[0];
+ this.statusNum = 1;
this.handleCheckedCitiesChange(this.clientList[0]);
}
} else {
@@ -201,14 +205,15 @@
this.clientList = row.failClientIds;
if (this.clientList && this.clientList.length > 0) {
this.checkboxGroup = this.clientList[0];
+ this.statusNum = 0;
this.handleCheckedCitiesChange(this.clientList[0]);
}
}
},
// 选中clientId
- handleCheckedCitiesChange(valModel) {
+ handleCheckedCitiesChange(valModel, num) {
if (valModel) {
- getScriptResultBySn({clientId: valModel, scriptId: this.changeRowData.id}).then(val => {
+ getScriptResultBySn({clientId: valModel, scriptId: this.changeRowData.id, resultFlag: this.statusNum}).then(val => {
if ( val && val.data && val.data.scriptResult && val.data.scriptResult.length > 0) {
this.dialogData['timelineList'] = {};
this.$set(this.dialogData['timelineList'], valModel, val.data.scriptResult);
@@ -245,6 +250,14 @@
}
});
break;
+ case 'resultView':
+ this.$router.push({
+ path:'/resource/serverScriptStrat/resultView',
+ query:{
+ id: rowData.id
+ }
+ });
+ break;
case 'delete':
let ids;
if (rowData && rowData.id) {