detail.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757
  1. <template>
  2. <div class="page" v-loading="pageLoading">
  3. <el-form label-width="130px">
  4. <div class="content-detail" v-show="num == 1">
  5. <div class="basic-details">
  6. <HeaderTitle title="基本信息" size="16px">
  7. <el-button
  8. type="primary"
  9. @click="
  10. $router.push({
  11. path: '/tickets',
  12. query: { title: '巡点检工单' }
  13. })
  14. "
  15. >返回</el-button
  16. >
  17. </HeaderTitle>
  18. <el-row>
  19. <el-col :span="12">
  20. <el-col :span="12">
  21. <el-form-item label="计划单号">
  22. <span> {{ infoData.planCode }} </span>
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="12">
  26. <el-form-item label="来源计划配置单号">
  27. <span> {{ infoData.planConfigCode }} </span>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :span="12">
  31. <el-form-item label="名称">
  32. <span> {{ infoData.planName }} </span>
  33. </el-form-item>
  34. </el-col>
  35. <el-col :span="12">
  36. <el-form-item label="部门">
  37. <span>
  38. {{ infoData.executeGroupName }}
  39. </span>
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="12">
  43. <el-form-item label="人员">
  44. <span>
  45. {{ infoData.executeUserName }}
  46. </span>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :span="12">
  50. <el-form-item label="计划完成时长">
  51. <span v-if="infoData.duration >= 0"
  52. >{{ infoData.duration }}分钟</span
  53. >
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="12">
  57. <el-form-item label="周期">
  58. <span v-if="infoData.ruleInfo">
  59. {{ infoData.ruleInfo.cycleValue
  60. }}{{
  61. getDictValue('巡点检周期', infoData.ruleInfo.cycleType)
  62. }}
  63. </span>
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="12">
  67. <el-form-item label="设备分类">
  68. <span> {{ infoData.categoryLevelName }} </span>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :span="12">
  72. <el-form-item label="规则名称">
  73. <span>
  74. {{ infoData.ruleName }}
  75. </span>
  76. </el-form-item>
  77. </el-col>
  78. <el-col :span="12">
  79. <el-form-item label="创建部门">
  80. <span> {{ infoData.createGroupName }} </span>
  81. </el-form-item>
  82. </el-col>
  83. <el-col :span="12">
  84. <el-form-item label="创建人">
  85. <span> {{ infoData.createUserName }} </span>
  86. </el-form-item>
  87. </el-col>
  88. <el-col :span="12">
  89. <el-form-item label="创建时间">
  90. <span> {{ infoData.createTime }} </span>
  91. </el-form-item>
  92. </el-col>
  93. <el-col :span="24">
  94. <el-form-item label="备注">
  95. <span> {{ infoData.remark }} </span>
  96. </el-form-item>
  97. </el-col>
  98. </el-col>
  99. <el-col :span="12">
  100. <img :src="data.imageUrl" alt="" />
  101. </el-col>
  102. </el-row>
  103. </div>
  104. <!-- 巡点检、执行信息 -->
  105. <!-- <div class="execute_info">
  106. <div class="execute_info_title">
  107. <span>执行信息</span>
  108. <span
  109. >执行人:{{ data.executeUserName }}
  110. <i style="margin: 0 18px"></i> 执行时间:{{
  111. data.acceptTime
  112. }}</span
  113. >
  114. </div>
  115. <HeaderTitle title="执行信息" size="16px"></HeaderTitle>
  116. <el-row class="execute_row">
  117. <el-col :span="8" class="column">
  118. <span class="label">确认结果:</span>
  119. <span class="value">{{
  120. infoData.status ? infoData.status.descp : ''
  121. }}</span>
  122. </el-col>
  123. <el-col :span="8" class="column">
  124. <span class="label">实际开始时间:</span>
  125. <span class="value">{{ infoData.acceptTime }}</span>
  126. </el-col>
  127. <el-col :span="8" class="column">
  128. <span class="label">实际结束时间:</span>
  129. <span class="value">{{ infoData.finishTime }}</span>
  130. </el-col>
  131. <el-col :span="24" class="column">
  132. <span class="label">超期原因:</span>
  133. <span class="value">{{ infoData.timeoutCause }}</span>
  134. </el-col>
  135. </el-row>
  136. </div> -->
  137. <!-- 巡点检、保养设备 -->
  138. <div class="maintain_equipment_info">
  139. <HeaderTitle title="巡点检设备" size="16px"></HeaderTitle>
  140. <div class="maintain_equipment_info_content">
  141. <div
  142. class="equipment_item"
  143. v-for="item in infoData.deviceList"
  144. :key="item.id"
  145. >
  146. <div class="equipment_info" v-if="item.substance">
  147. <div class="item_info">
  148. <span class="item_label">设备编码</span>
  149. <span class="item_value">{{ item.substance.code }}</span>
  150. </div>
  151. <div class="item_info">
  152. <span class="item_label">设备名称</span>
  153. <span class="item_value">{{ item.substance.name }}</span>
  154. </div>
  155. <div class="item_info">
  156. <span class="item_label">设备型号</span>
  157. <span class="item_value">{{ item.substance.model }}</span>
  158. </div>
  159. <div class="item_info">
  160. <span class="item_label">设备位置</span>
  161. <span class="item_value">{{
  162. item.substance.positionNames
  163. }}</span>
  164. </div>
  165. </div>
  166. <p>操作事项</p>
  167. <div class="ruleMatters_box">
  168. <el-table :data="item.workItems" border>
  169. <el-table-column label="序号" width="50">
  170. <template slot-scope="scope">
  171. <span>{{ scope.$index + 1 }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column label="事项" prop="name" width="100">
  175. <template slot-scope="scope">
  176. <div>
  177. <span>{{ scope.row.name }}</span>
  178. </div>
  179. </template>
  180. </el-table-column>
  181. <el-table-column label="内容" prop="content" width="300">
  182. <template slot-scope="scope">
  183. <div>
  184. <span>{{ scope.row.content }}</span>
  185. </div>
  186. </template>
  187. </el-table-column>
  188. <el-table-column label="操作指导" prop="operationGuide">
  189. <template slot-scope="scope">
  190. <div class="operationGuide_box">
  191. <div class="left_content">
  192. <template v-if="scope.row.operationGuide">
  193. <div
  194. v-for="(item, index) in scope.row.operationGuide
  195. .toolList"
  196. :key="item.id"
  197. >{{ index + 1 }}.{{ item.name }}</div
  198. >
  199. </template>
  200. </div>
  201. <div class="line"></div>
  202. <div class="right_content">
  203. <template v-if="scope.row.operationGuide">
  204. <div
  205. v-for="(item, index) in scope.row.operationGuide
  206. .procedureList"
  207. :key="item.id"
  208. >{{ index + 1 }}.{{ item.content }}</div
  209. >
  210. </template>
  211. </div>
  212. </div>
  213. </template>
  214. </el-table-column>
  215. <el-table-column label="标准" prop="norm" width="100">
  216. <template slot-scope="scope">
  217. <div>
  218. <span>{{ scope.row.norm }}</span>
  219. </div>
  220. </template>
  221. </el-table-column>
  222. <el-table-column label="状态" prop="status" width="100">
  223. <template slot-scope="scope">
  224. <div>
  225. <span>{{ options[scope.row.status] }}</span>
  226. </div>
  227. </template>
  228. </el-table-column>
  229. <el-table-column label="结果" prop="result" width="200">
  230. </el-table-column>
  231. </el-table>
  232. </div>
  233. </div>
  234. <!-- <div class="btnbox" v-if="$route.query.isshow">
  235. <el-button class="confirm-btn" type="danger" plain @click="reject"
  236. >驳回</el-button
  237. >
  238. <el-button class="confirm-btn" type="success" plain @click="pass"
  239. >通过</el-button
  240. >
  241. <el-button class="cancel-btn">关闭</el-button>
  242. </div> -->
  243. <!-- <div class="textbox" v-if="showtext">
  244. <el-input
  245. type="textarea"
  246. placeholder="请输入驳回原因"
  247. v-model="cause"
  248. maxlength="30"
  249. rows="5"
  250. show-word-limit
  251. >
  252. </el-input>
  253. <div class="textbtnbox">
  254. <el-button size="small" round @click="cancelreject"
  255. >取消</el-button
  256. >
  257. <el-button size="small" round @click="surereject"
  258. >提交</el-button
  259. >
  260. </div>
  261. </div> -->
  262. </div>
  263. </div>
  264. <!-- 巡点检、缺陷设备报修记录 -->
  265. <!-- <div class="repair_notes">
  266. <HeaderTitle title="缺陷设备报修记录" size="16px"></HeaderTitle>
  267. <div class="repair_notes_equipment_item">
  268. <el-row class="equipment_item_tilte">
  269. <el-col :span="8">
  270. <span class="label">设备名称:</span>
  271. <span>{{ repairNotes.equiName }}</span>
  272. </el-col>
  273. <el-col :span="8">
  274. <span class="label">规格型号:</span>
  275. <span>{{ repairNotes.equiModel }}</span>
  276. </el-col>
  277. <el-col :span="8">
  278. <span class="label">设备编码:</span>
  279. <span>{{ repairNotes.equiCode }}</span>
  280. </el-col>
  281. </el-row>
  282. <div class="main_info">
  283. <div>
  284. <span>报修记录编号:</span>
  285. <span>{{ repairNotes.repairsCode }}</span>
  286. </div>
  287. <div>
  288. <span>故障描述:</span>
  289. <span>{{ repairNotes.repairsDescription }}</span>
  290. </div>
  291. <div>
  292. <span>处理进度:</span>
  293. <span>{{ statusObj[repairNotes.status] }}</span>
  294. </div>
  295. </div>
  296. </div>
  297. </div> -->
  298. </div>
  299. </el-form>
  300. </div>
  301. </template>
  302. <script>
  303. import dictMixins from '@/mixins/dictMixins';
  304. import { getWordOrderDetail } from '@/api/tickets';
  305. export default {
  306. mixins: [dictMixins],
  307. data() {
  308. return {
  309. options: {
  310. 0: '正常',
  311. '-1': '缺陷'
  312. },
  313. num: 1,
  314. infoData: {},
  315. dialogVisible: false,
  316. data: {},
  317. repairNotes: {},
  318. pageLoading: false,
  319. typeValue: null,
  320. contract_type: [],
  321. status: [
  322. {
  323. value: true,
  324. label: '失效'
  325. },
  326. {
  327. value: false,
  328. label: '生效'
  329. }
  330. ],
  331. ruleItem: [],
  332. cause: '',
  333. showtext: false,
  334. from: null
  335. };
  336. },
  337. created() {
  338. this.requestDict('巡点检周期');
  339. this.getInfo();
  340. },
  341. methods: {
  342. // getStatus: useDictLabel(patrolMatterStatus),
  343. delete() {},
  344. // 点击切换事件
  345. tab(index) {
  346. this.num = index;
  347. },
  348. goBack() {
  349. window.sessionStorage.setItem('patrolTabType', 'work');
  350. if (this.form) {
  351. this.$router.push({
  352. path: '/workspace/workOrder',
  353. query: { activeName: 'polling' }
  354. });
  355. } else {
  356. this.$router.go(-1);
  357. }
  358. },
  359. // 表格数据
  360. getInfo() {
  361. this.pageLoading = true;
  362. getWordOrderDetail(this.$route.query.id)
  363. .then((data) => {
  364. this.infoData = data;
  365. // if (res.success) {
  366. // this.data = res.data;
  367. // this.data.planEquiList = this.data.planEquiList.filter(
  368. // (item) => item.itemList && item.itemList.length > 0
  369. // );
  370. // // 获取 缺陷设备报修记录
  371. // const repairId = res.data.planEquiList[0].repairId;
  372. // if (repairId) {
  373. // this.getRepairNotes(repairId);
  374. // }
  375. // }
  376. this.pageLoading = false;
  377. })
  378. .catch(() => {
  379. this.pageLoading = false;
  380. });
  381. },
  382. // 获取 缺陷设备报修记录
  383. async getRepairNotes(repairId) {
  384. const res = await repair.getInfo(repairId);
  385. if (res?.success) {
  386. console.log('缺陷设备报修记录:', res.data);
  387. this.repairNotes = res.data;
  388. }
  389. },
  390. //通过按钮事件
  391. pass() {
  392. let params = {
  393. planId: this.$route.query.id,
  394. checked: 2,
  395. myHandleId: this.$route.query.dbid,
  396. cause: this.cause,
  397. type: 2, //1维修;2保养,巡点检
  398. handleType: 0 //办理类型(0 审批 1 验收)
  399. };
  400. sendAudit(params).then((res) => {
  401. if (res.success) {
  402. this.$message.success('审批通过!');
  403. this.$router.back();
  404. }
  405. });
  406. },
  407. //驳回按钮事件
  408. reject() {
  409. this.showtext = true;
  410. },
  411. cancelreject() {
  412. this.showtext = false;
  413. this.cause = '';
  414. },
  415. surereject() {
  416. if (!this.cause) {
  417. this.$message.info('请填写驳回原因!');
  418. } else {
  419. let params = {
  420. id: this.$route.query.id,
  421. checked: 0,
  422. myHandleId: this.$route.query.dbid,
  423. cause: this.cause,
  424. type: 2, //1维修;2保养,巡点检
  425. handleType: 0 //办理类型(0 审批 1 验收)
  426. };
  427. sendAudit(params).then((res) => {
  428. if (res.success) {
  429. this.$message.error('审批驳回!');
  430. this.$router.back();
  431. }
  432. });
  433. }
  434. }
  435. }
  436. };
  437. </script>
  438. <style lang="scss" scoped>
  439. // @import '@/assets/css/oaa.scss';
  440. .page {
  441. padding: 10px;
  442. }
  443. .page-title {
  444. background: #fff;
  445. font-size: 18px;
  446. padding: 6px 20px;
  447. font-weight: 500;
  448. .page-title-div {
  449. margin: 5px 0;
  450. height: 30px;
  451. line-height: 30px;
  452. border-bottom: 1px solid #eaeefb;
  453. .title-div-no {
  454. margin-left: 10px;
  455. font-weight: 400;
  456. color: #909090;
  457. font-size: 14px;
  458. }
  459. }
  460. }
  461. .page-data {
  462. padding-top: 10px;
  463. }
  464. .content-detail {
  465. background: #fff;
  466. padding: 20px;
  467. }
  468. .flows {
  469. .flow-left {
  470. width: 156px;
  471. height: 70px;
  472. border: 1px dashed #ccc;
  473. padding: 10px;
  474. }
  475. .row {
  476. margin-top: 13px;
  477. }
  478. }
  479. .basic-details-title {
  480. margin-bottom: 12px;
  481. margin-top: 20px;
  482. border-bottom: 1px solid #1890ff;
  483. padding-bottom: 8px;
  484. display: flex;
  485. justify-content: space-between;
  486. }
  487. .basic-details-title .border-span {
  488. height: 18px;
  489. font-size: 16px;
  490. border-left: 4px solid #1890ff;
  491. padding-left: 8px;
  492. font-weight: 500;
  493. }
  494. .heade-right {
  495. // float: right;
  496. .heade-right-content {
  497. margin-right: 12px;
  498. font-size: 14px;
  499. display: inline-block;
  500. .content-key {
  501. color: #3e3e3e;
  502. margin-right: 12px;
  503. font-weight: 500;
  504. }
  505. .content-value {
  506. color: #000;
  507. }
  508. }
  509. }
  510. .list-title {
  511. font-size: 14px;
  512. color: #3e3e3e;
  513. margin: 10px 0px;
  514. }
  515. .goods {
  516. background: #a30014;
  517. border: 1px solid #a30014;
  518. }
  519. .details-title {
  520. display: inline-block;
  521. color: #6e6e6e;
  522. font-size: 14px;
  523. font-weight: bold;
  524. margin-right: 13px;
  525. width: 70px;
  526. text-align: right;
  527. }
  528. .details-con {
  529. color: #3e3e3e;
  530. font-size: 14px;
  531. }
  532. .detailed-tab {
  533. margin-left: 10px;
  534. margin-top: 10px;
  535. }
  536. ::v-deep .el-form-item--medium .el-form-item__label {
  537. color: #6e6e6e;
  538. font-size: 14px;
  539. font-weight: bold;
  540. }
  541. .warehouse {
  542. display: block;
  543. border-bottom: 1px solid #eaeefb;
  544. padding: 10px 0;
  545. }
  546. .box-card {
  547. .store-box {
  548. width: 80%;
  549. .store-box-span {
  550. display: inline-block;
  551. font-size: 14px;
  552. height: 50px;
  553. width: 50px;
  554. text-align: center;
  555. line-height: 50px;
  556. color: #fff;
  557. margin: 2px;
  558. }
  559. }
  560. }
  561. .vacant {
  562. background: #3196fb;
  563. }
  564. .inUse {
  565. background: #157a2c;
  566. }
  567. .invalid {
  568. background: #cccccc;
  569. }
  570. .full {
  571. background: #cc3300;
  572. }
  573. .maintain_equipment_info {
  574. .maintain_equipment_info_title {
  575. border-bottom: 1px solid #1890ff;
  576. padding-bottom: 3px;
  577. margin-bottom: 20px;
  578. > span {
  579. display: inline-block;
  580. line-height: 16px;
  581. border-left: 6px solid #1890ff;
  582. padding-left: 6px;
  583. }
  584. }
  585. .maintain_equipment_info_content {
  586. padding: 0 30px;
  587. .equipment_item {
  588. border: 1px solid #ccc;
  589. font-size: 14px;
  590. padding: 15px;
  591. margin-bottom: 30px;
  592. .equipment_info {
  593. display: flex;
  594. flex-wrap: wrap;
  595. border: 1px solid #ddd;
  596. .item_info {
  597. width: 33.33%;
  598. height: 24px;
  599. line-height: 24px;
  600. display: flex;
  601. .item_label {
  602. width: 90px;
  603. text-align: center;
  604. background-color: #f2f2f2;
  605. font-weight: 700;
  606. }
  607. .item_value {
  608. border-bottom: 1px solid #f2f2f2;
  609. flex: 1;
  610. padding-left: 5px;
  611. }
  612. &:last-child {
  613. width: 100%;
  614. .item_value {
  615. border: 0;
  616. }
  617. }
  618. }
  619. }
  620. > p {
  621. margin-top: 20px;
  622. color: #797979;
  623. }
  624. .matter_info {
  625. ::v-deep .el-table {
  626. th.el-table__cell {
  627. background-color: #f2f2f2;
  628. padding: 0;
  629. }
  630. td.el-table__cell {
  631. padding: 0;
  632. }
  633. }
  634. }
  635. .ruleMatters_box {
  636. flex: 3;
  637. height: 100%;
  638. display: flex;
  639. flex-direction: column;
  640. .divider {
  641. flex: 0 0 50px;
  642. .title {
  643. height: 35px;
  644. }
  645. }
  646. .el-table {
  647. overflow: auto;
  648. .operationGuide_box {
  649. width: 100%;
  650. display: flex;
  651. position: relative;
  652. .left_content {
  653. flex: 0 0 300px;
  654. padding: 10px;
  655. margin-right: 10px;
  656. overflow-y: auto;
  657. }
  658. .line {
  659. position: absolute;
  660. top: -10px;
  661. left: 300px;
  662. bottom: -10px;
  663. height: 110%;
  664. width: 1px;
  665. background-color: #ededed;
  666. }
  667. .right_content {
  668. flex: 1;
  669. padding: 10px;
  670. overflow-y: auto;
  671. }
  672. }
  673. }
  674. }
  675. }
  676. }
  677. }
  678. .execute_info {
  679. margin: 30px 0;
  680. .execute_info_title {
  681. border-bottom: 1px solid #1890ff;
  682. padding-bottom: 3px;
  683. margin-bottom: 20px;
  684. display: flex;
  685. justify-content: space-between;
  686. > span:first-child {
  687. line-height: 16px;
  688. border-left: 6px solid #1890ff;
  689. padding-left: 6px;
  690. }
  691. }
  692. .execute_row {
  693. padding: 0 30px;
  694. .column {
  695. display: flex;
  696. font-size: 14px;
  697. margin-bottom: 20px;
  698. .label {
  699. // width: 110px;
  700. text-align: center;
  701. font-weight: 700;
  702. }
  703. }
  704. }
  705. }
  706. .repair_notes {
  707. .repair_notes_title {
  708. border-bottom: 1px solid #1890ff;
  709. padding-bottom: 3px;
  710. margin-bottom: 20px;
  711. > span {
  712. display: inline-block;
  713. line-height: 16px;
  714. border-left: 6px solid #1890ff;
  715. padding-left: 6px;
  716. }
  717. }
  718. .repair_notes_equipment_item {
  719. padding: 0 20px;
  720. .equipment_item_tilte {
  721. background-color: #f7f7f7;
  722. height: 36px;
  723. line-height: 36px;
  724. .label {
  725. font-weight: 700;
  726. }
  727. }
  728. .main_info {
  729. font-size: 14px;
  730. margin-top: 15px;
  731. > div {
  732. margin-bottom: 10px;
  733. }
  734. }
  735. }
  736. }
  737. .btnbox {
  738. display: flex;
  739. justify-content: center;
  740. }
  741. ::v-deep .el-button {
  742. padding: 10px 20px;
  743. margin-right: 10px;
  744. }
  745. .textbtnbox {
  746. margin-top: 10px;
  747. display: flex;
  748. justify-content: center;
  749. }
  750. </style>