infotrack.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. <template>
  2. <div class="track-info">
  3. <div class="form-info" style="flex:none">
  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. width: 100%;
  353. // flex: 0 0 720px;
  354. .work-flow {
  355. height: 132px;
  356. width: 100%;
  357. background: fade(@gray, 20);
  358. margin-bottom: 8px;
  359. padding: 26px 69px;
  360. display: flex;
  361. position: relative;
  362. .work-flow-line {
  363. position: absolute;
  364. width: 600px;
  365. height: 4px;
  366. left: calc(50% - 300px);
  367. top: calc(50% - 11px);
  368. background: @green;
  369. }
  370. .work-flow-item {
  371. flex: 1;
  372. display: flex;
  373. flex-direction: column;
  374. align-items: center;
  375. justify-content: center;
  376. &.active {
  377. .work-flow-icon-item {
  378. .work-flow-icon-o {
  379. border: 1px solid @green;
  380. opacity: 0.4;
  381. }
  382. .work-flow-icon-i {
  383. border: 2px solid @green;
  384. background: linear-gradient(
  385. to bottom,
  386. #1f2b2b 0%,
  387. #1f2b2b 20%,
  388. @green 100%
  389. );
  390. }
  391. .svg-icon {
  392. svg {
  393. use {
  394. fill: @green;
  395. }
  396. }
  397. }
  398. }
  399. .work-flow-text {
  400. color: @green;
  401. }
  402. }
  403. .work-flow-icon-item {
  404. width: 60px;
  405. height: 60px;
  406. position: relative;
  407. .work-flow-icon-o {
  408. position: absolute;
  409. top: 0;
  410. left: 0;
  411. width: 60px;
  412. height: 60px;
  413. border-radius: 50%;
  414. border: 1px solid #b3bdc0;
  415. opacity: 0.4;
  416. }
  417. .work-flow-icon-m {
  418. position: absolute;
  419. top: 1px;
  420. left: 1px;
  421. width: 59px;
  422. height: 59px;
  423. border-radius: 50%;
  424. border: 4px solid #212b2b;
  425. }
  426. .work-flow-icon-i {
  427. position: absolute;
  428. top: 5px;
  429. left: 5px;
  430. width: 50px;
  431. height: 50px;
  432. border-radius: 50%;
  433. border: 2px solid #606769;
  434. background: linear-gradient(
  435. to bottom,
  436. #1f2b2b 0%,
  437. #1f2b2b 20%,
  438. #606769 100%
  439. );
  440. }
  441. .svg-icon {
  442. position: absolute;
  443. width: 26px;
  444. height: 26px;
  445. top: calc(50% - 10px);
  446. left: calc(50% - 13px);
  447. svg {
  448. width: 26px;
  449. height: 26px;
  450. use {
  451. fill: @gray-l;
  452. }
  453. }
  454. }
  455. }
  456. .work-flow-text {
  457. color: @gray-l;
  458. margin-top: 8px;
  459. font-size: @fontsize-s;
  460. }
  461. }
  462. }
  463. }
  464. .evaluate {
  465. flex: 0 0 358px;
  466. margin-left: 69px;
  467. .evaluate-item {
  468. display: flex;
  469. align-items: center;
  470. margin-top: 8px;
  471. .evaluate-label {
  472. width: 120px;
  473. text-align: right;
  474. }
  475. .evaluate-label,
  476. .evaluate-unit {
  477. font-size: @fontsize;
  478. color: @gray-l;
  479. }
  480. .input-number {
  481. display: inline-block;
  482. width: 62px;
  483. margin: 0 16px;
  484. }
  485. }
  486. }
  487. .tabs {
  488. flex: 0 0 220px;
  489. height: 619px;
  490. border-left: 1px solid #53626833;
  491. .tab-box {
  492. margin: 1.852vh 2.778vh;
  493. display: inline-block;
  494. z-index: 2;
  495. position: relative;
  496. margin: 26px auto;
  497. .tab-item {
  498. display: flex;
  499. align-items: center;
  500. // justify-content: center;
  501. font-size: @fontsize-l;
  502. cursor: pointer;
  503. // width: 120px;
  504. padding: 8px;
  505. margin-bottom: 16px;
  506. &.active {
  507. color: @green;
  508. position: relative;
  509. background-image: @greenLinearTop;
  510. &::after {
  511. content: "";
  512. position: absolute;
  513. width: 100%;
  514. height: 5px;
  515. border: 1px solid @green;
  516. border-top: 0;
  517. left: 0;
  518. bottom: 0;
  519. box-sizing: border-box;
  520. }
  521. }
  522. .svg-icon {
  523. margin-right: 16px;
  524. }
  525. }
  526. }
  527. }
  528. }
  529. </style>