penInfo.wxml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <!--pages/penInfo/penInfo.wxml-->
  2. <view class="penInfo">
  3. <view class="title">
  4. 笔参数
  5. </view>
  6. <scroll-view class="penInfoScroll" scroll-y="{{true}}">
  7. <van-cell-group custom-class="mb20">
  8. <van-cell title="笔名" value="{{penName}}" bindtap="showSheet" data-changeIndex="0" is-link></van-cell>
  9. <van-cell title="蓝牙地址" value="{{macAddress}}"></van-cell>
  10. <van-cell title="蓝牙固件版本" value="{{blueToothVersion}}"></van-cell>
  11. <van-cell title="MCU固件版本" value="{{mcuVersion}}"></van-cell>
  12. </van-cell-group>
  13. <van-cell-group custom-class="mb20">
  14. <van-cell title="客户ID" value="{{customerId}}"></van-cell>
  15. <van-cell title="OID" value="{{penType}}-{{penOid}}"></van-cell>
  16. <van-cell title="剩余电量" value="{{penPower}}"></van-cell>
  17. <van-cell title="已用内存" value="{{penMemory}}%"></van-cell>
  18. <van-cell title="RTC时间" is-link value="{{date+' '+time}}" data-changeindex="1" bindtap="showSheet"></van-cell>
  19. </van-cell-group>
  20. <van-cell-group custom-class="mb20">
  21. <van-cell title="蜂鸣器">
  22. <van-switch active-color="#EC6938" data-swicthIndex="0" checked="{{penBeep}}" bind:change="switchButton" loading="{{switchLoadingIndex===0}}" inactive-color="#B4C1D3" size="20px" slot="right-icon">
  23. </van-switch>
  24. </van-cell>
  25. <van-cell title="笔尖压力唤醒">
  26. <van-switch active-color="#EC6938" checked="{{penClickMode}}" bind:change="switchButton" data-swicthIndex="1" inactive-color="#B4C1D3" size="20px" slot='right-icon'>
  27. </van-switch>
  28. </van-cell>
  29. <van-cell title="呼吸灯">
  30. <van-switch active-color="#EC6938" data-swicthIndex="2" inactive-color="#B4C1D3" size="20px" slot='right-icon'>
  31. </van-switch>
  32. </van-cell>
  33. <van-cell title="自动关机时间" is-link value="{{penAutoOff}}" bindtap="showSheet" data-changeIndex="3">
  34. </van-cell>
  35. <van-cell title="无效码上报数量" is-link bindtap="showSheet" data-changeIndex="4" value="{{invalidCodeNum===0?'关':invalidCodeNum}}"></van-cell>
  36. <van-cell title="主动触发蜂鸣器" is-link bindtap="showSheet" data-changeIndex="5"></van-cell>
  37. </van-cell-group>
  38. <van-cell-group custom-class="mb20">
  39. <van-cell title="灵敏度" is-link value="{{penSensor}}" bindtap="showSheet" data-changeIndex="2"></van-cell>
  40. <van-cell title="压力值范围" value="{{penPresure}}"></van-cell>
  41. <!-- <van-cell title="点读码值" value="{{oidValue}}"
  42. label="SA-SB-SC-SD-index" center
  43. ></van-cell> -->
  44. </van-cell-group>
  45. <van-cell-group class="mb20">
  46. <van-cell title="保存日志">
  47. <van-switch active-color="#EC6938" bind:change="switchButton" checked="{{saveLog}}" data-swicthIndex="3" inactive-color="#B4C1D3" size="20px" slot="right-icon">
  48. </van-switch>
  49. </van-cell>
  50. <van-cell title="笔锋绘制">
  51. <van-switch active-color="#EC6938" bind:change="switchButton" checked="{{strokeOn}}" data-swicthIndex="4" inactive-color="#B4C1D3" size="20px" slot="right-icon">
  52. </van-switch>
  53. </van-cell>
  54. <van-cell title="过滤算法">
  55. <van-switch active-color="#EC6938" data-swicthIndex="5" inactive-color="#B4C1D3" size="20px" slot="right-icon">
  56. </van-switch>
  57. </van-cell>
  58. </van-cell-group>
  59. </scroll-view>
  60. <van-dialog id='van-dialog'></van-dialog>
  61. <van-action-sheet show="{{ showSheet }}">
  62. <!-- 修改笔名 -->
  63. <view class="changePenName" wx:if="{{sheetIndex===0}}">
  64. <view class="penNameTitle">设置笔名</view>
  65. <view class="inputArea">
  66. <input type="text" class="penNameInput" placeholder="请输入笔名" value="{{penName}}" bindinput="inputPenName" bindfocus="savePenName" />
  67. </view>
  68. <view class="buttons">
  69. <van-button custom-class="w50 leftButton" bind:click="cancleShowSheet">取消</van-button>
  70. <van-button custom-class="w50 rightButton" form-type="submit" bind:click="submitSheet">确认</van-button>
  71. </view>
  72. </view>
  73. <!-- 修改时间 -->
  74. <view class="changeTime" wx:if="{{sheetIndex===1}}">
  75. <view class="setDateTime">
  76. <view class="timeTitle">设置笔RTC时间</view>
  77. <picker mode="date" value="{{date}}" start="2010-01-01" end="2100-09-01" bindchange="changeDate">
  78. <van-cell title="日期" is-link value="{{date}}" bindtap="showDatePicker"></van-cell>
  79. </picker>
  80. <picker mode="time" value="{{time}}" start="00:00" end="23:59" bindchange="changeTime">
  81. <van-cell title="时间" is-link value="{{time}}" bindtap="showTimePicker"></van-cell>
  82. </picker>
  83. <view class="buttons" style="border:none">
  84. <van-button custom-class="w50 leftButton" bind:click="timeCancel">取消</van-button>
  85. <van-button custom-class="w50 rightButton" form-type="submit" bind:click="submitSheet">确认</van-button>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- 修改灵敏度 -->
  90. <view class="penSensor" wx:if="{{sheetIndex===2}}">
  91. <view class="sensorTitle">
  92. <text>设置灵敏度</text>
  93. <view bindtap="sensorCancle">取消</view>
  94. </view>
  95. <view class="secondTitle">(最灵敏)</view>
  96. <view class="sensorChosen">
  97. <view wx:for="{{[0,1,2,3,4]}}" data-clickindex="{{item}}" bindtap="chosenSensor" class="{{item===penSensor?'sensorClick':'sensorItem'}}" wx:key="index">
  98. {{item}}
  99. </view>
  100. </view>
  101. <view class="sensorButton" bindtap="submitSheet">确定</view>
  102. </view>
  103. <!-- 修改自动关机时间 -->
  104. <view class="changeAutoOff" wx:if="{{sheetIndex===3}}">
  105. <view class="autoTitle">设置笔的自动关机时间</view>
  106. <view class="autoSecondTitle">时长为操作自动关机</view>
  107. <view class="autoInput">
  108. <input type="text" class="penNameInput" placeholder="请输入自动关机时间" value="{{penAutoOff}}" bindinput="inputAutoOff" />
  109. <text>min</text>
  110. </view>
  111. <view class="buttons">
  112. <van-button custom-class="w50 leftButton" bind:click="autoOffCancel">取消</van-button>
  113. <van-button custom-class="w50 rightButton" form-type="submit" bind:click="submitSheet">确认</van-button>
  114. </view>
  115. </view>
  116. <view class="changeAutoOff" wx:if="{{sheetIndex===4}}">
  117. <view class="autoTitle">设置笔的错误码上传个数</view>
  118. <view class="autoSecondTitle">数字为间隔多少发送,0为关闭</view>
  119. <view class="autoInput">
  120. <input class="penNameInput" type="number" placeholder="请输入错误码个数" value="{{invalidCodeNum}}" bindinput="inputInvalidCode" />
  121. </view>
  122. <view class="buttons">
  123. <van-button custom-class="w50 leftButton" bind:click="invalidCodeCancel">取消</van-button>
  124. <van-button custom-class="w50 rightButton" form-type="submit" bind:click="submitSheet">确认</van-button>
  125. </view>
  126. </view>
  127. <view class="changeAutoOff" wx:if="{{sheetIndex===5}}">
  128. <view class="autoTitle">主动触发笔的蜂鸣器</view>
  129. <view class="autoSecondTitle">次数为大于1的数,间隔为大于500的数</view>
  130. <view class="mainBox">
  131. <view class="inputArea">
  132. <text>次数:</text>
  133. <input type="number" value="{{beepTime}}" bindinput="inputBeepTime" />
  134. </view>
  135. <view class="inputArea">
  136. <text>间隔:</text>
  137. <input type="number" value="{{beepInterval}}" />
  138. </view>
  139. </view>
  140. <view class="buttons">
  141. <van-button custom-class="w50 leftButton" bind:click="invalidCodeCancel">取消</van-button>
  142. <van-button custom-class="w50 rightButton" form-type="submit" bind:click="submitSheet">确认</van-button>
  143. </view>
  144. </view>
  145. </van-action-sheet>
  146. </view>