automatic.vue 11 KB

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