infotrack.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. <template>
  2. <div class="track-info">
  3. <div class="form-info">
  4. <div class="work-flow">
  5. <div class="work-flow-line"></div>
  6. <div :class="['work-flow-item', item.name == statu(form) ? 'active' : '']" v-for="(item, i) in svgarr" :key="i">
  7. <div class="work-flow-icon-item">
  8. <div class="work-flow-icon-o"></div>
  9. <div class="work-flow-icon-i"></div>
  10. <span class="svg-icon">
  11. <SvgIcon :svgid="item.svg"></SvgIcon>
  12. </span>
  13. </div>
  14. <div class="work-flow-text">{{ item.name }}</div>
  15. </div>
  16. </div>
  17. <div class="form-body">
  18. <el-form ref="form" :model="form" label-width="120px">
  19. <el-row>
  20. <el-col :span="12">
  21. <el-form-item label="风场:">
  22. <el-input
  23. v-model="form.wpName"
  24. placeholder="风场名称"
  25. ></el-input>
  26. </el-form-item>
  27. </el-col>
  28. <el-col :span="12">
  29. <el-form-item label="风机:">
  30. <el-input v-model="form.wtId" placeholder="风机名称"></el-input>
  31. </el-form-item>
  32. </el-col>
  33. </el-row>
  34. <el-row>
  35. <el-col :span="12">
  36. <el-form-item label="推荐检修时间:">
  37. <el-input
  38. v-model="form.tjss"
  39. placeholder="推荐检修时间"
  40. ></el-input>
  41. <!-- <el-date-picker v-model="form.tjjxsj" type="datetime" placeholder="推荐检修时间" popper-class="date-select"></el-date-picker> -->
  42. </el-form-item>
  43. </el-col>
  44. <el-col :span="12">
  45. <el-form-item label="预计检修风速:">
  46. <el-input
  47. v-model="form.tjfs"
  48. placeholder="预计检修风速"
  49. ></el-input>
  50. </el-form-item>
  51. </el-col>
  52. </el-row>
  53. <el-row>
  54. <el-col :span="24">
  55. <el-form-item label="推荐理由:">
  56. <el-input
  57. type="textarea"
  58. :rows="3"
  59. v-model="form.description"
  60. placeholder="推荐理由"
  61. ></el-input>
  62. </el-form-item>
  63. </el-col>
  64. </el-row>
  65. <el-row>
  66. <el-col :span="12">
  67. <el-form-item label="下单时间:">
  68. <el-input
  69. v-model="form.prodtdepttime"
  70. placeholder="下单时间"
  71. ></el-input>
  72. </el-form-item>
  73. </el-col>
  74. <el-col :span="12">
  75. <el-form-item label="主要负责人:">
  76. <el-input
  77. v-model="form.workleader"
  78. placeholder="主要负责人"
  79. ></el-input>
  80. </el-form-item>
  81. </el-col>
  82. </el-row>
  83. <el-row>
  84. <el-col :span="12">
  85. <el-form-item label="出发时间:">
  86. <el-input
  87. v-model="form.departuretime"
  88. placeholder="出发时间"
  89. ></el-input>
  90. </el-form-item>
  91. </el-col>
  92. <el-col :span="12">
  93. <el-form-item label="到达时间:">
  94. <el-input
  95. v-model="form.arrivaltime"
  96. placeholder="到达时间"
  97. ></el-input>
  98. </el-form-item>
  99. </el-col>
  100. </el-row>
  101. <el-row>
  102. <el-col :span="24">
  103. <el-form-item label="排查方法:">
  104. <el-input
  105. type="textarea"
  106. :rows="3"
  107. v-model="form.gzpc"
  108. placeholder="排查方法"
  109. ></el-input>
  110. </el-form-item>
  111. </el-col>
  112. </el-row>
  113. <el-row>
  114. <el-col :span="24">
  115. <el-form-item label="处理方法:">
  116. <el-input
  117. type="textarea"
  118. :rows="3"
  119. v-model="form.repairedcomment"
  120. placeholder="处理方法"
  121. ></el-input>
  122. </el-form-item>
  123. </el-col>
  124. </el-row>
  125. <el-row>
  126. <el-col :span="12">
  127. <el-form-item label="消缺时间:">
  128. <el-input
  129. v-model="form.repairedtime"
  130. placeholder="消缺时间"
  131. ></el-input>
  132. </el-form-item>
  133. </el-col>
  134. <el-col :span="12">
  135. <el-form-item label="故障时长:">
  136. <el-input
  137. v-model="form.degradebugtype"
  138. placeholder="故障时长"
  139. ></el-input>
  140. </el-form-item>
  141. </el-col>
  142. </el-row>
  143. <el-row>
  144. <el-col :span="12">
  145. <el-form-item label="验收人:">
  146. <el-input
  147. v-model="form.checkdeptlabornum"
  148. placeholder="验收人"
  149. ></el-input>
  150. </el-form-item>
  151. </el-col>
  152. <el-col :span="12">
  153. <el-form-item label="验收时间:">
  154. <el-input
  155. v-model="form.checktime"
  156. placeholder="验收时间"
  157. ></el-input>
  158. </el-form-item>
  159. </el-col>
  160. </el-row>
  161. <el-row>
  162. <el-col :span="24">
  163. <el-form-item label="验收意见:">
  164. <el-input
  165. type="textarea"
  166. :rows="3"
  167. v-model="form.checkdeptopinion"
  168. placeholder="验收意见"
  169. ></el-input>
  170. </el-form-item>
  171. </el-col>
  172. </el-row>
  173. </el-form>
  174. </div>
  175. </div>
  176. <!-- <div class="tabs">
  177. <div class="tab-box">
  178. <div
  179. class="tab-item"
  180. v-for="(tab, index) of tabs"
  181. :key="index"
  182. :class="{ active: activeTab == index }"
  183. @click="selectTab(index)"
  184. >
  185. <span
  186. class="svg-icon svg-icon-md"
  187. :class="activeTab == index ? 'svg-icon-green' : 'svg-icon-write'"
  188. >
  189. <SvgIcon :svgid="tab.icon"></SvgIcon>
  190. </span>
  191. <span>{{ tab.text }}</span>
  192. </div>
  193. </div>
  194. </div> -->
  195. <defect-elimination-tracking ref="det" :show="false" :formdata='formdata'></defect-elimination-tracking>
  196. </div>
  197. </template>
  198. <script>
  199. import SvgIcon from "@com/coms/icon/svg-icon.vue";
  200. import { warn } from "@vue/runtime-core";
  201. import DefectEliminationTracking from "../HealthControl/defect-elimination-tracking.vue"; //手环监控
  202. export default {
  203. components: {
  204. SvgIcon,DefectEliminationTracking
  205. },
  206. props: {
  207. formdata: Object,
  208. },
  209. data() {
  210. return {
  211. tabs: [
  212. {
  213. icon: "svg-gis",
  214. text: "GIS地貌",
  215. },
  216. {
  217. icon: "svg-jkp",
  218. text: "手环监控",
  219. },
  220. {
  221. icon: "svg-jk",
  222. text: "监控视频",
  223. },
  224. ],
  225. svgarr: [
  226. {
  227. svg: "svg-qx-warn",
  228. name: "流程未启动",
  229. },
  230. {
  231. svg: "svg-qx-down",
  232. name: "消缺单已下达",
  233. },
  234. {
  235. svg: "svg-qx-hour-hand",
  236. name: "消缺单处理中",
  237. },
  238. {
  239. svg: "svg-对",
  240. name: "消缺完成",
  241. },
  242. {
  243. svg: "svg-qx-flag",
  244. name: "消缺验收",
  245. },
  246. ],
  247. activeTab: 0,
  248. form: {
  249. wtId: "",
  250. wpId: "",
  251. wpName: "",
  252. tjyy: "",
  253. tjss: null,
  254. tjfs: null,
  255. bugnum: null,
  256. workgroup1: null,
  257. findlabornum: null,
  258. reportlabornum: null,
  259. description: null,
  260. departuretime: null,
  261. arrivaltime: null,
  262. prodtdeptopinion: null,
  263. workleader: null,
  264. repairedtime: null,
  265. repairedcomment: null,
  266. unresolvedbug: null,
  267. checktime: null,
  268. degradebugtype: null,
  269. repairdeptbugtype1: null,
  270. checkdeptlabornum: null,
  271. status: null,
  272. gzpc: null,
  273. gzjx: null,
  274. prodtdepttime: null,
  275. checkdeptopinion: null,
  276. rwfpsc: 0.0,
  277. rwfppjsc: 1066.0,
  278. ddxcsc: 0.0,
  279. ddxcpjsc: 0.0,
  280. qxclsc: 0.0,
  281. qxclpjsc: 0.0,
  282. yssc: 0.0,
  283. yspjsc: 0.0,
  284. workHours: null,
  285. },
  286. };
  287. },
  288. created() {
  289. this.form = this.formdata;
  290. console.warn(this.form);
  291. console.warn(this.statu(this.form));
  292. this.form.tjss = this.form.tjss
  293. ? new Date(this.form.tjss).formatDate("yyyy-MM-dd hh:mm:ss")
  294. : null;
  295. this.form.prodtdepttime = this.form.prodtdepttime
  296. ? new Date(this.form.prodtdepttime).formatDate("yyyy-MM-dd hh:mm:ss")
  297. : null;
  298. this.form.departuretime = this.form.departuretime
  299. ? new Date(this.form.departuretime).formatDate("yyyy-MM-dd hh:mm:ss")
  300. : null;
  301. this.form.arrivaltime = this.form.arrivaltime
  302. ? new Date(this.form.arrivaltime).formatDate("yyyy-MM-dd hh:mm:ss")
  303. : null;
  304. this.form.repairedtime = this.form.repairedtime
  305. ? new Date(this.form.repairedtime).formatDate("yyyy-MM-dd hh:mm:ss")
  306. : null;
  307. this.form.checktime = this.form.checktime
  308. ? new Date(this.form.checktime).formatDate("yyyy-MM-dd hh:mm:ss")
  309. : null;
  310. },
  311. // 函数
  312. methods: {
  313. showDet() {
  314. this.$refs.det.show();
  315. },
  316. statu(data) {
  317. if (null != data.checktime) {
  318. return "消缺验收";
  319. } else if (
  320. "等待运行验收" == data.status ||
  321. data.status == "集控中心修改检修时间" ||
  322. null != data.repairedtime
  323. ) {
  324. return "消缺完成";
  325. } else if (null != data.departuretime || null != data.arrivaltime) {
  326. return "消缺单处理中";
  327. } else if (
  328. "风机工作票已批准" == data.status ||
  329. data.status == "开风机工作票"
  330. ) {
  331. return "消缺单已下达";
  332. } else if (null == data.status || data.status == "流程未启动" || data.status == "流程未启用") {
  333. return "流程未启动";
  334. }
  335. else{
  336. return "流程未启动";
  337. }
  338. },
  339. selectTab: function (index) {
  340. this.activeTab = index;
  341. if(index == 1){
  342. this.showDet()
  343. }
  344. },
  345. },
  346. };
  347. </script>
  348. <style lang="less">
  349. .track-info {
  350. display: flex;
  351. .form-info {
  352. flex: 0 0 720px;
  353. .work-flow {
  354. height: 132px;
  355. width: 100%;
  356. background: fade(@gray, 20);
  357. margin-bottom: 8px;
  358. padding: 26px 69px;
  359. display: flex;
  360. position: relative;
  361. .work-flow-line {
  362. position: absolute;
  363. width: 600px;
  364. height: 4px;
  365. left: calc(50% - 300px);
  366. top: calc(50% - 11px);
  367. background: @green;
  368. }
  369. .work-flow-item {
  370. flex: 1;
  371. display: flex;
  372. flex-direction: column;
  373. align-items: center;
  374. justify-content: center;
  375. &.active {
  376. .work-flow-icon-item {
  377. .work-flow-icon-o {
  378. border: 1px solid @green;
  379. opacity: 0.4;
  380. }
  381. .work-flow-icon-i {
  382. border: 2px solid @green;
  383. background: linear-gradient(
  384. to bottom,
  385. #1f2b2b 0%,
  386. #1f2b2b 20%,
  387. @green 100%
  388. );
  389. }
  390. .svg-icon {
  391. svg {
  392. use {
  393. fill: @green;
  394. }
  395. }
  396. }
  397. }
  398. .work-flow-text {
  399. color: @green;
  400. }
  401. }
  402. .work-flow-icon-item {
  403. width: 60px;
  404. height: 60px;
  405. position: relative;
  406. .work-flow-icon-o {
  407. position: absolute;
  408. top: 0;
  409. left: 0;
  410. width: 60px;
  411. height: 60px;
  412. border-radius: 50%;
  413. border: 1px solid #b3bdc0;
  414. opacity: 0.4;
  415. }
  416. .work-flow-icon-m {
  417. position: absolute;
  418. top: 1px;
  419. left: 1px;
  420. width: 59px;
  421. height: 59px;
  422. border-radius: 50%;
  423. border: 4px solid #212b2b;
  424. }
  425. .work-flow-icon-i {
  426. position: absolute;
  427. top: 5px;
  428. left: 5px;
  429. width: 50px;
  430. height: 50px;
  431. border-radius: 50%;
  432. border: 2px solid #606769;
  433. background: linear-gradient(
  434. to bottom,
  435. #1f2b2b 0%,
  436. #1f2b2b 20%,
  437. #606769 100%
  438. );
  439. }
  440. .svg-icon {
  441. position: absolute;
  442. width: 26px;
  443. height: 26px;
  444. top: calc(50% - 10px);
  445. left: calc(50% - 13px);
  446. svg {
  447. width: 26px;
  448. height: 26px;
  449. use {
  450. fill: @gray-l;
  451. }
  452. }
  453. }
  454. }
  455. .work-flow-text {
  456. color: @gray-l;
  457. margin-top: 8px;
  458. font-size: @fontsize-s;
  459. }
  460. }
  461. }
  462. }
  463. .evaluate {
  464. flex: 0 0 358px;
  465. margin-left: 69px;
  466. .evaluate-item {
  467. display: flex;
  468. align-items: center;
  469. margin-top: 8px;
  470. .evaluate-label {
  471. width: 120px;
  472. text-align: right;
  473. }
  474. .evaluate-label,
  475. .evaluate-unit {
  476. font-size: @fontsize;
  477. color: @gray-l;
  478. }
  479. .input-number {
  480. display: inline-block;
  481. width: 62px;
  482. margin: 0 16px;
  483. }
  484. }
  485. }
  486. .tabs {
  487. flex: 0 0 220px;
  488. height: 619px;
  489. border-left: 1px solid #53626833;
  490. .tab-box {
  491. margin: 1.852vh 2.778vh;
  492. display: inline-block;
  493. z-index: 2;
  494. position: relative;
  495. margin: 26px auto;
  496. .tab-item {
  497. display: flex;
  498. align-items: center;
  499. // justify-content: center;
  500. font-size: @fontsize-l;
  501. cursor: pointer;
  502. // width: 120px;
  503. padding: 8px;
  504. margin-bottom: 16px;
  505. &.active {
  506. color: @green;
  507. position: relative;
  508. background-image: @greenLinearTop;
  509. &::after {
  510. content: "";
  511. position: absolute;
  512. width: 100%;
  513. height: 5px;
  514. border: 1px solid @green;
  515. border-top: 0;
  516. left: 0;
  517. bottom: 0;
  518. box-sizing: border-box;
  519. }
  520. }
  521. .svg-icon {
  522. margin-right: 16px;
  523. }
  524. }
  525. }
  526. }
  527. }
  528. </style>