infotrack.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  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. },
  293. // 函数
  294. methods: {
  295. showDet() {
  296. this.$refs.det.show();
  297. },
  298. statu(data) {
  299. if (null != data.checktime) {
  300. return "消缺验收";
  301. } else if (
  302. "等待运行验收" == data.status ||
  303. data.status == "集控中心修改检修时间" ||
  304. null != data.repairedtime
  305. ) {
  306. return "消缺完成";
  307. } else if (null != data.departuretime || null != data.arrivaltime) {
  308. return "消缺单处理中";
  309. } else if (
  310. "风机工作票已批准" == data.status ||
  311. data.status == "开风机工作票"
  312. ) {
  313. return "消缺单已下达";
  314. } else if (null == data.status || data.status == "流程未启动" || data.status == "流程未启用") {
  315. return "流程未启动";
  316. }
  317. else{
  318. return "流程未启动";
  319. }
  320. },
  321. selectTab: function (index) {
  322. this.activeTab = index;
  323. if(index == 1){
  324. this.showDet()
  325. }
  326. },
  327. },
  328. watch: {
  329. data(value) {
  330. // this.form = value;
  331. // console.warn(this.statu(value));
  332. // console.warn(this.form);
  333. this.form.tjss = value.tjss
  334. ? new Date(value.tjss).formatDate("yyyy-MM-dd hh:mm:ss")
  335. : "";
  336. this.form.prodtdepttime = value.prodtdepttime
  337. ? new Date(value.prodtdepttime).formatDate("yyyy-MM-dd hh:mm:ss")
  338. : "";
  339. this.form.departuretime = value.departuretime
  340. ? new Date(value.departuretime).formatDate("yyyy-MM-dd hh:mm:ss")
  341. : "";
  342. this.form.arrivaltime = value.arrivaltime
  343. ? new Date(value.arrivaltime).formatDate("yyyy-MM-dd hh:mm:ss")
  344. : "";
  345. this.form.repairedtime = value.repairedtime
  346. ? new Date(value.repairedtime).formatDate("yyyy-MM-dd hh:mm:ss")
  347. : "";
  348. this.form.checktime = value.checktime
  349. ? new Date(value.checktime).formatDate("yyyy-MM-dd hh:mm:ss")
  350. : "";
  351. },
  352. },
  353. };
  354. </script>
  355. <style lang="less">
  356. .track-info {
  357. display: flex;
  358. .form-info {
  359. flex: 0 0 720px;
  360. .work-flow {
  361. height: 132px;
  362. width: 100%;
  363. background: fade(@gray, 20);
  364. margin-bottom: 8px;
  365. padding: 26px 69px;
  366. display: flex;
  367. position: relative;
  368. .work-flow-line {
  369. position: absolute;
  370. width: 600px;
  371. height: 4px;
  372. left: calc(50% - 300px);
  373. top: calc(50% - 11px);
  374. background: @green;
  375. }
  376. .work-flow-item {
  377. flex: 1;
  378. display: flex;
  379. flex-direction: column;
  380. align-items: center;
  381. justify-content: center;
  382. &.active {
  383. .work-flow-icon-item {
  384. .work-flow-icon-o {
  385. border: 1px solid @green;
  386. opacity: 0.4;
  387. }
  388. .work-flow-icon-i {
  389. border: 2px solid @green;
  390. background: linear-gradient(
  391. to bottom,
  392. #1f2b2b 0%,
  393. #1f2b2b 20%,
  394. @green 100%
  395. );
  396. }
  397. .svg-icon {
  398. svg {
  399. use {
  400. fill: @green;
  401. }
  402. }
  403. }
  404. }
  405. .work-flow-text {
  406. color: @green;
  407. }
  408. }
  409. .work-flow-icon-item {
  410. width: 60px;
  411. height: 60px;
  412. position: relative;
  413. .work-flow-icon-o {
  414. position: absolute;
  415. top: 0;
  416. left: 0;
  417. width: 60px;
  418. height: 60px;
  419. border-radius: 50%;
  420. border: 1px solid #b3bdc0;
  421. opacity: 0.4;
  422. }
  423. .work-flow-icon-m {
  424. position: absolute;
  425. top: 1px;
  426. left: 1px;
  427. width: 59px;
  428. height: 59px;
  429. border-radius: 50%;
  430. border: 4px solid #212b2b;
  431. }
  432. .work-flow-icon-i {
  433. position: absolute;
  434. top: 5px;
  435. left: 5px;
  436. width: 50px;
  437. height: 50px;
  438. border-radius: 50%;
  439. border: 2px solid #606769;
  440. background: linear-gradient(
  441. to bottom,
  442. #1f2b2b 0%,
  443. #1f2b2b 20%,
  444. #606769 100%
  445. );
  446. }
  447. .svg-icon {
  448. position: absolute;
  449. width: 26px;
  450. height: 26px;
  451. top: calc(50% - 10px);
  452. left: calc(50% - 13px);
  453. svg {
  454. width: 26px;
  455. height: 26px;
  456. use {
  457. fill: @gray-l;
  458. }
  459. }
  460. }
  461. }
  462. .work-flow-text {
  463. color: @gray-l;
  464. margin-top: 8px;
  465. font-size: @fontsize-s;
  466. }
  467. }
  468. }
  469. }
  470. .evaluate {
  471. flex: 0 0 358px;
  472. margin-left: 69px;
  473. .evaluate-item {
  474. display: flex;
  475. align-items: center;
  476. margin-top: 8px;
  477. .evaluate-label {
  478. width: 120px;
  479. text-align: right;
  480. }
  481. .evaluate-label,
  482. .evaluate-unit {
  483. font-size: @fontsize;
  484. color: @gray-l;
  485. }
  486. .input-number {
  487. display: inline-block;
  488. width: 62px;
  489. margin: 0 16px;
  490. }
  491. }
  492. }
  493. .tabs {
  494. flex: 0 0 220px;
  495. height: 619px;
  496. border-left: 1px solid #53626833;
  497. .tab-box {
  498. margin: 1.852vh 2.778vh;
  499. display: inline-block;
  500. z-index: 2;
  501. position: relative;
  502. margin: 26px auto;
  503. .tab-item {
  504. display: flex;
  505. align-items: center;
  506. // justify-content: center;
  507. font-size: @fontsize-l;
  508. cursor: pointer;
  509. // width: 120px;
  510. padding: 8px;
  511. margin-bottom: 16px;
  512. &.active {
  513. color: @green;
  514. position: relative;
  515. background-image: @greenLinearTop;
  516. &::after {
  517. content: "";
  518. position: absolute;
  519. width: 100%;
  520. height: 5px;
  521. border: 1px solid @green;
  522. border-top: 0;
  523. left: 0;
  524. bottom: 0;
  525. box-sizing: border-box;
  526. }
  527. }
  528. .svg-icon {
  529. margin-right: 16px;
  530. }
  531. }
  532. }
  533. }
  534. }
  535. </style>