details.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775
  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: '/maintenance/equipment',
  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 class="matter_info">
  234. <el-table :data="item.workItems || []" border>
  235. <el-table-column label="序号" align="center" width="80">
  236. <template slot-scope="scope">
  237. <span>{{ scope.$index + 1 }}</span>
  238. </template>
  239. </el-table-column>
  240. <el-table-column label="事项" prop="item" />
  241. <el-table-column label="内容" prop="content" />
  242. <el-table-column label="标准" prop="standard" />
  243. </el-table>
  244. </div> -->
  245. </div>
  246. <!-- <div class="btnbox" v-if="$route.query.isshow">
  247. <el-button class="confirm-btn" type="danger" plain @click="reject"
  248. >驳回</el-button
  249. >
  250. <el-button class="confirm-btn" type="success" plain @click="pass"
  251. >通过</el-button
  252. >
  253. <el-button class="cancel-btn">关闭</el-button>
  254. </div> -->
  255. <!-- <div class="textbox" v-if="showtext">
  256. <el-input
  257. type="textarea"
  258. placeholder="请输入驳回原因"
  259. v-model="cause"
  260. maxlength="30"
  261. rows="5"
  262. show-word-limit
  263. >
  264. </el-input>
  265. <div class="textbtnbox">
  266. <el-button size="small" round @click="cancelreject"
  267. >取消</el-button
  268. >
  269. <el-button size="small" round @click="surereject"
  270. >提交</el-button
  271. >
  272. </div>
  273. </div> -->
  274. </div>
  275. </div>
  276. <HeaderTitle title="备品备件申请单" size="16px"></HeaderTitle>
  277. <editd :id="infoData.id" />
  278. <!-- 巡点检、缺陷设备报修记录 -->
  279. <!-- <div class="repair_notes">
  280. <HeaderTitle title="缺陷设备报修记录" size="16px"></HeaderTitle>
  281. <div class="repair_notes_equipment_item">
  282. <el-row class="equipment_item_tilte">
  283. <el-col :span="8">
  284. <span class="label">设备名称:</span>
  285. <span>{{ repairNotes.equiName }}</span>
  286. </el-col>
  287. <el-col :span="8">
  288. <span class="label">规格型号:</span>
  289. <span>{{ repairNotes.equiModel }}</span>
  290. </el-col>
  291. <el-col :span="8">
  292. <span class="label">设备编码:</span>
  293. <span>{{ repairNotes.equiCode }}</span>
  294. </el-col>
  295. </el-row>
  296. <div class="main_info">
  297. <div>
  298. <span>报修记录编号:</span>
  299. <span>{{ repairNotes.repairsCode }}</span>
  300. </div>
  301. <div>
  302. <span>故障描述:</span>
  303. <span>{{ repairNotes.repairsDescription }}</span>
  304. </div>
  305. <div>
  306. <span>处理进度:</span>
  307. <span>{{ statusObj[repairNotes.status] }}</span>
  308. </div>
  309. </div>
  310. </div>
  311. </div> -->
  312. </div>
  313. </el-form>
  314. </div>
  315. </template>
  316. <script>
  317. import dictMixins from '@/mixins/dictMixins';
  318. import { getWordOrderDetail } from '@/api/maintenance/patrol_maintenance';
  319. import editd from '@/views/sparePartsApply/components/editd';
  320. export default {
  321. mixins: [dictMixins],
  322. components:{
  323. editd
  324. },
  325. data() {
  326. return {
  327. options: {
  328. 0: '正常',
  329. '-1': '缺陷'
  330. },
  331. num: 1,
  332. infoData: {},
  333. dialogVisible: false,
  334. data: {},
  335. repairNotes: {},
  336. pageLoading: false,
  337. typeValue: null,
  338. contract_type: [],
  339. status: [
  340. {
  341. value: true,
  342. label: '失效'
  343. },
  344. {
  345. value: false,
  346. label: '生效'
  347. }
  348. ],
  349. ruleItem: [],
  350. cause: '',
  351. showtext: false,
  352. from: null
  353. };
  354. },
  355. created() {
  356. this.requestDict('巡点检周期');
  357. this.getInfo();
  358. },
  359. methods: {
  360. // getStatus: useDictLabel(patrolMatterStatus),
  361. delete() {},
  362. // 点击切换事件
  363. tab(index) {
  364. this.num = index;
  365. },
  366. goBack() {
  367. window.sessionStorage.setItem('patrolTabType', 'work');
  368. if (this.form) {
  369. this.$router.push({
  370. path: '/workspace/workOrder',
  371. query: { activeName: 'polling' }
  372. });
  373. } else {
  374. this.$router.go(-1);
  375. }
  376. },
  377. // 表格数据
  378. getInfo() {
  379. this.pageLoading = true;
  380. getWordOrderDetail(this.$route.query.id)
  381. .then((data) => {
  382. this.infoData = data;
  383. // if (res.success) {
  384. // this.data = res.data;
  385. // this.data.planEquiList = this.data.planEquiList.filter(
  386. // (item) => item.itemList && item.itemList.length > 0
  387. // );
  388. // // 获取 缺陷设备报修记录
  389. // const repairId = res.data.planEquiList[0].repairId;
  390. // if (repairId) {
  391. // this.getRepairNotes(repairId);
  392. // }
  393. // }
  394. this.pageLoading = false;
  395. })
  396. .catch(() => {
  397. this.pageLoading = false;
  398. });
  399. },
  400. // 获取 缺陷设备报修记录
  401. async getRepairNotes(repairId) {
  402. const res = await repair.getInfo(repairId);
  403. if (res?.success) {
  404. console.log('缺陷设备报修记录:', res.data);
  405. this.repairNotes = res.data;
  406. }
  407. },
  408. //通过按钮事件
  409. pass() {
  410. let params = {
  411. planId: this.$route.query.id,
  412. checked: 2,
  413. myHandleId: this.$route.query.dbid,
  414. cause: this.cause,
  415. type: 2, //1维修;2保养,巡点检
  416. handleType: 0 //办理类型(0 审批 1 验收)
  417. };
  418. sendAudit(params).then((res) => {
  419. if (res.success) {
  420. this.$message.success('审批通过!');
  421. this.$router.back();
  422. }
  423. });
  424. },
  425. //驳回按钮事件
  426. reject() {
  427. this.showtext = true;
  428. },
  429. cancelreject() {
  430. this.showtext = false;
  431. this.cause = '';
  432. },
  433. surereject() {
  434. if (!this.cause) {
  435. this.$message.info('请填写驳回原因!');
  436. } else {
  437. let params = {
  438. id: this.$route.query.id,
  439. checked: 0,
  440. myHandleId: this.$route.query.dbid,
  441. cause: this.cause,
  442. type: 2, //1维修;2保养,巡点检
  443. handleType: 0 //办理类型(0 审批 1 验收)
  444. };
  445. sendAudit(params).then((res) => {
  446. if (res.success) {
  447. this.$message.error('审批驳回!');
  448. this.$router.back();
  449. }
  450. });
  451. }
  452. }
  453. }
  454. };
  455. </script>
  456. <style lang="scss" scoped>
  457. // @import '@/assets/css/oaa.scss';
  458. .page {
  459. padding: 10px;
  460. }
  461. .page-title {
  462. background: #fff;
  463. font-size: 18px;
  464. padding: 6px 20px;
  465. font-weight: 500;
  466. .page-title-div {
  467. margin: 5px 0;
  468. height: 30px;
  469. line-height: 30px;
  470. border-bottom: 1px solid #eaeefb;
  471. .title-div-no {
  472. margin-left: 10px;
  473. font-weight: 400;
  474. color: #909090;
  475. font-size: 14px;
  476. }
  477. }
  478. }
  479. .page-data {
  480. padding-top: 10px;
  481. }
  482. .content-detail {
  483. background: #fff;
  484. padding: 20px;
  485. }
  486. .flows {
  487. .flow-left {
  488. width: 156px;
  489. height: 70px;
  490. border: 1px dashed #ccc;
  491. padding: 10px;
  492. }
  493. .row {
  494. margin-top: 13px;
  495. }
  496. }
  497. .basic-details-title {
  498. margin-bottom: 12px;
  499. margin-top: 20px;
  500. border-bottom: 1px solid #1890ff;
  501. padding-bottom: 8px;
  502. display: flex;
  503. justify-content: space-between;
  504. }
  505. .basic-details-title .border-span {
  506. height: 18px;
  507. font-size: 16px;
  508. border-left: 4px solid #1890ff;
  509. padding-left: 8px;
  510. font-weight: 500;
  511. }
  512. .heade-right {
  513. // float: right;
  514. .heade-right-content {
  515. margin-right: 12px;
  516. font-size: 14px;
  517. display: inline-block;
  518. .content-key {
  519. color: #3e3e3e;
  520. margin-right: 12px;
  521. font-weight: 500;
  522. }
  523. .content-value {
  524. color: #000;
  525. }
  526. }
  527. }
  528. .list-title {
  529. font-size: 14px;
  530. color: #3e3e3e;
  531. margin: 10px 0px;
  532. }
  533. .goods {
  534. background: #a30014;
  535. border: 1px solid #a30014;
  536. }
  537. .details-title {
  538. display: inline-block;
  539. color: #6e6e6e;
  540. font-size: 14px;
  541. font-weight: bold;
  542. margin-right: 13px;
  543. width: 70px;
  544. text-align: right;
  545. }
  546. .details-con {
  547. color: #3e3e3e;
  548. font-size: 14px;
  549. }
  550. .detailed-tab {
  551. margin-left: 10px;
  552. margin-top: 10px;
  553. }
  554. ::v-deep .el-form-item--medium .el-form-item__label {
  555. color: #6e6e6e;
  556. font-size: 14px;
  557. font-weight: bold;
  558. }
  559. .warehouse {
  560. display: block;
  561. border-bottom: 1px solid #eaeefb;
  562. padding: 10px 0;
  563. }
  564. .box-card {
  565. .store-box {
  566. width: 80%;
  567. .store-box-span {
  568. display: inline-block;
  569. font-size: 14px;
  570. height: 50px;
  571. width: 50px;
  572. text-align: center;
  573. line-height: 50px;
  574. color: #fff;
  575. margin: 2px;
  576. }
  577. }
  578. }
  579. .vacant {
  580. background: #3196fb;
  581. }
  582. .inUse {
  583. background: #157a2c;
  584. }
  585. .invalid {
  586. background: #cccccc;
  587. }
  588. .full {
  589. background: #cc3300;
  590. }
  591. .maintain_equipment_info {
  592. .maintain_equipment_info_title {
  593. border-bottom: 1px solid #1890ff;
  594. padding-bottom: 3px;
  595. margin-bottom: 20px;
  596. > span {
  597. display: inline-block;
  598. line-height: 16px;
  599. border-left: 6px solid #1890ff;
  600. padding-left: 6px;
  601. }
  602. }
  603. .maintain_equipment_info_content {
  604. padding: 0 30px;
  605. .equipment_item {
  606. border: 1px solid #ccc;
  607. font-size: 14px;
  608. padding: 15px;
  609. margin-bottom: 30px;
  610. .equipment_info {
  611. display: flex;
  612. flex-wrap: wrap;
  613. border: 1px solid #ddd;
  614. .item_info {
  615. width: 33.33%;
  616. height: 24px;
  617. line-height: 24px;
  618. display: flex;
  619. .item_label {
  620. width: 90px;
  621. text-align: center;
  622. background-color: #f2f2f2;
  623. font-weight: 700;
  624. }
  625. .item_value {
  626. border-bottom: 1px solid #f2f2f2;
  627. flex: 1;
  628. padding-left: 5px;
  629. }
  630. &:last-child {
  631. width: 100%;
  632. .item_value {
  633. border: 0;
  634. }
  635. }
  636. }
  637. }
  638. > p {
  639. margin-top: 20px;
  640. color: #797979;
  641. }
  642. .matter_info {
  643. ::v-deep .el-table {
  644. th.el-table__cell {
  645. background-color: #f2f2f2;
  646. padding: 0;
  647. }
  648. td.el-table__cell {
  649. padding: 0;
  650. }
  651. }
  652. }
  653. .ruleMatters_box {
  654. flex: 3;
  655. height: 100%;
  656. display: flex;
  657. flex-direction: column;
  658. .divider {
  659. flex: 0 0 50px;
  660. .title {
  661. height: 35px;
  662. }
  663. }
  664. .el-table {
  665. overflow: auto;
  666. .operationGuide_box {
  667. width: 100%;
  668. display: flex;
  669. position: relative;
  670. .left_content {
  671. flex: 0 0 300px;
  672. padding: 10px;
  673. margin-right: 10px;
  674. overflow-y: auto;
  675. }
  676. .line {
  677. position: absolute;
  678. top: -10px;
  679. left: 300px;
  680. bottom: -10px;
  681. height: 110%;
  682. width: 1px;
  683. background-color: #ededed;
  684. }
  685. .right_content {
  686. flex: 1;
  687. padding: 10px;
  688. overflow-y: auto;
  689. }
  690. }
  691. }
  692. }
  693. }
  694. }
  695. }
  696. .execute_info {
  697. margin: 30px 0;
  698. .execute_info_title {
  699. border-bottom: 1px solid #1890ff;
  700. padding-bottom: 3px;
  701. margin-bottom: 20px;
  702. display: flex;
  703. justify-content: space-between;
  704. > span:first-child {
  705. line-height: 16px;
  706. border-left: 6px solid #1890ff;
  707. padding-left: 6px;
  708. }
  709. }
  710. .execute_row {
  711. padding: 0 30px;
  712. .column {
  713. display: flex;
  714. font-size: 14px;
  715. margin-bottom: 20px;
  716. .label {
  717. // width: 110px;
  718. text-align: center;
  719. font-weight: 700;
  720. }
  721. }
  722. }
  723. }
  724. .repair_notes {
  725. .repair_notes_title {
  726. border-bottom: 1px solid #1890ff;
  727. padding-bottom: 3px;
  728. margin-bottom: 20px;
  729. > span {
  730. display: inline-block;
  731. line-height: 16px;
  732. border-left: 6px solid #1890ff;
  733. padding-left: 6px;
  734. }
  735. }
  736. .repair_notes_equipment_item {
  737. padding: 0 20px;
  738. .equipment_item_tilte {
  739. background-color: #f7f7f7;
  740. height: 36px;
  741. line-height: 36px;
  742. .label {
  743. font-weight: 700;
  744. }
  745. }
  746. .main_info {
  747. font-size: 14px;
  748. margin-top: 15px;
  749. > div {
  750. margin-bottom: 10px;
  751. }
  752. }
  753. }
  754. }
  755. .btnbox {
  756. display: flex;
  757. justify-content: center;
  758. }
  759. ::v-deep .el-button {
  760. padding: 10px 20px;
  761. margin-right: 10px;
  762. }
  763. .textbtnbox {
  764. margin-top: 10px;
  765. display: flex;
  766. justify-content: center;
  767. }
  768. </style>