injectionMolding.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  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(option) {
  232. const v = this
  233. console.log(option)
  234. v.getData(option.id)
  235. },
  236. methods: {
  237. getData(_id){
  238. const v = this
  239. v.$post('/api/syringe-production/factoryProduct/getData',{equipmentNo:_id}).then(res => {
  240. console.log(res )
  241. })
  242. },
  243. toInstructionsVideo(){
  244. uni.navigateTo({
  245. url: '/pages/equipment/instructionsVideo'
  246. })
  247. },
  248. qiehuan(){
  249. const tongdao = [
  250. {
  251. name:"通道1",
  252. yali:10 + (Math.round(Math.random()*100) - 50) / 10,
  253. sudu:70 + (Math.round(Math.random()*100) - 50) / 10,
  254. },
  255. {
  256. name:"通道1",
  257. yali:50 + (Math.round(Math.random()*100) - 50) / 10,
  258. sudu:80 + (Math.round(Math.random()*100) - 50) / 10,
  259. },
  260. {
  261. name:"通道1",
  262. yali:80 + (Math.round(Math.random()*100) - 50) / 10,
  263. sudu:50 + (Math.round(Math.random()*100) - 50) / 10,
  264. },{
  265. name:"通道1",
  266. yali:40 + (Math.round(Math.random()*100) - 50) / 10,
  267. sudu:40 + (Math.round(Math.random()*100) - 50) / 10,
  268. }
  269. ]
  270. this.tongdao = tongdao
  271. this.tongti = 82 + (Math.round(Math.random()*100) - 50) / 10
  272. this.yeya = 82 + (Math.round(Math.random()*100) - 50) / 10
  273. setTimeout(()=>{
  274. this.qiehuan()
  275. },5000)
  276. },
  277. toRouter(j) {
  278. console.log(j)
  279. uni.navigateTo({
  280. url: '/pages/' + j.menuKey + '/' + j.menuKey
  281. })
  282. },
  283. },
  284. }
  285. </script>
  286. <style lang="less" scoped>
  287. .equipmentDtl {
  288. background-color: #f0f0f0;
  289. min-height: 100vh;
  290. margin-top: 128rpx;
  291. .footer-btn{
  292. margin: 20rpx;
  293. background: blue;
  294. color: #fff;
  295. }
  296. .pressure-chart{
  297. height: 100rpx;
  298. width: 100rpx;
  299. // background-image: conic-gradient(from 135deg ,#fff 90deg, #EEEEEE 26%);
  300. background: url(../../static/images/ybp.png);
  301. background-size: 100% 100%;
  302. border-radius: 50%;
  303. margin: 20rpx auto;
  304. position: relative;
  305. .pressure-zhen{
  306. position: absolute;
  307. z-index: 2;
  308. top:0;
  309. left: 0;
  310. right: 0;
  311. bottom: 0;
  312. transform: rotate(70deg);
  313. transition: all ease .5s;
  314. image{
  315. width:36rpx;
  316. height: 36rpx;
  317. margin-top: 22rpx;
  318. }
  319. }
  320. .pressure-line{
  321. position: absolute;
  322. top:0;
  323. left: 0;
  324. right: 0;
  325. bottom: 0;
  326. z-index: 1;
  327. // background-image: conic-gradient(from 135deg ,#fff 90deg,#FFAF53 90deg,#FF8800 0%, #EEEEEE 0%);
  328. border-radius: 50%;
  329. transition: all ease .5s;
  330. }
  331. .pressure-line::before{
  332. position: absolute;
  333. display: block;
  334. top:20rpx;
  335. left: 20rpx;
  336. right: 20rpx;
  337. bottom: 20rpx;
  338. content:" ";
  339. background-color: #fff;
  340. border-radius: 50%;
  341. }
  342. }
  343. .pressure-chart::before{
  344. position: absolute;
  345. display: block;
  346. inset: 20rpx 20rpx 20rpx 20rpx;
  347. content:" ";
  348. background-color: #fff;
  349. border-radius: 50%;
  350. }
  351. .pressure-warp{
  352. display: flex;
  353. justify-content: space-between;
  354. padding: 0 24rpx;
  355. margin-top: 24rpx;
  356. li{
  357. width: 23%;
  358. text-align: center;
  359. background-color: #fff;
  360. padding: 32rpx 0;
  361. border-radius: 10rpx;
  362. font-size: 24rpx;
  363. color: #666666;
  364. .pressure-chart{
  365. }
  366. .label{
  367. color: #333333;
  368. font-size: 28rpx;
  369. }
  370. .pressure{
  371. font-size: 32rpx;
  372. color: #333;
  373. margin: 10rpx 0;
  374. }
  375. .line{
  376. width: 100rpx;
  377. height: 20rpx;
  378. background: #EEEEEE;
  379. border-radius: 10rpx;
  380. margin: 16rpx auto 0;
  381. .box{
  382. width:80%;
  383. background: linear-gradient(270deg, #3370FF 0%, #A0BBFB 100%);
  384. height: 100%;
  385. border-radius: 10rpx;
  386. transition: all ease .5s;
  387. }
  388. }
  389. }
  390. }
  391. .parts-list{
  392. padding: 0 24rpx;
  393. margin-top: 24rpx;
  394. ul{
  395. display: flex;
  396. justify-content: space-between;
  397. }
  398. li{
  399. width: 32%;
  400. padding: 30rpx 0;
  401. text-align: center;
  402. position: relative;
  403. background-color: #fff;
  404. .temperature{
  405. font-size: 40rpx;
  406. font-weight: bold;
  407. height: 60rpx;
  408. margin: 0 auto 20rpx;
  409. line-height: 60rpx;
  410. }
  411. image{
  412. width: 60rpx;
  413. height: 60rpx;
  414. display: block;
  415. margin: 0 auto 20rpx;
  416. }
  417. }
  418. .before-icon{
  419. width: 30rpx;
  420. height: 30rpx;
  421. position: absolute;
  422. right: 16rpx;
  423. top: 16rpx;
  424. i{
  425. color: #3FBF31;
  426. }
  427. }
  428. .before{
  429. width: 30rpx;
  430. height: 30rpx;
  431. border-radius: 50%;
  432. background-color: rgba(204,204,204,0.2);
  433. display: block;
  434. position: absolute;
  435. right: 16rpx;
  436. top: 16rpx;
  437. }
  438. .before::before{
  439. position: absolute;
  440. display: block;
  441. top: 7rpx;
  442. left: 7rpx;
  443. width: 19rpx;
  444. height: 19rpx;
  445. border-radius: 50%;
  446. content:" ";
  447. background: #cccccc;
  448. }
  449. .before.succes{
  450. background-color: rgba(63,191,49,0.2);
  451. }
  452. .before.succes::before{
  453. background: #3FBF31;
  454. }
  455. }
  456. .echarts {
  457. background: #fff;
  458. margin: 24rpx 24rpx 0;
  459. .content{
  460. .text{
  461. font-size: 28rpx;
  462. font-weight: 700;
  463. color: #333;
  464. text-align: center;
  465. margin-bottom: 40rpx;
  466. }
  467. }
  468. .title{
  469. font-size: 28rpx;
  470. height: 90rpx;
  471. line-height: 90rpx;
  472. display: flex;
  473. padding: 0 24rpx;
  474. font-weight: 500;
  475. image{
  476. width: 40rpx;
  477. height: 40rpx;
  478. margin-top: 25rpx;
  479. margin-right: 16rpx;
  480. }
  481. }
  482. }
  483. .parts-list {}
  484. .equ-img {
  485. padding: 24rpx;
  486. background-color: #ffffff;
  487. position: relative;
  488. image {
  489. width: 100%;
  490. height: 395rpx;
  491. }
  492. .err-modal{
  493. position: absolute;
  494. left: 0;
  495. right: 0;
  496. bottom: 0;
  497. top: 0;
  498. background: rgba(0,0,0,0.60);
  499. text-align: center;
  500. display: flex;
  501. align-items: center;
  502. image{
  503. width: 160rpx;
  504. height: 160rpx;
  505. margin: 0 auto;
  506. }
  507. }
  508. }
  509. .state {
  510. display: flex;
  511. justify-content: space-between;
  512. margin: 24rpx 24rpx 0;
  513. .state-box {
  514. padding: 20rpx;
  515. width: 48%;
  516. background-color: #fff;
  517. display: flex;
  518. box-sizing: border-box;
  519. border-radius: 10rpx;
  520. .text{
  521. padding: 12rpx 0;
  522. }
  523. .state-text{
  524. font-size: 32rpx;
  525. font-weight: bold;
  526. margin-top: 5rpx;
  527. }
  528. .label{
  529. font-weight: 400;
  530. font-size: 28rpx;
  531. }
  532. image {
  533. width: 110rpx;
  534. height: 110rpx;
  535. }
  536. }
  537. }
  538. }
  539. </style>