automatic.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <template>
  2. <view class="main_automatic">
  3. <view class="main_automatic_left">
  4. <view class="main_automatic_left_one">
  5. <SubTitle title="信号状态" titleEng="Signal status"></SubTitle>
  6. <view>
  7. <view class="plc_box">
  8. <image class="plc_img_wifi" src="../../../static/equipment/info1.png" mode=""></image>
  9. <image class="plc_img_code"
  10. :src="robotInfoVo.walkServo|| 1? '/static/equipment/signal1.png': '/static/equipment/signal2.png'">
  11. </image>
  12. <view class=" plc_title">
  13. PLC通信
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="main_automatic_left_two">
  19. <SubTitle title="机器人模式" titleEng="Robot Mode"></SubTitle>
  20. <view class="robot_mode">
  21. <view class="robot_mode_box" :class="robotInfoVo.exchangeMode == 2?'isactive':''">
  22. <image class="robot_mode_box_img" :src="robotInfoVo.exchangeMode == 2?'/static/equipment/greenpie.png':'/static/equipment/gray.png'" mode=""></image>
  23. 自动
  24. </view>
  25. <view class="robot_mode_box" :class="robotInfoVo.exchangeMode == 1?'isactive':''">
  26. <image class="robot_mode_box_img" :src="robotInfoVo.exchangeMode == 1?'/static/equipment/greenpie.png':'/static/equipment/gray.png'" mode=""></image>
  27. 手动
  28. </view>
  29. <view class="robot_mode_box" :class="robotInfoVo.exchangeMode == 3?'isactive':''">
  30. <image class="robot_mode_box_img" :src="robotInfoVo.exchangeMode == 3?'/static/equipment/greenpie.png':'/static/equipment/gray.png'" mode=""></image>
  31. 单步
  32. </view>
  33. <view class="robot_mode_box" :class="robotInfoVo.exchangeMode == 0?'isactive':''">
  34. <image class="robot_mode_box_img" :src="robotInfoVo.exchangeMode == 0?'/static/equipment/greenpie.png':'/static/equipment/gray.png'" mode=""></image>
  35. 无效
  36. </view>
  37. </view>
  38. </view>
  39. <view class="main_automatic_left_three">
  40. <SubTitle title="机器人状态" titleEng="Robot information"></SubTitle>
  41. <view class="robot_code">
  42. <view class="robot_code_box">
  43. <image class="robot_code_box_img" :src= "robotInfoVo.robotState === 1?'/static/equipment/status2-active.png':'/static/equipment/status2.png'" mode=""></image>
  44. <view class="robot_code_title">
  45. <image class="robot_code_title_img":src= "robotInfoVo.robotState === 1?'/static/equipment/green.png':'/static/equipment/default.png'" mode="">
  46. </image>
  47. 就绪
  48. </view>
  49. </view>
  50. <view class="robot_code_box">
  51. <image class="robot_code_box_img":src= "robotInfoVo.robotState === 2?'/static/equipment/status1-active.png':'/static/equipment/status1.png'" mode="">
  52. </image>
  53. <view class="robot_code_title">
  54. <image class="robot_code_title_img" :src= "robotInfoVo.robotState === 2?'/static/equipment/blue.png':'/static/equipment/default.png'" mode="">
  55. </image>
  56. 运行
  57. </view>
  58. </view>
  59. <view class="robot_code_box">
  60. <image class="robot_code_box_img" :src= "robotInfoVo.robotState === 3?'/static/equipment/status3-active.png':'/static/equipment/status3.png'" mode="">
  61. </image>
  62. <view class="robot_code_title">
  63. <image class="robot_code_title_img" :src= "robotInfoVo.robotState === 3?'/static/equipment/blue.png':'/static/equipment/default.png'" mode="">
  64. </image>
  65. 完成
  66. </view>
  67. </view>
  68. <view class="robot_code_box">
  69. <image class="robot_code_box_img" :src= "robotInfoVo.robotState === 4?'/static/equipment/status4-active.png':'/static/equipment/status4.png'" mode="">
  70. </image>
  71. <view class="robot_code_title content-class-title">
  72. <image class="robot_code_title_img" :src= "robotInfoVo.robotState === 4?'/static/equipment/red.png':'/static/equipment/default.png'" mode=""></image>
  73. 故障
  74. </view>
  75. </view>
  76. <view class="robot_code_box">
  77. <image class="robot_code_box_img":src= "robotInfoVo.robotState === 5?'/static/equipment/status5-active.png':'/static/equipment/status5.png'" mode="">
  78. </image>
  79. <view class="robot_code_title content-class-title">
  80. <image class="robot_code_title_img" :src= "robotInfoVo.robotState === 5?'/static/equipment/red.png':'/static/equipment/default.png'" mode=""></image>
  81. 中止
  82. </view>
  83. </view>
  84. </view>
  85. <PannelItem show="true" words="急停状态" :status="robotInfoVo.emergencyMode ? '急停' : '未急停'"
  86. :flag="!robotInfoVo.emergencyMode" style="margin-bottom: 20px;" class="jerk"/>
  87. <PannelItem show="true" words="暂停状态" :status="robotInfoVo.pause ? '暂停' : '未暂停'" handle="true"
  88. @ExchangeMessage='ExchangeMessage' :flag="!robotInfoVo.pause" class="jerk"/>
  89. </view>
  90. </view>
  91. <view class="main_automatic_right">
  92. <view class="main_automatic_right_one">
  93. <SubTitle title="运行参数" titleEng="Operating parameters"></SubTitle>
  94. <view class="main_automatic_right_speed">
  95. <view class="speed_box">
  96. <span class="speed_title">速度</span>
  97. <view class="speed">
  98. <view class="p">
  99. 行走:<text class="text">{{ this.$checks.KeepDecimals(robotInfoVo.xAxis,5) || '0'}}</text><text>mm/s</text>
  100. </view>
  101. <view class="p">
  102. 伸缩:<text class="text">{{this.$checks.KeepDecimals(robotInfoVo.yAxis,5) || '0'}}</text><text>mm/s</text>
  103. </view>
  104. <view class="p">
  105. 举升:<text class="text">{{ this.$checks.KeepDecimals(robotInfoVo.zAxis,5) || '0'}}</text><text>mm/s</text>
  106. </view>
  107. <view class="p">
  108. 旋转:<text class="text">{{ this.$checks.KeepDecimals(robotInfoVo.rAxis,5) || '0'}}</text><text>mm/s</text>
  109. </view>
  110. </view>
  111. </view>
  112. <view class="speed_box">
  113. <span class="speed_title">位置</span>
  114. <view class="speed">
  115. <view class="p">
  116. 行走:<text class="text">{{ this.$checks.KeepDecimals(robotInfoVo.xDpmt,5) || '0'}}</text><text>mm</text>
  117. </view>
  118. <view class="p">
  119. 伸缩:<text class="text">{{ this.$checks.KeepDecimals(robotInfoVo.yDpmt,5) || '0'}}</text><text>mm</text>
  120. </view>
  121. <view class="p">
  122. 举升:<text class="text">{{ this.$checks.KeepDecimals(robotInfoVo.zDpmt,5) || '0'}}</text><text>mm</text>
  123. </view>
  124. <view class="p">
  125. 旋转:<text class="text">{{ this.$checks.KeepDecimals(robotInfoVo.rDpmt,5) || '0'}}</text><text>mm</text>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. <view class="main_automatic_right_two">
  132. <SubTitle title="" titleEng=""></SubTitle>
  133. <image class="nodata" src="../../../static/equipment/nodata.png" mode=""></image>
  134. </view>
  135. </view>
  136. <!-- 顶部公共提示信息 -->
  137. <uni-popup ref="Exchangepopup" type="message">
  138. <uni-popup-message :type="popupType" :message="popupMessage" :duration="2000"></uni-popup-message>
  139. </uni-popup>
  140. <!-- 顶部提示信息结束-->
  141. </view>
  142. </template>
  143. <script>
  144. export default {
  145. name:'automatic',
  146. props: ["robotInfoVo",'robotcode'],
  147. data() {
  148. return {
  149. isSlecte: true,
  150. popupType:'',
  151. popupMessage:'',
  152. }
  153. },
  154. mounted() {
  155. },
  156. methods: {
  157. //顶部公共消息提示
  158. ExchangeMessage(type, message) {
  159. this.popupType = type
  160. this.popupMessage = message?message:'后端接口404错误!'
  161. this.$refs.Exchangepopup.open()
  162. },
  163. }
  164. }
  165. </script>
  166. <style lang="scss" scoped>
  167. .main_automatic {
  168. display: flex;
  169. .main_automatic_left {
  170. margin-right: 16px;
  171. .main_automatic_left_one {
  172. width: 512px;
  173. height: 157px;
  174. background: #111827;
  175. .plc_box {
  176. position: relative;
  177. width: 100px;
  178. height: 129px;
  179. text-align: center;
  180. margin-top: 20.5px;
  181. .plc_img_wifi {
  182. width: 68px;
  183. height: 58px;
  184. }
  185. .plc_img_code {
  186. position: absolute;
  187. width: 14px;
  188. height: 14px;
  189. top: 46px;
  190. left: 70px;
  191. }
  192. .plc_title {
  193. font-size: 14px;
  194. font-family: PingFang SC-Regular, PingFang SC;
  195. font-weight: 400;
  196. color: #636C97;
  197. margin-top: 5px;
  198. }
  199. }
  200. }
  201. .main_automatic_left_two {
  202. width: 512px;
  203. height: 106px;
  204. background: #111827;
  205. margin-top: 16px;
  206. margin-bottom: 16px;
  207. .robot_mode {
  208. display: flex;
  209. width: 512px;
  210. height: 82px;
  211. align-items: center;
  212. padding-left: 20px;
  213. .robot_mode_box {
  214. width: 106px;
  215. height: 40px;
  216. border: 1px solid #334568;
  217. position: relative;
  218. font-size: 14px;
  219. color: #636C97;
  220. line-height: 40px;
  221. margin-right: 13px;
  222. &::before {
  223. content: '';
  224. width: 2px;
  225. height: 2px;
  226. position: absolute;
  227. background: #FFFFFF;
  228. left: -2px;
  229. top: -2px;
  230. }
  231. .robot_mode_box_img {
  232. width: 24px;
  233. height: 24px;
  234. vertical-align: middle;
  235. margin-right: 4px;
  236. margin-left: 15px;
  237. }
  238. }
  239. .isactive {
  240. color: #91FDB9;
  241. }
  242. }
  243. }
  244. .main_automatic_left_three {
  245. width: 512px;
  246. height: 367px;
  247. background: #111827;
  248. .robot_code {
  249. height: 90px;
  250. display: flex;
  251. justify-content: space-between;
  252. margin: 20px 0px;
  253. // border: 1px solid;
  254. .robot_code_box {
  255. width: 100px;
  256. text-align: center;
  257. .robot_code_box_img {
  258. width: 54px;
  259. height: 54px;
  260. }
  261. .robot_code_title {
  262. font-size: 14px;
  263. margin-top: 10px;
  264. .robot_code_title_img {
  265. width: 15px;
  266. height: 15px;
  267. vertical-align: middle;
  268. margin-right: 6px;
  269. }
  270. }
  271. .content-class-title {
  272. color: #636C97;
  273. }
  274. }
  275. }
  276. }
  277. }
  278. .main_automatic_right {
  279. .main_automatic_right_one {
  280. width: 512px;
  281. height: 220px;
  282. background: #111827;
  283. margin-bottom: 16px;
  284. .main_automatic_right_speed {
  285. display: flex;
  286. padding: 20px;
  287. justify-content: space-between;
  288. .speed_box {
  289. height: 150px;
  290. width: 250px;
  291. .speed_title {
  292. font-size: 16px;
  293. color: #A8ACC4;
  294. margin-bottom: 15px;
  295. display: inline-block;
  296. position: relative;
  297. top: -5px;
  298. }
  299. .speed {
  300. .p {
  301. font-size: 14px;
  302. font-weight: 500;
  303. color: #636C97;
  304. margin-bottom: 10px;
  305. .text {
  306. color: #fff;
  307. display: inline-block;
  308. }
  309. }
  310. }
  311. }
  312. }
  313. }
  314. .main_automatic_right_two {
  315. width: 512px;
  316. height: 426px;
  317. background: #111827;
  318. text-align: center;
  319. .nodata {
  320. width: 274px;
  321. margin-top: 80px;
  322. }
  323. }
  324. }
  325. .jerk{
  326. padding-left: 20px;
  327. padding-right: 20px;
  328. width: auto;
  329. }
  330. }
  331. ::v-deep .uni-popup-message__box{
  332. height: 20px;
  333. line-height: 11px;
  334. }
  335. </style>