Commit 406ed4f6c68a04c1e80dad5bcb1be18f9ac0cb4b

Authored by xp.Huang
2 parents 731d64d5 99107a8c

Merge branch 'local_dev_ft' into 'main'

pref:优化设备列表命令记录命令类型判断

See merge request yunteng/thingskit-app!101
... ... @@ -24,7 +24,7 @@
24 24 <u-line length="90%" margin="0 auto"></u-line>
25 25 <view class="detail-item">
26 26 <view class="detail-label">命令类型</view>
27   - <view class="detail-value">{{ commandDetail.additionalInfo.cmdType===0?'自定义':'服务' }}</view>
  27 + <view class="detail-value">{{ commandDetail.additionalInfo.cmdType===1?'服务':'自定义' }}</view>
28 28 </view>
29 29 <u-line length="90%" margin="0 auto" v-if="commandDetail.additionalInfo.cmdType"></u-line>
30 30 <view class="detail-item">
... ... @@ -39,14 +39,14 @@
39 39 <u-line length="90%" margin="0 auto"></u-line>
40 40 <view class="detail-item" v-if="!commandDetail.request.oneway">
41 41 <view class="detail-label">响应结果</view>
42   - <view class="detail-value">{{ commandDetail.response.status==='SUCCESS' ? '成功' : '失败' }}</view>
  42 + <view class="detail-value">{{ commandDetail.response?JSON.stringify(commandDetail.response):'无' }}</view>
43 43 </view>
44   - <view class="detail-item" v-if="!commandDetail.request.oneway">
  44 + <!-- <view class="detail-item" v-if="!commandDetail.request.oneway">
45 45 <view class="detail-label">响应失败内容</view>
46 46 <view class="detail-value" style="width: 400rpx;" v-if="commandDetail.response.status!=='SUCCESS'">
47 47 <u--textarea placeholder="响应失败内容" v-model="failContent" />
48 48 </view>
49   - </view>
  49 + </view> -->
50 50 </view>
51 51 <view class="command">命令内容</view>
52 52 <u-textarea :value="formatValue(commandDetail.request.body)" disabled></u-textarea>
... ...
... ... @@ -14,13 +14,13 @@
14 14 <view class="item-first">
15 15 <text>{{ item.deviceName }}</text>
16 16 <view v-if="!item.request.oneway">
17   - <view class="item-right item-success" v-if="item.response.status==='SUCCESS'">响应成功</view>
  17 + <view class="item-right item-success" v-if="item.response">响应成功</view>
18 18 <view class="item-right item-fail" v-else>响应失败</view>
19 19 </view>
20 20 </view>
21 21 <view>
22 22 命令类型:
23   - <text style="margin-left: 16rpx;">{{ item.additionalInfo.cmdType===0?'自定义':'服务' }}</text>
  23 + <text style="margin-left: 16rpx;">{{ item.additionalInfo.cmdType===1?'服务':'自定义' }}</text>
24 24 </view>
25 25 <view v-if="item.statusName">
26 26 命令状态:
... ... @@ -42,7 +42,7 @@
42 42 </text>
43 43 </view>
44 44 <view class="item-first">
45   - <view v-if="item.additionalInfo.cmdType">
  45 + <view>
46 46 响应类型:
47 47 <text style="margin-left: 16rpx;">{{ !item.request.oneway?'双向':'单向' }}</text>
48 48 </view>
... ...