injectionMolding.vue 10 KB

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