injectionMolding.vue 11 KB

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