|
@@ -33,17 +33,24 @@ |
|
@@ -33,17 +33,24 @@ |
33
|
</view>
|
33
|
</view>
|
34
|
<u-line length="90%" margin="0 auto"></u-line>
|
34
|
<u-line length="90%" margin="0 auto"></u-line>
|
35
|
<view class="detail-item">
|
35
|
<view class="detail-item">
|
36
|
- <view class="detail-label">下发结果</view>
|
|
|
37
|
- <view class="detail-value">{{ commandDetail.status === 'SUCCESSFUL' ? '成功' : '失败' }}</view>
|
36
|
+ <view class="detail-label">命令状态</view>
|
|
|
37
|
+ <view class="detail-value">{{ commandDetail.statusName }}</view>
|
38
|
</view>
|
38
|
</view>
|
39
|
<u-line length="90%" margin="0 auto"></u-line>
|
39
|
<u-line length="90%" margin="0 auto"></u-line>
|
40
|
<view class="detail-item" v-if="!commandDetail.request.oneway">
|
40
|
<view class="detail-item" v-if="!commandDetail.request.oneway">
|
41
|
<view class="detail-label">响应结果</view>
|
41
|
<view class="detail-label">响应结果</view>
|
42
|
- <view class="detail-value">{{ commandDetail.response ? '成功' : '失败' }}</view>
|
42
|
+ <view class="detail-value">{{ commandDetail.response.status==='SUCCESS' ? '成功' : '失败' }}</view>
|
|
|
43
|
+ </view>
|
|
|
44
|
+ <view class="detail-item" v-if="!commandDetail.request.oneway">
|
|
|
45
|
+ <view class="detail-label">响应失败内容</view>
|
|
|
46
|
+ <view class="detail-value" style="width: 400rpx;" v-if="commandDetail.response.status!=='SUCCESS'">
|
|
|
47
|
+ <u--textarea placeholder="响应失败内容" v-model="failContent" />
|
|
|
48
|
+ </view>
|
43
|
</view>
|
49
|
</view>
|
44
|
</view>
|
50
|
</view>
|
45
|
<view class="command">命令内容</view>
|
51
|
<view class="command">命令内容</view>
|
46
|
<u-textarea :value="formatValue(commandDetail.request.body)" disabled></u-textarea>
|
52
|
<u-textarea :value="formatValue(commandDetail.request.body)" disabled></u-textarea>
|
|
|
53
|
+ <view style="height: 50rpx;"></view>
|
47
|
</view>
|
54
|
</view>
|
48
|
</template>
|
55
|
</template>
|
49
|
|
56
|
|
|
@@ -54,7 +61,8 @@ |
|
@@ -54,7 +61,8 @@ |
54
|
export default {
|
61
|
export default {
|
55
|
data() {
|
62
|
data() {
|
56
|
return {
|
63
|
return {
|
57
|
- commandDetail: {}
|
64
|
+ commandDetail: {},
|
|
|
65
|
+ failContent: ""
|
58
|
};
|
66
|
};
|
59
|
},
|
67
|
},
|
60
|
computed: {
|
68
|
computed: {
|
|
@@ -85,7 +93,6 @@ |
|
@@ -85,7 +93,6 @@ |
85
|
} catch (e) {
|
93
|
} catch (e) {
|
86
|
console.error("命令记录页面格式化无返回值", e);
|
94
|
console.error("命令记录页面格式化无返回值", e);
|
87
|
}
|
95
|
}
|
88
|
-
|
|
|
89
|
}
|
96
|
}
|
90
|
},
|
97
|
},
|
91
|
onLoad(options) {
|
98
|
onLoad(options) {
|
|
@@ -93,6 +100,8 @@ |
|
@@ -93,6 +100,8 @@ |
93
|
data
|
100
|
data
|
94
|
} = options;
|
101
|
} = options;
|
95
|
this.commandDetail = JSON.parse(data);
|
102
|
this.commandDetail = JSON.parse(data);
|
|
|
103
|
+ if (this.commandDetail.response.status === 'SUCCESS') return
|
|
|
104
|
+ this.failContent = JSON.stringify(this.commandDetail.response.error)
|
96
|
}
|
105
|
}
|
97
|
};
|
106
|
};
|
98
|
</script>
|
107
|
</script>
|