packingMachine.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. <template>
  2. <!-- 包装机 -->
  3. <view class="packingMachineDtl">
  4. <commons-header :title="$t('packer.name')"></commons-header>
  5. <view class="equ-img">
  6. <image src="../../static/bzj.png" mode=""></image>
  7. <!-- <view class="err-modal">
  8. <image src="../../static/images/icon_dqwd.png" mode=""></image>
  9. </view> -->
  10. </view>
  11. <view class="state">
  12. <view class="state-box">
  13. <image src="../../static/icon_sbzt.png" mode=""></image>
  14. <view class="text">
  15. <view class="label">
  16. {{$t('equipment.equipmentStatus')}}
  17. </view>
  18. <view class="state-text">
  19. {{$t('equipment.offLine')}}
  20. </view>
  21. </view>
  22. </view>
  23. <view class="state-box">
  24. <image src="../../static/icon_gzms.png" mode=""></image>
  25. <view class="text">
  26. <view class="label">
  27. {{$t('equipment.operatingMode')}}
  28. </view>
  29. <view class="state-text">
  30. {{$t('equipment.offLine')}}
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="echarts">
  36. <view class="title">
  37. <image src="../../static/btn_kanban_blue.png" mode=""></image>
  38. <span>{{$t('equipment.productionData')}}</span>
  39. </view>
  40. <view class="content">
  41. <view class="text">
  42. {{$t('equipment.productionData')}}
  43. </view>
  44. <qiun-data-charts type="line" :opts="opts" :chartData="chartData" />
  45. </view>
  46. </view>
  47. <view class="state">
  48. <view class="state-box">
  49. <image src="../../static/icon_jhcl.png" mode=""></image>
  50. <view class="text" style="margin-left:20rpx;line-height: 40rpx;">
  51. <view class="label" style="font-size: 30rpx;font-weight: bold;">
  52. 0
  53. </view>
  54. <view class="state-text" style="color:#666">
  55. {{$t('packer.plannedOutput')}}
  56. </view>
  57. </view>
  58. </view>
  59. <view class="state-box">
  60. <image src="../../static/icon_mfzbs.png" mode=""></image>
  61. <view class="text" style="margin-left:20rpx;line-height: 40rpx;">
  62. <view class="label" style="font-size: 30rpx;font-weight: bold;">
  63. 0
  64. </view>
  65. <view class="state-text" style="color:#666">
  66. {{$t('packer.versionsPerMinute')}}
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="parts-list">
  72. <ul>
  73. <li>
  74. <view class="temperature">
  75. 0
  76. </view>
  77. <view>
  78. {{$t('packer.numberOfModules')}}
  79. </view>
  80. <view class="before-icon">
  81. <span class="iconfont">&#xe74a;</span>
  82. </view>
  83. </li>
  84. <li>
  85. <view class="temperature">
  86. 0
  87. </view>
  88. <view>
  89. {{$t('packer.singleModeDistance')}}
  90. </view>
  91. <view class="before-icon">
  92. <span class="iconfont">&#xe74c;</span>
  93. </view>
  94. </li>
  95. <li>
  96. <view class="temperature">
  97. 0
  98. </view>
  99. <view>
  100. {{$t('packer.alignmentDistance')}}
  101. </view>
  102. <view class="before-icon">
  103. <span class="iconfont">&#xe74c;</span>
  104. </view>
  105. </li>
  106. </ul>
  107. <ul style="margin-top:20rpx">
  108. <li>
  109. <view class="temperature">
  110. 0
  111. </view>
  112. <view>
  113. {{$t('packer.jogSpeed')}}
  114. </view>
  115. <view class="before-icon">
  116. <span class="iconfont">&#xe74b;</span>
  117. </view>
  118. </li>
  119. <li>
  120. <view class="temperature">
  121. 0
  122. </view>
  123. <view>
  124. {{$t('packer.chainSpeed')}}
  125. </view>
  126. <view class="before-icon">
  127. <span class="iconfont">&#xe74b;</span>
  128. </view>
  129. </li>
  130. <li>
  131. <view class="temperature">
  132. 0
  133. </view>
  134. <view>
  135. {{$t('packer.alignmentSpeed')}}
  136. </view>
  137. <view class="before-icon">
  138. <span class="iconfont">&#xe74b;</span>
  139. </view>
  140. </li>
  141. </ul>
  142. </view>
  143. </view>
  144. </template>
  145. <script>
  146. import {
  147. getInfo
  148. } from "@/util/api.js";
  149. import Vue from 'vue'
  150. import commonsHeader from '../../components/commons-header/index.vue'
  151. export default {
  152. components: {
  153. commonsHeader
  154. },
  155. data() {
  156. return {
  157. tongdao:[
  158. {
  159. name:"通道1",
  160. yali:0,
  161. sudu:0,
  162. },
  163. {
  164. name:"通道1",
  165. yali:0,
  166. sudu:0,
  167. },
  168. {
  169. name:"通道1",
  170. yali:0,
  171. sudu:0,
  172. },{
  173. name:"通道1",
  174. yali:0,
  175. sudu:0,
  176. }
  177. ],
  178. tongdao1:[
  179. {
  180. name:"通道1",
  181. yali:0,
  182. sudu:0,
  183. },
  184. {
  185. name:"通道1",
  186. yali:0,
  187. sudu:0,
  188. },
  189. {
  190. name:"通道1",
  191. yali:0,
  192. sudu:0,
  193. },{
  194. name:"通道1",
  195. yali:0,
  196. sudu:0,
  197. }
  198. ],
  199. tongdao2:[
  200. {
  201. name:"通道1",
  202. yali:0,
  203. sudu:0,
  204. },
  205. {
  206. name:"通道1",
  207. yali:0,
  208. sudu:0,
  209. },
  210. {
  211. name:"通道1",
  212. yali:0,
  213. sudu:0,
  214. },{
  215. name:"通道1",
  216. yali:0,
  217. sudu:0,
  218. }
  219. ],
  220. userInfoData: [],
  221. notificationData: [],
  222. opts: {
  223. color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
  224. "#ea7ccc"
  225. ],
  226. padding: [15, 10, 0, 15],
  227. legend: {},
  228. xAxis: {
  229. disableGrid: true
  230. },
  231. yAxis: {
  232. gridType: "dash",
  233. dashLength: 2
  234. },
  235. extra: {
  236. line: {
  237. type: "straight",
  238. width: 2
  239. }
  240. }
  241. },
  242. chartData: {
  243. categories: ["8", "9", "10", "11", "12", "13"],
  244. series: [
  245. {
  246. name: "实际产量",
  247. data: [0, 0, 0, 0, 0, 0]
  248. },{
  249. name: "极限产量",
  250. data: [0, 0, 0, 0, 0, 0]
  251. },
  252. ]
  253. },
  254. qiehuantype:1,
  255. tongti:0,
  256. yeya:0,
  257. }
  258. },
  259. onLoad() {
  260. const v = this
  261. v.qiehuan()
  262. },
  263. methods: {
  264. toInstructionsVideo(){
  265. uni.navigateTo({
  266. url: '/pages/equipment/instructionsVideo'
  267. })
  268. },
  269. qiehuan(){
  270. const tongdao = [
  271. {
  272. name:"通道1",
  273. yali:10 + (Math.round(Math.random()*100) - 50) / 10,
  274. sudu:70 + (Math.round(Math.random()*100) - 50) / 10,
  275. },
  276. {
  277. name:"通道1",
  278. yali:50 + (Math.round(Math.random()*100) - 50) / 10,
  279. sudu:80 + (Math.round(Math.random()*100) - 50) / 10,
  280. },
  281. {
  282. name:"通道1",
  283. yali:80 + (Math.round(Math.random()*100) - 50) / 10,
  284. sudu:50 + (Math.round(Math.random()*100) - 50) / 10,
  285. },{
  286. name:"通道1",
  287. yali:40 + (Math.round(Math.random()*100) - 50) / 10,
  288. sudu:40 + (Math.round(Math.random()*100) - 50) / 10,
  289. }
  290. ]
  291. this.tongdao = tongdao
  292. this.tongti = 82 + (Math.round(Math.random()*100) - 50) / 10
  293. this.yeya = 82 + (Math.round(Math.random()*100) - 50) / 10
  294. setTimeout(()=>{
  295. this.qiehuan()
  296. },5000)
  297. },
  298. toRouter(j) {
  299. console.log(j)
  300. uni.navigateTo({
  301. url: '/pages/' + j.menuKey + '/' + j.menuKey
  302. })
  303. },
  304. },
  305. }
  306. </script>
  307. <style lang="less" scoped>
  308. .packingMachineDtl {
  309. background-color: #f0f0f0;
  310. min-height: 100vh;
  311. margin-top: 128rpx;
  312. .footer-btn{
  313. margin: 20rpx;
  314. background: blue;
  315. color: #fff;
  316. }
  317. .state {
  318. display: flex;
  319. justify-content: space-between;
  320. margin: 24rpx 24rpx 0;
  321. .state-box {
  322. padding: 20rpx;
  323. width: 48%;
  324. background-color: #fff;
  325. display: flex;
  326. box-sizing: border-box;
  327. border-radius: 10rpx;
  328. position: relative;
  329. .before-icon{
  330. width: 30rpx;
  331. height: 30rpx;
  332. position: absolute;
  333. right: 10rpx;
  334. top: 10rpx;
  335. i{
  336. color: #F54A45;
  337. }
  338. }
  339. .text{
  340. padding: 12rpx 0;
  341. }
  342. .state-text{
  343. font-size: 26rpx;
  344. color: #FF8800;
  345. font-weight: bold;
  346. margin-top: 5rpx;
  347. }
  348. .label{
  349. font-weight: 400;
  350. font-size: 28rpx;
  351. }
  352. image {
  353. width: 110rpx;
  354. height: 110rpx;
  355. }
  356. }
  357. }
  358. .parts-list{
  359. padding: 0 24rpx;
  360. margin-top: 24rpx;
  361. ul{
  362. display: flex;
  363. justify-content: space-between;
  364. }
  365. li{
  366. width: 32%;
  367. padding: 30rpx 0;
  368. text-align: center;
  369. position: relative;
  370. background-color: #fff;
  371. .temperature{
  372. font-size: 40rpx;
  373. font-weight: bold;
  374. height: 60rpx;
  375. margin: 0 auto 20rpx;
  376. line-height: 60rpx;
  377. }
  378. image{
  379. width: 60rpx;
  380. height: 60rpx;
  381. display: block;
  382. margin: 0 auto 20rpx;
  383. }
  384. }
  385. .before-icon{
  386. width: 30rpx;
  387. height: 30rpx;
  388. position: absolute;
  389. right: 16rpx;
  390. top: 16rpx;
  391. i{
  392. color: #3FBF31;
  393. }
  394. }
  395. .before{
  396. width: 30rpx;
  397. height: 30rpx;
  398. border-radius: 50%;
  399. background-color: rgba(204,204,204,0.2);
  400. display: block;
  401. position: absolute;
  402. right: 16rpx;
  403. top: 16rpx;
  404. }
  405. .before::before{
  406. position: absolute;
  407. display: block;
  408. top: 7rpx;
  409. left: 7rpx;
  410. width: 19rpx;
  411. height: 19rpx;
  412. border-radius: 50%;
  413. content:" ";
  414. background: #cccccc;
  415. }
  416. .before.succes{
  417. background-color: rgba(63,191,49,0.2);
  418. }
  419. .before.succes::before{
  420. background: #3FBF31;
  421. }
  422. }
  423. .echarts {
  424. background: #fff;
  425. margin: 24rpx 24rpx 0;
  426. .content{
  427. .text{
  428. font-size: 28rpx;
  429. font-weight: 700;
  430. color: #333;
  431. text-align: center;
  432. margin-bottom: 40rpx;
  433. }
  434. }
  435. .title{
  436. font-size: 28rpx;
  437. height: 90rpx;
  438. line-height: 90rpx;
  439. display: flex;
  440. padding: 0 24rpx;
  441. font-weight: 500;
  442. image{
  443. width: 40rpx;
  444. height: 40rpx;
  445. margin-top: 25rpx;
  446. margin-right: 16rpx;
  447. }
  448. }
  449. }
  450. .parts-list {}
  451. .equ-img {
  452. padding: 24rpx;
  453. background-color: #ffffff;
  454. position: relative;
  455. image {
  456. width: 100%;
  457. height: 395rpx;
  458. }
  459. .err-modal{
  460. position: absolute;
  461. left: 0;
  462. right: 0;
  463. bottom: 0;
  464. top: 0;
  465. background: rgba(0,0,0,0.60);
  466. text-align: center;
  467. display: flex;
  468. align-items: center;
  469. image{
  470. width: 160rpx;
  471. height: 160rpx;
  472. margin: 0 auto;
  473. }
  474. }
  475. }
  476. .state {
  477. display: flex;
  478. justify-content: space-between;
  479. margin: 24rpx 24rpx 0;
  480. .state-box {
  481. padding: 20rpx;
  482. width: 48%;
  483. background-color: #fff;
  484. display: flex;
  485. box-sizing: border-box;
  486. border-radius: 10rpx;
  487. .text{
  488. padding: 12rpx 0;
  489. }
  490. .state-text{
  491. font-size: 32rpx;
  492. font-weight: bold;
  493. margin-top: 5rpx;
  494. }
  495. .label{
  496. font-weight: 400;
  497. font-size: 28rpx;
  498. }
  499. image {
  500. width: 110rpx;
  501. height: 110rpx;
  502. }
  503. }
  504. }
  505. }
  506. </style>