injectionMolding.vue 9.8 KB

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